|
|
@ -25,6 +25,8 @@ import au.com.royalpay.payment.manage.mappers.system.CustomerMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ManagerCustomerRelationAlipayMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ManagerCustomerRelationAlipayMapper;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientConfigService;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientConfigService;
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
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.SwitchPermissionModify;
|
|
|
|
import au.com.royalpay.payment.manage.notice.beans.NoticeInfo;
|
|
|
|
import au.com.royalpay.payment.manage.notice.beans.NoticeInfo;
|
|
|
|
import au.com.royalpay.payment.manage.notice.core.NoticeManage;
|
|
|
|
import au.com.royalpay.payment.manage.notice.core.NoticeManage;
|
|
|
|
import au.com.royalpay.payment.manage.notice.core.NoticePartner;
|
|
|
|
import au.com.royalpay.payment.manage.notice.core.NoticePartner;
|
|
|
@ -43,6 +45,7 @@ import au.com.royalpay.payment.tools.device.support.DeviceRegister;
|
|
|
|
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
|
|
|
|
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
|
|
|
|
import au.com.royalpay.payment.tools.locale.LocaleSupport;
|
|
|
|
import au.com.royalpay.payment.tools.locale.LocaleSupport;
|
|
|
|
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
|
|
|
|
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
|
|
|
@ -156,6 +159,8 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
private CleanService cleanService;
|
|
|
|
private CleanService cleanService;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ClientConfigService clientConfigService;
|
|
|
|
private ClientConfigService clientConfigService;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private ClientModifySupport clientModifySupport;
|
|
|
|
private Map<String, AppMsgSender> senderMap = new HashMap<>();
|
|
|
|
private Map<String, AppMsgSender> senderMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
@ -262,8 +267,20 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void changeSurchargeEnable(JSONObject device, UpdateSurchargeDTO updateSurchargeDTO) {
|
|
|
|
public void changeSurchargeEnable(JSONObject device, UpdateSurchargeDTO updateSurchargeDTO) {
|
|
|
|
|
|
|
|
JSONObject client = clientManager.getClientInfo(device.getIntValue("client_id"));
|
|
|
|
merchantInfoProvider.changeSurchargeEnable(device,updateSurchargeDTO);
|
|
|
|
if (client == null) {
|
|
|
|
|
|
|
|
throw new NotFoundException("Client not found, please check");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
JSONObject account = clientAccountMapper.findById(device.getString("account_id"));
|
|
|
|
|
|
|
|
if (updateSurchargeDTO.getApiSurcharge() != null) {
|
|
|
|
|
|
|
|
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account,client.getString("client_moniker"),"api_surcharge",updateSurchargeDTO.getApiSurcharge()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (updateSurchargeDTO.getQrcodeSurcharge() != null) {
|
|
|
|
|
|
|
|
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account,client.getString("client_moniker"),"qrcode_surcharge",updateSurchargeDTO.getQrcodeSurcharge()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (updateSurchargeDTO.getRetailSurcharge() != null) {
|
|
|
|
|
|
|
|
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account,client.getString("client_moniker"),"retail_surcharge",updateSurchargeDTO.getRetailSurcharge()));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|