Ver código fonte

[发券][修改]:精准发券显示的所发数量问题

release_toaliyun_real
hupeng 7 anos atrás
pai
commit
80f9988aa9
3 arquivos alterados com 14 adições e 11 exclusões
  1. +1
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/WxCouponSendController.java
  2. +10
    -8
      mallinkService/src/main/java/com/iformall/domain/po/WxCouponSend.java
  3. +3
    -3
      mallinkService/src/main/resources/mapper/WxCouponActionLogMapper.xml

+ 1
- 0
mallinkAdmin/src/main/java/com/iformall/controller/WxCouponSendController.java Ver arquivo

@@ -44,6 +44,7 @@ public class WxCouponSendController extends BaseController {
if (null == wxCouponSend) wxCouponSend = new WxCouponSend(); if (null == wxCouponSend) wxCouponSend = new WxCouponSend();
wxCouponSend.setTenantId(getTenantId()); wxCouponSend.setTenantId(getTenantId());
wxCouponSend.setStatus(EnumCouponSendStatus.VALID.getCode()); wxCouponSend.setStatus(EnumCouponSendStatus.VALID.getCode());
wxCouponSend.setSortColumns(WxCouponSend.Field.CreateDate_DESC);
final PageInfo<WxCouponSend> page = wxCouponSendService.listAsPage(wxCouponSend, pageNum, pageSize); final PageInfo<WxCouponSend> page = wxCouponSendService.listAsPage(wxCouponSend, pageNum, pageSize);


for (WxCouponSend cs:page.getList()) for (WxCouponSend cs:page.getList())


+ 10
- 8
mallinkService/src/main/java/com/iformall/domain/po/WxCouponSend.java Ver arquivo

@@ -158,17 +158,17 @@ public class WxCouponSend implements Serializable {
public static enum Field public static enum Field
{ {
Id_ASC("`id` ASC"),Id_DESC("`id` DESC") Id_ASC("`id` ASC"),Id_DESC("`id` DESC")
,TenantId_ASC("`tenantId` ASC"),TenantId_DESC("`tenantId` DESC")
,MerchantId_ASC("`merchantId` ASC"),MerchantId_DESC("`merchantId` DESC")
,CouponId_ASC("`couponId` ASC"),CouponId_DESC("`couponId` DESC")
,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_id` DESC")
,MerchantId_ASC("`merchant_id` ASC"),MerchantId_DESC("`merchant_id` DESC")
,CouponId_ASC("`coupon_id` ASC"),CouponId_DESC("`coupon_id` DESC")
,Type_ASC("`type` ASC"),Type_DESC("`type` DESC") ,Type_ASC("`type` ASC"),Type_DESC("`type` DESC")
,Title_ASC("`title` ASC"),Title_DESC("`title` DESC") ,Title_ASC("`title` ASC"),Title_DESC("`title` DESC")
,SendType_ASC("`sendType` ASC"),SendType_DESC("`sendType` DESC")
,SendType_ASC("`send_type` ASC"),SendType_DESC("`send_type` DESC")
,Status_ASC("`status` ASC"),Status_DESC("`status` DESC") ,Status_ASC("`status` ASC"),Status_DESC("`status` DESC")
,SendStartTime_ASC("`sendStartTime` ASC"),SendStartTime_DESC("`sendStartTime` DESC")
,SendEndTime_ASC("`sendEndTime` ASC"),SendEndTime_DESC("`sendEndTime` DESC")
,CreateDate_ASC("`createDate` ASC"),CreateDate_DESC("`createDate` DESC")
,UpdateDate_ASC("`updateDate` ASC"),UpdateDate_DESC("`updateDate` DESC")
,SendStartTime_ASC("`send_start_time` ASC"),SendStartTime_DESC("`send_start_time` DESC")
,SendEndTime_ASC("`send_end_time` ASC"),SendEndTime_DESC("`send_end_time` DESC")
,CreateDate_ASC("`create_date` ASC"),CreateDate_DESC("`create_date` DESC")
,UpdateDate_ASC("`update_date` ASC"),UpdateDate_DESC("`update_date` DESC")
; ;
private String value; private String value;
Field(String value){ Field(String value){
@@ -202,6 +202,8 @@ public class WxCouponSend implements Serializable {
sb.append(fields[k].toString()); sb.append(fields[k].toString());
} }


this.sortColumns = sb.toString();

} }


public void setSortColumns(String sortColumns) public void setSortColumns(String sortColumns)


+ 3
- 3
mallinkService/src/main/resources/mapper/WxCouponActionLogMapper.xml Ver arquivo

@@ -52,7 +52,7 @@
and `create_time` = #{createTime} and `create_time` = #{createTime}
</if> </if>
<if test=" null != startTime "> <if test=" null != startTime ">
and `create_time` >= #{startTime}
and `create_time` &gt;= #{startTime}
</if> </if>
<if test=" null != endTime "> <if test=" null != endTime ">
and `create_time` &lt;= #{endTime} and `create_time` &lt;= #{endTime}
@@ -75,7 +75,7 @@
<select id="findCountByDateLimit" resultType="java.lang.Integer"> <select id="findCountByDateLimit" resultType="java.lang.Integer">
select COUNT(*) FROM wx_coupon_action_log select COUNT(*) FROM wx_coupon_action_log
where tenant_id = #{tenantId} where tenant_id = #{tenantId}
and `create_time` >= #{startTime}
and `create_time` &gt;= #{startTime}
and `create_time` &lt;= #{endTime} and `create_time` &lt;= #{endTime}
</select> </select>


@@ -151,7 +151,7 @@
select COUNT(*) FROM wx_coupon_action_log select COUNT(*) FROM wx_coupon_action_log
where tenant_id = #{tenantId} where tenant_id = #{tenantId}
and channel_type = #{channelType} and channel_type = #{channelType}
and channel_id &lt;= #{channelId}
and channel_id = #{channelId}
</select> </select>


<select id="getCountByUser" resultType="java.lang.Integer" parameterType="hashmap"> <select id="getCountByUser" resultType="java.lang.Integer" parameterType="hashmap">


Carregando…
Cancelar
Salvar