|
|
@ -1,22 +1,22 @@
|
|
|
|
package au.com.royalpay.payment.manage.analysis.core.impls;
|
|
|
|
package au.com.royalpay.payment.manage.analysis.core.impls;
|
|
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.core.PaymentApi;
|
|
|
|
import au.com.royalpay.payment.core.PaymentApi;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.beans.AnalysisBean;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.beans.AnalysisBean;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.DashboardService;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.DashboardService;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.PartnerCardDashboardService;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.PartnerCardDashboardService;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.mappers.CustomerAndOrdersStatisticsMapper;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.mappers.CustomerAndOrdersStatisticsMapper;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.log.LogSettleMailMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
|
|
|
|
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
|
|
|
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
|
|
|
import au.com.royalpay.payment.tools.utils.PageListUtils;
|
|
|
|
import au.com.royalpay.payment.tools.utils.PageListUtils;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.Order;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.Order;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
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.time.DateFormatUtils;
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
import org.springframework.util.Assert;
|
|
|
@ -44,7 +44,7 @@ public class PartnerCardDashboardServiceImp implements PartnerCardDashboardServi
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private MerchantInfoProvider merchantInfoProvider;
|
|
|
|
private MerchantInfoProvider merchantInfoProvider;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private PaymentApi paymentApi;
|
|
|
|
private LogSettleMailMapper logSettleMailMapper;
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public JSONObject getCommonAnalysis(String client_moniker) {
|
|
|
|
public JSONObject getCommonAnalysis(String client_moniker) {
|
|
|
|
JSONObject client = clientManager.getClientInfoByMoniker(client_moniker);
|
|
|
|
JSONObject client = clientManager.getClientInfoByMoniker(client_moniker);
|
|
|
@ -140,6 +140,17 @@ public class PartnerCardDashboardServiceImp implements PartnerCardDashboardServi
|
|
|
|
params.put("client_id", client_id);
|
|
|
|
params.put("client_id", client_id);
|
|
|
|
PageList<JSONObject> logs = transactionMapper.listSettlementLog(params, new PageBounds(query.getPage(), query.getLimit(), Order.formString("clearing_time.desc")));
|
|
|
|
PageList<JSONObject> logs = transactionMapper.listSettlementLog(params, new PageBounds(query.getPage(), query.getLimit(), Order.formString("clearing_time.desc")));
|
|
|
|
JSONObject result = PageListUtils.buildPageListResult(logs);
|
|
|
|
JSONObject result = PageListUtils.buildPageListResult(logs);
|
|
|
|
|
|
|
|
if (query.getPage()==1){
|
|
|
|
|
|
|
|
if (!logs.isEmpty() && logs.size()>0){
|
|
|
|
|
|
|
|
JSONObject sendMailLog = logSettleMailMapper.findByDate(logs.get(0).getDate("clearing_time"));
|
|
|
|
|
|
|
|
if (sendMailLog == null) {
|
|
|
|
|
|
|
|
result.put("padding",true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sendMailLog!=null && sendMailLog.getIntValue("mail_status") != 1) {
|
|
|
|
|
|
|
|
result.put("padding",true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|