规则查询调整

This commit is contained in:
mzr 2024-04-29 16:20:36 +08:00
parent f9d7fa8890
commit 16fdd20676
2 changed files with 33 additions and 25 deletions

View File

@ -40,7 +40,10 @@ public class RecordsThread implements Runnable {
Map<String, Object> addMap = new HashMap<>();
addMap.put("status", "1");
addMap.put("ruleType", "1");
addMap.put("currentTime", DateUtil.getDay());
//日期在当前活动时间内的规则
CrmPrizeGoodsRule activityRules = prizeGoodsRuleService.oneById(addMap, ".findPrizeGoodsRuleByCondition");
if (StringUtil.isNotEmpty(activityRules)) {
addMap.clear();
addMap.put("id", IdUtil.simpleUUID());
addMap.put("qrCode", map.get("qrCode"));
@ -69,6 +72,7 @@ public class RecordsThread implements Runnable {
addMap.put("source", source);
prizeClientService.addInfo(addMap, ".addCrmPrizeClient");
}
}
Map<String, Object> map1 = new HashMap<>();
map1.put("type", type);
map1.put("qrCode", map.get("qrCode"));

View File

@ -35,6 +35,10 @@
<if test="prizeType != null and prizeType != ''">
AND a.prize_type = #{prizeType}
</if>
<if test="currentTime != null and currentTime != ''">
AND to_date(#{currentTime},'yyyy-MM-dd') &gt;= to_date(a.start_time,'yyyy-MM-dd')
AND to_date(#{currentTime},'yyyy-MM-dd') &lt;= to_date(a.end_time,'yyyy-MM-dd')
</if>
<if test="companyId != null and companyId != ''">
AND a.company_id = #{companyId}
</if>