Browse Source

fixed 商户管理员核销卡券问题

fushengqian 1 year ago
parent
commit
21103a18e3

+ 4 - 2
fuint-application/src/main/java/com/fuint/common/service/impl/CouponServiceImpl.java

@@ -768,7 +768,7 @@ public class CouponServiceImpl extends ServiceImpl<MtCouponMapper, MtCoupon> imp
         }
         }
 
 
         MtStore mtStore = null;
         MtStore mtStore = null;
-        if (storeId > 0) {
+        if (storeId != null && storeId > 0) {
             mtStore = mtStoreMapper.selectById(storeId);
             mtStore = mtStoreMapper.selectById(storeId);
             if (null == mtStore) {
             if (null == mtStore) {
                 throw new BusinessCheckException("该店铺不存在!");
                 throw new BusinessCheckException("该店铺不存在!");
@@ -892,7 +892,9 @@ public class CouponServiceImpl extends ServiceImpl<MtCouponMapper, MtCoupon> imp
 
 
         userCoupon.setUpdateTime(new Date());
         userCoupon.setUpdateTime(new Date());
         userCoupon.setUsedTime(new Date());
         userCoupon.setUsedTime(new Date());
-        userCoupon.setStoreId(storeId);
+        if (storeId != null && storeId > 0) {
+            userCoupon.setStoreId(storeId);
+        }
         mtUserCouponMapper.updateById(userCoupon);
         mtUserCouponMapper.updateById(userCoupon);
 
 
         // 生成核销流水
         // 生成核销流水