|
|
|
@ -7,17 +7,15 @@ import au.com.royalpay.payment.manage.analysis.core.DashboardService;
|
|
|
|
|
import au.com.royalpay.payment.manage.analysis.mappers.ClientAnalysisMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.analysis.mappers.CustomerAndOrdersStatisticsMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.client.ClientCustomersMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ExchangeRateMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
|
import au.com.royalpay.payment.tools.defines.TradeType;
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.Order;
|
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
|
import org.apache.commons.lang3.time.DurationFormatUtils;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
@ -26,6 +24,7 @@ import org.springframework.cache.annotation.Cacheable;
|
|
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.math.RoundingMode;
|
|
|
|
|
import java.text.DateFormat;
|
|
|
|
@ -34,8 +33,6 @@ import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Created by davep on 2016-07-28.
|
|
|
|
|
*/
|
|
|
|
@ -62,7 +59,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
|
private StringRedisTemplate stringRedisTemplate;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private ClientCustomersMapper clientCustomersMapper;
|
|
|
|
|
private MerchantInfoProvider merchantInfoProvider;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -323,6 +320,8 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
|
params.remove("client_ids");
|
|
|
|
|
}
|
|
|
|
|
JSONObject res = new JSONObject();
|
|
|
|
|
JSONObject mchConfig = merchantInfoProvider.getMchExtParams(partner.getIntValue("client_id"));
|
|
|
|
|
params.put("hide_sub_mch", mchConfig.getBooleanValue("hide_sub_mch"));
|
|
|
|
|
params.put("client_id", partner.getIntValue("client_id"));
|
|
|
|
|
JSONObject today = getTransJSONO(params);
|
|
|
|
|
params.put("begin",DateUtils.addDays(params.getDate("begin"),-1));
|
|
|
|
|