123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 |
- <?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.DicIOMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.sysservice.dao.mysqlmodel.SysDicIO" >
- <id column="DIO_ID" property="dioId" jdbcType="INTEGER" />
- <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
- <result column="DW_WardDm" property="dwWarddm" jdbcType="VARCHAR" />
- <result column="DIO_IO_Code" property="dioCode" jdbcType="VARCHAR"/>
- <result column="DIO_Type" property="dioType" jdbcType="INTEGER" />
- <result column="DIO_IOName" property="dioIoname" jdbcType="VARCHAR" />
- <result column="DIO_IsAdvice" property="dioIsadvice" jdbcType="INTEGER" />
- <result column="DIO_Operation_Time" property="dioOperationTime" jdbcType="TIMESTAMP" />
- <result column="DIO_Operator" property="dioOperator" jdbcType="VARCHAR" />
- <result column="DIO_PinyinCode" property="dioPinyinCode" jdbcType="VARCHAR"/>
- <result column="DIO_WubiCode" property="dioWubiCode" jdbcType="VARCHAR"/>
- <result column="DIO_OtherCode" property="dioOtherCode" jdbcType="VARCHAR"/>
- <result column="DIO_IsDel" property="dioIsdel" jdbcType="INTEGER" />
- <result column="DIO_Sort" property="dioSort" jdbcType="INTEGER"/>
- </resultMap>
- <sql id="Base_Column_List" >
- DIO_ID, HI_ID, DW_WardDm, DIO_IO_Code,DIO_Type, DIO_IOName, DIO_IsAdvice, DIO_Operation_Time,
- DIO_Operator,DIO_PinyinCode,DIO_WubiCode,DIO_OtherCode, DIO_IsDel,DIO_Sort
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from dic_io
- where DIO_ID = #{dioId,jdbcType=INTEGER} order by DIO_Sort desc
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from dic_io
- where DIO_ID = #{dioId,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysDicIO" >
- insert into dic_io (DIO_ID, HI_ID, DW_WardDm, DIO_IO_Code,
- DIO_Type, DIO_IOName, DIO_IsAdvice,
- DIO_Operation_Time, DIO_Operator,DIO_PinyinCode,DIO_WubiCode,DIO_OtherCode, DIO_IsDel,DIO_Sort
- )
- values (#{dioId,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER}, #{dwWarddm,jdbcType=VARCHAR}, #{dioCode,jdbcType=VARCHAR},
- #{dioType,jdbcType=INTEGER}, #{dioIoname,jdbcType=VARCHAR}, #{dioIsadvice,jdbcType=INTEGER},
- #{dioOperationTime,jdbcType=TIMESTAMP}, #{dioOperator,jdbcType=VARCHAR},#{dioPinyinCode,jdbcType=VARCHAR},
- #{dioWubiCode,jdbcType=VARCHAR},#{dioOtherCode,jdbcType=VARCHAR}, #{dioIsdel,jdbcType=INTEGER},#{dioSort,jdbcType=INTEGER}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysDicIO" >
- insert into dic_io
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="dioId != null" >
- DIO_ID,
- </if>
- <if test="hiId != null" >
- HI_ID,
- </if>
- <if test="dwWarddm != null" >
- DW_WardDm,
- </if>
- <if test="dioCode != null" >
- DIO_IO_Code,
- </if>
- <if test="dioType != null" >
- DIO_Type,
- </if>
- <if test="dioIoname != null" >
- DIO_IOName,
- </if>
- <if test="dioIsadvice != null" >
- DIO_IsAdvice,
- </if>
- <if test="dioOperationTime != null" >
- DIO_Operation_Time,
- </if>
- <if test="dioOperator != null" >
- DIO_Operator,
- </if>
- <if test="dioPinyinCode != null" >
- DIO_PinyinCode,
- </if>
- <if test="dioWubiCode != null" >
- DIO_WubiCode,
- </if>
- <if test="dioOtherCode != null" >
- DIO_OtherCode,
- </if>
- <if test="dioIsdel != null" >
- DIO_IsDel,
- </if>
- <if test="dioSort != null">,
- DIO_Sort
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="dioId != null" >
- #{dioId,jdbcType=INTEGER},
- </if>
- <if test="hiId != null" >
- #{hiId,jdbcType=INTEGER},
- </if>
- <if test="dwWarddm != null" >
- #{dwWarddm,jdbcType=VARCHAR},
- </if>
- <if test="dioCode != null" >
- #{dioCode,jdbcType=VARCHAR},
- </if>
- <if test="dioType != null" >
- #{dioType,jdbcType=INTEGER},
- </if>
- <if test="dioIoname != null" >
- #{dioIoname,jdbcType=VARCHAR},
- </if>
- <if test="dioIsadvice != null" >
- #{dioIsadvice,jdbcType=INTEGER},
- </if>
- <if test="dioOperationTime != null" >
- #{dioOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dioOperator != null" >
- #{dioOperator,jdbcType=VARCHAR},
- </if>
- <if test="dioPinyinCode != null" >
- #{dioPinyinCode,jdbcType=VARCHAR},
- </if>
- <if test="dioWubiCode != null" >
- #{dioWubiCode,jdbcType=VARCHAR},
- </if>
- <if test="dioOtherCode != null" >
- #{dioOtherCode,jdbcType=VARCHAR},
- </if>
- <if test="dioIsdel != null" >
- #{dioIsdel,jdbcType=INTEGER},
- </if>
- <if test="dioSort =null">
- #{dioSort,jdbcTpye=INTEGER},
- </if>
- </trim>
- </insert>
- <insert id="addDicIO" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysDicIO">
- insert into dic_io (HI_ID,
- DIO_Type,DIO_IO_Code, DIO_IOName, DIO_IsAdvice,
- DIO_Operation_Time, DIO_Operator,DIO_PinyinCode,DIO_WubiCode,DIO_OtherCode, DIO_IsDel,DIO_Sort)
- values (#{hiId,jdbcType=INTEGER}, #{dioType,jdbcType=INTEGER},#{dioCode,jdbcType=VARCHAR}, #{dioIoname,jdbcType=VARCHAR}, #{dioIsadvice,jdbcType=INTEGER},
- now(), #{dioOperator,jdbcType=VARCHAR}, #{dioPinyinCode,jdbcType=VARCHAR},#{dioWubiCode,jdbcType=VARCHAR},#{dioOtherCode,jdbcType=VARCHAR},#{dioIsdel,jdbcType=INTEGER},#{dioSort,jdbcType=INTEGER}
- )
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysDicIO" >
- update dic_io
- <set >
- <if test="hiId != null" >
- HI_ID = #{hiId,jdbcType=INTEGER},
- </if>
- <if test="dwWarddm != null" >
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- </if>
- <if test="dioCode != null" >
- DIO_IO_Code = #{dioCode,jdbcType=VARCHAR},
- </if>
- <if test="dioType != null" >
- DIO_Type = #{dioType,jdbcType=INTEGER},
- </if>
- <if test="dioIoname != null" >
- DIO_IOName = #{dioIoname,jdbcType=VARCHAR},
- </if>
- <if test="dioIsadvice != null" >
- DIO_IsAdvice = #{dioIsadvice,jdbcType=INTEGER},
- </if>
- <if test="dioOperationTime != null" >
- DIO_Operation_Time = #{dioOperationTime,jdbcType=TIMESTAMP},
- </if>
- <if test="dioOperator != null" >
- DIO_Operator = #{dioOperator,jdbcType=VARCHAR},
- </if>
- <if test="dioPinyinCode != null" >
- DIO_PinyinCode = #{dioPinyinCode,jdbcType=VARCHAR},
- </if>
- <if test="dioWubiCode != null" >
- DIO_WubiCode = #{dioWubiCode,jdbcType=VARCHAR},
- </if>
- <if test="dioOtherCode != null" >
- DIO_OtherCode = #{dioOtherCode,jdbcType=VARCHAR},
- </if>
- <if test="dioIsdel != null" >
- DIO_IsDel = #{dioIsdel,jdbcType=INTEGER},
- </if>
- <if test="dioSort != null" >
- DIO_Sort = #{dioSort,jdbcType=INTEGER},
- </if>
- </set>
- where DIO_ID = #{dioId,jdbcType=INTEGER}
- </update>
- <update id="delDicIO" parameterType="java.lang.Integer">
- update dic_io
- set DIO_IsDel = -1
- where DIO_ID = #{dioId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysDicIO" >
- update dic_io
- set HI_ID = #{hiId,jdbcType=INTEGER},
- DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
- DIO_IO_Code = #{dioCode,jdbcType=VARCHAR},
- DIO_Type = #{dioType,jdbcType=INTEGER},
- DIO_IOName = #{dioIoname,jdbcType=VARCHAR},
- DIO_IsAdvice = #{dioIsadvice,jdbcType=INTEGER},
- DIO_Operation_Time = #{dioOperationTime,jdbcType=TIMESTAMP},
- DIO_Operator = #{dioOperator,jdbcType=VARCHAR},
- DIO_PinyinCode = #{dioPinyinCode,jdbcType=VARCHAR},
- DIO_WubiCode = #{dioWubiCode,jdbcType=VARCHAR},
- DIO_OtherCode = #{dioOtherCode,jdbcType=VARCHAR},
- DIO_IsDel = #{dioIsdel,jdbcType=INTEGER},
- DIO_Sort = #{dioSort,jdbcType=INTEGER}
- where DIO_ID = #{dioId,jdbcType=INTEGER}
- </update>
- <select id="selectSysDicAll" resultMap="BaseResultMap">
- select <include refid="Base_Column_List" /> from dic_io where DIO_IsDel = 0 order by DIO_Sort desc
- </select>
- <select id="getDicIOListByKeyWord" resultMap="BaseResultMap" parameterType="java.lang.String">
- select <include refid="Base_Column_List" /> from dic_io where DIO_IOName like concat('%',#{keyWord,jdbcType=VARCHAR},'%')
- </select>
- <select id="selectBySelective" resultMap="BaseResultMap">
- select <include refid="Base_Column_List" />
- from dic_io
- where DIO_IsDel = 0
- <if test="hiId != null" >
- AND HI_ID = #{hiId,jdbcType=INTEGER}
- </if>
- <if test="dioCode != null" >
- AND DIO_IO_Code = #{dioCode,jdbcType=VARCHAR}
- </if>
- </select>
- <select id="countCodeExcludeId" resultType="java.lang.Integer">
- select count(1)
- from dic_io
- where DIO_IsDel = 0
- AND (HI_ID = #{hiId,jdbcType=INTEGER} or HI_ID = 0)
- AND DIO_IO_Code = #{dioCode,jdbcType=VARCHAR}
- <if test="dioId != null">
- and DIO_ID != #{dioId,jdbcType=INTEGER}
- </if>
- </select>
- </mapper>
|