|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|