forked from rongchao/epmet-cloud-rizhao
79 changed files with 3366 additions and 16 deletions
@ -0,0 +1,43 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 我的消息查询入参 |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/29 20:54 |
|||
*/ |
|||
@Data |
|||
public class MymessageFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -3043120833439129619L; |
|||
|
|||
@NotBlank(message="当前用户id为空") |
|||
private String userId; |
|||
|
|||
/** |
|||
* 用户当前访问的网格对应的客户id |
|||
*/ |
|||
@NotBlank(message="客户id不能为空") |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 用户当前访问的网格 |
|||
*/ |
|||
@NotBlank(message="网格id不能为空") |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@Min(1) |
|||
private Integer pageNo; |
|||
|
|||
/** |
|||
* 每页显示条数 |
|||
*/ |
|||
private Integer pageSize = 20; |
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Description 我的消息查询返参 |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/29 20:59 |
|||
*/ |
|||
@Data |
|||
public class MymessageResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 6856602932571839314L; |
|||
|
|||
/** |
|||
* 消息主键 |
|||
*/ |
|||
private String messageId; |
|||
|
|||
/** |
|||
* 消息标题 |
|||
*/ |
|||
private String messageTitle; |
|||
|
|||
/** |
|||
* 消息内容 |
|||
*/ |
|||
private String readFlag; |
|||
|
|||
/** |
|||
* 发布消息时间 |
|||
*/ |
|||
private Date noticeTime; |
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.epmet.resi.group.constant; |
|||
|
|||
/** |
|||
* @Description 入群方式 |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/29 20:23 |
|||
*/ |
|||
public interface EnterGroupTypeConstant { |
|||
|
|||
/** |
|||
* 入群方式:(受邀请入群 - invited 、 主动加入 - join) |
|||
*/ |
|||
String INVITED = "invited"; |
|||
|
|||
/** |
|||
* 入群方式:(受邀请入群 - invited 、 主动加入 - join) |
|||
*/ |
|||
String JOIN = "join"; |
|||
} |
@ -0,0 +1,44 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* <p> |
|||
* https://www.renren.io
|
|||
* <p> |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.epmet.resi.group.constant; |
|||
|
|||
|
|||
/** |
|||
* 群组状态常量 |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
* @since 1.1.0 |
|||
*/ |
|||
public interface GroupStateConstant { |
|||
|
|||
/** |
|||
* 群审核通过 - approved |
|||
*/ |
|||
String GROUP_APPROVED = "approved"; |
|||
|
|||
/** |
|||
* 群审核中 - under_auditting |
|||
*/ |
|||
String GROUP_UNDER_AUDITTING = "under_auditting"; |
|||
|
|||
/** |
|||
* 群审核未通过 - rejected |
|||
*/ |
|||
String GROUP_REJECTED = "rejected"; |
|||
|
|||
/** |
|||
* 群已屏蔽 - hidden |
|||
*/ |
|||
String GROUP_HIDDEN = "hidden"; |
|||
|
|||
/** |
|||
* 群已关闭 - closed |
|||
*/ |
|||
String GROUP_CLOSED = "closed"; |
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.epmet.resi.group.constant; |
|||
|
|||
/** |
|||
* 成员状态常量 |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
* @since 1.1.0 |
|||
*/ |
|||
public interface MemberStateConstant { |
|||
/** |
|||
* 审核中 - under_auditting、 |
|||
*/ |
|||
String UNDER_AUDITTING = "under_auditting"; |
|||
|
|||
/** |
|||
* 审核通过 - approved、 |
|||
*/ |
|||
String APPROVED = "approved"; |
|||
|
|||
/** |
|||
* 入群被拒 - rejected 、 |
|||
*/ |
|||
String REJECTED = "rejected"; |
|||
|
|||
/** |
|||
* 已禁言 - silent、 |
|||
*/ |
|||
String SILENT = "silent"; |
|||
|
|||
/** |
|||
* 取消禁言-cancel_silent resi_group_member中status置为approved |
|||
*/ |
|||
String CANCEL_SILENT = "cancel_silent"; |
|||
|
|||
/** |
|||
* 被移出群 - removed 修改resi_group_member表del_flag=1 |
|||
*/ |
|||
String REMOVED = "removed"; |
|||
} |
@ -0,0 +1,107 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.resi.group.dto.group; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 群组信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-28 |
|||
*/ |
|||
@Data |
|||
public class ResiGroupDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 群头像(htt://地址)
|
|||
*/ |
|||
private String groupHeadPhoto; |
|||
|
|||
/** |
|||
* 小组名称 |
|||
*/ |
|||
private String groupName; |
|||
|
|||
/** |
|||
* 群介绍 |
|||
*/ |
|||
private String groupIntroduction; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 状态:(审核通过 - approved 、 审核中 - under_auditting、 审核未通过 - rejected 、 已屏蔽 - hidden、 已关闭 - closed) |
|||
Ps: 如果一个小组被拒绝,当前小组的状态将永久停留在“审核未通过” |
|||
*/ |
|||
private String state; |
|||
|
|||
/** |
|||
* 最新话题时间 |
|||
*/ |
|||
private Date latestTopicPublishDate; |
|||
|
|||
/** |
|||
* 删除标记 0:未删除,1:已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,86 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.resi.group.dto.group; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 群组操作日志表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@Data |
|||
public class ResiGroupOperationDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 小组id: 来源于resi_group表id |
|||
*/ |
|||
private String resiGroupId; |
|||
|
|||
/** |
|||
* 状态:审核通过 - approved 、 审核中 - under_auditting、 审核未通过 - rejected 、 已屏蔽 - hidden、取消屏蔽 - hidden_cancelled、 (组的状态变为审核通过approved)、 已关闭 - closed |
|||
*/ |
|||
private String state; |
|||
|
|||
/** |
|||
* 审核未通过理由 ,屏蔽理由,关闭原因 |
|||
*/ |
|||
private String operateReason; |
|||
|
|||
/** |
|||
* 删除标记 0:未删除,1:已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人(操作人id) |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间(操作时间) |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,52 @@ |
|||
package com.epmet.resi.group.dto.group.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 创建小组入参 |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/29 18:43 |
|||
*/ |
|||
@Data |
|||
public class ApplyCreateGroupFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 1570620480398949075L; |
|||
|
|||
/** |
|||
* 当前登录用户id由TokenDto赋值 |
|||
*/ |
|||
@NotBlank(message="当前用户id为空") |
|||
private String userId; |
|||
|
|||
/** |
|||
* 头像地址 |
|||
*/ |
|||
@NotBlank(message = "头像地址不能为空") |
|||
private String groupHeadPhoto; |
|||
|
|||
/** |
|||
* 小组名称 |
|||
*/ |
|||
@NotBlank(message = "小组名称不能为空") |
|||
private String groupName; |
|||
|
|||
/** |
|||
* 群介绍 |
|||
*/ |
|||
@NotBlank(message = "群介绍不能为空") |
|||
private String groupIntroduction; |
|||
|
|||
/** |
|||
* 当前网格所属客户id |
|||
*/ |
|||
@NotBlank(message = "当前网格所属客户id不能为空") |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 当前网格id |
|||
*/ |
|||
@NotBlank(message = "当前网格id不能为空") |
|||
private String gridId; |
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.epmet.resi.group.dto.group.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 申请入组 |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/29 19:58 |
|||
*/ |
|||
@Data |
|||
public class ApplyJoinGroupFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -1611110663584570521L; |
|||
|
|||
/** |
|||
* 当前登录用户id由TokenDto赋值 |
|||
*/ |
|||
@NotBlank(message="当前用户id为空") |
|||
private String userId; |
|||
|
|||
/** |
|||
* 群组id |
|||
*/ |
|||
@NotBlank(message="群组id为空") |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 入群理由 |
|||
*/ |
|||
@NotBlank(message="入群理由不能为空") |
|||
private String operateDes; |
|||
} |
@ -0,0 +1,46 @@ |
|||
package com.epmet.resi.group.dto.group.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 我创建的小组查询入参 |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/28 21:34 |
|||
*/ |
|||
@Data |
|||
public class CreatedFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 8627473837950404059L; |
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@Min(1) |
|||
private Integer pageNo; |
|||
|
|||
/** |
|||
* 每页显示条数 |
|||
*/ |
|||
private Integer pageSize = 20; |
|||
|
|||
/** |
|||
* 用户当前所在网格所属客户id |
|||
*/ |
|||
@NotBlank(message = "客户id不能为空") |
|||
private String cusomerId; |
|||
|
|||
/** |
|||
* 用户当前所在网格id |
|||
*/ |
|||
@NotBlank(message = "网格id不能为空") |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 当前登录用户id由TokenDto赋值 |
|||
*/ |
|||
@NotBlank(message="当前用户id为空") |
|||
private String userId; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.epmet.resi.group.dto.group.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 查看小组管理界面信入参DTO |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/29 17:23 |
|||
*/ |
|||
@Data |
|||
public class GroupSummarizeFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -7080248304718565066L; |
|||
/** |
|||
* 群组id |
|||
*/ |
|||
@NotBlank(message = "群组Id不能为空") |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 当前登录用户id由TokenDto赋值 |
|||
*/ |
|||
@NotBlank(message="当前用户id为空") |
|||
private String userId; |
|||
} |
@ -0,0 +1,43 @@ |
|||
package com.epmet.resi.group.dto.group.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 修改群信息入参 |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/28 22:19 |
|||
*/ |
|||
@Data |
|||
public class ModifyGroupFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 3080473390023414587L; |
|||
|
|||
/** |
|||
* 群组id |
|||
*/ |
|||
@NotBlank(message = "群组Id不能为空") |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 群组头像 |
|||
*/ |
|||
private String groupHeadPhoto; |
|||
|
|||
/** |
|||
* 群组名称 |
|||
*/ |
|||
private String groupName; |
|||
|
|||
/** |
|||
* 群组介绍(三者不能同时为空) |
|||
*/ |
|||
private String groupIntroduction; |
|||
|
|||
/** |
|||
* 当前登录用户id由TokenDto赋值 |
|||
*/ |
|||
@NotBlank(message="当前用户id为空") |
|||
private String userId; |
|||
} |
@ -0,0 +1,46 @@ |
|||
package com.epmet.resi.group.dto.group.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 我的小组查询入参 |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/28 20:33 |
|||
*/ |
|||
@Data |
|||
public class MyGroupFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -7550723919561292498L; |
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@Min(1) |
|||
private Integer pageNo; |
|||
|
|||
/** |
|||
* 每页显示条数 |
|||
*/ |
|||
private Integer pageSize = 20; |
|||
|
|||
/** |
|||
* 用户当前所在网格所属客户id |
|||
*/ |
|||
@NotBlank(message = "客户id不能为空") |
|||
private String cusomerId; |
|||
|
|||
/** |
|||
* 用户当前所在网格id |
|||
*/ |
|||
@NotBlank(message = "网格id不能为空") |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 当前登录用户id由TokenDto赋值 |
|||
*/ |
|||
@NotBlank(message="当前用户id为空") |
|||
private String userId; |
|||
} |
@ -0,0 +1,46 @@ |
|||
package com.epmet.resi.group.dto.group.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 推荐小组查询入参 |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/28 15:17 |
|||
*/ |
|||
@Data |
|||
public class RecommendGroupFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 6950377043509183519L; |
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@Min(1) |
|||
private Integer pageNo; |
|||
|
|||
/** |
|||
* 每页显示条数 |
|||
*/ |
|||
private Integer pageSize = 20; |
|||
|
|||
/** |
|||
* 用户当前所在网格所属客户id |
|||
*/ |
|||
@NotBlank(message = "客户id不能为空") |
|||
private String cusomerId; |
|||
|
|||
/** |
|||
* 用户当前所在网格id |
|||
*/ |
|||
@NotBlank(message = "网格id不能为空") |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 当前登录用户id由TokenDto赋值 |
|||
*/ |
|||
@NotBlank(message="当前用户id为空") |
|||
private String userId; |
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.epmet.resi.group.dto.group.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 我创建的小组返参DTO |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/28 21:26 |
|||
*/ |
|||
@Data |
|||
public class CreatedResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 3647535397799565122L; |
|||
/** |
|||
* 群组id |
|||
*/ |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 群组头像 |
|||
*/ |
|||
private String groupHeadPhoto; |
|||
|
|||
/** |
|||
* 群组名称 |
|||
*/ |
|||
private String groupName; |
|||
|
|||
/** |
|||
* 成员总数 |
|||
*/ |
|||
private Integer totalMember; |
|||
|
|||
/** |
|||
* 党员总数 |
|||
*/ |
|||
private Integer totalPartyMember; |
|||
|
|||
/** |
|||
* (审核通过 - approved 、 审核中 - under_auditting、 审核未通过 - rejected 、 已屏蔽 - hidden、 已关闭 - closed) |
|||
*/ |
|||
private String groupState; |
|||
} |
@ -0,0 +1,60 @@ |
|||
package com.epmet.resi.group.dto.group.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/29 17:33 |
|||
*/ |
|||
@Data |
|||
public class GroupSummarizeResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 4286260163395169286L; |
|||
|
|||
/** |
|||
* 群组id |
|||
*/ |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 群组头像 |
|||
*/ |
|||
private String groupHeadPhoto; |
|||
|
|||
/** |
|||
* 组长名称 |
|||
*/ |
|||
private String leaderName; |
|||
|
|||
/** |
|||
* 群组名称 |
|||
*/ |
|||
private String groupName; |
|||
|
|||
/** |
|||
* 组介绍 |
|||
*/ |
|||
private String groupIntroduction; |
|||
|
|||
/** |
|||
* 成员总数 |
|||
*/ |
|||
private Integer totalMember; |
|||
|
|||
/** |
|||
* 党员总数 |
|||
*/ |
|||
private Integer totalPartyMember; |
|||
|
|||
/** |
|||
* 待审核总数 |
|||
*/ |
|||
private Integer totalApplyingMember; |
|||
|
|||
/** |
|||
* 群主标识leader,member成员 |
|||
*/ |
|||
private String leaderFlag; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.epmet.resi.group.dto.group.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 最新话题 |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/28 20:56 |
|||
*/ |
|||
@Data |
|||
public class LatestTopicDTO implements Serializable { |
|||
private static final long serialVersionUID = 7529953491400557428L; |
|||
/** |
|||
* 话题id |
|||
*/ |
|||
private String topicId; |
|||
|
|||
/** |
|||
* 话题内容 |
|||
*/ |
|||
private String topicContent; |
|||
} |
@ -0,0 +1,55 @@ |
|||
package com.epmet.resi.group.dto.group.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 我的小组返参DTO |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/28 20:34 |
|||
*/ |
|||
@Data |
|||
public class MyGroupResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 719605725120261694L; |
|||
|
|||
/** |
|||
* 群组id |
|||
*/ |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 群组头像 |
|||
*/ |
|||
private String groupHeadPhoto; |
|||
|
|||
/** |
|||
* 群组名称 |
|||
*/ |
|||
private String groupName; |
|||
|
|||
/** |
|||
* 成员总数 |
|||
*/ |
|||
private Integer totalMember; |
|||
|
|||
/** |
|||
* 党员总数 |
|||
*/ |
|||
private Integer totalPartyMember; |
|||
|
|||
/** |
|||
* (审核通过 - approved 、 审核中 - under_auditting、 审核未通过 - rejected 、 已屏蔽 - hidden、 已关闭 - closed) |
|||
*/ |
|||
private String groupState; |
|||
|
|||
/** |
|||
* member成员,leader群主 |
|||
*/ |
|||
private String groupLeaderFlag; |
|||
|
|||
/** |
|||
* 最新话题 |
|||
*/ |
|||
private LatestTopicDTO latestTopic; |
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.epmet.resi.group.dto.group.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 推荐小组查询返参 |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/28 17:11 |
|||
*/ |
|||
@Data |
|||
public class RecommendGroupResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -155229599412911489L; |
|||
/** |
|||
* 群组id |
|||
*/ |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 群组头像 |
|||
*/ |
|||
private String groupHeadPhoto; |
|||
|
|||
/** |
|||
* 群组名称 |
|||
*/ |
|||
private String groupName; |
|||
|
|||
/** |
|||
* 成员总数 |
|||
*/ |
|||
private Integer totalMember; |
|||
|
|||
/** |
|||
* 党员总数 |
|||
*/ |
|||
private Integer totalPartyMember; |
|||
|
|||
} |
@ -0,0 +1,109 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.resi.group.dto.member; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 组成员出入群记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@Data |
|||
public class GroupMemeberOperationDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 用户id来源于customer_user.id |
|||
*/ |
|||
private String customerUserId; |
|||
|
|||
/** |
|||
* 群组表主键RESI_GROUP.ID |
|||
*/ |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 状态: |
|||
审核中 - under_auditting、 |
|||
审核通过 - approved、 |
|||
入群被拒 - rejected 、 |
|||
已禁言 - silent、 |
|||
取消禁言-cancel_silent resi_group_member中status置为approved |
|||
被移出群 - removed 修改resi_group_member表del_flag=1 |
|||
Ps: 1) 入群被拒绝之后,如果再申请是插入一条新的审核中的数据 |
|||
2)组长看到的待审核列表,同一个人一开始被拒绝,后来再次申请,列表是显示2条 |
|||
*/ |
|||
private String operateStatus; |
|||
|
|||
/** |
|||
* 入群方式:(受邀请入群 - invited 、 主动加入 - join) |
|||
*/ |
|||
private String enterGroupType; |
|||
|
|||
/** |
|||
* 邀请连接id对应GROUP_INVITATION.id |
|||
*/ |
|||
private String groupInvitationId; |
|||
|
|||
/** |
|||
* 入群理由、拒绝理由 |
|||
*/ |
|||
private String operateDes; |
|||
|
|||
/** |
|||
* 删除标记 0:未删除,1:已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人(操作人id) |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间(操作时间) |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,101 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.resi.group.dto.member; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 群组成员关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@Data |
|||
public class ResiGroupMemberDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 用户id,来源于customer_user.id |
|||
*/ |
|||
private String customerUserId; |
|||
|
|||
/** |
|||
* 小组id: 来源于resi_group表id |
|||
*/ |
|||
private String resiGroupId; |
|||
|
|||
/** |
|||
* member成员,leader群主 |
|||
*/ |
|||
private String groupLeaderFlag; |
|||
|
|||
/** |
|||
* 入群方式:(受邀请入群 - invited 、 主动加入 - join) |
|||
*/ |
|||
private String enterGroupType; |
|||
|
|||
/** |
|||
* 邀请连接id对应GROUP_INVITATION.id |
|||
*/ |
|||
private String groupInvitationId; |
|||
|
|||
/** |
|||
* 状态:( 审核通过 - approved、 已禁言 - silent、 被移出群 - removed) |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 删除标记 0:未删除,1:已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人(用户id,来源于customer_user.id) |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间(入群时间) |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
} |
@ -0,0 +1,164 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.group.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.modules.group.service.ResiGroupService; |
|||
import com.epmet.resi.group.dto.group.form.*; |
|||
import com.epmet.resi.group.dto.group.result.CreatedResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.GroupSummarizeResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.MyGroupResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.RecommendGroupResultDTO; |
|||
import oracle.jdbc.proxy.annotation.Post; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 群组信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-28 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("group") |
|||
public class ResiGroupController { |
|||
|
|||
@Autowired |
|||
private ResiGroupService resiGroupService; |
|||
|
|||
/** |
|||
* @param tokenDto |
|||
* @param myGroupFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.group.dto.group.result.MyGroupResultDTO>> |
|||
* @Author yinzuomei |
|||
* @Description 我的小组查询(包含我创建的小组+我加入的小组),以各组的最新话题时间有近到远排序) |
|||
* @Date 2020/3/28 20:36 |
|||
**/ |
|||
@PostMapping("getmygroup") |
|||
public Result<List<MyGroupResultDTO>> getMyGroup(@LoginUser TokenDto tokenDto, @RequestBody MyGroupFormDTO myGroupFormDTO) { |
|||
myGroupFormDTO.setUserId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(myGroupFormDTO); |
|||
return resiGroupService.getMyGroup(myGroupFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @param tokenDto |
|||
* @param recommendGroupFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.group.dto.group.result.RecommendGroupResultDTO>> |
|||
* @Author yinzuomei |
|||
* @Description 推荐组列表查询 |
|||
* @Date 2020/3/28 19:52 |
|||
**/ |
|||
@PostMapping("getrecommendgroup") |
|||
public Result<List<RecommendGroupResultDTO>> getRecommendGroup(@LoginUser TokenDto tokenDto, |
|||
@RequestBody RecommendGroupFormDTO recommendGroupFormDTO) { |
|||
recommendGroupFormDTO.setUserId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(recommendGroupFormDTO); |
|||
return resiGroupService.getRecommendGroup(recommendGroupFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @param tokenDto |
|||
* @param createdFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.group.dto.group.result.CreatedResultDTO>> |
|||
* @Author yinzuomei |
|||
* @Description 我创建的小组 |
|||
* @Date 2020/3/28 21:59 |
|||
**/ |
|||
@PostMapping("getcreated") |
|||
public Result<List<CreatedResultDTO>> getCreated(@LoginUser TokenDto tokenDto, |
|||
@RequestBody CreatedFormDTO createdFormDTO) { |
|||
createdFormDTO.setUserId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(createdFormDTO); |
|||
return resiGroupService.getCreated(createdFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @param tokenDto |
|||
* @param modifyGroupFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 修改组信息 |
|||
* @Date 2020/3/28 22:20 |
|||
**/ |
|||
@PostMapping("modifygroup") |
|||
public Result modifyGroup(@LoginUser TokenDto tokenDto, @RequestBody ModifyGroupFormDTO modifyGroupFormDTO) { |
|||
modifyGroupFormDTO.setUserId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(modifyGroupFormDTO); |
|||
return resiGroupService.modifyGroup(modifyGroupFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @param tokenDto |
|||
* @param groupSummarizeFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 查看小组管理界面信息 |
|||
* @Date 2020/3/29 17:32 |
|||
**/ |
|||
@PostMapping("getgroupsummarize") |
|||
public Result<GroupSummarizeResultDTO> getGroupSummarize(@LoginUser TokenDto tokenDto, |
|||
@RequestBody GroupSummarizeFormDTO groupSummarizeFormDTO) { |
|||
groupSummarizeFormDTO.setUserId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(groupSummarizeFormDTO); |
|||
return resiGroupService.getGroupSummarize(groupSummarizeFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @param tokenDto |
|||
* @param applyCreateGroupFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 创建小组 |
|||
* @Date 2020/3/29 19:26 |
|||
**/ |
|||
@PostMapping("applycreategroup") |
|||
public Result applyCreateGroup(@LoginUser TokenDto tokenDto, |
|||
@RequestBody ApplyCreateGroupFormDTO applyCreateGroupFormDTO) { |
|||
applyCreateGroupFormDTO.setUserId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(applyCreateGroupFormDTO); |
|||
return resiGroupService.applyCreateGroup(applyCreateGroupFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @param tokenDto |
|||
* @param applyJoinGroupFormDTO |
|||
* @Author yinzuomei |
|||
* @Description 申请加入小组 |
|||
* @Date 2020/3/29 20:01 |
|||
**/ |
|||
@PostMapping("applyjoingroup") |
|||
public Result applyJoinGroup(@LoginUser TokenDto tokenDto, |
|||
@RequestBody ApplyJoinGroupFormDTO applyJoinGroupFormDTO){ |
|||
applyJoinGroupFormDTO.setUserId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(applyJoinGroupFormDTO); |
|||
return resiGroupService.applyJoinGroup(applyJoinGroupFormDTO); |
|||
} |
|||
//加入小组界面初始化
|
|||
|
|||
} |
@ -0,0 +1,90 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.group.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.modules.group.entity.ResiGroupEntity; |
|||
import com.epmet.resi.group.dto.group.form.*; |
|||
import com.epmet.resi.group.dto.group.result.*; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 群组信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-28 |
|||
*/ |
|||
@Mapper |
|||
public interface ResiGroupDao extends BaseDao<ResiGroupEntity> { |
|||
|
|||
/** |
|||
* @param myGroupFormDTO |
|||
* @return java.util.List<com.epmet.resi.group.dto.group.result.MyGroupResultDTO> |
|||
* @Author yinzuomei |
|||
* @Description 我的小组查询(包含我创建的小组+我加入的小组),以各组的最新话题时间有近到远排序) |
|||
* @Date 2020/3/28 20:39 |
|||
**/ |
|||
List<MyGroupResultDTO> selectListMyGroup(MyGroupFormDTO myGroupFormDTO); |
|||
|
|||
/** |
|||
* @return com.epmet.resi.group.dto.group.result.LatestTopicDTO |
|||
* @param groupId |
|||
* @Author yinzuomei |
|||
* @Description 查询当前组最新话题 |
|||
* @Date 2020/3/28 21:15 |
|||
**/ |
|||
LatestTopicDTO selectLatestTopic(String groupId); |
|||
|
|||
/** |
|||
* @param recommendGroupFormDTO |
|||
* @return java.util.List<com.epmet.resi.group.dto.group.result.RecommendGroupResultDTO> |
|||
* @Author yinzuomei |
|||
* @Description 推荐组列表查询 |
|||
* @Date 2020/3/28 20:04 |
|||
**/ |
|||
List<RecommendGroupResultDTO> selectListRecommendGroup(RecommendGroupFormDTO recommendGroupFormDTO); |
|||
|
|||
/** |
|||
* @return java.util.List<com.epmet.resi.group.dto.group.result.CreatedResultDTO> |
|||
* @param createdFormDTO |
|||
* @Author yinzuomei |
|||
* @Description 我创建的小组 |
|||
* @Date 2020/3/28 22:05 |
|||
**/ |
|||
List<CreatedResultDTO> selectListMyCreated(CreatedFormDTO createdFormDTO); |
|||
|
|||
/** |
|||
* @param modifyGroupFormDTO |
|||
* @return int |
|||
* @Author yinzuomei |
|||
* @Description 修改组信息 |
|||
* @Date 2020/3/28 22:30 |
|||
**/ |
|||
int modifyGroupInfo(ModifyGroupFormDTO modifyGroupFormDTO); |
|||
|
|||
/** |
|||
* @param groupSummarizeFormDTO |
|||
* @return com.epmet.resi.group.dto.group.result.GroupSummarizeResultDTO |
|||
* @Author yinzuomei |
|||
* @Description 查看小组管理界面信息 |
|||
* @Date 2020/3/29 17:55 |
|||
**/ |
|||
GroupSummarizeResultDTO selectGroupSummarize(GroupSummarizeFormDTO groupSummarizeFormDTO); |
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.group.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.modules.group.entity.ResiGroupOperationEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 群组操作日志表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@Mapper |
|||
public interface ResiGroupOperationDao extends BaseDao<ResiGroupOperationEntity> { |
|||
|
|||
} |
@ -0,0 +1,77 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.group.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 群组信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-28 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("resi_group") |
|||
public class ResiGroupEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 群头像(htt://地址)
|
|||
*/ |
|||
private String groupHeadPhoto; |
|||
|
|||
/** |
|||
* 小组名称 |
|||
*/ |
|||
private String groupName; |
|||
|
|||
/** |
|||
* 群介绍 |
|||
*/ |
|||
private String groupIntroduction; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 状态:(审核通过 - approved 、 审核中 - under_auditting、 审核未通过 - rejected 、 已屏蔽 - hidden、 已关闭 - closed) |
|||
Ps: 如果一个小组被拒绝,当前小组的状态将永久停留在“审核未通过” |
|||
*/ |
|||
private String state; |
|||
|
|||
/** |
|||
* 最新话题时间 |
|||
*/ |
|||
private Date latestTopicPublishDate; |
|||
|
|||
} |
@ -0,0 +1,56 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.group.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 群组操作日志表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("resi_group_operation") |
|||
public class ResiGroupOperationEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 小组id: 来源于resi_group表id |
|||
*/ |
|||
private String resiGroupId; |
|||
|
|||
/** |
|||
* 状态:审核通过 - approved 、 审核中 - under_auditting、 审核未通过 - rejected 、 已屏蔽 - hidden、取消屏蔽 - hidden_cancelled、 (组的状态变为审核通过approved)、 已关闭 - closed |
|||
*/ |
|||
private String state; |
|||
|
|||
/** |
|||
* 审核未通过理由 ,屏蔽理由,关闭原因 |
|||
*/ |
|||
private String operateReason; |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.group.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 群组操作日志表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@Component |
|||
public class ResiGroupOperationRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 群组信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-28 |
|||
*/ |
|||
@Component |
|||
public class ResiGroupRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,95 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.group.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.modules.group.entity.ResiGroupOperationEntity; |
|||
import com.epmet.resi.group.dto.group.ResiGroupOperationDTO; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 群组操作日志表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
public interface ResiGroupOperationService extends BaseService<ResiGroupOperationEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<ResiGroupOperationDTO> |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
PageData<ResiGroupOperationDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<ResiGroupOperationDTO> |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
List<ResiGroupOperationDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return ResiGroupOperationDTO |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
ResiGroupOperationDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
void save(ResiGroupOperationDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
void update(ResiGroupOperationDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,165 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.group.service; |
|||
|
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.modules.group.entity.ResiGroupEntity; |
|||
import com.epmet.resi.group.dto.group.ResiGroupDTO; |
|||
import com.epmet.resi.group.dto.group.form.*; |
|||
import com.epmet.resi.group.dto.group.result.CreatedResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.GroupSummarizeResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.MyGroupResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.RecommendGroupResultDTO; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 群组信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-28 |
|||
*/ |
|||
public interface ResiGroupService extends BaseService<ResiGroupEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<ResiGroupDTO> |
|||
* @author generator |
|||
* @date 2020-03-28 |
|||
*/ |
|||
PageData<ResiGroupDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<ResiGroupDTO> |
|||
* @author generator |
|||
* @date 2020-03-28 |
|||
*/ |
|||
List<ResiGroupDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return ResiGroupDTO |
|||
* @author generator |
|||
* @date 2020-03-28 |
|||
*/ |
|||
ResiGroupDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-03-28 |
|||
*/ |
|||
void save(ResiGroupDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-03-28 |
|||
*/ |
|||
void update(ResiGroupDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-03-28 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @param myGroupFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.group.dto.group.result.MyGroupResultDTO>> |
|||
* @Author yinzuomei |
|||
* @Description 我的小组查询(包含我创建的小组+我加入的小组),以各组的最新话题时间有近到远排序) |
|||
* @Date 2020/3/28 20:37 |
|||
**/ |
|||
Result<List<MyGroupResultDTO>> getMyGroup(MyGroupFormDTO myGroupFormDTO); |
|||
|
|||
/** |
|||
* @param recommendGroupFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.group.dto.group.result.RecommendGroupResultDTO>> |
|||
* @Author yinzuomei |
|||
* @Description 推荐组列表查询 |
|||
* @Date 2020/3/28 19:53 |
|||
**/ |
|||
Result<List<RecommendGroupResultDTO>> getRecommendGroup(RecommendGroupFormDTO recommendGroupFormDTO); |
|||
|
|||
/** |
|||
* @param createdFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.group.dto.group.result.CreatedResultDTO>> |
|||
* @Author yinzuomei |
|||
* @Description 我创建的小组 |
|||
* @Date 2020/3/28 22:01 |
|||
**/ |
|||
Result<List<CreatedResultDTO>> getCreated(CreatedFormDTO createdFormDTO); |
|||
|
|||
/** |
|||
* @param modifyGroupFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 修改组信息 |
|||
* @Date 2020/3/28 22:27 |
|||
**/ |
|||
Result modifyGroup(ModifyGroupFormDTO modifyGroupFormDTO); |
|||
|
|||
/** |
|||
* @param groupSummarizeFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.resi.group.dto.group.result.GroupSummarizeResultDTO> |
|||
* @Author yinzuomei |
|||
* @Description 查看小组管理界面信息 |
|||
* @Date 2020/3/29 17:52 |
|||
**/ |
|||
Result<GroupSummarizeResultDTO> getGroupSummarize(GroupSummarizeFormDTO groupSummarizeFormDTO); |
|||
|
|||
/** |
|||
* @param applyCreateGroupFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 创建小组 |
|||
* @Date 2020/3/29 19:26 |
|||
**/ |
|||
Result applyCreateGroup(ApplyCreateGroupFormDTO applyCreateGroupFormDTO); |
|||
|
|||
/** |
|||
* @param applyJoinGroupFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 申请加入小组 |
|||
* @Date 2020/3/29 20:01 |
|||
**/ |
|||
Result applyJoinGroup(ApplyJoinGroupFormDTO applyJoinGroupFormDTO); |
|||
} |
@ -0,0 +1,104 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.group.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.modules.group.dao.ResiGroupOperationDao; |
|||
import com.epmet.modules.group.entity.ResiGroupOperationEntity; |
|||
import com.epmet.modules.group.redis.ResiGroupOperationRedis; |
|||
import com.epmet.modules.group.service.ResiGroupOperationService; |
|||
import com.epmet.resi.group.dto.group.ResiGroupOperationDTO; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 群组操作日志表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@Service |
|||
public class ResiGroupOperationServiceImpl extends BaseServiceImpl<ResiGroupOperationDao, ResiGroupOperationEntity> implements ResiGroupOperationService { |
|||
|
|||
@Autowired |
|||
private ResiGroupOperationRedis resiGroupOperationRedis; |
|||
|
|||
@Override |
|||
public PageData<ResiGroupOperationDTO> page(Map<String, Object> params) { |
|||
IPage<ResiGroupOperationEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, ResiGroupOperationDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<ResiGroupOperationDTO> list(Map<String, Object> params) { |
|||
List<ResiGroupOperationEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, ResiGroupOperationDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<ResiGroupOperationEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<ResiGroupOperationEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public ResiGroupOperationDTO get(String id) { |
|||
ResiGroupOperationEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, ResiGroupOperationDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(ResiGroupOperationDTO dto) { |
|||
ResiGroupOperationEntity entity = ConvertUtils.sourceToTarget(dto, ResiGroupOperationEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(ResiGroupOperationDTO dto) { |
|||
ResiGroupOperationEntity entity = ConvertUtils.sourceToTarget(dto, ResiGroupOperationEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,280 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.group.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.modules.group.dao.ResiGroupDao; |
|||
import com.epmet.modules.group.entity.ResiGroupEntity; |
|||
import com.epmet.modules.group.entity.ResiGroupOperationEntity; |
|||
import com.epmet.modules.group.service.ResiGroupOperationService; |
|||
import com.epmet.modules.group.service.ResiGroupService; |
|||
import com.epmet.modules.member.service.GroupMemeberOperationService; |
|||
import com.epmet.modules.member.service.ResiGroupMemberService; |
|||
import com.epmet.modules.utils.ModuleConstant; |
|||
import com.epmet.redis.ResiGroupRedis; |
|||
import com.epmet.resi.group.constant.EnterGroupTypeConstant; |
|||
import com.epmet.resi.group.constant.GroupStateConstant; |
|||
import com.epmet.resi.group.constant.MemberStateConstant; |
|||
import com.epmet.resi.group.dto.group.ResiGroupDTO; |
|||
import com.epmet.resi.group.dto.group.ResiGroupOperationDTO; |
|||
import com.epmet.resi.group.dto.group.form.*; |
|||
import com.epmet.resi.group.dto.group.result.CreatedResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.GroupSummarizeResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.MyGroupResultDTO; |
|||
import com.epmet.resi.group.dto.group.result.RecommendGroupResultDTO; |
|||
import com.epmet.resi.group.dto.member.GroupMemeberOperationDTO; |
|||
import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 群组信息表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-28 |
|||
*/ |
|||
@Service |
|||
public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGroupEntity> implements ResiGroupService { |
|||
|
|||
@Autowired |
|||
private ResiGroupRedis resiGroupRedis; |
|||
|
|||
@Autowired |
|||
private ResiGroupMemberService resiGroupMemberService; |
|||
|
|||
@Autowired |
|||
private ResiGroupOperationService resiGroupOperationService; |
|||
|
|||
@Autowired |
|||
private GroupMemeberOperationService groupMemeberOperationService; |
|||
|
|||
@Override |
|||
public PageData<ResiGroupDTO> page(Map<String, Object> params) { |
|||
IPage<ResiGroupEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, ResiGroupDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<ResiGroupDTO> list(Map<String, Object> params) { |
|||
List<ResiGroupEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, ResiGroupDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<ResiGroupEntity> getWrapper(Map<String, Object> params) { |
|||
String id = (String) params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<ResiGroupEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public ResiGroupDTO get(String id) { |
|||
ResiGroupEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, ResiGroupDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(ResiGroupDTO dto) { |
|||
ResiGroupEntity entity = ConvertUtils.sourceToTarget(dto, ResiGroupEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(ResiGroupDTO dto) { |
|||
ResiGroupEntity entity = ConvertUtils.sourceToTarget(dto, ResiGroupEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* @param myGroupFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.group.dto.group.result.MyGroupResultDTO>> |
|||
* @Author yinzuomei |
|||
* @Description 我的小组查询(包含我创建的小组+我加入的小组),以各组的最新话题时间有近到远排序) |
|||
* @Date 2020/3/28 20:37 |
|||
**/ |
|||
@Override |
|||
public Result<List<MyGroupResultDTO>> getMyGroup(MyGroupFormDTO myGroupFormDTO) { |
|||
int pageIndex = (myGroupFormDTO.getPageNo() - NumConstant.ONE) * myGroupFormDTO.getPageSize(); |
|||
myGroupFormDTO.setPageNo(pageIndex); |
|||
List<MyGroupResultDTO> myGroupList = baseDao.selectListMyGroup(myGroupFormDTO); |
|||
return new Result<List<MyGroupResultDTO>>().ok(myGroupList); |
|||
} |
|||
|
|||
/** |
|||
* @param recommendGroupFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.group.dto.group.result.RecommendGroupResultDTO>> |
|||
* @Author yinzuomei |
|||
* @Description 推荐组列表查询 |
|||
* @Date 2020/3/28 19:53 |
|||
**/ |
|||
@Override |
|||
public Result<List<RecommendGroupResultDTO>> getRecommendGroup(RecommendGroupFormDTO recommendGroupFormDTO) { |
|||
int pageIndex = (recommendGroupFormDTO.getPageNo() - NumConstant.ONE) * recommendGroupFormDTO.getPageSize(); |
|||
recommendGroupFormDTO.setPageNo(pageIndex); |
|||
//显示当前网格内所有当前用户还未加入的组,以组的人数由高到低排序;如果人数相同,以最新话题的时间有近到远排序
|
|||
List<RecommendGroupResultDTO> recommendGroupList = baseDao.selectListRecommendGroup(recommendGroupFormDTO); |
|||
return new Result<List<RecommendGroupResultDTO>>().ok(recommendGroupList); |
|||
} |
|||
|
|||
/** |
|||
* @param createdFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.resi.group.dto.group.result.CreatedResultDTO>> |
|||
* @Author yinzuomei |
|||
* @Description 我创建的小组 |
|||
* @Date 2020/3/28 22:01 |
|||
**/ |
|||
@Override |
|||
public Result<List<CreatedResultDTO>> getCreated(CreatedFormDTO createdFormDTO) { |
|||
int pageIndex = (createdFormDTO.getPageNo() - NumConstant.ONE) * createdFormDTO.getPageSize(); |
|||
createdFormDTO.setPageNo(pageIndex); |
|||
List<CreatedResultDTO> createdResultDTOList = baseDao.selectListMyCreated(createdFormDTO); |
|||
return new Result<List<CreatedResultDTO>>().ok(createdResultDTOList); |
|||
} |
|||
|
|||
/** |
|||
* @param modifyGroupFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 修改组信息 |
|||
* @Date 2020/3/28 22:27 |
|||
**/ |
|||
@Override |
|||
public Result modifyGroup(ModifyGroupFormDTO modifyGroupFormDTO) { |
|||
//校验是否是群主
|
|||
ResiGroupMemberDTO groupMemberDTO = resiGroupMemberService.getResiGroupMember(modifyGroupFormDTO.getGroupId(), modifyGroupFormDTO.getUserId()); |
|||
if (null == groupMemberDTO || ModuleConstant.GROUP_MEMBER.equals(groupMemberDTO.getGroupLeaderFlag())) { |
|||
return new Result().error(ModuleConstant.REJECT_MODIFYGROUPINFO); |
|||
} |
|||
if (StringUtils.isBlank(modifyGroupFormDTO.getGroupHeadPhoto()) |
|||
&& StringUtils.isBlank(modifyGroupFormDTO.getGroupName()) |
|||
&& StringUtils.isBlank(modifyGroupFormDTO.getGroupIntroduction())) { |
|||
return new Result(); |
|||
} |
|||
int updatedRows = baseDao.modifyGroupInfo(modifyGroupFormDTO); |
|||
if (1 == updatedRows) { |
|||
return new Result().ok(ModuleConstant.UPDATE_SUCCESS); |
|||
} |
|||
return new Result().error(ModuleConstant.UPDATE_FAILED); |
|||
} |
|||
|
|||
/** |
|||
* @param groupSummarizeFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.resi.group.dto.group.result.GroupSummarizeResultDTO> |
|||
* @Author yinzuomei |
|||
* @Description 查看小组管理界面信息 |
|||
* @Date 2020/3/29 17:52 |
|||
**/ |
|||
@Override |
|||
public Result<GroupSummarizeResultDTO> getGroupSummarize(GroupSummarizeFormDTO groupSummarizeFormDTO) { |
|||
GroupSummarizeResultDTO groupSummarizeResultDTO = baseDao.selectGroupSummarize(groupSummarizeFormDTO); |
|||
if (null != groupSummarizeResultDTO) { |
|||
return new Result<GroupSummarizeResultDTO>().error(ModuleConstant.GETGROUPSUMMARIZE_FAILED); |
|||
} |
|||
//群主名称需要调用feign查询
|
|||
groupSummarizeResultDTO.setLeaderName("测试"); |
|||
return new Result<GroupSummarizeResultDTO>().ok(groupSummarizeResultDTO); |
|||
} |
|||
|
|||
/** |
|||
* @param applyCreateGroupFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 创建小组 |
|||
* @Date 2020/3/29 19:26 |
|||
**/ |
|||
@Override |
|||
public Result applyCreateGroup(ApplyCreateGroupFormDTO applyCreateGroupFormDTO) { |
|||
//1、插入一条待审核的组信息
|
|||
ResiGroupEntity resiGroupEntity = this.structureResiGroupEntity(applyCreateGroupFormDTO); |
|||
insert(resiGroupEntity); |
|||
//2、插入一条待审核的操作记录
|
|||
ResiGroupOperationDTO resiGroupOperation = new ResiGroupOperationDTO(); |
|||
resiGroupOperation.setResiGroupId(resiGroupEntity.getId()); |
|||
resiGroupOperation.setState(GroupStateConstant.GROUP_UNDER_AUDITTING); |
|||
resiGroupOperation.setCreatedBy(applyCreateGroupFormDTO.getUserId()); |
|||
resiGroupOperationService.save(resiGroupOperation); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @param applyJoinGroupFormDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 申请加入小组 |
|||
* @Date 2020/3/29 20:01 |
|||
**/ |
|||
@Override |
|||
public Result applyJoinGroup(ApplyJoinGroupFormDTO applyJoinGroupFormDTO) { |
|||
ResiGroupDTO resiGroupDTO = this.get(applyJoinGroupFormDTO.getGroupId()); |
|||
if (null == resiGroupDTO) { |
|||
return new Result().error(ModuleConstant.QUERY_GROUPINFO_FAILED); |
|||
} |
|||
//插入一条待审核的记录
|
|||
GroupMemeberOperationDTO groupMemeberOperation = new GroupMemeberOperationDTO(); |
|||
groupMemeberOperation.setGroupId(resiGroupDTO.getId()); |
|||
groupMemeberOperation.setCustomerUserId(resiGroupDTO.getCustomerId()); |
|||
groupMemeberOperation.setGroupId(applyJoinGroupFormDTO.getGroupId()); |
|||
groupMemeberOperation.setOperateDes(applyJoinGroupFormDTO.getOperateDes()); |
|||
groupMemeberOperation.setOperateStatus(MemberStateConstant.UNDER_AUDITTING); |
|||
groupMemeberOperation.setEnterGroupType(EnterGroupTypeConstant.JOIN); |
|||
groupMemeberOperation.setCreatedBy(applyJoinGroupFormDTO.getUserId()); |
|||
groupMemeberOperationService.save(groupMemeberOperation); |
|||
return new Result(); |
|||
} |
|||
|
|||
private ResiGroupEntity structureResiGroupEntity(ApplyCreateGroupFormDTO applyCreateGroupFormDTO) { |
|||
ResiGroupEntity resiGroupEntity = new ResiGroupEntity(); |
|||
resiGroupEntity.setCustomerId(applyCreateGroupFormDTO.getCustomerId()); |
|||
resiGroupEntity.setGridId(applyCreateGroupFormDTO.getGridId()); |
|||
resiGroupEntity.setGroupHeadPhoto(applyCreateGroupFormDTO.getGroupHeadPhoto()); |
|||
resiGroupEntity.setGroupName(applyCreateGroupFormDTO.getGroupName()); |
|||
resiGroupEntity.setGroupIntroduction(applyCreateGroupFormDTO.getGroupIntroduction()); |
|||
resiGroupEntity.setCreatedBy(applyCreateGroupFormDTO.getUserId()); |
|||
resiGroupEntity.setState(GroupStateConstant.GROUP_UNDER_AUDITTING); |
|||
return resiGroupEntity; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,34 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.member.controller; |
|||
|
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 群组成员关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("member") |
|||
public class ResiGroupMemberController { |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.member.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.modules.member.entity.GroupMemeberOperationEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 组成员出入群记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@Mapper |
|||
public interface GroupMemeberOperationDao extends BaseDao<GroupMemeberOperationEntity> { |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.member.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.modules.member.entity.ResiGroupMemberEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 群组成员关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@Mapper |
|||
public interface ResiGroupMemberDao extends BaseDao<ResiGroupMemberEntity> { |
|||
|
|||
} |
@ -0,0 +1,79 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.member.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 组成员出入群记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("group_memeber_operation") |
|||
public class GroupMemeberOperationEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 用户id来源于customer_user.id |
|||
*/ |
|||
private String customerUserId; |
|||
|
|||
/** |
|||
* 群组表主键RESI_GROUP.ID |
|||
*/ |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 状态: |
|||
审核中 - under_auditting、 |
|||
审核通过 - approved、 |
|||
入群被拒 - rejected 、 |
|||
已禁言 - silent、 |
|||
取消禁言-cancel_silent resi_group_member中status置为approved |
|||
被移出群 - removed 修改resi_group_member表del_flag=1 |
|||
Ps: 1) 入群被拒绝之后,如果再申请是插入一条新的审核中的数据 |
|||
2)组长看到的待审核列表,同一个人一开始被拒绝,后来再次申请,列表是显示2条 |
|||
*/ |
|||
private String operateStatus; |
|||
|
|||
/** |
|||
* 入群方式:(受邀请入群 - invited 、 主动加入 - join) |
|||
*/ |
|||
private String enterGroupType; |
|||
|
|||
/** |
|||
* 邀请连接id对应GROUP_INVITATION.id |
|||
*/ |
|||
private String groupInvitationId; |
|||
|
|||
/** |
|||
* 入群理由、拒绝理由 |
|||
*/ |
|||
private String operateDes; |
|||
|
|||
} |
@ -0,0 +1,71 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.member.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 群组成员关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("resi_group_member") |
|||
public class ResiGroupMemberEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 用户id,来源于customer_user.id |
|||
*/ |
|||
private String customerUserId; |
|||
|
|||
/** |
|||
* 小组id: 来源于resi_group表id |
|||
*/ |
|||
private String resiGroupId; |
|||
|
|||
/** |
|||
* member成员,leader群主 |
|||
*/ |
|||
private String groupLeaderFlag; |
|||
|
|||
/** |
|||
* 入群方式:(受邀请入群 - invited 、 主动加入 - join) |
|||
*/ |
|||
private String enterGroupType; |
|||
|
|||
/** |
|||
* 邀请连接id对应GROUP_INVITATION.id |
|||
*/ |
|||
private String groupInvitationId; |
|||
|
|||
/** |
|||
* 状态:( 审核通过 - approved、 已禁言 - silent、 被移出群 - removed) |
|||
*/ |
|||
private String status; |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.member.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 组成员出入群记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@Component |
|||
public class GroupMemeberOperationRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.member.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 群组成员关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@Component |
|||
public class ResiGroupMemberRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,95 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.member.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.modules.member.entity.GroupMemeberOperationEntity; |
|||
import com.epmet.resi.group.dto.member.GroupMemeberOperationDTO; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 组成员出入群记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
public interface GroupMemeberOperationService extends BaseService<GroupMemeberOperationEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<GroupMemeberOperationDTO> |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
PageData<GroupMemeberOperationDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<GroupMemeberOperationDTO> |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
List<GroupMemeberOperationDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return GroupMemeberOperationDTO |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
GroupMemeberOperationDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
void save(GroupMemeberOperationDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
void update(GroupMemeberOperationDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,105 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.member.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.modules.member.entity.ResiGroupMemberEntity; |
|||
import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 群组成员关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
public interface ResiGroupMemberService extends BaseService<ResiGroupMemberEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<ResiGroupMemberDTO> |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
PageData<ResiGroupMemberDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<ResiGroupMemberDTO> |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
List<ResiGroupMemberDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return ResiGroupMemberDTO |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
ResiGroupMemberDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
void save(ResiGroupMemberDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
void update(ResiGroupMemberDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-03-29 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @param groupId |
|||
* @param userId |
|||
* @return com.epmet.resi.group.dto.member.ResiGroupMemberDTO |
|||
* @Author yinzuomei |
|||
* @Description 根据群id, 用户id查询成员信息 |
|||
* @Date 2020/3/29 18:28 |
|||
**/ |
|||
ResiGroupMemberDTO getResiGroupMember(String groupId, String userId); |
|||
} |
@ -0,0 +1,104 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.member.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.modules.member.dao.GroupMemeberOperationDao; |
|||
import com.epmet.modules.member.entity.GroupMemeberOperationEntity; |
|||
import com.epmet.modules.member.redis.GroupMemeberOperationRedis; |
|||
import com.epmet.modules.member.service.GroupMemeberOperationService; |
|||
import com.epmet.resi.group.dto.member.GroupMemeberOperationDTO; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 组成员出入群记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@Service |
|||
public class GroupMemeberOperationServiceImpl extends BaseServiceImpl<GroupMemeberOperationDao, GroupMemeberOperationEntity> implements GroupMemeberOperationService { |
|||
|
|||
@Autowired |
|||
private GroupMemeberOperationRedis groupMemeberOperationRedis; |
|||
|
|||
@Override |
|||
public PageData<GroupMemeberOperationDTO> page(Map<String, Object> params) { |
|||
IPage<GroupMemeberOperationEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, GroupMemeberOperationDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<GroupMemeberOperationDTO> list(Map<String, Object> params) { |
|||
List<GroupMemeberOperationEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, GroupMemeberOperationDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<GroupMemeberOperationEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<GroupMemeberOperationEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public GroupMemeberOperationDTO get(String id) { |
|||
GroupMemeberOperationEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, GroupMemeberOperationDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(GroupMemeberOperationDTO dto) { |
|||
GroupMemeberOperationEntity entity = ConvertUtils.sourceToTarget(dto, GroupMemeberOperationEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(GroupMemeberOperationDTO dto) { |
|||
GroupMemeberOperationEntity entity = ConvertUtils.sourceToTarget(dto, GroupMemeberOperationEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,124 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.modules.member.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.modules.member.dao.ResiGroupMemberDao; |
|||
import com.epmet.modules.member.entity.ResiGroupMemberEntity; |
|||
import com.epmet.modules.member.redis.ResiGroupMemberRedis; |
|||
import com.epmet.modules.member.service.ResiGroupMemberService; |
|||
import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 群组成员关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-03-29 |
|||
*/ |
|||
@Service |
|||
public class ResiGroupMemberServiceImpl extends BaseServiceImpl<ResiGroupMemberDao, ResiGroupMemberEntity> implements ResiGroupMemberService { |
|||
|
|||
@Autowired |
|||
private ResiGroupMemberRedis resiGroupMemberRedis; |
|||
|
|||
@Override |
|||
public PageData<ResiGroupMemberDTO> page(Map<String, Object> params) { |
|||
IPage<ResiGroupMemberEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, ResiGroupMemberDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<ResiGroupMemberDTO> list(Map<String, Object> params) { |
|||
List<ResiGroupMemberEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, ResiGroupMemberDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<ResiGroupMemberEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<ResiGroupMemberEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public ResiGroupMemberDTO get(String id) { |
|||
ResiGroupMemberEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, ResiGroupMemberDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(ResiGroupMemberDTO dto) { |
|||
ResiGroupMemberEntity entity = ConvertUtils.sourceToTarget(dto, ResiGroupMemberEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(ResiGroupMemberDTO dto) { |
|||
ResiGroupMemberEntity entity = ConvertUtils.sourceToTarget(dto, ResiGroupMemberEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* @param groupId |
|||
* @param userId |
|||
* @return com.epmet.resi.group.dto.member.ResiGroupMemberDTO |
|||
* @Author yinzuomei |
|||
* @Description 根据群id, 用户id查询成员信息 |
|||
* @Date 2020/3/29 18:28 |
|||
**/ |
|||
@Override |
|||
public ResiGroupMemberDTO getResiGroupMember(String groupId, String userId) { |
|||
QueryWrapper<ResiGroupMemberEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(groupId), "RESI_GROUP_ID", groupId) |
|||
.eq(StringUtils.isNotBlank(userId), "CUSTOMER_USER_ID", userId); |
|||
List<ResiGroupMemberEntity> list = baseDao.selectList(wrapper); |
|||
if (null == list || list.size() == 0) { |
|||
return null; |
|||
} |
|||
return ConvertUtils.sourceToTarget(list.get(0), ResiGroupMemberDTO.class); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,160 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.modules.group.dao.ResiGroupDao"> |
|||
|
|||
<resultMap id="MyGroupResultDTOMap" type="com.epmet.resi.group.dto.group.result.MyGroupResultDTO"> |
|||
<result property="groupId" column="id"/> |
|||
<result property="groupHeadPhoto" column="GROUP_HEAD_PHOTO"/> |
|||
<result property="groupName" column="GROUP_NAME"/> |
|||
<result property="totalMember" column="TOTAL_MEMBERS"/> |
|||
<result property="totalPartyMember" column="TOTAL_PARTY_MEMBERS"/> |
|||
<result property="groupState" column="STATE"/> |
|||
<result property="groupLeaderFlag" column="GROUP_LEADER_FLAG"/> |
|||
<association property="latestTopic" select="com.epmet.modules.group.dao.ResiGroupDao.selectLatestTopic" column="id"> |
|||
</association> |
|||
</resultMap> |
|||
<!-- 我的小组查询(包含我创建的小组+我加入的小组),以各组的最新话题时间有近到远排序) --> |
|||
<select id="selectListMyGroup" parameterType="com.epmet.resi.group.dto.group.form.MyGroupFormDTO" |
|||
resultMap="MyGroupResultDTOMap"> |
|||
SELECT |
|||
rg.id, |
|||
rg.GROUP_HEAD_PHOTO, |
|||
rg.GROUP_NAME , |
|||
rgs.TOTAL_MEMBERS , |
|||
rgs.TOTAL_PARTY_MEMBERS , |
|||
rg.STATE , |
|||
rgm.GROUP_LEADER_FLAG AS groupLeaderFlag |
|||
FROM |
|||
resi_group_member rgm |
|||
LEFT JOIN resi_group rg ON ( rgm.RESI_GROUP_ID = rg.ID ) |
|||
LEFT JOIN resi_group_statistical rgs ON ( rg.id = rgs.RESI_GROUP_ID ) |
|||
WHERE |
|||
rg.DEL_FLAG = '0' |
|||
AND rgm.DEL_FLAG = '0' |
|||
AND rgs.DEL_FLAG = '0' |
|||
AND rg.CUSTOMER_ID = #{cusomerId} |
|||
AND rg.GRID_ID ={gridId} |
|||
AND rgm.CUSTOMER_USER_ID = #{userId} |
|||
AND rgm.STATUS IN ( 'approved', 'silent' ) |
|||
order by rg.LATEST_TOPIC_PUBLISH_DATE desc |
|||
LIMIT #{pageNo}, #{pageSize} |
|||
</select> |
|||
|
|||
<!-- 查询当前组最新话题 --> |
|||
<select id="selectLatestTopic" resultType="com.epmet.resi.group.dto.group.result.LatestTopicDTO"> |
|||
SELECT |
|||
rt.id as topicId, |
|||
rt.TOPIC_CONTENT as topicContent |
|||
FROM |
|||
resi_topic rt |
|||
WHERE |
|||
rt.DEL_FLAG = '0' |
|||
and rt.GROUP_ID=#{groupId} |
|||
AND rt.STATUS = 'discussing' |
|||
order by rt.CREATED_TIME desc |
|||
limit 1 |
|||
</select> |
|||
|
|||
<!-- 推荐小组列表查询 --> |
|||
<select id="selectListRecommendGroup" parameterType="com.epmet.resi.group.dto.group.form.RecommendGroupFormDTO" |
|||
resultType="com.epmet.resi.group.dto.group.result.RecommendGroupResultDTO"> |
|||
SELECT |
|||
rg.id AS groupId, |
|||
rg.GROUP_HEAD_PHOTO AS groupHeadPhoto, |
|||
rg.GROUP_NAME AS groupName, |
|||
rgs.TOTAL_MEMBERS AS totalMember, |
|||
rgs.TOTAL_PARTY_MEMBERS AS totalPartyMember |
|||
FROM |
|||
resi_group rg |
|||
LEFT JOIN resi_group_statistical rgs ON ( rg.id = rgs.RESI_GROUP_ID ) |
|||
WHERE |
|||
rg.DEL_FLAG = '0' |
|||
AND rgs.DEL_FLAG = '0' |
|||
and rg.id not EXISTS ( |
|||
SELECT |
|||
rgm.RESI_GROUP_ID |
|||
FROM |
|||
resi_group_member rgm |
|||
WHERE |
|||
rgm.DEL_FLAG = '0' |
|||
AND rgm.`STATUS` !='removed' |
|||
AND rgm.CUSTOMER_USER_ID = #{userId} |
|||
) |
|||
and rg.CUSTOMER_ID=#{cusomerId} |
|||
and rg.GRID_ID=#{gridId} |
|||
order by totalMember desc,rg.LATEST_TOPIC_PUBLISH_DATE desc |
|||
LIMIT #{pageNo}, #{pageSize} |
|||
</select> |
|||
|
|||
<!-- 我创建的小组查询 --> |
|||
<select id="selectListMyCreated" parameterType="com.epmet.resi.group.dto.group.form.CreatedFormDTO" |
|||
resultType="com.epmet.resi.group.dto.group.result.CreatedResultDTO"> |
|||
SELECT |
|||
rg.id AS groupId, |
|||
rg.GROUP_HEAD_PHOTO AS groupHeadPhoto, |
|||
rg.GROUP_NAME AS groupName, |
|||
rgs.TOTAL_MEMBERS AS totalMember, |
|||
rgs.TOTAL_PARTY_MEMBERS AS totalPartyMember, |
|||
rg.STATE AS groupState |
|||
FROM |
|||
resi_group_member rgm |
|||
LEFT JOIN resi_group rg ON ( rgm.RESI_GROUP_ID = rg.ID ) |
|||
LEFT JOIN resi_group_statistical rgs ON ( rg.id = rgs.RESI_GROUP_ID ) |
|||
WHERE |
|||
rg.DEL_FLAG = '0' |
|||
AND rgm.DEL_FLAG = '0' |
|||
AND rgs.DEL_FLAG = '0' |
|||
AND rg.CUSTOMER_ID = #{cusomerId} |
|||
AND rg.GRID_ID ={gridId} |
|||
AND rgm.CUSTOMER_USER_ID = #{userId} |
|||
AND rgm.GROUP_LEADER_FLAG = 'leader' |
|||
ORDER BY |
|||
rg.CREATED_TIME DESC |
|||
LIMIT #{pageNo}, #{pageSize} |
|||
</select> |
|||
|
|||
<!-- 修改组信息 --> |
|||
<update id="modifyGroupInfo" parameterType="com.epmet.resi.group.dto.group.form.ModifyGroupFormDTO"> |
|||
UPDATE resi_group rg |
|||
SET rg.GROUP_NAME = #{groupName}, |
|||
rg.GROUP_HEAD_PHOTO = #{groupHeadPhoto}, |
|||
rg.GROUP_INTRODUCTION =#{groupIntroduction}, |
|||
rg.UPDATED_BY=#{userId}, |
|||
rg.UPDATED_BY=NOW() |
|||
WHERE |
|||
rg.id = #{groupId} |
|||
AND rg.DEL_FLAG = '0' |
|||
</update> |
|||
|
|||
<!-- 查看小组管理界面信息 --> |
|||
<select id="selectGroupSummarize" parameterType="com.epmet.resi.group.dto.group.form.GroupSummarizeFormDTO" |
|||
resultType="com.epmet.resi.group.dto.group.result.GroupSummarizeResultDTO"> |
|||
SELECT |
|||
rg.id AS groupId, |
|||
rg.GROUP_HEAD_PHOTO AS groupHeadPhoto, |
|||
rg.GROUP_NAME AS groupName, |
|||
rg.GROUP_INTRODUCTION AS groupIntroduction, |
|||
rgs.TOTAL_MEMBERS AS totalMember, |
|||
rgs.TOTAL_PARTY_MEMBERS AS totalPartyMember, |
|||
rgm.GROUP_LEADER_FLAG AS leaderFlag, |
|||
( |
|||
SELECT |
|||
count(1) |
|||
FROM |
|||
group_memeber_operation gmo |
|||
WHERE |
|||
gmo.DEL_FLAG = '0' |
|||
AND gmo.GROUP_ID = rg.id |
|||
AND gmo.OPERATE_STATUS = 'under_auditting' |
|||
) AS totalApplyingMember |
|||
FROM |
|||
resi_group rg |
|||
LEFT JOIN resi_group_statistical rgs ON ( rg.id = rgs.RESI_GROUP_ID ) |
|||
LEFT JOIN resi_group_member rgm ON ( rg.id = rgm.RESI_GROUP_ID AND rgm.CUSTOMER_USER_ID =#{userId}) |
|||
WHERE |
|||
rg.DEL_FLAG = '0' |
|||
AND rgs.DEL_FLAG = '0' |
|||
and rg.id=#{groupId} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.modules.group.dao.ResiGroupOperationDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.modules.member.dao.GroupMemeberOperationDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,7 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.modules.member.dao.ResiGroupMemberDao"> |
|||
|
|||
|
|||
</mapper> |
@ -1,9 +1,9 @@ |
|||
package com.epmet.feign; |
|||
package com.epmet.modules.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.result.LatestGridInfoResultDTO; |
|||
import com.epmet.feign.fallback.EpmetUserFeignClientFallBack; |
|||
import com.epmet.modules.feign.fallback.EpmetUserFeignClientFallBack; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
@ -1,10 +1,10 @@ |
|||
package com.epmet.feign.fallback; |
|||
package com.epmet.modules.feign.fallback; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.ModuleUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.result.LatestGridInfoResultDTO; |
|||
import com.epmet.feign.EpmetUserFeignClient; |
|||
import com.epmet.modules.feign.EpmetUserFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
@ -1,10 +1,10 @@ |
|||
package com.epmet.controller; |
|||
package com.epmet.modules.grid.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.result.LatestGridInfoResultDTO; |
|||
import com.epmet.service.ResiMineGridService; |
|||
import com.epmet.modules.grid.service.ResiMineGridService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
@ -1,4 +1,4 @@ |
|||
package com.epmet.service; |
|||
package com.epmet.modules.grid.service; |
|||
|
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
@ -1,12 +1,12 @@ |
|||
package com.epmet.service.impl; |
|||
package com.epmet.modules.grid.service.impl; |
|||
|
|||
import com.epmet.commons.tools.constant.AppClientConstant; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.result.LatestGridInfoResultDTO; |
|||
import com.epmet.feign.EpmetUserFeignClient; |
|||
import com.epmet.service.ResiMineGridService; |
|||
import com.epmet.utils.ModuleConstant; |
|||
import com.epmet.modules.feign.EpmetUserFeignClient; |
|||
import com.epmet.modules.grid.service.ResiMineGridService; |
|||
import com.epmet.modules.utils.ModuleConstant; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
@ -0,0 +1,69 @@ |
|||
package com.epmet.modules.message.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dto.form.MymessageFormDTO; |
|||
import com.epmet.dto.result.MymessageResultDTO; |
|||
import com.epmet.modules.message.service.UserMessageService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 我的消息 |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/29 20:49 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("mymessage") |
|||
public class UserMessageController { |
|||
@Autowired |
|||
private UserMessageService userMessageService; |
|||
|
|||
/** |
|||
* @param |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 查询我的消息 |
|||
* @Date 2020/3/29 20:53 |
|||
**/ |
|||
@PostMapping("getmymessage") |
|||
public Result<List<MymessageResultDTO>> getMyMessage(@LoginUser TokenDto tokenDto, |
|||
@RequestBody MymessageFormDTO mymessageFormDTO) { |
|||
mymessageFormDTO.setUserId(tokenDto.getUserId()); |
|||
ValidatorUtils.validateEntity(mymessageFormDTO); |
|||
//逻辑待实现
|
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @param tokenDto |
|||
* @param messageId |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 单条消息标记为已读 |
|||
* @Date 2020/3/29 21:05 |
|||
**/ |
|||
@PostMapping("readmsg") |
|||
public Result readMessage(@LoginUser TokenDto tokenDto, |
|||
@RequestParam("messageId") String messageId) { |
|||
//逻辑待实现
|
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @param tokenDto |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author yinzuomei |
|||
* @Description 全部已读 |
|||
* @Date 2020/3/29 21:06 |
|||
**/ |
|||
@PostMapping("readallmsg") |
|||
public Result readAllMessage(@LoginUser TokenDto tokenDto) { |
|||
//逻辑待实现
|
|||
return new Result(); |
|||
} |
|||
} |
@ -0,0 +1,9 @@ |
|||
package com.epmet.modules.message.service; |
|||
|
|||
/** |
|||
* @Description 我的消息 |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/29 20:50 |
|||
*/ |
|||
public interface UserMessageService { |
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.epmet.modules.message.service.impl; |
|||
|
|||
import com.epmet.modules.message.service.UserMessageService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @Description 我的消息 |
|||
* @Author yinzuomei |
|||
* @Date 2020/3/29 20:50 |
|||
*/ |
|||
@Service |
|||
public class UserMessageServiceImpl implements UserMessageService { |
|||
} |
Loading…
Reference in new issue