master
wangning 7 years ago
parent ef8a137f1e
commit 67b311743d

@ -294,4 +294,6 @@ public interface ClientManager {
void applyToCompliance(String client_moniker, JSONObject account);
void sendVerifyEmail(JSONObject client,String accountId);
JSONObject getWithConfig(int client_id);
}

@ -3451,4 +3451,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
Assert.notNull(clientAccount);
simpleClientApplyService.sendVerifyEmail(client.getString("contact_email"),client.getIntValue("client_id"),clientAccount.getString("username"));
}
@Override
public JSONObject getWithConfig(int client_id) {
JSONObject clientWithConfig = getClientInfo(client_id);
clientWithConfig.putAll(clientConfigService.find(client_id));
return clientWithConfig;
}
}

@ -5,6 +5,7 @@ import au.com.royalpay.payment.manage.mappers.payment.TaskManualSettleMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.system.CalendarMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.settlement.core.ManualSettleSupport;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
@ -45,6 +46,8 @@ public class ManualSettleSupportImpl implements ManualSettleSupport {
private ClientAccountMapper clientAccountMapper;
@Resource
private CalendarMapper calendarMapper;
@Resource
private ClientManager clientManager;
@Override
public JSONObject requestManualSettle(Date settleTo, String accountId) {
@ -76,7 +79,7 @@ public class ManualSettleSupportImpl implements ManualSettleSupport {
@Override
public JSONObject findCurrentSettle(int clientId, boolean includingUnsettleData) {
JSONObject client = merchantInfoProvider.getClientInfo(clientId);
JSONObject client = clientManager.getWithConfig(clientId);
if (!client.getBooleanValue("manual_settle")) {
throw new ForbiddenException("Manual Settlement Not Enabled");
}

Loading…
Cancel
Save