107 lines
5.3 KiB
XML
107 lines
5.3 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.HuayangCompanyHonorMapper">
|
|
|
|
<resultMap type="HuayangCompanyHonor" id="HuayangCompanyHonorResult">
|
|
<result property="honorId" column="honor_id"/>
|
|
<result property="honorTitle" column="honor_title"/>
|
|
<result property="honorType" column="honor_type"/>
|
|
<result property="honorImage" column="honor_image"/>
|
|
<result property="honorDesc" column="honor_desc"/>
|
|
<result property="linkUrl" column="link_url"/>
|
|
<result property="sortOrder" column="sort_order"/>
|
|
<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="selectHuayangCompanyHonorVo">
|
|
select honor_id, honor_title, honor_type, honor_image, honor_desc,
|
|
link_url, sort_order, status, create_by, create_time, update_by, update_time, remark
|
|
from huayang_company_honor
|
|
</sql>
|
|
|
|
<select id="selectHuayangCompanyHonorById" parameterType="Long" resultMap="HuayangCompanyHonorResult">
|
|
<include refid="selectHuayangCompanyHonorVo"/>
|
|
where honor_id = #{honorId}
|
|
</select>
|
|
|
|
<select id="selectHuayangCompanyHonorList" parameterType="HuayangCompanyHonor" resultMap="HuayangCompanyHonorResult">
|
|
<include refid="selectHuayangCompanyHonorVo"/>
|
|
<where>
|
|
<if test="honorTitle != null and honorTitle != ''">
|
|
AND honor_title like concat('%', #{honorTitle}, '%')
|
|
</if>
|
|
<if test="honorType != null and honorType != ''">
|
|
AND honor_type = #{honorType}
|
|
</if>
|
|
<if test="status != null and status != ''">
|
|
AND status = #{status}
|
|
</if>
|
|
</where>
|
|
order by sort_order asc, honor_id asc
|
|
</select>
|
|
|
|
<select id="selectHuayangCompanyHonorPublicList" resultMap="HuayangCompanyHonorResult">
|
|
<include refid="selectHuayangCompanyHonorVo"/>
|
|
where status = '0'
|
|
order by sort_order asc, honor_id asc
|
|
</select>
|
|
|
|
<insert id="insertHuayangCompanyHonor" parameterType="HuayangCompanyHonor" useGeneratedKeys="true" keyProperty="honorId">
|
|
insert into huayang_company_honor
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="honorTitle != null and honorTitle != ''">honor_title,</if>
|
|
<if test="honorType != null and honorType != ''">honor_type,</if>
|
|
<if test="honorImage != null and honorImage != ''">honor_image,</if>
|
|
<if test="honorDesc != null">honor_desc,</if>
|
|
<if test="linkUrl != null">link_url,</if>
|
|
<if test="sortOrder != null">sort_order,</if>
|
|
<if test="status != null and status != ''">status,</if>
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="remark != null">remark,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="honorTitle != null and honorTitle != ''">#{honorTitle},</if>
|
|
<if test="honorType != null and honorType != ''">#{honorType},</if>
|
|
<if test="honorImage != null and honorImage != ''">#{honorImage},</if>
|
|
<if test="honorDesc != null">#{honorDesc},</if>
|
|
<if test="linkUrl != null">#{linkUrl},</if>
|
|
<if test="sortOrder != null">#{sortOrder},</if>
|
|
<if test="status != null and status != ''">#{status},</if>
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateHuayangCompanyHonor" parameterType="HuayangCompanyHonor">
|
|
update huayang_company_honor
|
|
<set>
|
|
<if test="honorTitle != null and honorTitle != ''">honor_title = #{honorTitle},</if>
|
|
<if test="honorType != null and honorType != ''">honor_type = #{honorType},</if>
|
|
<if test="honorImage != null and honorImage != ''">honor_image = #{honorImage},</if>
|
|
<if test="honorDesc != null">honor_desc = #{honorDesc},</if>
|
|
<if test="linkUrl != null">link_url = #{linkUrl},</if>
|
|
<if test="sortOrder != null">sort_order = #{sortOrder},</if>
|
|
<if test="status != null and status != ''">status = #{status},</if>
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
update_time = sysdate()
|
|
</set>
|
|
where honor_id = #{honorId}
|
|
</update>
|
|
|
|
<delete id="deleteHuayangCompanyHonorByIds" parameterType="Long">
|
|
delete from huayang_company_honor where honor_id in
|
|
<foreach item="honorId" collection="array" open="(" separator="," close=")">
|
|
#{honorId}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |