<?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.thhy.engineering.modules.biz.engineering.mapper.SysDictMapper">
|
<resultMap id="BaseResultMap" type="com.thhy.engineering.modules.biz.engineering.entity.SysDict">
|
<!--
|
WARNING - @mbg.generated
|
This element is automatically generated by MyBatis Generator, do not modify.
|
This element was generated on Fri Mar 31 09:12:38 CST 2023.
|
-->
|
<id column="dict_id" jdbcType="VARCHAR" property="dictId" />
|
<result column="dict_type" jdbcType="VARCHAR" property="dictType" />
|
<result column="dict_type_name" jdbcType="VARCHAR" property="dictTypeName" />
|
<result column="dict_name" jdbcType="VARCHAR" property="dictName" />
|
<result column="dict_value" jdbcType="INTEGER" property="dictValue" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="is_use" jdbcType="INTEGER" property="isUse" />
|
</resultMap>
|
<insert id="dictInsert" useGeneratedKeys="true" keyProperty="dict_id">
|
<!--
|
WARNING - @mbg.generated
|
This element is automatically generated by MyBatis Generator, do not modify.
|
This element was generated on Fri Mar 31 09:12:38 CST 2023.
|
-->
|
insert into sys_dict
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="dict_id != null">
|
dict_id,
|
</if>
|
<if test="dictType != null">
|
dict_type,
|
</if>
|
<if test="dictTypeName != null">
|
dict_type_name,
|
</if>
|
<if test="dictName != null">
|
dict_name,
|
</if>
|
<if test="dictValue != null">
|
dict_value,
|
</if>
|
<if test="createTime != null">
|
create_time,
|
</if>
|
<if test="isUse != null">
|
is_use,
|
</if>
|
<if test="colors != null">
|
colors,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="dict_id != null">
|
#{dict_id,jdbcType=VARCHAR},
|
</if>
|
<if test="dictType != null">
|
#{dictType,jdbcType=VARCHAR},
|
</if>
|
<if test="dictTypeName != null">
|
#{dictTypeName,jdbcType=VARCHAR},
|
</if>
|
<if test="dictName != null">
|
#{dictName,jdbcType=VARCHAR},
|
</if>
|
<if test="dictValue != null">
|
#{dictValue,jdbcType=INTEGER},
|
</if>
|
<if test="createTime != null">
|
#{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="isUse != null">
|
#{isUse,jdbcType=INTEGER},
|
</if>
|
<if test="colors != null">
|
#{colors,jdbcType=VARCHAR},
|
</if>
|
</trim>
|
</insert>
|
|
<select id="dictList" resultType="com.thhy.engineering.modules.biz.engineering.entity.SysDict">
|
select
|
sd.dict_id as dictId,
|
sd.dict_type as dictType,
|
sd.dict_name as dictName,
|
sd.dict_value as dictValue,
|
sd.colors as colors,
|
sd.create_time as createTime,
|
sdt.dict_type_name as dictTypeName
|
from sys_dict sd
|
left join sys_dict_type sdt on sd.dict_type=sdt.dict_type
|
where
|
sd.is_use=1
|
<if test="dictType!=null and dictType!='' ">
|
and sd.dict_type=#{dictType}
|
</if>
|
order by create_time desc
|
</select>
|
<select id="dictInfo" parameterType="java.lang.String" resultMap="BaseResultMap">
|
select * from sys_dict where dict_id=#{dictId}
|
</select>
|
<update id="dictDel" parameterType="java.lang.String">
|
update sys_dict set
|
is_use=2
|
where dict_id=#{dictId}
|
</update>
|
<update id="dictUpdate" >
|
update sys_dict
|
<set>
|
<if test="dictType != null">
|
dict_type = #{dictType,jdbcType=VARCHAR},
|
</if>
|
<if test="dictTypeName != null">
|
dict_type_name = #{dictTypeName,jdbcType=VARCHAR},
|
</if>
|
<if test="dictName != null">
|
dict_name = #{dictName,jdbcType=VARCHAR},
|
</if>
|
<if test="dictValue != null">
|
dict_value = #{dictValue,jdbcType=INTEGER},
|
</if>
|
<if test="createTime != null">
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="isUse != null">
|
is_use = #{isUse,jdbcType=INTEGER},
|
</if>
|
<if test="colors != null">
|
colors = #{colors,jdbcType=INTEGER},
|
</if>
|
</set>
|
where dict_id = #{dictId,jdbcType=VARCHAR}
|
</update>
|
<select id="diceSelectNameByOne" resultType="java.lang.String">
|
select dict_id from sys_dict where is_use=1 and dict_type=#{dictType} and dict_name=#{dictName}
|
</select>
|
|
|
<select id="queryCity" resultType="com.thhy.engineering.modules.biz.engineering.entity.CityPullDown">
|
select id,name,parentid from sys_city where parentid = #{parentid}
|
</select>
|
|
<select id="dictTypePull" resultType="com.thhy.engineering.modules.biz.engineering.entity.ProSunDto.DictTypeDto">
|
select
|
dict_type as dictType,
|
dict_type_name as dictTypeName
|
from sys_dict_type
|
</select>
|
<select id="dictSelectByOne" parameterType="java.lang.String" resultType="com.thhy.engineering.modules.biz.engineering.entity.SysDict">
|
select dict_id as dictId,
|
dict_name as dictName,
|
dict_type as dictType
|
from sys_dict where is_use=1 and dict_id=#{dictId}
|
</select>
|
<select id="dictByAll" parameterType="java.lang.String" resultType="java.lang.String">
|
select id from sys_pro_sizes where sizes=#{dictId}
|
</select>
|
<select id="dictByHasAll" parameterType="java.lang.String" resultType="java.lang.String">
|
select id from sys_pro_has where has_steel=#{dictId}
|
</select>
|
<select id="dictByTurnAll" parameterType="java.lang.String" resultType="java.lang.String">
|
select id from sys_pro_turn where turn=#{dictId}
|
</select>
|
<select id="dictByGroutingAll" parameterType="java.lang.String" resultType="java.lang.String">
|
select id from sys_pro_grouting where grouting_holes=#{dictId}
|
</select>
|
<select id="dictByBlokAll" parameterType="java.lang.String" resultType="java.lang.String">
|
select id from sys_pro_blok where block_num=#{dictId}
|
</select>
|
</mapper>
|