78 lines
4.1 KiB
XML
78 lines
4.1 KiB
XML
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||
|
<!DOCTYPE mapper
|
||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
<mapper namespace="com.ruoyi.sysSapUser.mapper.SysSapUserMapper">
|
||
|
|
||
|
<resultMap type="SysSapUser" id="SysSapUserResult">
|
||
|
<result property="sapUserId" column="sap_user_id" />
|
||
|
<result property="sapUserBm" column="sap_user_bm" />
|
||
|
<result property="sapUserName" column="sap_user_name" />
|
||
|
<result property="sysUserName" column="sys_user_name" />
|
||
|
<result property="sysUserNickName" column="sys_user_nick_name" />
|
||
|
<result property="sysUserPianqu" column="sys_user_pianqu" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectSysSapUserVo">
|
||
|
select sap_user_id, sap_user_bm, sap_user_name, sys_user_name, sys_user_nick_name, sys_user_pianqu from sys_sap_user
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectSysSapUserList" parameterType="SysSapUser" resultMap="SysSapUserResult">
|
||
|
<include refid="selectSysSapUserVo"/>
|
||
|
<where>
|
||
|
<if test="sapUserBm != null and sapUserBm != ''"> and sap_user_bm like concat('%', #{sapUserBm}, '%')</if>
|
||
|
<if test="sapUserName != null and sapUserName != ''"> and sap_user_name like concat('%', #{sapUserName}, '%')</if>
|
||
|
<if test="sysUserName != null and sysUserName != ''"> and sys_user_name like concat('%', #{sysUserName}, '%')</if>
|
||
|
<if test="sysUserNickName != null and sysUserNickName != ''"> and sys_user_nick_name like concat('%', #{sysUserNickName}, '%')</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectSysSapUserBySapUserId" parameterType="String" resultMap="SysSapUserResult">
|
||
|
<include refid="selectSysSapUserVo"/>
|
||
|
where sap_user_id = #{sapUserId}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertSysSapUser" parameterType="SysSapUser">
|
||
|
insert into sys_sap_user
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="sapUserId != null">sap_user_id,</if>
|
||
|
<if test="sapUserBm != null and sapUserBm != ''">sap_user_bm,</if>
|
||
|
<if test="sapUserName != null and sapUserName != ''">sap_user_name,</if>
|
||
|
<if test="sysUserName != null and sysUserName != ''">sys_user_name,</if>
|
||
|
<if test="sysUserNickName != null and sysUserNickName != ''">sys_user_nick_name,</if>
|
||
|
<if test="sysUserPianqu != null and sysUserPianqu != ''">sys_user_pianqu,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="sapUserId != null">#{sapUserId},</if>
|
||
|
<if test="sapUserBm != null and sapUserBm != ''">#{sapUserBm},</if>
|
||
|
<if test="sapUserName != null and sapUserName != ''">#{sapUserName},</if>
|
||
|
<if test="sysUserName != null and sysUserName != ''">#{sysUserName},</if>
|
||
|
<if test="sysUserNickName != null and sysUserNickName != ''">#{sysUserNickName},</if>
|
||
|
<if test="sysUserPianqu != null and sysUserPianqu != ''">#{sysUserPianqu},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateSysSapUser" parameterType="SysSapUser">
|
||
|
update sys_sap_user
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="sapUserBm != null and sapUserBm != ''">sap_user_bm = #{sapUserBm},</if>
|
||
|
<if test="sapUserName != null and sapUserName != ''">sap_user_name = #{sapUserName},</if>
|
||
|
<if test="sysUserName != null and sysUserName != ''">sys_user_name = #{sysUserName},</if>
|
||
|
<if test="sysUserNickName != null and sysUserNickName != ''">sys_user_nick_name = #{sysUserNickName},</if>
|
||
|
<if test="sysUserPianqu != null and sysUserPianqu != ''">sys_user_pianqu = #{sysUserPianqu},</if>
|
||
|
</trim>
|
||
|
where sap_user_id = #{sapUserId}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteSysSapUserBySapUserId" parameterType="String">
|
||
|
delete from sys_sap_user where sap_user_id = #{sapUserId}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteSysSapUserBySapUserIds" parameterType="String">
|
||
|
delete from sys_sap_user where sap_user_id in
|
||
|
<foreach item="sapUserId" collection="array" open="(" separator="," close=")">
|
||
|
#{sapUserId}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
</mapper>
|