Просмотр исходного кода

生日积分定时任务

release_toaliyun_real
Burce 6 лет назад
Родитель
Сommit
8d289919e1
4 измененных файлов: 24 добавлений и 7 удалений
  1. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxCouponSendVo.java
  2. +14
    -0
      mallinkService/src/main/java/com/iformall/service/impl/MarkingDataReportServiceImpl.java
  3. +3
    -3
      mallinkService/src/main/resources/mapper/WxCouponActionLogMapper.xml
  4. +4
    -4
      mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml

+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/vo/WxCouponSendVo.java Просмотреть файл

@@ -35,4 +35,7 @@ public class WxCouponSendVo extends WxCouponSend implements Serializable{
private String merchantName;

private Date sendDate ;

@io.swagger.annotations.ApiModelProperty(value="自领取之日几日有效",name="validDays")
private Integer validDays ;
}

+ 14
- 0
mallinkService/src/main/java/com/iformall/service/impl/MarkingDataReportServiceImpl.java Просмотреть файл

@@ -514,6 +514,20 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService {
}
result.put("micropayHistory",historyMap);

//商户发券
markingCouponDataReportDto.setChannelType(EnumCouponSendSendType.MERCHANT.getCode());
List<MarkingSceneDataVo> merchantList = wxCouponActionLogMapper.sceneDataList(markingCouponDataReportDto);
countMap = merchantList.stream().collect(Collectors.toMap(MarkingSceneDataVo::getXtime, p -> p.getSendCount()));
historyMap = new TreeMap<>();
for (String date:days) {
historyMap.put(date.substring(5).replace("-","/"),"0");
}
for (String key : countMap.keySet()) {
String keySub = key.substring(5).replace("-","/");
historyMap.put(keySub,countMap.get(key));
}
result.put("merchantHistory",historyMap);

return result;
}



+ 3
- 3
mallinkService/src/main/resources/mapper/WxCouponActionLogMapper.xml Просмотреть файл

@@ -226,14 +226,14 @@
LEFT JOIN wx_coupon_order co ON cal.coupon_order_id = co.id
LEFT JOIN wx_coupon c ON cal.coupon_id = c.id
LEFT JOIN wx_c_user cu ON cu.id = co.c_user_id
LEFT JOIN wx_merchant_b_user mbu ON co.b_user_id = mbu.id
LEFT JOIN wx_merchant_b_user mbu ON concat(mbu.merchant_id,'') = JSON_EXTRACT(cs.conditions , '$.id')
WHERE cal.channel_type = #{channelType}
AND cs.conditions -> '$.id' = concat(#{merchantId},'')
<if test=" null != beginDate ">
and cal.create_time &gt;= #{beginDate}
AND cal.create_time &gt;= #{beginDate}
</if>
<if test=" null != endDate ">
and cal.create_time &lt; #{endDate}
AND cal.create_time &lt; #{endDate}
</if>
</select>



+ 4
- 4
mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml Просмотреть файл

@@ -18,13 +18,13 @@
<result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity"/>
<result column="valid_start_date" jdbcType="TIMESTAMP" property="validStartDate"/>
<result column="valid_end_date" jdbcType="TIMESTAMP" property="validEndDate"/>
<result column="send_sms" jdbcType="INTEGER" property="sendSms"/>
<result column="valid_days" jdbcType="INTEGER" property="validDays"/>

</resultMap>

<sql id="allColumns">
cs.id,cs.tenant_id,cs.coupon_id,cs.title,cs.send_type,cs.conditions,cs.status,cs.create_date,cs.update_date,JSON_EXTRACT(cs.conditions,'$.merchantLnventory') as merchantLnventory,
cs.id,cs.tenant_id,cs.coupon_id,cs.title,cs.send_type,cs.conditions,cs.status,cs.create_date,cs.update_date,
(case when
(select count(*) from wx_coupon_merchant xcm where xcm.product_id = cs.coupon_id and xcm.status = 0)=1
then
@@ -32,7 +32,7 @@
else
'[多商户通用]'
end) as merchant_name,
c.remain_inventory, c.use_limit_quantity, c.inventory, c.valid_start_date, c.valid_end_date,c.valid_type,cs.send_sms
c.remain_inventory, c.use_limit_quantity, c.inventory, c.valid_start_date, c.valid_end_date,c.valid_type,cs.send_sms,c.valid_days
</sql>

<sql id="dynamicWhereConditions">


Загрузка…
Отмена
Сохранить