提交 aa12116b authored 作者: jiangwenye's avatar jiangwenye

平台账户配置

上级 f8fe47f4
......@@ -115,7 +115,9 @@ public enum PerformanceResultEnum implements ResultEnum {
PLATFORM_ACCOUNT_CONFIG_ONLY(1913, "当前配置已存在"),
PLATFORM_ACCOUNT_CONFIG_WITHDRAWAL_IS_NULL(1914, "提现平台账户未配置"),
PLATFORM_ACCOUNT_CONFIG_WITHDRAWAL_MANY(1915, "提现平台账户配置多个"),
PLATFORM_ACCOUNT_CONFIG_WITHDRAWAL_MANY(1915, "提现平台账户配置不唯一"),
PLATFORM_ACCOUNT_CONFIG_RECHARGE_IS_NULL(1916, "充值平台账户未配置"),
PLATFORM_ACCOUNT_CONFIG_RECHARGE_MANY(1917, "充值平台账户配置不唯一"),
;
private final int code;
private final String msg;
......
......@@ -18,6 +18,7 @@ import com.clx.performance.dao.*;
import com.clx.performance.enums.IdTypeEnum;
import com.clx.performance.enums.OwnerAccountEnum;
import com.clx.performance.enums.PerformanceResultEnum;
import com.clx.performance.enums.PlatformAccountConfigEnum;
import com.clx.performance.extranal.user.OwnerInfoService;
import com.clx.performance.model.*;
import com.clx.performance.param.app.CheckMobileParam;
......@@ -32,6 +33,7 @@ import com.clx.performance.param.pc.owner.CreteAccountParam;
import com.clx.performance.param.pc.owner.FrozenAccountParam;
import com.clx.performance.param.pc.owner.ThawAccountParam;
import com.clx.performance.service.OwnerAccountService;
import com.clx.performance.service.PlatformAccountConfigService;
import com.clx.performance.struct.OwnerAccountStruct;
import com.clx.performance.utils.MyMD5Util;
import com.clx.performance.utils.excel.ExcelData;
......@@ -41,6 +43,7 @@ import com.clx.performance.utils.excel.ExcelUtil;
import com.clx.performance.vo.pc.OwnerAccountAllVO;
import com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.performance.vo.pc.OwnerAccountVO;
import com.clx.performance.vo.pc.carrier.settle.CarrierPagePlatformAccountConfigVO;
import com.clx.user.enums.owner.FreezeSettingEnum;
import com.clx.user.feign.OwnerFeign;
import com.clx.user.feign.OwnerInfoFeign;
......@@ -55,6 +58,7 @@ import com.msl.user.data.UserSessionData;
import com.msl.user.utils.TokenUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.amqp.core.Message;
......@@ -111,6 +115,8 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
private final OwnerInfoService ownerInfoService;
private final PlatformAccountConfigService platformAccountConfigService;
@Override
public IPage<OwnerAccountVO> pageList(PageOwnerAccountListParam param) {
return ownerAccountDao.pageList(param);
......@@ -615,7 +621,26 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
@Override
public OwnerTransferInfo transferPublic() {
return ownerTransferInfoDao.getEntityByKey(1).orElse(null);
List<CarrierPagePlatformAccountConfigVO> configs =
platformAccountConfigService.getPlatformAccountConfigByType(
PlatformAccountConfigEnum.BusinessType.RECHARGE.getCode(),
PlatformAccountConfigEnum.OwnerType.COMPANY.getCode(),
null,null,null);
if(CollectionUtils.isNotEmpty(configs)){
if(configs.size() > 1){
throw new ServiceSystemException(PerformanceResultEnum.PLATFORM_ACCOUNT_CONFIG_RECHARGE_IS_NULL);
}
OwnerTransferInfo info = new OwnerTransferInfo();
CarrierPagePlatformAccountConfigVO vo = configs.get(0);
info.setAccountNumber(vo.getBankCardNo());
info.setOpenAccountBank(vo.getOpenBank());
info.setOpenAccountBankNumber(vo.getBankCode());
info.setEnterpriseName(vo.getCompanyName());
return info;
}else{
throw new ServiceSystemException(PerformanceResultEnum.PLATFORM_ACCOUNT_CONFIG_RECHARGE_IS_NULL);
}
//return ownerTransferInfoDao.getEntityByKey(1).orElse(null);
}
@Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论