咨询档案和客诉档案

new
@zhu-yuefeng 1 year ago
parent 3152eeb974
commit e7077ab836

@ -0,0 +1,102 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation;
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.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
import cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo.*;
import cn.iocoder.yudao.module.ea.dal.dataobject.electronicconsultation.ElectronicConsultationDO;
import cn.iocoder.yudao.module.ea.convert.electronicconsultation.ElectronicConsultationConvert;
import cn.iocoder.yudao.module.ea.service.electronicconsultation.ElectronicConsultationService;
@Tag(name = "管理后台 - 咨询档案")
@RestController
@RequestMapping("/ea/electronic-consultation")
@Validated
public class ElectronicConsultationController {
@Resource
private ElectronicConsultationService electronicConsultationService;
@PostMapping("/create")
@Operation(summary = "创建咨询档案")
@PreAuthorize("@ss.hasPermission('ea:electronic-consultation:create')")
public CommonResult<Long> createElectronicConsultation(@Valid @RequestBody ElectronicConsultationCreateReqVO createReqVO) {
return success(electronicConsultationService.createElectronicConsultation(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新咨询档案")
@PreAuthorize("@ss.hasPermission('ea:electronic-consultation:update')")
public CommonResult<Boolean> updateElectronicConsultation(@Valid @RequestBody ElectronicConsultationUpdateReqVO updateReqVO) {
electronicConsultationService.updateElectronicConsultation(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除咨询档案")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('ea:electronic-consultation:delete')")
public CommonResult<Boolean> deleteElectronicConsultation(@RequestParam("id") Long id) {
electronicConsultationService.deleteElectronicConsultation(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得咨询档案")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('ea:electronic-consultation:query')")
public CommonResult<ElectronicConsultationRespVO> getElectronicConsultation(@RequestParam("id") Long id) {
ElectronicConsultationDO electronicConsultation = electronicConsultationService.getElectronicConsultation(id);
return success(ElectronicConsultationConvert.INSTANCE.convert(electronicConsultation));
}
@GetMapping("/list")
@Operation(summary = "获得咨询档案列表")
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
@PreAuthorize("@ss.hasPermission('ea:electronic-consultation:query')")
public CommonResult<List<ElectronicConsultationRespVO>> getElectronicConsultationList(@RequestParam("ids") Collection<Long> ids) {
List<ElectronicConsultationDO> list = electronicConsultationService.getElectronicConsultationList(ids);
return success(ElectronicConsultationConvert.INSTANCE.convertList(list));
}
@GetMapping("/page")
@Operation(summary = "获得咨询档案分页")
@PreAuthorize("@ss.hasPermission('ea:electronic-consultation:query')")
public CommonResult<PageResult<ElectronicConsultationRespVO>> getElectronicConsultationPage(@Valid ElectronicConsultationPageReqVO pageVO) {
PageResult<ElectronicConsultationDO> pageResult = electronicConsultationService.getElectronicConsultationPage(pageVO);
return success(ElectronicConsultationConvert.INSTANCE.convertPage(pageResult));
}
@GetMapping("/export-excel")
@Operation(summary = "导出咨询档案 Excel")
@PreAuthorize("@ss.hasPermission('ea:electronic-consultation:export')")
@OperateLog(type = EXPORT)
public void exportElectronicConsultationExcel(@Valid ElectronicConsultationExportReqVO exportReqVO,
HttpServletResponse response) throws IOException {
List<ElectronicConsultationDO> list = electronicConsultationService.getElectronicConsultationList(exportReqVO);
// 导出 Excel
List<ElectronicConsultationExcelVO> datas = ElectronicConsultationConvert.INSTANCE.convertList02(list);
ExcelUtils.write(response, "咨询档案.xls", "数据", ElectronicConsultationExcelVO.class, datas);
}
}

@ -0,0 +1,81 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* Base VO VO 使
* VO Swagger
*/
@Data
public class ElectronicConsultationBaseVO {
@Schema(description = "制单人 ")
private String createBy;
@Schema(description = "业务实体 ")
private String company;
@Schema(description = "所属部门 ")
private String systemDept;
@Schema(description = "咨询编号 ", example = "17683")
private String consultationId;
@Schema(description = "咨询类型 ", example = "1")
private String consultationType;
@Schema(description = "咨询标题 ")
private String consultationTitle;
@Schema(description = "咨询内容 ")
private String consultationContent;
@Schema(description = "咨询人 ", example = "赵六")
private String consultorName;
@Schema(description = "咨询时间 ")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime consultationTime;
@Schema(description = "处理人员 ")
private String handler;
@Schema(description = "处理日期 ")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime handleTime;
@Schema(description = "处理结果 ")
private String handleResult;
@Schema(description = "年度 ")
private String year;
@Schema(description = "月份 ")
private String period;
@Schema(description = "借阅状态 ", example = "2")
private String borrowStatus;
@Schema(description = "归档时间 ")
private String recordTime;
@Schema(description = "纸档位置 ")
private String position;
@Schema(description = "完整性 ")
private Integer cherks;
@Schema(description = "归档状态", example = "2")
private String fileStatus;
}

@ -0,0 +1,14 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 咨询档案创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ElectronicConsultationCreateReqVO extends ElectronicConsultationBaseVO {
}

@ -0,0 +1,84 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.ExcelProperty;
/**
* Excel VO
*
* @author
*/
@Data
public class ElectronicConsultationExcelVO {
@ExcelProperty("主键 ")
private Long id;
@ExcelProperty("制单人 ")
private String createBy;
@ExcelProperty("创建日期 ")
private LocalDateTime createTime;
@ExcelProperty("业务实体 ")
private String company;
@ExcelProperty("所属部门 ")
private String systemDept;
@ExcelProperty("咨询编号 ")
private String consultationId;
@ExcelProperty("咨询类型 ")
private String consultationType;
@ExcelProperty("咨询标题 ")
private String consultationTitle;
@ExcelProperty("咨询内容 ")
private String consultationContent;
@ExcelProperty("咨询人 ")
private String consultorName;
@ExcelProperty("咨询时间 ")
private LocalDateTime consultationTime;
@ExcelProperty("处理人员 ")
private String handler;
@ExcelProperty("处理日期 ")
private LocalDateTime handleTime;
@ExcelProperty("处理结果 ")
private String handleResult;
@ExcelProperty("年度 ")
private String year;
@ExcelProperty("月份 ")
private String period;
@ExcelProperty("借阅状态 ")
private String borrowStatus;
@ExcelProperty("归档时间 ")
private String recordTime;
@ExcelProperty("纸档位置 ")
private String position;
@ExcelProperty("完整性 ")
private Integer cherks;
@ExcelProperty("归档状态")
private String fileStatus;
}

@ -0,0 +1,80 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 咨询档案 Excel 导出 Request VO参数和 ElectronicConsultationPageReqVO 是一致的")
@Data
public class ElectronicConsultationExportReqVO {
@Schema(description = "制单人 ")
private String createBy;
@Schema(description = "创建日期 ")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "业务实体 ")
private String company;
@Schema(description = "所属部门 ")
private String systemDept;
@Schema(description = "咨询编号 ", example = "17683")
private String consultationId;
@Schema(description = "咨询类型 ", example = "1")
private String consultationType;
@Schema(description = "咨询标题 ")
private String consultationTitle;
@Schema(description = "咨询内容 ")
private String consultationContent;
@Schema(description = "咨询人 ", example = "赵六")
private String consultorName;
@Schema(description = "咨询时间 ")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] consultationTime;
@Schema(description = "处理人员 ")
private String handler;
@Schema(description = "处理日期 ")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] handleTime;
@Schema(description = "处理结果 ")
private String handleResult;
@Schema(description = "年度 ")
private String year;
@Schema(description = "月份 ")
private String period;
@Schema(description = "借阅状态 ", example = "2")
private String borrowStatus;
@Schema(description = "归档时间 ")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private String[] recordTime;
@Schema(description = "纸档位置 ")
private String position;
@Schema(description = "完整性 ")
private Integer cherks;
@Schema(description = "归档状态", example = "2")
private String fileStatus;
}

@ -0,0 +1,82 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.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 ElectronicConsultationPageReqVO extends PageParam {
@Schema(description = "制单人 ")
private String createBy;
@Schema(description = "创建日期 ")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "业务实体 ")
private String company;
@Schema(description = "所属部门 ")
private String systemDept;
@Schema(description = "咨询编号 ", example = "17683")
private String consultationId;
@Schema(description = "咨询类型 ", example = "1")
private String consultationType;
@Schema(description = "咨询标题 ")
private String consultationTitle;
@Schema(description = "咨询内容 ")
private String consultationContent;
@Schema(description = "咨询人 ", example = "赵六")
private String consultorName;
@Schema(description = "咨询时间 ")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] consultationTime;
@Schema(description = "处理人员 ")
private String handler;
@Schema(description = "处理日期 ")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] handleTime;
@Schema(description = "处理结果 ")
private String handleResult;
@Schema(description = "年度 ")
private String year;
@Schema(description = "月份 ")
private String period;
@Schema(description = "借阅状态 ", example = "2")
private String borrowStatus;
@Schema(description = "归档时间 ")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private String[] recordTime;
@Schema(description = "纸档位置 ")
private String position;
@Schema(description = "完整性 ")
private Integer cherks;
@Schema(description = "归档状态", example = "2")
private String fileStatus;
}

@ -0,0 +1,19 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 咨询档案 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ElectronicConsultationRespVO extends ElectronicConsultationBaseVO {
@Schema(description = "主键 ", requiredMode = Schema.RequiredMode.REQUIRED, example = "19295")
private Long id;
@Schema(description = "创建日期 ")
private LocalDateTime createTime;
}

@ -0,0 +1,18 @@
package cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 咨询档案更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ElectronicConsultationUpdateReqVO extends ElectronicConsultationBaseVO {
@Schema(description = "主键 ", requiredMode = Schema.RequiredMode.REQUIRED, example = "19295")
@NotNull(message = "主键 不能为空")
private Long id;
}

@ -0,0 +1,102 @@
package cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint;
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.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
import cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.vo.*;
import cn.iocoder.yudao.module.ea.dal.dataobject.electroniccustomercomplaint.ElectronicCustomerComplaintDO;
import cn.iocoder.yudao.module.ea.convert.electroniccustomercomplaint.ElectronicCustomerComplaintConvert;
import cn.iocoder.yudao.module.ea.service.electroniccustomercomplaint.ElectronicCustomerComplaintService;
@Tag(name = "管理后台 - 客诉档案")
@RestController
@RequestMapping("/ea/electronic-customer-complaint")
@Validated
public class ElectronicCustomerComplaintController {
@Resource
private ElectronicCustomerComplaintService electronicCustomerComplaintService;
@PostMapping("/create")
@Operation(summary = "创建客诉档案")
@PreAuthorize("@ss.hasPermission('ea:electronic-customer-complaint:create')")
public CommonResult<Long> createElectronicCustomerComplaint(@Valid @RequestBody ElectronicCustomerComplaintCreateReqVO createReqVO) {
return success(electronicCustomerComplaintService.createElectronicCustomerComplaint(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新客诉档案")
@PreAuthorize("@ss.hasPermission('ea:electronic-customer-complaint:update')")
public CommonResult<Boolean> updateElectronicCustomerComplaint(@Valid @RequestBody ElectronicCustomerComplaintUpdateReqVO updateReqVO) {
electronicCustomerComplaintService.updateElectronicCustomerComplaint(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除客诉档案")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('ea:electronic-customer-complaint:delete')")
public CommonResult<Boolean> deleteElectronicCustomerComplaint(@RequestParam("id") Long id) {
electronicCustomerComplaintService.deleteElectronicCustomerComplaint(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得客诉档案")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('ea:electronic-customer-complaint:query')")
public CommonResult<ElectronicCustomerComplaintRespVO> getElectronicCustomerComplaint(@RequestParam("id") Long id) {
ElectronicCustomerComplaintDO electronicCustomerComplaint = electronicCustomerComplaintService.getElectronicCustomerComplaint(id);
return success(ElectronicCustomerComplaintConvert.INSTANCE.convert(electronicCustomerComplaint));
}
@GetMapping("/list")
@Operation(summary = "获得客诉档案列表")
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
@PreAuthorize("@ss.hasPermission('ea:electronic-customer-complaint:query')")
public CommonResult<List<ElectronicCustomerComplaintRespVO>> getElectronicCustomerComplaintList(@RequestParam("ids") Collection<Long> ids) {
List<ElectronicCustomerComplaintDO> list = electronicCustomerComplaintService.getElectronicCustomerComplaintList(ids);
return success(ElectronicCustomerComplaintConvert.INSTANCE.convertList(list));
}
@GetMapping("/page")
@Operation(summary = "获得客诉档案分页")
@PreAuthorize("@ss.hasPermission('ea:electronic-customer-complaint:query')")
public CommonResult<PageResult<ElectronicCustomerComplaintRespVO>> getElectronicCustomerComplaintPage(@Valid ElectronicCustomerComplaintPageReqVO pageVO) {
PageResult<ElectronicCustomerComplaintDO> pageResult = electronicCustomerComplaintService.getElectronicCustomerComplaintPage(pageVO);
return success(ElectronicCustomerComplaintConvert.INSTANCE.convertPage(pageResult));
}
@GetMapping("/export-excel")
@Operation(summary = "导出客诉档案 Excel")
@PreAuthorize("@ss.hasPermission('ea:electronic-customer-complaint:export')")
@OperateLog(type = EXPORT)
public void exportElectronicCustomerComplaintExcel(@Valid ElectronicCustomerComplaintExportReqVO exportReqVO,
HttpServletResponse response) throws IOException {
List<ElectronicCustomerComplaintDO> list = electronicCustomerComplaintService.getElectronicCustomerComplaintList(exportReqVO);
// 导出 Excel
List<ElectronicCustomerComplaintExcelVO> datas = ElectronicCustomerComplaintConvert.INSTANCE.convertList02(list);
ExcelUtils.write(response, "客诉档案.xls", "数据", ElectronicCustomerComplaintExcelVO.class, datas);
}
}

@ -0,0 +1,81 @@
package cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* Base VO VO 使
* VO Swagger
*/
@Data
public class ElectronicCustomerComplaintBaseVO {
@Schema(description = " 制单人")
private String createBy;
@Schema(description = "业务实体")
private String company;
@Schema(description = "所属部门", example = "李四")
private String deptName;
@Schema(description = "客诉编号")
private String complaintCode;
@Schema(description = "客户名称", example = "李四")
private String customerName;
@Schema(description = "客户电话")
private String customerPhone;
@Schema(description = "客诉时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime complaintTime;
@Schema(description = "客诉类型", example = "1")
private String complaintType;
@Schema(description = "客诉内容")
private String complaintContent;
@Schema(description = "处理人")
private String handler;
@Schema(description = "处理时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime handleTime;
@Schema(description = "处理结果")
private String handleResult;
@Schema(description = "年度")
private String year;
@Schema(description = "月份")
private String period;
@Schema(description = "借阅状态", example = "1")
private String borrowStatus;
@Schema(description = "归档时间")
private String recordTime;
@Schema(description = "纸档位置")
private String position;
@Schema(description = "完整性")
private Integer cherks;
@Schema(description = "归档状态", example = "2")
private String fileStatus;
}

@ -0,0 +1,14 @@
package cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 客诉档案创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ElectronicCustomerComplaintCreateReqVO extends ElectronicCustomerComplaintBaseVO {
}

@ -0,0 +1,84 @@
package cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.ExcelProperty;
/**
* Excel VO
*
* @author
*/
@Data
public class ElectronicCustomerComplaintExcelVO {
@ExcelProperty("主键")
private Long id;
@ExcelProperty(" 制单人")
private String createBy;
@ExcelProperty("创建日期")
private LocalDateTime createTime;
@ExcelProperty("业务实体")
private String company;
@ExcelProperty("所属部门")
private String deptName;
@ExcelProperty("客诉编号")
private String complaintCode;
@ExcelProperty("客户名称")
private String customerName;
@ExcelProperty("客户电话")
private String customerPhone;
@ExcelProperty("客诉时间")
private LocalDateTime complaintTime;
@ExcelProperty("客诉类型")
private String complaintType;
@ExcelProperty("客诉内容")
private String complaintContent;
@ExcelProperty("处理人")
private String handler;
@ExcelProperty("处理时间")
private LocalDateTime handleTime;
@ExcelProperty("处理结果")
private String handleResult;
@ExcelProperty("年度")
private String year;
@ExcelProperty("月份")
private String period;
@ExcelProperty("借阅状态")
private String borrowStatus;
@ExcelProperty("归档时间")
private String recordTime;
@ExcelProperty("纸档位置")
private String position;
@ExcelProperty("完整性")
private Integer cherks;
@ExcelProperty("归档状态")
private String fileStatus;
}

@ -0,0 +1,80 @@
package cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 客诉档案 Excel 导出 Request VO参数和 ElectronicCustomerComplaintPageReqVO 是一致的")
@Data
public class ElectronicCustomerComplaintExportReqVO {
@Schema(description = " 制单人")
private String createBy;
@Schema(description = "创建日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "业务实体")
private String company;
@Schema(description = "所属部门", example = "李四")
private String deptName;
@Schema(description = "客诉编号")
private String complaintCode;
@Schema(description = "客户名称", example = "李四")
private String customerName;
@Schema(description = "客户电话")
private String customerPhone;
@Schema(description = "客诉时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] complaintTime;
@Schema(description = "客诉类型", example = "1")
private String complaintType;
@Schema(description = "客诉内容")
private String complaintContent;
@Schema(description = "处理人")
private String handler;
@Schema(description = "处理时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] handleTime;
@Schema(description = "处理结果")
private String handleResult;
@Schema(description = "年度")
private String year;
@Schema(description = "月份")
private String period;
@Schema(description = "借阅状态", example = "1")
private String borrowStatus;
@Schema(description = "归档时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private String[] recordTime;
@Schema(description = "纸档位置")
private String position;
@Schema(description = "完整性")
private Integer cherks;
@Schema(description = "归档状态", example = "2")
private String fileStatus;
}

@ -0,0 +1,82 @@
package cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.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 ElectronicCustomerComplaintPageReqVO extends PageParam {
@Schema(description = " 制单人")
private String createBy;
@Schema(description = "创建日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "业务实体")
private String company;
@Schema(description = "所属部门", example = "李四")
private String deptName;
@Schema(description = "客诉编号")
private String complaintCode;
@Schema(description = "客户名称", example = "李四")
private String customerName;
@Schema(description = "客户电话")
private String customerPhone;
@Schema(description = "客诉时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] complaintTime;
@Schema(description = "客诉类型", example = "1")
private String complaintType;
@Schema(description = "客诉内容")
private String complaintContent;
@Schema(description = "处理人")
private String handler;
@Schema(description = "处理时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] handleTime;
@Schema(description = "处理结果")
private String handleResult;
@Schema(description = "年度")
private String year;
@Schema(description = "月份")
private String period;
@Schema(description = "借阅状态", example = "1")
private String borrowStatus;
@Schema(description = "归档时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private String[] recordTime;
@Schema(description = "纸档位置")
private String position;
@Schema(description = "完整性")
private Integer cherks;
@Schema(description = "归档状态", example = "2")
private String fileStatus;
}

@ -0,0 +1,19 @@
package cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 客诉档案 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ElectronicCustomerComplaintRespVO extends ElectronicCustomerComplaintBaseVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15970")
private Long id;
@Schema(description = "创建日期")
private LocalDateTime createTime;
}

@ -0,0 +1,18 @@
package cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 客诉档案更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ElectronicCustomerComplaintUpdateReqVO extends ElectronicCustomerComplaintBaseVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15970")
@NotNull(message = "主键不能为空")
private Long id;
}

@ -0,0 +1,34 @@
package cn.iocoder.yudao.module.ea.convert.electronicconsultation;
import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo.*;
import cn.iocoder.yudao.module.ea.dal.dataobject.electronicconsultation.ElectronicConsultationDO;
/**
* Convert
*
* @author
*/
@Mapper
public interface ElectronicConsultationConvert {
ElectronicConsultationConvert INSTANCE = Mappers.getMapper(ElectronicConsultationConvert.class);
ElectronicConsultationDO convert(ElectronicConsultationCreateReqVO bean);
ElectronicConsultationDO convert(ElectronicConsultationUpdateReqVO bean);
ElectronicConsultationRespVO convert(ElectronicConsultationDO bean);
List<ElectronicConsultationRespVO> convertList(List<ElectronicConsultationDO> list);
PageResult<ElectronicConsultationRespVO> convertPage(PageResult<ElectronicConsultationDO> page);
List<ElectronicConsultationExcelVO> convertList02(List<ElectronicConsultationDO> list);
}

@ -0,0 +1,34 @@
package cn.iocoder.yudao.module.ea.convert.electroniccustomercomplaint;
import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.vo.*;
import cn.iocoder.yudao.module.ea.dal.dataobject.electroniccustomercomplaint.ElectronicCustomerComplaintDO;
/**
* Convert
*
* @author
*/
@Mapper
public interface ElectronicCustomerComplaintConvert {
ElectronicCustomerComplaintConvert INSTANCE = Mappers.getMapper(ElectronicCustomerComplaintConvert.class);
ElectronicCustomerComplaintDO convert(ElectronicCustomerComplaintCreateReqVO bean);
ElectronicCustomerComplaintDO convert(ElectronicCustomerComplaintUpdateReqVO bean);
ElectronicCustomerComplaintRespVO convert(ElectronicCustomerComplaintDO bean);
List<ElectronicCustomerComplaintRespVO> convertList(List<ElectronicCustomerComplaintDO> list);
PageResult<ElectronicCustomerComplaintRespVO> convertPage(PageResult<ElectronicCustomerComplaintDO> page);
List<ElectronicCustomerComplaintExcelVO> convertList02(List<ElectronicCustomerComplaintDO> list);
}

@ -0,0 +1,133 @@
package cn.iocoder.yudao.module.ea.dal.dataobject.electronicconsultation;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
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("electronic_consultation")
@KeySequence("electronic_consultation_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ElectronicConsultationDO extends BaseDO {
/**
*
*/
@TableId
private Long id;
/**
*
*/
private String createBy;
/**
* id
*/
private Long companyId;
/**
*
*/
private String company;
/**
* id
*/
private Long systemDeptId;
/**
*
*/
private String systemDept;
/**
*
*/
private String consultationId;
/**
*
*/
private String consultationType;
/**
*
*/
private String consultationTitle;
/**
*
*/
private String consultationContent;
/**
*
*/
private String consultorName;
/**
*
*/
private String consultorPhone;
/**
*
*/
private String consultorEmail;
/**
*
*/
private LocalDateTime consultationTime;
/**
*
*/
private String handler;
/**
*
*/
private LocalDateTime handleTime;
/**
*
*/
private String handleResult;
/**
*
*/
private String year;
/**
*
*/
private String period;
/**
*
*/
private String borrowStatus;
/**
*
*/
private String recordTime;
/**
*
*/
private String position;
/**
*
*/
private Integer cherks;
/**
* id
*/
private Long recordId;
/**
* id
*/
private Long userId;
/**
*
*/
private String fileStatus;
}

@ -0,0 +1,129 @@
package cn.iocoder.yudao.module.ea.dal.dataobject.electroniccustomercomplaint;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
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("electronic_customer_complaint")
@KeySequence("electronic_customer_complaint_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ElectronicCustomerComplaintDO extends BaseDO {
/**
*
*/
@TableId
private Long id;
/**
*
*/
private String createBy;
/**
* id
*/
private Long companyId;
/**
*
*/
private String company;
/**
* id
*/
private Long deptId;
/**
*
*/
private String deptName;
/**
*
*/
private String complaintCode;
/**
*
*/
private String customerName;
/**
*
*/
private String customerPhone;
/**
*
*/
private String customerEmail;
/**
*
*/
private LocalDateTime complaintTime;
/**
*
*/
private String complaintType;
/**
*
*/
private String complaintContent;
/**
*
*/
private String handler;
/**
*
*/
private LocalDateTime handleTime;
/**
*
*/
private String handleResult;
/**
*
*/
private String year;
/**
*
*/
private String period;
/**
*
*/
private String borrowStatus;
/**
*
*/
private String recordTime;
/**
*
*/
private String position;
/**
*
*/
private Integer cherks;
/**
* id
*/
private Long userId;
/**
* id
*/
private Long recordId;
/**
*
*/
private String fileStatus;
}

@ -0,0 +1,70 @@
package cn.iocoder.yudao.module.ea.dal.mysql.electronicconsultation;
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.ea.dal.dataobject.electronicconsultation.ElectronicConsultationDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo.*;
/**
* Mapper
*
* @author
*/
@Mapper
public interface ElectronicConsultationMapper extends BaseMapperX<ElectronicConsultationDO> {
default PageResult<ElectronicConsultationDO> selectPage(ElectronicConsultationPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<ElectronicConsultationDO>()
.eqIfPresent(ElectronicConsultationDO::getCreateBy, reqVO.getCreateBy())
.betweenIfPresent(ElectronicConsultationDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(ElectronicConsultationDO::getCompany, reqVO.getCompany())
.eqIfPresent(ElectronicConsultationDO::getSystemDept, reqVO.getSystemDept())
.eqIfPresent(ElectronicConsultationDO::getConsultationId, reqVO.getConsultationId())
.eqIfPresent(ElectronicConsultationDO::getConsultationType, reqVO.getConsultationType())
.eqIfPresent(ElectronicConsultationDO::getConsultationTitle, reqVO.getConsultationTitle())
.eqIfPresent(ElectronicConsultationDO::getConsultationContent, reqVO.getConsultationContent())
.likeIfPresent(ElectronicConsultationDO::getConsultorName, reqVO.getConsultorName())
.betweenIfPresent(ElectronicConsultationDO::getConsultationTime, reqVO.getConsultationTime())
.eqIfPresent(ElectronicConsultationDO::getHandler, reqVO.getHandler())
.betweenIfPresent(ElectronicConsultationDO::getHandleTime, reqVO.getHandleTime())
.eqIfPresent(ElectronicConsultationDO::getHandleResult, reqVO.getHandleResult())
.eqIfPresent(ElectronicConsultationDO::getYear, reqVO.getYear())
.eqIfPresent(ElectronicConsultationDO::getPeriod, reqVO.getPeriod())
.eqIfPresent(ElectronicConsultationDO::getBorrowStatus, reqVO.getBorrowStatus())
.betweenIfPresent(ElectronicConsultationDO::getRecordTime, reqVO.getRecordTime())
.eqIfPresent(ElectronicConsultationDO::getPosition, reqVO.getPosition())
.eqIfPresent(ElectronicConsultationDO::getCherks, reqVO.getCherks())
.eqIfPresent(ElectronicConsultationDO::getFileStatus, reqVO.getFileStatus())
.orderByDesc(ElectronicConsultationDO::getId));
}
default List<ElectronicConsultationDO> selectList(ElectronicConsultationExportReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<ElectronicConsultationDO>()
.eqIfPresent(ElectronicConsultationDO::getCreateBy, reqVO.getCreateBy())
.betweenIfPresent(ElectronicConsultationDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(ElectronicConsultationDO::getCompany, reqVO.getCompany())
.eqIfPresent(ElectronicConsultationDO::getSystemDept, reqVO.getSystemDept())
.eqIfPresent(ElectronicConsultationDO::getConsultationId, reqVO.getConsultationId())
.eqIfPresent(ElectronicConsultationDO::getConsultationType, reqVO.getConsultationType())
.eqIfPresent(ElectronicConsultationDO::getConsultationTitle, reqVO.getConsultationTitle())
.eqIfPresent(ElectronicConsultationDO::getConsultationContent, reqVO.getConsultationContent())
.likeIfPresent(ElectronicConsultationDO::getConsultorName, reqVO.getConsultorName())
.betweenIfPresent(ElectronicConsultationDO::getConsultationTime, reqVO.getConsultationTime())
.eqIfPresent(ElectronicConsultationDO::getHandler, reqVO.getHandler())
.betweenIfPresent(ElectronicConsultationDO::getHandleTime, reqVO.getHandleTime())
.eqIfPresent(ElectronicConsultationDO::getHandleResult, reqVO.getHandleResult())
.eqIfPresent(ElectronicConsultationDO::getYear, reqVO.getYear())
.eqIfPresent(ElectronicConsultationDO::getPeriod, reqVO.getPeriod())
.eqIfPresent(ElectronicConsultationDO::getBorrowStatus, reqVO.getBorrowStatus())
.betweenIfPresent(ElectronicConsultationDO::getRecordTime, reqVO.getRecordTime())
.eqIfPresent(ElectronicConsultationDO::getPosition, reqVO.getPosition())
.eqIfPresent(ElectronicConsultationDO::getCherks, reqVO.getCherks())
.eqIfPresent(ElectronicConsultationDO::getFileStatus, reqVO.getFileStatus())
.orderByDesc(ElectronicConsultationDO::getId));
}
}

@ -0,0 +1,70 @@
package cn.iocoder.yudao.module.ea.dal.mysql.electroniccustomercomplaint;
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.ea.dal.dataobject.electroniccustomercomplaint.ElectronicCustomerComplaintDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.vo.*;
/**
* Mapper
*
* @author
*/
@Mapper
public interface ElectronicCustomerComplaintMapper extends BaseMapperX<ElectronicCustomerComplaintDO> {
default PageResult<ElectronicCustomerComplaintDO> selectPage(ElectronicCustomerComplaintPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<ElectronicCustomerComplaintDO>()
.eqIfPresent(ElectronicCustomerComplaintDO::getCreateBy, reqVO.getCreateBy())
.betweenIfPresent(ElectronicCustomerComplaintDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(ElectronicCustomerComplaintDO::getCompany, reqVO.getCompany())
.likeIfPresent(ElectronicCustomerComplaintDO::getDeptName, reqVO.getDeptName())
.eqIfPresent(ElectronicCustomerComplaintDO::getComplaintCode, reqVO.getComplaintCode())
.likeIfPresent(ElectronicCustomerComplaintDO::getCustomerName, reqVO.getCustomerName())
.eqIfPresent(ElectronicCustomerComplaintDO::getCustomerPhone, reqVO.getCustomerPhone())
.betweenIfPresent(ElectronicCustomerComplaintDO::getComplaintTime, reqVO.getComplaintTime())
.eqIfPresent(ElectronicCustomerComplaintDO::getComplaintType, reqVO.getComplaintType())
.eqIfPresent(ElectronicCustomerComplaintDO::getComplaintContent, reqVO.getComplaintContent())
.eqIfPresent(ElectronicCustomerComplaintDO::getHandler, reqVO.getHandler())
.betweenIfPresent(ElectronicCustomerComplaintDO::getHandleTime, reqVO.getHandleTime())
.eqIfPresent(ElectronicCustomerComplaintDO::getHandleResult, reqVO.getHandleResult())
.eqIfPresent(ElectronicCustomerComplaintDO::getYear, reqVO.getYear())
.eqIfPresent(ElectronicCustomerComplaintDO::getPeriod, reqVO.getPeriod())
.eqIfPresent(ElectronicCustomerComplaintDO::getBorrowStatus, reqVO.getBorrowStatus())
.betweenIfPresent(ElectronicCustomerComplaintDO::getRecordTime, reqVO.getRecordTime())
.eqIfPresent(ElectronicCustomerComplaintDO::getPosition, reqVO.getPosition())
.eqIfPresent(ElectronicCustomerComplaintDO::getCherks, reqVO.getCherks())
.eqIfPresent(ElectronicCustomerComplaintDO::getFileStatus, reqVO.getFileStatus())
.orderByDesc(ElectronicCustomerComplaintDO::getId));
}
default List<ElectronicCustomerComplaintDO> selectList(ElectronicCustomerComplaintExportReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<ElectronicCustomerComplaintDO>()
.eqIfPresent(ElectronicCustomerComplaintDO::getCreateBy, reqVO.getCreateBy())
.betweenIfPresent(ElectronicCustomerComplaintDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(ElectronicCustomerComplaintDO::getCompany, reqVO.getCompany())
.likeIfPresent(ElectronicCustomerComplaintDO::getDeptName, reqVO.getDeptName())
.eqIfPresent(ElectronicCustomerComplaintDO::getComplaintCode, reqVO.getComplaintCode())
.likeIfPresent(ElectronicCustomerComplaintDO::getCustomerName, reqVO.getCustomerName())
.eqIfPresent(ElectronicCustomerComplaintDO::getCustomerPhone, reqVO.getCustomerPhone())
.betweenIfPresent(ElectronicCustomerComplaintDO::getComplaintTime, reqVO.getComplaintTime())
.eqIfPresent(ElectronicCustomerComplaintDO::getComplaintType, reqVO.getComplaintType())
.eqIfPresent(ElectronicCustomerComplaintDO::getComplaintContent, reqVO.getComplaintContent())
.eqIfPresent(ElectronicCustomerComplaintDO::getHandler, reqVO.getHandler())
.betweenIfPresent(ElectronicCustomerComplaintDO::getHandleTime, reqVO.getHandleTime())
.eqIfPresent(ElectronicCustomerComplaintDO::getHandleResult, reqVO.getHandleResult())
.eqIfPresent(ElectronicCustomerComplaintDO::getYear, reqVO.getYear())
.eqIfPresent(ElectronicCustomerComplaintDO::getPeriod, reqVO.getPeriod())
.eqIfPresent(ElectronicCustomerComplaintDO::getBorrowStatus, reqVO.getBorrowStatus())
.betweenIfPresent(ElectronicCustomerComplaintDO::getRecordTime, reqVO.getRecordTime())
.eqIfPresent(ElectronicCustomerComplaintDO::getPosition, reqVO.getPosition())
.eqIfPresent(ElectronicCustomerComplaintDO::getCherks, reqVO.getCherks())
.eqIfPresent(ElectronicCustomerComplaintDO::getFileStatus, reqVO.getFileStatus())
.orderByDesc(ElectronicCustomerComplaintDO::getId));
}
}

@ -0,0 +1,70 @@
package cn.iocoder.yudao.module.ea.service.electronicconsultation;
import java.util.*;
import javax.validation.*;
import cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo.*;
import cn.iocoder.yudao.module.ea.dal.dataobject.electronicconsultation.ElectronicConsultationDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
/**
* Service
*
* @author
*/
public interface ElectronicConsultationService {
/**
*
*
* @param createReqVO
* @return
*/
Long createElectronicConsultation(@Valid ElectronicConsultationCreateReqVO createReqVO);
/**
*
*
* @param updateReqVO
*/
void updateElectronicConsultation(@Valid ElectronicConsultationUpdateReqVO updateReqVO);
/**
*
*
* @param id
*/
void deleteElectronicConsultation(Long id);
/**
*
*
* @param id
* @return
*/
ElectronicConsultationDO getElectronicConsultation(Long id);
/**
*
*
* @param ids
* @return
*/
List<ElectronicConsultationDO> getElectronicConsultationList(Collection<Long> ids);
/**
*
*
* @param pageReqVO
* @return
*/
PageResult<ElectronicConsultationDO> getElectronicConsultationPage(ElectronicConsultationPageReqVO pageReqVO);
/**
* , Excel
*
* @param exportReqVO
* @return
*/
List<ElectronicConsultationDO> getElectronicConsultationList(ElectronicConsultationExportReqVO exportReqVO);
}

@ -0,0 +1,82 @@
package cn.iocoder.yudao.module.ea.service.electronicconsultation;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import java.util.*;
import cn.iocoder.yudao.module.ea.controller.admin.electronicconsultation.vo.*;
import cn.iocoder.yudao.module.ea.dal.dataobject.electronicconsultation.ElectronicConsultationDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.ea.convert.electronicconsultation.ElectronicConsultationConvert;
import cn.iocoder.yudao.module.ea.dal.mysql.electronicconsultation.ElectronicConsultationMapper;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.ea.enums.ErrorCodeConstants.*;
/**
* Service
*
* @author
*/
@Service
@Validated
public class ElectronicConsultationServiceImpl implements ElectronicConsultationService {
@Resource
private ElectronicConsultationMapper electronicConsultationMapper;
@Override
public Long createElectronicConsultation(ElectronicConsultationCreateReqVO createReqVO) {
// 插入
ElectronicConsultationDO electronicConsultation = ElectronicConsultationConvert.INSTANCE.convert(createReqVO);
electronicConsultationMapper.insert(electronicConsultation);
// 返回
return electronicConsultation.getId();
}
@Override
public void updateElectronicConsultation(ElectronicConsultationUpdateReqVO updateReqVO) {
// 校验存在
validateElectronicConsultationExists(updateReqVO.getId());
// 更新
ElectronicConsultationDO updateObj = ElectronicConsultationConvert.INSTANCE.convert(updateReqVO);
electronicConsultationMapper.updateById(updateObj);
}
@Override
public void deleteElectronicConsultation(Long id) {
// 校验存在
validateElectronicConsultationExists(id);
// 删除
electronicConsultationMapper.deleteById(id);
}
private void validateElectronicConsultationExists(Long id) {
if (electronicConsultationMapper.selectById(id) == null) {
throw exception(ELECTRONIC_CONSULTATION_NOT_EXISTS);
}
}
@Override
public ElectronicConsultationDO getElectronicConsultation(Long id) {
return electronicConsultationMapper.selectById(id);
}
@Override
public List<ElectronicConsultationDO> getElectronicConsultationList(Collection<Long> ids) {
return electronicConsultationMapper.selectBatchIds(ids);
}
@Override
public PageResult<ElectronicConsultationDO> getElectronicConsultationPage(ElectronicConsultationPageReqVO pageReqVO) {
return electronicConsultationMapper.selectPage(pageReqVO);
}
@Override
public List<ElectronicConsultationDO> getElectronicConsultationList(ElectronicConsultationExportReqVO exportReqVO) {
return electronicConsultationMapper.selectList(exportReqVO);
}
}

@ -0,0 +1,70 @@
package cn.iocoder.yudao.module.ea.service.electroniccustomercomplaint;
import java.util.*;
import javax.validation.*;
import cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.vo.*;
import cn.iocoder.yudao.module.ea.dal.dataobject.electroniccustomercomplaint.ElectronicCustomerComplaintDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
/**
* Service
*
* @author
*/
public interface ElectronicCustomerComplaintService {
/**
*
*
* @param createReqVO
* @return
*/
Long createElectronicCustomerComplaint(@Valid ElectronicCustomerComplaintCreateReqVO createReqVO);
/**
*
*
* @param updateReqVO
*/
void updateElectronicCustomerComplaint(@Valid ElectronicCustomerComplaintUpdateReqVO updateReqVO);
/**
*
*
* @param id
*/
void deleteElectronicCustomerComplaint(Long id);
/**
*
*
* @param id
* @return
*/
ElectronicCustomerComplaintDO getElectronicCustomerComplaint(Long id);
/**
*
*
* @param ids
* @return
*/
List<ElectronicCustomerComplaintDO> getElectronicCustomerComplaintList(Collection<Long> ids);
/**
*
*
* @param pageReqVO
* @return
*/
PageResult<ElectronicCustomerComplaintDO> getElectronicCustomerComplaintPage(ElectronicCustomerComplaintPageReqVO pageReqVO);
/**
* , Excel
*
* @param exportReqVO
* @return
*/
List<ElectronicCustomerComplaintDO> getElectronicCustomerComplaintList(ElectronicCustomerComplaintExportReqVO exportReqVO);
}

@ -0,0 +1,82 @@
package cn.iocoder.yudao.module.ea.service.electroniccustomercomplaint;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import java.util.*;
import cn.iocoder.yudao.module.ea.controller.admin.electroniccustomercomplaint.vo.*;
import cn.iocoder.yudao.module.ea.dal.dataobject.electroniccustomercomplaint.ElectronicCustomerComplaintDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.ea.convert.electroniccustomercomplaint.ElectronicCustomerComplaintConvert;
import cn.iocoder.yudao.module.ea.dal.mysql.electroniccustomercomplaint.ElectronicCustomerComplaintMapper;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.ea.enums.ErrorCodeConstants.*;
/**
* Service
*
* @author
*/
@Service
@Validated
public class ElectronicCustomerComplaintServiceImpl implements ElectronicCustomerComplaintService {
@Resource
private ElectronicCustomerComplaintMapper electronicCustomerComplaintMapper;
@Override
public Long createElectronicCustomerComplaint(ElectronicCustomerComplaintCreateReqVO createReqVO) {
// 插入
ElectronicCustomerComplaintDO electronicCustomerComplaint = ElectronicCustomerComplaintConvert.INSTANCE.convert(createReqVO);
electronicCustomerComplaintMapper.insert(electronicCustomerComplaint);
// 返回
return electronicCustomerComplaint.getId();
}
@Override
public void updateElectronicCustomerComplaint(ElectronicCustomerComplaintUpdateReqVO updateReqVO) {
// 校验存在
validateElectronicCustomerComplaintExists(updateReqVO.getId());
// 更新
ElectronicCustomerComplaintDO updateObj = ElectronicCustomerComplaintConvert.INSTANCE.convert(updateReqVO);
electronicCustomerComplaintMapper.updateById(updateObj);
}
@Override
public void deleteElectronicCustomerComplaint(Long id) {
// 校验存在
validateElectronicCustomerComplaintExists(id);
// 删除
electronicCustomerComplaintMapper.deleteById(id);
}
private void validateElectronicCustomerComplaintExists(Long id) {
if (electronicCustomerComplaintMapper.selectById(id) == null) {
throw exception(ELECTRONIC_CUSTOMER_COMPLAINT_NOT_EXISTS);
}
}
@Override
public ElectronicCustomerComplaintDO getElectronicCustomerComplaint(Long id) {
return electronicCustomerComplaintMapper.selectById(id);
}
@Override
public List<ElectronicCustomerComplaintDO> getElectronicCustomerComplaintList(Collection<Long> ids) {
return electronicCustomerComplaintMapper.selectBatchIds(ids);
}
@Override
public PageResult<ElectronicCustomerComplaintDO> getElectronicCustomerComplaintPage(ElectronicCustomerComplaintPageReqVO pageReqVO) {
return electronicCustomerComplaintMapper.selectPage(pageReqVO);
}
@Override
public List<ElectronicCustomerComplaintDO> getElectronicCustomerComplaintList(ElectronicCustomerComplaintExportReqVO exportReqVO) {
return electronicCustomerComplaintMapper.selectList(exportReqVO);
}
}

@ -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.ea.dal.mysql.electronicconsultation.ElectronicConsultationMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>
Loading…
Cancel
Save