18 changed files with 1356 additions and 0 deletions
@ -0,0 +1,136 @@ |
|||
/** |
|||
* 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.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 项目节点附件表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-21 |
|||
*/ |
|||
@Data |
|||
public class ProjectProcessAttachmentDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 项目ID |
|||
*/ |
|||
private String projectId; |
|||
|
|||
/** |
|||
* 项目进展表ID |
|||
*/ |
|||
private String processId; |
|||
|
|||
/** |
|||
* 文件所属内容(内部备注: public 公开答复:internal) |
|||
*/ |
|||
private String filePlace; |
|||
|
|||
/** |
|||
* 文件名 |
|||
*/ |
|||
private String fileName; |
|||
|
|||
/** |
|||
* 附件名(uuid随机生成) |
|||
*/ |
|||
private String attachmentName; |
|||
|
|||
/** |
|||
* 文件大小 |
|||
*/ |
|||
private Integer attachmentSize; |
|||
|
|||
/** |
|||
* 文件格式(JPG、PNG、JPEG、BMP、GIF、PDF、PPT、PPTX、DOC、DOCX、XLS、XLSX、MP3、WMA、M4A、MP4、AVI、MOV、RMVB、RM、WMV) |
|||
*/ |
|||
private String attachmentFormat; |
|||
|
|||
/** |
|||
* 文件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) |
|||
*/ |
|||
private String attachmentType; |
|||
|
|||
/** |
|||
* url地址 |
|||
*/ |
|||
private String attachmentUrl; |
|||
|
|||
/** |
|||
* 排序(按文件所属节点的所属位置分组,在按文件类型排序) |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 语音或视频时长,秒 |
|||
*/ |
|||
private Integer duration; |
|||
|
|||
/** |
|||
* 是否强制发布(0:否 1:是) |
|||
*/ |
|||
private Integer isRelease; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -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.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 项目节点附件安全校验任务表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-21 |
|||
*/ |
|||
@Data |
|||
public class ProjectProcessScanTaskDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 项目ID |
|||
*/ |
|||
private String projectId; |
|||
|
|||
/** |
|||
* 项目进展表(project_process)ID |
|||
*/ |
|||
private String processId; |
|||
|
|||
/** |
|||
* 项目附件表主键,对应dataId |
|||
*/ |
|||
private String projectProcessAttachmentId; |
|||
|
|||
/** |
|||
* 阿里云审核任务Id |
|||
*/ |
|||
private String taskId; |
|||
|
|||
/** |
|||
* 审核状态【auditing: 审核中; |
|||
auto_passed: 自动通过; |
|||
review:结果不确定,需要人工审核; |
|||
block: 结果违规;】 |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 附件类型(视频 - video、 语音 - voice 文件 - doc) |
|||
*/ |
|||
private String attachmentType; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
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.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.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.ProjectProcessAttachmentDTO; |
|||
import com.epmet.excel.ProjectProcessAttachmentExcel; |
|||
import com.epmet.service.ProjectProcessAttachmentService; |
|||
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-21 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("projectprocessattachment") |
|||
public class ProjectProcessAttachmentController { |
|||
|
|||
@Autowired |
|||
private ProjectProcessAttachmentService projectProcessAttachmentService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<ProjectProcessAttachmentDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<ProjectProcessAttachmentDTO> page = projectProcessAttachmentService.page(params); |
|||
return new Result<PageData<ProjectProcessAttachmentDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<ProjectProcessAttachmentDTO> get(@PathVariable("id") String id){ |
|||
ProjectProcessAttachmentDTO data = projectProcessAttachmentService.get(id); |
|||
return new Result<ProjectProcessAttachmentDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody ProjectProcessAttachmentDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
projectProcessAttachmentService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody ProjectProcessAttachmentDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
projectProcessAttachmentService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
projectProcessAttachmentService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<ProjectProcessAttachmentDTO> list = projectProcessAttachmentService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, ProjectProcessAttachmentExcel.class); |
|||
} |
|||
|
|||
} |
@ -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.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.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.ProjectProcessScanTaskDTO; |
|||
import com.epmet.excel.ProjectProcessScanTaskExcel; |
|||
import com.epmet.service.ProjectProcessScanTaskService; |
|||
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-21 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("projectprocessscantask") |
|||
public class ProjectProcessScanTaskController { |
|||
|
|||
@Autowired |
|||
private ProjectProcessScanTaskService projectProcessScanTaskService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<ProjectProcessScanTaskDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<ProjectProcessScanTaskDTO> page = projectProcessScanTaskService.page(params); |
|||
return new Result<PageData<ProjectProcessScanTaskDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<ProjectProcessScanTaskDTO> get(@PathVariable("id") String id){ |
|||
ProjectProcessScanTaskDTO data = projectProcessScanTaskService.get(id); |
|||
return new Result<ProjectProcessScanTaskDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody ProjectProcessScanTaskDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
projectProcessScanTaskService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody ProjectProcessScanTaskDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
projectProcessScanTaskService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
projectProcessScanTaskService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<ProjectProcessScanTaskDTO> list = projectProcessScanTaskService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, ProjectProcessScanTaskExcel.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.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.ProjectProcessAttachmentEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 项目节点附件表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-21 |
|||
*/ |
|||
@Mapper |
|||
public interface ProjectProcessAttachmentDao extends BaseDao<ProjectProcessAttachmentEntity> { |
|||
|
|||
} |
@ -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.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.ProjectProcessScanTaskEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 项目节点附件安全校验任务表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-21 |
|||
*/ |
|||
@Mapper |
|||
public interface ProjectProcessScanTaskDao extends BaseDao<ProjectProcessScanTaskEntity> { |
|||
|
|||
} |
@ -0,0 +1,106 @@ |
|||
/** |
|||
* 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.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-21 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("project_process_attachment") |
|||
public class ProjectProcessAttachmentEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 项目ID |
|||
*/ |
|||
private String projectId; |
|||
|
|||
/** |
|||
* 项目进展表ID |
|||
*/ |
|||
private String processId; |
|||
|
|||
/** |
|||
* 文件所属内容(内部备注: public 公开答复:internal) |
|||
*/ |
|||
private String filePlace; |
|||
|
|||
/** |
|||
* 文件名 |
|||
*/ |
|||
private String fileName; |
|||
|
|||
/** |
|||
* 附件名(uuid随机生成) |
|||
*/ |
|||
private String attachmentName; |
|||
|
|||
/** |
|||
* 文件大小 |
|||
*/ |
|||
private Integer attachmentSize; |
|||
|
|||
/** |
|||
* 文件格式(JPG、PNG、JPEG、BMP、GIF、PDF、PPT、PPTX、DOC、DOCX、XLS、XLSX、MP3、WMA、M4A、MP4、AVI、MOV、RMVB、RM、WMV) |
|||
*/ |
|||
private String attachmentFormat; |
|||
|
|||
/** |
|||
* 文件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) |
|||
*/ |
|||
private String attachmentType; |
|||
|
|||
/** |
|||
* url地址 |
|||
*/ |
|||
private String attachmentUrl; |
|||
|
|||
/** |
|||
* 排序(按文件所属节点的所属位置分组,在按文件类型排序) |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 语音或视频时长,秒 |
|||
*/ |
|||
private Integer duration; |
|||
|
|||
/** |
|||
* 是否强制发布(0:否 1:是) |
|||
*/ |
|||
private Integer isRelease; |
|||
|
|||
} |
@ -0,0 +1,79 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.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-21 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("project_process_scan_task") |
|||
public class ProjectProcessScanTaskEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 项目ID |
|||
*/ |
|||
private String projectId; |
|||
|
|||
/** |
|||
* 项目进展表(project_process)ID |
|||
*/ |
|||
private String processId; |
|||
|
|||
/** |
|||
* 项目附件表主键,对应dataId |
|||
*/ |
|||
private String projectProcessAttachmentId; |
|||
|
|||
/** |
|||
* 阿里云审核任务Id |
|||
*/ |
|||
private String taskId; |
|||
|
|||
/** |
|||
* 审核状态【auditing: 审核中; |
|||
auto_passed: 自动通过; |
|||
review:结果不确定,需要人工审核; |
|||
block: 结果违规;】 |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 附件类型(视频 - video、 语音 - voice 文件 - doc) |
|||
*/ |
|||
private String attachmentType; |
|||
|
|||
} |
@ -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.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-21 |
|||
*/ |
|||
@Data |
|||
public class ProjectProcessAttachmentExcel { |
|||
|
|||
@Excel(name = "唯一标识") |
|||
private String id; |
|||
|
|||
@Excel(name = "客户ID") |
|||
private String customerId; |
|||
|
|||
@Excel(name = "项目ID") |
|||
private String projectId; |
|||
|
|||
@Excel(name = "项目进展表ID") |
|||
private String processId; |
|||
|
|||
@Excel(name = "文件所属内容(内部备注: public 公开答复:internal)") |
|||
private String filePlace; |
|||
|
|||
@Excel(name = "文件名") |
|||
private String fileName; |
|||
|
|||
@Excel(name = "附件名(uuid随机生成)") |
|||
private String attachmentName; |
|||
|
|||
@Excel(name = "文件大小") |
|||
private Integer attachmentSize; |
|||
|
|||
@Excel(name = "文件格式(JPG、PNG、JPEG、BMP、GIF、PDF、PPT、PPTX、DOC、DOCX、XLS、XLSX、MP3、WMA、M4A、MP4、AVI、MOV、RMVB、RM、WMV)") |
|||
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 = "语音或视频时长,秒") |
|||
private Integer duration; |
|||
|
|||
@Excel(name = "是否强制发布(0:否 1:是)") |
|||
private Integer isRelease; |
|||
|
|||
@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,75 @@ |
|||
/** |
|||
* 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.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-21 |
|||
*/ |
|||
@Data |
|||
public class ProjectProcessScanTaskExcel { |
|||
|
|||
@Excel(name = "唯一标识") |
|||
private String id; |
|||
|
|||
@Excel(name = "客户ID") |
|||
private String customerId; |
|||
|
|||
@Excel(name = "项目ID") |
|||
private String projectId; |
|||
|
|||
@Excel(name = "项目进展表(project_process)ID") |
|||
private String processId; |
|||
|
|||
@Excel(name = "项目附件表主键,对应dataId") |
|||
private String projectProcessAttachmentId; |
|||
|
|||
@Excel(name = "阿里云审核任务Id") |
|||
private String taskId; |
|||
|
|||
@Excel(name = "审核状态【auditing: 审核中; auto_passed: 自动通过;"+ |
|||
"review:结果不确定,需要人工审核;block: 结果违规;】") |
|||
private String status; |
|||
|
|||
@Excel(name = "附件类型(视频 - video、 语音 - voice 文件 - doc)") |
|||
private String attachmentType; |
|||
|
|||
@Excel(name = "删除标识:0.未删除 1.已删除") |
|||
private String delFlag; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 项目节点附件表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-21 |
|||
*/ |
|||
@Component |
|||
public class ProjectProcessAttachmentRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 项目节点附件安全校验任务表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-21 |
|||
*/ |
|||
@Component |
|||
public class ProjectProcessScanTaskRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,95 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.ProjectProcessAttachmentDTO; |
|||
import com.epmet.entity.ProjectProcessAttachmentEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 项目节点附件表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-21 |
|||
*/ |
|||
public interface ProjectProcessAttachmentService extends BaseService<ProjectProcessAttachmentEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<ProjectProcessAttachmentDTO> |
|||
* @author generator |
|||
* @date 2020-12-21 |
|||
*/ |
|||
PageData<ProjectProcessAttachmentDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<ProjectProcessAttachmentDTO> |
|||
* @author generator |
|||
* @date 2020-12-21 |
|||
*/ |
|||
List<ProjectProcessAttachmentDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return ProjectProcessAttachmentDTO |
|||
* @author generator |
|||
* @date 2020-12-21 |
|||
*/ |
|||
ProjectProcessAttachmentDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-21 |
|||
*/ |
|||
void save(ProjectProcessAttachmentDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-21 |
|||
*/ |
|||
void update(ProjectProcessAttachmentDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-21 |
|||
*/ |
|||
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.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.ProjectProcessScanTaskDTO; |
|||
import com.epmet.entity.ProjectProcessScanTaskEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 项目节点附件安全校验任务表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-21 |
|||
*/ |
|||
public interface ProjectProcessScanTaskService extends BaseService<ProjectProcessScanTaskEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<ProjectProcessScanTaskDTO> |
|||
* @author generator |
|||
* @date 2020-12-21 |
|||
*/ |
|||
PageData<ProjectProcessScanTaskDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<ProjectProcessScanTaskDTO> |
|||
* @author generator |
|||
* @date 2020-12-21 |
|||
*/ |
|||
List<ProjectProcessScanTaskDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return ProjectProcessScanTaskDTO |
|||
* @author generator |
|||
* @date 2020-12-21 |
|||
*/ |
|||
ProjectProcessScanTaskDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-21 |
|||
*/ |
|||
void save(ProjectProcessScanTaskDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-21 |
|||
*/ |
|||
void update(ProjectProcessScanTaskDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-21 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -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.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.dao.ProjectProcessAttachmentDao; |
|||
import com.epmet.dto.ProjectProcessAttachmentDTO; |
|||
import com.epmet.entity.ProjectProcessAttachmentEntity; |
|||
import com.epmet.redis.ProjectProcessAttachmentRedis; |
|||
import com.epmet.service.ProjectProcessAttachmentService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 项目节点附件表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-21 |
|||
*/ |
|||
@Service |
|||
public class ProjectProcessAttachmentServiceImpl extends BaseServiceImpl<ProjectProcessAttachmentDao, ProjectProcessAttachmentEntity> implements ProjectProcessAttachmentService { |
|||
|
|||
@Autowired |
|||
private ProjectProcessAttachmentRedis projectProcessAttachmentRedis; |
|||
|
|||
@Override |
|||
public PageData<ProjectProcessAttachmentDTO> page(Map<String, Object> params) { |
|||
IPage<ProjectProcessAttachmentEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, ProjectProcessAttachmentDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<ProjectProcessAttachmentDTO> list(Map<String, Object> params) { |
|||
List<ProjectProcessAttachmentEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, ProjectProcessAttachmentDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<ProjectProcessAttachmentEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<ProjectProcessAttachmentEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public ProjectProcessAttachmentDTO get(String id) { |
|||
ProjectProcessAttachmentEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, ProjectProcessAttachmentDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(ProjectProcessAttachmentDTO dto) { |
|||
ProjectProcessAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ProjectProcessAttachmentEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(ProjectProcessAttachmentDTO dto) { |
|||
ProjectProcessAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, ProjectProcessAttachmentEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -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.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.dao.ProjectProcessScanTaskDao; |
|||
import com.epmet.dto.ProjectProcessScanTaskDTO; |
|||
import com.epmet.entity.ProjectProcessScanTaskEntity; |
|||
import com.epmet.redis.ProjectProcessScanTaskRedis; |
|||
import com.epmet.service.ProjectProcessScanTaskService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 项目节点附件安全校验任务表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-12-21 |
|||
*/ |
|||
@Service |
|||
public class ProjectProcessScanTaskServiceImpl extends BaseServiceImpl<ProjectProcessScanTaskDao, ProjectProcessScanTaskEntity> implements ProjectProcessScanTaskService { |
|||
|
|||
@Autowired |
|||
private ProjectProcessScanTaskRedis projectProcessScanTaskRedis; |
|||
|
|||
@Override |
|||
public PageData<ProjectProcessScanTaskDTO> page(Map<String, Object> params) { |
|||
IPage<ProjectProcessScanTaskEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, ProjectProcessScanTaskDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<ProjectProcessScanTaskDTO> list(Map<String, Object> params) { |
|||
List<ProjectProcessScanTaskEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, ProjectProcessScanTaskDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<ProjectProcessScanTaskEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<ProjectProcessScanTaskEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public ProjectProcessScanTaskDTO get(String id) { |
|||
ProjectProcessScanTaskEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, ProjectProcessScanTaskDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(ProjectProcessScanTaskDTO dto) { |
|||
ProjectProcessScanTaskEntity entity = ConvertUtils.sourceToTarget(dto, ProjectProcessScanTaskEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(ProjectProcessScanTaskDTO dto) { |
|||
ProjectProcessScanTaskEntity entity = ConvertUtils.sourceToTarget(dto, ProjectProcessScanTaskEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -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.dao.ProjectProcessAttachmentDao"> |
|||
|
|||
|
|||
</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.dao.ProjectProcessScanTaskDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
Loading…
Reference in new issue