支付
This commit is contained in:
35
zhwl-business/zhwl-report/pom.xml
Normal file
35
zhwl-business/zhwl-report/pom.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.zhwl</groupId>
|
||||
<artifactId>zhwl-business</artifactId>
|
||||
<version>3.8.7</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>zhwl-report</artifactId>
|
||||
<description>投诉建议模块</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.zhwl</groupId>
|
||||
<artifactId>zhwl-system</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zhwl</groupId>
|
||||
<artifactId>zhwl-notice</artifactId>
|
||||
<version>3.8.7</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zhwl</groupId>
|
||||
<artifactId>zhwl-scenic</artifactId>
|
||||
<version>3.8.7</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@@ -0,0 +1,18 @@
|
||||
package com.zhwl.report.constant;
|
||||
|
||||
/**
|
||||
* 通用常量信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class ReportConstants {
|
||||
|
||||
/**
|
||||
* 督办提示信息
|
||||
*/
|
||||
public static final String SUPERVISOR_MESSAGE = "亲爱的景区管理团队,我们非常重视来自游客的投诉(投诉ID:%s)。希望您能够迅速采取行动解决问题,确保景区的良好形象。";
|
||||
|
||||
private ReportConstants() {
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,76 @@
|
||||
package com.zhwl.report.controller;
|
||||
|
||||
import com.zhwl.common.annotation.Log;
|
||||
import com.zhwl.common.core.controller.BaseController;
|
||||
import com.zhwl.common.core.domain.AjaxResult;
|
||||
import com.zhwl.common.core.page.TableDataInfo;
|
||||
import com.zhwl.common.enums.BusinessType;
|
||||
import com.zhwl.report.domain.ZdyCmsReport;
|
||||
import com.zhwl.report.service.IZdyCmsReportService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 投诉建议Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/business/report")
|
||||
public class ZdyCmsReportController extends BaseController {
|
||||
@Autowired
|
||||
private IZdyCmsReportService zdyCmsReportService;
|
||||
|
||||
/**
|
||||
* 查询投诉建议列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('business:report:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ZdyCmsReport zdyCmsReport) {
|
||||
startPage();
|
||||
List<ZdyCmsReport> list = zdyCmsReportService.listByUser(zdyCmsReport);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 旅政通接口
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getList")
|
||||
public AjaxResult getList(String startTime,String endTime){
|
||||
return success(zdyCmsReportService.selectList(startTime,endTime));
|
||||
}
|
||||
/**
|
||||
* 获取投诉建议详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('business:report:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(zdyCmsReportService.selectZdyCmsReportById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改投诉建议
|
||||
*/
|
||||
@PreAuthorize("@ss.hasAnyPermi('business:report:edit,business:report:handle')")
|
||||
@Log(title = "投诉建议", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ZdyCmsReport zdyCmsReport) {
|
||||
return toAjax(zdyCmsReportService.updateZdyCmsReport(zdyCmsReport));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除投诉建议
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('business:report:remove')")
|
||||
@Log(title = "投诉建议", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(zdyCmsReportService.deleteZdyCmsReportByIds(ids));
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,92 @@
|
||||
package com.zhwl.report.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 旅政通意见反馈接口实体类
|
||||
*
|
||||
* @author duanyashu
|
||||
* @date 2025/5/12 17:19
|
||||
*/
|
||||
@Data
|
||||
public class ReportGather implements Serializable {
|
||||
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String linkperson;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String linktel;
|
||||
|
||||
/**
|
||||
* 投诉类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 投诉类型名称(字典标签)
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 景区ID
|
||||
*/
|
||||
private String scenicId;
|
||||
|
||||
/**
|
||||
* 景区名称
|
||||
*/
|
||||
private String scenicName;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 状态名称(字典标签)
|
||||
*/
|
||||
private String statusName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
private String image;
|
||||
|
||||
/**
|
||||
* 平台内容
|
||||
*/
|
||||
private String ptContent;
|
||||
|
||||
/**
|
||||
* 投诉人
|
||||
*/
|
||||
private String userName;
|
||||
}
|
@@ -0,0 +1,107 @@
|
||||
package com.zhwl.report.domain;
|
||||
|
||||
import com.zhwl.common.annotation.Excel;
|
||||
import com.zhwl.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 投诉建议对象 zdy_cms_report
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-07
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
public class ZdyCmsReport extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会员ID
|
||||
*/
|
||||
private Integer userId;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@Excel(name = "用户名")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 投诉类型
|
||||
*/
|
||||
@Excel(name = "投诉类型", dictType = "report_type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 投诉内容
|
||||
*/
|
||||
@Excel(name = "投诉内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 投诉图片
|
||||
*/
|
||||
private String image;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@Excel(name = "联系人")
|
||||
private String linkperson;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@Excel(name = "联系电话")
|
||||
private String linktel;
|
||||
|
||||
/**
|
||||
* 平台反馈
|
||||
*/
|
||||
@Excel(name = "平台反馈")
|
||||
private String ptContent;
|
||||
|
||||
/**
|
||||
* 办结状态
|
||||
*/
|
||||
@Excel(name = "办结状态", dictType = "report_status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 景区ID
|
||||
*/
|
||||
private Long scenicId;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private Long deptId;
|
||||
/**
|
||||
* 景区名称
|
||||
*/
|
||||
private String scenicName;
|
||||
/**
|
||||
* 是否催办
|
||||
*/
|
||||
private Integer isUrgent;
|
||||
|
||||
/**
|
||||
* 是否催办标签
|
||||
*/
|
||||
private String urgentLabel;
|
||||
|
||||
/**
|
||||
* 是否超时需要督办
|
||||
*/
|
||||
private Boolean overtime;
|
||||
}
|
@@ -0,0 +1,73 @@
|
||||
package com.zhwl.report.mapper;
|
||||
|
||||
import com.zhwl.report.domain.ReportGather;
|
||||
import com.zhwl.report.domain.ZdyCmsReport;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 投诉建议Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-07
|
||||
*/
|
||||
@Mapper
|
||||
public interface ZdyCmsReportMapper {
|
||||
/**
|
||||
* 查询投诉建议
|
||||
*
|
||||
* @param id 投诉建议主键
|
||||
* @return 投诉建议
|
||||
*/
|
||||
ZdyCmsReport selectZdyCmsReportById(Long id);
|
||||
|
||||
/**
|
||||
* 旅政通接查询列表
|
||||
* @return
|
||||
*/
|
||||
List<ReportGather> selectList(@Param("startTime") String startTime, @Param("endTime")String endTime);
|
||||
|
||||
/**
|
||||
* 查询投诉建议列表
|
||||
*
|
||||
* @param zdyCmsReport 投诉建议
|
||||
* @return 投诉建议集合
|
||||
*/
|
||||
List<ZdyCmsReport> selectZdyCmsReportList(ZdyCmsReport zdyCmsReport);
|
||||
|
||||
/**
|
||||
* 新增投诉建议
|
||||
*
|
||||
* @param zdyCmsReport 投诉建议
|
||||
* @return 结果
|
||||
*/
|
||||
int insertZdyCmsReport(ZdyCmsReport zdyCmsReport);
|
||||
|
||||
/**
|
||||
* 修改投诉建议
|
||||
*
|
||||
* @param zdyCmsReport 投诉建议
|
||||
* @return 结果
|
||||
*/
|
||||
int updateZdyCmsReport(ZdyCmsReport zdyCmsReport);
|
||||
|
||||
/**
|
||||
* 删除投诉建议
|
||||
*
|
||||
* @param id 投诉建议主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteZdyCmsReportById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除投诉建议
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteZdyCmsReportByIds(Long[] ids);
|
||||
|
||||
List<ZdyCmsReport> selectZdyCmsReportListApp(ZdyCmsReport zdyCmsReport);
|
||||
}
|
@@ -0,0 +1,87 @@
|
||||
package com.zhwl.report.service;
|
||||
|
||||
import com.zhwl.report.domain.ReportGather;
|
||||
import com.zhwl.report.domain.ZdyCmsReport;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 投诉建议Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-07
|
||||
*/
|
||||
public interface IZdyCmsReportService {
|
||||
|
||||
|
||||
/**
|
||||
* 旅政通接查询列表
|
||||
* @return
|
||||
*/
|
||||
List<ReportGather> selectList(String startTime, String endTime);
|
||||
/**
|
||||
* 查询投诉建议
|
||||
*
|
||||
* @param id 投诉建议主键
|
||||
* @return 投诉建议
|
||||
*/
|
||||
public ZdyCmsReport selectZdyCmsReportById(Long id);
|
||||
|
||||
/**
|
||||
* 查询投诉建议列表
|
||||
*
|
||||
* @param zdyCmsReport 投诉建议
|
||||
* @return 投诉建议集合
|
||||
*/
|
||||
public List<ZdyCmsReport> selectZdyCmsReportList(ZdyCmsReport zdyCmsReport);
|
||||
|
||||
/**
|
||||
* 新增投诉建议
|
||||
*
|
||||
* @param zdyCmsReport 投诉建议
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZdyCmsReport(ZdyCmsReport zdyCmsReport);
|
||||
|
||||
/**
|
||||
* 修改投诉建议
|
||||
*
|
||||
* @param zdyCmsReport 投诉建议
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZdyCmsReport(ZdyCmsReport zdyCmsReport);
|
||||
|
||||
/**
|
||||
* 批量删除投诉建议
|
||||
*
|
||||
* @param ids 需要删除的投诉建议主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZdyCmsReportByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除投诉建议信息
|
||||
*
|
||||
* @param id 投诉建议主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZdyCmsReportById(Long id);
|
||||
|
||||
/**
|
||||
* 查询投诉建议列表
|
||||
*
|
||||
* @param zdyCmsReport 投诉建议
|
||||
* @return 投诉建议集合
|
||||
*/
|
||||
List<ZdyCmsReport> listByUser(ZdyCmsReport zdyCmsReport);
|
||||
|
||||
/**
|
||||
* 投诉建议督办
|
||||
*
|
||||
* @param id 投诉建议id
|
||||
* @param userId 督办人id
|
||||
*/
|
||||
void supervisor(Long id, Long userId);
|
||||
|
||||
public List<ZdyCmsReport> selectZdyCmsReportListApp(ZdyCmsReport zdyCmsReport);
|
||||
}
|
@@ -0,0 +1,213 @@
|
||||
package com.zhwl.report.service.impl;
|
||||
|
||||
import com.zhwl.common.annotation.DataScope;
|
||||
import com.zhwl.common.core.domain.entity.SysDictData;
|
||||
import com.zhwl.common.enums.DictTypeEnum;
|
||||
import com.zhwl.common.utils.*;
|
||||
import com.zhwl.notice.domain.ZdyNotice;
|
||||
import com.zhwl.notice.mapper.ZdyNoticeMapper;
|
||||
import com.zhwl.report.constant.ReportConstants;
|
||||
import com.zhwl.report.domain.ReportGather;
|
||||
import com.zhwl.report.domain.ZdyCmsReport;
|
||||
import com.zhwl.report.mapper.ZdyCmsReportMapper;
|
||||
import com.zhwl.report.service.IZdyCmsReportService;
|
||||
import com.zhwl.common.core.domain.ZdyScenic;
|
||||
import com.zhwl.scenic.mapper.ZdyScenicMapper;
|
||||
import com.zhwl.system.enums.OrgTypeEnum;
|
||||
import com.zhwl.system.mapper.SysUserMapper;
|
||||
import com.zhwl.system.service.ISysConfigService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.zhwl.common.constant.Constants.NO;
|
||||
import static com.zhwl.common.constant.Constants.YES;
|
||||
|
||||
/**
|
||||
* 投诉建议Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-07
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class ZdyCmsReportServiceImpl implements IZdyCmsReportService {
|
||||
|
||||
private final ZdyCmsReportMapper zdyCmsReportMapper;
|
||||
|
||||
private final ISysConfigService sysConfigService;
|
||||
|
||||
private final ZdyScenicMapper zdyScenicMapper;
|
||||
|
||||
private final SysUserMapper sysUserMapper;
|
||||
|
||||
private final MybatisBatchUtils mybatisBatchUtils;
|
||||
|
||||
|
||||
@Override
|
||||
public List<ReportGather> selectList(String startTime, String endTime) {
|
||||
return zdyCmsReportMapper.selectList(startTime,endTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询投诉建议
|
||||
*
|
||||
* @param id 投诉建议主键
|
||||
* @return 投诉建议
|
||||
*/
|
||||
@Override
|
||||
public ZdyCmsReport selectZdyCmsReportById(Long id) {
|
||||
return zdyCmsReportMapper.selectZdyCmsReportById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询投诉建议列表
|
||||
*
|
||||
* @param zdyCmsReport 投诉建议
|
||||
* @return 投诉建议
|
||||
*/
|
||||
@Override
|
||||
public List<ZdyCmsReport> selectZdyCmsReportList(ZdyCmsReport zdyCmsReport) {
|
||||
return zdyCmsReportMapper.selectZdyCmsReportList(zdyCmsReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增投诉建议
|
||||
*
|
||||
* @param zdyCmsReport 投诉建议
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertZdyCmsReport(ZdyCmsReport zdyCmsReport) {
|
||||
zdyCmsReport.setCreateTime(DateUtils.getNowDate());
|
||||
Long scenicId = zdyCmsReport.getScenicId();
|
||||
ZdyScenic zdyScenic = zdyScenicMapper.selectZdyScenicById(scenicId);
|
||||
if(Objects.nonNull(zdyScenic)){
|
||||
zdyCmsReport.setDeptId(zdyScenic.getDeptId());
|
||||
}
|
||||
return zdyCmsReportMapper.insertZdyCmsReport(zdyCmsReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改投诉建议
|
||||
*
|
||||
* @param zdyCmsReport 投诉建议
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateZdyCmsReport(ZdyCmsReport zdyCmsReport) {
|
||||
DataOperateCommonUtils.setCommonData(zdyCmsReport);
|
||||
return zdyCmsReportMapper.updateZdyCmsReport(zdyCmsReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除投诉建议
|
||||
*
|
||||
* @param ids 需要删除的投诉建议主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZdyCmsReportByIds(Long[] ids) {
|
||||
return zdyCmsReportMapper.deleteZdyCmsReportByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除投诉建议信息
|
||||
*
|
||||
* @param id 投诉建议主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZdyCmsReportById(Long id) {
|
||||
return zdyCmsReportMapper.deleteZdyCmsReportById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询投诉建议列表
|
||||
*
|
||||
* @param zdyCmsReport 投诉建议
|
||||
* @return 投诉建议
|
||||
*/
|
||||
@Override
|
||||
@DataScope(deptAlias = "d")
|
||||
public List<ZdyCmsReport> listByUser(ZdyCmsReport zdyCmsReport) {
|
||||
List<ZdyCmsReport> zdyCmsReportList = Optional
|
||||
.ofNullable(zdyCmsReportMapper.selectZdyCmsReportList(zdyCmsReport))
|
||||
.orElse(Collections.emptyList());
|
||||
if (zdyCmsReportList.isEmpty()) {
|
||||
return zdyCmsReportList;
|
||||
}
|
||||
Map<Integer, String> yesOrNoMap = Optional.ofNullable(DictUtils.getDictCache(DictTypeEnum.YES_NO))
|
||||
.orElse(Collections.emptyList())
|
||||
.stream()
|
||||
.collect(Collectors.toMap(sysDictData -> Integer.parseInt(sysDictData.getDictValue()),
|
||||
SysDictData::getDictLabel));
|
||||
String complaintProcessingTime = sysConfigService.selectConfigByKey("complaint.processing.time");
|
||||
boolean enableTimeout = StringUtils.isNotBlank(complaintProcessingTime);
|
||||
Date threeDaysAgo = enableTimeout
|
||||
? DateUtils.toDate(LocalDateTime.now().minusDays(Integer.parseInt(complaintProcessingTime)))
|
||||
: null;
|
||||
zdyCmsReportList.forEach(data -> {
|
||||
data.setUrgentLabel(yesOrNoMap.get(data.getIsUrgent()));
|
||||
//查看是否超时需要督办
|
||||
if (data.getStatus() == NO && enableTimeout && data.getIsUrgent() == NO) {
|
||||
data.setOvertime(data.getCreateTime().before(threeDaysAgo));
|
||||
} else {
|
||||
data.setOvertime(Boolean.FALSE);
|
||||
}
|
||||
});
|
||||
return zdyCmsReportList;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void supervisor(Long id, Long userId) {
|
||||
ZdyCmsReport zdyCmsReport = zdyCmsReportMapper.selectZdyCmsReportById(id);
|
||||
Optional.ofNullable(zdyCmsReport).orElseThrow(() -> new RuntimeException("投诉建议信息不存在"));
|
||||
//修改督办状态
|
||||
ZdyCmsReport updateData = new ZdyCmsReport();
|
||||
updateData.setId(id);
|
||||
updateData.setIsUrgent(YES);
|
||||
zdyCmsReportMapper.updateZdyCmsReport(updateData);
|
||||
//通过站内信通知景区管理员
|
||||
if (Objects.isNull(zdyCmsReport.getScenicId())) {
|
||||
return;
|
||||
}
|
||||
ZdyScenic zdyScenic = zdyScenicMapper.selectZdyScenicById(zdyCmsReport.getScenicId());
|
||||
if (Objects.isNull(zdyScenic)) {
|
||||
log.warn("景区不存在");
|
||||
return;
|
||||
}
|
||||
List<Long> scenicManagerIdList = Optional
|
||||
.ofNullable(sysUserMapper.listScenicManagerId(zdyScenic.getDeptId(), OrgTypeEnum.PARK.getValue()))
|
||||
.orElse(Collections.emptyList());
|
||||
if (scenicManagerIdList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
Date now = DateUtils.getNowDate();
|
||||
String content = String.format(ReportConstants.SUPERVISOR_MESSAGE, id);
|
||||
List<ZdyNotice> zdyNoticeList = scenicManagerIdList.stream()
|
||||
.map(scenicManagerId -> {
|
||||
ZdyNotice zdyNotice = new ZdyNotice();
|
||||
zdyNotice.setFrom(userId);
|
||||
zdyNotice.setUserId(scenicManagerId);
|
||||
zdyNotice.setLinkId(id);
|
||||
zdyNotice.setContent(content);
|
||||
zdyNotice.setCreateTime(now);
|
||||
return zdyNotice;
|
||||
}).collect(Collectors.toList());
|
||||
mybatisBatchUtils.batchUpdateOrInsert(zdyNoticeList, ZdyNoticeMapper.class,
|
||||
(zdyNotice, mapper) -> mapper.insertZdyNotice(zdyNotice));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZdyCmsReport> selectZdyCmsReportListApp(ZdyCmsReport zdyCmsReport) {
|
||||
return zdyCmsReportMapper.selectZdyCmsReportListApp(zdyCmsReport);
|
||||
}
|
||||
}
|
@@ -0,0 +1,277 @@
|
||||
<?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.zhwl.report.mapper.ZdyCmsReportMapper">
|
||||
|
||||
<resultMap type="ZdyCmsReport" id="ZdyCmsReportResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="image" column="image"/>
|
||||
<result property="linkperson" column="linkperson"/>
|
||||
<result property="linktel" column="linktel"/>
|
||||
<result property="ptContent" column="pt_content"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="typeName" column="typeName"/>
|
||||
<result property="userName" column="userName"/>
|
||||
<result property="isUrgent" column="is_urgent"/>
|
||||
<result property="scenicId" column="scenic_id"/>
|
||||
<result property="scenicName" column="scenic_name"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyCmsReportVo">
|
||||
SELECT re.id,
|
||||
re.user_id,
|
||||
re.type,
|
||||
re.content,
|
||||
re.image,
|
||||
re.linkperson,
|
||||
re.linktel,
|
||||
re.pt_content,
|
||||
re.STATUS,
|
||||
re.create_time,
|
||||
re.update_time,
|
||||
re.is_urgent,
|
||||
re.scenic_id,
|
||||
re.update_by,
|
||||
re.dept_id,
|
||||
dict.dict_label AS typeName,
|
||||
sc.scenic_name,
|
||||
CASE
|
||||
WHEN (ue.`name` IS NOT NULL AND ue.`name` != '') THEN
|
||||
ue.`name`
|
||||
ELSE ue.nickname
|
||||
END AS userName
|
||||
FROM zdy_cms_report re
|
||||
LEFT JOIN sys_dict_data dict ON re.type = dict.dict_value
|
||||
AND dict.dict_type = 'report_type'
|
||||
LEFT JOIN zdy_user ue ON ue.id = re.user_id
|
||||
LEFT JOIN zdy_scenic sc ON sc.id = re.scenic_id
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyCmsReportList" parameterType="ZdyCmsReport" resultMap="ZdyCmsReportResult">
|
||||
<include refid="selectZdyCmsReportVo"/>
|
||||
left join sys_dept d on d.dept_id = re.dept_id
|
||||
<where>
|
||||
<if test="userId != null ">
|
||||
and re.user_id = #{userId}
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
and re.type = #{type}
|
||||
</if>
|
||||
<if test="content != null and content != ''">
|
||||
and re.content = #{content}
|
||||
</if>
|
||||
<if test="image != null and image != ''">
|
||||
and re.image = #{image}
|
||||
</if>
|
||||
<if test="linkperson != null and linkperson != ''">
|
||||
and re.linkperson = #{linkperson}
|
||||
</if>
|
||||
<if test="linktel != null and linktel != ''">
|
||||
and re.linktel = #{linktel}
|
||||
</if>
|
||||
<if test="ptContent != null and ptContent != ''">
|
||||
and re.pt_content = #{ptContent}
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
and re.status = #{status}
|
||||
</if>
|
||||
<if test="scenicId != null ">
|
||||
and re.scenic_id = #{scenicId}
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
order by re.status asc, re.is_urgent desc, re.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectZdyCmsReportById" parameterType="Long"
|
||||
resultMap="ZdyCmsReportResult">
|
||||
<include refid="selectZdyCmsReportVo"/>
|
||||
where re.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyCmsReport" parameterType="ZdyCmsReport" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_cms_report
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,
|
||||
</if>
|
||||
<if test="type != null">type,
|
||||
</if>
|
||||
<if test="content != null">content,
|
||||
</if>
|
||||
<if test="image != null">image,
|
||||
</if>
|
||||
<if test="linkperson != null">linkperson,
|
||||
</if>
|
||||
<if test="linktel != null">linktel,
|
||||
</if>
|
||||
<if test="ptContent != null">pt_content,
|
||||
</if>
|
||||
<if test="status != null">status,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="isUrgent != null">is_urgent,
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="deptId != null">dept_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},
|
||||
</if>
|
||||
<if test="type != null">#{type},
|
||||
</if>
|
||||
<if test="content != null">#{content},
|
||||
</if>
|
||||
<if test="image != null">#{image},
|
||||
</if>
|
||||
<if test="linkperson != null">#{linkperson},
|
||||
</if>
|
||||
<if test="linktel != null">#{linktel},
|
||||
</if>
|
||||
<if test="ptContent != null">#{ptContent},
|
||||
</if>
|
||||
<if test="status != null">#{status},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="isUrgent != null">#{isUrgent},
|
||||
</if>
|
||||
<if test="scenicId != null">#{scenicId},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="deptId != null">#{deptId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyCmsReport" parameterType="ZdyCmsReport">
|
||||
update zdy_cms_report
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id =
|
||||
#{userId},
|
||||
</if>
|
||||
<if test="type != null">type =
|
||||
#{type},
|
||||
</if>
|
||||
<if test="content != null">content =
|
||||
#{content},
|
||||
</if>
|
||||
<if test="image != null">image =
|
||||
#{image},
|
||||
</if>
|
||||
<if test="linkperson != null">linkperson =
|
||||
#{linkperson},
|
||||
</if>
|
||||
<if test="linktel != null">linktel =
|
||||
#{linktel},
|
||||
</if>
|
||||
<if test="ptContent != null">pt_content =
|
||||
#{ptContent},
|
||||
</if>
|
||||
<if test="status != null">status =
|
||||
#{status},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="isUrgent != null">is_urgent =
|
||||
#{isUrgent},
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id =
|
||||
#{scenicId},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="deptId != null">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyCmsReportById" parameterType="Long">
|
||||
delete
|
||||
from zdy_cms_report
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyCmsReportByIds" parameterType="String">
|
||||
delete from zdy_cms_report where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectZdyCmsReportListApp" parameterType="ZdyCmsReport" resultMap="ZdyCmsReportResult">
|
||||
<include refid="selectZdyCmsReportVo"/>
|
||||
<where>
|
||||
<if test="userId != null ">
|
||||
and re.user_id = #{userId}
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
and re.status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
order by re.create_time desc
|
||||
</select>
|
||||
<select id="selectList" resultType="ReportGather">
|
||||
SELECT
|
||||
r.id,
|
||||
r.linkperson,
|
||||
r.linktel,
|
||||
r.type,
|
||||
zu.name as userName,
|
||||
d.dict_label AS typeName,
|
||||
r.scenic_id AS scenicId,
|
||||
s.scenic_name AS scenicName,
|
||||
r.status as status,
|
||||
a.dict_label AS statusName,
|
||||
r.create_time AS createTime,
|
||||
r.update_time AS updateTime,
|
||||
r.content,
|
||||
r.image,
|
||||
r.pt_content AS ptContent
|
||||
FROM
|
||||
zdy_cms_report r
|
||||
LEFT JOIN zdy_scenic s ON r.scenic_id = s.id
|
||||
LEFT JOIN sys_dict_data d ON d.dict_type = 'report_type'
|
||||
AND r.type = d.dict_value
|
||||
LEFT JOIN sys_dict_data a ON a.dict_type = 'report_status'
|
||||
AND r.STATUS = a.dict_value
|
||||
left join zdy_user zu on r.user_id=zu.id
|
||||
<where>
|
||||
<if test="startTime!=null and startTime!=''">
|
||||
and r.create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null and endTime!=''">
|
||||
and r.create_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
r.id DESC
|
||||
</select>
|
||||
</mapper>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,277 @@
|
||||
<?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.zhwl.report.mapper.ZdyCmsReportMapper">
|
||||
|
||||
<resultMap type="ZdyCmsReport" id="ZdyCmsReportResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="image" column="image"/>
|
||||
<result property="linkperson" column="linkperson"/>
|
||||
<result property="linktel" column="linktel"/>
|
||||
<result property="ptContent" column="pt_content"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="typeName" column="typeName"/>
|
||||
<result property="userName" column="userName"/>
|
||||
<result property="isUrgent" column="is_urgent"/>
|
||||
<result property="scenicId" column="scenic_id"/>
|
||||
<result property="scenicName" column="scenic_name"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyCmsReportVo">
|
||||
SELECT re.id,
|
||||
re.user_id,
|
||||
re.type,
|
||||
re.content,
|
||||
re.image,
|
||||
re.linkperson,
|
||||
re.linktel,
|
||||
re.pt_content,
|
||||
re.STATUS,
|
||||
re.create_time,
|
||||
re.update_time,
|
||||
re.is_urgent,
|
||||
re.scenic_id,
|
||||
re.update_by,
|
||||
re.dept_id,
|
||||
dict.dict_label AS typeName,
|
||||
sc.scenic_name,
|
||||
CASE
|
||||
WHEN (ue.`name` IS NOT NULL AND ue.`name` != '') THEN
|
||||
ue.`name`
|
||||
ELSE ue.nickname
|
||||
END AS userName
|
||||
FROM zdy_cms_report re
|
||||
LEFT JOIN sys_dict_data dict ON re.type = dict.dict_value
|
||||
AND dict.dict_type = 'report_type'
|
||||
LEFT JOIN zdy_user ue ON ue.id = re.user_id
|
||||
LEFT JOIN zdy_scenic sc ON sc.id = re.scenic_id
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyCmsReportList" parameterType="ZdyCmsReport" resultMap="ZdyCmsReportResult">
|
||||
<include refid="selectZdyCmsReportVo"/>
|
||||
left join sys_dept d on d.dept_id = re.dept_id
|
||||
<where>
|
||||
<if test="userId != null ">
|
||||
and re.user_id = #{userId}
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
and re.type = #{type}
|
||||
</if>
|
||||
<if test="content != null and content != ''">
|
||||
and re.content = #{content}
|
||||
</if>
|
||||
<if test="image != null and image != ''">
|
||||
and re.image = #{image}
|
||||
</if>
|
||||
<if test="linkperson != null and linkperson != ''">
|
||||
and re.linkperson = #{linkperson}
|
||||
</if>
|
||||
<if test="linktel != null and linktel != ''">
|
||||
and re.linktel = #{linktel}
|
||||
</if>
|
||||
<if test="ptContent != null and ptContent != ''">
|
||||
and re.pt_content = #{ptContent}
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
and re.status = #{status}
|
||||
</if>
|
||||
<if test="scenicId != null ">
|
||||
and re.scenic_id = #{scenicId}
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
order by re.status asc, re.is_urgent desc, re.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectZdyCmsReportById" parameterType="Long"
|
||||
resultMap="ZdyCmsReportResult">
|
||||
<include refid="selectZdyCmsReportVo"/>
|
||||
where re.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyCmsReport" parameterType="ZdyCmsReport" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_cms_report
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,
|
||||
</if>
|
||||
<if test="type != null">type,
|
||||
</if>
|
||||
<if test="content != null">content,
|
||||
</if>
|
||||
<if test="image != null">image,
|
||||
</if>
|
||||
<if test="linkperson != null">linkperson,
|
||||
</if>
|
||||
<if test="linktel != null">linktel,
|
||||
</if>
|
||||
<if test="ptContent != null">pt_content,
|
||||
</if>
|
||||
<if test="status != null">status,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
<if test="isUrgent != null">is_urgent,
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="deptId != null">dept_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},
|
||||
</if>
|
||||
<if test="type != null">#{type},
|
||||
</if>
|
||||
<if test="content != null">#{content},
|
||||
</if>
|
||||
<if test="image != null">#{image},
|
||||
</if>
|
||||
<if test="linkperson != null">#{linkperson},
|
||||
</if>
|
||||
<if test="linktel != null">#{linktel},
|
||||
</if>
|
||||
<if test="ptContent != null">#{ptContent},
|
||||
</if>
|
||||
<if test="status != null">#{status},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="isUrgent != null">#{isUrgent},
|
||||
</if>
|
||||
<if test="scenicId != null">#{scenicId},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="deptId != null">#{deptId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyCmsReport" parameterType="ZdyCmsReport">
|
||||
update zdy_cms_report
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id =
|
||||
#{userId},
|
||||
</if>
|
||||
<if test="type != null">type =
|
||||
#{type},
|
||||
</if>
|
||||
<if test="content != null">content =
|
||||
#{content},
|
||||
</if>
|
||||
<if test="image != null">image =
|
||||
#{image},
|
||||
</if>
|
||||
<if test="linkperson != null">linkperson =
|
||||
#{linkperson},
|
||||
</if>
|
||||
<if test="linktel != null">linktel =
|
||||
#{linktel},
|
||||
</if>
|
||||
<if test="ptContent != null">pt_content =
|
||||
#{ptContent},
|
||||
</if>
|
||||
<if test="status != null">status =
|
||||
#{status},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="isUrgent != null">is_urgent =
|
||||
#{isUrgent},
|
||||
</if>
|
||||
<if test="scenicId != null">scenic_id =
|
||||
#{scenicId},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="deptId != null">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyCmsReportById" parameterType="Long">
|
||||
delete
|
||||
from zdy_cms_report
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyCmsReportByIds" parameterType="String">
|
||||
delete from zdy_cms_report where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectZdyCmsReportListApp" parameterType="ZdyCmsReport" resultMap="ZdyCmsReportResult">
|
||||
<include refid="selectZdyCmsReportVo"/>
|
||||
<where>
|
||||
<if test="userId != null ">
|
||||
and re.user_id = #{userId}
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
and re.status = #{status}
|
||||
</if>
|
||||
</where>
|
||||
order by re.create_time desc
|
||||
</select>
|
||||
<select id="selectList" resultType="ReportGather">
|
||||
SELECT
|
||||
r.id,
|
||||
r.linkperson,
|
||||
r.linktel,
|
||||
r.type,
|
||||
zu.name as userName,
|
||||
d.dict_label AS typeName,
|
||||
r.scenic_id AS scenicId,
|
||||
s.scenic_name AS scenicName,
|
||||
r.status as status,
|
||||
a.dict_label AS statusName,
|
||||
r.create_time AS createTime,
|
||||
r.update_time AS updateTime,
|
||||
r.content,
|
||||
r.image,
|
||||
r.pt_content AS ptContent
|
||||
FROM
|
||||
zdy_cms_report r
|
||||
LEFT JOIN zdy_scenic s ON r.scenic_id = s.id
|
||||
LEFT JOIN sys_dict_data d ON d.dict_type = 'report_type'
|
||||
AND r.type = d.dict_value
|
||||
LEFT JOIN sys_dict_data a ON a.dict_type = 'report_status'
|
||||
AND r.STATUS = a.dict_value
|
||||
left join zdy_user zu on r.user_id=zu.id
|
||||
<where>
|
||||
<if test="startTime!=null and startTime!=''">
|
||||
and r.create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null and endTime!=''">
|
||||
and r.create_time <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
r.id DESC
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user