You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
3.5 KiB
XML
82 lines
3.5 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.portal.mapper.HwWebMapper">
|
|
|
|
<resultMap type="HwWeb" id="HwWebResult">
|
|
<result property="webId" column="web_id" />
|
|
<result property="webJson" column="web_json" />
|
|
<result property="webJsonString" column="web_json_string" />
|
|
<result property="webCode" column="web_code" />
|
|
<result property="isDelete" column="is_delete" />
|
|
<result property="webJsonEnglish" column="web_json_english" />
|
|
</resultMap>
|
|
|
|
<sql id="selectHwWebVo">
|
|
select web_id, web_json, web_json_string, web_code,
|
|
web_json_english,
|
|
is_delete
|
|
from hw_web
|
|
</sql>
|
|
|
|
<select id="selectHwWebList" parameterType="HwWeb" resultMap="HwWebResult">
|
|
<include refid="selectHwWebVo"/>
|
|
<where>
|
|
and is_delete = '0'
|
|
<if test="webId != null "> and web_id = #{webId}</if>
|
|
<if test="webJson != null and webJson != ''"> and web_json = #{webJson}</if>
|
|
<if test="webJsonString != null and webJsonString != ''"> and web_json_string = #{webJsonString}</if>
|
|
<if test="webCode != null "> and web_code = #{webCode}</if>
|
|
<if test="webJsonEnglish != null"> and web_json_english = #{webJsonEnglish}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectHwWebByWebcode" parameterType="Long" resultMap="HwWebResult">
|
|
<include refid="selectHwWebVo"/>
|
|
where is_delete = '0' and web_code = #{webCode}
|
|
</select>
|
|
|
|
<insert id="insertHwWeb" parameterType="HwWeb" useGeneratedKeys="true" keyProperty="webId">
|
|
insert into hw_web
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="webJson != null">web_json,</if>
|
|
<if test="webJsonString != null">web_json_string,</if>
|
|
<if test="webCode != null">web_code,</if>
|
|
<if test="webJsonEnglish != null">web_json_english,</if>
|
|
is_delete,
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="webJson != null">#{webJson},</if>
|
|
<if test="webJsonString != null">#{webJsonString},</if>
|
|
<if test="webCode != null">#{webCode},</if>
|
|
<if test="webJsonEnglish != null">#{webJsonEnglish},</if>
|
|
<choose>
|
|
<when test="isDelete != null and isDelete != ''">#{isDelete},</when>
|
|
<otherwise>'0',</otherwise>
|
|
</choose>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateHwWeb" parameterType="HwWeb">
|
|
update hw_web
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="webJson != null">web_json = #{webJson},</if>
|
|
<if test="webJsonString != null">web_json_string = #{webJsonString},</if>
|
|
<!-- <if test="webCode != null">web_code = #{webCode},</if>-->
|
|
<if test="webJsonEnglish != null">web_json_english = #{webJsonEnglish},</if>
|
|
</trim>
|
|
where web_code = #{webCode}
|
|
</update>
|
|
|
|
<update id="deleteHwWebByWebId" parameterType="Long">
|
|
update hw_web set is_delete = '1' where web_id = #{webId}
|
|
</update>
|
|
|
|
<update id="deleteHwWebByWebIds" parameterType="String">
|
|
update hw_web set is_delete = '1' where web_id in
|
|
<foreach item="webId" collection="array" open="(" separator="," close=")">
|
|
#{webId}
|
|
</foreach>
|
|
</update>
|
|
</mapper> |