alive-admin/alive-server/target/classes/mapper/system/TConfigMapper.xml

93 lines
4.6 KiB
XML
Raw Normal View History

2024-05-27 16:26:14 +08:00
<?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.ruoyi.system.mapper.TConfigMapper">
<resultMap type="com.ruoyi.system.domain.TConfig" id="TConfigResult">
<result property="id" column="id" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="nodeKey" column="node_key" />
<result property="nodeValue" column="node_value" />
<result property="nodeName" column="node_name" />
</resultMap>
<sql id="selectTConfigVo">
select id, create_time, create_by, update_time, update_by, node_key, node_value, node_name from t_config
</sql>
<select id="selectTConfigList" parameterType="com.ruoyi.system.domain.TConfig" resultMap="TConfigResult">
<include refid="selectTConfigVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="nodeKey != null and nodeKey != ''"> and node_key = #{nodeKey}</if>
<if test="nodeValue != null and nodeValue != ''"> and node_value = #{nodeValue}</if>
<if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if>
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and create_time between #{params.beginTime} and #{params.endTime}</if>
</where>
order by id desc
</select>
<select id="findTConfig" parameterType="com.ruoyi.system.domain.TConfig" resultMap="TConfigResult">
<include refid="selectTConfigVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="nodeKey != null and nodeKey != ''"> and node_key = #{nodeKey}</if>
<if test="nodeValue != null and nodeValue != ''"> and node_value = #{nodeValue}</if>
<if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if>
</where>
limit 1
</select>
<select id="selectTConfigById" parameterType="Integer" resultMap="TConfigResult">
<include refid="selectTConfigVo"/>
where id = #{id}
</select>
<insert id="insertTConfig" parameterType="com.ruoyi.system.domain.TConfig" useGeneratedKeys="true" keyProperty="id">
insert into t_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="nodeKey != null and nodeKey != ''">node_key,</if>
<if test="nodeValue != null and nodeValue != ''">node_value,</if>
<if test="nodeName != null">node_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="nodeKey != null and nodeKey != ''">#{nodeKey},</if>
<if test="nodeValue != null and nodeValue != ''">#{nodeValue},</if>
<if test="nodeName != null">#{nodeName},</if>
</trim>
</insert>
<update id="updateTConfig" parameterType="com.ruoyi.system.domain.TConfig">
update t_config
<trim prefix="SET" suffixOverrides=",">
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="nodeKey != null and nodeKey != ''">node_key = #{nodeKey},</if>
<if test="nodeValue != null and nodeValue != ''">node_value = #{nodeValue},</if>
<if test="nodeName != null">node_name = #{nodeName},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTConfigByIds" parameterType="String">
delete from t_config where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>