|
@@ -3,7 +3,7 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.huijy.management.mapper.ContentMapper">
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="Content" id="ContentResult">
|
|
|
<result property="contentId" column="content_id" />
|
|
|
<result property="serviceInfo" column="service_info" />
|
|
@@ -30,20 +30,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
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
|
|
|
</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
|
|
|
+ </sql>
|
|
|
+
|
|
|
<select id="selectContentList" parameterType="Content" resultMap="ContentResult">
|
|
|
- <include refid="selectContentVo"/>
|
|
|
- <where>
|
|
|
+ <include refid="selectListContentVo"/>
|
|
|
+ <where>
|
|
|
<if test="serviceInfo != null and serviceInfo != ''"> and service_info = #{serviceInfo}</if>
|
|
|
<if test="auditFlag != null and auditFlag != ''"> and audit_flag = #{auditFlag}</if>
|
|
|
<if test="releaseFlag != null and releaseFlag != ''"> and release_flag = #{releaseFlag}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectContentByContentId" parameterType="Long" resultMap="ContentResult">
|
|
|
<include refid="selectContentVo"/>
|
|
|
where content_id = #{contentId}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<insert id="insertContent" parameterType="Content" useGeneratedKeys="true" keyProperty="contentId">
|
|
|
insert into t_content
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -118,9 +122,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteContentByContentIds" parameterType="String">
|
|
|
- delete from t_content where content_id in
|
|
|
+ delete from t_content where content_id in
|
|
|
<foreach item="contentId" collection="array" open="(" separator="," close=")">
|
|
|
#{contentId}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
-</mapper>
|
|
|
+</mapper>
|