123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297 |
- <?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.sysservice.dao.mysqlmapper.SysHospitalInfooMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.sysservice.dao.mysqlmodel.SysHospitalInfo" >
- <id column="HI_ID" property="hiId" jdbcType="INTEGER" />
- <result column="HI_Name" property="hiName" jdbcType="VARCHAR" />
- <result column="HI_ShortName" property="hiShortname" jdbcType="VARCHAR" />
- <result column="HI_FullName" property="hiFullname" jdbcType="VARCHAR" />
- <result column="HI_Address" property="hiAddress" jdbcType="VARCHAR" />
- <result column="HI_Tel" property="hiTel" jdbcType="VARCHAR" />
- <result column="HI_Intro" property="hiIntro" jdbcType="VARCHAR" />
- <result column="HI_PinyinCode" property="hiPinyincode" jdbcType="VARCHAR" />
- <result column="HI_WubiCode" property="hiWubicode" jdbcType="VARCHAR" />
- <result column="HI_OtherCode" property="hiOthercode" jdbcType="VARCHAR" />
- <result column="HI_ISDel" property="hiIsdel" jdbcType="INTEGER" />
- <result column="HI_SupID" property="hiSupid" jdbcType="INTEGER" />
- <result column="HI_Auth_Code" property="hiAuthCode" jdbcType="VARCHAR" />
- <result column="HI_Active_Time" property="hiActiveTime" jdbcType="TIMESTAMP" />
- <result column="HI_Aging_Time" property="hiAgingTime" jdbcType="TIMESTAMP" />
- <result column="HI_Login_Code" property="hiLoginCode" jdbcType="VARCHAR" />
- </resultMap>
- <resultMap id="ExtendsMap" type="com.xinxin.topro.sysservice.vo.SysHospitalInfoVO" extends="BaseResultMap">
- <result column="hiSupName" property="hiSupName" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- HI_ID, HI_Name, HI_ShortName, HI_FullName, HI_Address, HI_Tel, HI_Intro, HI_PinyinCode,
- HI_WubiCode, HI_OtherCode, HI_ISDel, HI_SupID, HI_Auth_Code, HI_Active_Time, HI_Aging_Time,
- HI_Login_Code
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from sys_hospitalinfo
- where HI_ID = #{hiId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from sys_hospitalinfo
- where HI_ID = #{hiId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysHospitalInfo" >
- insert into sys_hospitalinfo (HI_ID, HI_Name, HI_ShortName,
- HI_FullName, HI_Address, HI_Tel,
- HI_Intro, HI_PinyinCode, HI_WubiCode,
- HI_OtherCode, HI_ISDel, HI_SupID,
- HI_Auth_Code, HI_Active_Time, HI_Aging_Time,
- HI_Login_Code
- )
- values (#{hiId,jdbcType=INTEGER}, #{hiName,jdbcType=VARCHAR}, #{hiShortname,jdbcType=VARCHAR},
- #{hiFullname,jdbcType=VARCHAR}, #{hiAddress,jdbcType=VARCHAR}, #{hiTel,jdbcType=VARCHAR},
- #{hiIntro,jdbcType=VARCHAR}, #{hiPinyincode,jdbcType=VARCHAR}, #{hiWubicode,jdbcType=VARCHAR},
- #{hiOthercode,jdbcType=VARCHAR}, #{hiIsdel,jdbcType=INTEGER}, #{hiSupid,jdbcType=INTEGER},
- #{hiAuthCode,jdbcType=VARCHAR}, #{hiActiveTime,jdbcType=TIMESTAMP}, #{hiAgingTime,jdbcType=TIMESTAMP},
- #{hiLoginCode,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysHospitalInfo" >
- insert into sys_hospitalinfo
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="hiId != null" >
- HI_ID,
- </if>
- <if test="hiName != null" >
- HI_Name,
- </if>
- <if test="hiShortname != null" >
- HI_ShortName,
- </if>
- <if test="hiFullname != null" >
- HI_FullName,
- </if>
- <if test="hiAddress != null" >
- HI_Address,
- </if>
- <if test="hiTel != null" >
- HI_Tel,
- </if>
- <if test="hiIntro != null" >
- HI_Intro,
- </if>
- <if test="hiPinyincode != null" >
- HI_PinyinCode,
- </if>
- <if test="hiWubicode != null" >
- HI_WubiCode,
- </if>
- <if test="hiOthercode != null" >
- HI_OtherCode,
- </if>
- <if test="hiIsdel != null" >
- HI_ISDel,
- </if>
- <if test="hiSupid != null" >
- HI_SupID,
- </if>
- <if test="hiAuthCode != null" >
- HI_Auth_Code,
- </if>
- <if test="hiActiveTime != null" >
- HI_Active_Time,
- </if>
- <if test="hiAgingTime != null" >
- HI_Aging_Time,
- </if>
- <if test="hiLoginCode != null" >
- HI_Login_Code,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="hiId != null" >
- #{hiId,jdbcType=INTEGER},
- </if>
- <if test="hiName != null" >
- #{hiName,jdbcType=VARCHAR},
- </if>
- <if test="hiShortname != null" >
- #{hiShortname,jdbcType=VARCHAR},
- </if>
- <if test="hiFullname != null" >
- #{hiFullname,jdbcType=VARCHAR},
- </if>
- <if test="hiAddress != null" >
- #{hiAddress,jdbcType=VARCHAR},
- </if>
- <if test="hiTel != null" >
- #{hiTel,jdbcType=VARCHAR},
- </if>
- <if test="hiIntro != null" >
- #{hiIntro,jdbcType=VARCHAR},
- </if>
- <if test="hiPinyincode != null" >
- #{hiPinyincode,jdbcType=VARCHAR},
- </if>
- <if test="hiWubicode != null" >
- #{hiWubicode,jdbcType=VARCHAR},
- </if>
- <if test="hiOthercode != null" >
- #{hiOthercode,jdbcType=VARCHAR},
- </if>
- <if test="hiIsdel != null" >
- #{hiIsdel,jdbcType=INTEGER},
- </if>
- <if test="hiSupid != null" >
- #{hiSupid,jdbcType=INTEGER},
- </if>
- <if test="hiAuthCode != null" >
- #{hiAuthCode,jdbcType=VARCHAR},
- </if>
- <if test="hiActiveTime != null" >
- #{hiActiveTime,jdbcType=TIMESTAMP},
- </if>
- <if test="hiAgingTime != null" >
- #{hiAgingTime,jdbcType=TIMESTAMP},
- </if>
- <if test="hiLoginCode != null" >
- #{hiLoginCode,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysHospitalInfo" >
- update sys_hospitalinfo
- <set >
- <if test="hiName != null" >
- HI_Name = #{hiName,jdbcType=VARCHAR},
- </if>
- <if test="hiShortname != null" >
- HI_ShortName = #{hiShortname,jdbcType=VARCHAR},
- </if>
- <if test="hiFullname != null" >
- HI_FullName = #{hiFullname,jdbcType=VARCHAR},
- </if>
- <if test="hiAddress != null" >
- HI_Address = #{hiAddress,jdbcType=VARCHAR},
- </if>
- <if test="hiTel != null" >
- HI_Tel = #{hiTel,jdbcType=VARCHAR},
- </if>
- <if test="hiIntro != null" >
- HI_Intro = #{hiIntro,jdbcType=VARCHAR},
- </if>
- <if test="hiPinyincode != null" >
- HI_PinyinCode = #{hiPinyincode,jdbcType=VARCHAR},
- </if>
- <if test="hiWubicode != null" >
- HI_WubiCode = #{hiWubicode,jdbcType=VARCHAR},
- </if>
- <if test="hiOthercode != null" >
- HI_OtherCode = #{hiOthercode,jdbcType=VARCHAR},
- </if>
- <if test="hiIsdel != null" >
- HI_ISDel = #{hiIsdel,jdbcType=INTEGER},
- </if>
- <if test="hiSupid != null" >
- HI_SupID = #{hiSupid,jdbcType=INTEGER},
- </if>
- <if test="hiAuthCode != null" >
- HI_Auth_Code = #{hiAuthCode,jdbcType=VARCHAR},
- </if>
- <if test="hiActiveTime != null" >
- HI_Active_Time = #{hiActiveTime,jdbcType=TIMESTAMP},
- </if>
- <if test="hiAgingTime != null" >
- HI_Aging_Time = #{hiAgingTime,jdbcType=TIMESTAMP},
- </if>
- <if test="hiLoginCode != null" >
- HI_Login_Code = #{hiLoginCode,jdbcType=VARCHAR},
- </if>
- </set>
- where HI_ID = #{hiId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysHospitalInfo" >
- update sys_hospitalinfo
- set HI_Name = #{hiName,jdbcType=VARCHAR},
- HI_ShortName = #{hiShortname,jdbcType=VARCHAR},
- HI_FullName = #{hiFullname,jdbcType=VARCHAR},
- HI_Address = #{hiAddress,jdbcType=VARCHAR},
- HI_Tel = #{hiTel,jdbcType=VARCHAR},
- HI_Intro = #{hiIntro,jdbcType=VARCHAR},
- HI_PinyinCode = #{hiPinyincode,jdbcType=VARCHAR},
- HI_WubiCode = #{hiWubicode,jdbcType=VARCHAR},
- HI_OtherCode = #{hiOthercode,jdbcType=VARCHAR},
- HI_SupID = #{hiSupid,jdbcType=INTEGER},
- HI_Auth_Code = #{hiAuthCode,jdbcType=VARCHAR},
- HI_Active_Time = #{hiActiveTime,jdbcType=TIMESTAMP},
- HI_Aging_Time = #{hiAgingTime,jdbcType=TIMESTAMP},
- HI_Login_Code = #{hiLoginCode,jdbcType=VARCHAR}
- where HI_ID = #{hiId,jdbcType=INTEGER}
- </update>
- <select id="selectHospitalPage" resultMap="BaseResultMap" >
- SELECT
- <include refid="Base_Column_List" />
- FROM
- sys_hospitalinfo
- <where>
- HI_ISDel = 0
- <if test="hiName != null and hiName != '' ">
- and (
- or HI_Name like CONCAT('%',#{hiName,jdbcType=VARCHAR},'%')
- or HI_PinyinCode like CONCAT('%',#{hiName,jdbcType=VARCHAR},'%')
- or HI_WubiCode like CONCAT('%',#{hiName,jdbcType=VARCHAR},'%')
- or HI_OtherCode like CONCAT('%',#{hiName,jdbcType=VARCHAR},'%'))
- </if>
- </where>
- </select>
- <update id="updateDel" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysHospitalInfo" >
- update sys_hospitalinfo
- set
- HI_ISDel = #{hiIsdel,jdbcType=INTEGER}
- where HI_ID = #{hiId,jdbcType=INTEGER}
- </update>
- <select id="getAllList" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from sys_hospitalinfo
- where HI_ISDel = 0
- </select>
- <insert id="insertHospital" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysHospitalInfo" >
- insert into sys_hospitalinfo (HI_Name, HI_ShortName,
- HI_FullName, HI_Address, HI_Tel,
- HI_Intro, HI_PinyinCode, HI_WubiCode,
- HI_OtherCode, HI_ISDel, HI_SupID,
- HI_Auth_Code, HI_Active_Time, HI_Aging_Time
- )
- values (#{hiName,jdbcType=VARCHAR}, #{hiShortname,jdbcType=VARCHAR},
- #{hiFullname,jdbcType=VARCHAR}, #{hiAddress,jdbcType=VARCHAR}, #{hiTel,jdbcType=VARCHAR},
- #{hiIntro,jdbcType=VARCHAR}, #{hiPinyincode,jdbcType=VARCHAR}, #{hiWubicode,jdbcType=VARCHAR},
- #{hiOthercode,jdbcType=VARCHAR}, #{hiIsdel,jdbcType=INTEGER}, #{hiSupid,jdbcType=INTEGER},
- #{hiAuthCode,jdbcType=VARCHAR}, #{hiActiveTime,jdbcType=TIMESTAMP}, #{hiAgingTime,jdbcType=TIMESTAMP}
- )
- </insert>
- <update id="delHospitals" parameterType="java.lang.Integer">
- update sys_hospitalinfo set HI_ISDel =-1 where HI_ID =#{hiId,jdbcType=INTEGER}
- </update>
- <select id="selectHospitals" resultMap="ExtendsMap" >
- SELECT
- <include refid="Base_Column_List" />,
- (select b.HI_Name from sys_hospitalinfo b where b.HI_ID = a.HI_SupID and a.HI_SupID!=0) hiSupName
- FROM
- sys_hospitalinfo a
- where
- HI_ISDel = 0
- </select>
- <select id="selectByKeyName" resultMap="ExtendsMap">
- select <include refid="Base_Column_List"/>,
- (select b.HI_Name from sys_hospitalinfo b where b.HI_ID = a.HI_SupID and a.HI_SupID!=0) hiSupName
- from sys_hospitalinfo a where HI_ISDel = 0 and (
- HI_Name like CONCAT('%',#{hiName,jdbcType=VARCHAR},'%')
- or HI_PinyinCode like CONCAT('%',#{hiName,jdbcType=VARCHAR},'%')
- or HI_WubiCode like CONCAT('%',#{hiName,jdbcType=VARCHAR},'%')
- or HI_OtherCode like CONCAT('%',#{hiName,jdbcType=VARCHAR},'%'))
- </select>
- </mapper>
|