137 lines
7.2 KiB
XML
137 lines
7.2 KiB
XML
<?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.czlis.liswork.mapper.xtwh.ComConfigDictMapper">
|
|
<resultMap type="com.czlis.common.core.domain.entity.lis.ComConfigDict" id="ComConfigDictResult">
|
|
<id property="configId" column="config_id" />
|
|
<result property="configType" column="config_type" />
|
|
<result property="configCode" column="config_code" />
|
|
<result property="configName" column="config_name" />
|
|
<result property="configOptiontype" column="config_optiontype" />
|
|
<result property="configDefvalue" column="config_defvalue" />
|
|
<result property="configSort" column="config_sort" />
|
|
<result property="status" column="status" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="remark" column="remark" />
|
|
</resultMap>
|
|
<sql id="selectComConfigDictVo">
|
|
select config_id,config_type,config_code,config_name,config_optiontype,config_defvalue,config_sort,
|
|
status,create_by,create_time,update_by,update_time,remark from com_config_dict
|
|
</sql>
|
|
<select id="selectComConfigDictList" resultMap="ComConfigDictResult" parameterType="com.czlis.common.core.domain.entity.lis.ComConfigDict" >
|
|
<include refid="selectComConfigDictVo"></include>
|
|
<where>
|
|
<if test="configId != null and configId != 0">
|
|
and config_id = #{configId}
|
|
</if>
|
|
<if test="configType != null and configType != ''">
|
|
and config_type = #{configType}
|
|
</if>
|
|
<if test="configCode != null and configCode != ''">
|
|
and config_code = #{configCode}
|
|
</if>
|
|
<if test="configName != null and configName != ''">
|
|
and config_name = #{configName}
|
|
</if>
|
|
<if test="configOptiontype != null and configOptiontype != ''">
|
|
and config_optiontype = #{configOptiontype}
|
|
</if>
|
|
<if test="status != null and status != ''">
|
|
and status = #{status}
|
|
</if>
|
|
</where>
|
|
order by config_sort ASC
|
|
</select>
|
|
<select id="getCountById" resultType="Long">
|
|
select count(1) from com_config_dict where config_id = #{configId}
|
|
</select>
|
|
<select id="selectComConfigDictAll" resultMap="ComConfigDictResult">
|
|
<include refid="selectComConfigDictVo"/>
|
|
order by config_sort
|
|
</select>
|
|
|
|
<select id="selectComConfigDictById" parameterType="Long" resultMap="ComConfigDictResult">
|
|
<include refid="selectComConfigDictVo"/>
|
|
where config_id = #{configId}
|
|
</select>
|
|
<select id="selectComConfigDictByType" parameterType="String" resultMap="ComConfigDictResult">
|
|
<include refid="selectComConfigDictVo"/>
|
|
where config_type = #{configType}
|
|
order by config_sort
|
|
</select>
|
|
|
|
|
|
<select id="checkDictNameUnique" parameterType="String" resultMap="ComConfigDictResult">
|
|
select top 1 config_id,config_type,config_code,config_name,config_optiontype,config_defvalue,config_sort,
|
|
status,create_by,create_time,update_by,update_time,remark
|
|
from com_config_dict
|
|
where config_name=#{configName} and config_type = #{configType}
|
|
</select>
|
|
|
|
<select id="checkDictCodeUnique" parameterType="String" resultMap="ComConfigDictResult">
|
|
select top 1 config_id,config_type,config_code,config_name,config_optiontype,config_defvalue,config_sort,
|
|
status,create_by,create_time,update_by,update_time,remark
|
|
from com_config_dict
|
|
where config_code=#{configCode} and config_type = #{configType}
|
|
</select>
|
|
<insert id="insertComConfigDict" parameterType="com.czlis.common.core.domain.entity.lis.ComConfigDict" useGeneratedKeys="true" keyProperty="configId">
|
|
insert into com_config_dict(
|
|
<if test="configId != null and configId != 0">config_id,</if>
|
|
<if test="configType != null and configType != ''">config_type,</if>
|
|
<if test="configCode != null and configCode != ''">config_code,</if>
|
|
<if test="configName != null and configName != ''">config_name,</if>
|
|
<if test="configOptiontype != null and configOptiontype != ''">config_optiontype,</if>
|
|
<if test="configDefvalue != null and configDefvalue != ''">config_defvalue,</if>
|
|
<if test="configSort != null">config_sort,</if>
|
|
<if test="status != null and status != ''">status,</if>
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
create_time
|
|
)values(
|
|
<if test="configId != null and configId != 0">#{configId},</if>
|
|
<if test="configType != null and configType != ''">#{configType},</if>
|
|
<if test="configCode != null and configCode != ''">#{configCode},</if>
|
|
<if test="configName != null and configName != ''">#{configName},</if>
|
|
<if test="configOptiontype != null and configOptiontype != ''">#{configOptiontype},</if>
|
|
<if test="configDefvalue != null and configDefvalue != ''">#{configDefvalue},</if>
|
|
<if test="configSort != null">#{configSort},</if>
|
|
<if test="status != null and status != ''">#{status},</if>
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
getdate()
|
|
)
|
|
</insert>
|
|
|
|
<delete id="delComConfigDictById" parameterType="Long">
|
|
delete from com_config_dict where config_id = #{configId}
|
|
</delete>
|
|
|
|
<delete id="delComConfigDictByIds" parameterType="Long">
|
|
delete from com_config_dict where config_id in
|
|
<foreach collection="array" item="configId" open="(" separator="," close=")">
|
|
#{configId}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<update id="updateComConfigDict" parameterType="com.czlis.common.core.domain.entity.lis.ComConfigDict">
|
|
update com_config_dict
|
|
<set>
|
|
<if test="configType != null and configType != ''">config_type = #{configType},</if>
|
|
<if test="configCode != null and configCode != ''">config_code = #{configCode},</if>
|
|
<if test="configName != null and configName != ''">config_name = #{configName},</if>
|
|
<if test="configOptiontype != null and configOptiontype != ''">config_optiontype = #{configOptiontype},</if>
|
|
<if test="configDefvalue != null and configDefvalue != ''">config_defvalue = #{configDefvalue},</if>
|
|
<if test="configSort != null">config_sort = #{configSort},</if>
|
|
<if test="status != null and status != ''">status = #{status},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
update_time = getdate()
|
|
</set>
|
|
where config_id = #{configId}
|
|
</update>
|
|
|
|
|
|
</mapper> |