@ -33,14 +33,20 @@ 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.financial.FinancialBDConfigMapper ;
import au.com.royalpay.payment.manage.mappers.log.* ;
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 ;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper ;
import au.com.royalpay.payment.manage.mappers.redpack.ActClientInvitationCodeMapper ;
import au.com.royalpay.payment.manage.mappers.risk.RiskAttentionMerchantsMapper ;
import au.com.royalpay.payment.manage.mappers.system.* ;
import au.com.royalpay.payment.manage.merchants.beans.* ;
import au.com.royalpay.payment.manage.merchants.core.* ;
import au.com.royalpay.payment.manage.merchants.core.ClientConfigService ;
import au.com.royalpay.payment.manage.merchants.core.ClientInfoCacheSupport ;
import au.com.royalpay.payment.manage.merchants.core.ClientManager ;
import au.com.royalpay.payment.manage.merchants.core.ClientModifySupport ;
import au.com.royalpay.payment.manage.merchants.entity.impls.* ;
import au.com.royalpay.payment.manage.merchants.enums.UPayAuthFileEnum ;
import au.com.royalpay.payment.manage.notice.core.MailService ;
@ -102,6 +108,9 @@ import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.CellStyle ;
import org.apache.poi.ss.usermodel.Font ;
import org.dom4j.Element ;
import org.joda.time.DateTime ;
import org.joda.time.format.DateTimeFormat ;
import org.joda.time.format.DateTimeFormatter ;
import org.slf4j.Logger ;
import org.slf4j.LoggerFactory ;
import org.springframework.beans.factory.annotation.Value ;
@ -109,13 +118,11 @@ import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable ;
import org.springframework.context.ApplicationEventPublisher ;
import org.springframework.context.ApplicationEventPublisherAware ;
import org.springframework.context.MessageSource ;
import org.springframework.data.mongodb.core.MongoTemplate ;
import org.springframework.data.redis.core.StringRedisTemplate ;
import org.springframework.stereotype.Service ;
import org.springframework.transaction.annotation.Transactional ;
import org.springframework.ui.Model ;
import org.springframework.util.Assert ;
import org.springframework.util.CollectionUtils ;
import org.springframework.web.bind.annotation.RequestMethod ;
import org.springframework.web.multipart.MultipartFile ;
@ -138,7 +145,6 @@ import java.security.InvalidParameterException;
import java.security.KeyPair ;
import java.security.interfaces.RSAPrivateKey ;
import java.security.interfaces.RSAPublicKey ;
import java.text.ParseException ;
import java.text.SimpleDateFormat ;
import java.util.List ;
import java.util.* ;
@ -195,16 +201,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource
private OrgMapper orgMapper ;
@Resource
private LogSettleMailMapper logSettleMailMapper ;
@Resource
private CommoditiesMapper commoditiesMapper ;
@Resource
private ActClientInvitationCodeMapper actClientInvitationCodeMapper ;
@Resource
private MailService mailService ;
// todo 作用
@Resource
private ClientComplyValidator [ ] validators ;
@Resource
private ClientModifySupport clientModifySupport ;
@ -260,8 +259,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource
private ClientContractService clientContractService ;
@Resource
private MessageSource messageSource ;
@Resource
private ClientsOperationLogMapper clientsOperationLogMapper ;
@Resource
private LogClientSubMerchantIdMapper logClientSubMerchantIdMapper ;
@ -321,6 +318,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private RPayMerchantMapper rPayMerchantMapper ;
@Resource
private SysClientUpayProfileMapper sysClientUpayProfileMapper ;
DateTimeFormatter formatter = DateTimeFormat . forPattern ( "dd MMM yyyy" ) ;
@Resource
@ -1310,73 +1308,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
@Override
public void sendOpenEmail ( final JSONObject client , String username , String pwd ) {
JSONObject model = new JSONObject ( ) ;
model . put ( "username" , username ) ;
model . put ( "password" , pwd ) ;
model . put ( "client_moniker" , client . getString ( "client_moniker" ) ) ;
model . put ( "contact_person" , client . getString ( "contact_person" ) ) ;
model . put ( "credential_code" , client . getString ( "credential_code" ) ) ;
List < JSONObject > bds = clientBDMapper . listClientBDInfoAvailable ( client . getIntValue ( "client_id" ) , new Date ( ) ) ;
// todo Velocity
Context ctx = new Context ( ) ;
ctx . setVariable ( "bds" , bds ) ;
ctx . setVariable ( "short_name" , client . getString ( "short_name" ) ) ;
ctx . setVariable ( "password" , pwd ) ;
ctx . setVariable ( "username" , username ) ;
ctx . setVariable ( "client_moniker" , client . getString ( "client_moniker" ) ) ;
ctx . setVariable ( "contact_person" , client . getString ( "contact_person" ) ) ;
ctx . setVariable ( "credential_code" , client . getString ( "credential_code" ) ) ;
final String content = thymeleaf . process ( "mail/new_client_notice" , ctx ) ;
// final String content = VelocityEngineUtils.mergeTemplateIntoString(null, "mail/new_client_notice.vm",
// "utf-8", model);
ctx . setVariable ( "password" , "*****" ) ;
final String contentBd = thymeleaf . process ( "mail/new_client_notice" , ctx ) ;
final List < String > mailTos = new ArrayList < > ( ) ;
String mailTo = client . getString ( "contact_email" ) ;
if ( StringUtils . isEmpty ( mailTo ) ) {
throw new EmailException ( "Client Contact Email is invalid" ) ;
}
mailTos . add ( mailTo ) ;
JSONObject clientLegal = sysClientLegalPersonMapper . findRepresentativeInfo ( client . getIntValue ( "client_id" ) ) ;
if ( clientLegal ! = null & & StringUtils . isNotBlank ( clientLegal . getString ( "email" ) ) ) {
mailTos . add ( clientLegal . getString ( "email" ) ) ;
}
final List < String > emails = new ArrayList < > ( ) ;
for ( JSONObject bd : bds ) {
String email = bd . getString ( "email" ) ;
if ( StringUtils . isNotEmpty ( email ) ) {
emails . add ( email ) ;
}
}
new Thread ( ) {
@Override
public void run ( ) {
try {
String emailId = mailService . sendEmail ( "Your RoyalPay Cross-border Payment has been set up" , StringUtils . join ( mailTos , "," ) , "" , content ) ;
mailService . sendEmail ( "Your RoyalPay Cross-border Payment has been set up" , emails . isEmpty ( ) ? "" : StringUtils . join ( emails , "," ) ,
"" , contentBd ) ;
JSONObject clientUpdate = new JSONObject ( ) ;
clientUpdate . put ( "client_id" , client . getIntValue ( "client_id" ) ) ;
clientUpdate . put ( "approve_email_send" , 3 ) ;
clientUpdate . put ( "approve_email_id" , emailId ) ;
clientMapper . update ( clientUpdate ) ;
} catch ( Exception e ) {
JSONObject clientUpdate = new JSONObject ( ) ;
clientUpdate . put ( "client_id" , client . getIntValue ( "client_id" ) ) ;
clientUpdate . put ( "approve_email_send" , 0 ) ;
clientUpdate . put ( "approve_email_id" , null ) ;
clientMapper . update ( clientUpdate ) ;
throw new EmailException ( "Email Sending Failed" , e ) ;
}
}
} . start ( ) ;
}
public void sendInitEmail ( final JSONObject client , String username , String pwd , boolean isUpayAuditPass ) {
logger . debug ( "sending email after comply" ) ;
JSONObject model = new JSONObject ( ) ;
@ -1386,7 +1317,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
model . put ( "contact_person" , client . getString ( "contact_person" ) ) ;
model . put ( "credential_code" , client . getString ( "credential_code" ) ) ;
List < JSONObject > bds = clientBDMapper . listClientBDInfoAvailable ( client . getIntValue ( "client_id" ) , new Date ( ) ) ;
// todo Velocity
Context ctx = new Context ( ) ;
ctx . setVariable ( "bds" , bds ) ;
ctx . setVariable ( "short_name" , client . getString ( "short_name" ) ) ;
@ -1395,10 +1325,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
ctx . setVariable ( "client_moniker" , client . getString ( "client_moniker" ) ) ;
ctx . setVariable ( "contact_person" , client . getString ( "contact_person" ) ) ;
ctx . setVariable ( "credential_code" , client . getString ( "credential_code" ) ) ;
ctx . setVariable ( "card_approving" , isUpayAuditPass ) ;
final String content = thymeleaf . process ( "mail/new_client_notice" , ctx ) ;
// final String content = VelocityEngineUtils.mergeTemplateIntoString(null, "mail/new_client_notice.vm",
// "utf-8", model);
ctx . setVariable ( "password" , "*****" ) ;
final String contentBd = thymeleaf . process ( "mail/new_client_notice" , ctx ) ;
final List < String > mailTos = new ArrayList < > ( ) ;
@ -1457,32 +1386,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} . start ( ) ;
}
/ * *
* public void sendInitEmail ( JSONObject account , final JSONObject client , String username , String pwd ) {
* logger . debug ( "sending email after comply" ) ; JSONObject model = new JSONObject ( ) ; model . put ( "username" , username ) ;
* model . put ( "password" , pwd ) ; model . put ( "client_moniker" , client . getString ( "client_moniker" ) ) ;
* model . put ( "contact_person" , client . getString ( "contact_person" ) ) ; model . put ( "credential_code" ,
* client . getString ( "credential_code" ) ) ; List < JSONObject > bds =
* clientBDMapper . listClientBDInfoAvailable ( client . getIntValue ( "client_id" ) , new Date ( ) ) ; // todo Velocity Context
* ctx = new Context ( ) ; ctx . setVariable ( "bds" , bds ) ; ctx . setVariable ( "password" , pwd ) ; ctx . setVariable ( "username" ,
* username ) ; ctx . setVariable ( "client_moniker" , client . getString ( "client_moniker" ) ) ;
* ctx . setVariable ( "contact_person" , client . getString ( "contact_person" ) ) ; ctx . setVariable ( "credential_code" ,
* client . getString ( "credential_code" ) ) ; ctx . setVariable ( "short_name" , client . getString ( "short_name" ) ) ; final String
* content = thymeleaf . process ( "mail/new_client_notice" , ctx ) ; // final String content =
* VelocityEngineUtils . mergeTemplateIntoString ( null , "mail/new_client_notice.vm" , // "utf-8", model); final String
* mailTo = client . getString ( "contact_email" ) ; if ( StringUtils . isEmpty ( mailTo ) ) { throw new EmailException ( " Client
* Contact Email is invalid " ) ; } final Set < String > emails = new HashSet < > ( ) ; for ( JSONObject bd : bds ) { String
* email = bd . getString ( "email" ) ; if ( StringUtils . isNotEmpty ( email ) ) { emails . add ( email ) ; } } new Thread ( ) {
*
* @Override public void run ( ) { try { SendMail sendMail = new SendMail ( ) ; Set < String > to = new HashSet < > ( ) ;
* to . add ( mailTo ) ; sendMail . setFrom ( "info@mail.royalpay.com.au" ) ; sendMail . setMailTos ( to ) ;
* sendMail . setMailCcs ( emails ) ; sendMail . setTitle ( "Your RoyalPay Cross-border Payment has been set up" ) ;
* sendMail . setContent ( content ) ; sendMail . setTags ( tags ) ; JSONObject mailResult =
* mailGunService . sendMail ( sendMail ) ; clientModifySupport . processClientModify ( new EmailModify ( account ,
* client . getString ( "client_moniker" ) , 3 , mailResult . getString ( "mail_id" ) ) ) ; } catch ( Exception e ) {
* clientModifySupport . processClientModify ( new EmailModify ( account , client . getString ( "client_moniker" ) , 0 ,
* null ) ) ; throw new EmailException ( "Email Sending Failed" , e ) ; } } } . start ( ) ; }
* /
public void sendAuthInitEmail ( JSONObject account , final JSONObject client ) {
logger . debug ( "sending email after comply about a new partner opening by quick access" ) ;
@ -1587,37 +1490,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
@Override
public void newCheckEmailStatus ( ) {
List < JSONObject > clients = clientMapper . listClientsWithEmailNotVerify ( ) ;
for ( JSONObject client : clients ) {
try {
String emailId = client . getString ( "approve_email_id" ) ;
JSONObject status = mailSendMapper . find ( emailId , client . getString ( "contact_email" ) ) ;
if ( status ! = null ) {
int statusNo = status . getIntValue ( "status" ) ;
logger . debug ( "get mail status:" + emailId + "--" + statusNo ) ;
int mailStatus = 3 ;
switch ( statusNo ) {
case 1 :
mailStatus = 1 ;
break ;
case 2 :
mailStatus = 2 ;
break ;
}
updateClientApproveEmailStatus ( mailStatus , null , client . getString ( "client_moniker" ) ) ;
} else {
logger . debug ( "get mail status:" + emailId + "-- none" ) ;
// updateClientApproveEmailStatus(client.getIntValue("client_id"), 0);
}
} catch ( Exception e ) {
logger . error ( "check email status failed" , e ) ;
}
}
}
@Override
public void switchPermission ( JSONObject manager , String clientMoniker , String permissionKey , boolean allow ) {
JSONObject client = getClientInfoByMoniker ( clientMoniker ) ;
@ -1740,7 +1612,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject account = clientAccountMapper . findById ( accountId ) ;
if ( clientMoniker ! = null ) {
JSONObject client = getClientInfoByMoniker ( clientMoniker ) ;
Assert . notNull ( client ) ;
//父商户全局管理子商户时候,跳过
if ( account . getIntValue ( "client_id" ) ! = client . getIntValue ( "client_id" ) ) {
//登录用户所属商户
@ -1863,7 +1734,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
public void togglePayNotice ( JSONObject account , String clientMoniker , boolean enable ) {
JSONObject partner = getClientInfoByMoniker ( clientMoniker ) ;
Assert . notNull ( partner ) ;
clientModifySupport . processClientConfigModify ( new SwitchPermissionModify ( account , clientMoniker , "enable_pay_notice" , enable ) ) ;
clientInfoCacheSupport . clearClientCache ( partner . getIntValue ( "client_id" ) ) ;
}
@ -2075,11 +1945,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
config . getDoubleValue ( "rate_value" ) , config . getInteger ( "clean_days" ) , channel ) . isEmpty ( ) ) {
return ;
}
List < JSONObject > existRate = clientRateMapper . listCurrentClientRates ( clientId , config . getDate ( "active_time" ) , channel ) ;
for ( JSONObject rateLog : existRate ) {
rateLog . put ( "expiry_time" , DateUtils . addDays ( config . getDate ( "active_time" ) , - 1 ) ) ;
clientRateMapper . updateConfig ( rateLog ) ;
}
if ( StringUtils . equalsIgnoreCase ( "rpaypmt_card" , config . getString ( "type" ) ) ) {
JSONObject extRateParams = new JSONObject ( ) { {
put ( "domestic_rate_value" , config . getBigDecimal ( "rate_value" ) ) ;
@ -3112,12 +2977,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
@Transactional
public void getAggregateCardPromotionaAgreeFile ( String clientMoniker , JSONObject manager , boolean renewal , String promotionalEffectiveDate, int promotionalPeriod ) throws ParseException {
public void getAggregateCardPromotionaAgreeFile ( String clientMoniker , JSONObject manager , boolean renewal , String rateid, HttpServletResponse httpResponse ) {
JSONObject client = clientMapper . findClientByMoniker ( clientMoniker ) ;
if ( client = = null ) {
throw new InvalidShortIdException ( ) ;
}
exportPromotionalOfferPDF ( clientMoniker , manager , promotionalEffectiveDate, promotionalPeriod ) ;
exportPromotionalOfferPDF ( clientMoniker , manager , rateid, httpResponse ) ;
}
@Override
@ -7137,7 +7002,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject legalInfo = sysClientLegalPersonMapper . findRepresentativeInfo ( clientId ) ;
//装在数据
JSONObject info = new JSONObject ( ) ;
info . put ( "down_date" , convertDateEnglish( new Dat e( ) ) ) ; //下载文件日期
info . put ( "down_date" , formatter. print ( new DateTim e( ) ) ) ; //下载文件日期
info . put ( "bussiness_name" , ( client . containsKey ( "business_name" ) ? client . getString ( "business_name" ) : legalInfo . getString ( "representative_person" ) ) + " " + client . getString ( "abn" ) ) ; //商圈类型
info . put ( "partner_address" , client . getString ( "address" ) ) ; //商家店铺地址
info . put ( "partner_country" , client . getString ( "country" ) ) ; //国家
@ -7149,7 +7014,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
info . put ( "annual_rate" , cardAnnualRate ) ; //年费率
info . put ( "cost_per_transaction" , clientRate . getString ( "transaction_fee" ) ) ; //每次交易成本
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 ( "enable_international_card" ) ? cardRate . getString ( "overseas_rate_value" ) : "-" ) ; //国际服务费
BigDecimal reserve = ( upayProfileInfo . getBigDecimal ( "expected_card_revenue" ) . multiply ( new BigDecimal ( 0.005 ) ) . setScale ( 0 , RoundingMode . HALF_UP ) ) ;
info . put ( "account_reserve" , reserve . compareTo ( new BigDecimal ( 200 ) ) < = 0 ? new BigDecimal ( 200 ) . toPlainString ( ) : reserve . toPlainString ( ) ) ; //账户储备金
//银行账号信息
@ -7160,15 +7025,25 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return info ;
}
private void exportPromotionalOfferPDF ( String clientMoniker , JSONObject manager , String promotionalEffectiveDate , int promotionalPeriod ) throws ParseException {
Date date = DateUtils . parseDate ( promotionalEffectiveDate , "yyyy-MM-dd" ) ;
JSONObject info = convertPromotionalOfferInfo ( clientMoniker , convertDateEnglish ( date ) , promotionalPeriod ) ;
String pdfPath = this . getClass ( ) . getClassLoader ( ) . getResource ( "" ) . getPath ( ) + "/templates/pdf/promotional_offer.pdf" ;
private void exportPromotionalOfferPDF ( String clientMoniker , JSONObject manager , String rateid , HttpServletResponse httpResponse ) {
httpResponse . setContentType ( "application/pdf" ) ;
httpResponse . setHeader ( "content-disposition" , "attachment;filename=" + clientMoniker + "_PROMOTIONAL_OFFER_" + new Date ( ) + ".pdf" ) ;
JSONObject info = convertPromotionalOfferInfo ( clientMoniker , rateid ) ;
String pdfPath = Objects . requireNonNull ( this . getClass ( ) . getClassLoader ( ) . getResource ( "" ) ) . getPath ( ) + "templates/pdf/promotional_offer.pdf" ;
String fileName = clientMoniker + "_Promotional_Offer.pdf" ;
publishExcelCardPDFFile ( clientMoniker , manager , fileName , pdfPath , info , PROMOTIONAL_OFFER_FILE ) ;
try ( ServletOutputStream sos = httpResponse . getOutputStream ( ) ) {
File file = new File ( fileName ) ;
PdfUtils pdu = new PdfUtils ( ) ;
pdu . setTemplatePdfPath ( pdfPath ) ;
pdu . setPdfTemplate ( info ) ;
ByteArrayOutputStream bos = pdu . templetPdfBos ( file ) ;
sos . write ( bos . toByteArray ( ) ) ;
} catch ( Exception e ) {
throw new ServerErrorException ( ) ;
}
}
private JSONObject convertPromotionalOfferInfo ( String clientMoniker , String promotionalEffectiveDate , int promotionalPeriod ) {
private JSONObject convertPromotionalOfferInfo ( String clientMoniker , String rateid) {
JSONObject client = getClientInfoByMoniker ( clientMoniker ) ;
if ( client = = null ) {
throw new InvalidShortIdException ( ) ;
@ -7178,16 +7053,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException ( "The merchant failed the audit!" ) ;
}
int clientId = client . getInteger ( "client_id" ) ;
JSONObject c lientRate = merchantInfoProvider . clientCurrentRate ( clientId , new Date ( ) , "rpaypmt_card" ) ;
if ( c li entRate = = null ) {
JSONObject c urrentRate = clientRateMapper . findRateByRateId ( rateid ) ;
if ( c urr entRate = = null ) {
throw new BadRequestException ( "rpaypmt_card rate Not configured" ) ;
}
JSONObject cardRate = c li entRate. getJSONObject ( "ext_rates" ) ;
JSONObject cardRate = c urr entRate. getJSONObject ( "ext_rates" ) ;
JSONObject legalInfo = sysClientLegalPersonMapper . findRepresentativeInfo ( clientId ) ;
JSONObject upayProfileInfo = sysClientUpayProfileMapper . findInfo ( clientId ) ;
JSONObject info = new JSONObject ( ) ;
info . put ( "down_date" , convertDateEnglish( new Dat e( ) ) ) ; //下载文件日期
info . put ( "down_date" , formatter. print ( new DateTim e( ) ) ) ; //下载文件日期
info . put ( "bussiness_name" , ( client . containsKey ( "business_name" ) ? client . getString ( "business_name" ) : legalInfo . getString ( "representative_person" ) ) + " " + client . getString ( "abn" ) ) ; //商圈类型
info . put ( "partner_address" , client . getString ( "address" ) ) ; //商家店铺地址
info . put ( "partner_country" , client . getString ( "country" ) ) ; //国家
@ -7195,9 +7069,9 @@ 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 ( "promotional_effective_date" , promotionalEffectiveDate ) ;
info . put ( "promotional_period" , promotionalPeriod ) ;
info . put ( "international_fee" , upayProfileInfo . getBoolean ( "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 ;
}
@ -7236,16 +7110,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
private String convertDateEnglish ( Date date ) {
String [ ] months = { "Jan" , "Feb" , "Mar" , "Apr" , "May" , "Jun" , "Jul" , "Aug" , "Spt" , "Oct" , "Nov" , "Dec" } ;
Calendar calendar = Calendar . getInstance ( ) ;
calendar . setTime ( date ) ;
int year = calendar . get ( Calendar . YEAR ) ;
int month = calendar . get ( Calendar . MONTH ) ;
int day = calendar . get ( Calendar . DAY_OF_MONTH ) ;
return day + " " + months [ month ] + " " + year ;
}
private void importCardAgreeFile ( String clientMoniker , JSONObject manager , String sourceFile , String fileLabel ) {
JSONObject client = getClientInfoByMoniker ( clientMoniker ) ;
if ( client = = null ) {