Commit 523c4a7f authored by 李灿灿's avatar 李灿灿

20221108 基础配置 保险公司增加办理地 列表显示及搜索

parent b9ae75d7
...@@ -12,6 +12,7 @@ import org.checkerframework.common.value.qual.StringVal; ...@@ -12,6 +12,7 @@ import org.checkerframework.common.value.qual.StringVal;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/** /**
...@@ -74,24 +75,28 @@ public class TInsuranceCompany extends BaseEntity { ...@@ -74,24 +75,28 @@ public class TInsuranceCompany extends BaseEntity {
* 商险办理省code * 商险办理省code
*/ */
@Schema(description = "商险办理省code") @Schema(description = "商险办理省code")
@NotNull(message = "商险办理省code不能为空")
private Integer insuranceHandleProvince; private Integer insuranceHandleProvince;
/** /**
* 商险办理省 * 商险办理省
*/ */
@Schema(description = "商险办理省") @Schema(description = "商险办理省")
@NotBlank(message = "商险办理省不能为空")
private String insuranceHandleProvinceName; private String insuranceHandleProvinceName;
/** /**
* 商险办理城市code * 商险办理城市code
*/ */
@Schema(description = "商险办理城市code") @Schema(description = "商险办理城市code")
@NotNull(message = "商险办理城市code不能为空")
private Integer insuranceHandleCity; private Integer insuranceHandleCity;
/** /**
* 商险办理城市 * 商险办理城市
*/ */
@Schema(description = "商险办理城市") @Schema(description = "商险办理城市")
@NotBlank(message = "商险办理城市不能为空")
private String insuranceHandleCityName; private String insuranceHandleCityName;
} }
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances; package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* @author Administrator * @author Administrator
...@@ -14,4 +17,13 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -14,4 +17,13 @@ import org.apache.ibatis.annotations.Mapper;
public interface TInsuranceCompanyMapper extends BaseMapper<TInsuranceCompany> { public interface TInsuranceCompanyMapper extends BaseMapper<TInsuranceCompany> {
/**
* 分页查询保险公司
*
* @author licancan
* @param page
* @param param
* @return {@link IPage<TInsuranceCompany>}
*/
IPage<TInsuranceCompany> getInsuranceCompanyListPage(Page<TInsuranceCompany> page, @Param("param") TInsuranceCompany param);
} }
...@@ -48,13 +48,11 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM ...@@ -48,13 +48,11 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
* @author zhaji * @author zhaji
* @param page 分页参数 * @param page 分页参数
* @param insuranceCompany 查询类 * @param insuranceCompany 查询类
* @return {@link IPage< TInsuranceCompany>} * @return {@link IPage<TInsuranceCompany>}
*/ */
@Override @Override
public IPage<TInsuranceCompany> pageDiy(Page page, TInsuranceCompany insuranceCompany) { public IPage<TInsuranceCompany> pageDiy(Page page, TInsuranceCompany insuranceCompany) {
LambdaQueryWrapper<TInsuranceCompany> wrapper = new LambdaQueryWrapper<>(); IPage<TInsuranceCompany> list = this.baseMapper.getInsuranceCompanyListPage(page, insuranceCompany);
wrapper.orderByDesc(TInsuranceCompany::getCreateTime);
IPage<TInsuranceCompany> list = this.baseMapper.selectPage(page, wrapper);
return list; return list;
} }
......
...@@ -28,4 +28,17 @@ ...@@ -28,4 +28,17 @@
DELETE_FLAG, DELETE_FLAG,
INSURANCE_HANDLE_PROVINCE,INSURANCE_HANDLE_PROVINCE_NAME,INSURANCE_HANDLE_CITY,INSURANCE_HANDLE_CITY_NAME INSURANCE_HANDLE_PROVINCE,INSURANCE_HANDLE_PROVINCE_NAME,INSURANCE_HANDLE_CITY,INSURANCE_HANDLE_CITY_NAME
</sql> </sql>
<select id="getInsuranceCompanyListPage" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"></include>
FROM t_insurance_company
where DELETE_FLAG = 0
<if test="param.companyName != null and param.companyName.trim() != ''">
and COMPANY_NAME = #{param.companyName}
</if>
<if test="param.insuranceHandleCity != null">
and INSURANCE_HANDLE_CITY = #{param.insuranceHandleCity}
</if>
ORDER BY CREATE_TIME DESC
</select>
</mapper> </mapper>
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