增加电话回访相关接口
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
This commit is contained in:
parent
ce6b4097b2
commit
506c936096
@ -172,4 +172,7 @@ public interface ErrorCodeConstants {
|
||||
// ========== 人员档案 1-002-030-000 ==========
|
||||
ErrorCode PERSON_NOT_EXISTS = new ErrorCode(1_002_030_000, "用户不存在");
|
||||
|
||||
// ========== 电话回访记录 1-002-031-000 ==========
|
||||
ErrorCode RECORD_NOT_EXISTS = new ErrorCode(1_002_031_000, "电话回访记录不存在");
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,89 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.record;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.record.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.record.RecordDO;
|
||||
import cn.iocoder.yudao.module.system.service.record.RecordService;
|
||||
|
||||
@Tag(name = "管理后台 - 会员回访记录")
|
||||
@RestController
|
||||
@RequestMapping("/system/record")
|
||||
@Validated
|
||||
public class RecordController {
|
||||
|
||||
@Resource(name = "systemRecordService")
|
||||
private RecordService recordService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建会员回访记录")
|
||||
public CommonResult<Integer> createRecord(@Valid @RequestBody RecordSaveReqVO createReqVO) {
|
||||
return success(recordService.createRecord(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新会员回访记录")
|
||||
public CommonResult<Boolean> updateRecord(@Valid @RequestBody RecordSaveReqVO updateReqVO) {
|
||||
recordService.updateRecord(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除会员回访记录")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
public CommonResult<Boolean> deleteRecord(@RequestParam("id") Integer id) {
|
||||
recordService.deleteRecord(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得会员回访记录")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<RecordRespVO> getRecord(@RequestParam("id") Integer id) {
|
||||
RecordDO record = recordService.getRecord(id);
|
||||
return success(BeanUtils.toBean(record, RecordRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得会员回访记录分页")
|
||||
public CommonResult<PageResult<RecordRespVO>> getRecordPage(@Valid RecordPageReqVO pageReqVO) {
|
||||
PageResult<RecordDO> pageResult = recordService.getRecordPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, RecordRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出会员回访记录 Excel")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportRecordExcel(@Valid RecordPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<RecordDO> list = recordService.getRecordPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "会员回访记录.xls", "数据", RecordRespVO.class,
|
||||
BeanUtils.toBean(list, RecordRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.record.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 会员回访记录分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class RecordPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "组织ID", example = "12205")
|
||||
private Integer orgid;
|
||||
|
||||
@Schema(description = "组织名称", example = "王五")
|
||||
private String orgname;
|
||||
|
||||
@Schema(description = "会员姓名", example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "手机号")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "回访状态:0-未回访,1-已回访", example = "1")
|
||||
private Integer visitstatus;
|
||||
|
||||
@Schema(description = "回访时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] visittime;
|
||||
|
||||
@Schema(description = "回访内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "回访结果:满意、一般、不满意")
|
||||
private String result;
|
||||
|
||||
@Schema(description = "下次回访时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] nextvisittime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updatetime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createby;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updateby;
|
||||
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.record.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 会员回访记录 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class RecordRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3955")
|
||||
@ExcelProperty("主键ID")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "组织ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12205")
|
||||
@ExcelProperty("组织ID")
|
||||
private Integer orgid;
|
||||
|
||||
@Schema(description = "组织名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@ExcelProperty("组织名称")
|
||||
private String orgname;
|
||||
|
||||
@Schema(description = "会员姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@ExcelProperty("会员姓名")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("手机号")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "回访状态:0-未回访,1-已回访", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("回访状态:0-未回访,1-已回访")
|
||||
private Integer visitstatus;
|
||||
|
||||
@Schema(description = "回访时间")
|
||||
@ExcelProperty("回访时间")
|
||||
private LocalDateTime visittime;
|
||||
|
||||
@Schema(description = "回访内容")
|
||||
@ExcelProperty("回访内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "回访结果:满意、一般、不满意")
|
||||
@ExcelProperty("回访结果:满意、一般、不满意")
|
||||
private String result;
|
||||
|
||||
@Schema(description = "下次回访时间")
|
||||
@ExcelProperty("下次回访时间")
|
||||
private LocalDateTime nextvisittime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updatetime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
@ExcelProperty("创建人")
|
||||
private String createby;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
@ExcelProperty("更新人")
|
||||
private String updateby;
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.record.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 会员回访记录新增/修改 Request VO")
|
||||
@Data
|
||||
public class RecordSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3955")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "组织ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12205")
|
||||
@NotNull(message = "组织ID不能为空")
|
||||
private Integer orgid;
|
||||
|
||||
@Schema(description = "组织名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@NotEmpty(message = "组织名称不能为空")
|
||||
private String orgname;
|
||||
|
||||
@Schema(description = "会员姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@NotEmpty(message = "会员姓名不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "手机号不能为空")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "回访状态:0-未回访,1-已回访", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "回访状态:0-未回访,1-已回访不能为空")
|
||||
private Integer visitstatus;
|
||||
|
||||
@Schema(description = "回访时间")
|
||||
private LocalDateTime visittime;
|
||||
|
||||
@Schema(description = "回访内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "回访结果:满意、一般、不满意")
|
||||
private String result;
|
||||
|
||||
@Schema(description = "下次回访时间")
|
||||
private LocalDateTime nextvisittime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updatetime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createby;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updateby;
|
||||
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.record;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 会员回访记录 DO
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@TableName("visit_record")
|
||||
@KeySequence("visit_record_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RecordDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 机构ID
|
||||
*/
|
||||
@TableField("orgid")
|
||||
private Integer orgid;
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
@TableField("orgname")
|
||||
private String orgname;
|
||||
/**
|
||||
* 会员姓名
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@TableField("phone")
|
||||
private String phone;
|
||||
/**
|
||||
* 回访状态:0-未回访,1-已回访
|
||||
*/
|
||||
@TableField("visitstatus")
|
||||
private Integer visitstatus;
|
||||
/**
|
||||
* 回访时间
|
||||
*/
|
||||
@TableField("visittime")
|
||||
private LocalDateTime visittime;
|
||||
/**
|
||||
* 回访内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
/**
|
||||
* 回访结果:满意、一般、不满意
|
||||
*/
|
||||
@TableField("result")
|
||||
private String result;
|
||||
/**
|
||||
* 下次回访时间
|
||||
*/
|
||||
@TableField("nextvisittime")
|
||||
private LocalDateTime nextvisittime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("createtime")
|
||||
private LocalDateTime createtime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("updatetime")
|
||||
private LocalDateTime updatetime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("createby")
|
||||
private String createby;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updateby")
|
||||
private String updateby;
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.record;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.record.RecordDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.record.vo.*;
|
||||
|
||||
/**
|
||||
* 会员回访记录 Mapper
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@Mapper
|
||||
public interface RecordMapper extends BaseMapperX<RecordDO> {
|
||||
|
||||
default PageResult<RecordDO> selectPage(RecordPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<RecordDO>()
|
||||
.eqIfPresent(RecordDO::getOrgid, reqVO.getOrgid())
|
||||
.likeIfPresent(RecordDO::getOrgname, reqVO.getOrgname())
|
||||
.likeIfPresent(RecordDO::getName, reqVO.getName())
|
||||
.eqIfPresent(RecordDO::getPhone, reqVO.getPhone())
|
||||
.eqIfPresent(RecordDO::getVisitstatus, reqVO.getVisitstatus())
|
||||
.betweenIfPresent(RecordDO::getVisittime, reqVO.getVisittime())
|
||||
.eqIfPresent(RecordDO::getContent, reqVO.getContent())
|
||||
.eqIfPresent(RecordDO::getResult, reqVO.getResult())
|
||||
.betweenIfPresent(RecordDO::getNextvisittime, reqVO.getNextvisittime())
|
||||
.betweenIfPresent(RecordDO::getCreatetime, reqVO.getCreatetime())
|
||||
.betweenIfPresent(RecordDO::getUpdatetime, reqVO.getUpdatetime())
|
||||
.eqIfPresent(RecordDO::getCreateby, reqVO.getCreateby())
|
||||
.eqIfPresent(RecordDO::getUpdateby, reqVO.getUpdateby())
|
||||
.orderByDesc(RecordDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.system.service.record;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.record.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.record.RecordDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 会员回访记录 Service 接口
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
public interface RecordService {
|
||||
|
||||
/**
|
||||
* 创建会员回访记录
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createRecord(@Valid RecordSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新会员回访记录
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateRecord(@Valid RecordSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除会员回访记录
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteRecord(Integer id);
|
||||
|
||||
/**
|
||||
* 获得会员回访记录
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 会员回访记录
|
||||
*/
|
||||
RecordDO getRecord(Integer id);
|
||||
|
||||
/**
|
||||
* 获得会员回访记录分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 会员回访记录分页
|
||||
*/
|
||||
PageResult<RecordDO> getRecordPage(RecordPageReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package cn.iocoder.yudao.module.system.service.record;
|
||||
|
||||
import com.alibaba.druid.wall.violation.ErrorCode;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.record.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.record.RecordDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.mysql.record.RecordMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 会员回访记录 Service 实现类
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@Service("systemRecordService")
|
||||
@Validated
|
||||
public class RecordServiceImpl implements RecordService {
|
||||
|
||||
@Resource
|
||||
private RecordMapper recordMapper;
|
||||
|
||||
@Override
|
||||
public Integer createRecord(RecordSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
RecordDO record = BeanUtils.toBean(createReqVO, RecordDO.class);
|
||||
recordMapper.insert(record);
|
||||
// 返回
|
||||
return record.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateRecord(RecordSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateRecordExists(updateReqVO.getId());
|
||||
// 更新
|
||||
RecordDO updateObj = BeanUtils.toBean(updateReqVO, RecordDO.class);
|
||||
recordMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRecord(Integer id) {
|
||||
// 校验存在
|
||||
validateRecordExists(id);
|
||||
// 删除
|
||||
recordMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateRecordExists(Integer id) {
|
||||
if (recordMapper.selectById(id) == null) {
|
||||
throw exception(RECORD_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecordDO getRecord(Integer id) {
|
||||
return recordMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<RecordDO> getRecordPage(RecordPageReqVO pageReqVO) {
|
||||
return recordMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?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="cn.iocoder.yudao.module.system.dal.mysql.record.RecordMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
@ -280,6 +280,7 @@ yudao:
|
||||
ignore-tables:
|
||||
- tb_person_archive # 忽略人员档案表
|
||||
- tb_user # 忽略小程序用户表
|
||||
- visit_record # 忽略电话回访记录表
|
||||
ignore-caches:
|
||||
- user_role_ids
|
||||
- permission_menu_ids
|
||||
|
Loading…
Reference in New Issue
Block a user