|
@@ -40,14 +40,14 @@
|
|
<select id="selectPressList" parameterType="Press" resultMap="PressResult">
|
|
<select id="selectPressList" parameterType="Press" resultMap="PressResult">
|
|
<include refid="selectPressVo"/>
|
|
<include refid="selectPressVo"/>
|
|
<where>
|
|
<where>
|
|
- <if test="title != null and title != ''">and title = #{title}</if>
|
|
|
|
- <if test="author != null and author != ''">and author = #{author}</if>
|
|
|
|
- <if test="pressTitle != null and pressTitle != ''">and press_title = #{pressTitle}</if>
|
|
|
|
- <if test="issue != null ">and issue = #{issue}</if>
|
|
|
|
- <if test="pages != null and pages != ''">and pages = #{pages}</if>
|
|
|
|
- <if test="keyword != null and keyword != ''">and keyword = #{keyword}</if>
|
|
|
|
- <if test="classify != null and classify != ''">and classify = #{classify}</if>
|
|
|
|
- <if test="area != null and area != ''">and area = #{area}</if>
|
|
|
|
|
|
+ <if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
|
|
|
|
+ <if test="author != null and author != ''">and author like concat('%', #{author}, '%')</if>
|
|
|
|
+ <if test="pressTitle != null and pressTitle != ''">and press_title like concat('%', #{pressTitle}, '%')</if>
|
|
|
|
+ <if test="issue != null and issue != ''">and issue like concat('%', #{issue}, '%')</if>
|
|
|
|
+ <if test="pages != null and pages != ''">and pages like concat('%', #{pages}, '%')</if>
|
|
|
|
+ <if test="keyword != null and keyword != ''">and keyword like concat('%', #{keyword}, '%')</if>
|
|
|
|
+ <if test="classify != null and classify != ''">and classify like concat('%', #{classify}, '%')</if>
|
|
|
|
+ <if test="area != null and area != ''">and area like concat('%', #{area}, '%')</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -64,32 +64,34 @@
|
|
<insert id="insertPress" parameterType="Press" useGeneratedKeys="true" keyProperty="pressId">
|
|
<insert id="insertPress" parameterType="Press" useGeneratedKeys="true" keyProperty="pressId">
|
|
insert into vr_press
|
|
insert into vr_press
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
- <if test="title != null">title,</if>
|
|
|
|
- <if test="author != null">author,</if>
|
|
|
|
- <if test="pressTitle != null">press_title,</if>
|
|
|
|
- <if test="issue != null">issue,</if>
|
|
|
|
- <if test="pages != null">pages,</if>
|
|
|
|
- <if test="keyword != null">keyword,</if>
|
|
|
|
- <if test="classify != null">classify,</if>
|
|
|
|
- <if test="area != null">area,</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="title != null and title != ''">title,</if>
|
|
|
|
+ <if test="author != null and author != ''">author,</if>
|
|
|
|
+ <if test="pressTitle != null and pressTitle != ''">press_title,</if>
|
|
|
|
+ <if test="date != null and date != ''">date,</if>
|
|
|
|
+ <if test="issue != null and issue != ''">issue,</if>
|
|
|
|
+ <if test="pages != null and pages != ''">pages,</if>
|
|
|
|
+ <if test="keyword != null and keyword != ''">keyword,</if>
|
|
|
|
+ <if test="classify != null and classify != ''">classify,</if>
|
|
|
|
+ <if test="area != null and area != ''">area,</if>
|
|
|
|
+ <if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
|
+ <if test="createTime != null ">create_time,</if>
|
|
|
|
+ <if test="updateBy != null and updateBy != ''">update_by,</if>
|
|
|
|
+ <if test="updateTime != null ">update_time,</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
- <if test="title != null">#{title},</if>
|
|
|
|
- <if test="author != null">#{author},</if>
|
|
|
|
- <if test="pressTitle != null">#{pressTitle},</if>
|
|
|
|
- <if test="issue != null">#{issue},</if>
|
|
|
|
- <if test="pages != null">#{pages},</if>
|
|
|
|
- <if test="keyword != null">#{keyword},</if>
|
|
|
|
- <if test="classify != null">#{classify},</if>
|
|
|
|
- <if test="area != null">#{area},</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="title != null and title != ''">#{title},</if>
|
|
|
|
+ <if test="author != null and author != ''">#{author},</if>
|
|
|
|
+ <if test="pressTitle != null and pressTitle != ''">#{pressTitle},</if>
|
|
|
|
+ <if test="date != null and date != ''">#{date},</if>
|
|
|
|
+ <if test="issue != null and issue != ''">#{issue},</if>
|
|
|
|
+ <if test="pages != null and pages != ''">#{pages},</if>
|
|
|
|
+ <if test="keyword != null and keyword != ''">#{keyword},</if>
|
|
|
|
+ <if test="classify != null and classify != ''">#{classify},</if>
|
|
|
|
+ <if test="area != null and area != ''">#{area},</if>
|
|
|
|
+ <if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
|
+ <if test="createTime != null ">#{createTime},</if>
|
|
|
|
+ <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
|
|
|
+ <if test="updateTime != null ">#{updateTime},</if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
@@ -106,18 +108,19 @@
|
|
<update id="updatePress" parameterType="Press">
|
|
<update id="updatePress" parameterType="Press">
|
|
update vr_press
|
|
update vr_press
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
- <if test="title != null">title = #{title},</if>
|
|
|
|
- <if test="author != null">author = #{author},</if>
|
|
|
|
- <if test="pressTitle != null">press_title = #{pressTitle},</if>
|
|
|
|
- <if test="issue != null">issue = #{issue},</if>
|
|
|
|
- <if test="pages != null">pages = #{pages},</if>
|
|
|
|
- <if test="keyword != null">keyword = #{keyword},</if>
|
|
|
|
- <if test="classify != null">classify = #{classify},</if>
|
|
|
|
- <if test="area != null">area = #{area},</if>
|
|
|
|
- <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
- <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
- <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
- <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
|
+ <if test="title != null and title != ''">title = #{title},</if>
|
|
|
|
+ <if test="author != null and author != ''">author = #{author},</if>
|
|
|
|
+ <if test="pressTitle != null and pressTitle != ''">press_title = #{pressTitle},</if>
|
|
|
|
+ <if test="date != null and date != ''">date = #{date},</if>
|
|
|
|
+ <if test="issue != null and issue != ''">issue = #{issue},</if>
|
|
|
|
+ <if test="pages != null and pages != ''">pages = #{pages},</if>
|
|
|
|
+ <if test="keyword != null and keyword != ''">keyword = #{keyword},</if>
|
|
|
|
+ <if test="classify != null and classify != ''">classify = #{classify},</if>
|
|
|
|
+ <if test="area != null and area != ''">area = #{area},</if>
|
|
|
|
+ <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
|
|
+ <if test="createTime != null ">create_time = #{createTime},</if>
|
|
|
|
+ <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
|
+ <if test="updateTime != null ">update_time = #{updateTime},</if>
|
|
</trim>
|
|
</trim>
|
|
where press_id = #{pressId}
|
|
where press_id = #{pressId}
|
|
</update>
|
|
</update>
|