Commit 8e08bb3b authored by 李灿灿's avatar 李灿灿

feat:保单号对应起止保时间分页查询增加购买月数

parent 1d851e71
......@@ -3,12 +3,12 @@ package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDate;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDate;
/**
* @author licancan
* @description 保单号对应起止时间表 t_insurance_policy
......@@ -66,6 +66,13 @@ public class TInsurancePolicy extends BaseEntity {
@Schema(description = "是否删除 0未删除 1删除")
private Integer deleteFlag;
/**
* 购买月数
*/
@TableField(exist = false)
@Schema(description = "购买月数")
private Long buyMonth;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
......
......@@ -16,6 +16,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TBusinessOperate
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsurancePolicyService;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListEditParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsurancePolicyListParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsurancePolicyDetailVO;
......@@ -52,6 +53,12 @@ public class TInsurancePolicyServiceImpl extends ServiceImpl<TInsurancePolicyMap
@Override
public IPage<TInsurancePolicy> pageDiy(Page page, InsurancePolicyListParam param) {
IPage<TInsurancePolicy> list = this.baseMapper.getInsurancePolicyListPage(page, param);
// 购买月数
if (CollectionUtils.isNotEmpty(list.getRecords())){
list.getRecords().stream().forEach(e ->{
e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString()));
});
}
return list;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment