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

master
duLingLing 5 years ago
parent f7c049a2d6
commit a8f659549c

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

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

Loading…
Cancel
Save