提交 1f3bb4a5 authored 作者: huyufan's avatar huyufan

资金管理相关代码

上级 fb83a45c
package com.clx.settlement.params;
import com.msl.common.convertor.type.MoneyOutConvert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import java.math.BigDecimal;
@ApiModel(description = "货主充值")
@Getter
@Setter
@ToString
@NoArgsConstructor
public class OwnerTopUpParam {
@ApiModelProperty(value = "货主用户编号", example = "123")
private Long ownerUserNo;
@ApiModelProperty(value = "充值金额(元)", example = "1.23")
@MoneyOutConvert
private BigDecimal topUpBalance;
@ApiModelProperty(value = "充值类型: 1:保证金 2:预付运费", example = "1.23")
private Integer topUpType;
@ApiModelProperty(value = "状态 待审批:10 审批拒绝:20 审批通过:30", example = "10")
private Integer status;
@ApiModelProperty(value = "打款银行", example = "浙江银行")
private String topUpBankName;
@ApiModelProperty(value = "打款银行卡号", example = "62213545878787")
private String topUpBankNumber;
@ApiModelProperty(value = "打款凭证", example = "/a.png")
private String topUpImg;
@ApiModelProperty(value = "操作时间", example = "2023-01-01 00:00:00")
private String createTime;
@ApiModelProperty(value = "操作人", example = "张三")
private String createBy;
@ApiModelProperty(value = "审批时间", example = "2023-01-01 00:00:00")
private String approvalTime;
@ApiModelProperty(value = "审批人", example = "管理员")
private String approvalBy;
}
\ No newline at end of file
package com.clx.settlement.vo.pc;
package com.clx.settlement.params;
import com.msl.common.base.PageParam;
import io.swagger.annotations.ApiModelProperty;
......
package com.clx.settlement.vo.pc;
package com.clx.settlement.params;
import com.msl.common.base.PageParam;
import io.swagger.annotations.ApiModelProperty;
......
......@@ -20,38 +20,50 @@ public class OwnerAccountVO {
/**
* 货主编码
*/
private String accountNo;
@ApiModelProperty(value = "货主编码")
private String ownerNo;
/**
* 货主名称
*/
private String accountName;
@ApiModelProperty(value = "货主名称")
private String ownerName;
/**
* 联系电话
*/
@ApiModelProperty(value = "联系电话")
private Integer mobile;
/**
* 账户类型;1:保证金 2:预付运费
*/
@ApiModelProperty(value = "账户类型;1:保证金 2:预付运费")
private Integer accountType;
/**
* 账户余额
*/
@ApiModelProperty(value = "账户余额")
@MoneyOutConvert
private Decimal accountBalance;
/**
* 可用余额
*/
@ApiModelProperty(value = "可用余额")
@MoneyOutConvert
private Decimal usableBalance;
/**
* 冻结金额
*/
@ApiModelProperty(value = "冻结金额")
@MoneyOutConvert
private Decimal frozenBalance;
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
}
\ No newline at end of file
......@@ -156,13 +156,4 @@ public class GoodsOrderController {
return Result.page(page.getRecords(), page.getTotal(), page.getPages());
}
@GetMapping("/test")
public void pageOrderGoodsList() {
byte[] b = new byte[1024*1024*1024];
System.gc();
byte[] c = new byte[1024*1024*1024];
byte[] d = new byte[1024*1024*1024];
byte[] e = new byte[1024*1024*1024];
System.gc();
}
}
......@@ -5,8 +5,8 @@ import com.clx.performance.service.OwnerAccountService;
import com.clx.settlement.params.PageOwnerAccountListParam;
import com.clx.settlement.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.settlement.vo.pc.OwnerAccountVO;
import com.clx.settlement.vo.pc.PageOwnerMarginAccountParam;
import com.clx.settlement.vo.pc.PageOwnerPrepaidFreightAccountParam;
import com.clx.settlement.params.PageOwnerMarginAccountParam;
import com.clx.settlement.params.PageOwnerPrepaidFreightAccountParam;
import com.msl.common.base.PageData;
import com.msl.common.convertor.aspect.UnitCovert;
import com.msl.common.result.Result;
......@@ -15,10 +15,9 @@ import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Slf4j
@RestController
......@@ -54,6 +53,20 @@ public class OwnerAccountController {
return Result.page(page.getRecords(), page.getTotal(), page.getPages());
}
@ApiOperation(value = "查看资金管理列表", notes = "<br>By:胡宇帆")
@GetMapping("/account_info")
@UnitCovert(param = false)
public Result<List<OwnerAccountVO>> accountInfo(@RequestParam String ownerNo) {
List<OwnerAccountVO> accountVOList = ownerAccountService.accountInfo(ownerNo);
return Result.ok(accountVOList);
}
@ApiOperation(value = "账户充值", notes = "<br>By:胡宇帆")
@GetMapping("/account_top_up")
@UnitCovert(param = false)
public Result<List<OwnerAccountVO>> account_top_up(@RequestParam String ownerNo) {
List<OwnerAccountVO> accountVOList = ownerAccountService.accountInfo(ownerNo);
return Result.ok(accountVOList);
}
}
......@@ -4,12 +4,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.mapper.OwnerAccountMapper;
import com.clx.performance.model.OwnerAccount;
import com.clx.settlement.params.PageOwnerAccountListParam;
import com.clx.settlement.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.settlement.vo.pc.OwnerAccountVO;
import com.clx.settlement.vo.pc.PageOwnerMarginAccountParam;
import com.msl.common.dao.BaseDao;
import java.util.List;
public interface OwnerAccountDao extends BaseDao<OwnerAccountMapper, OwnerAccount, Integer> {
IPage<OwnerAccountVO> pageList(PageOwnerAccountListParam param);
List<OwnerAccountVO> accountInfo(String ownerNo);
}
package com.clx.performance.dao;
import com.clx.performance.mapper.OwnerCaseOutMapper;
import com.clx.performance.model.OwnerCaseOut;
import com.msl.common.dao.BaseDao;
public interface OwnerCaseOutDao extends BaseDao<OwnerCaseOutMapper, OwnerCaseOut, Integer> {
}
......@@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.mapper.OwnerRunningWaterRecordMapper;
import com.clx.performance.model.OwnerRunningWaterRecord;
import com.clx.settlement.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.settlement.vo.pc.PageOwnerMarginAccountParam;
import com.clx.settlement.vo.pc.PageOwnerPrepaidFreightAccountParam;
import com.clx.settlement.params.PageOwnerMarginAccountParam;
import com.clx.settlement.params.PageOwnerPrepaidFreightAccountParam;
import com.msl.common.dao.BaseDao;
public interface OwnerRunningWaterRecordDao extends BaseDao<OwnerRunningWaterRecordMapper, OwnerRunningWaterRecord, Integer> {
......
package com.clx.performance.dao;
import com.clx.performance.mapper.OwnerTopUpMapper;
import com.clx.performance.model.OwnerTopUp;
import com.msl.common.dao.BaseDao;
public interface OwnerTopUpDao extends BaseDao<OwnerTopUpMapper, OwnerTopUp, Integer> {
}
......@@ -5,16 +5,21 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.clx.performance.dao.OwnerAccountDao;
import com.clx.performance.mapper.OwnerAccountMapper;
import com.clx.performance.model.OwnerAccount;
import com.clx.performance.struct.OwnerAccountStruct;
import com.clx.settlement.params.PageOwnerAccountListParam;
import com.clx.settlement.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.settlement.vo.pc.OwnerAccountVO;
import com.clx.settlement.vo.pc.PageOwnerMarginAccountParam;
import com.msl.common.dao.impl.BaseDaoImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public class OwnerAccountDaoImpl extends BaseDaoImpl<OwnerAccountMapper, OwnerAccount, Integer> implements OwnerAccountDao {
@Autowired
private OwnerAccountStruct ownerAccountStruct;
@Override
public IPage<OwnerAccountVO> pageList(PageOwnerAccountListParam param) {
Page<OwnerAccountVO> page = Page.of(param.getPage(), param.getPageSize());
......@@ -22,5 +27,11 @@ public class OwnerAccountDaoImpl extends BaseDaoImpl<OwnerAccountMapper, OwnerAc
}
@Override
public List<OwnerAccountVO> accountInfo(String ownerNo) {
List<OwnerAccount> list = baseMapper.selectList(lQrWrapper().eq(OwnerAccount::getOwnerUserNo, ownerNo));
return ownerAccountStruct.convertList(list);
}
}
package com.clx.performance.dao.impl;
import com.clx.performance.dao.OwnerCaseOutDao;
import com.clx.performance.mapper.OwnerCaseOutMapper;
import com.clx.performance.model.OwnerCaseOut;
import com.msl.common.dao.impl.BaseDaoImpl;
import org.springframework.stereotype.Repository;
@Repository
public class OwnerCaseOutDaoImpl extends BaseDaoImpl<OwnerCaseOutMapper, OwnerCaseOut, Integer> implements OwnerCaseOutDao {
}
......@@ -6,8 +6,8 @@ import com.clx.performance.dao.OwnerRunningWaterRecordDao;
import com.clx.performance.mapper.OwnerRunningWaterRecordMapper;
import com.clx.performance.model.OwnerRunningWaterRecord;
import com.clx.settlement.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.settlement.vo.pc.PageOwnerMarginAccountParam;
import com.clx.settlement.vo.pc.PageOwnerPrepaidFreightAccountParam;
import com.clx.settlement.params.PageOwnerMarginAccountParam;
import com.clx.settlement.params.PageOwnerPrepaidFreightAccountParam;
import com.msl.common.dao.impl.BaseDaoImpl;
import org.springframework.stereotype.Repository;
......
package com.clx.performance.dao.impl;
import com.clx.performance.dao.OwnerTopUpDao;
import com.clx.performance.mapper.OwnerTopUpMapper;
import com.clx.performance.model.OwnerTopUp;
import com.msl.common.dao.impl.BaseDaoImpl;
import org.springframework.stereotype.Repository;
@Repository
public class OwnerTopUpDaoImpl extends BaseDaoImpl<OwnerTopUpMapper, OwnerTopUp, Integer> implements OwnerTopUpDao {
}
package com.clx.performance.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.clx.performance.model.OwnerCaseOut;
import org.apache.ibatis.annotations.Mapper;
/**
* 货主提现
*/
@Mapper
public interface OwnerCaseOutMapper extends BaseMapper<OwnerCaseOut> {
}
\ No newline at end of file
......@@ -6,8 +6,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.clx.performance.model.OwnerRunningWaterRecord;
import com.clx.performance.sqlProvider.OwnerRunningWaterRecordSqlProvider;
import com.clx.settlement.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.settlement.vo.pc.PageOwnerMarginAccountParam;
import com.clx.settlement.vo.pc.PageOwnerPrepaidFreightAccountParam;
import com.clx.settlement.params.PageOwnerMarginAccountParam;
import com.clx.settlement.params.PageOwnerPrepaidFreightAccountParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectProvider;
......
package com.clx.performance.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.clx.performance.model.OwnerTopUp;
import org.apache.ibatis.annotations.Mapper;
/**
* 货主充值
*/
@Mapper
public interface OwnerTopUpMapper extends BaseMapper<OwnerTopUp> {
}
\ No newline at end of file
......@@ -33,13 +33,13 @@ public class OwnerAccount implements HasKey<Integer> {
/**
* 货主编码
*/
@TableField("account_no")
private String accountNo;
@TableField("owner_user_no")
private String ownerUserNo;
/**
* 货主名称
*/
@TableField("account_name")
private String accountName;
@TableField("owner_user_name")
private String ownerUserName;
/**
* 联系电话
*/
......
......@@ -31,13 +31,13 @@ public class OwnerBindCardRecord implements HasKey<Integer> {
/**
* 货主编码
*/
@TableField("owner_no")
private String ownerNo;
@TableField("owner_user_no")
private String ownerUserNo;
/**
* 货主名称
*/
@TableField("owner_name")
private String ownerName;
@TableField("owner_user_name")
private String ownerUserName;
/**
* 货主类型;1:企业 2:个人
*/
......
package com.clx.performance.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.msl.common.config.KeyColumn;
import com.msl.common.model.HasKey;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.poi.hpsf.Decimal;
import java.time.LocalDateTime;
/**
* 货主提现;
*
* @date : 2023-10-12
*/
@Getter
@Setter
@Accessors(chain = true)
@TableName("owner_case_out")
public class OwnerCaseOut implements HasKey<Integer> {
/**
* id
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 提现编号
*/
@TableField("case_out_no")
private Long caseOutNo;
/**
* 提现账户类型
*/
@TableField("case_out_type")
private Integer caseOutType;
/**
* 提现金额
*/
@TableField("case_out_balance")
private Decimal caseOutBalance;
/**
* 状态
*/
@TableField("status")
private Integer status;
/**
* 提现银行
*/
@TableField("case_out_bank")
private String caseOutBank;
/**
* 提现银行卡号
*/
@TableField("case_out_bank_number")
private String caseOutBankNumber;
/**
* 提现时间
*/
@TableField("case_out_time")
private LocalDateTime caseOutTime;
/**
* 操作人
*/
@TableField("create_by")
private String createBy;
/**
* 付款时间
*/
@TableField("payment_time")
private LocalDateTime paymentTime;
/**
* 平台付款银行
*/
@TableField("platform_payment_bank")
private String platformPaymentBank;
/**
* 平台付款银行账号
*/
@TableField("platform_payment_bank_number")
private String platformPaymentBankNumber;
/**
* 付款人
*/
@TableField("payment_by")
private String paymentBy;
/**
* 付款凭证
*/
@TableField("payment_proof")
private String paymentProof;
/**
* 创建时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 修改时间
*/
@TableField("modify_time")
private LocalDateTime modifyTime;
@Override
@KeyColumn("id")
public Integer gainKey() {
return id;
}
}
\ No newline at end of file
package com.clx.performance.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.msl.common.config.KeyColumn;
import com.msl.common.model.HasKey;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* 货主充值
*
* @date : 2023-10-12
*/
@Getter
@Setter
@Accessors(chain = true)
@TableName("owner_top_up")
public class OwnerTopUp implements HasKey<Integer> {
/**
* id
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 充值编号
*/
@TableField("owner_no")
private Long topUpNo;
/**
* 货主编码
*/
@TableField("owner_user_no")
private Integer ownerUserNo;
/**
* 充值类型
*/
@TableField("top_up_type")
private Integer topUpType;
/**
* 充值金额
*/
@TableField("top_up_balance")
private Double topUpBalance;
/**
* 状态
*/
@TableField("status")
private Integer status;
/**
* 打款银行
*/
@TableField("drawing_bank")
private String drawingBank;
/**
* 打款银行卡号
*/
@TableField("drawing_bank_number")
private String drawingBankNumber;
/**
* 打款凭证
*/
@TableField("drawing_proof")
private String drawingProof;
/**
* 操作时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 操作人
*/
@TableField("create_by")
private String createBy;
/**
* 审批时间
*/
@TableField("approval_time")
private LocalDateTime approvalTime;
/**
* 审批人
*/
@TableField("approval_by")
private String approvalBy;
/**
* 审批拒绝
*/
@TableField("approval_turn_down")
private String approvalTurnDown;
@KeyColumn("id")
@Override
public Integer gainKey() {
return id;
}
}
\ No newline at end of file
......@@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.settlement.params.PageOwnerAccountListParam;
import com.clx.settlement.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.settlement.vo.pc.OwnerAccountVO;
import com.clx.settlement.vo.pc.PageOwnerMarginAccountParam;
import com.clx.settlement.vo.pc.PageOwnerPrepaidFreightAccountParam;
import com.clx.settlement.params.PageOwnerMarginAccountParam;
import com.clx.settlement.params.PageOwnerPrepaidFreightAccountParam;
import java.util.List;
public interface OwnerAccountService {
IPage<OwnerAccountVO> pageList(PageOwnerAccountListParam param);
......@@ -13,4 +15,6 @@ public interface OwnerAccountService {
IPage<OwnerAccountRunningWaterRecordVO> marginAccountPageList(PageOwnerMarginAccountParam param);
IPage<OwnerAccountRunningWaterRecordVO> prepaidFreightAccountPageList(PageOwnerPrepaidFreightAccountParam param);
List<OwnerAccountVO> accountInfo(String ownerNo);
}
package com.clx.performance.service;
public interface OwnerCaseOutService {
}
package com.clx.performance.service;
public interface OwnerTopUpService {
}
......@@ -7,12 +7,14 @@ import com.clx.performance.service.OwnerAccountService;
import com.clx.settlement.params.PageOwnerAccountListParam;
import com.clx.settlement.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.settlement.vo.pc.OwnerAccountVO;
import com.clx.settlement.vo.pc.PageOwnerMarginAccountParam;
import com.clx.settlement.vo.pc.PageOwnerPrepaidFreightAccountParam;
import com.clx.settlement.params.PageOwnerMarginAccountParam;
import com.clx.settlement.params.PageOwnerPrepaidFreightAccountParam;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;
@Slf4j
@Service
@AllArgsConstructor
......@@ -36,4 +38,9 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
public IPage<OwnerAccountRunningWaterRecordVO> prepaidFreightAccountPageList(PageOwnerPrepaidFreightAccountParam param) {
return ownerRunningWaterRecordDao.prepaidFreightAccountPageList(param);
}
@Override
public List<OwnerAccountVO> accountInfo(String ownerNo) {
return ownerAccountDao.accountInfo(ownerNo);
}
}
package com.clx.performance.service.impl;
import com.clx.performance.service.OwnerCaseOutService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class OwnerCaseOutServiceImpl implements OwnerCaseOutService {
}
package com.clx.performance.service.impl;
import com.clx.performance.service.OwnerTopUpService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class OwnerTopUpServiceImpl implements OwnerTopUpService {
}
......@@ -10,8 +10,8 @@ public class OwnerAccountSqlProvider {
public String pageList(@Param("param") PageOwnerAccountListParam param) {
String sql = new SQL() {{
SELECT("a.id, a.owner_code," +
" a.owner_name, a.mobile, a.account_type, " +
SELECT("a.id, a.owner_user_no," +
" a.owner_user_name, a.mobile, a.account_type, " +
" a.account_balance,a.usable_balance, a.frozen_balance,a.create_by,a.create_time");
FROM("owner_account a");
......
......@@ -2,8 +2,8 @@ package com.clx.performance.sqlProvider;
import cn.hutool.core.util.ObjectUtil;
import com.clx.performance.enums.OwnerAccountTypeEnum;
import com.clx.settlement.vo.pc.PageOwnerMarginAccountParam;
import com.clx.settlement.vo.pc.PageOwnerPrepaidFreightAccountParam;
import com.clx.settlement.params.PageOwnerMarginAccountParam;
import com.clx.settlement.params.PageOwnerPrepaidFreightAccountParam;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.jdbc.SQL;
......@@ -34,8 +34,8 @@ public class OwnerRunningWaterRecordSqlProvider {
public String prepaidFreightAccountPageList(@Param("param") PageOwnerPrepaidFreightAccountParam param) {
String sql = new SQL() {{
SELECT("a.id, a.owner_code," +
" a.owner_name, a.mobile, a.account_type, a.running_water_type,a.order_id,a.order_no,a.order_child_id,a.order_child_no,a.alteration_balance," +
SELECT("a.id, a.owner_user_no," +
" a.owner_user_name, a.mobile, a.account_type, a.running_water_type,a.order_id,a.order_no,a.order_child_id,a.order_child_no,a.alteration_balance," +
" a.account_balance,a.usable_balance, a.frozen_balance,a.create_by,a.create_time");
FROM("owner_running_water_record a");
WHERE("a.account_type =" + OwnerAccountTypeEnum.Status.PREPAID_FREIGHT_ACCOUNT.getCode());
......
package com.clx.performance.struct;
import com.clx.order.vo.feign.FeignAddressVO;
import com.clx.performance.model.OwnerAccount;
import com.clx.settlement.vo.pc.OwnerAccountVO;
import com.msl.common.utils.DateStructUtil;
import com.msl.common.utils.DateUtils;
import org.apache.commons.lang3.StringUtils;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import java.util.List;
@Mapper(componentModel = "spring", uses = DateStructUtil.class, imports = {DateUtils.class})
public interface OwnerAccountStruct {
// OrderGoodsVO convert(OrderGoods orderGoods);
List<OwnerAccountVO> convertList(List<OwnerAccount> orderGoods);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论