Browse Source

话题相关文件

dev
wangchao 5 years ago
parent
commit
c60d4727e7
  1. 86
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicCommentDTO.java
  2. 116
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicDTO.java
  3. 81
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/ResiTopicOperationDTO.java
  4. 64
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/ResiTopicPublishFormDTO.java
  5. 34
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicCommentDao.java
  6. 34
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicDao.java
  7. 34
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/dao/ResiTopicOperationDao.java
  8. 56
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/ResiTopicCommentEntity.java
  9. 86
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/ResiTopicEntity.java
  10. 51
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/entity/ResiTopicOperationEntity.java
  11. 65
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/excel/ResiTopicCommentExcel.java
  12. 83
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/excel/ResiTopicExcel.java
  13. 62
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/excel/ResiTopicOperationExcel.java
  14. 96
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicCommentService.java
  15. 96
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicOperationService.java
  16. 96
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java
  17. 102
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java
  18. 102
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicOperationServiceImpl.java
  19. 103
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
  20. 20
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml
  21. 26
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml
  22. 19
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicOperationDao.xml

86
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
* <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.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;
}

116
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
* <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.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;
}

81
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
* <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.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;
}

64
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<String> attachmentList;
}

34
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
* <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.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<ResiTopicCommentEntity> {
}

34
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
* <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.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<ResiTopicEntity> {
}

34
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
* <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.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<ResiTopicOperationEntity> {
}

56
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
* <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.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;
}

86
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
* <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.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;
}

51
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
* <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.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;
}

65
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
* <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.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;
}

83
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
* <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.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;
}

62
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
* <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.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;
}

96
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
* <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.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<ResiTopicCommentEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ResiTopicCommentDTO>
* @author generator
* @date 2020-03-31
*/
PageData<ResiTopicCommentDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ResiTopicCommentDTO>
* @author generator
* @date 2020-03-31
*/
List<ResiTopicCommentDTO> list(Map<String, Object> 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);
}

96
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
* <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.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<ResiTopicOperationEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ResiTopicOperationDTO>
* @author generator
* @date 2020-03-31
*/
PageData<ResiTopicOperationDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ResiTopicOperationDTO>
* @author generator
* @date 2020-03-31
*/
List<ResiTopicOperationDTO> list(Map<String, Object> 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);
}

96
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
* <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.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<ResiTopicEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ResiTopicDTO>
* @author generator
* @date 2020-03-31
*/
PageData<ResiTopicDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ResiTopicDTO>
* @author generator
* @date 2020-03-31
*/
List<ResiTopicDTO> list(Map<String, Object> 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);
}

102
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
* <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.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<ResiTopicCommentDao, ResiTopicCommentEntity> implements ResiTopicCommentService {
@Override
public PageData<ResiTopicCommentDTO> page(Map<String, Object> params) {
IPage<ResiTopicCommentEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ResiTopicCommentDTO.class);
}
@Override
public List<ResiTopicCommentDTO> list(Map<String, Object> params) {
List<ResiTopicCommentEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ResiTopicCommentDTO.class);
}
private QueryWrapper<ResiTopicCommentEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ResiTopicCommentEntity> 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));
}
}

102
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
* <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.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<ResiTopicOperationDao, ResiTopicOperationEntity> implements ResiTopicOperationService {
@Override
public PageData<ResiTopicOperationDTO> page(Map<String, Object> params) {
IPage<ResiTopicOperationEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ResiTopicOperationDTO.class);
}
@Override
public List<ResiTopicOperationDTO> list(Map<String, Object> params) {
List<ResiTopicOperationEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ResiTopicOperationDTO.class);
}
private QueryWrapper<ResiTopicOperationEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ResiTopicOperationEntity> 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));
}
}

103
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
* <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.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<ResiTopicDao, ResiTopicEntity> implements ResiTopicService {
@Override
public PageData<ResiTopicDTO> page(Map<String, Object> params) {
IPage<ResiTopicEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ResiTopicDTO.class);
}
@Override
public List<ResiTopicDTO> list(Map<String, Object> params) {
List<ResiTopicEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ResiTopicDTO.class);
}
private QueryWrapper<ResiTopicEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ResiTopicEntity> 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));
}
}

20
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicCommentDao.xml

@ -0,0 +1,20 @@
<?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.dao.ResiTopicCommentDao">
<resultMap type="com.epmet.entity.ResiTopicCommentEntity" id="resiTopicCommentMap">
<result property="id" column="ID"/>
<result property="commentContent" column="COMMENT_CONTENT"/>
<result property="topicId" column="TOPIC_ID"/>
<result property="status" column="STATUS"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

26
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml

@ -0,0 +1,26 @@
<?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.dao.ResiTopicDao">
<resultMap type="com.epmet.entity.ResiTopicEntity" id="resiTopicMap">
<result property="id" column="ID"/>
<result property="groupId" column="GROUP_ID"/>
<result property="topicContent" column="TOPIC_CONTENT"/>
<result property="status" column="STATUS"/>
<result property="province" column="PROVINCE"/>
<result property="city" column="CITY"/>
<result property="area" column="AREA"/>
<result property="address" column="ADDRESS"/>
<result property="longitude" column="LONGITUDE"/>
<result property="dimension" column="DIMENSION"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

19
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicOperationDao.xml

@ -0,0 +1,19 @@
<?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.dao.ResiTopicOperationDao">
<resultMap type="com.epmet.entity.ResiTopicOperationEntity" id="resiTopicOperationMap">
<result property="id" column="ID"/>
<result property="topicId" column="TOPIC_ID"/>
<result property="operationType" column="OPERATION_TYPE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>
Loading…
Cancel
Save