add
This commit is contained in:
@@ -0,0 +1,229 @@
|
||||
<?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.cool.store.mapper.EnterpriseUserMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.EnterpriseUserDO">
|
||||
<id column="id" jdbcType="VARCHAR" property="id"/>
|
||||
<result column="user_id" jdbcType="VARCHAR" property="userId"/>
|
||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
||||
<result column="mobile" jdbcType="VARCHAR" property="mobile"/>
|
||||
<result column="email" jdbcType="VARCHAR" property="email"/>
|
||||
<result column="org_email" jdbcType="VARCHAR" property="orgEmail"/>
|
||||
<result column="main_admin" jdbcType="BIT" property="mainAdmin"/>
|
||||
<result column="is_admin" jdbcType="BIT" property="isAdmin"/>
|
||||
<result column="unionid" jdbcType="VARCHAR" property="unionid"/>
|
||||
<result column="position" jdbcType="VARCHAR" property="position"/>
|
||||
<result column="avatar" jdbcType="VARCHAR" property="avatar"/>
|
||||
<result column="jobnumber" jdbcType="VARCHAR" property="jobnumber"/>
|
||||
<result column="is_leader" jdbcType="BIT" property="isLeader"/>
|
||||
<result column="face_url" jdbcType="VARCHAR" property="faceUrl"/>
|
||||
<result column="user_status" jdbcType="TINYINT" property="userStatus"/>
|
||||
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.cool.store.entity.EnterpriseUserDO">
|
||||
<result column="user_region_ids" jdbcType="LONGVARCHAR" property="userRegionIds"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, user_id, name, remark, mobile, email, org_email, main_admin, is_admin, unionid,
|
||||
position, avatar, jobnumber, is_leader, face_url, user_status, deleted, create_time,
|
||||
update_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
user_region_ids
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into enterprise_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="mobile != null">
|
||||
mobile,
|
||||
</if>
|
||||
<if test="email != null">
|
||||
email,
|
||||
</if>
|
||||
<if test="orgEmail != null">
|
||||
org_email,
|
||||
</if>
|
||||
<if test="mainAdmin != null">
|
||||
main_admin,
|
||||
</if>
|
||||
<if test="isAdmin != null">
|
||||
is_admin,
|
||||
</if>
|
||||
<if test="unionid != null">
|
||||
unionid,
|
||||
</if>
|
||||
<if test="position != null">
|
||||
position,
|
||||
</if>
|
||||
<if test="avatar != null">
|
||||
avatar,
|
||||
</if>
|
||||
<if test="jobnumber != null">
|
||||
jobnumber,
|
||||
</if>
|
||||
<if test="isLeader != null">
|
||||
is_leader,
|
||||
</if>
|
||||
<if test="faceUrl != null">
|
||||
face_url,
|
||||
</if>
|
||||
<if test="userStatus != null">
|
||||
user_status,
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="userRegionIds != null">
|
||||
user_region_ids,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
#{userId},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="mobile != null">
|
||||
#{mobile},
|
||||
</if>
|
||||
<if test="email != null">
|
||||
#{email},
|
||||
</if>
|
||||
<if test="orgEmail != null">
|
||||
#{orgEmail},
|
||||
</if>
|
||||
<if test="mainAdmin != null">
|
||||
#{mainAdmin},
|
||||
</if>
|
||||
<if test="isAdmin != null">
|
||||
#{isAdmin},
|
||||
</if>
|
||||
<if test="unionid != null">
|
||||
#{unionid},
|
||||
</if>
|
||||
<if test="position != null">
|
||||
#{position},
|
||||
</if>
|
||||
<if test="avatar != null">
|
||||
#{avatar},
|
||||
</if>
|
||||
<if test="jobnumber != null">
|
||||
#{jobnumber},
|
||||
</if>
|
||||
<if test="isLeader != null">
|
||||
#{isLeader},
|
||||
</if>
|
||||
<if test="faceUrl != null">
|
||||
#{faceUrl},
|
||||
</if>
|
||||
<if test="userStatus != null">
|
||||
#{userStatus},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
#{deleted},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="userRegionIds != null">
|
||||
#{userRegionIds},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update enterprise_user
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark},
|
||||
</if>
|
||||
<if test="mobile != null">
|
||||
mobile = #{mobile},
|
||||
</if>
|
||||
<if test="email != null">
|
||||
email = #{email},
|
||||
</if>
|
||||
<if test="orgEmail != null">
|
||||
org_email = #{orgEmail},
|
||||
</if>
|
||||
<if test="mainAdmin != null">
|
||||
main_admin = #{mainAdmin},
|
||||
</if>
|
||||
<if test="isAdmin != null">
|
||||
is_admin = #{isAdmin},
|
||||
</if>
|
||||
<if test="unionid != null">
|
||||
unionid = #{unionid},
|
||||
</if>
|
||||
<if test="position != null">
|
||||
position = #{position},
|
||||
</if>
|
||||
<if test="avatar != null">
|
||||
avatar = #{avatar},
|
||||
</if>
|
||||
<if test="jobnumber != null">
|
||||
jobnumber = #{jobnumber},
|
||||
</if>
|
||||
<if test="isLeader != null">
|
||||
is_leader = #{isLeader},
|
||||
</if>
|
||||
<if test="faceUrl != null">
|
||||
face_url = #{faceUrl},
|
||||
</if>
|
||||
<if test="userStatus != null">
|
||||
user_status = #{userStatus},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime},
|
||||
</if>
|
||||
<if test="userRegionIds != null">
|
||||
user_region_ids = #{userRegionIds},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getUserInfoById" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>, <include refid="Blob_Column_List"/>
|
||||
from
|
||||
enterprise_user
|
||||
where
|
||||
user_id = #{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user