zhijiezhao 3 年之前
父節點
當前提交
ae5f9cb0de

+ 1 - 1
src/main/java/com/caimei365/user/mapper/SuperVipMapper.java

@@ -151,5 +151,5 @@ public interface SuperVipMapper {
      */
     Integer getVipHistoryId(Integer userId, Integer packageId);
 
-    List<Integer> findCouponUse(@Param("userId") Integer userId,@Param("ueeTime")String useTime);
+    List<Integer> findCouponUse(@Param("userId") Integer userId,@Param("useTime")String useTime);
 }

+ 2 - 0
src/main/java/com/caimei365/user/service/impl/BaseServiceImpl.java

@@ -489,6 +489,8 @@ public class BaseServiceImpl implements BaseService {
         if (couponUse != null && couponUse.size() > 0) {
             //couponuse有就给2,没有就给1,2使用1未用
             vipCoupon.forEach(couponVo -> couponVo.setUseStatus(couponUse.contains(couponVo.getCouponId()) ? 2 : 1));
+        }else{
+            vipCoupon.forEach(couponVo -> couponVo.setUseStatus(1));
         }
         vipCoupon.forEach(couponVo -> couponVo.setGetFlag(couponGet.contains(couponVo.getCouponId()) ? 1 : 0));
         map.put("coupon", vipCoupon);

+ 1 - 1
src/main/resources/mapper/SuperVipMapper.xml

@@ -144,7 +144,7 @@
     </select>
 
     <select id="findCouponUse" resultType="java.lang.Integer">
-        select couponId from cm_coupon_club ccb
+        select ccb.couponId from cm_coupon_club ccb
         inner join cm_svip_coupon cs ON cs.couponId = ccb.couponId
         where ccb.userId=#{userId} and ccb.status=2
         <if test="useTime != null and useTime !=''">