98 lines
5.0 KiB
XML
98 lines
5.0 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.HuayangCompanyTechMapper">
|
|
|
|
<resultMap type="HuayangCompanyTech" id="HuayangCompanyTechResult">
|
|
<result property="techId" column="tech_id" />
|
|
<result property="techTitle" column="tech_title" />
|
|
<result property="techContent" column="tech_content" />
|
|
<result property="techCategory" column="tech_category" />
|
|
<result property="techImages" column="tech_images" />
|
|
<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="selectHuayangCompanyTechVo">
|
|
select tech_id, tech_title, tech_content, tech_category, tech_images, sort_order, status, create_by, create_time, update_by, update_time, remark from huayang_company_tech
|
|
</sql>
|
|
|
|
<select id="selectHuayangCompanyTechList" parameterType="HuayangCompanyTech" resultMap="HuayangCompanyTechResult">
|
|
<include refid="selectHuayangCompanyTechVo"/>
|
|
<where>
|
|
<if test="techTitle != null and techTitle != ''"> and tech_title like concat('%', #{techTitle}, '%')</if>
|
|
<if test="techCategory != null and techCategory != ''"> and tech_category = #{techCategory}</if>
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
</where>
|
|
order by sort_order asc
|
|
</select>
|
|
|
|
<select id="selectHuayangCompanyTechByTechId" parameterType="Long" resultMap="HuayangCompanyTechResult">
|
|
<include refid="selectHuayangCompanyTechVo"/>
|
|
where tech_id = #{techId}
|
|
</select>
|
|
|
|
<insert id="insertHuayangCompanyTech" parameterType="HuayangCompanyTech" useGeneratedKeys="true" keyProperty="techId">
|
|
insert into huayang_company_tech
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="techTitle != null and techTitle != ''">tech_title,</if>
|
|
<if test="techContent != null">tech_content,</if>
|
|
<if test="techCategory != null">tech_category,</if>
|
|
<if test="techImages != null">tech_images,</if>
|
|
<if test="sortOrder != null">sort_order,</if>
|
|
<if test="status != null">status,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="remark != null">remark,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="techTitle != null and techTitle != ''">#{techTitle},</if>
|
|
<if test="techContent != null">#{techContent},</if>
|
|
<if test="techCategory != null">#{techCategory},</if>
|
|
<if test="techImages != null">#{techImages},</if>
|
|
<if test="sortOrder != null">#{sortOrder},</if>
|
|
<if test="status != null">#{status},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateHuayangCompanyTech" parameterType="HuayangCompanyTech">
|
|
update huayang_company_tech
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="techTitle != null and techTitle != ''">tech_title = #{techTitle},</if>
|
|
<if test="techContent != null">tech_content = #{techContent},</if>
|
|
<if test="techCategory != null">tech_category = #{techCategory},</if>
|
|
<if test="techImages != null">tech_images = #{techImages},</if>
|
|
<if test="sortOrder != null">sort_order = #{sortOrder},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
</trim>
|
|
where tech_id = #{techId}
|
|
</update>
|
|
|
|
<delete id="deleteHuayangCompanyTechByTechId" parameterType="Long">
|
|
delete from huayang_company_tech where tech_id = #{techId}
|
|
</delete>
|
|
|
|
<delete id="deleteHuayangCompanyTechByTechIds" parameterType="String">
|
|
delete from huayang_company_tech where tech_id in
|
|
<foreach item="techId" collection="array" open="(" separator="," close=")">
|
|
#{techId}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|