64 changed files with 2605 additions and 50 deletions
@ -0,0 +1,77 @@ |
|||
package ${package}.controller; |
|||
|
|||
import ${main}.commons.tools.page.PageData; |
|||
import ${main}.commons.tools.utils.ExcelUtils; |
|||
import ${main}.commons.tools.utils.Result; |
|||
import ${main}.commons.tools.validator.AssertUtils; |
|||
import ${main}.commons.tools.validator.ValidatorUtils; |
|||
import ${main}.commons.tools.validator.group.AddGroup; |
|||
import ${main}.commons.tools.validator.group.UpdateGroup; |
|||
import ${main}.commons.tools.validator.group.DefaultGroup; |
|||
import ${package}.dto.${className}DTO; |
|||
import ${package}.excel.${className}Excel; |
|||
import ${package}.service.${className}Service; |
|||
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; |
|||
|
|||
|
|||
/** |
|||
* ${comments} |
|||
* |
|||
* @author ${author} ${email} |
|||
* @since ${version} ${date} |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("${pathName}") |
|||
public class ${className}Controller { |
|||
|
|||
@Autowired |
|||
private ${className}Service ${classname}Service; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<${className}DTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<${className}DTO> page = ${classname}Service.page(params); |
|||
return new Result<PageData<${className}DTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<${className}DTO> get(@PathVariable("id") String id){ |
|||
${className}DTO data = ${classname}Service.get(id); |
|||
return new Result<${className}DTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody ${className}DTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
${classname}Service.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody ${className}DTO dto){ |
|||
//效验数据 |
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
${classname}Service.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据 |
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
${classname}Service.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<${className}DTO> list = ${classname}Service.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, ${className}Excel.class); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,87 @@ |
|||
package ${package}.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import ${main}.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import ${main}.commons.tools.page.PageData; |
|||
import ${main}.commons.tools.utils.ConvertUtils; |
|||
import ${package}.commons.tools.constant.FieldConstant; |
|||
import ${package}.dao.${className}Dao; |
|||
import ${package}.dto.${className}DTO; |
|||
import ${package}.entity.${className}Entity; |
|||
import ${package}.redis.${className}Redis; |
|||
import ${package}.service.${className}Service; |
|||
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; |
|||
|
|||
/** |
|||
* ${comments} |
|||
* |
|||
* @author ${author} ${email} |
|||
* @since ${version} ${date} |
|||
*/ |
|||
@Service |
|||
public class ${className}ServiceImpl extends BaseServiceImpl<${className}Dao, ${className}Entity> implements ${className}Service { |
|||
|
|||
@Autowired |
|||
private ${className}Redis ${classname}Redis; |
|||
|
|||
@Override |
|||
public PageData<${className}DTO> page(Map<String, Object> params) { |
|||
IPage<${className}Entity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, ${className}DTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<${className}DTO> list(Map<String, Object> params) { |
|||
List<${className}Entity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, ${className}DTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<${className}Entity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<${className}Entity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public ${className}DTO get(String id) { |
|||
${className}Entity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, ${className}DTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(${className}DTO dto) { |
|||
${className}Entity entity = ConvertUtils.sourceToTarget(dto, ${className}Entity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(${className}DTO dto) { |
|||
${className}Entity entity = ConvertUtils.sourceToTarget(dto, ${className}Entity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解) |
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,56 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto.extract.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 网格项目main表数据 |
|||
*/ |
|||
@Data |
|||
public class GridProjectToProjectMainDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 项目ID |
|||
*/ |
|||
private String projectId; |
|||
/** |
|||
* 项目的发布日期yyyyMMdd |
|||
*/ |
|||
private String dateId; |
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
/** |
|||
* 状态 |
|||
*/ |
|||
private String projectStatus; |
|||
/** |
|||
* resolved unresolved |
|||
* */ |
|||
private String isResolved; |
|||
|
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2022/3/15 10:43 上午 |
|||
* @DESC |
|||
*/ |
|||
@Data |
|||
public class DelPartyServiceCenterResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -2238226229442700788L; |
|||
|
|||
private String date; |
|||
private String matterId; |
|||
private String timeId; |
|||
private String startTime; |
|||
private String endTime; |
|||
private String centerName; |
|||
} |
@ -0,0 +1,105 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 备忘录-附件表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@Data |
|||
public class MemoAttachmentDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* REMIND_MSG.ID |
|||
*/ |
|||
private String remindMsgId; |
|||
|
|||
/** |
|||
* 文件名 |
|||
*/ |
|||
private String fileName; |
|||
|
|||
/** |
|||
* 附件名(uuid随机生成) |
|||
*/ |
|||
private String attachmentName; |
|||
|
|||
/** |
|||
* 文件大小,单位b |
|||
*/ |
|||
private Integer attachmentSize; |
|||
|
|||
/** |
|||
* 文件格式(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 duration; |
|||
|
|||
/** |
|||
* 排序字段 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
/** |
|||
* 删除标记 0:未删除,1:已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,80 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 备忘录-属性表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@Data |
|||
public class MemoAttrDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 提醒时间 |
|||
*/ |
|||
private Date remindTime; |
|||
|
|||
/** |
|||
* 业务类型 人员关怀:concern;难点堵点:difficulty;工作日志:work_diary |
|||
*/ |
|||
private String type; |
|||
|
|||
/** |
|||
* 阅读标记1 已读;0未读 |
|||
*/ |
|||
private Integer readFlag; |
|||
|
|||
/** |
|||
* 接收人ID |
|||
*/ |
|||
private String receiver; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,105 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 备忘录-人文关怀 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@Data |
|||
public class MemoConcernDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识(同memo_attr表Id) |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 关怀类型 |
|||
*/ |
|||
private String concernType; |
|||
|
|||
/** |
|||
* 关怀对象 |
|||
*/ |
|||
private String resiName; |
|||
|
|||
/** |
|||
* 关怀对象电话 |
|||
*/ |
|||
private String phnoe; |
|||
|
|||
/** |
|||
* 关怀对象地址 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 关怀事项 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 计划执行时间 |
|||
*/ |
|||
private Date scheduledTime; |
|||
|
|||
/** |
|||
* 实际执行时间 |
|||
*/ |
|||
private Date actualTime; |
|||
|
|||
/** |
|||
* 状态 0未完成 1已完成 |
|||
*/ |
|||
private Integer status; |
|||
|
|||
/** |
|||
* 提醒时间 |
|||
*/ |
|||
private Date remindTime; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 操作人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,85 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 备忘录-难点读点 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@Data |
|||
public class MemoDifficultyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识(同memo_attr表Id) |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 解决方式 |
|||
*/ |
|||
private String resolveWay; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
/** |
|||
* 计划执行时间 |
|||
*/ |
|||
private Date scheduledTime; |
|||
|
|||
/** |
|||
* 提醒时间 |
|||
*/ |
|||
private Date remindTime; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,75 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 备忘录-工作日志 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@Data |
|||
public class MemoWorkDiaryDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 唯一标识(同memo_attr表Id) |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 工作事项 |
|||
*/ |
|||
private String workType; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 提醒时间 |
|||
*/ |
|||
private Date remindTime; |
|||
|
|||
/** |
|||
* 删除标识:0.未删除 1.已删除 |
|||
*/ |
|||
private String 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.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.dto.MemoAttachmentDTO; |
|||
import com.epmet.service.MemoAttachmentService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 备忘录-附件表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("memoAttachment") |
|||
public class MemoAttachmentController { |
|||
|
|||
@Autowired |
|||
private MemoAttachmentService memoAttachmentService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<MemoAttachmentDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<MemoAttachmentDTO> page = memoAttachmentService.page(params); |
|||
return new Result<PageData<MemoAttachmentDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
|||
public Result<MemoAttachmentDTO> get(@PathVariable("id") String id){ |
|||
MemoAttachmentDTO data = memoAttachmentService.get(id); |
|||
return new Result<MemoAttachmentDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result save(@RequestBody MemoAttachmentDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
memoAttachmentService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody MemoAttachmentDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
memoAttachmentService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("delete") |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
memoAttachmentService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -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.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.dto.MemoAttrDTO; |
|||
import com.epmet.service.MemoAttrService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 备忘录-属性表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("memoAttr") |
|||
public class MemoAttrController { |
|||
|
|||
@Autowired |
|||
private MemoAttrService memoAttrService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<MemoAttrDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<MemoAttrDTO> page = memoAttrService.page(params); |
|||
return new Result<PageData<MemoAttrDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
|||
public Result<MemoAttrDTO> get(@PathVariable("id") String id){ |
|||
MemoAttrDTO data = memoAttrService.get(id); |
|||
return new Result<MemoAttrDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result save(@RequestBody MemoAttrDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
memoAttrService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody MemoAttrDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
memoAttrService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("delete") |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
memoAttrService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -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.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.dto.MemoConcernDTO; |
|||
import com.epmet.service.MemoConcernService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 备忘录-人文关怀 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("memoConcern") |
|||
public class MemoConcernController { |
|||
|
|||
@Autowired |
|||
private MemoConcernService memoConcernService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<MemoConcernDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<MemoConcernDTO> page = memoConcernService.page(params); |
|||
return new Result<PageData<MemoConcernDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
|||
public Result<MemoConcernDTO> get(@PathVariable("id") String id){ |
|||
MemoConcernDTO data = memoConcernService.get(id); |
|||
return new Result<MemoConcernDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result save(@RequestBody MemoConcernDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
memoConcernService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody MemoConcernDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
memoConcernService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("delete") |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
memoConcernService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -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.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.dto.MemoDifficultyDTO; |
|||
import com.epmet.service.MemoDifficultyService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 备忘录-难点读点 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("memoDifficulty") |
|||
public class MemoDifficultyController { |
|||
|
|||
@Autowired |
|||
private MemoDifficultyService memoDifficultyService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<MemoDifficultyDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<MemoDifficultyDTO> page = memoDifficultyService.page(params); |
|||
return new Result<PageData<MemoDifficultyDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
|||
public Result<MemoDifficultyDTO> get(@PathVariable("id") String id){ |
|||
MemoDifficultyDTO data = memoDifficultyService.get(id); |
|||
return new Result<MemoDifficultyDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result save(@RequestBody MemoDifficultyDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
memoDifficultyService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody MemoDifficultyDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
memoDifficultyService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("delete") |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
memoDifficultyService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -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.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.dto.MemoWorkDiaryDTO; |
|||
import com.epmet.service.MemoWorkDiaryService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 备忘录-工作日志 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("memoWorkDiary") |
|||
public class MemoWorkDiaryController { |
|||
|
|||
@Autowired |
|||
private MemoWorkDiaryService memoWorkDiaryService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<MemoWorkDiaryDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<MemoWorkDiaryDTO> page = memoWorkDiaryService.page(params); |
|||
return new Result<PageData<MemoWorkDiaryDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
|||
public Result<MemoWorkDiaryDTO> get(@PathVariable("id") String id){ |
|||
MemoWorkDiaryDTO data = memoWorkDiaryService.get(id); |
|||
return new Result<MemoWorkDiaryDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result save(@RequestBody MemoWorkDiaryDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
memoWorkDiaryService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody MemoWorkDiaryDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
memoWorkDiaryService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("delete") |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
memoWorkDiaryService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.MemoAttachmentEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 备忘录-附件表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@Mapper |
|||
public interface MemoAttachmentDao extends BaseDao<MemoAttachmentEntity> { |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.MemoAttrEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 备忘录-属性表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@Mapper |
|||
public interface MemoAttrDao extends BaseDao<MemoAttrEntity> { |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.MemoConcernEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 备忘录-人文关怀 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@Mapper |
|||
public interface MemoConcernDao extends BaseDao<MemoConcernEntity> { |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.MemoDifficultyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 备忘录-难点读点 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@Mapper |
|||
public interface MemoDifficultyDao extends BaseDao<MemoDifficultyEntity> { |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.MemoWorkDiaryEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 备忘录-工作日志 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@Mapper |
|||
public interface MemoWorkDiaryDao extends BaseDao<MemoWorkDiaryEntity> { |
|||
|
|||
} |
@ -0,0 +1,71 @@ |
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 备忘录-附件表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("memo_attachment") |
|||
public class MemoAttachmentEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* REMIND_MSG.ID |
|||
*/ |
|||
private String remindMsgId; |
|||
|
|||
/** |
|||
* 文件名 |
|||
*/ |
|||
private String fileName; |
|||
|
|||
/** |
|||
* 附件名(uuid随机生成) |
|||
*/ |
|||
private String attachmentName; |
|||
|
|||
/** |
|||
* 文件大小,单位b |
|||
*/ |
|||
private Integer attachmentSize; |
|||
|
|||
/** |
|||
* 文件格式(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 duration; |
|||
|
|||
/** |
|||
* 排序字段 |
|||
*/ |
|||
private Integer sort; |
|||
|
|||
} |
@ -0,0 +1,48 @@ |
|||
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-03-15 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("memo_attr") |
|||
public class MemoAttrEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 提醒时间 |
|||
*/ |
|||
private Date remindTime; |
|||
|
|||
/** |
|||
* 业务类型 人员关怀:concern;难点堵点:difficulty;工作日志:work_diary |
|||
*/ |
|||
private String type; |
|||
|
|||
/** |
|||
* 阅读标记1 已读;0未读 |
|||
*/ |
|||
private Integer readFlag; |
|||
|
|||
/** |
|||
* 接收人ID |
|||
*/ |
|||
private String receiver; |
|||
|
|||
} |
@ -0,0 +1,73 @@ |
|||
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-03-15 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("memo_concern") |
|||
public class MemoConcernEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 关怀类型 |
|||
*/ |
|||
private String concernType; |
|||
|
|||
/** |
|||
* 关怀对象 |
|||
*/ |
|||
private String resiName; |
|||
|
|||
/** |
|||
* 关怀对象电话 |
|||
*/ |
|||
private String phnoe; |
|||
|
|||
/** |
|||
* 关怀对象地址 |
|||
*/ |
|||
private String address; |
|||
|
|||
/** |
|||
* 关怀事项 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 计划执行时间 |
|||
*/ |
|||
private Date scheduledTime; |
|||
|
|||
/** |
|||
* 实际执行时间 |
|||
*/ |
|||
private Date actualTime; |
|||
|
|||
/** |
|||
* 状态 0未完成 1已完成 |
|||
*/ |
|||
private Integer status; |
|||
|
|||
/** |
|||
* 提醒时间 |
|||
*/ |
|||
private Date remindTime; |
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
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-03-15 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("memo_difficulty") |
|||
public class MemoDifficultyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 解决方式 |
|||
*/ |
|||
private String resolveWay; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
/** |
|||
* 计划执行时间 |
|||
*/ |
|||
private Date scheduledTime; |
|||
|
|||
/** |
|||
* 提醒时间 |
|||
*/ |
|||
private Date remindTime; |
|||
|
|||
} |
@ -0,0 +1,43 @@ |
|||
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-03-15 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("memo_work_diary") |
|||
public class MemoWorkDiaryEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 工作事项 |
|||
*/ |
|||
private String workType; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 提醒时间 |
|||
*/ |
|||
private Date remindTime; |
|||
|
|||
} |
@ -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.MemoAttachmentDTO; |
|||
import com.epmet.entity.MemoAttachmentEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 备忘录-附件表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
public interface MemoAttachmentService extends BaseService<MemoAttachmentEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<MemoAttachmentDTO> |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
PageData<MemoAttachmentDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<MemoAttachmentDTO> |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
List<MemoAttachmentDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return MemoAttachmentDTO |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
MemoAttachmentDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
void save(MemoAttachmentDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
void update(MemoAttachmentDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
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.MemoAttrDTO; |
|||
import com.epmet.entity.MemoAttrEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 备忘录-属性表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
public interface MemoAttrService extends BaseService<MemoAttrEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<MemoAttrDTO> |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
PageData<MemoAttrDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<MemoAttrDTO> |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
List<MemoAttrDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return MemoAttrDTO |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
MemoAttrDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
void save(MemoAttrDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
void update(MemoAttrDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
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.MemoConcernDTO; |
|||
import com.epmet.entity.MemoConcernEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 备忘录-人文关怀 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
public interface MemoConcernService extends BaseService<MemoConcernEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<MemoConcernDTO> |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
PageData<MemoConcernDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<MemoConcernDTO> |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
List<MemoConcernDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return MemoConcernDTO |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
MemoConcernDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
void save(MemoConcernDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
void update(MemoConcernDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
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.MemoDifficultyDTO; |
|||
import com.epmet.entity.MemoDifficultyEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 备忘录-难点读点 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
public interface MemoDifficultyService extends BaseService<MemoDifficultyEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<MemoDifficultyDTO> |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
PageData<MemoDifficultyDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<MemoDifficultyDTO> |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
List<MemoDifficultyDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return MemoDifficultyDTO |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
MemoDifficultyDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
void save(MemoDifficultyDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
void update(MemoDifficultyDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
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.MemoWorkDiaryDTO; |
|||
import com.epmet.entity.MemoWorkDiaryEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 备忘录-工作日志 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-03-15 |
|||
*/ |
|||
public interface MemoWorkDiaryService extends BaseService<MemoWorkDiaryEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<MemoWorkDiaryDTO> |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
PageData<MemoWorkDiaryDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<MemoWorkDiaryDTO> |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
List<MemoWorkDiaryDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return MemoWorkDiaryDTO |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
MemoWorkDiaryDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
void save(MemoWorkDiaryDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
void update(MemoWorkDiaryDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-03-15 |
|||
*/ |
|||
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.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.MemoAttachmentDao; |
|||
import com.epmet.dto.MemoAttachmentDTO; |
|||
import com.epmet.entity.MemoAttachmentEntity; |
|||
import com.epmet.service.MemoAttachmentService; |
|||
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 2022-03-15 |
|||
*/ |
|||
@Service |
|||
public class MemoAttachmentServiceImpl extends BaseServiceImpl<MemoAttachmentDao, MemoAttachmentEntity> implements MemoAttachmentService { |
|||
|
|||
|
|||
@Override |
|||
public PageData<MemoAttachmentDTO> page(Map<String, Object> params) { |
|||
IPage<MemoAttachmentEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, MemoAttachmentDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<MemoAttachmentDTO> list(Map<String, Object> params) { |
|||
List<MemoAttachmentEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, MemoAttachmentDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<MemoAttachmentEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<MemoAttachmentEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public MemoAttachmentDTO get(String id) { |
|||
MemoAttachmentEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, MemoAttachmentDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(MemoAttachmentDTO dto) { |
|||
MemoAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttachmentEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(MemoAttachmentDTO dto) { |
|||
MemoAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttachmentEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(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.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.MemoAttrDao; |
|||
import com.epmet.dto.MemoAttrDTO; |
|||
import com.epmet.entity.MemoAttrEntity; |
|||
import com.epmet.service.MemoAttrService; |
|||
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 2022-03-15 |
|||
*/ |
|||
@Service |
|||
public class MemoAttrServiceImpl extends BaseServiceImpl<MemoAttrDao, MemoAttrEntity> implements MemoAttrService { |
|||
|
|||
|
|||
@Override |
|||
public PageData<MemoAttrDTO> page(Map<String, Object> params) { |
|||
IPage<MemoAttrEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, MemoAttrDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<MemoAttrDTO> list(Map<String, Object> params) { |
|||
List<MemoAttrEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, MemoAttrDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<MemoAttrEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<MemoAttrEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public MemoAttrDTO get(String id) { |
|||
MemoAttrEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, MemoAttrDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(MemoAttrDTO dto) { |
|||
MemoAttrEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttrEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(MemoAttrDTO dto) { |
|||
MemoAttrEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttrEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(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.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.MemoConcernDao; |
|||
import com.epmet.dto.MemoConcernDTO; |
|||
import com.epmet.entity.MemoConcernEntity; |
|||
import com.epmet.service.MemoConcernService; |
|||
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 2022-03-15 |
|||
*/ |
|||
@Service |
|||
public class MemoConcernServiceImpl extends BaseServiceImpl<MemoConcernDao, MemoConcernEntity> implements MemoConcernService { |
|||
|
|||
|
|||
@Override |
|||
public PageData<MemoConcernDTO> page(Map<String, Object> params) { |
|||
IPage<MemoConcernEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, MemoConcernDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<MemoConcernDTO> list(Map<String, Object> params) { |
|||
List<MemoConcernEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, MemoConcernDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<MemoConcernEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<MemoConcernEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public MemoConcernDTO get(String id) { |
|||
MemoConcernEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, MemoConcernDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(MemoConcernDTO dto) { |
|||
MemoConcernEntity entity = ConvertUtils.sourceToTarget(dto, MemoConcernEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(MemoConcernDTO dto) { |
|||
MemoConcernEntity entity = ConvertUtils.sourceToTarget(dto, MemoConcernEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(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.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.MemoDifficultyDao; |
|||
import com.epmet.dto.MemoDifficultyDTO; |
|||
import com.epmet.entity.MemoDifficultyEntity; |
|||
import com.epmet.service.MemoDifficultyService; |
|||
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 2022-03-15 |
|||
*/ |
|||
@Service |
|||
public class MemoDifficultyServiceImpl extends BaseServiceImpl<MemoDifficultyDao, MemoDifficultyEntity> implements MemoDifficultyService { |
|||
|
|||
|
|||
@Override |
|||
public PageData<MemoDifficultyDTO> page(Map<String, Object> params) { |
|||
IPage<MemoDifficultyEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, MemoDifficultyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<MemoDifficultyDTO> list(Map<String, Object> params) { |
|||
List<MemoDifficultyEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, MemoDifficultyDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<MemoDifficultyEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<MemoDifficultyEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public MemoDifficultyDTO get(String id) { |
|||
MemoDifficultyEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, MemoDifficultyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(MemoDifficultyDTO dto) { |
|||
MemoDifficultyEntity entity = ConvertUtils.sourceToTarget(dto, MemoDifficultyEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(MemoDifficultyDTO dto) { |
|||
MemoDifficultyEntity entity = ConvertUtils.sourceToTarget(dto, MemoDifficultyEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(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.constant.FieldConstant; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dao.MemoWorkDiaryDao; |
|||
import com.epmet.dto.MemoWorkDiaryDTO; |
|||
import com.epmet.entity.MemoWorkDiaryEntity; |
|||
import com.epmet.service.MemoWorkDiaryService; |
|||
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 2022-03-15 |
|||
*/ |
|||
@Service |
|||
public class MemoWorkDiaryServiceImpl extends BaseServiceImpl<MemoWorkDiaryDao, MemoWorkDiaryEntity> implements MemoWorkDiaryService { |
|||
|
|||
|
|||
@Override |
|||
public PageData<MemoWorkDiaryDTO> page(Map<String, Object> params) { |
|||
IPage<MemoWorkDiaryEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, MemoWorkDiaryDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<MemoWorkDiaryDTO> list(Map<String, Object> params) { |
|||
List<MemoWorkDiaryEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, MemoWorkDiaryDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<MemoWorkDiaryEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<MemoWorkDiaryEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public MemoWorkDiaryDTO get(String id) { |
|||
MemoWorkDiaryEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, MemoWorkDiaryDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(MemoWorkDiaryDTO dto) { |
|||
MemoWorkDiaryEntity entity = ConvertUtils.sourceToTarget(dto, MemoWorkDiaryEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(MemoWorkDiaryDTO dto) { |
|||
MemoWorkDiaryEntity entity = ConvertUtils.sourceToTarget(dto, MemoWorkDiaryEntity.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.dao.MemoAttachmentDao"> |
|||
|
|||
|
|||
|
|||
</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.MemoAttrDao"> |
|||
|
|||
|
|||
|
|||
</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.MemoConcernDao"> |
|||
|
|||
|
|||
|
|||
</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.MemoDifficultyDao"> |
|||
|
|||
|
|||
|
|||
</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.MemoWorkDiaryDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
Loading…
Reference in new issue