14 changed files with 884 additions and 0 deletions
@ -0,0 +1,110 @@ |
|||||
|
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 2022-05-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcServiceProjectAttachmentDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 事件Id |
||||
|
*/ |
||||
|
private String icServiceId; |
||||
|
|
||||
|
/** |
||||
|
* 附件名 |
||||
|
*/ |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* 附件地址 |
||||
|
*/ |
||||
|
private String attachmentUrl; |
||||
|
|
||||
|
/** |
||||
|
* 排序字段 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 附件状态(审核中:auditing; |
||||
|
auto_passed: 自动通过; |
||||
|
review:结果不确定,需要人工审核; |
||||
|
block: 结果违规; |
||||
|
rejected:人工审核驳回; |
||||
|
approved:人工审核通过) |
||||
|
现在图片是同步审核的,所以图片只有auto_passed一种状态 |
||||
|
*/ |
||||
|
private String status; |
||||
|
|
||||
|
/** |
||||
|
* 失败原因 |
||||
|
*/ |
||||
|
private String reason; |
||||
|
|
||||
|
/** |
||||
|
* 语音或视频时长,秒 |
||||
|
*/ |
||||
|
private Integer duration; |
||||
|
|
||||
|
/** |
||||
|
* 删除标记 0:未删除,1:已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,104 @@ |
|||||
|
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 2022-05-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcServiceProjectDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* ID |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID的上级 |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID的所有上级[包括自己] |
||||
|
*/ |
||||
|
private String agencyIdPath; |
||||
|
|
||||
|
/** |
||||
|
* 服务类别值 |
||||
|
*/ |
||||
|
private String serviceCategoryKey; |
||||
|
|
||||
|
/** |
||||
|
* 服务名称 |
||||
|
*/ |
||||
|
private String serviceName; |
||||
|
|
||||
|
/** |
||||
|
* 服务内容 |
||||
|
*/ |
||||
|
private String serviceContent; |
||||
|
|
||||
|
/** |
||||
|
* 政策级别,0市级;1区级;2街道级 |
||||
|
*/ |
||||
|
private String policyLevel; |
||||
|
|
||||
|
/** |
||||
|
* 政策依据 |
||||
|
*/ |
||||
|
private String policyGround; |
||||
|
|
||||
|
/** |
||||
|
* 启用状态,0启用,1禁用 |
||||
|
*/ |
||||
|
private Integer enabled; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,72 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
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.IcServiceProjectAttachmentDTO; |
||||
|
import com.epmet.service.IcServiceProjectAttachmentService; |
||||
|
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 2022-05-27 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("icServiceProjectAttachment") |
||||
|
public class IcServiceProjectAttachmentController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcServiceProjectAttachmentService icServiceProjectAttachmentService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<IcServiceProjectAttachmentDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<IcServiceProjectAttachmentDTO> page = icServiceProjectAttachmentService.page(params); |
||||
|
return new Result<PageData<IcServiceProjectAttachmentDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<IcServiceProjectAttachmentDTO> get(@PathVariable("id") String id){ |
||||
|
IcServiceProjectAttachmentDTO data = icServiceProjectAttachmentService.get(id); |
||||
|
return new Result<IcServiceProjectAttachmentDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody IcServiceProjectAttachmentDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
icServiceProjectAttachmentService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody IcServiceProjectAttachmentDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
icServiceProjectAttachmentService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
icServiceProjectAttachmentService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,73 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
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.IcServiceProjectDTO; |
||||
|
import com.epmet.service.IcServiceProjectService; |
||||
|
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 2022-05-27 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("icServiceProject") |
||||
|
public class IcServiceProjectController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcServiceProjectService icServiceProjectService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<IcServiceProjectDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<IcServiceProjectDTO> page = icServiceProjectService.page(params); |
||||
|
return new Result<PageData<IcServiceProjectDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<IcServiceProjectDTO> get(@PathVariable("id") String id){ |
||||
|
IcServiceProjectDTO data = icServiceProjectService.get(id); |
||||
|
return new Result<IcServiceProjectDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody IcServiceProjectDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
icServiceProjectService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody IcServiceProjectDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
icServiceProjectService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
icServiceProjectService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.IcServiceProjectAttachmentEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 事件附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-27 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcServiceProjectAttachmentDao extends BaseDao<IcServiceProjectAttachmentEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.IcServiceProjectEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 服务项目管理表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-27 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcServiceProjectDao extends BaseDao<IcServiceProjectEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,80 @@ |
|||||
|
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 2022-05-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_service_project_attachment") |
||||
|
public class IcServiceProjectAttachmentEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 事件Id |
||||
|
*/ |
||||
|
private String icServiceId; |
||||
|
|
||||
|
/** |
||||
|
* 附件名 |
||||
|
*/ |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* 附件地址 |
||||
|
*/ |
||||
|
private String attachmentUrl; |
||||
|
|
||||
|
/** |
||||
|
* 排序字段 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 附件状态(审核中:auditing; |
||||
|
auto_passed: 自动通过; |
||||
|
review:结果不确定,需要人工审核; |
||||
|
block: 结果违规; |
||||
|
rejected:人工审核驳回; |
||||
|
approved:人工审核通过) |
||||
|
现在图片是同步审核的,所以图片只有auto_passed一种状态 |
||||
|
*/ |
||||
|
private String status; |
||||
|
|
||||
|
/** |
||||
|
* 失败原因 |
||||
|
*/ |
||||
|
private String reason; |
||||
|
|
||||
|
/** |
||||
|
* 语音或视频时长,秒 |
||||
|
*/ |
||||
|
private Integer duration; |
||||
|
|
||||
|
} |
@ -0,0 +1,74 @@ |
|||||
|
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 2022-05-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_service_project") |
||||
|
public class IcServiceProjectEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID的上级 |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID的所有上级[包括自己] |
||||
|
*/ |
||||
|
private String agencyIdPath; |
||||
|
|
||||
|
/** |
||||
|
* 服务类别值 |
||||
|
*/ |
||||
|
private String serviceCategoryKey; |
||||
|
|
||||
|
/** |
||||
|
* 服务名称 |
||||
|
*/ |
||||
|
private String serviceName; |
||||
|
|
||||
|
/** |
||||
|
* 服务内容 |
||||
|
*/ |
||||
|
private String serviceContent; |
||||
|
|
||||
|
/** |
||||
|
* 政策级别,0市级;1区级;2街道级 |
||||
|
*/ |
||||
|
private String policyLevel; |
||||
|
|
||||
|
/** |
||||
|
* 政策依据 |
||||
|
*/ |
||||
|
private String policyGround; |
||||
|
|
||||
|
/** |
||||
|
* 启用状态,0启用,1禁用 |
||||
|
*/ |
||||
|
private Integer enabled; |
||||
|
|
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.IcServiceProjectAttachmentDTO; |
||||
|
import com.epmet.entity.IcServiceProjectAttachmentEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 事件附件表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-27 |
||||
|
*/ |
||||
|
public interface IcServiceProjectAttachmentService extends BaseService<IcServiceProjectAttachmentEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<IcServiceProjectAttachmentDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-27 |
||||
|
*/ |
||||
|
PageData<IcServiceProjectAttachmentDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<IcServiceProjectAttachmentDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-27 |
||||
|
*/ |
||||
|
List<IcServiceProjectAttachmentDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IcServiceProjectAttachmentDTO |
||||
|
* @author generator |
||||
|
* @date 2022-05-27 |
||||
|
*/ |
||||
|
IcServiceProjectAttachmentDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-27 |
||||
|
*/ |
||||
|
void save(IcServiceProjectAttachmentDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-27 |
||||
|
*/ |
||||
|
void update(IcServiceProjectAttachmentDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-27 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.IcServiceProjectDTO; |
||||
|
import com.epmet.entity.IcServiceProjectEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 服务项目管理表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-27 |
||||
|
*/ |
||||
|
public interface IcServiceProjectService extends BaseService<IcServiceProjectEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<IcServiceProjectDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-27 |
||||
|
*/ |
||||
|
PageData<IcServiceProjectDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<IcServiceProjectDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-27 |
||||
|
*/ |
||||
|
List<IcServiceProjectDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IcServiceProjectDTO |
||||
|
* @author generator |
||||
|
* @date 2022-05-27 |
||||
|
*/ |
||||
|
IcServiceProjectDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-27 |
||||
|
*/ |
||||
|
void save(IcServiceProjectDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-27 |
||||
|
*/ |
||||
|
void update(IcServiceProjectDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-27 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
@ -0,0 +1,83 @@ |
|||||
|
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.IcServiceProjectAttachmentDao; |
||||
|
import com.epmet.dto.IcServiceProjectAttachmentDTO; |
||||
|
import com.epmet.entity.IcServiceProjectAttachmentEntity; |
||||
|
import com.epmet.service.IcServiceProjectAttachmentService; |
||||
|
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 2022-05-27 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcServiceProjectAttachmentServiceImpl extends BaseServiceImpl<IcServiceProjectAttachmentDao, IcServiceProjectAttachmentEntity> implements IcServiceProjectAttachmentService { |
||||
|
|
||||
|
@Override |
||||
|
public PageData<IcServiceProjectAttachmentDTO> page(Map<String, Object> params) { |
||||
|
IPage<IcServiceProjectAttachmentEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, IcServiceProjectAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IcServiceProjectAttachmentDTO> list(Map<String, Object> params) { |
||||
|
List<IcServiceProjectAttachmentEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, IcServiceProjectAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<IcServiceProjectAttachmentEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<IcServiceProjectAttachmentEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IcServiceProjectAttachmentDTO get(String id) { |
||||
|
IcServiceProjectAttachmentEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, IcServiceProjectAttachmentDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IcServiceProjectAttachmentDTO dto) { |
||||
|
IcServiceProjectAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, IcServiceProjectAttachmentEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(IcServiceProjectAttachmentDTO dto) { |
||||
|
IcServiceProjectAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, IcServiceProjectAttachmentEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,87 @@ |
|||||
|
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.IcServiceProjectDao; |
||||
|
import com.epmet.dto.IcServiceProjectDTO; |
||||
|
import com.epmet.entity.IcServiceProjectEntity; |
||||
|
import com.epmet.redis.IcServiceProjectRedis; |
||||
|
import com.epmet.service.IcServiceProjectService; |
||||
|
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 2022-05-27 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcServiceProjectServiceImpl extends BaseServiceImpl<IcServiceProjectDao, IcServiceProjectEntity> implements IcServiceProjectService { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcServiceProjectRedis icServiceProjectRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<IcServiceProjectDTO> page(Map<String, Object> params) { |
||||
|
IPage<IcServiceProjectEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, IcServiceProjectDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IcServiceProjectDTO> list(Map<String, Object> params) { |
||||
|
List<IcServiceProjectEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, IcServiceProjectDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<IcServiceProjectEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<IcServiceProjectEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IcServiceProjectDTO get(String id) { |
||||
|
IcServiceProjectEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, IcServiceProjectDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IcServiceProjectDTO dto) { |
||||
|
IcServiceProjectEntity entity = ConvertUtils.sourceToTarget(dto, IcServiceProjectEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(IcServiceProjectDTO dto) { |
||||
|
IcServiceProjectEntity entity = ConvertUtils.sourceToTarget(dto, IcServiceProjectEntity.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.IcServiceProjectAttachmentDao"> |
||||
|
|
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,6 @@ |
|||||
|
<?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.IcServiceProjectDao"> |
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue