fixbug contract greenchannel

master
wangning 7 years ago
parent 1fe41d5421
commit 8943d91097

@ -37,27 +37,6 @@ import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import au.com.royalpay.payment.manage.merchants.beans.SubMerchantIdApply;
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientApplyMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientAuditProcessMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientBDMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientDeviceMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientFilesMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
import au.com.royalpay.payment.manage.mappers.system.CommoditiesMapper;
import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
import au.com.royalpay.payment.manage.mappers.system.SysWxMerchantApplyMapper;
import au.com.royalpay.payment.manage.merchants.beans.ActivityPosterBuilder;
import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientRateConfig;
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import au.com.royalpay.payment.manage.merchants.beans.SubMerchantIdApply;
import au.com.royalpay.payment.manage.merchants.core.ClientComplyValidator;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.notice.core.MailService;
@ -3172,7 +3151,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
result.put("contract_info", messageSource.getMessage("sys.contract.info", null, RequestEnvironment.getLocale()));
}
JSONObject file = clientContractService.getOrGenerateSourceAgreement(account.getIntValue("client_id"),"pc");
result.put("file_url", file.getString("file_value"));
if(file!=null){
result.put("file_url", file.getString("file_value"));
}else {
result.put("file_url","");
}
return result;
}

@ -64,13 +64,16 @@ public class ClientContractServiceImpl implements ClientContractService {
return files.get(0);
} else {
List<JSONObject> files = clientFilesMapper.findFileByClientAndType(client_id, "source_agree_file");
JSONObject file = files.get(0);
if (expireInfo.getBoolean("rate_expire")) {
contract.put("create_time", now);
contract.put("expiry_date", DateUtils.addYears(now, 1));
clientsContractMapper.update(contract);
if(!CollectionUtils.isEmpty(files)) {
JSONObject file = files.get(0);
if (expireInfo.getBoolean("rate_expire")) {
contract.put("create_time", now);
contract.put("expiry_date", DateUtils.addYears(now, 1));
clientsContractMapper.update(contract);
}
return file;
}
return file;
return null;
}
}

Loading…
Cancel
Save