| | |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="selectCstmrByNewestUuid" resultMap="BaseResultMap"> |
| | | select * from man_cstmr where 1=1 order by uuid + 0 desc |
| | | <select id="selectByUuid" resultMap="BaseResultMap"> |
| | | select * from man_cstmr |
| | | where 1=1 |
| | | and uuid = #{uuid} |
| | | <if test="hostId != null"> |
| | | and host_id = #{hostId} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectCstmrByNewestUuid" resultMap="BaseResultMap"> |
| | | select top 1 * from man_cstmr |
| | | where 1=1 |
| | | <if test="hostId != null"> |
| | | and host_id = #{hostId} |
| | | </if> |
| | | order by uuid + 0 desc |
| | | </select> |
| | | |
| | | <select id="listByPage" resultMap="BaseResultMap"> |
| | | SELECT |
| | | mc.* |
| | | FROM man_cstmr mc |
| | | LEFT JOIN sys_dept sd ON mc.dept_id = sd.id |
| | | WHERE 1=1 |
| | | AND (CHARINDEX(','+#{deptId}+',', ','+sd.path+',') > 0 OR sd.id = #{deptId}) |
| | | <if test="hostId != null and hostId != ''"> |
| | | and mc.host_id = #{hostId} |
| | | </if> |
| | | <if test="condition != null and condition != ''"> |
| | | and mc.name like concat('%',#{condition},'%') |
| | | </if> |
| | | ORDER BY mc.create_time DESC |
| | | </select> |
| | | |
| | | |
| | | </mapper> |