<select id="selectSjzgAuditSubmitList" parameterType="SjzgAuditSubmit" resultMap="SjzgAuditSubmitResult">
<include refid="selectSjzgAuditVo"/>
<where>
--单独字段模糊查询
<if test="problemCharact != null and problemCharact != ''"> and A.problem_charact like concat(concat('%', #{problemCharact}), '%')</if>
-- 复合字段模糊下拉查询(该字段存储的是多个下拉选项对应的ID用分号隔开后拼接的字符串,前端通过下拉多选的方式模糊搜索,只要该字段中有筛选条件中的一个下拉选项的ID,就被筛选出来)
<if test="problemLabelCodes != null and problemLabelCodes .size() > 0">
<foreach collection="problemLabelCodes" item="option" open="(" separator=" OR " close=")">
A.problem_label_code like concat( #{option},';%') --开头
or A.problem_label_code = #{option}
or A.problem_label_code like concat(concat('%;', #{option}), ';%') --中间
or A.problem_label_code like concat('%;', #{option}) --结尾
</foreach>
</if>
-- 单字段模糊下拉查询(字段存储的是单个下拉选项对应的ID,前端通过下拉多选的方式模糊搜索,只要在筛选条件中就被筛选出来)
<if test="rectifyTypes != null and rectifyTypes.size() > 0">
A.rectify_type IN
<foreach item="option" collection="rectifyTypes" open="(" separator="," close=")">
#{option}
</foreach>
</if>
</where>
order by create_time desc
</select>