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

商户注券->查询排序

release_toaliyun_real
Burce 6 лет назад
Родитель
Сommit
5bdf925902
4 измененных файлов: 5 добавлений и 4 удалений
  1. +0
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponSendController.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxCouponSend.java
  3. +3
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendServiceImpl.java
  4. +1
    -1
      mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml

+ 0
- 1
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponSendController.java Просмотреть файл

@@ -66,7 +66,6 @@ public class WxCouponSendController extends BaseController {
// } // }
// } // }
wxCouponSend.setStatus(valid); wxCouponSend.setStatus(valid);
wxCouponSend.setSortColumns(BaseEntity.SortField.CreateDate_DESC);
PageInfo<WxCouponSendVo> page = wxCouponSendService.listAsPage(wxCouponSend, pageNum, pageSize); PageInfo<WxCouponSendVo> page = wxCouponSendService.listAsPage(wxCouponSend, pageNum, pageSize);
return new ResultData(page); return new ResultData(page);
} }


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

@@ -67,7 +67,7 @@ public class WxCouponSend extends BaseEntity {
public static final String SORT_REMAIN = "merchantRemain" ; public static final String SORT_REMAIN = "merchantRemain" ;


@JsonIgnore @JsonIgnore
public static final String SORT_CREATE_DATE = "create_date" ;
public static final String SORT_CREATE_DATE = "createDate" ;


@Id @Id
protected Long id; protected Long id;


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

@@ -75,7 +75,8 @@ public class WxCouponSendServiceImpl implements WxCouponSendService {
String sortStr = null; String sortStr = null;
if (Objects.equals(record.getSortColumn(), WxCouponSend.SORT_MERCHANT_LNVENTORY) || if (Objects.equals(record.getSortColumn(), WxCouponSend.SORT_MERCHANT_LNVENTORY) ||
Objects.equals(record.getSortColumn(), WxCouponSend.SORT_MERCHANT_SEND) || Objects.equals(record.getSortColumn(), WxCouponSend.SORT_MERCHANT_SEND) ||
Objects.equals(record.getSortColumn(), WxCouponSend.SORT_REMAIN)) {
Objects.equals(record.getSortColumn(), WxCouponSend.SORT_REMAIN)||
Objects.equals(record.getSortColumn(), WxCouponSend.SORT_CREATE_DATE)) {
sortStr = record.getSortColumn() + " " + record.getSortOrder(); sortStr = record.getSortColumn() + " " + record.getSortOrder();
record.setSortColumn(null); record.setSortColumn(null);
} }
@@ -92,6 +93,7 @@ public class WxCouponSendServiceImpl implements WxCouponSendService {
cs.setExpired(expired); cs.setExpired(expired);
} }
} else { } else {
record.setSortColumns(BaseEntity.SortField.CreateDate_DESC);
pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponSendMapper.findListVo(record)); pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponSendMapper.findListVo(record));
for (WxCouponSendVo cs:pageInfo.getList()) for (WxCouponSendVo cs:pageInfo.getList())
cs.setSendCount(wxCouponActionLogService.getCountByChannelId(record.getTenantId(), cs.getSendType(), cs.getId())); cs.setSendCount(wxCouponActionLogService.getCountByChannelId(record.getTenantId(), cs.getSendType(), cs.getId()));


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

@@ -24,7 +24,7 @@
</resultMap> </resultMap>


<sql id="allColumns"> <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,
cs.id,cs.tenant_id,cs.coupon_id,cs.title,cs.send_type,cs.conditions,cs.status,cs.create_date as createDate,cs.update_date,
cs.conditions -> '$.merchantSend' as merchantSend, cs.conditions -> '$.merchantSend' as merchantSend,
cs.conditions -> '$.merchantLnventory' as merchantLnventory, cs.conditions -> '$.merchantLnventory' as merchantLnventory,
cs.conditions -> '$.merchantRemain' as merchantRemain, cs.conditions -> '$.merchantRemain' as merchantRemain,


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