123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435 |
- <?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.xinxin.topro.inpnurseservice.mysqlmapper.SysUserInfoMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.SysUserInfo" >
- <id column="UI_ID" property="uiId" jdbcType="INTEGER" />
- <result column="UI_Code" property="uiCode" jdbcType="VARCHAR" />
- <result column="SS_Password" property="ssPassword" jdbcType="VARCHAR" />
- <result column="UI_Name" property="uiName" jdbcType="VARCHAR" />
- <result column="UI_Phone" property="uiPhone" jdbcType="VARCHAR" />
- <result column="UI_IDNumber" property="uiIdnumber" jdbcType="VARCHAR" />
- <result column="UI_Sex" property="uiSex" jdbcType="INTEGER" />
- <result column="UI_Birthday" property="uiBirthday" jdbcType="DATE" />
- <result column="UI_Email" property="uiEmail" jdbcType="VARCHAR" />
- <result column="UI_EntryData" property="uiEntrydata" jdbcType="DATE" />
- <result column="SS_DepartmentID" property="ssDepartmentid" jdbcType="INTEGER" />
- <result column="SS_WardID" property="ssWardid" jdbcType="INTEGER" />
- <result column="SS_Type" property="ssType" jdbcType="INTEGER" />
- <result column="SS_Nature" property="ssNature" jdbcType="INTEGER" />
- <result column="SS_PessoalDate" property="ssPessoaldate" jdbcType="DATE" />
- <result column="SS_Nativeplace" property="ssNativeplace" jdbcType="VARCHAR" />
- <result column="SS_Politics" property="ssPolitics" jdbcType="VARCHAR" />
- <result column="SS_WorkDate" property="ssWorkdate" jdbcType="DATE" />
- <result column="SS_Degree" property="ssDegree" jdbcType="VARCHAR" />
- <result column="SS_MaritalStatus" property="ssMaritalstatus" jdbcType="INTEGER" />
- <result column="SS_Nation" property="ssNation" jdbcType="VARCHAR" />
- <result column="SS_Level" property="ssLevel" jdbcType="VARCHAR" />
- <result column="SS_PinyinCode" property="ssPinyincode" jdbcType="VARCHAR" />
- <result column="SS_WubiCode" property="ssWubicode" jdbcType="VARCHAR" />
- <result column="SS_OtherCode" property="ssOthercode" jdbcType="VARCHAR" />
- <result column="SS_ISDel" property="ssIsdel" jdbcType="INTEGER" />
- <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
- <result column="SU_Sign_Img" property="suSignImg" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- UI_ID, UI_Code, SS_Password, UI_Name, UI_Phone, UI_IDNumber, UI_Sex, UI_Birthday,
- UI_Email, UI_EntryData, SS_DepartmentID, SS_WardID, SS_Type, SS_Nature, SS_PessoalDate,
- SS_Nativeplace, SS_Politics, SS_WorkDate, SS_Degree, SS_MaritalStatus, SS_Nation,
- SS_Level, SS_PinyinCode, SS_WubiCode, SS_OtherCode, SS_ISDel, HI_ID, SU_Sign_Img
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from sys_userinfo
- where SS_ISDel = 0 and UI_ID = #{uiId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from sys_userinfo
- where UI_ID = #{uiId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.SysUserInfo" >
- insert into sys_userinfo (UI_ID, UI_Code, SS_Password,
- UI_Name, UI_Phone, UI_IDNumber,
- UI_Sex, UI_Birthday, UI_Email,
- UI_EntryData, SS_DepartmentID, SS_WardID,
- SS_Type, SS_Nature, SS_PessoalDate,
- SS_Nativeplace, SS_Politics, SS_WorkDate,
- SS_Degree, SS_MaritalStatus, SS_Nation,
- SS_Level, SS_PinyinCode, SS_WubiCode,
- SS_OtherCode, SS_ISDel, HI_ID, SU_Sign_Img
- )
- values (#{uiId,jdbcType=INTEGER}, #{uiCode,jdbcType=VARCHAR}, #{ssPassword,jdbcType=VARCHAR},
- #{uiName,jdbcType=VARCHAR}, #{uiPhone,jdbcType=VARCHAR}, #{uiIdnumber,jdbcType=VARCHAR},
- #{uiSex,jdbcType=INTEGER}, #{uiBirthday,jdbcType=DATE}, #{uiEmail,jdbcType=VARCHAR},
- #{uiEntrydata,jdbcType=DATE}, #{ssDepartmentid,jdbcType=INTEGER}, #{ssWardid,jdbcType=INTEGER},
- #{ssType,jdbcType=INTEGER}, #{ssNature,jdbcType=INTEGER}, #{ssPessoaldate,jdbcType=DATE},
- #{ssNativeplace,jdbcType=VARCHAR}, #{ssPolitics,jdbcType=VARCHAR}, #{ssWorkdate,jdbcType=DATE},
- #{ssDegree,jdbcType=VARCHAR}, #{ssMaritalstatus,jdbcType=INTEGER}, #{ssNation,jdbcType=VARCHAR},
- #{ssLevel,jdbcType=VARCHAR}, #{ssPinyincode,jdbcType=VARCHAR}, #{ssWubicode,jdbcType=VARCHAR},
- #{ssOthercode,jdbcType=VARCHAR}, #{ssIsdel,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER},
- #{suSignImg,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.SysUserInfo" >
- insert into sys_userinfo
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="uiId != null" >
- UI_ID,
- </if>
- <if test="uiCode != null" >
- UI_Code,
- </if>
- <if test="ssPassword != null" >
- SS_Password,
- </if>
- <if test="uiName != null" >
- UI_Name,
- </if>
- <if test="uiPhone != null" >
- UI_Phone,
- </if>
- <if test="uiIdnumber != null" >
- UI_IDNumber,
- </if>
- <if test="uiSex != null" >
- UI_Sex,
- </if>
- <if test="uiBirthday != null" >
- UI_Birthday,
- </if>
- <if test="uiEmail != null" >
- UI_Email,
- </if>
- <if test="uiEntrydata != null" >
- UI_EntryData,
- </if>
- <if test="ssDepartmentid != null" >
- SS_DepartmentID,
- </if>
- <if test="ssWardid != null" >
- SS_WardID,
- </if>
- <if test="ssType != null" >
- SS_Type,
- </if>
- <if test="ssNature != null" >
- SS_Nature,
- </if>
- <if test="ssPessoaldate != null" >
- SS_PessoalDate,
- </if>
- <if test="ssNativeplace != null" >
- SS_Nativeplace,
- </if>
- <if test="ssPolitics != null" >
- SS_Politics,
- </if>
- <if test="ssWorkdate != null" >
- SS_WorkDate,
- </if>
- <if test="ssDegree != null" >
- SS_Degree,
- </if>
- <if test="ssMaritalstatus != null" >
- SS_MaritalStatus,
- </if>
- <if test="ssNation != null" >
- SS_Nation,
- </if>
- <if test="ssLevel != null" >
- SS_Level,
- </if>
- <if test="ssPinyincode != null" >
- SS_PinyinCode,
- </if>
- <if test="ssWubicode != null" >
- SS_WubiCode,
- </if>
- <if test="ssOthercode != null" >
- SS_OtherCode,
- </if>
- <if test="ssIsdel != null" >
- SS_ISDel,
- </if>
- <if test="hiId != null" >
- HI_ID,
- </if>
- <if test="suSignImg != null" >
- SU_Sign_Img,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="uiId != null" >
- #{uiId,jdbcType=INTEGER},
- </if>
- <if test="uiCode != null" >
- #{uiCode,jdbcType=VARCHAR},
- </if>
- <if test="ssPassword != null" >
- #{ssPassword,jdbcType=VARCHAR},
- </if>
- <if test="uiName != null" >
- #{uiName,jdbcType=VARCHAR},
- </if>
- <if test="uiPhone != null" >
- #{uiPhone,jdbcType=VARCHAR},
- </if>
- <if test="uiIdnumber != null" >
- #{uiIdnumber,jdbcType=VARCHAR},
- </if>
- <if test="uiSex != null" >
- #{uiSex,jdbcType=INTEGER},
- </if>
- <if test="uiBirthday != null" >
- #{uiBirthday,jdbcType=DATE},
- </if>
- <if test="uiEmail != null" >
- #{uiEmail,jdbcType=VARCHAR},
- </if>
- <if test="uiEntrydata != null" >
- #{uiEntrydata,jdbcType=DATE},
- </if>
- <if test="ssDepartmentid != null" >
- #{ssDepartmentid,jdbcType=INTEGER},
- </if>
- <if test="ssWardid != null" >
- #{ssWardid,jdbcType=INTEGER},
- </if>
- <if test="ssType != null" >
- #{ssType,jdbcType=INTEGER},
- </if>
- <if test="ssNature != null" >
- #{ssNature,jdbcType=INTEGER},
- </if>
- <if test="ssPessoaldate != null" >
- #{ssPessoaldate,jdbcType=DATE},
- </if>
- <if test="ssNativeplace != null" >
- #{ssNativeplace,jdbcType=VARCHAR},
- </if>
- <if test="ssPolitics != null" >
- #{ssPolitics,jdbcType=VARCHAR},
- </if>
- <if test="ssWorkdate != null" >
- #{ssWorkdate,jdbcType=DATE},
- </if>
- <if test="ssDegree != null" >
- #{ssDegree,jdbcType=VARCHAR},
- </if>
- <if test="ssMaritalstatus != null" >
- #{ssMaritalstatus,jdbcType=INTEGER},
- </if>
- <if test="ssNation != null" >
- #{ssNation,jdbcType=VARCHAR},
- </if>
- <if test="ssLevel != null" >
- #{ssLevel,jdbcType=VARCHAR},
- </if>
- <if test="ssPinyincode != null" >
- #{ssPinyincode,jdbcType=VARCHAR},
- </if>
- <if test="ssWubicode != null" >
- #{ssWubicode,jdbcType=VARCHAR},
- </if>
- <if test="ssOthercode != null" >
- #{ssOthercode,jdbcType=VARCHAR},
- </if>
- <if test="ssIsdel != null" >
- #{ssIsdel,jdbcType=INTEGER},
- </if>
- <if test="hiId != null" >
- #{hiId,jdbcType=INTEGER},
- </if>
- <if test="suSignImg != null" >
- #{suSignImg,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.SysUserInfo" >
- update sys_userinfo
- <set >
- <if test="uiCode != null" >
- UI_Code = #{uiCode,jdbcType=VARCHAR},
- </if>
- <if test="ssPassword != null" >
- SS_Password = #{ssPassword,jdbcType=VARCHAR},
- </if>
- <if test="uiName != null" >
- UI_Name = #{uiName,jdbcType=VARCHAR},
- </if>
- <if test="uiPhone != null" >
- UI_Phone = #{uiPhone,jdbcType=VARCHAR},
- </if>
- <if test="uiIdnumber != null" >
- UI_IDNumber = #{uiIdnumber,jdbcType=VARCHAR},
- </if>
- <if test="uiSex != null" >
- UI_Sex = #{uiSex,jdbcType=INTEGER},
- </if>
- <if test="uiBirthday != null" >
- UI_Birthday = #{uiBirthday,jdbcType=DATE},
- </if>
- <if test="uiEmail != null" >
- UI_Email = #{uiEmail,jdbcType=VARCHAR},
- </if>
- <if test="uiEntrydata != null" >
- UI_EntryData = #{uiEntrydata,jdbcType=DATE},
- </if>
- <if test="ssDepartmentid != null" >
- SS_DepartmentID = #{ssDepartmentid,jdbcType=INTEGER},
- </if>
- <if test="ssWardid != null" >
- SS_WardID = #{ssWardid,jdbcType=INTEGER},
- </if>
- <if test="ssType != null" >
- SS_Type = #{ssType,jdbcType=INTEGER},
- </if>
- <if test="ssNature != null" >
- SS_Nature = #{ssNature,jdbcType=INTEGER},
- </if>
- <if test="ssPessoaldate != null" >
- SS_PessoalDate = #{ssPessoaldate,jdbcType=DATE},
- </if>
- <if test="ssNativeplace != null" >
- SS_Nativeplace = #{ssNativeplace,jdbcType=VARCHAR},
- </if>
- <if test="ssPolitics != null" >
- SS_Politics = #{ssPolitics,jdbcType=VARCHAR},
- </if>
- <if test="ssWorkdate != null" >
- SS_WorkDate = #{ssWorkdate,jdbcType=DATE},
- </if>
- <if test="ssDegree != null" >
- SS_Degree = #{ssDegree,jdbcType=VARCHAR},
- </if>
- <if test="ssMaritalstatus != null" >
- SS_MaritalStatus = #{ssMaritalstatus,jdbcType=INTEGER},
- </if>
- <if test="ssNation != null" >
- SS_Nation = #{ssNation,jdbcType=VARCHAR},
- </if>
- <if test="ssLevel != null" >
- SS_Level = #{ssLevel,jdbcType=VARCHAR},
- </if>
- <if test="ssPinyincode != null" >
- SS_PinyinCode = #{ssPinyincode,jdbcType=VARCHAR},
- </if>
- <if test="ssWubicode != null" >
- SS_WubiCode = #{ssWubicode,jdbcType=VARCHAR},
- </if>
- <if test="ssOthercode != null" >
- SS_OtherCode = #{ssOthercode,jdbcType=VARCHAR},
- </if>
- <if test="ssIsdel != null" >
- SS_ISDel = #{ssIsdel,jdbcType=INTEGER},
- </if>
- <if test="hiId != null" >
- HI_ID = #{hiId,jdbcType=INTEGER},
- </if>
- <if test="suSignImg != null" >
- SU_Sign_Img = #{suSignImg,jdbcType=VARCHAR},
- </if>
- </set>
- where UI_ID = #{uiId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.SysUserInfo" >
- update sys_userinfo
- set UI_Code = #{uiCode,jdbcType=VARCHAR},
- SS_Password = #{ssPassword,jdbcType=VARCHAR},
- UI_Name = #{uiName,jdbcType=VARCHAR},
- UI_Phone = #{uiPhone,jdbcType=VARCHAR},
- UI_IDNumber = #{uiIdnumber,jdbcType=VARCHAR},
- UI_Sex = #{uiSex,jdbcType=INTEGER},
- UI_Birthday = #{uiBirthday,jdbcType=DATE},
- UI_Email = #{uiEmail,jdbcType=VARCHAR},
- UI_EntryData = #{uiEntrydata,jdbcType=DATE},
- SS_DepartmentID = #{ssDepartmentid,jdbcType=INTEGER},
- SS_WardID = #{ssWardid,jdbcType=INTEGER},
- SS_Type = #{ssType,jdbcType=INTEGER},
- SS_Nature = #{ssNature,jdbcType=INTEGER},
- SS_PessoalDate = #{ssPessoaldate,jdbcType=DATE},
- SS_Nativeplace = #{ssNativeplace,jdbcType=VARCHAR},
- SS_Politics = #{ssPolitics,jdbcType=VARCHAR},
- SS_WorkDate = #{ssWorkdate,jdbcType=DATE},
- SS_Degree = #{ssDegree,jdbcType=VARCHAR},
- SS_MaritalStatus = #{ssMaritalstatus,jdbcType=INTEGER},
- SS_Nation = #{ssNation,jdbcType=VARCHAR},
- SS_Level = #{ssLevel,jdbcType=VARCHAR},
- SS_PinyinCode = #{ssPinyincode,jdbcType=VARCHAR},
- SS_WubiCode = #{ssWubicode,jdbcType=VARCHAR},
- SS_OtherCode = #{ssOthercode,jdbcType=VARCHAR},
- SS_ISDel = #{ssIsdel,jdbcType=INTEGER},
- HI_ID = #{hiId,jdbcType=INTEGER},
- SU_Sign_Img = #{suSignImg,jdbcType=VARCHAR}
- where UI_ID = #{uiId,jdbcType=INTEGER}
- </update>
- <select id="selectNameByCode" resultType="java.lang.String">
- select UI_Name from sys_userinfo where UI_Code= #{uiCode,jdbcType=VARCHAR}
- </select>
- <select id="selectByHiId" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from sys_userinfo
- where SS_ISDel = 0 AND
- HI_ID = #{hiId,jdbcType=INTEGER}
- </select>
- <select id="selectNameCodeByHiId" resultMap="BaseResultMap">
- select
- UI_Code,UI_Name,SS_PinyinCode,SS_WubiCode,SS_OtherCode
- from sys_userinfo
- where SS_ISDel = 0 AND
- HI_ID = #{hiId,jdbcType=INTEGER}
- order by UI_Code
- </select>
- <select id="selectByWardID" resultMap="BaseResultMap">
- SELECT * from sys_ward_permission a
- INNER JOIN sys_userinfo b on a.UI_Code = b.UI_Code and a.HI_ID = b.HI_ID
- where a.DW_WardDm = #{wardId} and b.SS_ISDel = 0 and a.SWP_IsDel = 0
- </select>
- <select id="selectByUiCode" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from sys_userinfo
- where SS_ISDel = 0
- and UI_Code = #{uiCode,jdbcType=VARCHAR}
- limit 1
- </select>
- <select id="countByUidAndPwd" resultType="java.lang.Integer">
- SELECT
- count(1)
- FROM
- sys_userinfo
- WHERE
- ui_id = #{uId}
- AND BINARY ss_password = #{pwd}
- AND ss_isdel = 0
- </select>
- <update id="updatePwd">
- UPDATE sys_userinfo
- SET ss_password = #{newPwd}
- WHERE
- ui_id = #{uId}
- AND ss_password = #{oldPwd}
- AND ss_isdel = 0
- </update>
- <select id="selectNameByUiCode" resultMap="BaseResultMap" parameterType="java.util.List">
- select <include refid="Base_Column_List"/>
- from sys_userinfo
- where SS_ISDel = 0
- and UI_Code IN
- <foreach collection="list" separator="," open="(" close=")" item="item">
- #{item}
- </foreach>
- </select>
- </mapper>
|