Browse Source

修改小程序码分页sql

hotfix/yujt_opt
yujt 5 years ago
parent
commit
96a09fff0a
  1. 15
      epdc-cloud-optimize-department/src/main/resources/mapper/macode/OptDeptMaCodeDao.xml

15
epdc-cloud-optimize-department/src/main/resources/mapper/macode/OptDeptMaCodeDao.xml

@ -35,15 +35,24 @@
resultType="com.elink.esua.epdc.optimize.modules.macode.dto.OptDeptMaCodeDTO">
select * from epdc_dept_ma_code_copy1 ma
where ma.del_flag = '0'
<choose>
<when test='leaderFlag != null and leaderFlag != "" and leaderFlag == "1"'>and ma.leader_flag = '1'</when>
<otherwise>
and ma.leader_flag = '0'
<if test="gridId != null and gridId != ''">
and ma.grid_id = #{gridId}
</if>
<if test="leaderFlag != null and leaderFlag != ''">
and ma.leader_flag = #{leaderFlag}
<if test="communityId != null and communityId != ''">
and ma.all_dept_ids like '%${communityId}%'
</if>
<if test='(dataScopeDeptIds != null and dataScopeDeptIds.size() > 0) and leaderFlag == "0"'>
<if test="streetId != null and streetId != ''">
and ma.all_dept_ids like '%${streetId}%'
</if>
<if test='dataScopeDeptIds != null and dataScopeDeptIds.size() > 0'>
AND ma.grid_id IN <foreach collection="dataScopeDeptIds" open="(" separator="," close=")" item="deptId">#{deptId}</foreach>
</if>
</otherwise>
</choose>
</select>

Loading…
Cancel
Save