Bladeren bron

修复店铺活动列表展示不在活动时间内的活动bug

codingliang 1 jaar geleden
bovenliggende
commit
4f6b5a0017
1 gewijzigde bestanden met toevoegingen van 5 en 1 verwijderingen
  1. 5 1
      src/main/resources/mapper/activity/ActivityShopDao.xml

+ 5 - 1
src/main/resources/mapper/activity/ActivityShopDao.xml

@@ -44,7 +44,11 @@
             ach.limit_value
         from activity_shop ach
         left join activity a on a.id = ach.activity_id
-        where ach.shop_id = #{shopId}
+        where
+              a.enable_flag = '1'
+              and now() >= a.start_time
+              and now() <![CDATA[<=]]> a.end_time
+              and ach.shop_id = #{shopId}
     </select>
 
     <select id="getActivityByShopIds" resultType="com.sqx.modules.activity.vo.ShopActivityVO">