| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.hnct.system.mapper.SysDictTypeMapper"> |
| | | <mapper namespace="com.ycl.system.mapper.SysDictTypeMapper"> |
| | | |
| | | <resultMap type="com.hnct.system.domain.SysDictType" id="SysDictTypeResult"> |
| | | <resultMap type="SysDictType" id="SysDictTypeResult"> |
| | | <id property="dictId" column="dict_id" /> |
| | | <result property="dictName" column="dict_name" /> |
| | | <result property="dictType" column="dict_type" /> |
| | |
| | | from sys_dict_type |
| | | </sql> |
| | | |
| | | <select id="selectDictTypeList" parameterType="com.hnct.system.domain.SysDictType" resultMap="SysDictTypeResult"> |
| | | <select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | <where> |
| | | <if test="dictName != null and dictName != ''"> |
| | |
| | | AND dict_type like concat('%', #{dictType}, '%') |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') |
| | | and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') |
| | | and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | <select id="selectDictTypeAll" resultMap="SysDictTypeResult"> |
| | |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <update id="updateDictType" parameterType="com.hnct.system.domain.SysDictType"> |
| | | <update id="updateDictType" parameterType="SysDictType"> |
| | | update sys_dict_type |
| | | <set> |
| | | <if test="dictName != null and dictName != ''">dict_name = #{dictName},</if> |
| | |
| | | where dict_id = #{dictId} |
| | | </update> |
| | | |
| | | <insert id="insertDictType" parameterType="com.hnct.system.domain.SysDictType"> |
| | | <insert id="insertDictType" parameterType="SysDictType"> |
| | | insert into sys_dict_type( |
| | | <if test="dictName != null and dictName != ''">dict_name,</if> |
| | | <if test="dictType != null and dictType != ''">dict_type,</if> |