[Y] 支付宝线上清算预估

master
Tayl0r 7 years ago
parent 000ba24c1b
commit 7f0c42f3b9

@ -17,6 +17,7 @@ import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList; import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -294,6 +295,7 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
public JSONObject getSystemClearingAmount(Date settle_date, Object settlementLog, String channel) throws Exception { public JSONObject getSystemClearingAmount(Date settle_date, Object settlementLog, String channel) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd 02:00:00"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd 02:00:00");
SimpleDateFormat onlineSdf = new SimpleDateFormat("yyyyMMdd 02:00:00");
JSONObject sysLogs = new JSONObject(); JSONObject sysLogs = new JSONObject();
String start_date = null; String start_date = null;
String end_date = null; String end_date = null;
@ -308,7 +310,9 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
end_date = sdf.format(wechatSettleLog.getEnd()); end_date = sdf.format(wechatSettleLog.getEnd());
logger.info("Wechat System Settle Logs:" + start_date + "<====>" + end_date); logger.info("Wechat System Settle Logs:" + start_date + "<====>" + end_date);
} else if (StringUtils.equals("AlipayOnline", channel)) { } else if (StringUtils.equals("AlipayOnline", channel)) {
JSONObject alipayOnlineSettleLog = (JSONObject) settlementLog;
start_date = onlineSdf.format(alipayOnlineSettleLog.getDate("min_date"));
end_date = onlineSdf.format(DateUtils.addDays(alipayOnlineSettleLog.getDate("max_date"), 1));
} else { } else {
return null; return null;
} }

Loading…
Cancel
Save