1416 lines
61 KiB
XML
1416 lines
61 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.rzyc.mapper.user.SysUserMapper">
|
|
<resultMap id="BaseResultMap" type="com.rzyc.model.user.SysUser">
|
|
<id column="SysUserId" jdbcType="CHAR" property="sysuserid" />
|
|
<result column="UserType" jdbcType="VARCHAR" property="usertype" />
|
|
<result column="SortId" jdbcType="INTEGER" property="sortid" />
|
|
<result column="OrgCode" jdbcType="VARCHAR" property="orgcode" />
|
|
<result column="street_code" jdbcType="VARCHAR" property="streetCode" />
|
|
<result column="community_code" jdbcType="VARCHAR" property="communityCode" />
|
|
<result column="net_code" jdbcType="VARCHAR" property="netCode" />
|
|
<result column="SysUnitOrEntId" jdbcType="VARCHAR" property="sysunitorentid" />
|
|
<result column="SysDeptId" jdbcType="VARCHAR" property="sysdeptid" />
|
|
<result column="SysUnitOrEntName" jdbcType="VARCHAR" property="sysunitorentname" />
|
|
<result column="SysDeptName" jdbcType="VARCHAR" property="sysdeptname" />
|
|
<result column="SysUserName" jdbcType="VARCHAR" property="sysusername" />
|
|
<result column="SysPassword" jdbcType="VARCHAR" property="syspassword" />
|
|
<result column="UserRoles" jdbcType="VARCHAR" property="userroles" />
|
|
<result column="ChinaName" jdbcType="VARCHAR" property="chinaname" />
|
|
<result column="PerformClassName" jdbcType="VARCHAR" property="performClassName" />
|
|
<result column="superName" jdbcType="VARCHAR" property="superName" />
|
|
<result column="superPerfromId" jdbcType="VARCHAR" property="superPerfromId" />
|
|
<result column="Description" jdbcType="VARCHAR" property="description" />
|
|
<result column="PinYin" jdbcType="VARCHAR" property="pinyin" />
|
|
<result column="IDCard" jdbcType="VARCHAR" property="idcard" />
|
|
<result column="SysSex" jdbcType="VARCHAR" property="syssex" />
|
|
<result column="Birthplace" jdbcType="VARCHAR" property="birthplace" />
|
|
<result column="Birthday" jdbcType="TIMESTAMP" property="birthday" />
|
|
<result column="HealthStatus" jdbcType="VARCHAR" property="healthstatus" />
|
|
<result column="SysPhoto" jdbcType="VARCHAR" property="sysphoto" />
|
|
<result column="EducationLevel" jdbcType="VARCHAR" property="educationlevel" />
|
|
<result column="SysFamily" jdbcType="VARCHAR" property="sysfamily" />
|
|
<result column="Marriage" jdbcType="VARCHAR" property="marriage" />
|
|
<result column="Duration" jdbcType="TIMESTAMP" property="duration" />
|
|
<result column="SysTitle" jdbcType="VARCHAR" property="systitle" />
|
|
<result column="post_path" jdbcType="VARCHAR" property="postPath" />
|
|
<result column="post_name" jdbcType="VARCHAR" property="postName" />
|
|
<result column="OfficeTel" jdbcType="VARCHAR" property="officetel" />
|
|
<result column="MobileTel" jdbcType="VARCHAR" property="mobiletel" />
|
|
<result column="Email" jdbcType="VARCHAR" property="email" />
|
|
<result column="QQInter" jdbcType="VARCHAR" property="qqinter" />
|
|
<result column="WeixinInter" jdbcType="VARCHAR" property="weixininter" />
|
|
<result column="manage_state" property="manageState" />
|
|
<result column="ModifiedBy" jdbcType="VARCHAR" property="modifiedby" />
|
|
<result column="ModifiedOn" jdbcType="TIMESTAMP" property="modifiedon" />
|
|
<result column="CreatedBy" jdbcType="VARCHAR" property="createdby" />
|
|
<result column="CreatedOn" jdbcType="TIMESTAMP" property="createdon" />
|
|
<result column="SysUnitId" jdbcType="VARCHAR" property="sysUnitId"/>
|
|
<result column="member_type" jdbcType="INTEGER" property="memberType"/>
|
|
<result column="area_code" jdbcType="INTEGER" property="areaCode"/>
|
|
<result column="area_path" jdbcType="INTEGER" property="areaPath"/>
|
|
<result column="area_name" jdbcType="INTEGER" property="areaName"/>
|
|
</resultMap>
|
|
<sql id="Example_Where_Clause">
|
|
<where>
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
<if test="criteria.valid">
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
<choose>
|
|
<when test="criterion.noValue">
|
|
and ${criterion.condition}
|
|
</when>
|
|
<when test="criterion.singleValue">
|
|
and ${criterion.condition} #{criterion.value}
|
|
</when>
|
|
<when test="criterion.betweenValue">
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
</when>
|
|
<when test="criterion.listValue">
|
|
and ${criterion.condition}
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
#{listItem}
|
|
</foreach>
|
|
</when>
|
|
</choose>
|
|
</foreach>
|
|
</trim>
|
|
</if>
|
|
</foreach>
|
|
</where>
|
|
</sql>
|
|
<sql id="Update_By_Example_Where_Clause">
|
|
<where>
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
<if test="criteria.valid">
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
<choose>
|
|
<when test="criterion.noValue">
|
|
and ${criterion.condition}
|
|
</when>
|
|
<when test="criterion.singleValue">
|
|
and ${criterion.condition} #{criterion.value}
|
|
</when>
|
|
<when test="criterion.betweenValue">
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
</when>
|
|
<when test="criterion.listValue">
|
|
and ${criterion.condition}
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
#{listItem}
|
|
</foreach>
|
|
</when>
|
|
</choose>
|
|
</foreach>
|
|
</trim>
|
|
</if>
|
|
</foreach>
|
|
</where>
|
|
</sql>
|
|
<sql id="Base_Column_List">
|
|
SysUserId, UserType, SortId, OrgCode, SysUnitOrEntId, SysDeptId, SysUnitOrEntName,
|
|
SysDeptName, SysUserName, SysPassword, UserRoles, ChinaName, Description, PinYin,
|
|
IDCard, SysSex, Birthplace, Birthday, HealthStatus, SysPhoto, EducationLevel, SysFamily,
|
|
Marriage, Duration, SysTitle, OfficeTel, MobileTel, Email, QQInter, WeixinInter,
|
|
ModifiedBy, ModifiedOn, CreatedBy, CreatedOn
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.rzyc.model.user.SysUserExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from SysUser
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
<if test="orderByClause != null">
|
|
order by ${orderByClause}
|
|
</if>
|
|
<if test="limit != null">
|
|
<if test="offset != null">
|
|
limit ${offset}, ${limit}
|
|
</if>
|
|
<if test="offset == null">
|
|
limit ${limit}
|
|
</if>
|
|
</if>
|
|
</select>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
select
|
|
sys.*,su.SysUnitId
|
|
from SysUser sys left join SysUnit su on sys.SysDeptId = su.SysUnitId
|
|
where SysUserId = #{sysuserid,jdbcType=CHAR}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
delete from SysUser
|
|
where SysUserId = #{sysuserid,jdbcType=CHAR}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="com.rzyc.model.user.SysUserExample">
|
|
delete from SysUser
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.rzyc.model.user.SysUser">
|
|
insert into SysUser (SysUserId, UserType, SortId,
|
|
OrgCode,
|
|
street_code,
|
|
community_code,
|
|
net_code,
|
|
area_code,
|
|
area_path,
|
|
area_name,
|
|
supervise_area,
|
|
SysUnitOrEntId, SysDeptId,
|
|
SysUnitOrEntName, SysDeptName, SysUserName,
|
|
SysPassword, UserRoles, ChinaName,
|
|
Description, PinYin, IDCard,
|
|
SysSex, Birthplace, Birthday,
|
|
HealthStatus, SysPhoto, EducationLevel,
|
|
SysFamily, Marriage, Duration,
|
|
SysTitle,
|
|
post_path,
|
|
post_name,
|
|
OfficeTel, MobileTel,member_type,
|
|
Email, QQInter, WeixinInter,
|
|
ModifiedBy, ModifiedOn, CreatedBy,
|
|
CreatedOn,State)
|
|
values (#{sysuserid,jdbcType=CHAR}, #{usertype,jdbcType=VARCHAR}, #{sortid,jdbcType=INTEGER},
|
|
#{orgcode,jdbcType=VARCHAR},
|
|
#{streetCode,jdbcType=VARCHAR},
|
|
#{communityCode,jdbcType=VARCHAR},
|
|
#{netCode,jdbcType=VARCHAR},
|
|
#{areaCode,jdbcType=VARCHAR},
|
|
#{areaPath,jdbcType=VARCHAR},
|
|
#{areaName,jdbcType=VARCHAR},
|
|
#{superviseArea,jdbcType=VARCHAR},
|
|
#{sysunitorentid,jdbcType=VARCHAR}, #{sysdeptid,jdbcType=VARCHAR},
|
|
#{sysunitorentname,jdbcType=VARCHAR}, #{sysdeptname,jdbcType=VARCHAR}, #{sysusername,jdbcType=VARCHAR},
|
|
#{syspassword,jdbcType=VARCHAR}, #{userroles,jdbcType=VARCHAR}, #{chinaname,jdbcType=VARCHAR},
|
|
#{description,jdbcType=VARCHAR}, #{pinyin,jdbcType=VARCHAR}, #{idcard,jdbcType=VARCHAR},
|
|
#{syssex,jdbcType=VARCHAR}, #{birthplace,jdbcType=VARCHAR}, #{birthday,jdbcType=TIMESTAMP},
|
|
#{healthstatus,jdbcType=VARCHAR}, #{sysphoto,jdbcType=VARCHAR}, #{educationlevel,jdbcType=VARCHAR},
|
|
#{sysfamily,jdbcType=VARCHAR}, #{marriage,jdbcType=VARCHAR}, #{duration,jdbcType=TIMESTAMP},
|
|
#{systitle,jdbcType=VARCHAR},
|
|
#{postPath,jdbcType=VARCHAR},
|
|
#{postName,jdbcType=VARCHAR},
|
|
#{officetel,jdbcType=VARCHAR},
|
|
#{mobiletel,jdbcType=VARCHAR},
|
|
#{memberType,jdbcType=VARCHAR},
|
|
#{email,jdbcType=VARCHAR}, #{qqinter,jdbcType=VARCHAR}, #{weixininter,jdbcType=VARCHAR},
|
|
#{modifiedby,jdbcType=VARCHAR}, #{modifiedon,jdbcType=TIMESTAMP}, #{createdby,jdbcType=VARCHAR},
|
|
#{createdon,jdbcType=TIMESTAMP},
|
|
#{state,jdbcType=VARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.rzyc.model.user.SysUser">
|
|
insert into SysUser
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="sysuserid != null">
|
|
SysUserId,
|
|
</if>
|
|
<if test="usertype != null">
|
|
UserType,
|
|
</if>
|
|
<if test="sortid != null">
|
|
SortId,
|
|
</if>
|
|
<if test="orgcode != null">
|
|
OrgCode,
|
|
</if>
|
|
<if test="sysunitorentid != null">
|
|
SysUnitOrEntId,
|
|
</if>
|
|
<if test="sysdeptid != null">
|
|
SysDeptId,
|
|
</if>
|
|
<if test="sysunitorentname != null">
|
|
SysUnitOrEntName,
|
|
</if>
|
|
<if test="sysdeptname != null">
|
|
SysDeptName,
|
|
</if>
|
|
<if test="sysusername != null">
|
|
SysUserName,
|
|
</if>
|
|
<if test="syspassword != null">
|
|
SysPassword,
|
|
</if>
|
|
<if test="userroles != null">
|
|
UserRoles,
|
|
</if>
|
|
<if test="chinaname != null">
|
|
ChinaName,
|
|
</if>
|
|
<if test="description != null">
|
|
Description,
|
|
</if>
|
|
<if test="pinyin != null">
|
|
PinYin,
|
|
</if>
|
|
<if test="idcard != null">
|
|
IDCard,
|
|
</if>
|
|
<if test="syssex != null">
|
|
SysSex,
|
|
</if>
|
|
<if test="birthplace != null">
|
|
Birthplace,
|
|
</if>
|
|
<if test="birthday != null">
|
|
Birthday,
|
|
</if>
|
|
<if test="healthstatus != null">
|
|
HealthStatus,
|
|
</if>
|
|
<if test="sysphoto != null">
|
|
SysPhoto,
|
|
</if>
|
|
<if test="educationlevel != null">
|
|
EducationLevel,
|
|
</if>
|
|
<if test="sysfamily != null">
|
|
SysFamily,
|
|
</if>
|
|
<if test="marriage != null">
|
|
Marriage,
|
|
</if>
|
|
<if test="duration != null">
|
|
Duration,
|
|
</if>
|
|
<if test="systitle != null">
|
|
SysTitle,
|
|
</if>
|
|
<if test="officetel != null">
|
|
OfficeTel,
|
|
</if>
|
|
<if test="mobiletel != null">
|
|
MobileTel,
|
|
</if>
|
|
<if test="email != null">
|
|
Email,
|
|
</if>
|
|
<if test="qqinter != null">
|
|
QQInter,
|
|
</if>
|
|
<if test="weixininter != null">
|
|
WeixinInter,
|
|
</if>
|
|
<if test="modifiedby != null">
|
|
ModifiedBy,
|
|
</if>
|
|
<if test="modifiedon != null">
|
|
ModifiedOn,
|
|
</if>
|
|
<if test="createdby != null">
|
|
CreatedBy,
|
|
</if>
|
|
<if test="createdon != null">
|
|
CreatedOn,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="sysuserid != null">
|
|
#{sysuserid,jdbcType=CHAR},
|
|
</if>
|
|
<if test="usertype != null">
|
|
#{usertype,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sortid != null">
|
|
#{sortid,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="orgcode != null">
|
|
#{orgcode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysunitorentid != null">
|
|
#{sysunitorentid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysdeptid != null">
|
|
#{sysdeptid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysunitorentname != null">
|
|
#{sysunitorentname,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysdeptname != null">
|
|
#{sysdeptname,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysusername != null">
|
|
#{sysusername,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="syspassword != null">
|
|
#{syspassword,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="userroles != null">
|
|
#{userroles,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="chinaname != null">
|
|
#{chinaname,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="description != null">
|
|
#{description,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="pinyin != null">
|
|
#{pinyin,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="idcard != null">
|
|
#{idcard,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="syssex != null">
|
|
#{syssex,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="birthplace != null">
|
|
#{birthplace,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="birthday != null">
|
|
#{birthday,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="healthstatus != null">
|
|
#{healthstatus,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysphoto != null">
|
|
#{sysphoto,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="educationlevel != null">
|
|
#{educationlevel,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysfamily != null">
|
|
#{sysfamily,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="marriage != null">
|
|
#{marriage,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="duration != null">
|
|
#{duration,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="systitle != null">
|
|
#{systitle,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="officetel != null">
|
|
#{officetel,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="mobiletel != null">
|
|
#{mobiletel,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="email != null">
|
|
#{email,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="qqinter != null">
|
|
#{qqinter,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="weixininter != null">
|
|
#{weixininter,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="modifiedby != null">
|
|
#{modifiedby,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="modifiedon != null">
|
|
#{modifiedon,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="createdby != null">
|
|
#{createdby,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createdon != null">
|
|
#{createdon,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.rzyc.model.user.SysUserExample" resultType="java.lang.Long">
|
|
select count(*) from SysUser
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update SysUser
|
|
<set>
|
|
<if test="record.sysuserid != null">
|
|
SysUserId = #{record.sysuserid,jdbcType=CHAR},
|
|
</if>
|
|
<if test="record.usertype != null">
|
|
UserType = #{record.usertype,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.sortid != null">
|
|
SortId = #{record.sortid,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="record.orgcode != null">
|
|
OrgCode = #{record.orgcode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.sysunitorentid != null">
|
|
SysUnitOrEntId = #{record.sysunitorentid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.sysdeptid != null">
|
|
SysDeptId = #{record.sysdeptid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.sysunitorentname != null">
|
|
SysUnitOrEntName = #{record.sysunitorentname,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.sysdeptname != null">
|
|
SysDeptName = #{record.sysdeptname,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.sysusername != null">
|
|
SysUserName = #{record.sysusername,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.syspassword != null">
|
|
SysPassword = #{record.syspassword,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.userroles != null">
|
|
UserRoles = #{record.userroles,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.chinaname != null">
|
|
ChinaName = #{record.chinaname,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.description != null">
|
|
Description = #{record.description,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.pinyin != null">
|
|
PinYin = #{record.pinyin,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.idcard != null">
|
|
IDCard = #{record.idcard,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.syssex != null">
|
|
SysSex = #{record.syssex,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.birthplace != null">
|
|
Birthplace = #{record.birthplace,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.birthday != null">
|
|
Birthday = #{record.birthday,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.healthstatus != null">
|
|
HealthStatus = #{record.healthstatus,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.sysphoto != null">
|
|
SysPhoto = #{record.sysphoto,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.educationlevel != null">
|
|
EducationLevel = #{record.educationlevel,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.sysfamily != null">
|
|
SysFamily = #{record.sysfamily,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.marriage != null">
|
|
Marriage = #{record.marriage,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.duration != null">
|
|
Duration = #{record.duration,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.systitle != null">
|
|
SysTitle = #{record.systitle,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.officetel != null">
|
|
OfficeTel = #{record.officetel,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.mobiletel != null">
|
|
MobileTel = #{record.mobiletel,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.email != null">
|
|
Email = #{record.email,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.qqinter != null">
|
|
QQInter = #{record.qqinter,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.weixininter != null">
|
|
WeixinInter = #{record.weixininter,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.modifiedby != null">
|
|
ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.modifiedon != null">
|
|
ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.createdby != null">
|
|
CreatedBy = #{record.createdby,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.createdon != null">
|
|
CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update SysUser
|
|
set SysUserId = #{record.sysuserid,jdbcType=CHAR},
|
|
UserType = #{record.usertype,jdbcType=VARCHAR},
|
|
SortId = #{record.sortid,jdbcType=INTEGER},
|
|
OrgCode = #{record.orgcode,jdbcType=VARCHAR},
|
|
SysUnitOrEntId = #{record.sysunitorentid,jdbcType=VARCHAR},
|
|
SysDeptId = #{record.sysdeptid,jdbcType=VARCHAR},
|
|
SysUnitOrEntName = #{record.sysunitorentname,jdbcType=VARCHAR},
|
|
SysDeptName = #{record.sysdeptname,jdbcType=VARCHAR},
|
|
SysUserName = #{record.sysusername,jdbcType=VARCHAR},
|
|
SysPassword = #{record.syspassword,jdbcType=VARCHAR},
|
|
UserRoles = #{record.userroles,jdbcType=VARCHAR},
|
|
ChinaName = #{record.chinaname,jdbcType=VARCHAR},
|
|
Description = #{record.description,jdbcType=VARCHAR},
|
|
PinYin = #{record.pinyin,jdbcType=VARCHAR},
|
|
IDCard = #{record.idcard,jdbcType=VARCHAR},
|
|
SysSex = #{record.syssex,jdbcType=VARCHAR},
|
|
Birthplace = #{record.birthplace,jdbcType=VARCHAR},
|
|
Birthday = #{record.birthday,jdbcType=TIMESTAMP},
|
|
HealthStatus = #{record.healthstatus,jdbcType=VARCHAR},
|
|
SysPhoto = #{record.sysphoto,jdbcType=VARCHAR},
|
|
EducationLevel = #{record.educationlevel,jdbcType=VARCHAR},
|
|
SysFamily = #{record.sysfamily,jdbcType=VARCHAR},
|
|
Marriage = #{record.marriage,jdbcType=VARCHAR},
|
|
Duration = #{record.duration,jdbcType=TIMESTAMP},
|
|
SysTitle = #{record.systitle,jdbcType=VARCHAR},
|
|
OfficeTel = #{record.officetel,jdbcType=VARCHAR},
|
|
MobileTel = #{record.mobiletel,jdbcType=VARCHAR},
|
|
Email = #{record.email,jdbcType=VARCHAR},
|
|
QQInter = #{record.qqinter,jdbcType=VARCHAR},
|
|
WeixinInter = #{record.weixininter,jdbcType=VARCHAR},
|
|
ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR},
|
|
ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
|
|
CreatedBy = #{record.createdby,jdbcType=VARCHAR},
|
|
CreatedOn = #{record.createdon,jdbcType=TIMESTAMP}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.rzyc.model.user.SysUser">
|
|
update SysUser
|
|
<set>
|
|
<if test="usertype != null">
|
|
UserType = #{usertype,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sortid != null">
|
|
SortId = #{sortid,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="orgcode != null">
|
|
OrgCode = #{orgcode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysunitorentid != null">
|
|
SysUnitOrEntId = #{sysunitorentid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysdeptid != null">
|
|
SysDeptId = #{sysdeptid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysunitorentname != null">
|
|
SysUnitOrEntName = #{sysunitorentname,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysdeptname != null">
|
|
SysDeptName = #{sysdeptname,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysusername != null">
|
|
SysUserName = #{sysusername,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="syspassword != null">
|
|
SysPassword = #{syspassword,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="userroles != null">
|
|
UserRoles = #{userroles,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="chinaname != null">
|
|
ChinaName = #{chinaname,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="description != null">
|
|
Description = #{description,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="pinyin != null">
|
|
PinYin = #{pinyin,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="idcard != null">
|
|
IDCard = #{idcard,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="syssex != null">
|
|
SysSex = #{syssex,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="birthplace != null">
|
|
Birthplace = #{birthplace,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="birthday != null">
|
|
Birthday = #{birthday,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="healthstatus != null">
|
|
HealthStatus = #{healthstatus,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysphoto != null">
|
|
SysPhoto = #{sysphoto,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="educationlevel != null">
|
|
EducationLevel = #{educationlevel,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysfamily != null">
|
|
SysFamily = #{sysfamily,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="marriage != null">
|
|
Marriage = #{marriage,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="duration != null">
|
|
Duration = #{duration,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="systitle != null">
|
|
SysTitle = #{systitle,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="officetel != null">
|
|
OfficeTel = #{officetel,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="mobiletel != null">
|
|
MobileTel = #{mobiletel,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="email != null">
|
|
Email = #{email,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="qqinter != null">
|
|
QQInter = #{qqinter,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="weixininter != null">
|
|
WeixinInter = #{weixininter,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="modifiedby != null">
|
|
ModifiedBy = #{modifiedby,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="modifiedon != null">
|
|
ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="createdby != null">
|
|
CreatedBy = #{createdby,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createdon != null">
|
|
CreatedOn = #{createdon,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</set>
|
|
where SysUserId = #{sysuserid,jdbcType=CHAR}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.rzyc.model.user.SysUser">
|
|
update SysUser
|
|
set UserType = #{usertype,jdbcType=VARCHAR},
|
|
SortId = #{sortid,jdbcType=INTEGER},
|
|
OrgCode = #{orgcode,jdbcType=VARCHAR},
|
|
SysUnitOrEntId = #{sysunitorentid,jdbcType=VARCHAR},
|
|
SysDeptId = #{sysdeptid,jdbcType=VARCHAR},
|
|
SysUnitOrEntName = #{sysunitorentname,jdbcType=VARCHAR},
|
|
SysDeptName = #{sysdeptname,jdbcType=VARCHAR},
|
|
SysUserName = #{sysusername,jdbcType=VARCHAR},
|
|
SysPassword = #{syspassword,jdbcType=VARCHAR},
|
|
UserRoles = #{userroles,jdbcType=VARCHAR},
|
|
ChinaName = #{chinaname,jdbcType=VARCHAR},
|
|
Description = #{description,jdbcType=VARCHAR},
|
|
PinYin = #{pinyin,jdbcType=VARCHAR},
|
|
IDCard = #{idcard,jdbcType=VARCHAR},
|
|
SysSex = #{syssex,jdbcType=VARCHAR},
|
|
Birthplace = #{birthplace,jdbcType=VARCHAR},
|
|
Birthday = #{birthday,jdbcType=TIMESTAMP},
|
|
HealthStatus = #{healthstatus,jdbcType=VARCHAR},
|
|
SysPhoto = #{sysphoto,jdbcType=VARCHAR},
|
|
EducationLevel = #{educationlevel,jdbcType=VARCHAR},
|
|
SysFamily = #{sysfamily,jdbcType=VARCHAR},
|
|
Marriage = #{marriage,jdbcType=VARCHAR},
|
|
Duration = #{duration,jdbcType=TIMESTAMP},
|
|
SysTitle = #{systitle,jdbcType=VARCHAR},
|
|
OfficeTel = #{officetel,jdbcType=VARCHAR},
|
|
MobileTel = #{mobiletel,jdbcType=VARCHAR},
|
|
Email = #{email,jdbcType=VARCHAR},
|
|
QQInter = #{qqinter,jdbcType=VARCHAR},
|
|
WeixinInter = #{weixininter,jdbcType=VARCHAR},
|
|
ModifiedBy = #{modifiedby,jdbcType=VARCHAR},
|
|
ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
|
|
CreatedBy = #{createdby,jdbcType=VARCHAR},
|
|
CreatedOn = #{createdon,jdbcType=TIMESTAMP}
|
|
where SysUserId = #{sysuserid,jdbcType=CHAR}
|
|
</update>
|
|
|
|
<!--通过用户名 查询用户信息-->
|
|
<select id="findBySysUserName" resultMap="BaseResultMap">
|
|
select * from `SysUser` su where su.`SysUserName` = #{sysusername} and su.State = '启用';
|
|
</select>
|
|
|
|
<!--政府用户列表-->
|
|
<select id="govUser" resultMap="BaseResultMap">
|
|
SELECT lp.PerformClassName,su.* FROM `SysUser` su
|
|
LEFT JOIN ListPerform lp ON su.SysTitle = lp.ListPerformId
|
|
WHERE su.`UserType` = '政府用户'
|
|
AND su.SysUserId != #{sysUserId}
|
|
and su.ChinaName like #{name}
|
|
ORDER BY lp.`SortId` ASC
|
|
</select>
|
|
|
|
<!--通过企业id 查询用户信息-->
|
|
<select id="findByEntId" resultMap="BaseResultMap">
|
|
SELECT * FROM SysUser su WHERE su.SysUnitOrEntId = #{sysUnitOrEntId}
|
|
</select>
|
|
|
|
<!--修改密码-->
|
|
<update id="changePassword">
|
|
UPDATE SysUser SET SysPassword = #{sysPassword} WHERE SysUserId = #{sysUserId}
|
|
</update>
|
|
|
|
<!--修改中文名-->
|
|
<update id="changeChinaName">
|
|
UPDATE SysUser SET ChinaName = #{chinaName}
|
|
WHERE SysUserId = #{sysUserId}
|
|
</update>
|
|
|
|
<!--部门用户集合-->
|
|
<resultMap id="SysUserResultMap" type="com.rzyc.model.user.SysUser">
|
|
<id column="SysUserId" jdbcType="CHAR" property="sysuserid" />
|
|
<result column="UserType" jdbcType="VARCHAR" property="usertype" />
|
|
<result column="SortId" jdbcType="INTEGER" property="sortid" />
|
|
<result column="OrgCode" jdbcType="VARCHAR" property="orgcode" />
|
|
<result column="SysUnitOrEntId" jdbcType="VARCHAR" property="sysunitorentid" />
|
|
<result column="SysDeptId" jdbcType="VARCHAR" property="sysdeptid" />
|
|
<result column="SysUnitOrEntName" jdbcType="VARCHAR" property="sysunitorentname" />
|
|
<result column="SysDeptName" jdbcType="VARCHAR" property="sysdeptname" />
|
|
<result column="SysUserName" jdbcType="VARCHAR" property="sysusername" />
|
|
<result column="SysPassword" jdbcType="VARCHAR" property="syspassword" />
|
|
<result column="UserRoles" jdbcType="VARCHAR" property="userroles" />
|
|
<result column="ChinaName" jdbcType="VARCHAR" property="chinaname" />
|
|
<result column="PerformClassName" jdbcType="VARCHAR" property="performClassName" />
|
|
<result column="Description" jdbcType="VARCHAR" property="description" />
|
|
<result column="PinYin" jdbcType="VARCHAR" property="pinyin" />
|
|
<result column="IDCard" jdbcType="VARCHAR" property="idcard" />
|
|
<result column="SysSex" jdbcType="VARCHAR" property="syssex" />
|
|
<result column="Birthplace" jdbcType="VARCHAR" property="birthplace" />
|
|
<result column="Birthday" jdbcType="TIMESTAMP" property="birthday" />
|
|
<result column="HealthStatus" jdbcType="VARCHAR" property="healthstatus" />
|
|
<result column="SysPhoto" jdbcType="VARCHAR" property="sysphoto" />
|
|
<result column="EducationLevel" jdbcType="VARCHAR" property="educationlevel" />
|
|
<result column="SysFamily" jdbcType="VARCHAR" property="sysfamily" />
|
|
<result column="Marriage" jdbcType="VARCHAR" property="marriage" />
|
|
<result column="Duration" jdbcType="TIMESTAMP" property="duration" />
|
|
<result column="SysTitle" jdbcType="VARCHAR" property="systitle" />
|
|
<result column="OfficeTel" jdbcType="VARCHAR" property="officetel" />
|
|
<result column="MobileTel" jdbcType="VARCHAR" property="mobiletel" />
|
|
<result column="Email" jdbcType="VARCHAR" property="email" />
|
|
<result column="QQInter" jdbcType="VARCHAR" property="qqinter" />
|
|
<result column="WeixinInter" jdbcType="VARCHAR" property="weixininter" />
|
|
<result column="ModifiedBy" jdbcType="VARCHAR" property="modifiedby" />
|
|
<result column="ModifiedOn" jdbcType="TIMESTAMP" property="modifiedon" />
|
|
<result column="CreatedBy" jdbcType="VARCHAR" property="createdby" />
|
|
<result column="CreatedOn" jdbcType="TIMESTAMP" property="createdon" />
|
|
<result column="PerformClassName" jdbcType="VARCHAR" property="performclassname" />
|
|
<result column="ListPerformId" jdbcType="VARCHAR" property="listperformid" />
|
|
<result column="SupClassId" jdbcType="VARCHAR" property="supclassid" />
|
|
<result column="ChkPersonId" jdbcType="VARCHAR" property="chkPersonId" />
|
|
</resultMap>
|
|
|
|
<!--部门用户-->
|
|
<select id="unitUsers" resultMap="SysUserResultMap">
|
|
SELECT lf.`ListPerformId`,lf.`PerformClassName`,lf.`SupClassId`,su.`SysUserId`,su.*
|
|
FROM ListPerform lf
|
|
LEFT JOIN SysUser su ON lf.`ListPerformId` = su.`SysTitle`
|
|
LEFT JOIN ListPerform superlf ON lf.`SupClassId` = superlf.ListPerformId
|
|
WHERE lf.`SupClassId` IN
|
|
<foreach collection="superIds" item="superId" index="index" open="(" close=")" separator=",">
|
|
#{superId}
|
|
</foreach>
|
|
AND su.`ChinaName` LIKE #{name}
|
|
AND su.SysUserId != #{sysUserId}
|
|
ORDER BY superlf.SupClassCode ASC,superlf.SortId ASC,lf.`SortId` ASC
|
|
</select>
|
|
|
|
|
|
<!--政府用户-->
|
|
<select id="govUsers" resultMap="SysUserResultMap">
|
|
SELECT lf.`SortId`,lf.`ListPerformId`,lf.`PerformClassName`,lf.`SupClassId`,lf.`SupClassCode`,su.`SysUserId`,su.*
|
|
FROM ListPerform lf
|
|
LEFT JOIN SysUser su ON lf.`ListPerformId` = su.`SysTitle`
|
|
WHERE su.UserType = '政府用户'
|
|
AND su.`ChinaName` LIKE #{name}
|
|
AND su.SysUserId != #{sysUserId}
|
|
ORDER BY lf.SupClassCode ASC ,lf.`SortId` ASC
|
|
</select>
|
|
|
|
<!--部门用户-->
|
|
<select id="checkUsers" resultMap="SysUserResultMap">
|
|
SELECT ck.ChkPersonId,lf.`ListPerformId`,lf.`PerformClassName`,lf.`SupClassId`,su.`SysUserId`,su.*
|
|
FROM ListPerform lf
|
|
LEFT JOIN SysUser su ON lf.`ListPerformId` = su.`SysTitle`
|
|
LEFT JOIN ListPerform superlf ON lf.`SupClassId` = superlf.ListPerformId
|
|
LEFT JOIN ChkPerson ck ON su.SysUserId = ck.SysUserId AND ck.BookEntCheckId = #{entCheckId}
|
|
WHERE lf.`SupClassId` IN
|
|
<foreach collection="superIds" item="superId" index="index" open="(" close=")" separator=",">
|
|
#{superId}
|
|
</foreach>
|
|
AND su.`ChinaName` LIKE #{name}
|
|
AND su.SysUserId != #{sysUserId}
|
|
ORDER BY superlf.SupClassCode ASC,superlf.SortId ASC,lf.`SortId` ASC
|
|
</select>
|
|
|
|
|
|
<!--所有用户列表-->
|
|
<resultMap id="AllResultMap" type="com.rzyc.model.user.SysUser">
|
|
<id column="SysUserId" jdbcType="CHAR" property="sysuserid" />
|
|
<result column="ChinaName" jdbcType="VARCHAR" property="chinaname" />
|
|
<result column="superName" jdbcType="VARCHAR" property="superName" />
|
|
<result column="superPerfromId" jdbcType="VARCHAR" property="superPerfromId" />
|
|
<result column="SysTitle" jdbcType="VARCHAR" property="systitle" />
|
|
<result column="SysTitle" jdbcType="VARCHAR" property="listperformid" />
|
|
<result column="PerformClassName" jdbcType="VARCHAR" property="performClassName" />
|
|
</resultMap>
|
|
|
|
<!--政府用户-->
|
|
<select id="allUsers" resultMap="AllResultMap">
|
|
SELECT superlf.`ListPerformId` superPerfromId,superlf.`PerformClassName` superName,
|
|
su.`SysTitle`,lf.`PerformClassName`,
|
|
su.`SysUserId`,su.`ChinaName`
|
|
FROM `SysUser` su
|
|
LEFT JOIN ListPerform lf ON su.`SysTitle` = lf.`ListPerformId`
|
|
LEFT JOIN ListPerform superlf ON lf.`SupClassId` = superlf.ListPerformId
|
|
WHERE su.`UserType` = '政府用户'
|
|
AND lf.`ListPerformId` IS NOT NULL
|
|
AND superlf.`ListPerformId` IS NOT NULL
|
|
AND superlf.`ListPerformId` IN
|
|
<foreach collection="superIds" item="superId" index="index" open="(" close=")" separator=",">
|
|
#{superId}
|
|
</foreach>
|
|
ORDER BY superlf.SupClassCode ASC,superlf.SortId ASC,lf.`SortId` ASC;
|
|
</select>
|
|
|
|
<!--所有政府用户-->
|
|
<select id="allGovUser" resultMap="BaseResultMap">
|
|
SELECT * FROM SysUser su WHERE su.`UserType` = '政府用户';
|
|
</select>
|
|
|
|
<!--通过id查询用户-->
|
|
<select id="findById" resultMap="BaseResultMap">
|
|
SELECT * FROM `SysUser` su WHERE su.`SysUserId` = #{userId};
|
|
</select>
|
|
|
|
<!--用户列表-->
|
|
<resultMap id="UserResultMap" type="com.rzyc.model.user.SysUser">
|
|
<id column="SysUserId" jdbcType="CHAR" property="sysuserid" />
|
|
<result column="UserType" jdbcType="VARCHAR" property="usertype" />
|
|
<result column="SortId" jdbcType="INTEGER" property="sortid" />
|
|
<result column="OrgCode" jdbcType="VARCHAR" property="orgcode" />
|
|
<result column="street_code" jdbcType="VARCHAR" property="streetCode" />
|
|
<result column="community_code" jdbcType="VARCHAR" property="communityCode" />
|
|
<result column="net_code" jdbcType="VARCHAR" property="netCode" />
|
|
<result column="supervise_area" jdbcType="VARCHAR" property="superviseArea" />
|
|
<result column="SysUnitOrEntId" jdbcType="VARCHAR" property="sysunitorentid" />
|
|
<result column="UnitName" jdbcType="VARCHAR" property="unitName" />
|
|
<result column="SysDeptId" jdbcType="VARCHAR" property="sysdeptid" />
|
|
<result column="SysUnitOrEntName" jdbcType="VARCHAR" property="sysunitorentname" />
|
|
<result column="SysDeptName" jdbcType="VARCHAR" property="sysdeptname" />
|
|
<result column="SysUserName" jdbcType="VARCHAR" property="sysusername" />
|
|
<result column="SysPassword" jdbcType="VARCHAR" property="syspassword" />
|
|
<result column="UserRoles" jdbcType="VARCHAR" property="userroles" />
|
|
<result column="ChinaName" jdbcType="VARCHAR" property="chinaname" />
|
|
<result column="PerformClassName" jdbcType="VARCHAR" property="performClassName" />
|
|
<result column="Description" jdbcType="VARCHAR" property="description" />
|
|
<result column="PinYin" jdbcType="VARCHAR" property="pinyin" />
|
|
<result column="IDCard" jdbcType="VARCHAR" property="idcard" />
|
|
<result column="SysSex" jdbcType="VARCHAR" property="syssex" />
|
|
<result column="Birthplace" jdbcType="VARCHAR" property="birthplace" />
|
|
<result column="Birthday" jdbcType="TIMESTAMP" property="birthday" />
|
|
<result column="HealthStatus" jdbcType="VARCHAR" property="healthstatus" />
|
|
<result column="SysPhoto" jdbcType="VARCHAR" property="sysphoto" />
|
|
<result column="EducationLevel" jdbcType="VARCHAR" property="educationlevel" />
|
|
<result column="SysFamily" jdbcType="VARCHAR" property="sysfamily" />
|
|
<result column="Marriage" jdbcType="VARCHAR" property="marriage" />
|
|
<result column="Duration" jdbcType="TIMESTAMP" property="duration" />
|
|
<result column="SysTitle" jdbcType="VARCHAR" property="systitle" />
|
|
<result column="performclassname" jdbcType="VARCHAR" property="performclassname" />
|
|
<result column="superName" jdbcType="VARCHAR" property="superName" />
|
|
<result column="OfficeTel" jdbcType="VARCHAR" property="officetel" />
|
|
<result column="MobileTel" jdbcType="VARCHAR" property="mobiletel" />
|
|
<result column="Email" jdbcType="VARCHAR" property="email" />
|
|
<result column="QQInter" jdbcType="VARCHAR" property="qqinter" />
|
|
<result column="WeixinInter" jdbcType="VARCHAR" property="weixininter" />
|
|
<result column="ModifiedBy" jdbcType="VARCHAR" property="modifiedby" />
|
|
<result column="ModifiedOn" jdbcType="TIMESTAMP" property="modifiedon" />
|
|
<result column="CreatedBy" jdbcType="VARCHAR" property="createdby" />
|
|
<result column="member_type" jdbcType="INTEGER" property="memberType" />
|
|
<result column="CreatedOn" jdbcType="TIMESTAMP" property="createdon" />
|
|
<result column="State" jdbcType="TIMESTAMP" property="state" />
|
|
</resultMap>
|
|
|
|
<!--政府用户列表-->
|
|
<select id="govUserList" resultMap="UserResultMap">
|
|
SELECT ut.`UnitName`,sp.`PerformClassName` superName,lf.`PerformClassName` performclassname,su.*
|
|
FROM SysUser su
|
|
LEFT JOIN SysUnit ut ON su.`SysUnitOrEntId` = ut.`SysUnitId`
|
|
LEFT JOIN ListPerform lf ON su.`SysTitle` = lf.`ListPerformId`
|
|
LEFT JOIN ListPerform sp ON sp.`ListPerformId` = lf.`SupClassId`
|
|
WHERE su.`UserType` = '政府用户'
|
|
|
|
<if test="State!=null and State!=''">
|
|
and su.State = #{State}
|
|
</if>
|
|
|
|
<if test="null != areaCode and '' != areaCode">
|
|
and (su.`OrgCode` = #{areaCode}
|
|
OR su.`street_code` = #{areaCode}
|
|
OR su.`community_code` = #{areaCode})
|
|
</if>
|
|
AND (su.`ChinaName` LIKE #{condition} OR su.`SysUserName` LIKE #{condition})
|
|
<if test="null != unitId and '' != unitId">
|
|
AND su.SysUnitOrEntId = #{unitId}
|
|
</if>
|
|
<if test="null != performId and '' != performId">
|
|
AND sp.`ListPerformId` = #{performId}
|
|
</if>
|
|
ORDER BY su.State ASC,su.ModifiedOn DESC
|
|
/*ORDER BY lf.`SortId` ASC,lf.`PerformClassCode` ASC*/
|
|
</select>
|
|
|
|
<!--修改用户-->
|
|
<update id="changeUser">
|
|
update SysUser
|
|
set UserType = #{record.usertype,jdbcType=VARCHAR},
|
|
SortId = #{record.sortid,jdbcType=INTEGER},
|
|
OrgCode = #{record.orgcode,jdbcType=VARCHAR},
|
|
street_code = #{record.streetCode,jdbcType=VARCHAR},
|
|
community_code = #{record.communityCode,jdbcType=VARCHAR},
|
|
net_code = #{record.netCode,jdbcType=VARCHAR},
|
|
area_code = #{record.areaCode,jdbcType=VARCHAR},
|
|
area_path = #{record.areaPath,jdbcType=VARCHAR},
|
|
area_name = #{record.areaName,jdbcType=VARCHAR},
|
|
supervise_area = #{record.superviseArea,jdbcType=VARCHAR},
|
|
SysUnitOrEntId = #{record.sysunitorentid,jdbcType=VARCHAR},
|
|
SysDeptId = #{record.sysdeptid,jdbcType=VARCHAR},
|
|
SysUnitOrEntName = #{record.sysunitorentname,jdbcType=VARCHAR},
|
|
SysDeptName = #{record.sysdeptname,jdbcType=VARCHAR},
|
|
SysUserName = #{record.sysusername,jdbcType=VARCHAR},
|
|
SysPassword = #{record.syspassword,jdbcType=VARCHAR},
|
|
UserRoles = #{record.userroles,jdbcType=VARCHAR},
|
|
ChinaName = #{record.chinaname,jdbcType=VARCHAR},
|
|
Description = #{record.description,jdbcType=VARCHAR},
|
|
PinYin = #{record.pinyin,jdbcType=VARCHAR},
|
|
IDCard = #{record.idcard,jdbcType=VARCHAR},
|
|
SysSex = #{record.syssex,jdbcType=VARCHAR},
|
|
Birthplace = #{record.birthplace,jdbcType=VARCHAR},
|
|
Birthday = #{record.birthday,jdbcType=TIMESTAMP},
|
|
HealthStatus = #{record.healthstatus,jdbcType=VARCHAR},
|
|
SysPhoto = #{record.sysphoto,jdbcType=VARCHAR},
|
|
EducationLevel = #{record.educationlevel,jdbcType=VARCHAR},
|
|
SysFamily = #{record.sysfamily,jdbcType=VARCHAR},
|
|
Marriage = #{record.marriage,jdbcType=VARCHAR},
|
|
Duration = #{record.duration,jdbcType=TIMESTAMP},
|
|
SysTitle = #{record.systitle,jdbcType=VARCHAR},
|
|
post_path = #{record.postPath,jdbcType=VARCHAR},
|
|
post_name = #{record.postName,jdbcType=VARCHAR},
|
|
OfficeTel = #{record.officetel,jdbcType=VARCHAR},
|
|
MobileTel = #{record.mobiletel,jdbcType=VARCHAR},
|
|
Email = #{record.email,jdbcType=VARCHAR},
|
|
QQInter = #{record.qqinter,jdbcType=VARCHAR},
|
|
WeixinInter = #{record.weixininter,jdbcType=VARCHAR},
|
|
ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR},
|
|
ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
|
|
member_type = #{record.memberType,jdbcType=INTEGER},
|
|
State = #{record.state,jdbcType=TIMESTAMP}
|
|
where SysUserId = #{record.sysuserid,jdbcType=CHAR}
|
|
</update>
|
|
|
|
<!--查询其他用户-->
|
|
<select id="findOtherUesr" resultMap="BaseResultMap">
|
|
SELECT * FROM `SysUser` su where su.`SysUserName` = #{userName} and su.`SysUserId` != #{userId};
|
|
</select>
|
|
|
|
<!--政府用户列表-->
|
|
<select id="exportUser" resultMap="UserResultMap">
|
|
SELECT ut.`UnitName`,sp.`PerformClassName` superName,lf.`PerformClassName` performclassname,su.*
|
|
FROM SysUser su
|
|
LEFT JOIN SysUnit ut ON su.`SysUnitOrEntId` = ut.`SysUnitId`
|
|
LEFT JOIN ListPerform lf ON su.`SysTitle` = lf.`ListPerformId`
|
|
LEFT JOIN ListPerform sp ON sp.`ListPerformId` = lf.`SupClassId`
|
|
WHERE su.`UserType` = '政府用户'
|
|
ORDER BY su.ModifiedOn DESC
|
|
/*ORDER BY lf.`SortId` ASC,lf.`PerformClassCode` ASC*/
|
|
</select>
|
|
|
|
<!--企业用户-->
|
|
<resultMap id="EntResultMap" type="com.rzyc.model.user.SysUser">
|
|
<id column="SysUserId" jdbcType="CHAR" property="sysuserid" />
|
|
<result column="UserType" jdbcType="VARCHAR" property="usertype" />
|
|
<result column="SortId" jdbcType="INTEGER" property="sortid" />
|
|
<result column="OrgCode" jdbcType="VARCHAR" property="orgcode" />
|
|
<result column="SysUnitOrEntId" jdbcType="VARCHAR" property="sysunitorentid" />
|
|
<result column="SysDeptId" jdbcType="VARCHAR" property="sysdeptid" />
|
|
<result column="SysUnitOrEntName" jdbcType="VARCHAR" property="sysunitorentname" />
|
|
<result column="EntName" jdbcType="VARCHAR" property="entName" />
|
|
<result column="SysDeptName" jdbcType="VARCHAR" property="sysdeptname" />
|
|
<result column="SysUserName" jdbcType="VARCHAR" property="sysusername" />
|
|
<result column="SysPassword" jdbcType="VARCHAR" property="syspassword" />
|
|
<result column="UserRoles" jdbcType="VARCHAR" property="userroles" />
|
|
<result column="ChinaName" jdbcType="VARCHAR" property="chinaname" />
|
|
<result column="PerformClassName" jdbcType="VARCHAR" property="performClassName" />
|
|
<result column="Description" jdbcType="VARCHAR" property="description" />
|
|
<result column="PinYin" jdbcType="VARCHAR" property="pinyin" />
|
|
<result column="IDCard" jdbcType="VARCHAR" property="idcard" />
|
|
<result column="SysSex" jdbcType="VARCHAR" property="syssex" />
|
|
<result column="Birthplace" jdbcType="VARCHAR" property="birthplace" />
|
|
<result column="Birthday" jdbcType="TIMESTAMP" property="birthday" />
|
|
<result column="HealthStatus" jdbcType="VARCHAR" property="healthstatus" />
|
|
<result column="SysPhoto" jdbcType="VARCHAR" property="sysphoto" />
|
|
<result column="EducationLevel" jdbcType="VARCHAR" property="educationlevel" />
|
|
<result column="SysFamily" jdbcType="VARCHAR" property="sysfamily" />
|
|
<result column="Marriage" jdbcType="VARCHAR" property="marriage" />
|
|
<result column="Duration" jdbcType="TIMESTAMP" property="duration" />
|
|
<result column="SysTitle" jdbcType="VARCHAR" property="systitle" />
|
|
<result column="OfficeTel" jdbcType="VARCHAR" property="officetel" />
|
|
<result column="MobileTel" jdbcType="VARCHAR" property="mobiletel" />
|
|
<result column="Email" jdbcType="VARCHAR" property="email" />
|
|
<result column="QQInter" jdbcType="VARCHAR" property="qqinter" />
|
|
<result column="WeixinInter" jdbcType="VARCHAR" property="weixininter" />
|
|
<result column="ModifiedBy" jdbcType="VARCHAR" property="modifiedby" />
|
|
<result column="ModifiedOn" jdbcType="TIMESTAMP" property="modifiedon" />
|
|
<result column="CreatedBy" jdbcType="VARCHAR" property="createdby" />
|
|
<result column="CreatedOn" jdbcType="TIMESTAMP" property="createdon" />
|
|
<result column="SysUnitId" jdbcType="VARCHAR" property="SysUnitId"/>
|
|
</resultMap>
|
|
|
|
<!--企业用户-->
|
|
<select id="entUser" resultMap="EntResultMap">
|
|
SELECT se.`EntName`,su.*
|
|
FROM `SysUser` su
|
|
LEFT JOIN `SysEnterprise` se ON su.`SysUnitOrEntId` = se.`SysEnterpriseId`
|
|
WHERE su.`State` = '启用'
|
|
AND su.`UserType` = '企业用户'
|
|
AND se.`SysEnterpriseId` IS NOT NULL
|
|
AND se.`State` = '启用'
|
|
AND (se.`EntName` LIKE #{condition} OR su.`SysUserName` LIKE #{condition})
|
|
ORDER BY su.`CreatedOn` DESC
|
|
</select>
|
|
|
|
<!--所有政府用户-->
|
|
<select id="findAll" resultMap="BaseResultMap">
|
|
SELECT * FROM SysUser su
|
|
</select>
|
|
|
|
<!--修改企业用户-->
|
|
<update id="changeEntUser" parameterType="com.rzyc.model.user.SysUser">
|
|
update SysUser
|
|
set
|
|
SysUserName = #{record.sysusername,jdbcType=VARCHAR},
|
|
ChinaName = #{record.chinaname,jdbcType=VARCHAR}
|
|
where SysUserId = #{record.sysuserid,jdbcType=CHAR}
|
|
</update>
|
|
|
|
<select id="selectAdmin" resultMap="BaseResultMap">
|
|
select * from SysUser where SysUserName = #{name}
|
|
</select>
|
|
|
|
<!--通过地区查询用户-->
|
|
<select id="findByArea" resultMap="BaseResultMap">
|
|
SELECT sp.PerformClassName superName,sp.ListPerformId superPerfromId,
|
|
lf.`PerformClassName`,su.*
|
|
FROM SysUser su
|
|
LEFT JOIN ListPerform lf ON su.`SysTitle` = lf.`ListPerformId`
|
|
LEFT JOIN ListPerform sp ON sp.`ListPerformId` = lf.`SupClassId`
|
|
WHERE su.`UserType` = '政府用户'
|
|
AND su.`SysTitle` IS NOT NULL and lf.`PerformClassName` != ''
|
|
AND (su.`OrgCode` = #{areaCode}
|
|
OR su.`street_code` = #{areaCode}
|
|
OR su.`community_code` = #{areaCode})
|
|
and sp.ListPerformId is not null
|
|
ORDER BY lf.`PerformClassCode` ASC,lf.`SortId` ASC
|
|
</select>
|
|
|
|
<!--修改中文名-->
|
|
<update id="changeUserName">
|
|
UPDATE SysUser
|
|
SET
|
|
SysUserName = #{record.sysusername},
|
|
SysPassword = #{record.syspassword,jdbcType=VARCHAR},
|
|
ChinaName = #{record.chinaname}
|
|
WHERE SysUserId = #{record.sysuserid}
|
|
</update>
|
|
|
|
<!--通过地区查询用户-->
|
|
<select id="areaUser" resultMap="BaseResultMap">
|
|
SELECT lf.`PerformClassName`,su.*
|
|
FROM SysUser su
|
|
LEFT JOIN ListPerform lf ON su.`SysTitle` = lf.`ListPerformId`
|
|
WHERE su.`UserType` = '政府用户' and su.`State` = '启用' and su.SysUserId != #{userId}
|
|
and (su.`SysUserName` like #{condition} or su.ChinaName like #{condition})
|
|
AND su.`SysTitle` IS NOT NULL and su.`SysTitle` != ''
|
|
AND (su.`OrgCode` = #{areaCode}
|
|
OR su.`street_code` = #{areaCode}
|
|
OR su.`community_code` = #{areaCode})
|
|
ORDER BY lf.`PerformClassCode` ASC,lf.`SortId` ASC
|
|
limit 50
|
|
</select>
|
|
|
|
<!--责任书用户-->
|
|
<select id="dutyTreeUser" resultMap="BaseResultMap">
|
|
SELECT lf.`PerformClassName`,su.*
|
|
FROM duty_tree dt
|
|
left join SysUser su on dt.target_id = su.SysUserId
|
|
LEFT JOIN ListPerform lf ON su.`SysTitle` = lf.`ListPerformId`
|
|
WHERE dt.user_id = #{userId} and dt.target_type = 1
|
|
and su.`State` = '启用'
|
|
</select>
|
|
|
|
<!--查询用户-->
|
|
<select id="findByUser" resultMap="BaseResultMap">
|
|
SELECT * FROM SysUser su
|
|
WHERE su.UserType = '政府用户'
|
|
and (su.`ChinaName` LIKE #{name}
|
|
OR su.`SysUserName` LIKE #{name}
|
|
OR su.`SysUserName` = #{mobile})
|
|
</select>
|
|
|
|
|
|
<!--查询用户-->
|
|
<select id="villageUser" resultMap="BaseResultMap">
|
|
SELECT * FROM SysUser su
|
|
WHERE su.UserType = '政府用户' and su.`SysUserName` = #{mobile}
|
|
</select>
|
|
|
|
<!--修改用户-->
|
|
<update id="changeMobile">
|
|
update SysUser
|
|
set OrgCode = #{record.orgcode,jdbcType=VARCHAR},
|
|
street_code = #{record.streetCode,jdbcType=VARCHAR},
|
|
community_code = #{record.communityCode,jdbcType=VARCHAR},
|
|
MobileTel = #{record.mobiletel,jdbcType=VARCHAR}
|
|
where SysUserId = #{record.sysuserid,jdbcType=CHAR}
|
|
</update>
|
|
|
|
<!--驻村干部-->
|
|
<select id="allVillageUser" resultMap="BaseResultMap">
|
|
SELECT sp.PerformClassName superName,lf.`PerformClassName`,su.*
|
|
FROM SysUser su
|
|
LEFT JOIN ListPerform lf ON su.`SysTitle` = lf.`ListPerformId`
|
|
LEFT JOIN ListPerform sp ON sp.`ListPerformId` = lf.`SupClassId`
|
|
WHERE su.`UserType` = '政府用户' AND lf.`PerformClassName` = '驻村干部'
|
|
AND (su.`OrgCode` = #{areaCode}
|
|
OR su.`street_code` = #{areaCode}
|
|
OR su.`community_code` = #{areaCode})
|
|
ORDER BY sp.`PerformClassName` ASC
|
|
</select>
|
|
|
|
<!--修改用户-->
|
|
<update id="changePost">
|
|
update SysUser
|
|
set OrgCode = #{record.orgcode,jdbcType=VARCHAR},
|
|
street_code = #{record.streetCode,jdbcType=VARCHAR},
|
|
community_code = #{record.communityCode,jdbcType=VARCHAR},
|
|
SysTitle = #{record.systitle,jdbcType=VARCHAR},
|
|
SysUnitOrEntId = #{record.sysunitorentid,jdbcType=VARCHAR},
|
|
MobileTel = #{record.mobiletel,jdbcType=VARCHAR}
|
|
where SysUserId = #{record.sysuserid,jdbcType=CHAR}
|
|
</update>
|
|
|
|
<!--通过地区查询用户-->
|
|
<select id="checkUser" resultMap="BaseResultMap">
|
|
SELECT sp.PerformClassName superName,sp.ListPerformId superPerfromId,
|
|
lf.`PerformClassName`,su.*
|
|
FROM SysUser su
|
|
LEFT JOIN ListPerform lf ON su.`SysTitle` = lf.`ListPerformId`
|
|
LEFT JOIN ListPerform sp ON sp.`ListPerformId` = lf.`SupClassId`
|
|
WHERE su.`UserType` = '政府用户' AND su.`SysTitle` IS NOT NULL and lf.`PerformClassName` != ''
|
|
and su.ChinaName like #{condition}
|
|
and lf.`SupClassId` = #{listperformid}
|
|
<if test="null != areaCode and '' != areaCode">
|
|
AND (su.`OrgCode` = #{areaCode}
|
|
OR su.`street_code` = #{areaCode}
|
|
OR su.`community_code` = #{areaCode})
|
|
</if>
|
|
and sp.ListPerformId is not null
|
|
ORDER BY lf.`PerformClassCode` ASC,lf.`SortId` ASC
|
|
</select>
|
|
|
|
|
|
<!--通过地区查询用户-->
|
|
<select id="unitUser" resultMap="BaseResultMap">
|
|
SELECT sp.`PerformClassName` superName,lp.`ListPerformId`,lp.`PerformClassName`,su.*
|
|
FROM SysUser su
|
|
LEFT JOIN ListPerform lp ON su.`SysTitle` = lp.`ListPerformId`
|
|
LEFT JOIN ListPerform sp ON lp.`SupClassId` = sp.`ListPerformId`
|
|
WHERE su.`UserType` = '政府用户'
|
|
AND su.`SysTitle` IS NOT NULL AND lp.`PerformClassName` != ''
|
|
AND sp.`SupClassId` = #{supClassId}
|
|
ORDER BY lp.`PerformClassCode` ASC,lp.`SortId` ASC
|
|
</select>
|
|
|
|
|
|
<!--政府用户列表-->
|
|
<select id="unitUserList" resultMap="UserResultMap">
|
|
SELECT ut.`UnitName`,sp.`PerformClassName` superName,lf.`PerformClassName` performclassname,su.*
|
|
FROM SysUser su
|
|
LEFT JOIN SysUnit ut ON su.`SysUnitOrEntId` = ut.`SysUnitId`
|
|
LEFT JOIN ListPerform lf ON su.`SysTitle` = lf.`ListPerformId`
|
|
LEFT JOIN ListPerform sp ON sp.`ListPerformId` = lf.`SupClassId`
|
|
WHERE su.`UserType` = '政府用户'
|
|
<if test="State!=null and State!=''">
|
|
and su.State = #{State}
|
|
</if>
|
|
|
|
|
|
AND (su.`ChinaName` LIKE #{condition} OR su.`SysUserName` LIKE #{condition})
|
|
AND su.SysUnitOrEntId = #{unitId}
|
|
ORDER BY su.State ASC,su.ModifiedOn DESC
|
|
</select>
|
|
|
|
|
|
|
|
<!--街道用户检查情况-->
|
|
<resultMap id="StreetCheckResultMap" type="com.rzyc.bean.check.StreetCheck">
|
|
<result column="PerformClassName" jdbcType="VARCHAR" property="performClassName" />
|
|
<result column="SysUserName" jdbcType="VARCHAR" property="sysUserName" />
|
|
<result column="ChinaName" jdbcType="VARCHAR" property="chinaName" />
|
|
<result column="checkNum" jdbcType="INTEGER" property="checkNum" />
|
|
</resultMap>
|
|
|
|
|
|
<!--街道用户检查情况-->
|
|
<select id="streetCheckNum" resultMap="StreetCheckResultMap">
|
|
SELECT lf.PerformClassName,su.SysUserName,su.ChinaName,
|
|
(
|
|
SELECT COUNT(*) FROM ChkPerson cp
|
|
WHERE cp.SysUserId = su.SysUserId
|
|
|
|
<if test="null != startTime and '' != startTime">
|
|
AND cp.CreatedOn >= #{startTime}
|
|
</if>
|
|
<if test="null != endTime and '' != endTime">
|
|
AND cp.CreatedOn <= #{endTime}
|
|
</if>
|
|
) checkNum
|
|
FROM SysUser su
|
|
LEFT JOIN ListPerform lf ON su.SysTitle = lf.ListPerformId
|
|
WHERE su.street_code = #{streetCode}
|
|
AND (su.community_code = '' OR su.community_code IS NULL )
|
|
AND su.State = '启用'
|
|
AND su.SysTitle IS NOT NULL AND su.SysTitle != ''
|
|
ORDER BY checkNum DESC
|
|
</select>
|
|
|
|
|
|
<!--街道社区用户检查情况-->
|
|
<resultMap id="CommunityCheckResultMap" type="com.rzyc.bean.check.CommunityCheck">
|
|
<result column="superName" jdbcType="VARCHAR" property="superName" />
|
|
<result column="PerformClassName" jdbcType="VARCHAR" property="performClassName" />
|
|
<result column="SysUserName" jdbcType="VARCHAR" property="sysUserName" />
|
|
<result column="ChinaName" jdbcType="INTEGER" property="chinaName" />
|
|
<result column="checkNum" jdbcType="INTEGER" property="checkNum" />
|
|
</resultMap>
|
|
|
|
|
|
<!--街道社区用户检查情况-->
|
|
<select id="ommunityCheckNum" resultMap="CommunityCheckResultMap">
|
|
SELECT sp.PerformClassName superName, lf.PerformClassName,su.SysUserName,su.ChinaName,
|
|
(
|
|
SELECT COUNT(*) FROM ChkPerson cp
|
|
WHERE cp.SysUserId = su.SysUserId
|
|
<if test="null != startTime and '' != startTime">
|
|
AND cp.CreatedOn >= #{startTime}
|
|
</if>
|
|
<if test="null != endTime and '' != endTime">
|
|
AND cp.CreatedOn <= #{endTime}
|
|
</if>
|
|
) checkNum
|
|
FROM SysUser su
|
|
LEFT JOIN ListPerform lf ON su.SysTitle = lf.ListPerformId
|
|
LEFT JOIN ListPerform sp ON lf.SupClassId = sp.ListPerformId
|
|
WHERE su.street_code = #{streetCode}
|
|
AND su.community_code != ''
|
|
AND su.State = '启用'
|
|
AND su.SysTitle IS NOT NULL AND su.SysTitle != ''
|
|
ORDER BY sp.ListPerformId DESC
|
|
</select>
|
|
|
|
<!--按照SysDeptId来更新用户名-->
|
|
<select id="updateUserNameBySysDeptId" resultType="int">
|
|
update SysUser
|
|
set SysUnitOrEntName = #{name} ,SysDeptName = #{name},SysUserName = #{name},ChinaName = #{name},
|
|
ModifiedBy = #{modify},ModifiedOn = now()
|
|
where SysDeptId = #{SysDeptId}
|
|
</select>
|
|
<!--按照SysDeptId获取用户-->
|
|
<select id="selectUserBySysDeptId" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List"/>
|
|
from SysUser
|
|
where SysDeptId = #{SysDeptId}
|
|
</select>
|
|
|
|
<!--街道下用户-->
|
|
<select id="findByStreet" resultMap="BaseResultMap">
|
|
SELECT * FROM SysUser su WHERE su.`street_code` = #{streetCode}
|
|
AND su.`ChinaName` = #{chinaName}
|
|
</select>
|
|
|
|
<!--街道下用户-->
|
|
<select id="findByStreetAndName" resultMap="BaseResultMap">
|
|
SELECT * FROM SysUser su
|
|
WHERE su.`street_code` = #{streetCode}
|
|
AND (su.`SysUserName` = #{userName} OR su.`SysUserName` = #{mobile} )
|
|
and su.State = '启用'
|
|
order by su.ModifiedOn desc limit 1
|
|
</select>
|
|
|
|
|
|
<!--修改用户社区id-->
|
|
<update id="changeCommunityCode">
|
|
update SysUser
|
|
set community_code = #{communityCode},
|
|
ModifiedBy = '导入',ModifiedOn = now()
|
|
where SysUserId = #{userId}
|
|
</update>
|
|
|
|
|
|
<select id="getByUserId" resultMap="UserResultMap">
|
|
SELECT ut.`UnitName`,sp.`PerformClassName` superName,lf.`PerformClassName` performclassname,su.*
|
|
FROM SysUser su
|
|
LEFT JOIN SysUnit ut ON su.`SysUnitOrEntId` = ut.`SysUnitId`
|
|
LEFT JOIN ListPerform lf ON su.`SysTitle` = lf.`ListPerformId`
|
|
LEFT JOIN ListPerform sp ON sp.`ListPerformId` = lf.`SupClassId`
|
|
where su.`SysUserId` = #{userId};
|
|
</select>
|
|
|
|
<!--领导列表-->
|
|
<resultMap id="DutyNetResultMap" type="com.rzyc.bean.bigdata.DutyNet">
|
|
<result column="SysUserId" jdbcType="VARCHAR" property="targetId" />
|
|
<result column="ChinaName" jdbcType="VARCHAR" property="showName" />
|
|
</resultMap>
|
|
|
|
<!--领导列表-->
|
|
<select id="leaderUser" resultMap="DutyNetResultMap">
|
|
SELECT su.*
|
|
FROM SysUser su
|
|
LEFT JOIN ListPerform lf ON su.SysTitle = lf.ListPerformId
|
|
LEFT JOIN ListPerform sp ON lf.SupClassId = sp.ListPerformId
|
|
WHERE su.state = '启用'
|
|
AND su.member_type IN
|
|
<foreach collection="memberTypes" item="memberType" separator="," close=")" open="(">
|
|
#{memberType}
|
|
</foreach>
|
|
ORDER BY su.street_code ASC;
|
|
</select>
|
|
|
|
<!--街道负责人-->
|
|
<select id="streetCharger" resultMap="DutyNetResultMap">
|
|
SELECT so.OrgCode SysUserId,so.charger ChinaName
|
|
FROM `SysOrg` so WHERE so.`SuperiorOrgCode` = #{superiorOrgCode}
|
|
ORDER BY so.`OrgCode` ASC
|
|
</select>
|
|
|
|
<!--查询用户-->
|
|
<select id="findByMemberType" resultMap="BaseResultMap">
|
|
SELECT * FROM SysUser su
|
|
WHERE su.`member_type` = #{memberType}
|
|
AND su.`State` = '启用'
|
|
AND (su.`OrgCode` = #{areaCode}
|
|
OR su.`street_code` = #{areaCode}
|
|
OR su.`community_code` = #{areaCode})
|
|
ORDER BY su.`ModifiedOn` DESC LIMIT 1
|
|
</select>
|
|
|
|
<!--禁用企业-->
|
|
<update id="changeState">
|
|
update SysUser set `State` = #{state} where SysUserId = #{userId}
|
|
</update>
|
|
|
|
<!---->
|
|
<select id="findByUnitOrEntId" resultMap="BaseResultMap">
|
|
SELECT * FROM SysUser su WHERE su.`SysUnitOrEntId` = #{unitOrEntId} limit 1
|
|
</select>
|
|
|
|
<select id="selectUser" resultType="com.rzyc.model.user.SysUser">
|
|
SELECT su.* FROM SysUser su where su.SysUserId = #{sysUserId}
|
|
</select>
|
|
|
|
<!--查询流转人-->
|
|
<select id="selectTransferor" resultType="com.rzyc.bean.task.vo.UserVo">
|
|
select su.SysUserId ,su.SysDeptName ,su.ChinaName FROM SysUser su
|
|
</select>
|
|
</mapper>
|