Procházet zdrojové kódy

赠券规则管理,评论bug

jyc před 2 měsíci
rodič
revize
5ef6812f46

+ 1 - 1
alien-entity/src/main/java/shop/alien/mapper/LifeDiscountCouponFriendRuleDetailMapper.java

@@ -22,7 +22,7 @@ public interface LifeDiscountCouponFriendRuleDetailMapper extends BaseMapper<Lif
 
     void insertList(List<LifeDiscountCouponFriendRuleDetail> lifeDiscountCouponFriendRuleDetailList);
 
-    @Select("select si.store_name storeName,ldc.name couponName,ldc.id couponId,sum(ldcsf.single_qty) couponNum,ldcsf.friend_store_user_id friendStoreUserId from life_discount_coupon_store_friend ldcsf left join life_discount_coupon ldc on ldcsf.coupon_id = ldc.id left join store_user su on ldcsf.friend_store_user_id = su.id left join store_info si on su.store_id = si.id")
+    @Select("select si.store_name storeName,ldc.name couponName,ldc.id couponId,sum(ldcsf.single_qty) couponNum,ldcsf.friend_store_user_id friendStoreUserId from life_discount_coupon_store_friend ldcsf left join life_discount_coupon ldc on ldcsf.coupon_id = ldc.id left join store_user su on ldcsf.friend_store_user_id = su.id left join store_info si on su.store_id = si.id ${ew.customSqlSegment}")
     List<LifeDiscountCouponFriendRuleDetailVo> getReceivedFriendCouponList(@Param(Constants.WRAPPER) QueryWrapper<LifeDiscountCouponFriendRuleDetailVo> queryWrapper);
 
     @Select("SELECT\n" +

+ 1 - 1
alien-entity/src/main/java/shop/alien/mapper/LifeDiscountCouponStoreFriendMapper.java

@@ -38,7 +38,7 @@ public interface LifeDiscountCouponStoreFriendMapper extends BaseMapper<LifeDisc
     @Select("select ldcsf.created_time endDate,ldc.nominal_value nominalValue,ldc.minimum_spending_amount minimumSpendingAmount,\n" +
             "si.store_name storeName,\n" +
             "ldc.name couponName,\n" +
-            "ldcsf.single_qty couponNum,\n" +
+            "ldcsf.single_qty couponNum\n" +
             "from  life_discount_coupon_store_friend ldcsf\n" +
             "left join life_discount_coupon ldc\n" +
             "on ldc.id = ldcsf.coupon_id and ldc.delete_flag = 0\n" +

+ 4 - 4
alien-entity/src/main/java/shop/alien/mapper/StoreCommentMapper.java

@@ -115,10 +115,10 @@ public interface StoreCommentMapper extends BaseMapper<StoreComment> {
     StoreCommitPercentVo getCommentByStoreId(Integer storeId);
 
     @Select("SELECT " +
-            "SUM( score ) score," +
-            "SUM( taste_score ) tasteScore," +
-            "SUM( en_score ) enScore," +
-            "SUM( service_score ) serviceScore," +
+            "ifnull(SUM( score ),0) score," +
+            "ifnull(SUM( taste_score ),0) tasteScore," +
+            "ifnull(SUM( en_score ),0) enScore," +
+            "ifnull(SUM( service_score ),0) serviceScore," +
             "COUNT(0) total " +
             "FROM" +
             "`store_comment` " +

+ 1 - 1
alien-store/src/main/java/shop/alien/store/service/impl/LifeDiscountCouponStoreFriendServiceImpl.java

@@ -416,7 +416,7 @@ public class LifeDiscountCouponStoreFriendServiceImpl extends ServiceImpl<LifeDi
     @Override
     public List<LifeDiscountCouponFriendRuleVo> getReceivedSendFriendCouponList(String storeUserId, String friendStoreUserId) {
         QueryWrapper<LifeDiscountCouponFriendRuleVo> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq(StringUtils.isNotEmpty(friendStoreUserId),"ldcsf.store_user_id", storeUserId)
+        queryWrapper.eq(StringUtils.isNotEmpty(storeUserId),"ldcsf.store_user_id", storeUserId)
                 .eq(StringUtils.isNotEmpty(friendStoreUserId),"ldcsf.friend_store_user_id", friendStoreUserId);
         return lifeDiscountCouponStoreFriendMapper.getReceivedSendFriendCouponList(queryWrapper);
     }