|
|
@ -37,6 +37,7 @@ import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
|
|
|
|
import au.com.royalpay.payment.tools.http.HttpUtils;
|
|
|
|
import au.com.royalpay.payment.tools.http.HttpUtils;
|
|
|
|
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
|
|
|
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.scheduler.SynchronizedScheduler;
|
|
|
|
import au.com.royalpay.payment.tools.utils.PdfUtils;
|
|
|
|
import au.com.royalpay.payment.tools.utils.PdfUtils;
|
|
|
|
import au.com.royalpay.payment.tools.utils.TimeZoneUtils;
|
|
|
|
import au.com.royalpay.payment.tools.utils.TimeZoneUtils;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
@ -77,6 +78,8 @@ import java.util.Optional;
|
|
|
|
public class TestController {
|
|
|
|
public class TestController {
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private SynchronizedScheduler synchronizedScheduler;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
private OrderMapper orderMapper;
|
|
|
|
private OrderMapper orderMapper;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private RefundMapper refundMapper;
|
|
|
|
private RefundMapper refundMapper;
|
|
|
@ -179,6 +182,7 @@ public class TestController {
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 第二个版本的合同
|
|
|
|
* 第二个版本的合同
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param clientMoniker
|
|
|
|
* @param clientMoniker
|
|
|
|
* @param manager
|
|
|
|
* @param manager
|
|
|
|
* @param httpResponse
|
|
|
|
* @param httpResponse
|
|
|
@ -285,6 +289,7 @@ public class TestController {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 制作卡支付合同
|
|
|
|
* 制作卡支付合同
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -464,8 +469,15 @@ public class TestController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/task/analysisDashboard")
|
|
|
|
@GetMapping(value = "/task/analysisDashboard")
|
|
|
|
public void analysisDashboard(@RequestParam("date") String date) throws ParseException {
|
|
|
|
public void analysisDashboard(@RequestParam("date") String date) {
|
|
|
|
|
|
|
|
synchronizedScheduler.executeProcess("manage_task:dashboardTask", 120_000,
|
|
|
|
|
|
|
|
() -> {
|
|
|
|
|
|
|
|
try {
|
|
|
|
dashboardService.generateCustomersAndOrdersStatistics(DateUtils.parseDate(date, "yyyyMMdd"));
|
|
|
|
dashboardService.generateCustomersAndOrdersStatistics(DateUtils.parseDate(date, "yyyyMMdd"));
|
|
|
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
|
|
|
logger.error("invalid input date:{}", date);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -617,8 +629,7 @@ public class TestController {
|
|
|
|
newSubMerchantIdApply.setBusiness_type("BOTH");
|
|
|
|
newSubMerchantIdApply.setBusiness_type("BOTH");
|
|
|
|
} else if (clientConfig.getString("client_pay_type").indexOf("1") >= 0) {
|
|
|
|
} else if (clientConfig.getString("client_pay_type").indexOf("1") >= 0) {
|
|
|
|
newSubMerchantIdApply.setBusiness_type("ONLINE");
|
|
|
|
newSubMerchantIdApply.setBusiness_type("ONLINE");
|
|
|
|
}
|
|
|
|
} else if (clientConfig.getString("client_pay_type").indexOf("2") >= 0) {
|
|
|
|
else if(clientConfig.getString("client_pay_type").indexOf("2")>=0){
|
|
|
|
|
|
|
|
newSubMerchantIdApply.setBusiness_type("OFFLINE");
|
|
|
|
newSubMerchantIdApply.setBusiness_type("OFFLINE");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -646,12 +657,10 @@ public class TestController {
|
|
|
|
TextUtils.isEmpty(newSubMerchantIdApply.getWebsite()))) {
|
|
|
|
TextUtils.isEmpty(newSubMerchantIdApply.getWebsite()))) {
|
|
|
|
logger.error("=======>公司类型为BOTH:网址或地址为空:clientid:" + clientJson.getInteger("client_id") + ":" + clientJson.getString("client_moniker"));
|
|
|
|
logger.error("=======>公司类型为BOTH:网址或地址为空:clientid:" + clientJson.getInteger("client_id") + ":" + clientJson.getString("client_moniker"));
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
} else if ("OFFLINE".equalsIgnoreCase(newSubMerchantIdApply.getBusiness_type()) && (TextUtils.isEmpty(newSubMerchantIdApply.getAddress()))) {
|
|
|
|
else if("OFFLINE".equalsIgnoreCase(newSubMerchantIdApply.getBusiness_type())&&(TextUtils.isEmpty(newSubMerchantIdApply.getAddress()))){
|
|
|
|
|
|
|
|
logger.error("=======>公司类型为OFFLINE:地址为空:clientid:" + clientJson.getInteger("client_id") + ":" + clientJson.getString("client_moniker"));
|
|
|
|
logger.error("=======>公司类型为OFFLINE:地址为空:clientid:" + clientJson.getInteger("client_id") + ":" + clientJson.getString("client_moniker"));
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
} else if ("ONLINE".equalsIgnoreCase(newSubMerchantIdApply.getBusiness_type()) &&
|
|
|
|
else if("ONLINE".equalsIgnoreCase(newSubMerchantIdApply.getBusiness_type())&&
|
|
|
|
|
|
|
|
TextUtils.isEmpty(newSubMerchantIdApply.getWebsite())) {
|
|
|
|
TextUtils.isEmpty(newSubMerchantIdApply.getWebsite())) {
|
|
|
|
logger.error("=======>公司类型为ONLINE:网址为空:clientid:" + clientJson.getInteger("client_id") + ":" + clientJson.getString("client_moniker"));
|
|
|
|
logger.error("=======>公司类型为ONLINE:网址为空:clientid:" + clientJson.getInteger("client_id") + ":" + clientJson.getString("client_moniker"));
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -677,6 +686,7 @@ public class TestController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 批量更新微信子商户号
|
|
|
|
* 批量更新微信子商户号
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|