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

平台账户配置

上级 a9afea14
......@@ -114,7 +114,8 @@ public enum PerformanceResultEnum implements ResultEnum {
ORDER_CHILD_SYNC_ERROR(1912, "承运同步网络货运异常"),
PLATFORM_ACCOUNT_CONFIG_ONLY(1913, "当前配置已存在"),
PLATFORM_ACCOUNT_CONFIG_WITHDRAWAL_IS_NULL(1914, "提现平台账户未配置"),
PLATFORM_ACCOUNT_CONFIG_WITHDRAWAL_MANY(1915, "提现平台账户配置多个"),
;
private final int code;
private final String msg;
......
package com.clx.performance.controller.pc.carrier;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.enums.PerformanceResultEnum;
import com.clx.performance.enums.PlatformAccountConfigEnum;
import com.clx.performance.model.PlatformAccountConfig;
import com.clx.performance.param.pc.*;
import com.clx.performance.service.OwnerAccountService;
import com.clx.performance.service.OwnerCaseOutService;
import com.clx.performance.service.OwnerTopUpService;
import com.clx.performance.service.PlatformAccountConfigService;
import com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.performance.vo.pc.OwnerAccountVO;
import com.clx.performance.vo.pc.OwnerCaseOutVO;
import com.clx.performance.vo.pc.OwnerTopUpVO;
import com.clx.performance.vo.pc.carrier.settle.CarrierPagePlatformAccountConfigVO;
import com.clx.user.param.pc.driver.truck.PageDriverTruckParam;
import com.msl.common.base.PageData;
import com.msl.common.convertor.aspect.UnitCovert;
import com.msl.common.exception.ServiceSystemException;
import com.msl.common.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.http.HttpHeaders;
......@@ -26,6 +33,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotBlank;
import java.util.List;
@Slf4j
......@@ -42,6 +50,8 @@ public class CarrierAccountController {
private final OwnerCaseOutService ownerCaseOutService;
private final PlatformAccountConfigService platformAccountConfigService;
@ApiOperation(value = "查看资金管理列表(保证金和预付运费)", notes = "<br>By:胡宇帆")
@PostMapping("/pageList")
......@@ -115,4 +125,23 @@ public class CarrierAccountController {
return Result.page(page.getRecords(), page.getTotal(), page.getPages());
}
@ApiOperation(value = "提现审批平台付款银行账号", notes = "<br>By:jiangwenye")
@GetMapping("/ownerCaseOutAccount")
@UnitCovert(param = false)
public Result<CarrierPagePlatformAccountConfigVO> ownerCaseOutAccount() {
List<CarrierPagePlatformAccountConfigVO> configs =
platformAccountConfigService.getPlatformAccountConfigByType(
PlatformAccountConfigEnum.BusinessType.WITHDRAWAL.getCode(),
PlatformAccountConfigEnum.OwnerType.COMPANY.getCode(),
null,null,null);
if(CollectionUtils.isNotEmpty(configs)){
if(configs.size() > 1){
throw new ServiceSystemException(PerformanceResultEnum.PLATFORM_ACCOUNT_CONFIG_WITHDRAWAL_MANY);
}
return Result.ok(configs.get(0));
}else{
throw new ServiceSystemException(PerformanceResultEnum.PLATFORM_ACCOUNT_CONFIG_WITHDRAWAL_IS_NULL);
}
}
}
......@@ -19,4 +19,10 @@ public interface PlatformAccountConfigDao extends BaseDao<PlatformAccountConfigM
List<PlatformAccountConfig> checkPlatformAccountConfigOnly(PlatformAccountConfig config);
List<PlatformAccountConfig> getPlatformAccountConfigByType(Integer businessType,
Integer ownerType,
Integer invoiceType,
Integer invoiceCompanyId,
Integer configRange);
}
......@@ -77,4 +77,30 @@ public class PlatformAccountConfigImpl extends BaseDaoImpl<PlatformAccountConfig
}
return baseMapper.selectList(query);
}
@Override
public List<PlatformAccountConfig> getPlatformAccountConfigByType(Integer businessType,
Integer ownerType,
Integer invoiceType,
Integer invoiceCompanyId,
Integer configRange){
LambdaQueryWrapper<PlatformAccountConfig> query = new LambdaQueryWrapper<>();
query.eq(PlatformAccountConfig :: getDeleteStatus, DeleteStatusEnum.YES.getCode());
if(Objects.nonNull(businessType)){
query.eq(PlatformAccountConfig :: getBusinessType, businessType);
}
if(Objects.nonNull(ownerType)){
query.eq(PlatformAccountConfig :: getOwnerType, ownerType);
}
if(Objects.nonNull(invoiceCompanyId)){
query.eq(PlatformAccountConfig :: getInvoiceCompanyId, invoiceCompanyId);
}
if(Objects.nonNull(configRange)){
query.eq(PlatformAccountConfig :: getConfigRange, configRange);
}
if(Objects.nonNull(invoiceType)){
query.eq(PlatformAccountConfig :: getInvoiceType, invoiceType);
}
return baseMapper.selectList(query);
}
}
package com.clx.performance.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.model.PlatformAccountConfig;
import com.clx.performance.param.pc.carrier.PagePlatformAccountConfigParam;
import com.clx.performance.param.pc.carrier.SavePlatformAccountConfigParam;
import com.clx.performance.vo.pc.carrier.settle.*;
import java.util.List;
/**
* @author jiangwenye
* Date 2024-01-25
......@@ -22,4 +25,10 @@ public interface PlatformAccountConfigService {
void updatePlatformAccountConfig(SavePlatformAccountConfigParam config);
List<CarrierPagePlatformAccountConfigVO> getPlatformAccountConfigByType(Integer businessType,
Integer ownerType,
Integer invoiceType,
Integer invoiceCompanyId,
Integer configRange);
}
......@@ -111,4 +111,14 @@ public class PlatformAccountConfigServiceImpl implements PlatformAccountConfigSe
return true;
}
public List<CarrierPagePlatformAccountConfigVO> getPlatformAccountConfigByType(Integer businessType,
Integer ownerType,
Integer invoiceType,
Integer invoiceCompanyId,
Integer configRange){
List<PlatformAccountConfig> configs = platformAccountConfigDao.getPlatformAccountConfigByType( businessType, ownerType, invoiceType, invoiceCompanyId, configRange);
List<CarrierPagePlatformAccountConfigVO> list = platformAccountConfigStruct.convertToVOList(configs);
return list;
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论