فهرست منبع

更新文件 SmartAuthorGroupMapper.xml

陈士柏 2 سال پیش
والد
کامیت
0a5df13030
1فایلهای تغییر یافته به همراه16 افزوده شده و 0 حذف شده
  1. 16 0
      src/main/resources/mapper/template/SmartAuthorGroupMapper.xml

+ 16 - 0
src/main/resources/mapper/template/SmartAuthorGroupMapper.xml

@@ -8,6 +8,16 @@
         <result property="userId" column="user_id"/>
         <result property="userId" column="user_id"/>
         <result property="applyId" column="apply_id"/>
         <result property="applyId" column="apply_id"/>
     </resultMap>
     </resultMap>
+
+    <resultMap type="com.template.model.pojo.SmartAuthorGroupManager" id="smartAuthorGroupManager">
+        <result property="groupId" column="group_id"/>
+        <result property="userId" column="user_id"/>
+        <result property="cardNo" column="card_no"/>
+        <result property="userName" column="user_name"/>
+        <result property="departmentManage" column="department_manage"/>
+        <result property="departmentView" column="department_view"/>
+    </resultMap>
+
     <select id="smartAuthorGroup" resultType="com.template.model.pojo.SmartAuthorGroup" resultMap="smartAuthorGroupMap">
     <select id="smartAuthorGroup" resultType="com.template.model.pojo.SmartAuthorGroup" resultMap="smartAuthorGroupMap">
         SELECT * FROM `smart_author_group`
         SELECT * FROM `smart_author_group`
         where deleted = 0
         where deleted = 0
@@ -15,4 +25,10 @@
             and FIND_IN_SET(#{userId},user_id)
             and FIND_IN_SET(#{userId},user_id)
         </if>
         </if>
     </select>
     </select>
+
+    <select id="getSmartAuthorGroupManager" resultType="com.template.model.pojo.SmartAuthorGroupManager" resultMap="smartAuthorGroupManager">
+        select a.`id`,a.`group_id`,a.`user_id`,b.card_no,b.`name` as user_name,a.`department_manage`,a.`department_view`
+            from `smart_authority` a left join `smart_user` b on a.`user_id`=b.id
+            where group_id=#{groupId}
+    </select>
 </mapper>
 </mapper>