File was renamed from ycl-common/src/main/resources/mapper/user/UmsAdminDepartMapper.xml |
| | |
| | | <?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.ycl.mapper.user.UmsAdminDepartMapper"> |
| | | <mapper namespace="com.ycl.mapper.user.UmsDepartManageMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.entity.user.UmsAdminDepart"> |
| | | <resultMap id="BaseResultMap" type="com.ycl.entity.user.UmsDepartManage"> |
| | | <id column="id" property="id"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="depart_id" property="departId"/> |
| | | <result column="is_manager" property="isManager"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | </resultMap> |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id |
| | | , user_id,depart_id,is_manager,create_time,update_time |
| | | , user_id,depart_id,create_time,update_time |
| | | </sql> |
| | | |
| | | <delete id="deletedByDepartId"> |
| | | delete |
| | | from ums_admin_depart |
| | | from ums_depart_manager |
| | | where depart_id = #{departId} |
| | | </delete> |
| | | |
| | | <select id="selectPageByUserId" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from ums_admin_depart |
| | | from ums_depart_manager |
| | | where user_id=#{userId} |
| | | limit #{current},#{pageSize} |
| | | </select> |