|
|
|
|
@ -7,16 +7,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<resultMap type="HwWeb" id="HwWebResult">
|
|
|
|
|
<result property="webId" column="web_id" />
|
|
|
|
|
<result property="webJson" column="web_json" />
|
|
|
|
|
<result property="webJsonString" column="web_json_string" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectHwWebVo">
|
|
|
|
|
select web_id, web_json from hw_web
|
|
|
|
|
select web_id, web_json, web_json_string from hw_web
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectHwWebList" parameterType="HwWeb" resultMap="HwWebResult">
|
|
|
|
|
<include refid="selectHwWebVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="webJson != null and webJson != ''"> and web_json = #{webJson}</if>
|
|
|
|
|
<if test="webJsonString != null and webJsonString != ''"> and web_json_string = #{webJsonString}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
@ -29,9 +31,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
insert into hw_web
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="webJson != null">web_json,</if>
|
|
|
|
|
<if test="webJsonString != null">web_json_string,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="webJson != null">#{webJson},</if>
|
|
|
|
|
<if test="webJsonString != null">#{webJsonString},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
@ -39,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
update hw_web
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="webJson != null">web_json = #{webJson},</if>
|
|
|
|
|
<if test="webJsonString != null">web_json_string = #{webJsonString},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where web_id = #{webId}
|
|
|
|
|
</update>
|
|
|
|
|
|