From c60d4727e7604cb59aecaf0070a9f82a32ee1492 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 31 Mar 2020 12:00:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=9D=E9=A2=98=E7=9B=B8=E5=85=B3=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/dto/topic/ResiTopicCommentDTO.java | 86 +++++++++++++ .../resi/group/dto/topic/ResiTopicDTO.java | 116 ++++++++++++++++++ .../dto/topic/ResiTopicOperationDTO.java | 81 ++++++++++++ .../topic/form/ResiTopicPublishFormDTO.java | 64 ++++++++++ .../topic/dao/ResiTopicCommentDao.java | 34 +++++ .../epmet/modules/topic/dao/ResiTopicDao.java | 34 +++++ .../topic/dao/ResiTopicOperationDao.java | 34 +++++ .../topic/entity/ResiTopicCommentEntity.java | 56 +++++++++ .../modules/topic/entity/ResiTopicEntity.java | 86 +++++++++++++ .../entity/ResiTopicOperationEntity.java | 51 ++++++++ .../topic/excel/ResiTopicCommentExcel.java | 65 ++++++++++ .../modules/topic/excel/ResiTopicExcel.java | 83 +++++++++++++ .../topic/excel/ResiTopicOperationExcel.java | 62 ++++++++++ .../service/ResiTopicCommentService.java | 96 +++++++++++++++ .../service/ResiTopicOperationService.java | 96 +++++++++++++++ .../topic/service/ResiTopicService.java | 96 +++++++++++++++ .../impl/ResiTopicCommentServiceImpl.java | 102 +++++++++++++++ .../impl/ResiTopicOperationServiceImpl.java | 102 +++++++++++++++ .../service/impl/ResiTopicServiceImpl.java | 103 ++++++++++++++++ .../mapper/topic/ResiTopicCommentDao.xml | 20 +++ .../resources/mapper/topic/ResiTopicDao.xml | 26 ++++ .../mapper/topic/ResiTopicOperationDao.xml | 19 +++ 22 files changed, 1512 insertions(+) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicCommentDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicOperationDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/ResiTopicPublishFormDTO.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicOperationDao.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/ResiTopicCommentEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/ResiTopicEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/ResiTopicOperationEntity.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/excel/ResiTopicCommentExcel.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/excel/ResiTopicExcel.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/excel/ResiTopicOperationExcel.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicCommentService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicOperationService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicOperationServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicOperationDao.xml diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicCommentDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicCommentDTO.java new file mode 100644 index 0000000000..bfe36f8c40 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicCommentDTO.java @@ -0,0 +1,86 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.resi.group.dto.topic; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 话题评论表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-31 + */ +@Data +public class ResiTopicCommentDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 评论内容 + */ + private String commentContent; + + /** + * 话题Id,来自resi_topic + */ + private String topicId; + + /** + * 评论状态 + */ + private String status; + + /** + * 删除标记 0:未删除,1:已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人,评论人Id,来自user + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicDTO.java new file mode 100644 index 0000000000..35e6963377 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicDTO.java @@ -0,0 +1,116 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.resi.group.dto.topic; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 话题信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-31 + */ +@Data +public class ResiTopicDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 小组Id,关联resi_group的ID + */ + private String groupId; + + /** + * 话题内容 + */ + private String topicContent; + + /** + * 话题状态(讨论中 - discussing、 已屏蔽 - hidden、 已关闭 - closed) + */ + private String status; + + /** + * 省 + */ + private String province; + + /** + * 市 + */ + private String city; + + /** + * 区 + */ + private String area; + + /** + * 地址 + */ + private String address; + + /** + * 经度 + */ + private String longitude; + + /** + * 维度 + */ + private String dimension; + + /** + * 删除标记 0:未删除,1:已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人,发布人Id来源于user + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicOperationDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicOperationDTO.java new file mode 100644 index 0000000000..8b6dcb5ddb --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicOperationDTO.java @@ -0,0 +1,81 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.resi.group.dto.topic; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 话题操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-31 + */ +@Data +public class ResiTopicOperationDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 话题Id,关联resi_topic的ID + */ + private String topicId; + + /** + * 操作类型(发布 - discussing 、 屏蔽 - hidden、 取消屏蔽 - hidden_cancelled、 关闭话题 - closed) + */ + private String operationType; + + /** + * 删除标记 0:未删除,1:已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人ID,关联customer_user的ID + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/ResiTopicPublishFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/ResiTopicPublishFormDTO.java new file mode 100644 index 0000000000..d6cfe4dd5d --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/ResiTopicPublishFormDTO.java @@ -0,0 +1,64 @@ +package com.epmet.resi.group.dto.topic.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 发布话题入参DTO + * @ClassName ResiTopicPublishFormDTO + * @Author wangc + * @date 2020.03.31 11:17 + */ +@Data +public class ResiTopicPublishFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 小组Id + * */ + private String groupId; + + /** + * + * */ + private String topicContent; + + /** + * + * */ + private String longitude; + + /** + * + * */ + private String dimension; + + /** + * + * */ + private String address; + + /** + * + * */ + private String province; + + /** + * + * */ + private String city; + + /** + * + * */ + private String area; + + /** + * + * */ + private List attachmentList; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java new file mode 100644 index 0000000000..2d72e71723 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java @@ -0,0 +1,34 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.topic.dao; + + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.topic.entity.ResiTopicCommentEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 话题评论表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-31 + */ +@Mapper +public interface ResiTopicCommentDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java new file mode 100644 index 0000000000..a85c32adc6 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java @@ -0,0 +1,34 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.topic.dao; + + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.topic.entity.ResiTopicEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 话题信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-31 + */ +@Mapper +public interface ResiTopicDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicOperationDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicOperationDao.java new file mode 100644 index 0000000000..570f1c4b55 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicOperationDao.java @@ -0,0 +1,34 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.topic.dao; + + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.modules.topic.entity.ResiTopicOperationEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 话题操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-31 + */ +@Mapper +public interface ResiTopicOperationDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/ResiTopicCommentEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/ResiTopicCommentEntity.java new file mode 100644 index 0000000000..f42668e9cb --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/ResiTopicCommentEntity.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.topic.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-31 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("resi_topic_comment") +public class ResiTopicCommentEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 评论内容 + */ + private String commentContent; + + /** + * 话题Id,来自resi_topic + */ + private String topicId; + + /** + * 评论状态 + */ + private String status; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/ResiTopicEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/ResiTopicEntity.java new file mode 100644 index 0000000000..c3f9bfc0b1 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/ResiTopicEntity.java @@ -0,0 +1,86 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.topic.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-31 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("resi_topic") +public class ResiTopicEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 小组Id,关联resi_group的ID + */ + private String groupId; + + /** + * 话题内容 + */ + private String topicContent; + + /** + * 话题状态(讨论中 - discussing、 已屏蔽 - hidden、 已关闭 - closed) + */ + private String status; + + /** + * 省 + */ + private String province; + + /** + * 市 + */ + private String city; + + /** + * 区 + */ + private String area; + + /** + * 地址 + */ + private String address; + + /** + * 经度 + */ + private String longitude; + + /** + * 维度 + */ + private String dimension; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/ResiTopicOperationEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/ResiTopicOperationEntity.java new file mode 100644 index 0000000000..eac71fc663 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/ResiTopicOperationEntity.java @@ -0,0 +1,51 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.topic.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-31 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("resi_topic_operation") +public class ResiTopicOperationEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 话题Id,关联resi_topic的ID + */ + private String topicId; + + /** + * 操作类型(发布 - discussing 、 屏蔽 - hidden、 取消屏蔽 - hidden_cancelled、 关闭话题 - closed) + */ + private String operationType; + +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/excel/ResiTopicCommentExcel.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/excel/ResiTopicCommentExcel.java new file mode 100644 index 0000000000..bc967a007e --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/excel/ResiTopicCommentExcel.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.topic.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 话题评论表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-31 + */ +@Data +public class ResiTopicCommentExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "评论内容") + private String commentContent; + + @Excel(name = "话题Id,来自resi_topic") + private String topicId; + + @Excel(name = "评论状态") + private String status; + + @Excel(name = "删除标记 0:未删除,1:已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人,评论人Id,来自user") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/excel/ResiTopicExcel.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/excel/ResiTopicExcel.java new file mode 100644 index 0000000000..9e13604269 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/excel/ResiTopicExcel.java @@ -0,0 +1,83 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.topic.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 话题信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-31 + */ +@Data +public class ResiTopicExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "小组Id,关联resi_group的ID") + private String groupId; + + @Excel(name = "话题内容") + private String topicContent; + + @Excel(name = "话题状态(讨论中 - discussing、 已屏蔽 - hidden、 已关闭 - closed)") + private String status; + + @Excel(name = "省") + private String province; + + @Excel(name = "市") + private String city; + + @Excel(name = "区 ") + private String area; + + @Excel(name = "地址") + private String address; + + @Excel(name = "经度") + private String longitude; + + @Excel(name = "维度") + private String dimension; + + @Excel(name = "删除标记 0:未删除,1:已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人,发布人Id来源于user") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/excel/ResiTopicOperationExcel.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/excel/ResiTopicOperationExcel.java new file mode 100644 index 0000000000..2deb861943 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/excel/ResiTopicOperationExcel.java @@ -0,0 +1,62 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.topic.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 话题操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-31 + */ +@Data +public class ResiTopicOperationExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "话题Id,关联resi_topic的ID") + private String topicId; + + @Excel(name = "操作类型(发布 - discussing 、 屏蔽 - hidden、 取消屏蔽 - hidden_cancelled、 关闭话题 - closed)") + private String operationType; + + @Excel(name = "删除标记 0:未删除,1:已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人ID,关联customer_user的ID") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicCommentService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicCommentService.java new file mode 100644 index 0000000000..f9058408cd --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicCommentService.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.topic.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.modules.topic.entity.ResiTopicCommentEntity; +import com.epmet.resi.group.dto.topic.ResiTopicCommentDTO; + + +import java.util.List; +import java.util.Map; + +/** + * 话题评论表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-31 + */ +public interface ResiTopicCommentService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-03-31 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-03-31 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ResiTopicCommentDTO + * @author generator + * @date 2020-03-31 + */ + ResiTopicCommentDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-31 + */ + void save(ResiTopicCommentDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-31 + */ + void update(ResiTopicCommentDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-03-31 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicOperationService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicOperationService.java new file mode 100644 index 0000000000..fedb8579e4 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicOperationService.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.topic.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.modules.topic.entity.ResiTopicOperationEntity; +import com.epmet.resi.group.dto.topic.ResiTopicOperationDTO; + + +import java.util.List; +import java.util.Map; + +/** + * 话题操作日志表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-31 + */ +public interface ResiTopicOperationService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-03-31 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-03-31 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ResiTopicOperationDTO + * @author generator + * @date 2020-03-31 + */ + ResiTopicOperationDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-31 + */ + void save(ResiTopicOperationDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-31 + */ + void update(ResiTopicOperationDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-03-31 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java new file mode 100644 index 0000000000..d0407fa3ca --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.topic.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.modules.topic.entity.ResiTopicEntity; +import com.epmet.resi.group.dto.topic.ResiTopicDTO; + + +import java.util.List; +import java.util.Map; + +/** + * 话题信息表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-31 + */ +public interface ResiTopicService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-03-31 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-03-31 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ResiTopicDTO + * @author generator + * @date 2020-03-31 + */ + ResiTopicDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-31 + */ + void save(ResiTopicDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-31 + */ + void update(ResiTopicDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-03-31 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java new file mode 100644 index 0000000000..aefdc798a0 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.topic.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.topic.dao.ResiTopicCommentDao; +import com.epmet.modules.topic.entity.ResiTopicCommentEntity; +import com.epmet.modules.topic.service.ResiTopicCommentService; +import com.epmet.resi.group.dto.topic.ResiTopicCommentDTO; +import org.apache.commons.lang3.StringUtils; +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-31 + */ +@Service +public class ResiTopicCommentServiceImpl extends BaseServiceImpl implements ResiTopicCommentService { + + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ResiTopicCommentDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ResiTopicCommentDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ResiTopicCommentDTO get(String id) { + ResiTopicCommentEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ResiTopicCommentDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ResiTopicCommentDTO dto) { + ResiTopicCommentEntity entity = ConvertUtils.sourceToTarget(dto, ResiTopicCommentEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ResiTopicCommentDTO dto) { + ResiTopicCommentEntity entity = ConvertUtils.sourceToTarget(dto, ResiTopicCommentEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicOperationServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicOperationServiceImpl.java new file mode 100644 index 0000000000..6461f58ee6 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicOperationServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.topic.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.topic.dao.ResiTopicOperationDao; +import com.epmet.modules.topic.entity.ResiTopicOperationEntity; +import com.epmet.modules.topic.service.ResiTopicOperationService; +import com.epmet.resi.group.dto.topic.ResiTopicOperationDTO; +import org.apache.commons.lang3.StringUtils; +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-31 + */ +@Service +public class ResiTopicOperationServiceImpl extends BaseServiceImpl implements ResiTopicOperationService { + + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ResiTopicOperationDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ResiTopicOperationDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ResiTopicOperationDTO get(String id) { + ResiTopicOperationEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ResiTopicOperationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ResiTopicOperationDTO dto) { + ResiTopicOperationEntity entity = ConvertUtils.sourceToTarget(dto, ResiTopicOperationEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ResiTopicOperationDTO dto) { + ResiTopicOperationEntity entity = ConvertUtils.sourceToTarget(dto, ResiTopicOperationEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java new file mode 100644 index 0000000000..43173e112a --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java @@ -0,0 +1,103 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.modules.topic.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.topic.dao.ResiTopicDao; +import com.epmet.modules.topic.entity.ResiTopicEntity; +import com.epmet.modules.topic.service.ResiTopicService; +import com.epmet.resi.group.dto.topic.ResiTopicDTO; + +import org.apache.commons.lang3.StringUtils; +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-31 + */ +@Service +public class ResiTopicServiceImpl extends BaseServiceImpl implements ResiTopicService { + + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ResiTopicDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ResiTopicDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ResiTopicDTO get(String id) { + ResiTopicEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ResiTopicDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ResiTopicDTO dto) { + ResiTopicEntity entity = ConvertUtils.sourceToTarget(dto, ResiTopicEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ResiTopicDTO dto) { + ResiTopicEntity entity = ConvertUtils.sourceToTarget(dto, ResiTopicEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml new file mode 100644 index 0000000000..4e09e9d3d6 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml new file mode 100644 index 0000000000..cd7bb091ad --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicOperationDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicOperationDao.xml new file mode 100644 index 0000000000..9af072ec66 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicOperationDao.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file