refactor(communityCenter): 优化社区列表查询逻辑并添加
parent
01b4f6c535
commit
a0f21fc32c
|
@ -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 {
|
||||
|
||||
/**
|
||||
|
|
|
@ -98,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