25 changed files with 1672 additions and 0 deletions
@ -0,0 +1,117 @@ |
|||||
|
/** |
||||
|
* 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-12-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class TopicDraftAttachmentDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 附件id |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 话题草稿id |
||||
|
*/ |
||||
|
private String topicDraftId; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 附件名(uuid随机生成) |
||||
|
*/ |
||||
|
private String attachmentName; |
||||
|
|
||||
|
/** |
||||
|
* 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) |
||||
|
*/ |
||||
|
private String attachmentFormat; |
||||
|
|
||||
|
/** |
||||
|
* 附件类型((图片 - image、视频 - video、 语音 - voice、 文档 - doc)) |
||||
|
*/ |
||||
|
private String attachmentType; |
||||
|
|
||||
|
/** |
||||
|
* 附件地址url |
||||
|
*/ |
||||
|
private String attachmentUrl; |
||||
|
|
||||
|
/** |
||||
|
* 排序字段(按附件类型分组排序) |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 附件状态(审核中:auditing; |
||||
|
auto_passed: 自动通过; |
||||
|
review:结果不确定,需要人工审核; |
||||
|
block: 结果违规; |
||||
|
rejected:人工审核驳回; |
||||
|
approved:人工审核通过) |
||||
|
现在图片是同步审核的,所以图片只有auto_passed一种状态 |
||||
|
*/ |
||||
|
private String status; |
||||
|
|
||||
|
/** |
||||
|
* 删除标记 0:未删除,1:已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,146 @@ |
|||||
|
/** |
||||
|
* 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-12-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class TopicDraftDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 话题草稿id |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 网格ID |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 小组Id |
||||
|
*/ |
||||
|
private String groupId; |
||||
|
|
||||
|
/** |
||||
|
* 话题内容 |
||||
|
*/ |
||||
|
private String topicContent; |
||||
|
|
||||
|
/** |
||||
|
* 话题草稿状态(审核中:auditing; |
||||
|
auto_passed: 自动通过; |
||||
|
review:结果不确定,需要人工审核; |
||||
|
block: 结果违规; |
||||
|
rejected:人工审核驳回; |
||||
|
approved:人工审核通过) |
||||
|
*/ |
||||
|
private String draftStatus; |
||||
|
|
||||
|
/** |
||||
|
* 草稿审核理由 |
||||
|
*/ |
||||
|
private String draftReason; |
||||
|
|
||||
|
/** |
||||
|
* 省 |
||||
|
*/ |
||||
|
private String province; |
||||
|
|
||||
|
/** |
||||
|
* 市 |
||||
|
*/ |
||||
|
private String city; |
||||
|
|
||||
|
/** |
||||
|
* 区 |
||||
|
*/ |
||||
|
private String area; |
||||
|
|
||||
|
/** |
||||
|
* 地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 维度 |
||||
|
*/ |
||||
|
private String dimension; |
||||
|
|
||||
|
/** |
||||
|
* 发布成功后的话题id |
||||
|
*/ |
||||
|
private String topicId; |
||||
|
|
||||
|
/** |
||||
|
* 创建者是否可见(0是 1否) |
||||
|
*/ |
||||
|
private String isSee; |
||||
|
|
||||
|
/** |
||||
|
* 删除标记 0:未删除,1:已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 话题发布人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -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.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-12-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class TopicDraftOperationDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 话题草稿操作日志id |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 话题草稿id |
||||
|
*/ |
||||
|
private String topicDraftId; |
||||
|
|
||||
|
/** |
||||
|
* 操作类型:submit:提交发布; |
||||
|
auto_passed: 自动审核-通过; |
||||
|
review:自动审核-结果不确定,需要人工审核; |
||||
|
block: 自动审核-结果违规; |
||||
|
rejected:人工审核驳回; |
||||
|
approved:人工审核通过 |
||||
|
*/ |
||||
|
private String operateType; |
||||
|
|
||||
|
/** |
||||
|
* 操作时的备注,比如驳回理由 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 删除标记 0:未删除,1:已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 操作人,API审核结果,存储为SCAN_USER或者APP_USER |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -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.topic.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.topic.excel.TopicDraftExcel; |
||||
|
import com.epmet.modules.topic.service.TopicDraftService; |
||||
|
import com.epmet.resi.group.dto.topic.TopicDraftDTO; |
||||
|
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 2020-12-17 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("topicdraft") |
||||
|
public class TopicDraftController { |
||||
|
|
||||
|
@Autowired |
||||
|
private TopicDraftService topicDraftService; |
||||
|
|
||||
|
@GetMapping("page") |
||||
|
public Result<PageData<TopicDraftDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<TopicDraftDTO> page = topicDraftService.page(params); |
||||
|
return new Result<PageData<TopicDraftDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("{id}") |
||||
|
public Result<TopicDraftDTO> get(@PathVariable("id") String id){ |
||||
|
TopicDraftDTO data = topicDraftService.get(id); |
||||
|
return new Result<TopicDraftDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody TopicDraftDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
topicDraftService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
public Result update(@RequestBody TopicDraftDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
topicDraftService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
topicDraftService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<TopicDraftDTO> list = topicDraftService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, TopicDraftExcel.class); |
||||
|
} |
||||
|
|
||||
|
} |
@ -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.topic.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.modules.topic.entity.TopicDraftAttachmentEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 话题草稿附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-17 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface TopicDraftAttachmentDao extends BaseDao<TopicDraftAttachmentEntity> { |
||||
|
|
||||
|
} |
@ -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.topic.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.modules.topic.entity.TopicDraftEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 话题草稿内容表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-17 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface TopicDraftDao extends BaseDao<TopicDraftEntity> { |
||||
|
|
||||
|
} |
@ -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.topic.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.modules.topic.entity.TopicDraftOperationEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 话题草稿操作日志表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-17 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface TopicDraftOperationDao extends BaseDao<TopicDraftOperationEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,87 @@ |
|||||
|
/** |
||||
|
* 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-12-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("topic_draft_attachment") |
||||
|
public class TopicDraftAttachmentEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 话题草稿id |
||||
|
*/ |
||||
|
private String topicDraftId; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 附件名(uuid随机生成) |
||||
|
*/ |
||||
|
private String attachmentName; |
||||
|
|
||||
|
/** |
||||
|
* 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) |
||||
|
*/ |
||||
|
private String attachmentFormat; |
||||
|
|
||||
|
/** |
||||
|
* 附件类型((图片 - image、视频 - video、 语音 - voice、 文档 - doc)) |
||||
|
*/ |
||||
|
private String attachmentType; |
||||
|
|
||||
|
/** |
||||
|
* 附件地址url |
||||
|
*/ |
||||
|
private String attachmentUrl; |
||||
|
|
||||
|
/** |
||||
|
* 排序字段(按附件类型分组排序) |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 附件状态(审核中:auditing; |
||||
|
auto_passed: 自动通过; |
||||
|
review:结果不确定,需要人工审核; |
||||
|
block: 结果违规; |
||||
|
rejected:人工审核驳回; |
||||
|
approved:人工审核通过) |
||||
|
现在图片是同步审核的,所以图片只有auto_passed一种状态 |
||||
|
*/ |
||||
|
private String status; |
||||
|
|
||||
|
} |
@ -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.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-12-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("topic_draft") |
||||
|
public class TopicDraftEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 网格ID |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 小组Id |
||||
|
*/ |
||||
|
private String groupId; |
||||
|
|
||||
|
/** |
||||
|
* 话题内容 |
||||
|
*/ |
||||
|
private String topicContent; |
||||
|
|
||||
|
/** |
||||
|
* 话题草稿状态(审核中:auditing; |
||||
|
auto_passed: 自动通过; |
||||
|
review:结果不确定,需要人工审核; |
||||
|
block: 结果违规; |
||||
|
rejected:人工审核驳回; |
||||
|
approved:人工审核通过) |
||||
|
*/ |
||||
|
private String draftStatus; |
||||
|
|
||||
|
/** |
||||
|
* 草稿审核理由 |
||||
|
*/ |
||||
|
private String draftReason; |
||||
|
|
||||
|
/** |
||||
|
* 省 |
||||
|
*/ |
||||
|
private String province; |
||||
|
|
||||
|
/** |
||||
|
* 市 |
||||
|
*/ |
||||
|
private String city; |
||||
|
|
||||
|
/** |
||||
|
* 区 |
||||
|
*/ |
||||
|
private String area; |
||||
|
|
||||
|
/** |
||||
|
* 地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 维度 |
||||
|
*/ |
||||
|
private String dimension; |
||||
|
|
||||
|
/** |
||||
|
* 发布成功后的话题id |
||||
|
*/ |
||||
|
private String topicId; |
||||
|
|
||||
|
/** |
||||
|
* 创建者是否可见(0是 1否) |
||||
|
*/ |
||||
|
private String isSee; |
||||
|
|
||||
|
} |
@ -0,0 +1,66 @@ |
|||||
|
/** |
||||
|
* 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-12-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("topic_draft_operation") |
||||
|
public class TopicDraftOperationEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 话题草稿id |
||||
|
*/ |
||||
|
private String topicDraftId; |
||||
|
|
||||
|
/** |
||||
|
* 操作类型:submit:提交发布; |
||||
|
auto_passed: 自动审核-通过; |
||||
|
review:自动审核-结果不确定,需要人工审核; |
||||
|
block: 自动审核-结果违规; |
||||
|
rejected:人工审核驳回; |
||||
|
approved:人工审核通过 |
||||
|
*/ |
||||
|
private String operateType; |
||||
|
|
||||
|
/** |
||||
|
* 操作时的备注,比如驳回理由 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
} |
@ -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.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-12-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class TopicDraftAttachmentExcel { |
||||
|
|
||||
|
@Excel(name = "附件id") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "话题草稿id") |
||||
|
private String topicDraftId; |
||||
|
|
||||
|
@Excel(name = "客户id") |
||||
|
private String customerId; |
||||
|
|
||||
|
@Excel(name = "附件名(uuid随机生成)") |
||||
|
private String attachmentName; |
||||
|
|
||||
|
@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 = "附件地址url") |
||||
|
private String attachmentUrl; |
||||
|
|
||||
|
@Excel(name = "排序字段(按附件类型分组排序)") |
||||
|
private Integer sort; |
||||
|
|
||||
|
@Excel(name = "附件状态(审核中:auditing;auto_passed: 自动通过;review:结果不确定,需要人工审核;"+ |
||||
|
"block: 结果违规;rejected:人工审核驳回;approved:人工审核通过)现在图片是同步审核的,所以图片只有auto_passed一种状态") |
||||
|
private String status; |
||||
|
|
||||
|
@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; |
||||
|
|
||||
|
} |
@ -0,0 +1,98 @@ |
|||||
|
/** |
||||
|
* 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-12-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class TopicDraftExcel { |
||||
|
|
||||
|
@Excel(name = "话题草稿id") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "客户id") |
||||
|
private String customerId; |
||||
|
|
||||
|
@Excel(name = "网格ID") |
||||
|
private String gridId; |
||||
|
|
||||
|
@Excel(name = "小组Id") |
||||
|
private String groupId; |
||||
|
|
||||
|
@Excel(name = "话题内容") |
||||
|
private String topicContent; |
||||
|
|
||||
|
@Excel(name = "话题草稿状态(审核中:auditing; auto_passed: 自动通过;review:结果不确定,需要人工审核;"+ |
||||
|
"block: 结果违规;rejected:人工审核驳回;approved:人工审核通过)") |
||||
|
private String draftStatus; |
||||
|
|
||||
|
@Excel(name = "草稿审核理由") |
||||
|
private String draftReason; |
||||
|
|
||||
|
@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 = "发布成功后的话题id") |
||||
|
private String topicId; |
||||
|
|
||||
|
@Excel(name = "创建者是否可见(0是 1否)") |
||||
|
private String isSee; |
||||
|
|
||||
|
@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; |
||||
|
|
||||
|
} |
@ -0,0 +1,68 @@ |
|||||
|
/** |
||||
|
* 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-12-17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class TopicDraftOperationExcel { |
||||
|
|
||||
|
@Excel(name = "话题草稿操作日志id") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "客户id") |
||||
|
private String customerId; |
||||
|
|
||||
|
@Excel(name = "话题草稿id") |
||||
|
private String topicDraftId; |
||||
|
|
||||
|
@Excel(name = "操作类型:submit:提交发布; auto_passed: 自动审核-通过;review:自动审核-结果不确定,需要人工审核;"+ |
||||
|
"block: 自动审核-结果违规;rejected:人工审核驳回;approved:人工审核通过") |
||||
|
private String operateType; |
||||
|
|
||||
|
@Excel(name = "操作时的备注,比如驳回理由") |
||||
|
private String remark; |
||||
|
|
||||
|
@Excel(name = "删除标记 0:未删除,1:已删除") |
||||
|
private String delFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "操作人,API审核结果,存储为SCAN_USER或者APP_USER") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -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.topic.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.modules.topic.entity.TopicDraftAttachmentEntity; |
||||
|
import com.epmet.resi.group.dto.topic.TopicDraftAttachmentDTO; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 话题草稿附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-17 |
||||
|
*/ |
||||
|
public interface TopicDraftAttachmentService extends BaseService<TopicDraftAttachmentEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<TopicDraftAttachmentDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
PageData<TopicDraftAttachmentDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<TopicDraftAttachmentDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
List<TopicDraftAttachmentDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return TopicDraftAttachmentDTO |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
TopicDraftAttachmentDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
void save(TopicDraftAttachmentDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
void update(TopicDraftAttachmentDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
@ -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.topic.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.modules.topic.entity.TopicDraftOperationEntity; |
||||
|
import com.epmet.resi.group.dto.topic.TopicDraftOperationDTO; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 话题草稿操作日志表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-17 |
||||
|
*/ |
||||
|
public interface TopicDraftOperationService extends BaseService<TopicDraftOperationEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<TopicDraftOperationDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
PageData<TopicDraftOperationDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<TopicDraftOperationDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
List<TopicDraftOperationDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return TopicDraftOperationDTO |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
TopicDraftOperationDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
void save(TopicDraftOperationDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
void update(TopicDraftOperationDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
@ -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.topic.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.modules.topic.entity.TopicDraftEntity; |
||||
|
import com.epmet.resi.group.dto.topic.TopicDraftDTO; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 话题草稿内容表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-12-17 |
||||
|
*/ |
||||
|
public interface TopicDraftService extends BaseService<TopicDraftEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<TopicDraftDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
PageData<TopicDraftDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<TopicDraftDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
List<TopicDraftDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return TopicDraftDTO |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
TopicDraftDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
void save(TopicDraftDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
void update(TopicDraftDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-12-17 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
@ -0,0 +1,99 @@ |
|||||
|
/** |
||||
|
* 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.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.modules.topic.dao.TopicDraftAttachmentDao; |
||||
|
import com.epmet.modules.topic.entity.TopicDraftAttachmentEntity; |
||||
|
import com.epmet.modules.topic.service.TopicDraftAttachmentService; |
||||
|
import com.epmet.resi.group.dto.topic.TopicDraftAttachmentDTO; |
||||
|
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-12-17 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class TopicDraftAttachmentServiceImpl extends BaseServiceImpl<TopicDraftAttachmentDao, TopicDraftAttachmentEntity> implements TopicDraftAttachmentService { |
||||
|
|
||||
|
@Override |
||||
|
public PageData<TopicDraftAttachmentDTO> page(Map<String, Object> params) { |
||||
|
IPage<TopicDraftAttachmentEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, TopicDraftAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<TopicDraftAttachmentDTO> list(Map<String, Object> params) { |
||||
|
List<TopicDraftAttachmentEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, TopicDraftAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<TopicDraftAttachmentEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<TopicDraftAttachmentEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public TopicDraftAttachmentDTO get(String id) { |
||||
|
TopicDraftAttachmentEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, TopicDraftAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(TopicDraftAttachmentDTO dto) { |
||||
|
TopicDraftAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, TopicDraftAttachmentEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(TopicDraftAttachmentDTO dto) { |
||||
|
TopicDraftAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, TopicDraftAttachmentEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,99 @@ |
|||||
|
/** |
||||
|
* 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.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.modules.topic.dao.TopicDraftOperationDao; |
||||
|
import com.epmet.modules.topic.entity.TopicDraftOperationEntity; |
||||
|
import com.epmet.modules.topic.service.TopicDraftOperationService; |
||||
|
import com.epmet.resi.group.dto.topic.TopicDraftOperationDTO; |
||||
|
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-12-17 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class TopicDraftOperationServiceImpl extends BaseServiceImpl<TopicDraftOperationDao, TopicDraftOperationEntity> implements TopicDraftOperationService { |
||||
|
|
||||
|
@Override |
||||
|
public PageData<TopicDraftOperationDTO> page(Map<String, Object> params) { |
||||
|
IPage<TopicDraftOperationEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, TopicDraftOperationDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<TopicDraftOperationDTO> list(Map<String, Object> params) { |
||||
|
List<TopicDraftOperationEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, TopicDraftOperationDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<TopicDraftOperationEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<TopicDraftOperationEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public TopicDraftOperationDTO get(String id) { |
||||
|
TopicDraftOperationEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, TopicDraftOperationDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(TopicDraftOperationDTO dto) { |
||||
|
TopicDraftOperationEntity entity = ConvertUtils.sourceToTarget(dto, TopicDraftOperationEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(TopicDraftOperationDTO dto) { |
||||
|
TopicDraftOperationEntity entity = ConvertUtils.sourceToTarget(dto, TopicDraftOperationEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,99 @@ |
|||||
|
/** |
||||
|
* 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.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.modules.topic.dao.TopicDraftDao; |
||||
|
import com.epmet.modules.topic.entity.TopicDraftEntity; |
||||
|
import com.epmet.modules.topic.service.TopicDraftService; |
||||
|
import com.epmet.resi.group.dto.topic.TopicDraftDTO; |
||||
|
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-12-17 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicDraftEntity> implements TopicDraftService { |
||||
|
|
||||
|
@Override |
||||
|
public PageData<TopicDraftDTO> page(Map<String, Object> params) { |
||||
|
IPage<TopicDraftEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, TopicDraftDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<TopicDraftDTO> list(Map<String, Object> params) { |
||||
|
List<TopicDraftEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, TopicDraftDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<TopicDraftEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<TopicDraftEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public TopicDraftDTO get(String id) { |
||||
|
TopicDraftEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, TopicDraftDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(TopicDraftDTO dto) { |
||||
|
TopicDraftEntity entity = ConvertUtils.sourceToTarget(dto, TopicDraftEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(TopicDraftDTO dto) { |
||||
|
TopicDraftEntity entity = ConvertUtils.sourceToTarget(dto, TopicDraftEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.modules.topic.dao.TopicDraftAttachmentDao"> |
||||
|
|
||||
|
|
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,7 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.modules.topic.dao.TopicDraftDao"> |
||||
|
|
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,8 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.modules.topic.dao.TopicDraftOperationDao"> |
||||
|
|
||||
|
|
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue