|
|
@@ -74,13 +74,23 @@
|
|
|
</where>
|
|
|
</sql>
|
|
|
|
|
|
- <sql id="idsForeach">
|
|
|
- <!-- 根据主键staffId批量操作 -->
|
|
|
- WHERE staff_id in
|
|
|
- <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </sql>
|
|
|
+ <!-- 根据主键修改 -->
|
|
|
+<!-- <update id="update">-->
|
|
|
+<!-- update dkic_b.t_mst_staff-->
|
|
|
+<!-- <set>-->
|
|
|
+<!-- <if test="staffCode != null">staff_code = #{staffCode},</if>-->
|
|
|
+<!-- <if test="staffName != null" >staff_name = #{staffName},</if>-->
|
|
|
+<!-- <if test="staffPhone != null">staff_phone = #{staffPhone},</if>-->
|
|
|
+<!-- <if test="orgId != null">org_id = #{orgId},</if>-->
|
|
|
+<!-- <if test="roleIds != null">role_ids = #{roleIds},</if>-->
|
|
|
+<!-- <if test="remarks != null">remarks = #{remarks},</if>-->
|
|
|
+<!-- <if test="flgCanLogin != null">flg_can_login = #{flgCanLogin},</if>-->
|
|
|
+<!-- <if test="updateUserId != null">update_user_id = #{updateUserId},</if>-->
|
|
|
+<!-- <if test="updateUserName != null">update_user_name = #{updateUserName},</if>-->
|
|
|
+<!-- <if test="updateTime != null">update_time = #{updateTime},</if>-->
|
|
|
+<!-- </set>-->
|
|
|
+<!-- where staff_id = #{staffId}::uuid-->
|
|
|
+<!-- </update>-->
|
|
|
|
|
|
<!-- 查询表t_mst_staff,(条件查询+分页)列表 -->
|
|
|
<select id="selectByCond" resultMap="BaseResultMap">
|
|
|
@@ -109,27 +119,15 @@
|
|
|
<select id="selectById" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
|
+ , org.org_name
|
|
|
FROM dkic_b.t_mst_staff t
|
|
|
+ LEFT JOIN dkic_b.t_mst_org org
|
|
|
+ ON t.org_Id = org.org_Id
|
|
|
WHERE t.staff_id = #{staffId}::uuid
|
|
|
</select>
|
|
|
|
|
|
- <!-- 根据主键锁定表t_mst_staff的一行数据 -->
|
|
|
- <select id="selectByIdForUpdate" resultMap="BaseResultMap">
|
|
|
- SELECT
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
- FROM dkic_b.t_mst_staff t
|
|
|
- WHERE t.staff_id = #{staffId}
|
|
|
- for update
|
|
|
- </select>
|
|
|
|
|
|
- <!-- 根据主键锁定表t_mst_staff的多行数据 -->
|
|
|
- <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
|
|
|
- SELECT
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
- FROM dkic_b.t_mst_staff t
|
|
|
- <include refid="idsForeach"/>
|
|
|
- for update
|
|
|
- </select>
|
|
|
+
|
|
|
|
|
|
<insert id="insertBatch">
|
|
|
insert into dkic_b.t_mst_staff
|