| | |
| | | 'false' |
| | | END |
| | | ) as isOpen from sys_dept where 1=1 |
| | | and objectType =#{type} and objectId =#{id} |
| | | <if test="type == 3"> |
| | | and objectType = 3 and objectId =#{id} |
| | | </if> |
| | | <if test="type == 2"> |
| | | and (objectType = 2 and objectId =#{id} |
| | | or |
| | | <if test="storeIds != null and storeIds.size()>0"> |
| | | objectId IN |
| | | <foreach collection="storeIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | ) |
| | | </if> |
| | | </select> |
| | | <select id="list" resultType="java.util.Map"> |
| | | select * from sys_dept where 1=1 |
| | |
| | | <if test="objectType == 3"> |
| | | and objectType = 3 and objectId =#{objectId} |
| | | </if> |
| | | <if test="objectType == 1"> |
| | | and objectType = 1 |
| | | <if test="objectType == 2"> |
| | | and (objectType = 2 and objectId =#{objectId} |
| | | or |
| | | <if test="storeIds != null and storeIds.size()>0"> |
| | | objectId IN |
| | | <foreach collection="storeIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | ) |
| | | </if> |
| | | |
| | | |
| | | order by num ASC |
| | | </select> |
| | | |