zoujiajian 4 mesiacov pred
rodič
commit
7a821897d6

+ 1 - 1
netflix-dao/src/main/java/com/cyksj/model/views/CouponDetailView.java

@@ -20,7 +20,7 @@ import java.util.List;
 @Getter
 @Setter
 @SearchBean(tables = "coupon c left join coupon_classification cc on cc.id = c.classification_id",
-        where = "c.deleted and c.is_available")
+        where = "c.deleted and c.is_manul_available")
 public class CouponDetailView {
 	/**
 	 * 优惠券id

+ 1 - 1
netflix-dao/src/main/resources/mapper/CouponMapper.xml

@@ -38,7 +38,7 @@
                             from `coupon_distribute_popularize`
                             where deleted is true) cdp
                            on cdp.coupon_id = cp.id
-        where cp.deleted is true
+        where cp.deleted is true and cp.is_manul_available
           and (cp.ex_code = #{couponExCode} or cdp.ex_code = #{couponExCode}) limit 1
     </select>
 

+ 2 - 2
netflix-dao/src/main/resources/mapper/CouponRecommendMapper.xml

@@ -32,7 +32,7 @@
         when cu.id is not null and cu.status = 'unused' then 1
         end) as `order`,
         if(c.is_valid_time is true and c.valid_end_time &lt; now(),false,true) as flag
-        from coupon_recommend cr left join coupon c on c.id = cr.coupon_id and c.deleted and c.is_available
+        from coupon_recommend cr left join coupon c on c.id = cr.coupon_id and c.deleted and c.is_manul_available
         left join coupon_user cu on cu.coupon_id = c.id and cu.user_id = #{userId}
         where cr.deleted is true and c.deleted is true and cr.status = 1
         and (cr.up_time is null or cr.up_time &lt;= now()) and (cr.down_time is null or cr.down_time > now())
@@ -49,7 +49,7 @@
                               c.scope,
                               cr.id as recommendId,
         if(c.is_valid_time is true and c.valid_end_time &lt; now(),false,true) as flag
-        from coupon_recommend cr left join coupon c on c.id = cr.coupon_id and c.deleted and c.is_available
+        from coupon_recommend cr left join coupon c on c.id = cr.coupon_id and c.deleted and c.is_manul_available
         left join coupon_user cu on cu.coupon_id = c.id and cu.user_id = #{userId}
         where cr.deleted is true and c.deleted is true and cr.status is true and cu.coupon_id is null
         and (cr.up_time is null or cr.up_time &lt;= now()) and (cr.down_time is null or cr.down_time > now())

+ 5 - 5
netflix-dao/src/main/resources/mapper/CouponUserMapper.xml

@@ -30,7 +30,7 @@
         when cu.status = 'unused' then 0
         end)                 as orderby
         from `coupon_user` cu
-        left join `coupon` cp on cp.id = cu.coupon_id and cp.deleted and cp.is_available
+        left join `coupon` cp on cp.id = cu.coupon_id and cp.deleted and cp.is_manul_available
         left join `coupon_active` ca on ca.id = cu.coupon_active_id
         left join `coupon_sku` ck on ck.coupon_id = cp.id
         <if test="goodsId != null">
@@ -64,7 +64,7 @@
                      cp.reduce_condition,
                      cp.type
         from `coupon_user` cu
-        left join `coupon` cp on cp.id = cu.coupon_id and cp.deleted and cp.is_available
+        left join `coupon` cp on cp.id = cu.coupon_id and cp.deleted and cp.is_manul_available
         left join `coupon_sku` ck on ck.coupon_id = cp.id
         left join `coupon_active` ca on ca.id = cu.coupon_active_id
         where
@@ -125,7 +125,7 @@
                      if(c.is_valid_time is true and c.valid_end_time &lt; now(), false, true) as flag
               from coupon_active ca
                        left join coupon c
-                                 on c.id = ca.coupon_id and c.deleted and c.is_available
+                                 on c.id = ca.coupon_id and c.deleted and c.is_manul_available
                        left join coupon_user cu on cu.coupon_id = c.id and cu.user_id = #{userId}
               where ca.deleted is true
                 and c.deleted is true
@@ -171,7 +171,7 @@
                     when cu.status = 'unused' then 0
                    end)                 as orderby
         from `coupon_user` cu
-                 left join `coupon` c on c.id = cu.coupon_id and c.deleted and c.is_available
+                 left join `coupon` c on c.id = cu.coupon_id and c.deleted and c.is_manul_available
                  left join `coupon_active` ca on ca.id = cu.coupon_active_id
         where cu.user_id = #{userId}
         <if test="couponId !=null">
@@ -344,6 +344,6 @@
                 and valid_end_time > #{now}) cu
                  inner join coupon c on c.id = cu.coupon_id
         where c.deleted
-          and c.is_available
+          and c.is_manul_available
     </select>
 </mapper>