Compare commits

..

No commits in common. "87f259cd6f9580d0f02dc1806061a0eebb4081f8" and "d09f89c827319845b72c2b5d73c4c0e62251fc4d" have entirely different histories.

3 changed files with 15 additions and 12 deletions

View File

@ -3,7 +3,8 @@ package com.mcwl.communityCenter.domain.dto;
import com.mcwl.common.core.page.PageDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
*
@ -11,9 +12,6 @@ import lombok.*;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "社区列表分页请求参数")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class JoinCommunityListPageRes extends PageDomain {
/**

View File

@ -53,12 +53,14 @@
<select id="selectCommunityPublishNum" resultMap="CommunityPublishNumMap">
SELECT p.community_id AS id, COALESCE(count(p.id), 0) AS publish_num
FROM cc_community c
JOIN cc_publish p ON c.id = p.community_id and c.tenant_id = p.tenant_id
WHERE c.del_flag = '0'
AND p.del_flag = '0'
GROUP BY p.community_id
select p.community_id as id, COALESCE(count(*), 0) as publish_num
from cc_community c
join cc_publish p on c.id = p.community_id
join cc_question q on c.id = q.community_id
where c.del_flag = '0'
and p.del_flag = '0'
and q.del_flag = '0'
group by p.community_id
</select>
<select id="selectPageByCommunityTag" resultType="com.mcwl.communityCenter.domain.Community">
select
@ -98,6 +100,9 @@
<if test="joinCommunityListPageRes.isMyCreate == 1">
and c.tenant_id = #{userId}
</if>
<if test="joinCommunityListPageRes.isMyCreate == 0">
and c.tenant_id != #{userId}
</if>
<if test="joinCommunityListPageRes.searchContent != null and joinCommunityListPageRes.searchContent != ''">
and (c.community_name like concat('%', #{joinCommunityListPageRes.searchContent}, '%')
or c.description like concat('%', #{joinCommunityListPageRes.searchContent}, '%'))

View File

@ -5,9 +5,9 @@
<mapper namespace="com.mcwl.communityCenter.mapper.PublishMapper">
<insert id="insertPublish">
insert into cc_publish
(tenant_id, community_id, user_id, content, image_url, file_url, file_name, publish_time, create_time)
(tenant_id, community_id, user_id, content, image_url, file_url, file_name, publish_time)
values (#{publish.tenantId}, #{publish.communityId}, #{publish.userId}, #{publish.content}, #{publish.imageUrl},
#{publish.fileUrl}, #{publish.fileName}, #{publish.publishTime}, now())
#{publish.fileUrl}, #{publish.fileName}, #{publish.publishTime})
</insert>
<update id="elitePublish">
update cc_publish