fix 取消app默认7天查询时间

luoyang 5 years ago
parent e522168292
commit 5e403680e2

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.2.23</version>
<version>1.2.25</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

@ -929,15 +929,16 @@ public class RetailAppServiceImp implements RetailAppService {
params.put("dev_id", device.getString("dev_id"));
}
params.put("client_id", client_id);
if (StringUtils.isBlank(params.getString("begin"))) {
Date now = new Date();
Date lastWeekDay = DateUtils.addDays(now, -7);
lastWeekDay = new DateTime(lastWeekDay.getTime()).withTimeAtStartOfDay().toDate();
params.put("from", lastWeekDay);
params.put("begin", lastWeekDay);
params.put("end", now);
params.put("to", now);
}
//去掉默认7天查询时间
// if (StringUtils.isBlank(params.getString("from"))) {
// Date now = new Date();
// Date lastWeekDay = DateUtils.addDays(now, -7);
// lastWeekDay = new DateTime(lastWeekDay.getTime()).withTimeAtStartOfDay().toDate();
// params.put("from", lastWeekDay);
// params.put("begin", lastWeekDay);
// params.put("end", now);
// params.put("to", now);
// }
PageList<JSONObject> orders = orderMapper.listTransactionsForApp(params,
new PageBounds(query.getPage(), query.getLimit(), Order.formString("transaction_time.desc")));
TimeZoneUtils.switchTimeZone(orders, query.getTimezone(), "create_time", "transaction_time", "confirm_time");

Loading…
Cancel
Save