|
|
|
@ -4,6 +4,7 @@ import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
|
|
|
|
|
import au.com.royalpay.payment.manage.riskbusiness.bean.RiskEventQuery;
|
|
|
|
|
import au.com.royalpay.payment.manage.riskbusiness.core.RiskBusinessService;
|
|
|
|
|
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskResultTypeEnum;
|
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
@ -99,6 +100,9 @@ public class RiskBusinessController {
|
|
|
|
|
@PathVariable("channel") String channel,
|
|
|
|
|
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
|
clientManager.switchChannelPermission(manager, params.getString("client_moniker"), channel, channelFlag);
|
|
|
|
|
|
|
|
|
|
if (channelFlag)
|
|
|
|
|
params.put("result_type", RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
|
|
|
|
|
riskBusinessService.updateRiskEvent(params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -107,10 +111,17 @@ public class RiskBusinessController {
|
|
|
|
|
@PathVariable("isValid") Boolean isValid,
|
|
|
|
|
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
|
String clientMoniker = params.getString("client_moniker");
|
|
|
|
|
if (isValid)
|
|
|
|
|
if (isValid) {
|
|
|
|
|
clientManager.disableClient(clientMoniker, manager);
|
|
|
|
|
else
|
|
|
|
|
Integer temporaryCloseMerchant = params.getInteger("temporary_close_merchant");
|
|
|
|
|
if (temporaryCloseMerchant != 1) {
|
|
|
|
|
params.put("result_type", RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
clientManager.revertClient(clientMoniker, manager);
|
|
|
|
|
params.put("result_type", RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
|
|
|
|
|
}
|
|
|
|
|
riskBusinessService.updateRiskEvent(params);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|