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

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

release_toaliyun_real
hupeng 7 лет назад
Родитель
Сommit
80f9988aa9
3 измененных файлов: 14 добавлений и 11 удалений
  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 Просмотреть файл

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

for (WxCouponSend cs:page.getList())


+ 10
- 8
mallinkService/src/main/java/com/iformall/domain/po/WxCouponSend.java Просмотреть файл

@@ -158,17 +158,17 @@ public class WxCouponSend implements Serializable {
public static enum Field
{
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")
,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")
,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;
Field(String value){
@@ -202,6 +202,8 @@ public class WxCouponSend implements Serializable {
sb.append(fields[k].toString());
}

this.sortColumns = sb.toString();

}

public void setSortColumns(String sortColumns)


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

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

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

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


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