@ -364,13 +364,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
public JSONObject getSysRateConfig ( ) {
String rateConfig = sysConfigManager . getSysConfig ( ) . getString ( "sys_rates" ) ;
return JSON Object . parseObject ( rateConfig ) ;
return JSON . parseObject ( rateConfig ) ;
}
@Override
public JSONObject getSysCardRateConfig ( ) {
String rateConfig = sysConfigManager . getSysConfig ( ) . getString ( "sys_card_rates" ) ;
return JSON Object . parseObject ( rateConfig ) ;
return JSON . parseObject ( rateConfig ) ;
}
@Override
@ -447,7 +447,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if ( ManagerRole . OPERATOR . hasRole ( role ) ) {
List < JSONObject > log = logClientSubMerchantIdMapper . listLogsByClientId ( client . getInteger ( "client_id" ) ,
new PageBounds ( Order . formString ( "create_time.desc" ) ) ) ;
client . put ( "sub_merchant_id_log" , log . size ( ) > 0 ) ;
client . put ( "sub_merchant_id_log" , ! log . isEmpty ( ) ) ;
}
if ( ManagerRole . BD_USER . hasRole ( role ) ) {
int checkBDPermission = clientBDMapper . checkBDPermission ( client . getIntValue ( "client_id" ) , manager . getString ( "manager_id" ) ) ;
@ -728,7 +728,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
param . put ( "type" , 0 ) ;
List < Integer > orgIds = new ArrayList < > ( ) ;
List < JSONObject > childOrgs = orgMapper . listOrgsWithChid ( param ) ;
if ( childOrgs . size ( ) > 0 ) {
if ( ! childOrgs . isEmpty ( ) ) {
for ( JSONObject object : childOrgs ) {
orgIds . add ( object . getIntValue ( "org_id" ) ) ;
}
@ -1206,7 +1206,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
createKycAuthStatus ( manager , client ) ;
clientModifySupport . processClientConfigModify ( new SwitchPermissionModify ( manager , clientMoniker , "skip_clearing" , false ) ) ;
List < JSONObject > accounts = clientAccountMapper . listAdminAccounts ( clientId ) ;
if ( accounts ! = null & & accounts . size ( ) > 0 ) {
if ( accounts ! = null & & ! accounts . isEmpty ( ) ) {
sendInitEmail ( client , accounts . get ( 0 ) . getString ( "username" ) , "*******" , true ) ;
} else {
initAdminUserAndSendEmail ( manager , clientMoniker , client , true ) ;
@ -1306,7 +1306,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
// sendInitEmail(manager, client, account.getString("username"), "*****");
sendInitEmail ( client , account . getString ( "username" ) , "*****" , cardApproving ) ;
} else {
if ( accounts . size( ) = = 0 ) {
if ( accounts . isEmpty( ) ) {
initAdminUserAndSendEmail ( manager , clientMoniker , client , cardApproving ) ;
} else {
JSONObject account = accounts . get ( 0 ) ;
@ -1540,7 +1540,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
int clientId = client . getIntValue ( "client_id" ) ;
List < JSONObject > clientBankAccounts = clientBankAccountMapper . clientBankAccounts ( clientId ) ;
if ( clientBankAccounts . size ( ) > 0 ) {
if ( ! clientBankAccounts . isEmpty ( ) ) {
isRiskyMerchant ( client , clientBankAccounts . get ( 0 ) ) ;
} else {
isRiskyMerchant ( client , null ) ;
@ -1599,7 +1599,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private void checkPhoneAndWechatExist ( NewAccountBean account ) {
List < JSONObject > accounts = clientAccountMapper . findByPhone ( account . getContactPhone ( ) , account . getNation_code ( ) . startsWith ( "+" ) ? account . getNation_code ( ) : "+" + account . getNation_code ( ) ) ;
if ( accounts ! = null & & accounts . size ( ) > 0 ) {
if ( accounts ! = null & & ! accounts . isEmpty ( ) ) {
throw new BadRequestException ( "Mobile phone number has been bound to other accounts" ) ;
}
}
@ -1867,7 +1867,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
rate . put ( "clean_days" , clientConfig . getIntValue ( "clean_days" ) ) ;
}
if ( StringUtils . equalsIgnoreCase ( "rpaypmt_card" , rate . getString ( "rate_name" ) ) ) {
JSONObject extRates = JSON Object . parseObject ( rate . getString ( "ext_rates" ) ) ;
JSONObject extRates = JSON . parseObject ( rate . getString ( "ext_rates" ) ) ;
convertExtRateValueDataVersion ( rate , extRates , "domestic_rate_value" ) ;
convertExtRateValueDataVersion ( rate , extRates , "overseas_rate_value" ) ;
rate . put ( "ext_rates" , extRates ) ;
@ -1973,11 +1973,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientRateMapper . updateConfig ( rateLog ) ;
}
if ( StringUtils . equalsIgnoreCase ( "rpaypmt_card" , config . getString ( "type" ) ) ) {
JSONObject extRateParams = new JSONObject ( ) { {
put( "domestic_rate_value" , subRateObject ( config . getBigDecimal ( "rate_value" ) , config . getIntValue ( "clean_days" ) ) ) ;
JSONObject extRateParams = JsonHelper . newJson ( json - > {
json. put( "domestic_rate_value" , subRateObject ( config . getBigDecimal ( "rate_value" ) , config . getIntValue ( "clean_days" ) ) ) ;
JSONObject extRates = config . getJSONObject ( "ext_rates" ) ;
put( "overseas_rate_value" , subRateObject ( extRates . getBigDecimal ( "international_rate_value" ) , config . getIntValue ( "clean_days" ) + 1 ) ) ;
} } ;
json. put( "overseas_rate_value" , subRateObject ( extRates . getBigDecimal ( "international_rate_value" ) , config . getIntValue ( "clean_days" ) + 1 ) ) ;
} ) ;
newConfig . put ( "ext_rates" , extRateParams . toJSONString ( ) ) ;
}
if ( "cb_bankpay" . equalsIgnoreCase ( channel ) ) {
@ -1987,7 +1987,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} else {
clientRateMapper . saveRate ( newConfig ) ;
}
logger . info ( clientId + "的" + channel + "费率设置成功" ) ;
logger . info ( "{}的{}费率设置成功" , clientId , channel ) ;
}
}
@ -2041,7 +2041,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new ForbiddenException ( "费率参数小于旗下商户最低" + rateName + "费率,请重新输入" ) ;
}
;
}
}
}
@ -2053,7 +2052,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new ForbiddenException ( "费率参数小于旗下商户最低" + channel + "费率,请重新输入" ) ;
}
;
}
}
}
@ -2073,11 +2071,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if ( mchConfig . getBooleanValue ( "level3_mch_config" ) ) {
for ( JSONObject partner : listChildClients ) {
List < JSONObject > clients = clientMapper . listChildClients ( partner . getIntValue ( "client_id" ) ) ;
if ( clients . size ( ) > 0 ) {
if ( ! clients . isEmpty ( ) ) {
partner . put ( "level3Clients" , clients ) ;
clients . forEach ( e - > {
e . put ( "parent_client_moniker" , partner . getString ( "client_moniker" ) ) ;
} ) ;
clients . forEach ( e - > e . put ( "parent_client_moniker" , partner . getString ( "client_moniker" ) ) ) ;
}
}
}
@ -2094,9 +2090,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
PageBounds pageBounds ;
pageBounds = new PageBounds ( page , 20 , Order . formString ( "create_time.desc" ) ) ;
JSONObject params = new JSONObject ( ) { {
put ( "parent_client_id" , client . getIntValue ( "client_id" ) ) ;
} } ;
JSONObject params = JsonHelper . newJson ( json - > json . put ( "parent_client_id" , client . getIntValue ( "client_id" ) ) ) ;
if ( StringUtils . isNotBlank ( searchText ) ) {
params . put ( "search_text" , searchText ) ;
}
@ -2105,11 +2099,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if ( mchConfig . getBooleanValue ( "level3_mch_config" ) ) {
for ( JSONObject partner : childClients ) {
List < JSONObject > clients = clientMapper . listChildClients ( partner . getIntValue ( "client_id" ) ) ;
if ( clients . size ( ) > 0 ) {
if ( ! clients . isEmpty ( ) ) {
partner . put ( "level3Clients" , clients ) ;
clients . forEach ( e - > {
e . put ( "parent_client_moniker" , partner . getString ( "client_moniker" ) ) ;
} ) ;
clients . forEach ( e - > e . put ( "parent_client_moniker" , partner . getString ( "client_moniker" ) ) ) ;
}
}
}
@ -2123,48 +2115,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return clientMapper . listChildClients ( clientId ) ;
}
// @Override
// @Transactional
// public void newSubClient(String clientMoniker, SubClientRegistry registry, JSONObject manager) {
// JSONObject client = getClientInfoByMoniker(clientMoniker);
// if (client == null) {
// throw new InvalidShortIdException();
// }
// checkOrgPermission(manager, client);
// JSONObject subClient = registry.insertObject();
// client.put("parent_client_id", client.getIntValue("client_id"));
// //解决子商户不能编辑
// client.remove("client_id");
// client.remove("approve_result");
// client.remove("approver");
// client.remove("approve_time");
// client.remove("approve_email_id");
// client.remove("approve_email_send");
// client.putAll(subClient);
// client.put("create_time", new Date());
// client.put("credential_code", RandomStringUtils.random(32, true, true));
// client.put("creator", manager.getString("manager_id"));
// if (ManagerRole.OPERATOR.hasRole(manager.getIntValue("role"))) {
// client.put("approve_result", 1);
// client.put("approver", manager.getString("manager_id"));
// client.put("approve_time", new Date());
// }
// if (clientMapper.findClientByMoniker(registry.getClientMoniker()) != null) {
// throw new BadRequestException("error.partner.valid.dumplicate_client_moniker");
// }
// clientMapper.save(client);
//
// List<JSONObject> client_bds = listClientCurrentBDUsers(manager, clientMoniker);
// if (!client_bds.isEmpty() && client_bds.size() > 0) {
// for (JSONObject client_bd : client_bds) {
// client_bd.put("client_id", client.getIntValue("client_id"));
// client_bd.remove("client_bd_id");
// clientBDMapper.saveBD(client_bd);
// }
// }
//
//
// }
@Override
public void toggleAccountReceiveNoticeByOpenId ( String openid , boolean enable ) {
@ -2284,26 +2234,26 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if ( weChatRate = = null ) {
throw new BadRequestException ( "The Partner's Rate is not config!" ) ;
}
client . put ( "wechat_rate" , weChatRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "wechat_rate" , weChatRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
client . put ( "clean" , "T+" + weChatRate . getString ( "clean_days" ) ) ;
client . put ( "clean_days" , weChatRate . getString ( "clean_days" ) ) ;
String rateConfig = sysConfigManager . getSysConfig ( ) . getString ( "sys_rates" ) ;
JSONObject sysConfigRate = JSON Object . parseObject ( rateConfig ) ;
JSONObject sysConfigRate = JSON . parseObject ( rateConfig ) ;
try {
JSONObject alipayRate = merchantInfoProvider . clientCurrentRate ( client . getIntValue ( "client_id" ) , new Date ( ) , "Alipay" ) ;
if ( alipayRate ! = null ) {
client . put ( "alipay_rate" , alipayRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "alipay_rate" , alipayRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
}
JSONObject alipayOnlineRate = merchantInfoProvider . clientCurrentRate ( client . getIntValue ( "client_id" ) , new Date ( ) , "AlipayOnline" ) ;
if ( alipayOnlineRate ! = null ) {
client . put ( "alipay_online_rate" , alipayOnlineRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "alipay_online_rate" , alipayOnlineRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
}
JSONObject cbBankPayRate = merchantInfoProvider . clientCurrentRate ( client . getIntValue ( "client_id" ) , new Date ( ) , "CB_BankPay" ) ;
if ( cbBankPayRate ! = null ) {
client . put ( "cbbank_rate" , cbBankPayRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "cbbank_rate" , cbBankPayRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
}
} catch ( Exception ignored ) {
throw new BadRequestException ( "Merchant Rate Not Configure,Please Contact Customer Service" ) ;
@ -2373,14 +2323,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Transactional
public void updateBD ( String manager_id , JSONObject data , JSONObject client ) throws Exception {
String type = data . getString ( "type" ) . isEmpty ( ) ? "add" : data . getString ( "type" ) ;
List < JSONObject > users = ( List < JSONObject > ) data . get ( "users" ) ;
List < JSONObject > users = data . getJSONArray ( "users" ) . toJavaList ( JSONObject . class ) ;
JSONObject params = new JSONObject ( ) ;
params . put ( "client_id" , client . getIntValue ( "client_id" ) ) ;
params . put ( "end_date" , null ) ;
params . put ( "is_valid" , "1" ) ;
String start_date = DateFormatUtils . format ( data . getDate ( "start_date" ) , "yyyy-MM-dd" ) ;
List < JSONObject > listClientBDUsers = clientBDMapper . listClientDB ( params , new PageBounds ( Order . formString ( "create_time.desc" ) ) ) ;
if ( ! listClientBDUsers . isEmpty ( ) & & listClientBDUsers . size ( ) > 0 ) {
if ( ! listClientBDUsers . isEmpty ( ) ) {
JSONObject clientBDUser = listClientBDUsers . get ( 0 ) ;
clientBDUser . put ( "end_date" , start_date ) ;
if ( type . equals ( "add" ) & & ( clientBDUser . getDate ( "end_date" ) . getTime ( ) < clientBDUser . getDate ( "start_date" ) . getTime ( ) ) ) {
@ -2417,7 +2367,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
BDUserModify bdUserModify = new BDUserModify ( managerMapper . findById ( manager_id ) , client . getString ( "client_moniker" ) ,
bd_id . substring ( 0 , bd_id . length ( ) - 1 ) , bd_name . substring ( 0 , bd_name . length ( ) - 1 ) ) ;
if ( users . size ( ) > 0 ) {
if ( ! users . isEmpty ( ) ) {
String bd_manager_id = users . get ( 0 ) . getString ( "manager_id" ) ;
JSONObject manager = managerMapper . findById ( bd_manager_id ) ;
bdUserModify . setOrg_id ( manager . getIntValue ( "org_id" ) ) ;
@ -2455,9 +2405,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
public String getQrCodeBoard ( JSONObject client , QRCodeConfig config , JSONObject account , String plantform ) {
// JSONObject org = orgMapper.findOne(client.getIntValue("org_id"));
return merchantInfoProvider . getQrCodeBoard ( client , config ) ;
// return merchantInfoProvider.getQrCodeBoard(client, config,account,plantform);
}
@Override
@ -2680,9 +2628,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
queryModifyClientIds ( client . getIntValue ( "client_id" ) , params ) ;
}
List < JSONObject > deviceIds = clientDeviceMapper . listClientDeviceIds ( params ) ;
return new JSONObject ( ) { {
put ( "data" , deviceIds ) ;
} } ;
return JsonHelper . newJson ( json - > json . put ( "data" , deviceIds ) ) ;
}
@Override
@ -2889,7 +2835,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if ( rate = = null ) {
throw new BadRequestException ( "The Partner's Rate is not config!" ) ;
}
client . put ( "rate_value" , rate . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "rate_value" , rate . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
client . put ( "clean" , "T+" + rate . getString ( "clean_days" ) ) ;
client . put ( "clean_days" , rate . getString ( "clean_days" ) ) ;
JSONObject account = getBankAccountByClientId ( client . getIntValue ( "client_id" ) ) ;
@ -2908,17 +2854,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
PdfUtils pdu = new PdfUtils ( ) ;
pdu . setTemplatePdfPath ( agreetemplatePdfPath ) ;
pdu . setPdfTemplate ( client ) ;
InputStream stream = null ;
try {
File file = new File ( clientMoniker + "_agreement.pdf" ) ;
ByteArrayOutputStream bos = pdu . templetPdfBos ( file ) ;
stream = new ByteArrayInputStream ( bos . toByteArray ( ) ) ;
File file = new File ( clientMoniker + "_agreement.pdf" ) ;
try ( ByteArrayOutputStream bos = pdu . templetPdfBos ( file ) ;
InputStream stream = new ByteArrayInputStream ( bos . toByteArray ( ) ) ) {
JSONObject fileRes = attachmentClient . uploadFile ( stream , clientMoniker + "_agreement.pdf" , false ) ;
importAgreeFile ( clientMoniker , manager , fileRes . getString ( "url" ) , false ) ;
} catch ( Exception e ) {
logger . error ( "合同制作出现问题:" , e ) ;
} finally {
stream . close ( ) ;
}
}
@ -2947,18 +2889,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if ( weChatRate = = null ) {
throw new BadRequestException ( "The Partner's Rate is not config!" ) ;
}
client . put ( "wechat_rate" , weChatRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "wechat_rate" , weChatRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
client . put ( "clean" , "T+" + weChatRate . getString ( "clean_days" ) ) ;
client . put ( "clean_days" , weChatRate . getString ( "clean_days" ) ) ;
try {
JSONObject alipayRate = merchantInfoProvider . clientCurrentRate ( client . getIntValue ( "client_id" ) , new Date ( ) , "Alipay" ) ;
if ( alipayRate ! = null ) {
client . put ( "alipay_rate" , alipayRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "alipay_rate" , alipayRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
}
JSONObject alipayOnlineRate = merchantInfoProvider . clientCurrentRate ( client . getIntValue ( "client_id" ) , new Date ( ) , "AlipayOnline" ) ;
if ( alipayOnlineRate ! = null ) {
client . put ( "alipay_online_rate" , alipayOnlineRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "alipay_online_rate" , alipayOnlineRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
}
} catch ( Exception ignored ) {
// do nothing
@ -3055,13 +2997,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientRate . forEach ( ( p ) - > {
String rate_name = p . getString ( "rate_name" ) ;
if ( "Wechat" . equals ( rate_name ) ) {
client . put ( "wechat_rate" , p . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "wechat_rate" , p . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
client . put ( "clean" , "T+" + p . getString ( "clean_days" ) ) ;
client . put ( "clean_days" , p . getString ( "clean_days" ) ) ;
} else if ( "Alipay" . equals ( rate_name ) ) {
client . put ( "alipay_rate" , p . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "alipay_rate" , p . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
} else if ( "AlipayOnline" . equals ( rate_name ) ) {
client . put ( "alipay_online_rate" , p . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "alipay_online_rate" , p . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
}
} ) ;
@ -3126,19 +3068,19 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if ( weChatRate = = null ) {
throw new BadRequestException ( "The Partner's Rate is not config!" ) ;
}
client . put ( "wechat_rate" , weChatRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "wechat_rate" , weChatRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
client . put ( "clean" , "T+" + weChatRate . getString ( "clean_days" ) ) ;
client . put ( "clean_days" , weChatRate . getString ( "clean_days" ) ) ;
try {
JSONObject alipayRate = merchantInfoProvider . clientCurrentRate ( client . getIntValue ( "client_id" ) , new Date ( ) , "Alipay" ) ;
if ( alipayRate ! = null ) {
client . put ( "alipay_rate" , alipayRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "alipay_rate" , alipayRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
}
JSONObject alipayOnlineRate = merchantInfoProvider . clientCurrentRate ( client . getIntValue ( "client_id" ) , new Date ( ) , "AlipayOnline" ) ;
if ( alipayOnlineRate ! = null ) {
client . put ( "alipay_online_rate" , alipayOnlineRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "alipay_online_rate" , alipayOnlineRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
}
} catch ( Exception ignored ) {
// do nothing
@ -3258,7 +3200,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException ( ) ;
}
List < JSONObject > files = clientFilesMapper . findClientFile ( client . getIntValue ( "client_id" ) ) ;
if ( files ! = null & & files . size ( ) > 0 ) {
if ( files ! = null & & ! files . isEmpty ( ) ) {
List < String > filePaths = new ArrayList < > ( ) ;
for ( JSONObject file : files ) {
filePaths . add ( file . getString ( "file_value" ) ) ;
@ -3298,7 +3240,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException ( ) ;
}
List < JSONObject > files = clientMWAuthFilesInfo . findClientFile ( client . getIntValue ( "client_id" ) , new PageBounds ( 1 , 999999 , Order . formString ( "last_update_date.asc" ) ) ) ;
if ( files ! = null & & files . size ( ) > 0 ) {
if ( files ! = null & & ! files . isEmpty ( ) ) {
List < String > filePaths = new ArrayList < > ( ) ;
for ( JSONObject file : files ) {
filePaths . add ( file . getString ( "file_value" ) ) ;
@ -3549,7 +3491,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
fileJson . put ( file . getString ( "file_name" ) , file . getString ( "file_value" ) ) ;
}
String [ ] fileKeys = { "kyc_utility_bill_file" } ;
if ( clientFiles . size ( ) > 0 ) {
if ( ! clientFiles . isEmpty ( ) ) {
for ( String fileKey : fileKeys ) {
List < JSONObject > clientFileUrl = clientFiles . stream ( )
. filter ( json - > ( fileKey . equals ( json . getString ( "file_name" ) ) ) )
@ -3561,7 +3503,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return params ;
} )
. collect ( Collectors . toList ( ) ) ;
if ( clientFileUrl ! = null & & clientFileUrl . size ( ) > 0 ) {
if ( clientFileUrl ! = null & & ! clientFileUrl . isEmpty ( ) ) {
fileJson . put ( fileKey , clientFileUrl ) ;
}
}
@ -3609,7 +3551,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
List < JSONObject > clientFiles = clientFilesMapper . findClientFile ( client . getIntValue ( "client_id" ) ) ;
JSONObject fileJson = new JSONObject ( ) ;
if ( clientFiles ! = null & & clientFiles . size ( ) > 0 ) {
if ( clientFiles ! = null & & ! clientFiles . isEmpty ( ) ) {
for ( String fileKey : fileKeys ) {
List < JSONObject > clientFileUrl = clientFiles . stream ( )
. filter ( json - > ( fileKey . equals ( json . getString ( "file_name" ) ) ) )
@ -3621,7 +3563,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return params ;
} )
. collect ( Collectors . toList ( ) ) ;
if ( clientFileUrl ! = null & & clientFileUrl . size ( ) > 0 ) {
if ( clientFileUrl ! = null & & ! clientFileUrl . isEmpty ( ) ) {
fileJson . put ( fileKey , clientFileUrl ) ;
}
}
@ -3643,7 +3585,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
String [ ] fileKeys = UPayAuthFileEnum . ALL . getFileNameArrays ( ) ;
List < JSONObject > clientFiles = clientMWAuthFilesInfo . findClientFile ( client . getIntValue ( "client_id" ) , new PageBounds ( 1 , 999999 , Order . formString ( "last_update_date.asc" ) ) ) ;
JSONObject fileJson = new JSONObject ( ) ;
if ( clientFiles ! = null & & clientFiles . size ( ) > 0 ) {
if ( clientFiles ! = null & & ! clientFiles . isEmpty ( ) ) {
for ( String fileKey : fileKeys ) {
List < JSONObject > clientFileUrl = clientFiles . stream ( )
. filter ( json - > ( fileKey . equals ( json . getString ( "file_name" ) ) ) )
@ -3655,7 +3597,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return params ;
} )
. collect ( Collectors . toList ( ) ) ;
if ( clientFileUrl ! = null & & clientFileUrl . size ( ) > 0 ) {
if ( clientFileUrl ! = null & & ! clientFileUrl . isEmpty ( ) ) {
fileJson . put ( fileKey , clientFileUrl ) ;
}
}
@ -3674,7 +3616,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject fileJson = new JSONObject ( ) ;
JSONObject companyFile = clientComplianceCompanyMapper . findKycFileByClientId ( client . getIntValue ( "client_id" ) ) ;
fileJson . put ( "companyFile" , companyFile ) ;
if ( clientFiles ! = null & & clientFiles . size ( ) > 0 ) {
if ( clientFiles ! = null & & ! clientFiles . isEmpty ( ) ) {
for ( String fileKey : fileKeys ) {
List < JSONObject > clientFileUrl = clientFiles . stream ( )
. filter ( json - > ( fileKey . equals ( json . getString ( "file_name" ) ) ) )
@ -3686,7 +3628,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return params ;
} )
. collect ( Collectors . toList ( ) ) ;
if ( clientFileUrl ! = null & & clientFileUrl . size ( ) > 0 ) {
if ( clientFileUrl ! = null & & ! clientFileUrl . isEmpty ( ) ) {
fileJson . put ( fileKey , clientFileUrl ) ;
}
}
@ -3704,7 +3646,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
List < JSONObject > clientFiles = clientFilesMapper . findAllClientFile ( client . getIntValue ( "client_id" ) ) ;
JSONObject fileJson = new JSONObject ( ) ;
if ( clientFiles ! = null & & clientFiles . size ( ) > 0 ) {
if ( clientFiles ! = null & & ! clientFiles . isEmpty ( ) ) {
for ( String fileKey : fileKeys ) {
List < JSONObject > clientFileUrl = clientFiles . stream ( )
. filter ( json - > ( fileKey . equals ( json . getString ( "file_name" ) ) ) )
@ -3717,7 +3659,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return params ;
} )
. collect ( Collectors . toList ( ) ) ;
if ( clientFileUrl ! = null & & clientFileUrl . size ( ) > 0 ) {
if ( clientFileUrl ! = null & & ! clientFileUrl . isEmpty ( ) ) {
fileJson . put ( fileKey , clientFileUrl ) ;
}
}
@ -3929,7 +3871,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException ( ) ;
}
List < JSONObject > clientAllAuthFiles = clientFilesMapper . findAllClientFile ( client . getIntValue ( "client_id" ) ) ;
if ( clientAllAuthFiles = = null | | clientAllAuthFiles . size( ) = = 0 ) {
if ( clientAllAuthFiles = = null | | clientAllAuthFiles . isEmpty( ) ) {
throw new BadRequestException ( "Please check the information is uploaded completely" ) ;
}
String [ ] fileKeys = { "client_bank_file" , "client_company_file" , "client_id_file" , "client_agree_file" } ;
@ -4009,26 +3951,26 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if ( weChatRate = = null ) {
throw new BadRequestException ( "The Partner's Rate is not config!" ) ;
}
client . put ( "wechat_rate" , weChatRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "wechat_rate" , weChatRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
client . put ( "clean" , "T+" + weChatRate . getString ( "clean_days" ) ) ;
client . put ( "clean_days" , weChatRate . getString ( "clean_days" ) ) ;
String rateConfig = sysConfigManager . getSysConfig ( ) . getString ( "sys_rates" ) ;
JSONObject sysConfigRate = JSON Object . parseObject ( rateConfig ) ;
JSONObject sysConfigRate = JSON . parseObject ( rateConfig ) ;
try {
JSONObject alipayRate = merchantInfoProvider . clientCurrentRate ( client . getIntValue ( "client_id" ) , new Date ( ) , "Alipay" ) ;
if ( alipayRate ! = null ) {
client . put ( "alipay_rate" , alipayRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "alipay_rate" , alipayRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
}
JSONObject alipayOnlineRate = merchantInfoProvider . clientCurrentRate ( client . getIntValue ( "client_id" ) , new Date ( ) , "AlipayOnline" ) ;
if ( alipayOnlineRate ! = null ) {
client . put ( "alipay_online_rate" , alipayOnlineRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "alipay_online_rate" , alipayOnlineRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
}
JSONObject cbBankPayRate = merchantInfoProvider . clientCurrentRate ( client . getIntValue ( "client_id" ) , new Date ( ) , "CB_BankPay" ) ;
if ( cbBankPayRate ! = null ) {
client . put ( "cbbank_rate" , cbBankPayRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , BigDecimal. ROUND_ DOWN) ) ;
client . put ( "cbbank_rate" , cbBankPayRate . getBigDecimal ( "rate_value" ) . setScale ( 2 , RoundingMode. DOWN) ) ;
}
} catch ( Exception ignored ) {
throw new BadRequestException ( "Merchant Rate Not Configure,Please Contact Customer Service" ) ;
@ -4091,14 +4033,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
new PageBounds ( query . getPage ( ) , query . getLimit ( ) , Order . formString ( "clearing_time.desc" ) ) ) ;
JSONObject result = PageListUtils . buildPageListResult ( logs ) ;
if ( query . getPage ( ) = = 1 ) {
if ( ! logs . isEmpty ( ) & & logs . size ( ) > 0 ) {
if ( ! logs . isEmpty ( ) ) {
JSONObject clearingDetail = clearingDetailMapper . findByDetailId ( logs . get ( 0 ) . getIntValue ( "clear_detail_id" ) ) ;
if ( clearingDetail ! = null ) {
JSONObject clearingLog = clearingLogMapper . findById ( clearingDetail . getIntValue ( "clearing_id" ) ) ;
if ( clearingLog . getBooleanValue ( "editable" ) ) {
result . put ( "padding" , true ) ;
logs . get ( 0 ) . put ( "padding" , true ) ;
logger . info ( "##editable " + clearingLog . getBooleanValue ( "editable" ) ) ;
logger . info ( "##editable {}", clearingLog . getBooleanValue ( "editable" ) ) ;
}
}
}
@ -4146,7 +4088,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
for ( int i = 0 ; i < childs . size ( ) ; i + + ) {
params . put ( "client_id" , childs . get ( i ) . getInteger ( "client_id" ) ) ;
PageList < JSONObject > childLogs = transactionMapper . listSettlementLog ( params , new PageBounds ( query . getPage ( ) , 10000 , Order . formString ( "clearing_time.desc" ) ) ) ;
if ( childLogs . size ( ) > 0 ) {
if ( ! childLogs . isEmpty ( ) ) {
addSheet ( i + 1 , workbook , childs . get ( i ) , childLogs ) ;
}
}
@ -4244,9 +4186,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
HSSFRichTextString text0 = new HSSFRichTextString ( client . getString ( "short_name" ) ) ;
HSSFRichTextString text1 = new HSSFRichTextString ( client . getString ( "client_moniker" ) ) ;
HSSFRichTextString text2 = new HSSFRichTextString ( new SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss" ) . format ( dataItem . getDate ( "report_date" ) ) ) ;
HSSFRichTextString text3 = new HSSFRichTextString ( dataItem . getBigDecimal ( "total" ) . setScale ( 2 , BigDecimal. ROUND_ HALF_DOWN) . toString ( ) ) ;
HSSFRichTextString text4 = new HSSFRichTextString ( dataItem . getBigDecimal ( "income" ) . setScale ( 2 , BigDecimal. ROUND_ HALF_DOWN) . toString ( ) ) ;
HSSFRichTextString text5 = new HSSFRichTextString ( dataItem . getBigDecimal ( "fee" ) . setScale ( 2 , BigDecimal. ROUND_ HALF_DOWN) . toString ( ) ) ;
HSSFRichTextString text3 = new HSSFRichTextString ( dataItem . getBigDecimal ( "total" ) . setScale ( 2 , RoundingMode. HALF_DOWN) . toString ( ) ) ;
HSSFRichTextString text4 = new HSSFRichTextString ( dataItem . getBigDecimal ( "income" ) . setScale ( 2 , RoundingMode. HALF_DOWN) . toString ( ) ) ;
HSSFRichTextString text5 = new HSSFRichTextString ( dataItem . getBigDecimal ( "fee" ) . setScale ( 2 , RoundingMode. HALF_DOWN) . toString ( ) ) ;
cell0 . setCellValue ( text0 ) ;
cell1 . setCellValue ( text1 ) ;
cell2 . setCellValue ( text2 ) ;
@ -4391,11 +4333,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
public void updateAggregateFilesForWaitCompliance ( JSONObject manager , int clientId , String fileType , String fileValue , List < JSONObject > fileResult ) {
if ( fileValue ! = null ) {
List < JSONObject > passAggregateFiles = clientFilesMapper . findClientPassAggreeFile ( clientId ) ;
if ( passAggregateFiles ! = null & & passAggregateFiles . size ( ) > 0 ) {
if ( passAggregateFiles ! = null & & ! passAggregateFiles . isEmpty ( ) ) {
throw new BadRequestException ( "合同已提交或审核通过,请勿重复签订合同" ) ;
}
List < JSONObject > aggregateFiles = clientFilesMapper . findClientAggreeFileCommit ( clientId ) ;
if ( aggregateFiles ! = null & & aggregateFiles . size ( ) > 0 ) {
if ( aggregateFiles ! = null & & ! aggregateFiles . isEmpty ( ) ) {
clientFilesMapper . deleteAggreeByClientId ( clientId ) ;
}
String signatureAccountId = StringUtils . isNotBlank ( "account_id" ) ? manager . getString ( "account_id" ) : manager . getString ( "manager_id" ) ;
@ -4582,12 +4524,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
JSONObject cardFlowInfo = sysClientUpayProfileMapper . findInfo ( clientId ) ;
JSONObject cardFlow = new JSONObject ( ) { {
put( "client_id" , clientId ) ;
put( "upay_approve_result" , 4 ) ;
put( "upay_open_status" , 1 ) ;
put( "upay_approve_time" , new Date ( ) ) ;
} } ;
JSONObject cardFlow = JsonHelper . newJson ( json - > {
json. put( "client_id" , clientId ) ;
json. put( "upay_approve_result" , 4 ) ;
json. put( "upay_open_status" , 1 ) ;
json. put( "upay_approve_time" , new Date ( ) ) ;
} ) ;
sysClientUpayProfileMapper . update ( cardFlow ) ;
saveClientAuditProcess ( client . getIntValue ( "client_id" ) , null , 1 , "提交Card Payment Compliance制作合同" , manager , 2 ) ;
}
@ -5017,12 +4959,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
public void updateAppClient ( JSONObject account , int clientId , AppClientBean appClientBean ) {
JSONObject client = getClientInfo ( clientId ) ;
JSONObject updateObj = appClientBean . updateObject ( ) ;
if ( updateObj . size ( ) > 0 ) {
if ( ! updateObj . isEmpty ( ) ) {
updateObj . put ( "client_id" , clientId ) ;
clientMapper . update ( updateObj ) ;
}
JSONObject clientLegal = appClientBean . legalObject ( ) ;
if ( clientLegal . size ( ) > 0 ) {
if ( ! clientLegal . isEmpty ( ) ) {
clientLegal . put ( "client_id" , clientId ) ;
JSONObject oldClienetLegal = sysClientLegalPersonMapper . findRepresentativeInfo ( clientId ) ;
if ( oldClienetLegal = = null ) {
@ -5221,7 +5163,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private void sendMessagetoCompliance ( JSONObject client , String bd_user_name ) {
List < JSONObject > complianceList = managerMapper . getOnlyCompliance ( ) ;
if ( complianceList ! = null & & complianceList . size ( ) > 0 ) {
if ( complianceList ! = null & & ! complianceList . isEmpty ( ) ) {
for ( JSONObject compliance : complianceList ) {
String wxopenid = compliance . getString ( "wx_openid" ) ;
String loginUrl = PlatformEnvironment . getEnv ( ) . concatUrl ( "/global/userstatus/manager_signin_wechat" ) ;
@ -5313,7 +5255,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private void sendAgreeFileMsgtoCompliance ( JSONObject client , String bd_user_name ) {
List < JSONObject > complianceList = managerMapper . getOnlyCompliance ( ) ;
if ( complianceList ! = null & & complianceList . size ( ) > 0 ) {
if ( complianceList ! = null & & ! complianceList . isEmpty ( ) ) {
for ( JSONObject compliance : complianceList ) {
String wxopenid = compliance . getString ( "wx_openid" ) ;
String loginUrl = PlatformEnvironment . getEnv ( ) . concatUrl ( "/global/userstatus/manager_signin_wechat" ) ;
@ -5346,7 +5288,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private void sendGreenChannelMessagetoCompliance ( JSONObject client , String bd_user_name ) {
List < JSONObject > complianceList = managerMapper . getOnlyCompliance ( ) ;
if ( complianceList ! = null & & complianceList . size ( ) > 0 ) {
if ( complianceList ! = null & & ! complianceList . isEmpty ( ) ) {
for ( JSONObject compliance : complianceList ) {
String wxopenid = compliance . getString ( "wx_openid" ) ;
String loginUrl = PlatformEnvironment . getEnv ( ) . concatUrl ( "/global/userstatus/manager_signin_wechat" ) ;
@ -5424,7 +5366,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if ( client . getIntValue ( "open_status" ) = = 1 ) {
List < JSONObject > complianceList = managerMapper . getOnlyCompliance ( ) ;
if ( complianceList ! = null & & complianceList . size ( ) > 0 ) {
if ( complianceList ! = null & & ! complianceList . isEmpty ( ) ) {
for ( JSONObject compliance : complianceList ) {
String wxopenid = compliance . getString ( "wx_openid" ) ;
try {
@ -5465,7 +5407,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
bd_user_name = "自助开通商户" ;
}
List < JSONObject > complianceList = managerMapper . getOnlyCompliance ( ) ;
if ( complianceList ! = null & & complianceList . size ( ) > 0 ) {
if ( complianceList ! = null & & ! complianceList . isEmpty ( ) ) {
for ( JSONObject compliance : complianceList ) {
String wxopenid = compliance . getString ( "wx_openid" ) ;
try {
@ -5503,7 +5445,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if ( client . getIntValue ( "open_status" ) = = 10 ) {
List < JSONObject > complianceList = managerMapper . getOnlyCompliance ( ) ;
if ( complianceList ! = null & & complianceList . size ( ) > 0 ) {
if ( complianceList ! = null & & ! complianceList . isEmpty ( ) ) {
for ( JSONObject compliance : complianceList ) {
String wxopenid = compliance . getString ( "wx_openid" ) ;
try {
@ -5532,7 +5474,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
if ( cardFlowInfo . getIntValue ( "upay_open_status" ) = = 1 ) {
List < JSONObject > complianceList = managerMapper . getOnlyCompliance ( ) ;
if ( complianceList ! = null & & complianceList . size ( ) > 0 ) {
if ( complianceList ! = null & & ! complianceList . isEmpty ( ) ) {
for ( JSONObject compliance : complianceList ) {
String wxopenid = compliance . getString ( "wx_openid" ) ;
try {
@ -5573,7 +5515,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
bd_user_name = "自助开通商户" ;
}
List < JSONObject > complianceList = managerMapper . getOnlyCompliance ( ) ;
if ( complianceList ! = null & & complianceList . size ( ) > 0 ) {
if ( complianceList ! = null & & ! complianceList . isEmpty ( ) ) {
for ( JSONObject compliance : complianceList ) {
String wxopenid = compliance . getString ( "wx_openid" ) ;
try {
@ -5905,7 +5847,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
List < JSONObject > listByshortName = sysRpayMerchantApplyMapper . listByShortName ( merchantInfo . getString ( "company_shortname" ) ) ;
if ( listByshortName . size ( ) > 0 ) {
if ( ! listByshortName . isEmpty ( ) ) {
throw new BadRequestException ( "请修改【" + clientMoniker + "】的Company shortName信息( Short Name 已被使用)" ) ;
}
if ( client . getString ( "rpay_enterprise_id" ) ! = null ) {
@ -6555,7 +6497,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
String path = paymentConfig . getString ( "path" ) ;
path = path . replace All ( "app" , "pc" ) ;
path = path . replace ( "app" , "pc" ) ;
response . sendRedirect ( String . format ( PlatformEnvironment . getEnv ( ) . concatUrl ( path ) , clientMoniker ) ) ;
}
@ -6600,7 +6542,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
logger . error ( "合同制作出现问题:" , e ) ;
throw new BadRequestException ( "合同制作出现问题:" + e . getMessage ( ) ) ;
} finally {
stream . close ( ) ;
if ( stream ! = null ) {
try {
stream . close ( ) ;
} catch ( IOException e ) {
}
}
}
return result ;
}
@ -6684,10 +6631,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
incrementalChannels . remove ( "system" ) ;
return new JSONObject ( ) { {
put( "all_service" , service ) ;
put( "incremental_channel" , incrementalChannels ) ;
} } ;
return JsonHelper . newJson ( json - > {
json. put( "all_service" , service ) ;
json. put( "incremental_channel" , incrementalChannels ) ;
} ) ;
}
@Override
@ -6812,10 +6759,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
public JSONObject findByLookupCode ( String code ) {
JSONObject industryInfo = industryLookupMapper . findByLookupCode ( code ) ;
if ( industryInfo = = null ) {
return new JSONObject ( ) { {
put( "lookup_code" , "code" ) ;
put( "lookup_value" , "未知行业" ) ;
} } ;
return JsonHelper . newJson ( json - > {
json. put( "lookup_code" , "code" ) ;
json. put( "lookup_value" , "未知行业" ) ;
} ) ;
}
return industryInfo ;
}
@ -6900,10 +6847,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientIds . add ( p . getString ( "client_id" ) ) ;
if ( mchConfig . getBooleanValue ( "level3_mch_config" ) ) {
List < JSONObject > clients = clientMapper . listChildClients ( p . getIntValue ( "client_id" ) ) ;
if ( clients . size ( ) > 0 ) {
clients . forEach ( e - > {
clientIds . add ( e . getString ( "client_id" ) ) ;
} ) ;
if ( ! clients . isEmpty ( ) ) {
clients . forEach ( e - > clientIds . add ( e . getString ( "client_id" ) ) ) ;
}
}
} ) ;
@ -6961,7 +6906,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if ( client = = null ) {
throw new InvalidShortIdException ( ) ;
}
JSONObject extParmas = JSON Object . parseObject ( client . getString ( "ext_params" ) ) ;
JSONObject extParmas = JSON . parseObject ( client . getString ( "ext_params" ) ) ;
if ( "true" . equals ( params . getString ( "value" ) ) | | "false" . equals ( params . getString ( "value" ) ) ) {
extParmas . put ( params . getString ( "key" ) , params . getBoolean ( "value" ) ) ;
} else {
@ -7126,7 +7071,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
info . put ( "partner_bussiness_name" , client . getString ( "business_name" ) ) ; //商户商用名称
info . put ( "legal_bussiness" , legalInfo . getString ( "representative_person" ) + " AS " + ( client . containsKey ( "business_name" ) ? client . getString ( "business_name" ) : legalInfo . getString ( "representative_person" ) ) + " ABN " + client . getString ( "abn" ) ) ; //拼接规则:法人名 AS 商用名称 ABD 编码
info . put ( "domestic_fee" , cardRate . getString ( "domestic_rate_value" ) ) ; //国内服务费
info . put ( "international_fee" , upayProfileInfo . getBoolean ( "enable_international_card" ) ? cardRate . getString ( "overseas_rate_value" ) : "-" ) ; //国际服务费
info . put ( "international_fee" , upayProfileInfo . getBoolean Value ( "enable_international_card" ) ? cardRate . getString ( "overseas_rate_value" ) : "-" ) ; //国际服务费
info . put ( "promotional_effective_date" , formatter . print ( currentRate . getDate ( "active_time" ) . getTime ( ) ) ) ;
info . put ( "promotional_period" , formatter . print ( currentRate . getDate ( "expiry_time" ) . getTime ( ) ) ) ;
return info ;