|
@@ -11,11 +11,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="communityContent" column="community_content" />
|
|
<result property="communityContent" column="community_content" />
|
|
<result property="status" column="status" />
|
|
<result property="status" column="status" />
|
|
<result property="publishTime" column="publish_time" />
|
|
<result property="publishTime" column="publish_time" />
|
|
|
|
+ <result property="userId" column="user_id" />
|
|
|
|
+ <result property="staffId" column="staff_id" />
|
|
|
|
+ <result property="staffName" column="staff_name" />
|
|
<result property="author" column="author" />
|
|
<result property="author" column="author" />
|
|
<result property="source" column="source" />
|
|
<result property="source" column="source" />
|
|
<result property="coverImage" column="cover_image" />
|
|
<result property="coverImage" column="cover_image" />
|
|
<result property="viewCount" column="view_count" />
|
|
<result property="viewCount" column="view_count" />
|
|
<result property="isTop" column="is_top" />
|
|
<result property="isTop" column="is_top" />
|
|
|
|
+ <result property="userComment" column="user_comment" />
|
|
|
|
+ <result property="userLikes" column="user_likes" />
|
|
|
|
+ <result property="userStars" column="user_stars" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateBy" column="update_by" />
|
|
@@ -24,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectCommunityNewsVo">
|
|
<sql id="selectCommunityNewsVo">
|
|
- select community_id, community_title, community_type, community_content, status, publish_time, author, source, cover_image, view_count, is_top, create_by, create_time, update_by, update_time, remark from community_news
|
|
|
|
|
|
+ select community_id, community_title, community_type, community_content, status, publish_time, user_id, staff_id, staff_name, author, source, cover_image, view_count, is_top, user_comment, user_likes, user_stars, create_by, create_time, update_by, update_time, remark from community_news
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectCommunityNewsList" parameterType="CommunityNews" resultMap="CommunityNewsResult">
|
|
<select id="selectCommunityNewsList" parameterType="CommunityNews" resultMap="CommunityNewsResult">
|
|
@@ -35,11 +41,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="communityContent != null and communityContent != ''"> and community_content = #{communityContent}</if>
|
|
<if test="communityContent != null and communityContent != ''"> and community_content = #{communityContent}</if>
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
<if test="publishTime != null "> and publish_time = #{publishTime}</if>
|
|
<if test="publishTime != null "> and publish_time = #{publishTime}</if>
|
|
|
|
+ <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
|
+ <if test="staffId != null "> and staff_id = #{staffId}</if>
|
|
|
|
+ <if test="staffName != null and staffName != ''"> and staff_name like concat('%', #{staffName}, '%')</if>
|
|
<if test="author != null and author != ''"> and author = #{author}</if>
|
|
<if test="author != null and author != ''"> and author = #{author}</if>
|
|
<if test="source != null and source != ''"> and source = #{source}</if>
|
|
<if test="source != null and source != ''"> and source = #{source}</if>
|
|
<if test="coverImage != null and coverImage != ''"> and cover_image = #{coverImage}</if>
|
|
<if test="coverImage != null and coverImage != ''"> and cover_image = #{coverImage}</if>
|
|
<if test="viewCount != null "> and view_count = #{viewCount}</if>
|
|
<if test="viewCount != null "> and view_count = #{viewCount}</if>
|
|
<if test="isTop != null and isTop != ''"> and is_top = #{isTop}</if>
|
|
<if test="isTop != null and isTop != ''"> and is_top = #{isTop}</if>
|
|
|
|
+ <if test="userComment != null and userComment != ''"> and user_comment = #{userComment}</if>
|
|
|
|
+ <if test="userLikes != null and userLikes != ''"> and user_likes = #{userLikes}</if>
|
|
|
|
+ <if test="userStars != null and userStars != ''"> and user_stars = #{userStars}</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -56,11 +68,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="communityContent != null">community_content,</if>
|
|
<if test="communityContent != null">community_content,</if>
|
|
<if test="status != null">status,</if>
|
|
<if test="status != null">status,</if>
|
|
<if test="publishTime != null">publish_time,</if>
|
|
<if test="publishTime != null">publish_time,</if>
|
|
|
|
+ <if test="userId != null">user_id,</if>
|
|
|
|
+ <if test="staffId != null">staff_id,</if>
|
|
|
|
+ <if test="staffName != null">staff_name,</if>
|
|
<if test="author != null">author,</if>
|
|
<if test="author != null">author,</if>
|
|
<if test="source != null">source,</if>
|
|
<if test="source != null">source,</if>
|
|
<if test="coverImage != null">cover_image,</if>
|
|
<if test="coverImage != null">cover_image,</if>
|
|
<if test="viewCount != null">view_count,</if>
|
|
<if test="viewCount != null">view_count,</if>
|
|
<if test="isTop != null">is_top,</if>
|
|
<if test="isTop != null">is_top,</if>
|
|
|
|
+ <if test="userComment != null">user_comment,</if>
|
|
|
|
+ <if test="userLikes != null">user_likes,</if>
|
|
|
|
+ <if test="userStars != null">user_stars,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
@@ -73,11 +91,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="communityContent != null">#{communityContent},</if>
|
|
<if test="communityContent != null">#{communityContent},</if>
|
|
<if test="status != null">#{status},</if>
|
|
<if test="status != null">#{status},</if>
|
|
<if test="publishTime != null">#{publishTime},</if>
|
|
<if test="publishTime != null">#{publishTime},</if>
|
|
|
|
+ <if test="userId != null">#{userId},</if>
|
|
|
|
+ <if test="staffId != null">#{staffId},</if>
|
|
|
|
+ <if test="staffName != null">#{staffName},</if>
|
|
<if test="author != null">#{author},</if>
|
|
<if test="author != null">#{author},</if>
|
|
<if test="source != null">#{source},</if>
|
|
<if test="source != null">#{source},</if>
|
|
<if test="coverImage != null">#{coverImage},</if>
|
|
<if test="coverImage != null">#{coverImage},</if>
|
|
<if test="viewCount != null">#{viewCount},</if>
|
|
<if test="viewCount != null">#{viewCount},</if>
|
|
<if test="isTop != null">#{isTop},</if>
|
|
<if test="isTop != null">#{isTop},</if>
|
|
|
|
+ <if test="userComment != null">#{userComment},</if>
|
|
|
|
+ <if test="userLikes != null">#{userLikes},</if>
|
|
|
|
+ <if test="userStars != null">#{userStars},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
@@ -94,11 +118,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="communityContent != null">community_content = #{communityContent},</if>
|
|
<if test="communityContent != null">community_content = #{communityContent},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="publishTime != null">publish_time = #{publishTime},</if>
|
|
<if test="publishTime != null">publish_time = #{publishTime},</if>
|
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
|
+ <if test="staffId != null">staff_id = #{staffId},</if>
|
|
|
|
+ <if test="staffName != null">staff_name = #{staffName},</if>
|
|
<if test="author != null">author = #{author},</if>
|
|
<if test="author != null">author = #{author},</if>
|
|
<if test="source != null">source = #{source},</if>
|
|
<if test="source != null">source = #{source},</if>
|
|
<if test="coverImage != null">cover_image = #{coverImage},</if>
|
|
<if test="coverImage != null">cover_image = #{coverImage},</if>
|
|
<if test="viewCount != null">view_count = #{viewCount},</if>
|
|
<if test="viewCount != null">view_count = #{viewCount},</if>
|
|
<if test="isTop != null">is_top = #{isTop},</if>
|
|
<if test="isTop != null">is_top = #{isTop},</if>
|
|
|
|
+ <if test="userComment != null">user_comment = #{userComment},</if>
|
|
|
|
+ <if test="userLikes != null">user_likes = #{userLikes},</if>
|
|
|
|
+ <if test="userStars != null">user_stars = #{userStars},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|