提交 4ecd2296 authored 作者: liuhaiquan's avatar liuhaiquan

付款列表的付款信息接口

上级 fce5ea0f
package com.clx.performance.vo.pc.loan.carrier;
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 io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @author kavin
* Date 2024-01-20
* Time 13:31
*/
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class CarrierOwnerPaymentVO{
private Integer id;
@ApiModelProperty("付款金额")
private BigDecimal paymentBalance;
@ApiModelProperty("付款方")
private String payment;
@ApiModelProperty("付款账户")
private String paymentAccount;
@ApiModelProperty("收款方")
private String payee;
@ApiModelProperty("收款账户")
private String payeeAccount;
}
...@@ -3,6 +3,7 @@ package com.clx.performance.controller.pc.loan.carrier; ...@@ -3,6 +3,7 @@ package com.clx.performance.controller.pc.loan.carrier;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.param.pc.loan.carrier.PageCarrierOwnerPaymentParam; import com.clx.performance.param.pc.loan.carrier.PageCarrierOwnerPaymentParam;
import com.clx.performance.service.loan.OwnerPaymentService; import com.clx.performance.service.loan.OwnerPaymentService;
import com.clx.performance.vo.pc.loan.carrier.CarrierOwnerPaymentVO;
import com.clx.performance.vo.pc.loan.carrier.OwnerPaymentVO; import com.clx.performance.vo.pc.loan.carrier.OwnerPaymentVO;
import com.msl.common.base.PageData; import com.msl.common.base.PageData;
import com.msl.common.convertor.aspect.UnitCovert; import com.msl.common.convertor.aspect.UnitCovert;
...@@ -12,10 +13,9 @@ import io.swagger.annotations.ApiOperation; ...@@ -12,10 +13,9 @@ import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import javax.validation.constraints.NotNull;
import org.springframework.web.bind.annotation.RestController;
@Slf4j @Slf4j
@RestController @RestController
...@@ -37,4 +37,17 @@ public class CarrierOwnerPaymentController { ...@@ -37,4 +37,17 @@ public class CarrierOwnerPaymentController {
} }
@ApiOperation(value = "付款详情",notes = "<br>By:刘海泉")
@PostMapping("/getOwnerPaymentDetail")
@UnitCovert(param = false)
public Result<CarrierOwnerPaymentVO> getOwnerPaymentDetail(@RequestParam("id") @NotNull(message = "id不能为空") Integer id) {
CarrierOwnerPaymentVO vo = ownerPaymentService.getOwnerPaymentDetail(id);
return Result.ok(vo);
}
} }
...@@ -3,10 +3,12 @@ package com.clx.performance.service.impl.loan; ...@@ -3,10 +3,12 @@ package com.clx.performance.service.impl.loan;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.clx.performance.dao.loan.OwnerPaymentDao; import com.clx.performance.dao.loan.OwnerPaymentDao;
import com.clx.performance.enums.PerformanceResultEnum;
import com.clx.performance.model.loan.OwnerPayment; import com.clx.performance.model.loan.OwnerPayment;
import com.clx.performance.param.pc.loan.carrier.PageCarrierOwnerPaymentParam; import com.clx.performance.param.pc.loan.carrier.PageCarrierOwnerPaymentParam;
import com.clx.performance.service.loan.OwnerPaymentService; import com.clx.performance.service.loan.OwnerPaymentService;
import com.clx.performance.struct.loan.OwnerPaymentStruct; import com.clx.performance.struct.loan.OwnerPaymentStruct;
import com.clx.performance.vo.pc.loan.carrier.CarrierOwnerPaymentVO;
import com.clx.performance.vo.pc.loan.carrier.OwnerPaymentVO; import com.clx.performance.vo.pc.loan.carrier.OwnerPaymentVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -35,4 +37,10 @@ public class OwnerPaymentServiceImpl implements OwnerPaymentService { ...@@ -35,4 +37,10 @@ public class OwnerPaymentServiceImpl implements OwnerPaymentService {
returnPage.setRecords(records); returnPage.setRecords(records);
return returnPage; return returnPage;
} }
@Override
public CarrierOwnerPaymentVO getOwnerPaymentDetail(Integer id) {
OwnerPayment ownerPayment = ownerPaymentDao.getEntityByKey(id).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
return ownerPaymentStruct.convert(ownerPayment);
}
} }
...@@ -2,6 +2,7 @@ package com.clx.performance.service.loan; ...@@ -2,6 +2,7 @@ package com.clx.performance.service.loan;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.param.pc.loan.carrier.PageCarrierOwnerPaymentParam; import com.clx.performance.param.pc.loan.carrier.PageCarrierOwnerPaymentParam;
import com.clx.performance.vo.pc.loan.carrier.CarrierOwnerPaymentVO;
import com.clx.performance.vo.pc.loan.carrier.OwnerPaymentVO; import com.clx.performance.vo.pc.loan.carrier.OwnerPaymentVO;
/** /**
...@@ -11,4 +12,6 @@ import com.clx.performance.vo.pc.loan.carrier.OwnerPaymentVO; ...@@ -11,4 +12,6 @@ import com.clx.performance.vo.pc.loan.carrier.OwnerPaymentVO;
*/ */
public interface OwnerPaymentService { public interface OwnerPaymentService {
IPage<OwnerPaymentVO> pageOwnerPayment(PageCarrierOwnerPaymentParam param); IPage<OwnerPaymentVO> pageOwnerPayment(PageCarrierOwnerPaymentParam param);
CarrierOwnerPaymentVO getOwnerPaymentDetail(Integer id);
} }
package com.clx.performance.struct.loan; package com.clx.performance.struct.loan;
import com.clx.performance.model.loan.OwnerPayment; import com.clx.performance.model.loan.OwnerPayment;
import com.clx.performance.vo.pc.loan.carrier.CarrierOwnerPaymentVO;
import com.clx.performance.vo.pc.loan.carrier.OwnerPaymentVO; import com.clx.performance.vo.pc.loan.carrier.OwnerPaymentVO;
import com.msl.common.utils.DateStructUtil; import com.msl.common.utils.DateStructUtil;
import org.mapstruct.Mapper; import org.mapstruct.Mapper;
...@@ -12,4 +13,6 @@ import java.util.Objects; ...@@ -12,4 +13,6 @@ import java.util.Objects;
public interface OwnerPaymentStruct { public interface OwnerPaymentStruct {
List<OwnerPaymentVO> convertList(List<OwnerPayment> list); List<OwnerPaymentVO> convertList(List<OwnerPayment> list);
CarrierOwnerPaymentVO convert(OwnerPayment ownerPayment);
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论