123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- <?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.SysDictionaryDetailInpMapper" >
- <resultMap id="BaseResultMap" type="com.xinxin.topro.sysservice.dao.mysqlmodel.SysDictionaryDetail" >
- <id column="SDD_ID" property="sddId" jdbcType="INTEGER" />
- <result column="SD_ID" property="sdId" jdbcType="INTEGER" />
- <result column="SDD_Detail_Code" property="sddDetailCode" jdbcType="VARCHAR" />
- <result column="SDD_Detail_Name" property="sddDetailName" jdbcType="VARCHAR" />
- <result column="SDD_PinyinCode" property="sddPinyincode" jdbcType="VARCHAR" />
- <result column="SDD_WubiCode" property="sddWubicode" jdbcType="VARCHAR" />
- <result column="SDD_OtherCode" property="sddOthercode" jdbcType="VARCHAR" />
- <result column="SDD_Sort" property="sddSort" jdbcType="INTEGER" />
- <result column="UI_ID" property="uiId" jdbcType="VARCHAR" />
- <result column="SDD_Update_Time" property="sddUpdateTime" jdbcType="TIMESTAMP" />
- <result column="SDD_IsDel" property="sddIsdel" jdbcType="INTEGER" />
- <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- SDD_ID, SD_ID, SDD_Detail_Code, SDD_Detail_Name, SDD_PinyinCode, SDD_WubiCode, SDD_OtherCode,
- SDD_Sort, UI_ID, SDD_Update_Time, SDD_IsDel, HI_ID
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from sys_dictionary_detail
- where SDD_IsDel = 0 and SDD_ID = #{sddId,jdbcType=INTEGER}
- </select>
- <select id="selectByDetailCode" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from sys_dictionary_detail
- where SDD_IsDel = 0 and SDD_Detail_Code = #{code,jdbcType=VARCHAR}
- </select>
- <select id="selectBySDID" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from sys_dictionary_detail
- where SDD_IsDel = 0 and SD_ID = #{SD_ID,jdbcType=INTEGER}
- </select>
- <insert id="insert" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysDictionaryDetail" >
- insert into sys_dictionary_detail(SD_ID, SDD_Detail_Code, SDD_Detail_Name, SDD_PinyinCode, SDD_WubiCode, SDD_OtherCode,
- SDD_Sort, UI_ID, SDD_Update_Time, SDD_IsDel,HI_ID)
- values
- (#{sdId,jdbcType=INTEGER},#{sddDetailCode,jdbcType=VARCHAR},#{sddDetailName,jdbcType=VARCHAR},
- #{sddPinyincode,jdbcType=VARCHAR},#{sddWubicode,jdbcType=VARCHAR},#{sddOthercode,jdbcType=VARCHAR},
- #{sddSort,jdbcType=INTEGER},#{uiId,jdbcType=VARCHAR}, now(), 0,#{hiId,jdbcType=INTEGER})
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysDictionaryDetail" >
- update sys_dictionary_detail
- <set >
- <if test="sdId != null" >
- SD_ID = #{sdId,jdbcType=INTEGER},
- </if>
- <if test="sddDetailCode != null" >
- SDD_Detail_Code = #{sddDetailCode,jdbcType=VARCHAR},
- </if>
- <if test="sddDetailName != null" >
- SDD_Detail_Name = #{sddDetailName,jdbcType=VARCHAR},
- </if>
- <if test="sddPinyincode != null" >
- SDD_PinyinCode = #{sddPinyincode,jdbcType=VARCHAR},
- </if>
- <if test="sddWubicode != null" >
- SDD_WubiCode = #{sddWubicode,jdbcType=VARCHAR},
- </if>
- <if test="sddOthercode != null" >
- SDD_OtherCode = #{sddOthercode,jdbcType=VARCHAR},
- </if>
- <if test="sddSort != null" >
- SDD_Sort = #{sddSort,jdbcType=INTEGER},
- </if>
- <if test="uiId != null" >
- UI_ID = #{uiId,jdbcType=VARCHAR},
- </if>
- <if test="sddUpdateTime != null" >
- SDD_Update_Time = #{sddUpdateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="sddIsdel != null" >
- SDD_IsDel = #{sddIsdel,jdbcType=INTEGER},
- </if>
- <if test="hiId != null" >
- HI_ID = #{hiId,jdbcType=INTEGER},
- </if>
- </set>
- where SDD_ID = #{sddId,jdbcType=INTEGER}
- </update>
- <update id="deleteBySdId">
- update sys_dictionary_detail
- set SDD_IsDel = -1,
- UI_ID = #{uiId,jdbcType=VARCHAR},
- SDD_Update_Time = now()
- where SD_ID = #{sdId,jdbcType=INTEGER}
- </update>
- <select id="countByCodeExcludeId" resultType="java.lang.Integer">
- select count(1) from sys_dictionary_detail
- where
- SDD_Detail_Code = #{sddDetailCode,jdbcType=VARCHAR}
- <if test="sddId != null">
- and SDD_ID != #{sddId,jdbcType=INTEGER}
- </if>
- </select>
- <update id="deleteBySddId">
- update sys_dictionary_detail
- set SDD_IsDel = -1,
- UI_ID = #{uiId,jdbcType=VARCHAR},
- SDD_Update_Time = now()
- where SDD_ID = #{sddId,jdbcType=INTEGER}
- </update>
- <select id="selectBySdIdName" resultMap="BaseResultMap">
- select <include refid="Base_Column_List"/>
- from sys_dictionary_detail
- where SDD_IsDel = 0
- and SD_ID = #{sdId,jdbcType=INTEGER}
- <if test="sddName != null and sddName != ''">
- and (
- SDD_Detail_Code like concat('%',#{sddName,jdbcType=VARCHAR},'%')
- or SDD_Detail_Name like concat('%',#{sddName,jdbcType=VARCHAR},'%'))
- </if>
- order by SDD_Sort
- </select>
- <update id="deleteBySddIds">
- update sys_dictionary_detail
- set SDD_IsDel = -1,
- UI_ID = #{uiId,jdbcType=VARCHAR},
- SDD_Update_Time = now()
- where SDD_ID in
- <foreach collection="list" item="item" open="(" close=")" separator=",">
- #{item,jdbcType=INTEGER}
- </foreach>
- </update>
- </mapper>
|