| @@ -52,9 +52,10 @@ public class WxMerchantMicroPayController extends BaseController { | |||||
| @ApiOperation("获得昨日刷卡列表") | @ApiOperation("获得昨日刷卡列表") | ||||
| @GetMapping("/listYesterday") | @GetMapping("/listYesterday") | ||||
| public ResultData listYesterday(Integer pageNum, Integer pageSize) { | |||||
| public ResultData listYesterday(@ModelAttribute WxOrderReportDto wxOrderReportDto, Integer pageNum, Integer pageSize) { | |||||
| logger.debug("[" + getIpAddr() + "] WxMerchantTradeDailyController::listYesterday"); | logger.debug("[" + getIpAddr() + "] WxMerchantTradeDailyController::listYesterday"); | ||||
| WxOrderReportDto wxOrderReportDto = new WxOrderReportDto(); | |||||
| if (wxOrderReportDto == null) | |||||
| wxOrderReportDto = new WxOrderReportDto(); | |||||
| wxOrderReportDto.setTenantId(getTenantId()); | wxOrderReportDto.setTenantId(getTenantId()); | ||||
| final PageInfo<WxMerchantMicroPayVo> page = markingDataReportService.listMerchantMicroPayOrderReportByDate(wxOrderReportDto, pageNum, pageSize); | final PageInfo<WxMerchantMicroPayVo> page = markingDataReportService.listMerchantMicroPayOrderReportByDate(wxOrderReportDto, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| @@ -8,6 +8,7 @@ import java.util.Date; | |||||
| public class WxOrderReportDto { | public class WxOrderReportDto { | ||||
| private String tenantId; | private String tenantId; | ||||
| private Long merchantId; | private Long merchantId; | ||||
| private String merchantName; | |||||
| private Date startTime; | private Date startTime; | ||||
| private Date endTime; | private Date endTime; | ||||
| private Integer type; | private Integer type; | ||||
| @@ -28,6 +29,14 @@ public class WxOrderReportDto { | |||||
| this.merchantId = merchantId; | this.merchantId = merchantId; | ||||
| } | } | ||||
| public String getMerchantName() { | |||||
| return merchantName; | |||||
| } | |||||
| public void setMerchantName(String merchantName) { | |||||
| this.merchantName = merchantName; | |||||
| } | |||||
| public Integer getType() { | public Integer getType() { | ||||
| return type; | return type; | ||||
| } | } | ||||
| @@ -13,6 +13,7 @@ import com.iformall.enums.EnumOrderType; | |||||
| import com.iformall.mapper.*; | import com.iformall.mapper.*; | ||||
| import com.iformall.service.MarkingDataReportService; | import com.iformall.service.MarkingDataReportService; | ||||
| import com.iformall.utils.DateUtils; | import com.iformall.utils.DateUtils; | ||||
| import org.apache.commons.lang3.StringUtils; | |||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| @@ -502,6 +503,9 @@ public class MarkingDataReportServiceImpl implements MarkingDataReportService { | |||||
| public PageInfo<WxMerchantMicroPayVo> listMerchantMicroPayOrderReportByDate(WxOrderReportDto wxOrderReportDto,Integer pageIndex, Integer pageSize) { | public PageInfo<WxMerchantMicroPayVo> listMerchantMicroPayOrderReportByDate(WxOrderReportDto wxOrderReportDto,Integer pageIndex, Integer pageSize) { | ||||
| HashMap<String, Object> params = new HashMap<>(); | HashMap<String, Object> params = new HashMap<>(); | ||||
| if (!StringUtils.isEmpty(wxOrderReportDto.getMerchantName())) | |||||
| params.put("merchantName",wxOrderReportDto.getMerchantName()); | |||||
| if (wxOrderReportDto.getStartTime() != null) { | if (wxOrderReportDto.getStartTime() != null) { | ||||
| params.put("startTime", convertDateAndAdd(wxOrderReportDto.getStartTime(), 0)); | params.put("startTime", convertDateAndAdd(wxOrderReportDto.getStartTime(), 0)); | ||||
| } else { | } else { | ||||
| @@ -380,6 +380,9 @@ | |||||
| </if> | </if> | ||||
| group by m.id,xTime) mo on mo.mid = wm.id | group by m.id,xTime) mo on mo.mid = wm.id | ||||
| where wm.status = 1 | where wm.status = 1 | ||||
| <if test=" null != merchantName "> | |||||
| and wm.name like concat('%', #{merchantName},'%') | |||||
| </if> | |||||
| order by wm.create_date desc | order by wm.create_date desc | ||||
| </select> | </select> | ||||