|
|
@@ -81,6 +81,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
+ <update id="updateSysUserExtNoOgrCode" parameterType="SysUserExt">
|
|
|
+ update sys_user_ext
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="salesLevel != null and salesLevel != ''">sales_level = #{salesLevel},</if>
|
|
|
+ <if test="orgName != null and orgName != ''">org_name = #{orgName},</if>
|
|
|
+ <if test="sapEmployeeId != null ">sap_employee_id = #{sapEmployeeId},</if>
|
|
|
+ <if test="bossEmployeeId != null ">boss_employee_id = #{bossEmployeeId},</if>
|
|
|
+ <if test="bossName != null and bossName != ''">boss_name = #{bossName},</if>
|
|
|
+ <if test="customerCode != null and customerCode != ''"> customer_code =#{customerCode}, </if>
|
|
|
+ is_customer_manager = #{isCustomerManager},
|
|
|
+ <if test="postCode != null and postCode != ''"> post_code = #{postCode},</if>
|
|
|
+ <if test="postName != null and postName != ''"> post_name = #{postName}, </if>
|
|
|
+ <if test="identity != null and identity != ''"> identity = #{identity}, </if>
|
|
|
+ </trim>
|
|
|
+ where user_id = #{userId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<update id="updateSysUserExt" parameterType="SysUserExt">
|
|
|
update sys_user_ext
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
@@ -91,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="bossEmployeeId != null ">boss_employee_id = #{bossEmployeeId},</if>
|
|
|
<if test="bossName != null and bossName != ''">boss_name = #{bossName},</if>
|
|
|
<if test="customerCode != null and customerCode != ''"> customer_code =#{customerCode}, </if>
|
|
|
- is_customer_manager = #{isCustomerManager},
|
|
|
+ is_customer_manager = #{isCustomerManager},
|
|
|
<if test="postCode != null and postCode != ''"> post_code = #{postCode},</if>
|
|
|
<if test="postName != null and postName != ''"> post_name = #{postName}, </if>
|
|
|
<if test="identity != null and identity != ''"> identity = #{identity}, </if>
|
|
|
@@ -172,6 +191,58 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
+ <insert id="insertOrUpSysUserExtNoOrgcode" useGeneratedKeys="true" keyProperty="userId" keyColumn="user_id"
|
|
|
+ parameterType="SysUserExt">
|
|
|
+ insert INTO
|
|
|
+ sys_user_ext
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ user_id,
|
|
|
+ <if test="salesLevel != null and salesLevel != ''">sales_level,</if>
|
|
|
+ <if test="orgName != null and orgName != ''">org_name,</if>
|
|
|
+ <if test="sapEmployeeId != null ">sap_employee_id,</if>
|
|
|
+ <if test="bossEmployeeId != null ">boss_employee_id,</if>
|
|
|
+ <if test="bossName != null and bossName != ''">boss_name,</if>
|
|
|
+ <if test="customerCode != null and customerCode != ''"> customer_code,</if>
|
|
|
+ <if test="isCustomerManager != null and isCustomerManager != ''"> is_customer_manager,</if>
|
|
|
+ <if test="postCode != null and postCode != ''"> post_code ,</if>
|
|
|
+ <if test="postName != null and postName != ''"> post_name ,</if>
|
|
|
+ <if test="identity != null and identity != ''"> identity ,</if>
|
|
|
+ <if test="duty != null and duty != ''"> duty ,</if>
|
|
|
+ <if test="dutyName != null and dutyName != ''"> duty_name ,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ #{userId},
|
|
|
+ <if test="salesLevel != null and salesLevel != ''">#{salesLevel},</if>
|
|
|
+ <if test="orgName != null and orgName != ''">#{orgName},</if>
|
|
|
+ <if test="sapEmployeeId != null ">#{sapEmployeeId},</if>
|
|
|
+ <if test="bossEmployeeId != null ">#{bossEmployeeId},</if>
|
|
|
+ <if test="bossName != null and bossName != ''">#{bossName},</if>
|
|
|
+ <if test="customerCode != null and customerCode != ''"> #{customerCode},</if>
|
|
|
+ <if test="isCustomerManager != null and isCustomerManager != ''"> #{isCustomerManager},</if>
|
|
|
+ <if test="postCode != null and postCode != ''"> #{postCode},</if>
|
|
|
+ <if test="postName != null and postName != ''">#{postName}, </if>
|
|
|
+ <if test="identity != null and identity != ''">#{identity}, </if>
|
|
|
+ <if test="duty != null and duty != ''">#{duty}, </if>
|
|
|
+ <if test="dutyName != null and dutyName != ''">#{dutyName}, </if>
|
|
|
+ </trim>
|
|
|
+ ON DUPLICATE KEY UPDATE
|
|
|
+ <trim suffixOverrides=",">
|
|
|
+ <if test="salesLevel != null and salesLevel != ''">sales_level = #{salesLevel},</if>
|
|
|
+ <if test="orgName != null and orgName != ''">org_name = #{orgName},</if>
|
|
|
+ <if test="sapEmployeeId != null ">sap_employee_id = #{sapEmployeeId},</if>
|
|
|
+ <if test="bossEmployeeId != null ">boss_employee_id = #{bossEmployeeId},</if>
|
|
|
+ <if test="bossName != null and bossName != ''">boss_name = #{bossName},</if>
|
|
|
+ <if test="customerCode != null and customerCode != ''"> customer_code=#{customerCode},</if>
|
|
|
+ <if test="isCustomerManager != null and isCustomerManager != ''">is_customer_manager= #{isCustomerManager},</if>
|
|
|
+ <if test="postCode != null and postCode != ''"> post_code = #{postCode}, </if>
|
|
|
+ <if test="postName != null and postName != ''"> post_name = #{postName}, </if>
|
|
|
+ <if test="identity != null and identity != ''"> identity = #{identity}, </if>
|
|
|
+ <if test="duty != null and duty != ''"> duty = #{duty}, </if>
|
|
|
+ <if test="dutyName != null and dutyName != ''"> duty_name = #{dutyName}, </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+
|
|
|
<select id="selectEmployeeIdsByBossEmployeeId" parameterType="String" resultType="String">
|
|
|
select sap_employee_id
|
|
|
from sys_user_ext
|