Commit cf7d1a2b by 阮思源

Merge branch 'zyj-fixbug1016951' into 'master'

fixbug1016951

See merge request rays/pcloud-book!251
parents 0f8dc83a 5e87eaf7
......@@ -3,6 +3,7 @@ package com.pcloud.book.consumer.settlement;
import com.pcloud.common.core.aspect.ParamLog;
import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.exceptions.BizException;
import com.pcloud.common.utils.DateUtils;
import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.ResponseHandleUtil;
import com.pcloud.settlementcenter.record.dto.ProductStaticUnderAppMapDTO;
......@@ -17,7 +18,11 @@ import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.util.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Component("settlementConsr")
public class SettlementConsr {
......@@ -61,10 +66,16 @@ public class SettlementConsr {
}
@ParamLog(value = "获取日期列表", isBefore = false, isAfterReturn = false)
public List<Date> getDateList(Integer dayNum,Date startDate, Date endDate) throws BizException {
public List<Date> getDateList(Integer dayNum, Date startDate, Date endDate) throws BizException {
List<Date> dateList = new ArrayList<>();
String startStr = null;
String endStr = null;
if (null != startDate) {
startStr = DateUtils.formatDate(startDate, DateUtils.DATE_FORMAT_DATETIME);
endStr = DateUtils.formatDate(endDate, DateUtils.DATE_FORMAT_DATETIME);
}
try {
ResponseEntity<ResponseDto<List<Date>>> responseEntityP = settlementService.getDateList(dayNum,startDate,endDate);
ResponseEntity<ResponseDto<List<Date>>> responseEntityP = settlementService.getDateList(dayNum, startStr, endStr);
dateList = ResponseHandleUtil.parseList(responseEntityP, Date.class);
} catch (Exception e) {
LOGGER.error("获取日期列表.[getDateList]:" + e.getMessage(), e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment