Commit f83f038b authored by 查济's avatar 查济

Merge branch 'feature-zhaji' into 'develop'

"feature-zhaJi:优化保险列表查询显示结算月(许晓需求)"

See merge request fangxinjiang/yifu!88
parents cbdc2a4d b0d4b54a
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* @author zhaji
* @description TODO
* @date 2022-08-01 18:11:59
*/
@Data
public class InsuranceListByIdCardVo extends TInsuranceDetail {
/**
* 购买月数
*/
@Schema(description = "购买月数")
private Long buyMonth;
}
......@@ -444,7 +444,7 @@ public class TInsuranceDetailController {
*/
@Operation(summary = "根据身份证查询所有的商险列表", description = "根据身份证查询所有的商险列表")
@GetMapping("/getInsuranceListByIdCard")
public R<IPage<TInsuranceDetail>> getInsuranceListByIdCard(Page page, String idCard) {
public R<IPage<InsuranceListByIdCardVo>> getInsuranceListByIdCard(Page page, String idCard) {
return new R<>(tInsuranceDetailService.getInsuranceListByIdCard(page, idCard));
}
}
......@@ -176,5 +176,5 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @date 2022-08-01
* @return
*/
IPage<TInsuranceDetail> getInsuranceListByIdCard(Page<TInsuranceDetail> page, @Param("idCard") String idCard);
IPage<InsuranceListByIdCardVo> getInsuranceListByIdCard(Page<TInsuranceDetail> page, @Param("idCard") String idCard);
}
......@@ -301,6 +301,6 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param
* @return {@link R}
*/
IPage<TInsuranceDetail> getInsuranceListByIdCard(Page<TInsuranceDetail> page, String idCard);
IPage<InsuranceListByIdCardVo> getInsuranceListByIdCard(Page<TInsuranceDetail> page, String idCard);
}
......@@ -3555,8 +3555,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
@Override
public IPage<TInsuranceDetail> getInsuranceListByIdCard(Page<TInsuranceDetail> page, String idCard) {
return baseMapper.getInsuranceListByIdCard(page, idCard);
public IPage<InsuranceListByIdCardVo> getInsuranceListByIdCard(Page<TInsuranceDetail> page, String idCard) {
IPage<InsuranceListByIdCardVo> insuranceListByIdCard = baseMapper.getInsuranceListByIdCard(page, idCard);
List<InsuranceListByIdCardVo> records = insuranceListByIdCard.getRecords();
if (CollectionUtils.isNotEmpty(records)){
for (InsuranceListByIdCardVo record : records) {
record.setBuyMonth(LocalDateUtil.betweenMonth(record.getPolicyStart().toString(),record.getPolicyEnd().toString()));
}
insuranceListByIdCard.setRecords(records);
}
return insuranceListByIdCard;
}
}
......@@ -763,7 +763,7 @@
</update>
<!--getInsuranceListByIdCard-->
<select id="getInsuranceListByIdCard" resultMap="BaseResultMap">
<select id="getInsuranceListByIdCard" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListByIdCardVo">
SELECT
<include refid="Base_Column_List"/>
FROM t_insurance_detail
......
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