add 商户端新增kyc相关接口

master
Todking 3 years ago
parent 78c61a4e0d
commit e7acded5ad

@ -1,7 +1,6 @@
package au.com.royalpay.payment.manage.apsKYC.domain.entity;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@ -35,6 +34,11 @@ public class ApsNoticeClient {
*/
private String partnerCode;
/**
* id
*/
private String userId;
/**
*
*/

@ -17,7 +17,7 @@ public interface ApsNoticeClientMapper {
@AutoSql(SqlType.INSERT)
void saveApsNoticeClient(ApsNoticeClient apsNoticeClient);
@AutoSql(SqlType.UPDATE)
void updateApsNoticeClient(ApsNoticeClient apsNoticeClient);
PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds);
@ -26,4 +26,9 @@ public interface ApsNoticeClientMapper {
@AutoSql(SqlType.SELECT)
ApsNoticeClient getApsNoticeClientById(String id);
JSONObject getApsKycClient(@Param("client_moniker")String clientMoniker);
@AutoSql(SqlType.UPDATE)
void toUpdateApsKycClient(JSONObject updateReadTime);
}

@ -85,7 +85,7 @@ public interface ClientManager {
@Transactional(noRollbackFor = EmailException.class)
void auditClientGreenChannel(JSONObject manager, String clientMoniker);
void checkAndSendInitEmail(JSONObject manager, String clientMoniker,String type);
void checkAndSendInitEmail(JSONObject manager, String clientMoniker, String type);
void markApproveEmailSendStatus(String clientMoniker, JSONObject manager);
@ -393,10 +393,11 @@ public interface ClientManager {
void getAggregateAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception;
void getAggregateCardAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception;
//重新制作卡支付合同
void getAggregateCardAgreeFileAgain(String clientMoniker, JSONObject manager) throws Exception;
void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal,String rateid,HttpServletResponse httpResponse);
void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal, String rateid, HttpServletResponse httpResponse);
void getNewAggregateAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception;
@ -444,7 +445,7 @@ public interface ClientManager {
void changeApplicationSubMerchantById(String clientMoniker, String merchantAppId, NewSubMerchantIdApply subMerchantIdApply, JSONObject manager);
JSONObject querySubMerchantStatus(String clientMoniker,String subMerchantId);
JSONObject querySubMerchantStatus(String clientMoniker, String subMerchantId);
void registerAlipayGms(String clientMoniker, JSONObject manager);
@ -609,8 +610,11 @@ public interface ClientManager {
MerchantApplicationResult alipayPlusRegisterMerchant(String clientMoniker, ApsMerchantApplication apsMerchantApplication, JSONObject manager);//alipayplus 注册商户
String queryAlipayPlusOnlineStatus(boolean isOffline,String clientMoniker, JSONObject manager);
String queryAlipayPlusOnlineStatus(boolean isOffline, String clientMoniker, JSONObject manager);
String queryAlipayPlusOfflineStatus(String clientMoniker, JSONObject manager);
JSONObject getApsKycClient(JSONObject account, String clientMoniker);
void updateApsKycClient(JSONObject account, JSONObject item);
}

@ -32,7 +32,6 @@ import au.com.royalpay.payment.core.beans.MerchantApplicationResult;
import au.com.royalpay.payment.core.exceptions.EmailException;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.core.impls.MerchantChannelApplicationManager;
import au.com.royalpay.payment.core.impls.MerchantChannelPermissionManager;
import au.com.royalpay.payment.core.mappers.SysClientMapper;
import au.com.royalpay.payment.core.utils.OrderExpiryRuleResolver;
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
@ -47,9 +46,8 @@ import au.com.royalpay.payment.manage.device.core.DeviceManager;
import au.com.royalpay.payment.manage.gateway.core.GatewayMerchantApply;
import au.com.royalpay.payment.manage.kyc.enums.FilesAuthEnum;
import au.com.royalpay.payment.manage.management.sysconfig.core.impls.PermissionPartnerManagerImpl;
import au.com.royalpay.payment.manage.mappers.apskyc.ApsNoticeClientMapper;
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDConfigMapper;
import au.com.royalpay.payment.manage.mappers.log.ClearingDetailMapper;
import au.com.royalpay.payment.manage.mappers.log.ClearingLogMapper;
import au.com.royalpay.payment.manage.mappers.log.ClientsOperationLogMapper;
import au.com.royalpay.payment.manage.mappers.log.LogClientSubMerchantIdMapper;
import au.com.royalpay.payment.manage.mappers.payment.CommonSubMerchantIdMapper;
@ -328,6 +326,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private PaymentApi paymentApi;
@Resource
private ApsConfigService apsConfigService;
@Resource
private ApsNoticeClientMapper apsNoticeClientMapper;
DateTimeFormatter formatter = DateTimeFormat.forPattern("dd MMM yyyy");
@ -556,20 +556,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("enable_alipayaps", false);
MerchantChannelPermissionResolver resolverApsInStore = this.paymentApi.channelApi(PayChannel.ALIPAY_APS_IN_STORE.getChannelCode()).getChannelPermissionResolver();
MerchantChannelPermissionResolver resolverApsCashier = this.paymentApi.channelApi(PayChannel.ALIPAY_APS_CASHIER.getChannelCode()).getChannelPermissionResolver();
if(!Objects.isNull(resolverApsInStore) && !Objects.isNull(resolverApsCashier) &&
if (!Objects.isNull(resolverApsInStore) && !Objects.isNull(resolverApsCashier) &&
(resolverApsInStore.newOrderEnabled(client, null, PlatformEnvironment.getEnv().getForeignCurrency()) ||
resolverApsCashier.newOrderEnabled(client, null, PlatformEnvironment.getEnv().getForeignCurrency()))){
resolverApsCashier.newOrderEnabled(client, null, PlatformEnvironment.getEnv().getForeignCurrency()))) {
client.put("enable_alipayaps", true);
}
ApsConfigData apsConfig = apsConfigService.getApsConfigByClientId(client.getString("client_id"));
if (apsConfig == null) {
if(client.getBoolean("enable_alipay")){
if (client.getBoolean("enable_alipay")) {
apsConfig = apsConfigService.saveApsConfigClientId(manager.getString("manager_id"), client.getString("client_id"), new ApsConfigDescriptor().setAlipayCnSwitch(false));
}else if(client.getBoolean("enable_alipayaps")){
} else if (client.getBoolean("enable_alipayaps")) {
apsConfig = apsConfigService.saveApsConfigClientId(manager.getString("manager_id"), client.getString("client_id"), new ApsConfigDescriptor().setAlipayCnSwitch(true));
}
}
if(apsConfig != null){
if (apsConfig != null) {
client.put("aps_config_id", apsConfig.getId());
client.put("alipay_cn_switch", apsConfig.getAlipayCnSwitch());
}
@ -1597,14 +1597,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
public void switchChannelPermission(JSONObject manager, String clientMoniker, String channel, boolean allow) {
PayChannel payChannel = PayChannel.fromChannelCode(channel);
if(payChannel == PayChannel.ALIPAY_APS){
if (payChannel == PayChannel.ALIPAY_APS) {
ArrayList<String> apsChannels = new ArrayList<>();
apsChannels.add(PayChannel.ALIPAY_APS_IN_STORE.getChannelCode());
apsChannels.add(PayChannel.ALIPAY_APS_CASHIER.getChannelCode());
apsChannels.forEach(apsChannel->{
apsChannels.forEach(apsChannel -> {
extracted(manager, clientMoniker, apsChannel, allow);
});
}else {
} else {
extracted(manager, clientMoniker, channel, allow);
}
}
@ -1619,7 +1619,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
try {
clientModifySupport.processModify(new SwitchChannelPermissionModify(manager, clientMoniker, merchantInfoProvider, channelApi.getChannelPermissionResolver(), allow));
} catch (Exception e) {
logger.error("Failed to change channel switch:{}", channel,e);
logger.error("Failed to change channel switch:{}", channel, e);
}
logger.info("{}({}) switched client {} channel {} to {}", manager.getString("display_name"), manager.getString("manager_id"), clientMoniker, channel, allow);
if (allow && (StringUtils.equalsAnyIgnoreCase("Wechat", channel) || StringUtils.equalsAnyIgnoreCase("Alipay", channel))) {
@ -7160,6 +7160,21 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return null;
}
@Override
public JSONObject getApsKycClient(JSONObject account, String clientMoniker) {
return apsNoticeClientMapper.getApsKycClient(clientMoniker);
}
@Override
public void updateApsKycClient(JSONObject account, JSONObject item) {
if (item.getIntValue("status") == 1) {
item.put("read_time", new Date());
}
item.put("status_time", new Date());
item.put("user_id", account.getString("account_id"));
apsNoticeClientMapper.toUpdateApsKycClient(item);
}
private void exportLetterOfferPDF(String clientMoniker, JSONObject manage) {
JSONObject info = convertClientLetterOfferInfo(clientMoniker);
String pdfPath = this.getClass().getClassLoader().getResource("").getPath() + "/templates/pdf/letter_of_offer.pdf";

@ -89,7 +89,7 @@ public class PartnerViewController {
response.setContentType("application/octet-stream");
response.addHeader("Content-Disposition", "attachment; filename=qr_board.jpg");
OutputStream ous = response.getOutputStream();
clientManager.writeQrCodeBoard(null, account.getString("client_moniker"), config, ous,"PC");
clientManager.writeQrCodeBoard(null, account.getString("client_moniker"), config, ous, "PC");
}
@PartnerMapping(value = "/qrcode_board/aggregate", method = RequestMethod.GET)
@ -98,16 +98,16 @@ public class PartnerViewController {
response.setContentType("application/octet-stream");
response.addHeader("Content-Disposition", "attachment; filename=qr_board.jpg");
OutputStream ous = response.getOutputStream();
clientManager.writeAggregateQrCodeBoard(null, account.getString("client_moniker"), config, ous,"pc");
clientManager.writeAggregateQrCodeBoard(null, account.getString("client_moniker"), config, ous, "pc");
}
@PartnerMapping(value = "/qrcode_board/CBBankAggregate", method = RequestMethod.GET)
public void getCBBankAggregateQRCodeBoardImage(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account,
HttpServletResponse response) throws IOException {
HttpServletResponse response) throws IOException {
response.setContentType("application/octet-stream");
response.addHeader("Content-Disposition", "attachment; filename=qr_board.jpg");
OutputStream ous = response.getOutputStream();
clientManager.writeCBBankAggregateQrCodeBoard(null, account.getString("client_moniker"), ous,"pc");
clientManager.writeCBBankAggregateQrCodeBoard(null, account.getString("client_moniker"), ous, "pc");
}
@PartnerMapping(value = "/poster", method = RequestMethod.GET)
@ -175,8 +175,8 @@ public class PartnerViewController {
@PartnerMapping(value = "/{clientMoniker}/order_expiry_config", method = RequestMethod.PUT)
@ResponseBody
public void setOrderExpiryConfig(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account,@PathVariable String clientMoniker, @RequestBody JSONObject config) {
clientManager.setOrderExpiryConfig(account,clientMoniker, config.getString("order_expiry_config"));
public void setOrderExpiryConfig(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @PathVariable String clientMoniker, @RequestBody JSONObject config) {
clientManager.setOrderExpiryConfig(account, clientMoniker, config.getString("order_expiry_config"));
}
@PartnerMapping(value = "/{clientMoniker}/surcharge_account", method = RequestMethod.GET, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ -195,13 +195,13 @@ public class PartnerViewController {
@PartnerMapping(value = "/{clientMoniker}/account/transactions/date", method = RequestMethod.GET, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ReadOnlyConnection
@ResponseBody
public List<JSONObject> accountTransactionsByDate(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject manager, @PathVariable String clientMoniker,@RequestParam String date) {
public List<JSONObject> accountTransactionsByDate(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject manager, @PathVariable String clientMoniker, @RequestParam String date) {
return clientManager.getAccountTransactionsByDetailId(manager, clientMoniker, date);
}
@PartnerMapping(value = "/{clientMoniker}/account/months", method = RequestMethod.GET, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ResponseBody
public List<JSONObject> getAccountDetailByMonths(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject manager, @PathVariable String clientMoniker){
public List<JSONObject> getAccountDetailByMonths(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject manager, @PathVariable String clientMoniker) {
return clientManager.getAccountDetailByMonths(manager, clientMoniker);
}
@ -266,7 +266,7 @@ public class PartnerViewController {
@PartnerMapping(value = "/pay_notice", method = RequestMethod.PUT, roles = PartnerRole.ADMIN)
@ResponseBody
public void togglePayNotice(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody JSONObject enable) {
clientManager.togglePayNotice(account,account.getString("client_moniker"), enable.getBooleanValue("enable"));
clientManager.togglePayNotice(account, account.getString("client_moniker"), enable.getBooleanValue("enable"));
}
@PartnerMapping(value = "/audit_refund", method = RequestMethod.PUT, roles = PartnerRole.ADMIN)
@ -322,7 +322,7 @@ public class PartnerViewController {
@ResponseBody
public JSONObject getClientBankAccount(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
JSONObject bankInfo = clientManager.listClientBankAccounts(null, account.getString("client_moniker"));
bankInfo.put("account_no","***"+ StringUtils.substring(bankInfo.getString("account_no"), -4));
bankInfo.put("account_no", "***" + StringUtils.substring(bankInfo.getString("account_no"), -4));
return bankInfo;
}
@ -339,7 +339,7 @@ public class PartnerViewController {
if (!timezone.matches("^((Australia/West)|(Australia/Eucla)|(Australia/North)|(Australia/South)|(Australia/Brisbane)|(Australia/Melbourne)|(Australia/LHI))$")) {
throw new ParamInvalidException("timezone", "error.payment.valid.invalid_timezone");
}
clientManager.updateTimeZone(account,account.getString("client_moniker"), timezone);
clientManager.updateTimeZone(account, account.getString("client_moniker"), timezone);
}
@PartnerMapping(value = "/sub_partners", method = RequestMethod.GET)
@ -353,7 +353,7 @@ public class PartnerViewController {
public JSONObject listSubPartnersByPage(@RequestParam(defaultValue = "1") int page,
@RequestParam(required = false) String searchText,
@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
return clientManager.listSubClientsByPage(null, account.getString("client_moniker"), searchText,page);
return clientManager.listSubClientsByPage(null, account.getString("client_moniker"), searchText, page);
}
@PartnerMapping(value = "/devices", method = RequestMethod.GET, roles = PartnerRole.ADMIN)
@ -367,7 +367,7 @@ public class PartnerViewController {
@PartnerMapping(value = "/device_ids", method = RequestMethod.GET, roles = PartnerRole.ADMIN)
@ResponseBody
public JSONObject listClientDeviceIds(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account,
@RequestParam(required = false) String client_type, @RequestParam(required = false) String[] client_ids) {
@RequestParam(required = false) String client_type, @RequestParam(required = false) String[] client_ids) {
return clientManager.listClientDeviceIds(account.getString("client_moniker"), client_type, client_ids);
}
@ -483,7 +483,7 @@ public class PartnerViewController {
@PartnerMapping(value = "/customer_surcharge_rate", method = RequestMethod.PUT, roles = PartnerRole.ADMIN)
@ResponseBody
public void setCustomerSurchargeRate(@RequestBody JSONObject pass, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientManager.setCustomerSurchargeRate(account,account.getString("client_moniker"), pass.getBigDecimal("customer_surcharge_rate"));
clientManager.setCustomerSurchargeRate(account, account.getString("client_moniker"), pass.getBigDecimal("customer_surcharge_rate"));
}
@PartnerMapping(value = "/trade_logs/full_release_preauth", method = RequestMethod.PUT, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ -496,7 +496,7 @@ public class PartnerViewController {
@PartnerMapping(value = "/manual_settle", method = RequestMethod.PUT, roles = PartnerRole.ADMIN)
@ResponseBody
public void manualSettle(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestParam boolean manual_settle) {
clientManager.changeManualSettle(account,account.getIntValue("client_id"), manual_settle, account.getString("account_id"), 1, "商户" + (manual_settle ? "打开" : "关闭") + "手动清算");
clientManager.changeManualSettle(account, account.getIntValue("client_id"), manual_settle, account.getString("account_id"), 1, "商户" + (manual_settle ? "打开" : "关闭") + "手动清算");
}
@PartnerMapping(value = "/checkContract", method = RequestMethod.GET)
@ -520,7 +520,7 @@ public class PartnerViewController {
@PartnerMapping(value = "/compliance/files", method = RequestMethod.GET)
@ResponseBody
public JSONObject complianceFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
return clientManager.getAuthFiles(null,account.getString("client_moniker"));
return clientManager.getAuthFiles(null, account.getString("client_moniker"));
}
@ -557,17 +557,17 @@ public class PartnerViewController {
@PartnerMapping(value = "/verify/email", method = RequestMethod.PUT)
@ResponseBody
public void sendVerifyEmail(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientManager.sendVerifyEmail(account.getJSONObject("client"),account.getString("account_id"));
clientManager.sendVerifyEmail(account.getJSONObject("client"), account.getString("account_id"));
}
@PartnerMapping(value = "/update/partnerInfo", method = RequestMethod.PUT,roles = PartnerRole.ADMIN)
@PartnerMapping(value = "/update/partnerInfo", method = RequestMethod.PUT, roles = PartnerRole.ADMIN)
@ResponseBody
public void updatePartnerInfo(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account,@RequestBody ClientRegisterInfo info) {
public void updatePartnerInfo(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody ClientRegisterInfo info) {
JSONObject client = account.getJSONObject("client");
if (client.getIntValue("approve_result") != 1){
clientManager.updateClientRegisterInfo(null,account.getString("client_moniker"),info);
}else {
if (client.getIntValue("approve_result") != 1) {
clientManager.updateClientRegisterInfo(null, account.getString("client_moniker"), info);
} else {
throw new BadRequestException("已通过审核,暂不能提交和修改");
}
@ -577,11 +577,11 @@ public class PartnerViewController {
@ResponseBody
public void updateFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody ClientAuthFilesInfo filesInfo) {
JSONObject client = account.getJSONObject("client");
if (client.getIntValue("approve_result") != 1 && client.getIntValue("source") == 4){
if (client.getIntValue("approve_result") != 1 && client.getIntValue("source") == 4) {
JSONObject manager = new JSONObject();
manager.put("display_name","client");
manager.put("display_name", "client");
clientManager.uploadAuthFiles(manager, account.getString("client_moniker"), filesInfo);
}else {
} else {
throw new BadRequestException("已通过审核,暂不能提交和修改");
}
}
@ -593,16 +593,16 @@ public class PartnerViewController {
JSONObject authFileStatus = signInAccountService.checkAuthFileStatus(client);
if (authFileStatus.getBooleanValue("client_less_file")) {
JSONObject manager = new JSONObject();
manager.put("display_name","client");
manager.put("display_name", "client");
clientManager.uploadAuthFilesForWaitCompliance(manager, account.getString("client_moniker"), filesInfo);
}else {
} else {
throw new BadRequestException("已通过审核,暂不能提交和修改");
}
}
@PartnerMapping(value = "/clientCompliance/{clientMoniker}/viewCommit", method = RequestMethod.POST)
@ResponseBody
public void clientComplianceViewCommit(@PathVariable String clientMoniker ,@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody JSONObject photoInfo) {
public void clientComplianceViewCommit(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody JSONObject photoInfo) {
account.put("photo_info", photoInfo);
clientManager.commitAuthFilesToCompliance(clientMoniker, account, "Web");
}
@ -636,31 +636,44 @@ public class PartnerViewController {
/**
*
*
* @param clientMoniker
* @return
*/
@PartnerMapping(value = "/{clientMoniker}/incremental_service", method = RequestMethod.GET, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ResponseBody
public JSONObject getClientIncrementalService(@PathVariable String clientMoniker){
return clientManager.partnerIncrementalService(clientMoniker);
public JSONObject getClientIncrementalService(@PathVariable String clientMoniker) {
return clientManager.partnerIncrementalService(clientMoniker);
}
/**
*
*
* @param clientMoniker
* @param channel
* @return
*/
@PartnerMapping(value = "/{clientMoniker}/incremental_service/{channel}/info", method = RequestMethod.GET, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ResponseBody
public JSONObject getClientIncrementalServiceInfo(@PathVariable("clientMoniker") String clientMoniker, @PathVariable("channel") String channel){
return clientManager.partnerIncrementalServiceInfo(clientMoniker,channel);
public JSONObject getClientIncrementalServiceInfo(@PathVariable("clientMoniker") String clientMoniker, @PathVariable("channel") String channel) {
return clientManager.partnerIncrementalServiceInfo(clientMoniker, channel);
}
@PartnerMapping(value = "/incremental_service/{channel}/login_token", method = RequestMethod.GET, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ResponseBody
public JSONObject getClientIncrementalServiceLoginToken(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @PathVariable("channel") String sourceCode){
return clientManager.getClientIncrementalServiceLoginToken(account,sourceCode);
public JSONObject getClientIncrementalServiceLoginToken(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @PathVariable("channel") String sourceCode) {
return clientManager.getClientIncrementalServiceLoginToken(account, sourceCode);
}
@PartnerMapping(value = "/{clientMoniker}/aps_kyc", method = RequestMethod.GET, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ResponseBody
public JSONObject getApsKycClient(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @PathVariable("clientMoniker") String clientMoniker) {
return clientManager.getApsKycClient(account, clientMoniker);
}
@PartnerMapping(value = "/aps_kyc", method = RequestMethod.PUT, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ResponseBody
public void updateApsKycClient(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody JSONObject item) {
clientManager.updateApsKycClient(account, item);
}
}

@ -15,5 +15,17 @@
FROM sys_aps_notice_clients
where notice_id = #{id}
</select>
<select id="getApsKycClient" resultType="com.alibaba.fastjson.JSONObject">
SELECT c.*,
n.title,
n.content
FROM sys_aps_notice_clients c
INNER JOIN sys_aps_notice n ON n.id = c.notice_id
WHERE c.partner_code = #{client_moniker}
AND n.`status` = 0
AND c.`status` IN (0, 1)
AND c.is_valid = 0
AND c.handle = 0
</select>
</mapper>

Loading…
Cancel
Save