From e7acded5ad66473983a3565d76bcaa4e7945c43d Mon Sep 17 00:00:00 2001 From: Todking Date: Mon, 6 Dec 2021 17:36:18 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E5=95=86=E6=88=B7=E7=AB=AF=E6=96=B0?= =?UTF-8?q?=E5=A2=9Ekyc=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apsKYC/domain/entity/ApsNoticeClient.java | 6 +- .../mappers/apskyc/ApsNoticeClientMapper.java | 7 +- .../manage/merchants/core/ClientManager.java | 12 ++- .../core/impls/ClientManagerImpl.java | 39 ++++++--- .../merchants/web/PartnerViewController.java | 81 +++++++++++-------- .../mappers/apskyc/ApsNoticeClientMapper.xml | 12 +++ 6 files changed, 105 insertions(+), 52 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/apsKYC/domain/entity/ApsNoticeClient.java b/src/main/java/au/com/royalpay/payment/manage/apsKYC/domain/entity/ApsNoticeClient.java index b682aa059..2f1f76390 100644 --- a/src/main/java/au/com/royalpay/payment/manage/apsKYC/domain/entity/ApsNoticeClient.java +++ b/src/main/java/au/com/royalpay/payment/manage/apsKYC/domain/entity/ApsNoticeClient.java @@ -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; + /** * 用户第一次阅读时间 */ diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/apskyc/ApsNoticeClientMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/apskyc/ApsNoticeClientMapper.java index 86bb3545f..4d1f8f254 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/apskyc/ApsNoticeClientMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/apskyc/ApsNoticeClientMapper.java @@ -17,7 +17,7 @@ public interface ApsNoticeClientMapper { @AutoSql(SqlType.INSERT) void saveApsNoticeClient(ApsNoticeClient apsNoticeClient); - @AutoSql(SqlType.UPDATE) + void updateApsNoticeClient(ApsNoticeClient apsNoticeClient); PageList 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); } diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java index cc2c54d13..ca1dc1832 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java @@ -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); } diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index ba0838a79..14020e8b9 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -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 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"; diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java index f8fa9b919..036e13bf8 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java @@ -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 accountTransactionsByDate(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject manager, @PathVariable String clientMoniker,@RequestParam String date) { + public List 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 getAccountDetailByMonths(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject manager, @PathVariable String clientMoniker){ + public List 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); + } } diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/apskyc/ApsNoticeClientMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/apskyc/ApsNoticeClientMapper.xml index 721309c7f..49e4e245d 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/apskyc/ApsNoticeClientMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/apskyc/ApsNoticeClientMapper.xml @@ -15,5 +15,17 @@ FROM sys_aps_notice_clients where notice_id = #{id} +