You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
36 lines
1.1 KiB
5 years ago
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
|
||
|
<mapper namespace="com.elink.esua.epdc.dao.UserGridRelationDao">
|
||
|
|
||
|
<select id="selectOneOfGird" resultType="com.elink.esua.epdc.dto.UserGridRelationDTO">
|
||
|
SELECT
|
||
|
*
|
||
|
FROM
|
||
|
`epdc_user_grid_relation`
|
||
|
WHERE
|
||
|
USER_ID = #{userId}
|
||
|
AND DEL_FLAG = '0'
|
||
|
ORDER BY
|
||
|
SWITCHED_TIME DESC
|
||
|
LIMIT 1
|
||
|
</select>
|
||
|
|
||
|
<select id="selectListOfOrganizationInfo" resultType="com.elink.esua.epdc.dto.UserGridRelationDTO">
|
||
|
SELECT
|
||
|
ID,
|
||
|
PARENT_DEPT_IDS,
|
||
|
PARENT_DEPT_NAMES,
|
||
|
ALL_DEPT_IDS,
|
||
|
ALL_DEPT_NAMES
|
||
|
FROM
|
||
|
epdc_user_grid_relation
|
||
|
WHERE
|
||
|
FIND_IN_SET( #{deptId}, ALL_DEPT_IDS )
|
||
|
</select>
|
||
|
|
||
|
<update id="updateGridByDeptId">
|
||
|
UPDATE epdc_user_grid_relation SET GRID = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId}
|
||
|
</update>
|
||
|
|
||
|
</mapper>
|