Upd:交易流水查看条件-日期无进行时区转换问题

master
duLingLing 5 years ago
parent f7c049a2d6
commit a8f659549c

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.2.85</version>
<version>1.2.86</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.4.0</jib-maven-plugin.version>

@ -42,16 +42,20 @@ public class AppQueryBean {
public JSONObject toParams() {
JSONObject params = new JSONObject();
if (begin != null) {
DateTime fromDate = DateTime.parse(begin, DateTimeFormat.forPattern("yyyyMMdd"))
.withZoneRetainFields(DateTimeZone.forTimeZone(TimeZone.getTimeZone(StringUtils.isNotBlank(timezone)?timezone:"Australia/Melbourne"))).withZone(DateTimeZone.getDefault());
params.put("begin", fromDate.toDate());
params.put("from", fromDate.toDate());
try {
params.put("begin", format.parse(begin));
params.put("from", format.parse(begin));
} catch (ParseException e) {
throw new ParamInvalidException("begin", "error.payment.valid.invalid_date_format");
}
}
if (end != null) {
DateTime toDate = DateTime.parse(end, DateTimeFormat.forPattern("yyyyMMdd"))
.withZoneRetainFields(DateTimeZone.forTimeZone(TimeZone.getTimeZone(StringUtils.isNotBlank(timezone)?timezone:"Australia/Melbourne"))).withZone(DateTimeZone.getDefault());
params.put("end", DateUtils.addDays(toDate.toDate(), 1));
params.put("to", DateUtils.addDays(toDate.toDate(), 1));
try {
params.put("end", DateUtils.addDays(format.parse(end), 1));
params.put("to", DateUtils.addDays(format.parse(end), 1));
} catch (ParseException e) {
throw new ParamInvalidException("end", "error.payment.valid.invalid_date_format");
}
}
if (gateway != null && gateway.length > 0) {
List<Integer> tradeTypes = new ArrayList<>();

Loading…
Cancel
Save