|
@@ -901,14 +901,6 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public HttpResult<OrderVo> getByCompanyId(@NotBlank(message = "子订单不能为空") String companyId, String userId) {
|
|
public HttpResult<OrderVo> getByCompanyId(@NotBlank(message = "子订单不能为空") String companyId, String userId) {
|
|
|
- //获取缓存内的锁的订单
|
|
|
|
|
- String orderUserId = redisTemplate.opsForValue().get("FEE_AUDIT:" + companyId);
|
|
|
|
|
- if(Objects.nonNull(orderUserId)){
|
|
|
|
|
- if(!BaseController.getUserId().equals(orderUserId)){
|
|
|
|
|
- throw new SystemException("订单正在审核中,请稍后再试");
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- redisTemplate.opsForValue().set("FEE_AUDIT:"+companyId, BaseController.getUserId(),1800, TimeUnit.SECONDS);
|
|
|
|
|
OrderVo orderAndAreaCompany = baseMapper.getOrderAndAreaCompany(companyId);
|
|
OrderVo orderAndAreaCompany = baseMapper.getOrderAndAreaCompany(companyId);
|
|
|
//查询子订单的数据是否存在
|
|
//查询子订单的数据是否存在
|
|
|
InsAreaCompanyInfo insAreaCompanyInfo = insAreaCompanyInfoMapper.selectOne(new LambdaQueryWrapper<InsAreaCompanyInfo>()
|
|
InsAreaCompanyInfo insAreaCompanyInfo = insAreaCompanyInfoMapper.selectOne(new LambdaQueryWrapper<InsAreaCompanyInfo>()
|
|
@@ -1121,6 +1113,19 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
feeDisplayService.setUpFeePresentationFormat(orderAndAreaCompany);
|
|
feeDisplayService.setUpFeePresentationFormat(orderAndAreaCompany);
|
|
|
return HttpResult.ok("success", orderAndAreaCompany);
|
|
return HttpResult.ok("success", orderAndAreaCompany);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public HttpResult lockFeeDetail(String orderNo){
|
|
|
|
|
+ //获取缓存内的锁的订单
|
|
|
|
|
+ String orderUserId = redisTemplate.opsForValue().get("FEE_AUDIT:" + orderNo);
|
|
|
|
|
+ if(Objects.nonNull(orderUserId)){
|
|
|
|
|
+ if(!BaseController.getUserId().equals(orderUserId)){
|
|
|
|
|
+ throw new SystemException("订单正在审核中,请稍后再试");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ redisTemplate.opsForValue().set("FEE_AUDIT:"+orderNo, BaseController.getUserId(),1800, TimeUnit.SECONDS);
|
|
|
|
|
+ return HttpResult.ok("锁定订单");
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public HttpResult validateFeeDetail(@NotBlank(message = "子订单不能为空") String companyId, String userId) {
|
|
public HttpResult validateFeeDetail(@NotBlank(message = "子订单不能为空") String companyId, String userId) {
|