|
@@ -12,10 +12,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="sapEmployeeId" column="sap_employee_id" />
|
|
<result property="sapEmployeeId" column="sap_employee_id" />
|
|
<result property="bossEmployeeId" column="boss_employee_id" />
|
|
<result property="bossEmployeeId" column="boss_employee_id" />
|
|
<result property="bossName" column="boss_name" />
|
|
<result property="bossName" column="boss_name" />
|
|
|
|
+ <result property="customerCode" column="customer_code" />
|
|
|
|
+ <result property="isCustomerManager" column="is_customer_manager" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectSysUserExtVo">
|
|
<sql id="selectSysUserExtVo">
|
|
- select user_id, org_code, sales_level, org_name, sap_employee_id, boss_employee_id, boss_name from sys_user_ext
|
|
|
|
|
|
+ select user_id, org_code, sales_level, org_name, sap_employee_id, boss_employee_id, boss_name,customer_code,is_customer_manager from sys_user_ext
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectSysUserExtList" parameterType="SysUserExt" resultMap="SysUserExtResult">
|
|
<select id="selectSysUserExtList" parameterType="SysUserExt" resultMap="SysUserExtResult">
|
|
@@ -27,6 +29,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="sapEmployeeId != null "> and sap_employee_id = #{sapEmployeeId}</if>
|
|
<if test="sapEmployeeId != null "> and sap_employee_id = #{sapEmployeeId}</if>
|
|
<if test="bossEmployeeId != null "> and boss_employee_id = #{bossEmployeeId}</if>
|
|
<if test="bossEmployeeId != null "> and boss_employee_id = #{bossEmployeeId}</if>
|
|
<if test="bossName != null and bossName != ''"> and boss_name like concat('%', #{bossName}, '%')</if>
|
|
<if test="bossName != null and bossName != ''"> and boss_name like concat('%', #{bossName}, '%')</if>
|
|
|
|
+ <if test="customerCode != null and customerCode != ''"> and customer_code like concat('%', #{customerCode}, '%')</if>
|
|
|
|
+ <if test="isCustomerManager != null and isCustomerManager != ''"> and is_customer_manager = #{isCustomerManager}</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -45,6 +49,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="sapEmployeeId != null ">sap_employee_id,</if>
|
|
<if test="sapEmployeeId != null ">sap_employee_id,</if>
|
|
<if test="bossEmployeeId != null ">boss_employee_id,</if>
|
|
<if test="bossEmployeeId != null ">boss_employee_id,</if>
|
|
<if test="bossName != null and bossName != ''">boss_name,</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>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="userId != null ">#{userId},</if>
|
|
<if test="userId != null ">#{userId},</if>
|
|
@@ -54,6 +60,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="sapEmployeeId != null ">#{sapEmployeeId},</if>
|
|
<if test="sapEmployeeId != null ">#{sapEmployeeId},</if>
|
|
<if test="bossEmployeeId != null ">#{bossEmployeeId},</if>
|
|
<if test="bossEmployeeId != null ">#{bossEmployeeId},</if>
|
|
<if test="bossName != null and bossName != ''">#{bossName},</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>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
@@ -66,6 +74,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="sapEmployeeId != null ">sap_employee_id = #{sapEmployeeId},</if>
|
|
<if test="sapEmployeeId != null ">sap_employee_id = #{sapEmployeeId},</if>
|
|
<if test="bossEmployeeId != null ">boss_employee_id = #{bossEmployeeId},</if>
|
|
<if test="bossEmployeeId != null ">boss_employee_id = #{bossEmployeeId},</if>
|
|
<if test="bossName != null and bossName != ''">boss_name = #{bossName},</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>
|
|
</trim>
|
|
</trim>
|
|
where user_id = #{userId}
|
|
where user_id = #{userId}
|
|
</update>
|
|
</update>
|
|
@@ -93,6 +103,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="sapEmployeeId != null ">sap_employee_id,</if>
|
|
<if test="sapEmployeeId != null ">sap_employee_id,</if>
|
|
<if test="bossEmployeeId != null ">boss_employee_id,</if>
|
|
<if test="bossEmployeeId != null ">boss_employee_id,</if>
|
|
<if test="bossName != null and bossName != ''">boss_name,</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>
|
|
|
|
+
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
#{userId},
|
|
#{userId},
|
|
@@ -102,6 +115,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="sapEmployeeId != null ">#{sapEmployeeId},</if>
|
|
<if test="sapEmployeeId != null ">#{sapEmployeeId},</if>
|
|
<if test="bossEmployeeId != null ">#{bossEmployeeId},</if>
|
|
<if test="bossEmployeeId != null ">#{bossEmployeeId},</if>
|
|
<if test="bossName != null and bossName != ''">#{bossName},</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>
|
|
|
|
+
|
|
</trim>
|
|
</trim>
|
|
ON DUPLICATE KEY UPDATE
|
|
ON DUPLICATE KEY UPDATE
|
|
<trim suffixOverrides=",">
|
|
<trim suffixOverrides=",">
|
|
@@ -111,6 +127,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="sapEmployeeId != null ">sap_employee_id = #{sapEmployeeId},</if>
|
|
<if test="sapEmployeeId != null ">sap_employee_id = #{sapEmployeeId},</if>
|
|
<if test="bossEmployeeId != null ">boss_employee_id = #{bossEmployeeId},</if>
|
|
<if test="bossEmployeeId != null ">boss_employee_id = #{bossEmployeeId},</if>
|
|
<if test="bossName != null and bossName != ''">boss_name = #{bossName},</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>
|
|
|
|
+
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|