Commit d5e4d5f0 by zhangxingmin

push

parent a9fc8b41
...@@ -14,9 +14,6 @@ import org.springframework.validation.annotation.Validated; ...@@ -14,9 +14,6 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/** /**
* 保险产品基础信息 * 保险产品基础信息
* *
......
...@@ -17,6 +17,16 @@ public class ApiInsuranceProductPageRequest extends PageDto { ...@@ -17,6 +17,16 @@ public class ApiInsuranceProductPageRequest extends PageDto {
private String productName; private String productName;
/** /**
* 保险产品类型(险种)
*/
private String productType;
/**
* 保险公司(产品所属保险公司,部门业务id)
*/
private String deptBizId;
/**
* 状态(0:停用 1:启用) * 状态(0:停用 1:启用)
*/ */
private Integer status; private Integer status;
......
...@@ -22,7 +22,7 @@ public class ApiInsuranceProductPageResponse { ...@@ -22,7 +22,7 @@ public class ApiInsuranceProductPageResponse {
private String productName; private String productName;
/** /**
* 保险产品类型 * 保险产品类型(险种)
*/ */
private String productType; private String productType;
...@@ -95,4 +95,9 @@ public class ApiInsuranceProductPageResponse { ...@@ -95,4 +95,9 @@ public class ApiInsuranceProductPageResponse {
* 产品所属公司的所在地 * 产品所属公司的所在地
*/ */
private String location; private String location;
/**
* 产品所属公司名称(保险公司)
*/
private String ssDeptName;
} }
...@@ -5,31 +5,34 @@ ...@@ -5,31 +5,34 @@
<select id="page" resultType="com.yd.insurance.base.feign.response.ApiInsuranceProductPageResponse"> <select id="page" resultType="com.yd.insurance.base.feign.response.ApiInsuranceProductPageResponse">
select select
ip.*, ip.*,
st.tenant_name,sp.project_name st.tenant_name,sp.project_name,
(select s.dept_name
from rel_insurance_product_dept r
inner join sys_dept s on s.dept_biz_id = r.dept_biz_id
where r.product_biz_id = ip.product_biz_id limit 1) as ssDeptName
from insurance_product ip from insurance_product ip
left join sys_tenant st on st.tenant_biz_id = ip.tenant_biz_id and st.is_deleted = 0 left join sys_tenant st on st.tenant_biz_id = ip.tenant_biz_id and st.is_deleted = 0
left join sys_project sp on sp.project_biz_id = ip.project_biz_id and sp.is_deleted = 0 left join sys_project sp on sp.project_biz_id = ip.project_biz_id and sp.is_deleted = 0
<if test="request.deptBizId != null and request.deptBizId != ''">
inner join rel_insurance_product_dept r on ip.product_biz_id = r.product_biz_id
and r.is_deleted = 0 and r.type = 1 and r.dept_biz_id = #{request.deptBizId}
</if>
<where> <where>
<if test="!isAdmin"> <if test="!isAdmin">
and ((ip.scope = 2 and ip.tenant_biz_id = #{loginTenantBizId}) and ip.scope = 2 and ip.tenant_biz_id = #{loginTenantBizId}
<if test="projectBizIdList.size > 0 and projectBizIdList != null">
or (ip.scope = 3 and ip.project_biz_id in
<foreach collection="projectBizIdList" item="item" index="index" open="(" separator=","
close=")">
#{item}
</foreach>
)
</if>
or (ip.scope = 1)
)
</if> </if>
<if test="request.productName != null and request.productName != ''"> <if test="request.productName != null and request.productName != ''">
and ip.product_name like concat('%', #{request.productName}, '%') and ip.product_name like concat('%', #{request.productName}, '%')
</if> </if>
<if test="request.productType != null and request.productType != ''">
and ip.product_type = #{request.productType}
</if>
<if test="request.status != null"> <if test="request.status != null">
and ip.product_status = #{request.status} and ip.product_status = #{request.status}
</if> </if>
......
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