|
|
|
@ -46,6 +46,7 @@ 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.ApproveEmailModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.AuditModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.BDUserModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.ClearDaysModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.CredentialCodeModify;
|
|
|
|
@ -53,15 +54,12 @@ import au.com.royalpay.payment.manage.merchants.entity.impls.CustomerSurchargeRa
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.DisableModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.EmailModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.GreenChannelModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.LogoModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.MaxOrderAmountModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.MerchantIdModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.OpenStatusModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.OrderExpiryModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.ParentIdModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.PaypadVersionModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.RefundAuditModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.AuditModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.RefundPWDModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.SettleHourModify;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.entity.impls.SwitchPermissionModify;
|
|
|
|
@ -548,6 +546,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
clientMapper.save(partner);
|
|
|
|
|
JSONObject clientConfig = new JSONObject();
|
|
|
|
|
clientConfig.put("client_id",partner.getIntValue("client_id"));
|
|
|
|
|
clientConfig.put("client_moniker",partner.getString("client_moniker"));
|
|
|
|
|
clientConfigService.save(clientConfig);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw new BadRequestException("error.partner.valid.dumplicate_client_moniker");
|
|
|
|
@ -581,19 +580,21 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
|
Assert.notNull(client);
|
|
|
|
|
checkOrgPermission(manager, client);
|
|
|
|
|
JSONObject updateInfo = info.updateObject();
|
|
|
|
|
|
|
|
|
|
int clientId = client.getIntValue("client_id");
|
|
|
|
|
LogoModify clientModify = new LogoModify(manager, clientMoniker, null, null);
|
|
|
|
|
List<JSONObject> clients = clientMapper.listChildClients(clientId);
|
|
|
|
|
if (StringUtils.isNotEmpty(info.getLogoId())) {
|
|
|
|
|
String fileUrl = attachmentClient.getFileUrl(info.getLogoId());
|
|
|
|
|
clientModify.setLogo_url(fileUrl);
|
|
|
|
|
updateInfo.put("logo_url", fileUrl);
|
|
|
|
|
String thumbnail = attachmentClient.getThumbnail(info.getLogoId(), 600).getString("url");
|
|
|
|
|
clientModify.setLogo_thumbnail(thumbnail);
|
|
|
|
|
updateInfo.put("logo_thumbnail", thumbnail);
|
|
|
|
|
for (JSONObject subClient : clients) {
|
|
|
|
|
subClient.put("logo_url", fileUrl);
|
|
|
|
|
subClient.put("logo_thumbnail", thumbnail);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
updateInfo.put("client_id", clientId);
|
|
|
|
|
|
|
|
|
|
int originReferrerId = client.getIntValue("referrer_id");
|
|
|
|
|
int updateReferrerId = Integer.parseInt(info.getReferrer_id() == null ? "0" : info.getReferrer_id());
|
|
|
|
@ -605,7 +606,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
clientBDMapper.update(clientBDInfo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
clientModifySupport.processClientModify(clientModify);
|
|
|
|
|
clientMapper.update(updateInfo);
|
|
|
|
|
clientInfoCacheSupport.clearClientCache(clientId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -1227,7 +1229,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
}
|
|
|
|
|
checkOrgPermission(manager, client);
|
|
|
|
|
clientModifySupport.processClientModify(new SettleHourModify(manager, clientMoniker, hour));
|
|
|
|
|
clientModifySupport.processClientConfigModify(new SettleHourModify(manager, clientMoniker, hour));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|