|
|
@ -5,34 +5,39 @@ import au.com.royalpay.payment.channels.bestpay.runtime.BestPayClient;
|
|
|
|
import au.com.royalpay.payment.channels.jd.runtime.JDClient;
|
|
|
|
import au.com.royalpay.payment.channels.jd.runtime.JDClient;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.WxPayClient;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.WxPayClient;
|
|
|
|
import au.com.royalpay.payment.core.PaymentApi;
|
|
|
|
import au.com.royalpay.payment.core.PaymentApi;
|
|
|
|
import au.com.royalpay.payment.core.PaymentChannelApi;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
|
|
|
|
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
|
|
|
|
import au.com.royalpay.payment.core.exceptions.OrderNotExistsException;
|
|
|
|
import au.com.royalpay.payment.core.exceptions.OrderNotExistsException;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.PlatformClearService;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.PlatformClearService;
|
|
|
|
import au.com.royalpay.payment.manage.appclient.core.RetailAppService;
|
|
|
|
import au.com.royalpay.payment.manage.appclient.core.RetailAppService;
|
|
|
|
import au.com.royalpay.payment.manage.dev.bean.Message;
|
|
|
|
import au.com.royalpay.payment.manage.dev.bean.Message;
|
|
|
|
import au.com.royalpay.payment.manage.dev.bean.SendWechatMessage;
|
|
|
|
import au.com.royalpay.payment.manage.dev.bean.SendWechatMessage;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.dev.core.CommonSubMerchantIdService;
|
|
|
|
import au.com.royalpay.payment.manage.dev.core.WechatMessageService;
|
|
|
|
import au.com.royalpay.payment.manage.dev.core.WechatMessageService;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.customers.CustomerEncourageMoneyUseLogMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.customers.CustomerEncourageMoneyUseLogMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.log.NotifyErrorLogMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.log.NotifyErrorLogMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.CommonSubMerchantIdMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.RefundMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.RefundMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.core.TradeLogService;
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.core.TradeLogService;
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
import au.com.royalpay.payment.tools.defines.TradeType;
|
|
|
|
import au.com.royalpay.payment.tools.defines.TradeType;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
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.utils.PageListUtils;
|
|
|
|
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 au.com.royalpay.payment.tools.utils.XmlFormatUtils;
|
|
|
|
import au.com.royalpay.payment.tools.utils.XmlFormatUtils;
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
|
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
import org.dom4j.Element;
|
|
|
|
import org.dom4j.Element;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.Logger;
|
|
|
@ -42,12 +47,14 @@ import org.springframework.context.ApplicationEventPublisher;
|
|
|
|
import org.springframework.context.ApplicationEventPublisherAware;
|
|
|
|
import org.springframework.context.ApplicationEventPublisherAware;
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
import org.springframework.validation.Errors;
|
|
|
|
import org.springframework.validation.Errors;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
import javax.servlet.ServletOutputStream;
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
|
|
|
import java.io.ByteArrayOutputStream;
|
|
|
|
import java.io.ByteArrayOutputStream;
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.IOException;
|
|
|
@ -56,6 +63,11 @@ import java.net.URISyntaxException;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
import javax.servlet.ServletOutputStream;
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Created by yixian on 2016-07-06.
|
|
|
|
* Created by yixian on 2016-07-06.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -100,7 +112,10 @@ public class TestController implements ApplicationEventPublisherAware {
|
|
|
|
private ApplicationEventPublisher publisher;
|
|
|
|
private ApplicationEventPublisher publisher;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private WechatMessageService wechatMessageService;
|
|
|
|
private WechatMessageService wechatMessageService;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private CommonSubMerchantIdMapper commonSubMerchantIdMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private CommonSubMerchantIdService commonSubMerchantIdService;
|
|
|
|
@ManagerMapping(value = "/{clientMoniker}/export/agreepdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR})
|
|
|
|
@ManagerMapping(value = "/{clientMoniker}/export/agreepdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR})
|
|
|
|
public void exportAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) throws Exception {
|
|
|
|
public void exportAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) throws Exception {
|
|
|
|
httpResponse.setContentType("application/pdf");
|
|
|
|
httpResponse.setContentType("application/pdf");
|
|
|
@ -371,4 +386,20 @@ public class TestController implements ApplicationEventPublisherAware {
|
|
|
|
wechatMessageService.sendMessageByOpenId(sendWechatMessage);
|
|
|
|
wechatMessageService.sendMessageByOpenId(sendWechatMessage);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/common_sub_merchant_id", method = RequestMethod.GET)
|
|
|
|
|
|
|
|
public JSONObject listCommonSubMerchantId(@RequestParam(required = false) String sub_merchant_id,@RequestParam(defaultValue = "true") boolean is_valid, @RequestParam(defaultValue = "1") int page,
|
|
|
|
|
|
|
|
@RequestParam(defaultValue = "10") int limit) {
|
|
|
|
|
|
|
|
return PageListUtils.buildPageListResult(commonSubMerchantIdMapper.list(is_valid,sub_merchant_id,new PageBounds(page,limit)));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/common_sub_merchant_id", method = RequestMethod.POST)
|
|
|
|
|
|
|
|
public void addCommonSubMerchantId(@RequestBody JSONObject sub_merchant_id) {
|
|
|
|
|
|
|
|
commonSubMerchantIdService.save(sub_merchant_id.getJSONObject("params"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/common_sub_merchant_id/{sub_merchant_id}", method = RequestMethod.PUT)
|
|
|
|
|
|
|
|
public void addCommonSubMerchantId(@PathVariable String sub_merchant_id) {
|
|
|
|
|
|
|
|
commonSubMerchantIdService.disable(sub_merchant_id);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|