| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?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.shkpr.service.customgateway.zydma.mapper.primary.PersonnelInfoMapper">
- <select id="findExistentIds" resultType="java.lang.String">
- SELECT uid FROM k2_personnel_info
- WHERE uid IN
- <foreach item="id" collection="ids" open="(" separator="," close=")">
- #{id}
- </foreach>
- </select>
- <select id="findBydUid" resultType="com.shkpr.service.customgateway.zydma.domain.po.PersonnelInfo">
- select id,
- uid,
- account,
- password,
- real_name,
- address,
- sex,
- phone,
- email,
- avatar,
- role_id,
- dept_id,
- post_id,
- status,
- param1,
- param2,
- create_time,
- update_time,
- org
- from k2_personnel_info
- where uid = #{uid,jdbcType=VARCHAR}
- </select>
- <insert id="save">
- insert into k2_personnel_info
- <trim prefix="(" suffix=")" suffixOverrides=",">
- create_time,
- <if test="uid != null and uid != ''">uid,</if>
- <if test="account != null and account != ''">account,</if>
- <if test="realName != null and realName != ''">real_name,</if>
- <if test="phone != null and phone != ''">phone,</if>
- <if test="email != null and email != ''">email,</if>
- <if test="roleId != null and roleId != ''">role_id,</if>
- <if test="status != null">status,</if>
- <if test="password != null">"password",</if>
- <if test="org != null and org != ''">org,</if>
- </trim>
- values
- <trim prefix="(" suffix=")" suffixOverrides=",">
- now(),
- <if test="uid != null and uid != ''">#{uid,jdbcType=VARCHAR},</if>
- <if test="account != null and account != ''">#{account,jdbcType=VARCHAR},</if>
- <if test="realName != null and realName != ''">#{realName,jdbcType=VARCHAR},</if>
- <if test="phone != null and phone != ''">#{phone,jdbcType=VARCHAR},</if>
- <if test="email != null and email != ''">#{email,jdbcType=VARCHAR},</if>
- <if test="roleId != null and roleId != ''">#{roleId,jdbcType=VARCHAR},</if>
- <if test="status != null">#{status,jdbcType=SMALLINT},</if>
- <if test="password != null">#{password,jdbcType=VARCHAR},</if>
- <if test="org != null and org != ''">#{org,jdbcType=VARCHAR},</if>
- </trim>
- </insert>
- <update id="update">
- update k2_personnel_info
- <set>
- <if test="account != null and account != ''">account = #{account,jdbcType=VARCHAR},</if>
- <if test="realName != null and realName != ''">real_name = #{realName,jdbcType=VARCHAR},</if>
- <if test="phone != null and phone != ''">phone = #{phone,jdbcType=VARCHAR},</if>
- <if test="email != null and email != ''">email = #{email,jdbcType=VARCHAR},</if>
- <if test="status != null">status = #{status,jdbcType=SMALLINT},</if>
- <if test=" password != null">"password" = #{password,jdbcType=VARCHAR},</if>
- update_time = now()
- </set>
- WHERE uid = #{uid,jdbcType=VARCHAR}
- </update>
- </mapper>
|