You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

243 lines
9.2 KiB

<?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.zdxt.dict.mapper.BasDictMapper">
<resultMap id="BaseResultMap" type="com.zdxt.dict.domain.BasDict">
<id column="data_dict_id" property="dataDictId" jdbcType="VARCHAR"/>
<result column="data_dict_name" property="dataDictName" jdbcType="VARCHAR"/>
<result column="data_dict_value" property="dataDictValue" jdbcType="VARCHAR"/>
<result column="data_dict_desc" property="dataDictDesc" jdbcType="VARCHAR"/>
<result column="parent_id" property="parentId" jdbcType="VARCHAR"/>
<result column="parent_id_list" property="parentIdList" jdbcType="VARCHAR"/>
<result column="dict_type" property="dictType" jdbcType="BIGINT"/>
<result column="child_count" property="childCount" jdbcType="BIGINT"/>
<result column="share_type" property="shareType" jdbcType="BIGINT"/>
<result column="order_id" property="orderId" jdbcType="INTEGER"/>
<result column="sass_id" property="sassId" jdbcType="VARCHAR"/>
<result column="expand1" property="expand1" jdbcType="VARCHAR"/>
<result column="expand2" property="expand2" jdbcType="VARCHAR"/>
<result column="expand3" property="expand3" jdbcType="VARCHAR"/>
<result column="expand4" property="expand4" jdbcType="VARCHAR"/>
<result column="expand5" property="expand5" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
data_dict_id, data_dict_name, data_dict_value, data_dict_desc, parent_id, parent_id_list, dict_type,
child_count, share_type, order_id, sass_id, expand1, expand2, expand3, expand4,expand5
</sql>
<insert id="insertBasDutyDict" parameterType="com.zdxt.dict.domain.BasDict">
insert into duty_dict
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dataDictId != null">
data_dict_id,
</if>
<if test="dataDictName != null">
data_dict_name,
</if>
<if test="dataDictValue != null">
data_dict_value,
</if>
<if test="dataDictDesc != null">
data_dict_desc,
</if>
<if test="parentId != null">
parent_id,
</if>
<if test="parentIdList != null">
parent_id_list,
</if>
<if test="dictType != null">
dict_type,
</if>
<if test="childCount != null">
child_count,
</if>
<if test="shareType != null">
share_type,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="sassId != null">
sass_id,
</if>
<if test="expand1 != null">
expand1,
</if>
<if test="expand2 != null">
expand2,
</if>
<if test="expand3 != null">
expand3,
</if>
<if test="expand4 != null">
expand4,
</if>
<if test="expand5 != null">
expand5,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dataDictId != null">
#{dataDictId,jdbcType=VARCHAR},
</if>
<if test="dataDictName != null">
#{dataDictName,jdbcType=VARCHAR},
</if>
<if test="dataDictValue != null">
#{dataDictValue,jdbcType=VARCHAR},
</if>
<if test="dataDictDesc != null">
#{dataDictDesc,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
#{parentId,jdbcType=VARCHAR},
</if>
<if test="parentIdList != null">
#{parentIdList,jdbcType=VARCHAR},
</if>
<if test="dictType != null">
#{dictType,jdbcType=BIGINT},
</if>
<if test="childCount != null">
#{childCount,jdbcType=BIGINT},
</if>
<if test="shareType != null">
#{shareType,jdbcType=BIGINT},
</if>
<if test="orderId != null">
#{orderId,jdbcType=INTEGER},
</if>
<if test="sassId != null">
#{sassId,jdbcType=VARCHAR},
</if>
<if test="expand1 != null">
#{expand1,jdbcType=VARCHAR},
</if>
<if test="expand2 != null">
#{expand2,jdbcType=VARCHAR},
</if>
<if test="expand3 != null">
#{expand3,jdbcType=VARCHAR},
</if>
<if test="expand4 != null">
#{expand4,jdbcType=VARCHAR},
</if>
<if test="expand5 != null">
#{expand5,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<delete id="deleteBasDutyDictByDataDictId" parameterType="java.lang.String">
delete from duty_dict
where data_dict_id = #{dataDictId,jdbcType=VARCHAR}
</delete>
<update id="updateBasDutyDictByDataDictId" parameterType="com.zdxt.dict.domain.BasDict">
update duty_dict
<set>
<if test="dataDictName != null">
data_dict_name = #{dataDictName,jdbcType=VARCHAR},
</if>
<if test="dataDictValue != null">
data_dict_value = #{dataDictValue,jdbcType=VARCHAR},
</if>
<if test="dataDictDesc != null">
data_dict_desc = #{dataDictDesc,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
parent_id = #{parentId,jdbcType=VARCHAR},
</if>
<if test="parentIdList != null">
parent_id_list = #{parentIdList,jdbcType=VARCHAR},
</if>
<if test="dictType != null">
dict_type = #{dictType,jdbcType=BIGINT},
</if>
<if test="childCount != null">
child_count = #{childCount,jdbcType=BIGINT},
</if>
<if test="shareType != null">
share_type = #{shareType,jdbcType=BIGINT},
</if>
<if test="orderId != null">
order_id = #{orderId,jdbcType=INTEGER},
</if>
<if test="sassId != null">
sass_id = #{sassId,jdbcType=VARCHAR},
</if>
<if test="expand1 != null">
expand1 = #{expand1,jdbcType=VARCHAR},
</if>
<if test="expand2 != null">
expand2 = #{expand2,jdbcType=VARCHAR},
</if>
<if test="expand3 != null">
expand3 = #{expand3,jdbcType=VARCHAR},
</if>
<if test="expand4 != null">
expand4 = #{expand4,jdbcType=VARCHAR},
</if>
<if test="expand5 != null">
expand5 = #{expand5,jdbcType=VARCHAR},
</if>
</set>
where data_dict_id = #{dataDictId,jdbcType=VARCHAR}
</update>
<select id="selectBasDutyDictByDataDictId" resultMap="BaseResultMap" parameterType="java.lang.String">
select
<include refid="Base_Column_List"/>
from duty_dict
where data_dict_id = #{dataDictId,jdbcType=VARCHAR}
</select>
<select id="selectBasDutyDictList" parameterType="com.zdxt.dict.domain.BasDict"
resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from duty_dict
<where>
<if test="dataDictId != null ">
and data_dict_id = #{dataDictId,jdbcType=VARCHAR}
</if>
<if test="dataDictName != null ">
and data_dict_name = #{dataDictName,jdbcType=VARCHAR}
</if>
<if test="dataDictValue != null ">
and data_dict_value = #{dataDictValue,jdbcType=VARCHAR}
</if>
<if test="dataDictDesc != null ">
and data_dict_desc = #{dataDictDesc,jdbcType=VARCHAR}
</if>
<if test="parentId != null ">
and parent_id = #{parentId,jdbcType=VARCHAR}
</if>
<if test="parentIdList != null">
and parent_id_list = #{parentIdList,jdbcType=VARCHAR}
</if>
<if test="dictType != null">
and dict_type = #{dictType,jdbcType=BIGINT}
</if>
<if test="childCount != null">
and child_count = #{childCount,jdbcType=BIGINT}
</if>
<if test="shareType != null">
and share_type = #{shareType,jdbcType=BIGINT}
</if>
<if test="orderId != null">
and order_id = #{orderId,jdbcType=INTEGER}
</if>
<if test="sassId != null and sassId != ''">
and sass_id = #{sassId,jdbcType=VARCHAR}
</if>
<if test="expand5 != null and expand5!=''">
and expand5 = #{expand5,jdbcType=VARCHAR}
</if>
</where>
order by parent_id, order_id
</select>
</mapper>