1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-06 07:21:24 +08:00

nitice module modified query with mybatis plus linked table to xml

This commit is contained in:
cccccyb
2023-05-11 15:26:55 +08:00
parent 3c7fc85b9e
commit 1defd7ef4e
21 changed files with 498 additions and 151 deletions

View File

@@ -2,9 +2,13 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cfive.pinnacle.mapper.DepartmentMapper">
<select id="getDepartAndUser" resultMap="department">
select d.id,name,u.id,username from t_department d,t_user u where d.id=u.department_id and d.deleted=0 and u.deleted=0
select d.id did,name,u.id uid,username from t_department d,t_user u where d.id=u.department_id and d.deleted=0 and u.deleted=0
</select>
<resultMap id="department" type="department" autoMapping="true">
<id column="id" property="id"/>
<id column="did" property="id"/>
<collection property="userList" ofType="user" autoMapping="true">
<id column="uid" property="id"/>
<result column="uid" property="id"/>
</collection>
</resultMap>
</mapper>