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