|
|
@ -6,6 +6,7 @@ import au.com.royalpay.payment.core.beans.OrderStatus;
|
|
|
|
import au.com.royalpay.payment.manage.custom.core.CustomService;
|
|
|
|
import au.com.royalpay.payment.manage.custom.core.CustomService;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.custom.CustomReportDetailsMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.custom.CustomReportDetailsMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.custom.CustomReportsMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.custom.CustomReportsMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
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;
|
|
|
@ -49,6 +50,10 @@ public class CustomServiceImpl implements CustomService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void add(String orderId, String mchCustomId, String custom, String mchCustomName, List<JSONObject> subOrders) {
|
|
|
|
public void add(String orderId, String mchCustomId, String custom, String mchCustomName, List<JSONObject> subOrders) {
|
|
|
|
|
|
|
|
JSONObject report = customReportsMapper.findOne(orderId);
|
|
|
|
|
|
|
|
if(report!=null){
|
|
|
|
|
|
|
|
throw new BadRequestException("report record exist");
|
|
|
|
|
|
|
|
}
|
|
|
|
CustomReport customReport = new CustomReport(orderId, mchCustomId, mchCustomName, custom);
|
|
|
|
CustomReport customReport = new CustomReport(orderId, mchCustomId, mchCustomName, custom);
|
|
|
|
if (!CollectionUtils.isEmpty(subOrders)) {
|
|
|
|
if (!CollectionUtils.isEmpty(subOrders)) {
|
|
|
|
subOrders.forEach(p -> {
|
|
|
|
subOrders.forEach(p -> {
|
|
|
@ -90,4 +95,14 @@ public class CustomServiceImpl implements CustomService {
|
|
|
|
return customSupport.channelCustomConfigs(channel);
|
|
|
|
return customSupport.channelCustomConfigs(channel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void resend(String report_id) {
|
|
|
|
|
|
|
|
JSONObject report = customReportsMapper.findOne(report_id);
|
|
|
|
|
|
|
|
if(report.getIntValue("report_status")!=2){
|
|
|
|
|
|
|
|
throw new BadRequestException("order can't report");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
customSupport.sendCustom(report_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|