Browse Source

小组通知代码生成

dev_shibei_match
sunyuchao 4 years ago
parent
commit
3b2efc5990
  1. 121
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeAttachmentDTO.java
  2. 86
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeCommentDTO.java
  3. 111
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeDTO.java
  4. 101
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReafdRecordDTO.java
  5. 94
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeAttachmentController.java
  6. 94
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java
  7. 94
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java
  8. 94
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java
  9. 33
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeAttachmentDao.java
  10. 33
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeCommentDao.java
  11. 33
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeDao.java
  12. 33
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java
  13. 91
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeAttachmentEntity.java
  14. 56
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeCommentEntity.java
  15. 81
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeEntity.java
  16. 71
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReafdRecordEntity.java
  17. 86
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeAttachmentExcel.java
  18. 65
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeCommentExcel.java
  19. 80
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeExcel.java
  20. 74
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeReafdRecordExcel.java
  21. 47
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeAttachmentRedis.java
  22. 47
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeCommentRedis.java
  23. 47
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeReafdRecordRedis.java
  24. 47
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeRedis.java
  25. 95
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeAttachmentService.java
  26. 95
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java
  27. 95
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.java
  28. 95
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java
  29. 104
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeAttachmentServiceImpl.java
  30. 104
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java
  31. 104
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReafdRecordServiceImpl.java
  32. 104
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java
  33. 7
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeAttachmentDao.xml
  34. 7
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeCommentDao.xml
  35. 7
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeDao.xml
  36. 7
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml

121
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeAttachmentDTO.java

@ -0,0 +1,121 @@
/**
* 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.notice;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 小组通知附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
@Data
public class NoticeAttachmentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 通知Id
*/
private String noticeId;
/**
* 文件名
*/
private String fileName;
/**
* 附件名uuid随机生成
*/
private String attachmentName;
/**
* 文件大小单位b
*/
private Integer attachmentSize;
/**
* 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS
*/
private String attachmentFormat;
/**
* 附件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String attachmentType;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 排序字段
*/
private Integer sort;
/**
* 语音或视频时长
*/
private Integer duration;
/**
* 删除标记 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

86
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeCommentDTO.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.notice;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 小组通知评论表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
@Data
public class NoticeCommentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 通知Id
*/
private String noticeId;
/**
* 评论内容(最多300字符)
*/
private String commentContent;
/**
* 删除标记 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

111
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeDTO.java

@ -0,0 +1,111 @@
/**
* 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.notice;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 小组通知表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
@Data
public class NoticeDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 组织机构Id
*/
private String agencyId;
/**
* 小组所属网格id
*/
private String gridId;
/**
* 小组Id
*/
private String groupId;
/**
* 通知标题
*/
private String title;
/**
* 通知内容
*/
private String content;
/**
* 是否变更过(:yes :no)
*/
private String isChange;
/**
* 通知变更时间初始值为首次创建时间
*/
private Date changeTime;
/**
* 删除标记 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

101
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReafdRecordDTO.java

@ -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.notice;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 小组通知组成员阅读记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
@Data
public class NoticeReafdRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 小组所属网格id
*/
private String gridId;
/**
* 小组id
*/
private String groupId;
/**
* 通知Id
*/
private String noticeId;
/**
* 用户id
*/
private String userId;
/**
* read已读unread未读
*/
private String readFlag;
/**
* 删除标识
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

94
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeAttachmentController.java

@ -0,0 +1,94 @@
/**
* 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.notice.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.modules.notice.excel.NoticeAttachmentExcel;
import com.epmet.modules.notice.service.NoticeAttachmentService;
import com.epmet.resi.group.dto.notice.NoticeAttachmentDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 小组通知附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
@RestController
@RequestMapping("noticeattachment")
public class NoticeAttachmentController {
@Autowired
private NoticeAttachmentService noticeAttachmentService;
@GetMapping("page")
public Result<PageData<NoticeAttachmentDTO>> page(@RequestParam Map<String, Object> params){
PageData<NoticeAttachmentDTO> page = noticeAttachmentService.page(params);
return new Result<PageData<NoticeAttachmentDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<NoticeAttachmentDTO> get(@PathVariable("id") String id){
NoticeAttachmentDTO data = noticeAttachmentService.get(id);
return new Result<NoticeAttachmentDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody NoticeAttachmentDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
noticeAttachmentService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody NoticeAttachmentDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
noticeAttachmentService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
noticeAttachmentService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<NoticeAttachmentDTO> list = noticeAttachmentService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, NoticeAttachmentExcel.class);
}
}

94
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeCommentController.java

@ -0,0 +1,94 @@
/**
* 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.notice.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.modules.notice.excel.NoticeCommentExcel;
import com.epmet.modules.notice.service.NoticeCommentService;
import com.epmet.resi.group.dto.notice.NoticeCommentDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 小组通知评论表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
@RestController
@RequestMapping("noticecomment")
public class NoticeCommentController {
@Autowired
private NoticeCommentService noticeCommentService;
@GetMapping("page")
public Result<PageData<NoticeCommentDTO>> page(@RequestParam Map<String, Object> params){
PageData<NoticeCommentDTO> page = noticeCommentService.page(params);
return new Result<PageData<NoticeCommentDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<NoticeCommentDTO> get(@PathVariable("id") String id){
NoticeCommentDTO data = noticeCommentService.get(id);
return new Result<NoticeCommentDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody NoticeCommentDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
noticeCommentService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody NoticeCommentDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
noticeCommentService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
noticeCommentService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<NoticeCommentDTO> list = noticeCommentService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, NoticeCommentExcel.class);
}
}

94
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeController.java

@ -0,0 +1,94 @@
/**
* 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.notice.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.modules.notice.excel.NoticeExcel;
import com.epmet.modules.notice.service.NoticeService;
import com.epmet.resi.group.dto.notice.NoticeDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 小组通知表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
@RestController
@RequestMapping("notice")
public class NoticeController {
@Autowired
private NoticeService noticeService;
@GetMapping("page")
public Result<PageData<NoticeDTO>> page(@RequestParam Map<String, Object> params){
PageData<NoticeDTO> page = noticeService.page(params);
return new Result<PageData<NoticeDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<NoticeDTO> get(@PathVariable("id") String id){
NoticeDTO data = noticeService.get(id);
return new Result<NoticeDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody NoticeDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
noticeService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody NoticeDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
noticeService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
noticeService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<NoticeDTO> list = noticeService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, NoticeExcel.class);
}
}

94
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/controller/NoticeReafdRecordController.java

@ -0,0 +1,94 @@
/**
* 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.notice.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.modules.notice.excel.NoticeReafdRecordExcel;
import com.epmet.modules.notice.service.NoticeReafdRecordService;
import com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 小组通知组成员阅读记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
@RestController
@RequestMapping("noticereafdrecord")
public class NoticeReafdRecordController {
@Autowired
private NoticeReafdRecordService noticeReafdRecordService;
@GetMapping("page")
public Result<PageData<NoticeReafdRecordDTO>> page(@RequestParam Map<String, Object> params){
PageData<NoticeReafdRecordDTO> page = noticeReafdRecordService.page(params);
return new Result<PageData<NoticeReafdRecordDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<NoticeReafdRecordDTO> get(@PathVariable("id") String id){
NoticeReafdRecordDTO data = noticeReafdRecordService.get(id);
return new Result<NoticeReafdRecordDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody NoticeReafdRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
noticeReafdRecordService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody NoticeReafdRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
noticeReafdRecordService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
noticeReafdRecordService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<NoticeReafdRecordDTO> list = noticeReafdRecordService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, NoticeReafdRecordExcel.class);
}
}

33
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeAttachmentDao.java

@ -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.notice.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.notice.entity.NoticeAttachmentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 小组通知附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
@Mapper
public interface NoticeAttachmentDao extends BaseDao<NoticeAttachmentEntity> {
}

33
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeCommentDao.java

@ -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.notice.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.notice.entity.NoticeCommentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 小组通知评论表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
@Mapper
public interface NoticeCommentDao extends BaseDao<NoticeCommentEntity> {
}

33
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeDao.java

@ -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.notice.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.notice.entity.NoticeEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 小组通知表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
@Mapper
public interface NoticeDao extends BaseDao<NoticeEntity> {
}

33
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/dao/NoticeReafdRecordDao.java

@ -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.notice.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.modules.notice.entity.NoticeReafdRecordEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 小组通知组成员阅读记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
@Mapper
public interface NoticeReafdRecordDao extends BaseDao<NoticeReafdRecordEntity> {
}

91
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeAttachmentEntity.java

@ -0,0 +1,91 @@
/**
* 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.notice.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 2021-04-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("notice_attachment")
public class NoticeAttachmentEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 通知Id
*/
private String noticeId;
/**
* 文件名
*/
private String fileName;
/**
* 附件名uuid随机生成
*/
private String attachmentName;
/**
* 文件大小单位b
*/
private Integer attachmentSize;
/**
* 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS
*/
private String attachmentFormat;
/**
* 附件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String attachmentType;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 排序字段
*/
private Integer sort;
/**
* 语音或视频时长
*/
private Integer duration;
}

56
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeCommentEntity.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.notice.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 2021-04-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("notice_comment")
public class NoticeCommentEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 通知Id
*/
private String noticeId;
/**
* 评论内容(最多300字符)
*/
private String commentContent;
}

81
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeEntity.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.modules.notice.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 2021-04-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("notice")
public class NoticeEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 组织机构Id
*/
private String agencyId;
/**
* 小组所属网格id
*/
private String gridId;
/**
* 小组Id
*/
private String groupId;
/**
* 通知标题
*/
private String title;
/**
* 通知内容
*/
private String content;
/**
* 是否变更过(:yes :no)
*/
private String isChange;
/**
* 通知变更时间初始值为首次创建时间
*/
private Date changeTime;
}

71
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReafdRecordEntity.java

@ -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.notice.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 2021-04-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("notice_reafd_record")
public class NoticeReafdRecordEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 小组所属网格id
*/
private String gridId;
/**
* 小组id
*/
private String groupId;
/**
* 通知Id
*/
private String noticeId;
/**
* 用户id
*/
private String userId;
/**
* read已读unread未读
*/
private String readFlag;
}

86
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeAttachmentExcel.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.notice.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 2021-04-19
*/
@Data
public class NoticeAttachmentExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "客户ID")
private String customerId;
@Excel(name = "通知Id")
private String noticeId;
@Excel(name = "文件名")
private String fileName;
@Excel(name = "附件名(uuid随机生成)")
private String attachmentName;
@Excel(name = "文件大小,单位b")
private Integer attachmentSize;
@Excel(name = "文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)")
private String attachmentFormat;
@Excel(name = "附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))")
private String attachmentType;
@Excel(name = "附件地址")
private String attachmentUrl;
@Excel(name = "排序字段")
private Integer sort;
@Excel(name = "语音或视频时长,秒")
private Integer duration;
@Excel(name = "删除标记 0:未删除,1:已删除")
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

65
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeCommentExcel.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.notice.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 2021-04-19
*/
@Data
public class NoticeCommentExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "客户ID")
private String customerId;
@Excel(name = "通知Id")
private String noticeId;
@Excel(name = "评论内容(最多300字符)")
private String commentContent;
@Excel(name = "删除标记 0:未删除,1:已删除")
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

80
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeExcel.java

@ -0,0 +1,80 @@
/**
* 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.notice.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 2021-04-19
*/
@Data
public class NoticeExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "客户ID")
private String customerId;
@Excel(name = "组织机构Id")
private String agencyId;
@Excel(name = "小组所属网格id")
private String gridId;
@Excel(name = "小组Id")
private String groupId;
@Excel(name = "通知标题")
private String title;
@Excel(name = "通知内容")
private String content;
@Excel(name = "是否变更过(是:yes 否:no)")
private String isChange;
@Excel(name = "通知变更时间,初始值为首次创建时间")
private Date changeTime;
@Excel(name = "删除标记 0:未删除,1:已删除")
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

74
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/excel/NoticeReafdRecordExcel.java

@ -0,0 +1,74 @@
/**
* 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.notice.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 2021-04-19
*/
@Data
public class NoticeReafdRecordExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "客户id")
private String customerId;
@Excel(name = "小组所属网格id")
private String gridId;
@Excel(name = "小组id")
private String groupId;
@Excel(name = "通知Id")
private String noticeId;
@Excel(name = "用户id")
private String userId;
@Excel(name = "read已读、unread未读")
private String readFlag;
@Excel(name = "删除标识")
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

47
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeAttachmentRedis.java

@ -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.notice.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 2021-04-19
*/
@Component
public class NoticeAttachmentRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeCommentRedis.java

@ -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.notice.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 2021-04-19
*/
@Component
public class NoticeCommentRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeReafdRecordRedis.java

@ -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.notice.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 2021-04-19
*/
@Component
public class NoticeReafdRecordRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/redis/NoticeRedis.java

@ -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.notice.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 2021-04-19
*/
@Component
public class NoticeRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

95
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeAttachmentService.java

@ -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.notice.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.modules.notice.entity.NoticeAttachmentEntity;
import com.epmet.resi.group.dto.notice.NoticeAttachmentDTO;
import java.util.List;
import java.util.Map;
/**
* 小组通知附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
public interface NoticeAttachmentService extends BaseService<NoticeAttachmentEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<NoticeAttachmentDTO>
* @author generator
* @date 2021-04-19
*/
PageData<NoticeAttachmentDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<NoticeAttachmentDTO>
* @author generator
* @date 2021-04-19
*/
List<NoticeAttachmentDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return NoticeAttachmentDTO
* @author generator
* @date 2021-04-19
*/
NoticeAttachmentDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-04-19
*/
void save(NoticeAttachmentDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-04-19
*/
void update(NoticeAttachmentDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-04-19
*/
void delete(String[] ids);
}

95
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeCommentService.java

@ -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.notice.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.modules.notice.entity.NoticeCommentEntity;
import com.epmet.resi.group.dto.notice.NoticeCommentDTO;
import java.util.List;
import java.util.Map;
/**
* 小组通知评论表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
public interface NoticeCommentService extends BaseService<NoticeCommentEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<NoticeCommentDTO>
* @author generator
* @date 2021-04-19
*/
PageData<NoticeCommentDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<NoticeCommentDTO>
* @author generator
* @date 2021-04-19
*/
List<NoticeCommentDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return NoticeCommentDTO
* @author generator
* @date 2021-04-19
*/
NoticeCommentDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-04-19
*/
void save(NoticeCommentDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-04-19
*/
void update(NoticeCommentDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-04-19
*/
void delete(String[] ids);
}

95
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeReafdRecordService.java

@ -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.notice.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.modules.notice.entity.NoticeReafdRecordEntity;
import com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO;
import java.util.List;
import java.util.Map;
/**
* 小组通知组成员阅读记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
public interface NoticeReafdRecordService extends BaseService<NoticeReafdRecordEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<NoticeReafdRecordDTO>
* @author generator
* @date 2021-04-19
*/
PageData<NoticeReafdRecordDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<NoticeReafdRecordDTO>
* @author generator
* @date 2021-04-19
*/
List<NoticeReafdRecordDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return NoticeReafdRecordDTO
* @author generator
* @date 2021-04-19
*/
NoticeReafdRecordDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-04-19
*/
void save(NoticeReafdRecordDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-04-19
*/
void update(NoticeReafdRecordDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-04-19
*/
void delete(String[] ids);
}

95
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/NoticeService.java

@ -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.notice.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.modules.notice.entity.NoticeEntity;
import com.epmet.resi.group.dto.notice.NoticeDTO;
import java.util.List;
import java.util.Map;
/**
* 小组通知表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-04-19
*/
public interface NoticeService extends BaseService<NoticeEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<NoticeDTO>
* @author generator
* @date 2021-04-19
*/
PageData<NoticeDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<NoticeDTO>
* @author generator
* @date 2021-04-19
*/
List<NoticeDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return NoticeDTO
* @author generator
* @date 2021-04-19
*/
NoticeDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-04-19
*/
void save(NoticeDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-04-19
*/
void update(NoticeDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-04-19
*/
void delete(String[] ids);
}

104
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeAttachmentServiceImpl.java

@ -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.notice.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.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.modules.notice.dao.NoticeAttachmentDao;
import com.epmet.modules.notice.entity.NoticeAttachmentEntity;
import com.epmet.modules.notice.redis.NoticeAttachmentRedis;
import com.epmet.modules.notice.service.NoticeAttachmentService;
import com.epmet.resi.group.dto.notice.NoticeAttachmentDTO;
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 2021-04-19
*/
@Service
public class NoticeAttachmentServiceImpl extends BaseServiceImpl<NoticeAttachmentDao, NoticeAttachmentEntity> implements NoticeAttachmentService {
@Autowired
private NoticeAttachmentRedis noticeAttachmentRedis;
@Override
public PageData<NoticeAttachmentDTO> page(Map<String, Object> params) {
IPage<NoticeAttachmentEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, NoticeAttachmentDTO.class);
}
@Override
public List<NoticeAttachmentDTO> list(Map<String, Object> params) {
List<NoticeAttachmentEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, NoticeAttachmentDTO.class);
}
private QueryWrapper<NoticeAttachmentEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<NoticeAttachmentEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public NoticeAttachmentDTO get(String id) {
NoticeAttachmentEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, NoticeAttachmentDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(NoticeAttachmentDTO dto) {
NoticeAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, NoticeAttachmentEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(NoticeAttachmentDTO dto) {
NoticeAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, NoticeAttachmentEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

104
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java

@ -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.notice.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.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.modules.notice.dao.NoticeCommentDao;
import com.epmet.modules.notice.entity.NoticeCommentEntity;
import com.epmet.modules.notice.redis.NoticeCommentRedis;
import com.epmet.modules.notice.service.NoticeCommentService;
import com.epmet.resi.group.dto.notice.NoticeCommentDTO;
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 2021-04-19
*/
@Service
public class NoticeCommentServiceImpl extends BaseServiceImpl<NoticeCommentDao, NoticeCommentEntity> implements NoticeCommentService {
@Autowired
private NoticeCommentRedis noticeCommentRedis;
@Override
public PageData<NoticeCommentDTO> page(Map<String, Object> params) {
IPage<NoticeCommentEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, NoticeCommentDTO.class);
}
@Override
public List<NoticeCommentDTO> list(Map<String, Object> params) {
List<NoticeCommentEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, NoticeCommentDTO.class);
}
private QueryWrapper<NoticeCommentEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<NoticeCommentEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public NoticeCommentDTO get(String id) {
NoticeCommentEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, NoticeCommentDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(NoticeCommentDTO dto) {
NoticeCommentEntity entity = ConvertUtils.sourceToTarget(dto, NoticeCommentEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(NoticeCommentDTO dto) {
NoticeCommentEntity entity = ConvertUtils.sourceToTarget(dto, NoticeCommentEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

104
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReafdRecordServiceImpl.java

@ -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.notice.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.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.modules.notice.dao.NoticeReafdRecordDao;
import com.epmet.modules.notice.entity.NoticeReafdRecordEntity;
import com.epmet.modules.notice.redis.NoticeReafdRecordRedis;
import com.epmet.modules.notice.service.NoticeReafdRecordService;
import com.epmet.resi.group.dto.notice.NoticeReafdRecordDTO;
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 2021-04-19
*/
@Service
public class NoticeReafdRecordServiceImpl extends BaseServiceImpl<NoticeReafdRecordDao, NoticeReafdRecordEntity> implements NoticeReafdRecordService {
@Autowired
private NoticeReafdRecordRedis noticeReafdRecordRedis;
@Override
public PageData<NoticeReafdRecordDTO> page(Map<String, Object> params) {
IPage<NoticeReafdRecordEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, NoticeReafdRecordDTO.class);
}
@Override
public List<NoticeReafdRecordDTO> list(Map<String, Object> params) {
List<NoticeReafdRecordEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, NoticeReafdRecordDTO.class);
}
private QueryWrapper<NoticeReafdRecordEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<NoticeReafdRecordEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public NoticeReafdRecordDTO get(String id) {
NoticeReafdRecordEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, NoticeReafdRecordDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(NoticeReafdRecordDTO dto) {
NoticeReafdRecordEntity entity = ConvertUtils.sourceToTarget(dto, NoticeReafdRecordEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(NoticeReafdRecordDTO dto) {
NoticeReafdRecordEntity entity = ConvertUtils.sourceToTarget(dto, NoticeReafdRecordEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

104
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java

@ -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.notice.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.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.modules.notice.dao.NoticeDao;
import com.epmet.modules.notice.entity.NoticeEntity;
import com.epmet.modules.notice.redis.NoticeRedis;
import com.epmet.modules.notice.service.NoticeService;
import com.epmet.resi.group.dto.notice.NoticeDTO;
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 2021-04-19
*/
@Service
public class NoticeServiceImpl extends BaseServiceImpl<NoticeDao, NoticeEntity> implements NoticeService {
@Autowired
private NoticeRedis noticeRedis;
@Override
public PageData<NoticeDTO> page(Map<String, Object> params) {
IPage<NoticeEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, NoticeDTO.class);
}
@Override
public List<NoticeDTO> list(Map<String, Object> params) {
List<NoticeEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, NoticeDTO.class);
}
private QueryWrapper<NoticeEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<NoticeEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public NoticeDTO get(String id) {
NoticeEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, NoticeDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(NoticeDTO dto) {
NoticeEntity entity = ConvertUtils.sourceToTarget(dto, NoticeEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(NoticeDTO dto) {
NoticeEntity entity = ConvertUtils.sourceToTarget(dto, NoticeEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

7
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeAttachmentDao.xml

@ -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.notice.dao.NoticeAttachmentDao">
</mapper>

7
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeCommentDao.xml

@ -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.notice.dao.NoticeCommentDao">
</mapper>

7
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeDao.xml

@ -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.notice.dao.NoticeDao">
</mapper>

7
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/notice/NoticeReafdRecordDao.xml

@ -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.notice.dao.NoticeReafdRecordDao">
</mapper>
Loading…
Cancel
Save