master
kira 6 years ago
parent d6c53c115b
commit 3a7241360f

@ -341,5 +341,5 @@ public interface ClientManager {
void updateAllPartnerPassword(String clientMoniker, List<String> emails);
void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject p, StringBuilder sb);
void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject client);
}

@ -3998,11 +3998,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
@Transactional
public void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject p, StringBuilder sb) {
int client_id = p.getIntValue("client_id");
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", p.getIntValue("client_id"));
JSONObject wechatRate = clientRateMapper.latestChannelCleanDays("Wechat", client.getIntValue("client_id"));
int cleanDays = 1;
if (wechatRate.getInteger("clean_days") != null) {
cleanDays = wechatRate.getIntValue("clean_days");
@ -4027,12 +4027,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(null, p.getString("client_moniker"), "tax_in_surcharge", false));
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(null, client.getString("client_moniker"), "tax_in_surcharge", false));
adminAccounts.forEach(o -> {
sendClientPostponeNotify(o, expireDate);
});
sb.append(p.getString("client_moniker"));
sb.append("、");
}

@ -55,11 +55,13 @@ public class PostponeClientTask {
if (CollectionUtils.isEmpty(expiryClient)) {
return;
}
for (JSONObject p : expiryClient) {
for (JSONObject client : expiryClient) {
try {
clientManager.postponeClientRate(now, yearTomorrow, expireDate, p, sb);
clientManager.postponeClientRate(now, yearTomorrow, expireDate, client);
sb.append(client.getString("client_moniker"));
sb.append("、");
} catch (Exception ignore) {
logger.info("a",ignore);
continue;
}
}
sb.deleteCharAt(sb.length() - 1);

@ -10,9 +10,9 @@ import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
@SpringBootTest
@ActiveProfiles({ "local", "alipay", "wechat", "jd", "bestpay" })
@RunWith(SpringRunner.class)
@SpringBootTest
@ActiveProfiles({ "local","rpay", "alipay", "wechat", "jd", "bestpay" })
@RunWith(SpringRunner.class)
public class PostponeClientTaskTest {
@Resource
private ClientRateMapper clientRateMapper;

Loading…
Cancel
Save