diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralGiftServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralGiftServiceImpl.java index 57a818960..77f88b056 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralGiftServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralGiftServiceImpl.java @@ -227,14 +227,16 @@ public class IntegralGiftServiceImpl implements IntegralGiftService { String lockKey = "integralGift-"+id; Boolean isLock = redisLock.tryLock(lockKey,500,5000, TimeUnit.MILLISECONDS); if (isLock) { - redisLock.unlock(lockKey); - + try { IntegralGift integralGift = integralGiftDao.queryById(id); if (editInventory.compareTo(integralGift.getRemainingInventory())>0) { throw new RuntimeException("该积分商品库存不足!"); }else { integralGiftDao.updateInventoryByLock(id, editInventory); } + }finally { + redisLock.unlock(lockKey); + } } return true; } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValueOrders/controller/CardValueOrdersController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValueOrders/controller/CardValueOrdersController.java index 755dfe020..ce420a5dd 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValueOrders/controller/CardValueOrdersController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValueOrders/controller/CardValueOrdersController.java @@ -113,5 +113,12 @@ public class CardValueOrdersController extends BaseController { String status = map.get("status"); cardValueOrdersService.updateOrderStatus(orderNo,status); } + + + @PostMapping("getOneByOrderNo") + public void getOneByOrderNo(@RequestBody Map map){ + String orderNo = map.get("orderNo"); + cardValueOrdersService.getOneByOrderNo(orderNo); + } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/OilTagController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/OilTagController.java index 886194cd1..4bea84883 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/OilTagController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/OilTagController.java @@ -68,7 +68,11 @@ public class OilTagController extends BaseController { } // queryWrapper.eq(OilTag::getDeptId,nowAccountInfo.getDeptId()); // FIND_IN_SET - queryWrapper.apply("FIND_IN_SET('" + nowAccountInfo.getDeptId() + "', dept_ids)"); + if (100!=nowAccountInfo.getDeptId()){ + queryWrapper.apply("FIND_IN_SET('" + nowAccountInfo.getDeptId() + "', dept_ids)"); + //queryWrapper.eq(OilTag::getDeptId,nowAccountInfo.getDeptId()); + } + //queryWrapper.apply("FIND_IN_SET('" + nowAccountInfo.getDeptId() + "', dept_ids)"); if (ObjectUtils.isNotEmpty(oilTag.getSnCode())){ queryWrapper.eq(OilTag::getSnCode,oilTag.getSnCode());