|
@@ -24,14 +24,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="endAuditAt" column="end_audit_at" />
|
|
|
<result property="endAuditTime" column="end_audit_time" />
|
|
|
<result property="endAuditMsg" column="end_audit_msg" />
|
|
|
+ <result property="browseNum" column="browse_num" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectContentVo">
|
|
|
- select content_id, service_info, title, author, show_pictures, brief_content, content, create_time, create_at, audit_flag, audit_at, audit_time, audit_msg, release_flag, release_time, release_at, end_audit_at, end_audit_time, end_audit_msg from t_content
|
|
|
+ select content_id, service_info, title, author, show_pictures, brief_content, content, create_time, create_at, audit_flag, audit_at, audit_time, audit_msg, release_flag, release_time, release_at, end_audit_at, end_audit_time, end_audit_msg,browse_num from t_content
|
|
|
</sql>
|
|
|
|
|
|
<sql id="selectListContentVo">
|
|
|
- select content_id, service_info, title, author, show_pictures, brief_content,create_time, create_at, audit_flag, audit_at, audit_time, audit_msg, release_flag, release_time, release_at, end_audit_at, end_audit_time, end_audit_msg from t_content
|
|
|
+ select content_id, service_info, title, author, show_pictures, brief_content,create_time, create_at, audit_flag, audit_at, audit_time, audit_msg, release_flag, release_time, release_at, end_audit_at, end_audit_time, end_audit_msg,browse_num from t_content
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectContentList" parameterType="Content" resultMap="ContentResult">
|
|
@@ -69,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="endAuditAt != null">end_audit_at,</if>
|
|
|
<if test="endAuditTime != null">end_audit_time,</if>
|
|
|
<if test="endAuditMsg != null">end_audit_msg,</if>
|
|
|
+ <if test="browseNum != null">browse_num,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="serviceInfo != null">#{serviceInfo},</if>
|
|
@@ -89,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="endAuditAt != null">#{endAuditAt},</if>
|
|
|
<if test="endAuditTime != null">#{endAuditTime},</if>
|
|
|
<if test="endAuditMsg != null">#{endAuditMsg},</if>
|
|
|
+ <if test="browseNum != null">#{browseNum},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -113,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="endAuditAt != null">end_audit_at = #{endAuditAt},</if>
|
|
|
<if test="endAuditTime != null">end_audit_time = #{endAuditTime},</if>
|
|
|
<if test="endAuditMsg != null">end_audit_msg = #{endAuditMsg},</if>
|
|
|
+ <if test="browseNum != null">browse_num = #{browseNum},</if>
|
|
|
</trim>
|
|
|
where content_id = #{contentId}
|
|
|
</update>
|
|
@@ -127,4 +131,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
#{contentId}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
+
|
|
|
+ <update id="updateBrowseNumById" parameterType="Long">
|
|
|
+ update t_content t set t.browse_num = t.browse_num+1 where t.content_id = #{contentId}
|
|
|
+ </update>
|
|
|
</mapper>
|