规则查询调整
This commit is contained in:
parent
f9d7fa8890
commit
16fdd20676
|
|
@ -40,34 +40,38 @@ public class RecordsThread implements Runnable {
|
||||||
Map<String, Object> addMap = new HashMap<>();
|
Map<String, Object> addMap = new HashMap<>();
|
||||||
addMap.put("status", "1");
|
addMap.put("status", "1");
|
||||||
addMap.put("ruleType", "1");
|
addMap.put("ruleType", "1");
|
||||||
|
addMap.put("currentTime", DateUtil.getDay());
|
||||||
|
//日期在当前活动时间内的规则
|
||||||
CrmPrizeGoodsRule activityRules = prizeGoodsRuleService.oneById(addMap, ".findPrizeGoodsRuleByCondition");
|
CrmPrizeGoodsRule activityRules = prizeGoodsRuleService.oneById(addMap, ".findPrizeGoodsRuleByCondition");
|
||||||
addMap.clear();
|
if (StringUtil.isNotEmpty(activityRules)) {
|
||||||
addMap.put("id", IdUtil.simpleUUID());
|
addMap.clear();
|
||||||
addMap.put("qrCode", map.get("qrCode"));
|
addMap.put("id", IdUtil.simpleUUID());
|
||||||
addMap.put("clientId", map.get("clientId"));
|
addMap.put("qrCode", map.get("qrCode"));
|
||||||
addMap.put("clientName", map.get("clientName"));
|
addMap.put("clientId", map.get("clientId"));
|
||||||
// 记录类型 1.收入 2.支出
|
addMap.put("clientName", map.get("clientName"));
|
||||||
addMap.put("recordType", "1");
|
// 记录类型 1.收入 2.支出
|
||||||
addMap.put("createUser", map.get("createUser") + "");
|
addMap.put("recordType", "1");
|
||||||
addMap.put("createName", map.get("createUserName") + "");
|
addMap.put("createUser", map.get("createUser") + "");
|
||||||
addMap.put("createTime", DateUtil.getTime());
|
addMap.put("createName", map.get("createUserName") + "");
|
||||||
addMap.put("companyId", map.get("companyId"));
|
addMap.put("createTime", DateUtil.getTime());
|
||||||
Double dealerPrize = 0d;
|
addMap.put("companyId", map.get("companyId"));
|
||||||
String source = "";
|
Double dealerPrize = 0d;
|
||||||
if ("3".equals(type)) {
|
String source = "";
|
||||||
source = "1"; // 经销商扫码入库
|
if ("3".equals(type)) {
|
||||||
if (StringUtil.isNotEmpty(activityRules) && StringUtil.isNotEmpty(activityRules.getDealerInPrize())) {
|
source = "1"; // 经销商扫码入库
|
||||||
dealerPrize = activityRules.getDealerInPrize();
|
if (StringUtil.isNotEmpty(activityRules) && StringUtil.isNotEmpty(activityRules.getDealerInPrize())) {
|
||||||
}
|
dealerPrize = activityRules.getDealerInPrize();
|
||||||
} else if ("4".equals(type)) {
|
}
|
||||||
source = "2";// 经销商扫码出库
|
} else if ("4".equals(type)) {
|
||||||
if (StringUtil.isNotEmpty(activityRules) && StringUtil.isNotEmpty(activityRules.getDealerOutPrize())) {
|
source = "2";// 经销商扫码出库
|
||||||
dealerPrize = activityRules.getDealerOutPrize();
|
if (StringUtil.isNotEmpty(activityRules) && StringUtil.isNotEmpty(activityRules.getDealerOutPrize())) {
|
||||||
|
dealerPrize = activityRules.getDealerOutPrize();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
addMap.put("exchangeAmount", dealerPrize);
|
||||||
|
addMap.put("source", source);
|
||||||
|
prizeClientService.addInfo(addMap, ".addCrmPrizeClient");
|
||||||
}
|
}
|
||||||
addMap.put("exchangeAmount", dealerPrize);
|
|
||||||
addMap.put("source", source);
|
|
||||||
prizeClientService.addInfo(addMap, ".addCrmPrizeClient");
|
|
||||||
}
|
}
|
||||||
Map<String, Object> map1 = new HashMap<>();
|
Map<String, Object> map1 = new HashMap<>();
|
||||||
map1.put("type", type);
|
map1.put("type", type);
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,10 @@
|
||||||
<if test="prizeType != null and prizeType != ''">
|
<if test="prizeType != null and prizeType != ''">
|
||||||
AND a.prize_type = #{prizeType}
|
AND a.prize_type = #{prizeType}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="currentTime != null and currentTime != ''">
|
||||||
|
AND to_date(#{currentTime},'yyyy-MM-dd') >= to_date(a.start_time,'yyyy-MM-dd')
|
||||||
|
AND to_date(#{currentTime},'yyyy-MM-dd') <= to_date(a.end_time,'yyyy-MM-dd')
|
||||||
|
</if>
|
||||||
<if test="companyId != null and companyId != ''">
|
<if test="companyId != null and companyId != ''">
|
||||||
AND a.company_id = #{companyId}
|
AND a.company_id = #{companyId}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue