|
|
|
@ -6329,41 +6329,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional
|
|
|
|
|
public void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject client) {
|
|
|
|
|
int client_id = client.getIntValue("client_id");
|
|
|
|
|
List<JSONObject> adminAccounts = clientAccountMapper.listAdminAccounts(client_id);
|
|
|
|
|
List<JSONObject> clientRates = clientRateMapper.maxChannelExpiryTime(client_id, null);
|
|
|
|
|
JSONObject wechatRate = clientRateMapper.latestChannelCleanDays("Wechat", client.getIntValue("client_id"));
|
|
|
|
|
int cleanDays = 1;
|
|
|
|
|
if (wechatRate.getInteger("clean_days") != null) {
|
|
|
|
|
cleanDays = wechatRate.getIntValue("clean_days");
|
|
|
|
|
} else {
|
|
|
|
|
cleanDays = wechatRate.getIntValue("c_clean_days");
|
|
|
|
|
}
|
|
|
|
|
int finalCleanDays = cleanDays;
|
|
|
|
|
for (JSONObject o : clientRates) {
|
|
|
|
|
JSONObject record = clientRateMapper.latestExpiryConfig(client_id, o.getString("rate_name"));
|
|
|
|
|
record.remove("client_rate_id");
|
|
|
|
|
record.put("active_time", now);
|
|
|
|
|
record.put("manager_id", 0);
|
|
|
|
|
record.put("expiry_time", yearTomorrow);
|
|
|
|
|
record.put("create_time", now);
|
|
|
|
|
record.put("update_time", now);
|
|
|
|
|
record.put("clean_days", finalCleanDays);
|
|
|
|
|
record.put("manager_name", "System");
|
|
|
|
|
record.put("remark", "费率到期系统自动延期1年");
|
|
|
|
|
clientRateMapper.saveRate(record);
|
|
|
|
|
// if ("Rpay".equals(o.getString("rate_name"))) {
|
|
|
|
|
// rpayApi.modifySurchargeConfig(clientMapper.findClient(client_id));
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
adminAccounts.forEach(o -> {
|
|
|
|
|
sendClientPostponeNotify(o, expireDate);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<JSONObject> getClientBySimpleQuery(JSONObject param) {
|
|
|
|
|
String subMerchantId = param.getString("sub_merchant_id");
|
|
|
|
@ -6380,14 +6345,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
for (String channel : channels) {
|
|
|
|
|
clientRateMapper.postponeMerchantRateByClientId(clientId, channel);
|
|
|
|
|
}
|
|
|
|
|
List<JSONObject> adminAccounts = clientAccountMapper.listAdminAccounts(clientId);
|
|
|
|
|
adminAccounts.forEach(o -> {
|
|
|
|
|
sendClientPostponeNotify(o, nextYearExipryDate);
|
|
|
|
|
});
|
|
|
|
|
// List<JSONObject> adminAccounts = clientAccountMapper.listAdminAccounts(clientId);
|
|
|
|
|
// adminAccounts.forEach(o -> sendClientPostponeNotify(o, nextYearExipryDate));
|
|
|
|
|
logger.error("[{}]费率自动延期成功", clientMoniker);
|
|
|
|
|
return true;
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("[{}]费率自动延期失败", clientMoniker);
|
|
|
|
|
logger.error("[{}]费率自动延期失败", clientMoniker, e);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|