55 lines
2.7 KiB
XML
55 lines
2.7 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.ruoyi.system.mapper.HuayangFixedSectionMapper">
|
|
|
|
<resultMap type="HuayangFixedSection" id="HuayangFixedSectionResult">
|
|
<result property="sectionId" column="section_id" />
|
|
<result property="sectionCode" column="section_code" />
|
|
<result property="sectionName" column="section_name" />
|
|
<result property="backgroundImage" column="background_image" />
|
|
<result property="sectionText" column="section_text" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
</resultMap>
|
|
|
|
<sql id="selectHuayangFixedSectionVo">
|
|
select section_id, section_code, section_name, background_image, section_text, create_by, create_time, update_by, update_time from huayang_fixed_section
|
|
</sql>
|
|
|
|
<select id="selectHuayangFixedSectionList" parameterType="HuayangFixedSection" resultMap="HuayangFixedSectionResult">
|
|
<include refid="selectHuayangFixedSectionVo"/>
|
|
<where>
|
|
<if test="sectionCode != null and sectionCode != ''"> and section_code = #{sectionCode}</if>
|
|
<if test="sectionName != null and sectionName != ''"> and section_name like concat('%', #{sectionName}, '%')</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectHuayangFixedSectionBySectionId" parameterType="Long" resultMap="HuayangFixedSectionResult">
|
|
<include refid="selectHuayangFixedSectionVo"/>
|
|
where section_id = #{sectionId}
|
|
</select>
|
|
|
|
<select id="selectHuayangFixedSectionByCode" parameterType="String" resultMap="HuayangFixedSectionResult">
|
|
<include refid="selectHuayangFixedSectionVo"/>
|
|
where section_code = #{sectionCode}
|
|
</select>
|
|
|
|
<update id="updateHuayangFixedSection" parameterType="HuayangFixedSection">
|
|
update huayang_fixed_section
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="sectionCode != null and sectionCode != ''">section_code = #{sectionCode},</if>
|
|
<if test="sectionName != null and sectionName != ''">section_name = #{sectionName},</if>
|
|
<if test="backgroundImage != null">background_image = #{backgroundImage},</if>
|
|
<if test="sectionText != null">section_text = #{sectionText},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
update_time = sysdate()
|
|
</trim>
|
|
where section_id = #{sectionId}
|
|
</update>
|
|
|
|
</mapper>
|