|
|
|
@ -1,6 +1,5 @@
|
|
|
|
|
package au.com.royalpay.payment.manage.merchants.entity;
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.MerchantSignInfoMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.beans.mongo.ClientConfigLog;
|
|
|
|
|
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
|
|
|
@ -34,9 +33,9 @@ public abstract class ClientGatewaySignModify {
|
|
|
|
|
protected abstract JSONObject getModifyResult();
|
|
|
|
|
|
|
|
|
|
@Transactional
|
|
|
|
|
public int doModify(MerchantInfoProvider merchantInfoProvider,MerchantSignInfoMapper merchantSignInfoMapper, MongoTemplate mongoTemplate) {
|
|
|
|
|
public int doModify(MerchantInfoProvider merchantInfoProvider, MerchantSignInfoMapper merchantSignInfoMapper, MongoTemplate mongoTemplate) {
|
|
|
|
|
JSONObject client = merchantInfoProvider.getClientInfoByMoniker(clientMoniker);
|
|
|
|
|
JSONObject clientGatewaySign = merchantSignInfoMapper.findClientSign(client.getIntValue("client_id"));
|
|
|
|
|
JSONObject clientGatewaySign = merchantSignInfoMapper.findClientSign(clientMoniker);
|
|
|
|
|
JSONObject modifyResult = getModifyResult();
|
|
|
|
|
try {
|
|
|
|
|
saveModifyHistory(clientGatewaySign, modifyResult, mongoTemplate);
|
|
|
|
@ -44,7 +43,7 @@ public abstract class ClientGatewaySignModify {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
int clientId = client.getIntValue("client_id");
|
|
|
|
|
modifyResult.put("client_id", clientId);
|
|
|
|
|
modifyResult.put("client_moniker", clientMoniker);
|
|
|
|
|
modifyResult.put("last_update_by", account.getString("account_id"));
|
|
|
|
|
modifyResult.put("last_update_date", new Date());
|
|
|
|
|
merchantSignInfoMapper.update(modifyResult);
|
|
|
|
|