|
|
|
@ -262,6 +262,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
private ClearingDetailMapper clearingDetailMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private ClearingLogMapper clearingLogMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private ClientConfigMapper clientConfigMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final String SOURCE_AGREE_FILE = "source_agree_file";
|
|
|
|
@ -3666,6 +3669,30 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
mailService.removeUnsub(sub.getLong("id"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void switchHfLink(JSONObject manager, String clientMoniker, boolean allow) {
|
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
}
|
|
|
|
|
checkOrgPermission(manager, client);
|
|
|
|
|
|
|
|
|
|
if(allow){
|
|
|
|
|
if(StringUtils.isEmpty(client.getString("hf_pay_url"))){
|
|
|
|
|
String hf_pay_url = getShortLink(clientMoniker);
|
|
|
|
|
client.put("hf_pay_url",hf_pay_url);
|
|
|
|
|
JSONObject clientConfig = new JSONObject();
|
|
|
|
|
clientConfig.put("hf_pay_url",hf_pay_url);
|
|
|
|
|
clientConfig.put("client_id",client.getIntValue("client_id"));
|
|
|
|
|
clientConfigMapper.update(clientConfig);
|
|
|
|
|
clientMapper.update(client);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "enable_link", allow));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String getShortLink(String client_moniker){
|
|
|
|
|
String longUrl = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/hf_gateway/partners/"+client_moniker+"/jump");
|
|
|
|
|