Compare commits
2 Commits
31b5a89329
...
a0f21fc32c
Author | SHA1 | Date |
---|---|---|
|
a0f21fc32c | |
|
01b4f6c535 |
|
@ -3,8 +3,7 @@ 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.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 社区列表分页请求参数
|
||||
|
@ -12,6 +11,9 @@ import lombok.EqualsAndHashCode;
|
|||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "社区列表分页请求参数")
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class JoinCommunityListPageRes extends PageDomain {
|
||||
|
||||
/**
|
||||
|
|
|
@ -53,14 +53,12 @@
|
|||
|
||||
|
||||
<select id="selectCommunityPublishNum" resultMap="CommunityPublishNumMap">
|
||||
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 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>
|
||||
<select id="selectPageByCommunityTag" resultType="com.mcwl.communityCenter.domain.Community">
|
||||
select
|
||||
|
@ -100,9 +98,6 @@
|
|||
<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}, '%'))
|
||||
|
|
|
@ -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)
|
||||
(tenant_id, community_id, user_id, content, image_url, file_url, file_name, publish_time, create_time)
|
||||
values (#{publish.tenantId}, #{publish.communityId}, #{publish.userId}, #{publish.content}, #{publish.imageUrl},
|
||||
#{publish.fileUrl}, #{publish.fileName}, #{publish.publishTime})
|
||||
#{publish.fileUrl}, #{publish.fileName}, #{publish.publishTime}, now())
|
||||
</insert>
|
||||
<update id="elitePublish">
|
||||
update cc_publish
|
||||
|
|
Loading…
Reference in New Issue