|
|
|
@@ -1,8 +1,10 @@ |
|
|
|
package com.iformall.controller; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import org.apache.commons.collections.map.HashedMap; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
@@ -94,7 +96,27 @@ public class WxCouponChannelController extends BaseController { |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), |
|
|
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) |
|
|
|
public ResultData listByMerchant(@RequestBody WxCouponChannel wxCouponChannel, @RequestBody Integer pageNum, @RequestBody Integer pageSize) { |
|
|
|
// public ResultData listByMerchant(@RequestBody WxCouponChannel wxCouponChannel, @RequestBody Integer pageNum, @RequestBody Integer pageSize) { |
|
|
|
public ResultData listByMerchant(@RequestBody Map<String, Object> params) { |
|
|
|
String pageNumStr = params.get("pageNum").toString(); |
|
|
|
String pageSizeStr = params.get("pageSize").toString(); |
|
|
|
if(StringUtils.isBlank(pageNumStr) || StringUtils.isBlank(pageSizeStr)){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); |
|
|
|
} |
|
|
|
int pageNum = Integer.parseInt(pageNumStr); |
|
|
|
int pageSize = Integer.parseInt(pageSizeStr); |
|
|
|
|
|
|
|
String merchantIdStr = params.get("merchantId").toString(); |
|
|
|
List<String> merchantIds = (List<String>) params.get("merchantIds"); |
|
|
|
Long merchantId = null; |
|
|
|
if(StringUtils.isNotBlank(merchantIdStr)){ |
|
|
|
merchantId =Long.parseLong(merchantIdStr); |
|
|
|
} |
|
|
|
|
|
|
|
WxCouponChannel wxCouponChannel = new WxCouponChannel(); |
|
|
|
wxCouponChannel.setMerchantId(merchantId); |
|
|
|
wxCouponChannel.setMerchantIds(merchantIds); |
|
|
|
|
|
|
|
wxCouponChannel.updateTenantInfo(getTenantInfo()); |
|
|
|
wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); |
|
|
|
wxCouponChannel.setSortColumns(BaseEntity.SortField.UpdateDate_DESC, BaseEntity.SortField.Id_DESC); |
|
|
|
|