mirror of
https://gitee.com/myxzgzs/boyuehasfj-java.git
synced 2025-08-08 06:52:42 +08:00
boyuehasfj-java
This commit is contained in:
parent
2d6310f3ae
commit
925afae76a
@ -21,7 +21,7 @@ boyue:
|
|||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
# 服务器的HTTP端口,默认为8080
|
# 服务器的HTTP端口,默认为8080
|
||||||
port: 9799
|
port: 19696
|
||||||
servlet:
|
servlet:
|
||||||
# 应用的访问路径
|
# 应用的访问路径
|
||||||
context-path: /
|
context-path: /
|
||||||
|
@ -0,0 +1,151 @@
|
|||||||
|
package com.boyue.hasfj.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.boyue.common.annotation.Log;
|
||||||
|
import com.boyue.common.core.controller.BaseController;
|
||||||
|
import com.boyue.common.core.domain.AjaxResult;
|
||||||
|
import com.boyue.common.enums.BusinessType;
|
||||||
|
import com.boyue.hasfj.domain.UserFeedback;
|
||||||
|
import com.boyue.hasfj.service.IUserFeedbackService;
|
||||||
|
import com.boyue.common.utils.poi.ExcelUtil;
|
||||||
|
import com.boyue.common.core.page.TableDataInfo;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户留言Controller
|
||||||
|
*
|
||||||
|
* @author boyue
|
||||||
|
* @date 2025-07-04
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/hasfj/feedback")
|
||||||
|
@Tag(name = "【用户留言】管理")
|
||||||
|
public class UserFeedbackController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IUserFeedbackService userFeedbackService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户留言列表
|
||||||
|
*/
|
||||||
|
@Operation(summary = "查询用户留言列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('hasfj:feedback:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(UserFeedback userFeedback)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<UserFeedback> list = userFeedbackService.selectUserFeedbackList(userFeedback);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出用户留言列表
|
||||||
|
*/
|
||||||
|
@Operation(summary = "导出用户留言列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('hasfj:feedback:export')")
|
||||||
|
@Log(title = "用户留言", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, UserFeedback userFeedback)
|
||||||
|
{
|
||||||
|
List<UserFeedback> list = userFeedbackService.selectUserFeedbackList(userFeedback);
|
||||||
|
ExcelUtil<UserFeedback> util = new ExcelUtil<UserFeedback>(UserFeedback.class);
|
||||||
|
util.exportExcel(response, list, "用户留言数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户留言详细信息
|
||||||
|
*/
|
||||||
|
@Operation(summary = "获取用户留言详细信息")
|
||||||
|
@PreAuthorize("@ss.hasPermi('hasfj:feedback:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(userFeedbackService.selectUserFeedbackById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用户留言
|
||||||
|
*/
|
||||||
|
@Operation(summary = "新增用户留言")
|
||||||
|
@PreAuthorize("@ss.hasPermi('hasfj:feedback:add')")
|
||||||
|
@Log(title = "用户留言", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody UserFeedback userFeedback)
|
||||||
|
{
|
||||||
|
userFeedbackService.insertUserFeedback(userFeedback);
|
||||||
|
return success(userFeedback);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户留言
|
||||||
|
*/
|
||||||
|
@Operation(summary = "修改用户留言")
|
||||||
|
@PreAuthorize("@ss.hasPermi('hasfj:feedback:edit')")
|
||||||
|
@Log(title = "用户留言", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody UserFeedback userFeedback)
|
||||||
|
{
|
||||||
|
return toAjax(userFeedbackService.updateUserFeedback(userFeedback));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户留言
|
||||||
|
*/
|
||||||
|
@Operation(summary = "删除用户留言")
|
||||||
|
@PreAuthorize("@ss.hasPermi('hasfj:feedback:remove')")
|
||||||
|
@Log(title = "用户留言", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable( name = "ids" ) Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(userFeedbackService.deleteUserFeedbackByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户前端
|
||||||
|
* 前端用户留言提交
|
||||||
|
*/
|
||||||
|
@Operation(summary = "前端用户留言提交")
|
||||||
|
@Log(title = "用户留言", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/user/submit")
|
||||||
|
public AjaxResult useradd(@RequestBody UserFeedback userFeedback)
|
||||||
|
{
|
||||||
|
userFeedbackService.insertUserFeedback(userFeedback);
|
||||||
|
return success(userFeedback);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户前端
|
||||||
|
* 获取用户留言编号
|
||||||
|
*/
|
||||||
|
@Operation(summary = "获取用户留言编号")
|
||||||
|
@GetMapping(value = "/user/getById/{id}")
|
||||||
|
public AjaxResult getUserFeedbackById(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(userFeedbackService.selectUserFeedbackById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户前端
|
||||||
|
* 通过留言编号、姓名、身份证号、手机号获取用户留言详情
|
||||||
|
*/
|
||||||
|
@Operation(summary = "通过留言编号、姓名、身份证号、手机号获取用户留言详情")
|
||||||
|
@GetMapping(value = "/user/queryDetail")
|
||||||
|
public AjaxResult getUserFeedbackDetail(@ModelAttribute UserFeedback userFeedback)
|
||||||
|
{
|
||||||
|
List<UserFeedback> list = userFeedbackService.selectUserFeedbackList(userFeedback);
|
||||||
|
return success(list.isEmpty() ? null : list.get(0));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,235 @@
|
|||||||
|
package com.boyue.hasfj.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.boyue.common.core.domain.BaseEntity;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.boyue.common.annotation.Excel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户留言对象 user_feedback
|
||||||
|
*
|
||||||
|
* @author boyue
|
||||||
|
* @date 2025-07-04
|
||||||
|
*/
|
||||||
|
@Schema(description = "用户留言对象")
|
||||||
|
public class UserFeedback extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/** 主键ID */
|
||||||
|
@Schema(title = "主键ID")
|
||||||
|
@Excel(name = "主键ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 留言查询编号,用于用户查询 */
|
||||||
|
@Schema(title = "留言查询编号,用于用户查询")
|
||||||
|
@Excel(name = "留言查询编号,用于用户查询")
|
||||||
|
private String feedbackNo;
|
||||||
|
|
||||||
|
/** 有问题的法律条例或案例 */
|
||||||
|
@Schema(title = "有问题的法律条例或案例")
|
||||||
|
@Excel(name = "有问题的法律条例或案例")
|
||||||
|
private String legalArticle;
|
||||||
|
|
||||||
|
/** 问题描述 */
|
||||||
|
@Schema(title = "问题描述")
|
||||||
|
@Excel(name = "问题描述")
|
||||||
|
private String issueDescription;
|
||||||
|
|
||||||
|
/** 用户姓名 */
|
||||||
|
@Schema(title = "用户姓名")
|
||||||
|
@Excel(name = "用户姓名")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/** 手机号 */
|
||||||
|
@Schema(title = "手机号")
|
||||||
|
@Excel(name = "手机号")
|
||||||
|
private String phoneNumber;
|
||||||
|
|
||||||
|
/** 身份证号 */
|
||||||
|
@Schema(title = "身份证号")
|
||||||
|
@Excel(name = "身份证号")
|
||||||
|
private String idCardNumber;
|
||||||
|
|
||||||
|
/** 联系方式类型:1-手机号,2-身份证号,3-姓名 */
|
||||||
|
@Schema(title = "联系方式类型:1-手机号,2-身份证号,3-姓名")
|
||||||
|
@Excel(name = "联系方式类型:1-手机号,2-身份证号,3-姓名")
|
||||||
|
private Long contactInfoType;
|
||||||
|
|
||||||
|
/** 留言状态:0-待处理,1-已回复,2-已关闭 */
|
||||||
|
@Schema(title = "留言状态:0-待处理,1-已回复,2-已关闭")
|
||||||
|
@Excel(name = "留言状态:0-待处理,1-已回复,2-已关闭")
|
||||||
|
private Long status;
|
||||||
|
|
||||||
|
/** 管理员回复内容 */
|
||||||
|
@Schema(title = "管理员回复内容")
|
||||||
|
@Excel(name = "管理员回复内容")
|
||||||
|
private String adminReplyContent;
|
||||||
|
|
||||||
|
/** 管理员回复时间 */
|
||||||
|
@Schema(title = "管理员回复时间")
|
||||||
|
@Excel(name = "管理员回复时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date adminReplyTime;
|
||||||
|
|
||||||
|
/** 回复的管理员ID */
|
||||||
|
@Schema(title = "回复的管理员ID")
|
||||||
|
@Excel(name = "回复的管理员ID")
|
||||||
|
private Long adminId;
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setFeedbackNo(String feedbackNo)
|
||||||
|
{
|
||||||
|
this.feedbackNo = feedbackNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFeedbackNo()
|
||||||
|
{
|
||||||
|
return feedbackNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setLegalArticle(String legalArticle)
|
||||||
|
{
|
||||||
|
this.legalArticle = legalArticle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLegalArticle()
|
||||||
|
{
|
||||||
|
return legalArticle;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setIssueDescription(String issueDescription)
|
||||||
|
{
|
||||||
|
this.issueDescription = issueDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIssueDescription()
|
||||||
|
{
|
||||||
|
return issueDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setUserName(String userName)
|
||||||
|
{
|
||||||
|
this.userName = userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserName()
|
||||||
|
{
|
||||||
|
return userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setPhoneNumber(String phoneNumber)
|
||||||
|
{
|
||||||
|
this.phoneNumber = phoneNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPhoneNumber()
|
||||||
|
{
|
||||||
|
return phoneNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setIdCardNumber(String idCardNumber)
|
||||||
|
{
|
||||||
|
this.idCardNumber = idCardNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdCardNumber()
|
||||||
|
{
|
||||||
|
return idCardNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setContactInfoType(Long contactInfoType)
|
||||||
|
{
|
||||||
|
this.contactInfoType = contactInfoType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getContactInfoType()
|
||||||
|
{
|
||||||
|
return contactInfoType;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setStatus(Long status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setAdminReplyContent(String adminReplyContent)
|
||||||
|
{
|
||||||
|
this.adminReplyContent = adminReplyContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAdminReplyContent()
|
||||||
|
{
|
||||||
|
return adminReplyContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setAdminReplyTime(Date adminReplyTime)
|
||||||
|
{
|
||||||
|
this.adminReplyTime = adminReplyTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getAdminReplyTime()
|
||||||
|
{
|
||||||
|
return adminReplyTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setAdminId(Long adminId)
|
||||||
|
{
|
||||||
|
this.adminId = adminId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAdminId()
|
||||||
|
{
|
||||||
|
return adminId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("feedbackNo", getFeedbackNo())
|
||||||
|
.append("legalArticle", getLegalArticle())
|
||||||
|
.append("issueDescription", getIssueDescription())
|
||||||
|
.append("userName", getUserName())
|
||||||
|
.append("phoneNumber", getPhoneNumber())
|
||||||
|
.append("idCardNumber", getIdCardNumber())
|
||||||
|
.append("contactInfoType", getContactInfoType())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("adminReplyContent", getAdminReplyContent())
|
||||||
|
.append("adminReplyTime", getAdminReplyTime())
|
||||||
|
.append("adminId", getAdminId())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.boyue.hasfj.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.boyue.hasfj.domain.UserFeedback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户留言Mapper接口
|
||||||
|
*
|
||||||
|
* @author boyue
|
||||||
|
* @date 2025-07-04
|
||||||
|
*/
|
||||||
|
public interface UserFeedbackMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询用户留言
|
||||||
|
*
|
||||||
|
* @param id 用户留言主键
|
||||||
|
* @return 用户留言
|
||||||
|
*/
|
||||||
|
public UserFeedback selectUserFeedbackById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户留言列表
|
||||||
|
*
|
||||||
|
* @param userFeedback 用户留言
|
||||||
|
* @return 用户留言集合
|
||||||
|
*/
|
||||||
|
public List<UserFeedback> selectUserFeedbackList(UserFeedback userFeedback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用户留言
|
||||||
|
*
|
||||||
|
* @param userFeedback 用户留言
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertUserFeedback(UserFeedback userFeedback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户留言
|
||||||
|
*
|
||||||
|
* @param userFeedback 用户留言
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateUserFeedback(UserFeedback userFeedback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户留言
|
||||||
|
*
|
||||||
|
* @param id 用户留言主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteUserFeedbackById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除用户留言
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteUserFeedbackByIds(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.boyue.hasfj.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.boyue.hasfj.domain.UserFeedback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户留言Service接口
|
||||||
|
*
|
||||||
|
* @author boyue
|
||||||
|
* @date 2025-07-04
|
||||||
|
*/
|
||||||
|
public interface IUserFeedbackService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询用户留言
|
||||||
|
*
|
||||||
|
* @param id 用户留言主键
|
||||||
|
* @return 用户留言
|
||||||
|
*/
|
||||||
|
public UserFeedback selectUserFeedbackById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户留言列表
|
||||||
|
*
|
||||||
|
* @param userFeedback 用户留言
|
||||||
|
* @return 用户留言集合
|
||||||
|
*/
|
||||||
|
public List<UserFeedback> selectUserFeedbackList(UserFeedback userFeedback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用户留言
|
||||||
|
*
|
||||||
|
* @param userFeedback 用户留言
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertUserFeedback(UserFeedback userFeedback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户留言
|
||||||
|
*
|
||||||
|
* @param userFeedback 用户留言
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateUserFeedback(UserFeedback userFeedback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除用户留言
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的用户留言主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteUserFeedbackByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户留言信息
|
||||||
|
*
|
||||||
|
* @param id 用户留言主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteUserFeedbackById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户留言
|
||||||
|
*
|
||||||
|
* @param feedbackNo 留言查询编号
|
||||||
|
* @return 用户留言
|
||||||
|
*/
|
||||||
|
public UserFeedback selectUserFeedbackByFeedbackNo(String feedbackNo);
|
||||||
|
}
|
@ -0,0 +1,130 @@
|
|||||||
|
package com.boyue.hasfj.service.impl;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.List;
|
||||||
|
import com.boyue.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.boyue.hasfj.mapper.UserFeedbackMapper;
|
||||||
|
import com.boyue.hasfj.domain.UserFeedback;
|
||||||
|
import com.boyue.hasfj.service.IUserFeedbackService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户留言Service业务层处理
|
||||||
|
*
|
||||||
|
* @author boyue
|
||||||
|
* @date 2025-07-04
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class UserFeedbackServiceImpl implements IUserFeedbackService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private UserFeedbackMapper userFeedbackMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户留言
|
||||||
|
*
|
||||||
|
* @param id 用户留言主键
|
||||||
|
* @return 用户留言
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserFeedback selectUserFeedbackById(Long id)
|
||||||
|
{
|
||||||
|
return userFeedbackMapper.selectUserFeedbackById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户留言列表
|
||||||
|
*
|
||||||
|
* @param userFeedback 用户留言
|
||||||
|
* @return 用户留言
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<UserFeedback> selectUserFeedbackList(UserFeedback userFeedback)
|
||||||
|
{
|
||||||
|
return userFeedbackMapper.selectUserFeedbackList(userFeedback);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增用户留言
|
||||||
|
*
|
||||||
|
* @param userFeedback 用户留言
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertUserFeedback(UserFeedback userFeedback)
|
||||||
|
{
|
||||||
|
userFeedback.setCreateTime(DateUtils.getNowDate());
|
||||||
|
// 自动生成留言查询编号
|
||||||
|
if (userFeedback.getFeedbackNo() == null || userFeedback.getFeedbackNo().isEmpty()) {
|
||||||
|
String feedbackNo = "YHLY-" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
|
||||||
|
userFeedback.setFeedbackNo(feedbackNo);
|
||||||
|
}
|
||||||
|
// 根据回复内容设置留言状态
|
||||||
|
if (userFeedback.getAdminReplyContent() == null || userFeedback.getAdminReplyContent().isEmpty()) {
|
||||||
|
userFeedback.setStatus(0L); // 待处理
|
||||||
|
} else {
|
||||||
|
userFeedback.setStatus(1L); // 已回复
|
||||||
|
}
|
||||||
|
return userFeedbackMapper.insertUserFeedback(userFeedback);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改用户留言
|
||||||
|
*
|
||||||
|
* @param userFeedback 用户留言
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateUserFeedback(UserFeedback userFeedback)
|
||||||
|
{
|
||||||
|
userFeedback.setAdminReplyTime(DateUtils.getNowDate());
|
||||||
|
// 根据回复内容设置留言状态
|
||||||
|
if (userFeedback.getAdminReplyContent() == null || userFeedback.getAdminReplyContent().isEmpty()) {
|
||||||
|
userFeedback.setStatus(0L); // 待处理
|
||||||
|
} else {
|
||||||
|
userFeedback.setStatus(1L); // 已回复
|
||||||
|
}
|
||||||
|
return userFeedbackMapper.updateUserFeedback(userFeedback);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除用户留言
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的用户留言主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteUserFeedbackByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return userFeedbackMapper.deleteUserFeedbackByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户留言信息
|
||||||
|
*
|
||||||
|
* @param id 用户留言主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteUserFeedbackById(Long id)
|
||||||
|
{
|
||||||
|
return userFeedbackMapper.deleteUserFeedbackById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户留言
|
||||||
|
*
|
||||||
|
* @param feedbackNo 留言查询编号
|
||||||
|
* @return 用户留言
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserFeedback selectUserFeedbackByFeedbackNo(String feedbackNo)
|
||||||
|
{
|
||||||
|
UserFeedback userFeedback = new UserFeedback();
|
||||||
|
userFeedback.setFeedbackNo(feedbackNo);
|
||||||
|
List<UserFeedback> list = userFeedbackMapper.selectUserFeedbackList(userFeedback);
|
||||||
|
return list.isEmpty() ? null : list.get(0);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,138 @@
|
|||||||
|
<?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.boyue.hasfj.mapper.UserFeedbackMapper">
|
||||||
|
|
||||||
|
<resultMap type="UserFeedback" id="UserFeedbackResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="feedbackNo" column="feedback_no" />
|
||||||
|
<result property="legalArticle" column="legal_article" />
|
||||||
|
<result property="issueDescription" column="issue_description" />
|
||||||
|
<result property="userName" column="user_name" />
|
||||||
|
<result property="phoneNumber" column="phone_number" />
|
||||||
|
<result property="idCardNumber" column="id_card_number" />
|
||||||
|
<result property="contactInfoType" column="contact_info_type" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="adminReplyContent" column="admin_reply_content" />
|
||||||
|
<result property="adminReplyTime" column="admin_reply_time" />
|
||||||
|
<result property="adminId" column="admin_id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectUserFeedbackVo">
|
||||||
|
select
|
||||||
|
uf.id,
|
||||||
|
uf.feedback_no,
|
||||||
|
uf.legal_article,
|
||||||
|
uf.issue_description,
|
||||||
|
uf.user_name,
|
||||||
|
uf.phone_number,
|
||||||
|
uf.id_card_number,
|
||||||
|
uf.contact_info_type,
|
||||||
|
uf.status,
|
||||||
|
uf.create_time,
|
||||||
|
uf.admin_reply_content,
|
||||||
|
uf.admin_reply_time,
|
||||||
|
uf.admin_id
|
||||||
|
from user_feedback uf
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectUserFeedbackList" parameterType="UserFeedback" resultMap="UserFeedbackResult">
|
||||||
|
<include refid="selectUserFeedbackVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="feedbackNo != null and feedbackNo != ''">
|
||||||
|
and uf.feedback_no = #{feedbackNo}
|
||||||
|
</if>
|
||||||
|
<if test="userName != null and userName != '' or idCardNumber != null and idCardNumber != '' or phoneNumber != null and phoneNumber != ''">
|
||||||
|
AND (
|
||||||
|
<trim prefixOverrides="OR">
|
||||||
|
<if test="userName != null and userName != ''">
|
||||||
|
OR uf.user_name like concat('%', #{userName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="idCardNumber != null and idCardNumber != ''">
|
||||||
|
OR uf.id_card_number = #{idCardNumber}
|
||||||
|
</if>
|
||||||
|
<if test="phoneNumber != null and phoneNumber != ''">
|
||||||
|
OR uf.phone_number = #{phoneNumber}
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="legalArticle != null and legalArticle != ''"> and uf.legal_article like concat('%', #{legalArticle}, '%')</if>
|
||||||
|
<if test="issueDescription != null and issueDescription != ''"> and uf.issue_description like concat('%', #{issueDescription}, '%')</if>
|
||||||
|
<if test="contactInfoType != null "> and uf.contact_info_type = #{contactInfoType}</if>
|
||||||
|
<if test="status != null "> and uf.status = #{status}</if>
|
||||||
|
<if test="adminReplyContent != null and adminReplyContent != ''"> and uf.admin_reply_content = #{adminReplyContent}</if>
|
||||||
|
<if test="adminReplyTime != null "> and uf.admin_reply_time = #{adminReplyTime}</if>
|
||||||
|
<if test="adminId != null "> and uf.admin_id = #{adminId}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectUserFeedbackById" parameterType="Long" resultMap="UserFeedbackResult">
|
||||||
|
<include refid="selectUserFeedbackVo"/>
|
||||||
|
where uf.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertUserFeedback" parameterType="UserFeedback" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into user_feedback
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="feedbackNo != null and feedbackNo != ''">feedback_no,</if>
|
||||||
|
<if test="legalArticle != null">legal_article,</if>
|
||||||
|
<if test="issueDescription != null and issueDescription != ''">issue_description,</if>
|
||||||
|
<if test="userName != null">user_name,</if>
|
||||||
|
<if test="phoneNumber != null">phone_number,</if>
|
||||||
|
<if test="idCardNumber != null">id_card_number,</if>
|
||||||
|
<if test="contactInfoType != null">contact_info_type,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="adminReplyContent != null">admin_reply_content,</if>
|
||||||
|
<if test="adminReplyTime != null">admin_reply_time,</if>
|
||||||
|
<if test="adminId != null">admin_id,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="feedbackNo != null and feedbackNo != ''">#{feedbackNo},</if>
|
||||||
|
<if test="legalArticle != null">#{legalArticle},</if>
|
||||||
|
<if test="issueDescription != null and issueDescription != ''">#{issueDescription},</if>
|
||||||
|
<if test="userName != null">#{userName},</if>
|
||||||
|
<if test="phoneNumber != null">#{phoneNumber},</if>
|
||||||
|
<if test="idCardNumber != null">#{idCardNumber},</if>
|
||||||
|
<if test="contactInfoType != null">#{contactInfoType},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="adminReplyContent != null">#{adminReplyContent},</if>
|
||||||
|
<if test="adminReplyTime != null">#{adminReplyTime},</if>
|
||||||
|
<if test="adminId != null">#{adminId},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateUserFeedback" parameterType="UserFeedback">
|
||||||
|
update user_feedback
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="feedbackNo != null and feedbackNo != ''">feedback_no = #{feedbackNo},</if>
|
||||||
|
<if test="legalArticle != null">legal_article = #{legalArticle},</if>
|
||||||
|
<if test="issueDescription != null and issueDescription != ''">issue_description = #{issueDescription},</if>
|
||||||
|
<if test="userName != null">user_name = #{userName},</if>
|
||||||
|
<if test="phoneNumber != null">phone_number = #{phoneNumber},</if>
|
||||||
|
<if test="idCardNumber != null">id_card_number = #{idCardNumber},</if>
|
||||||
|
<if test="contactInfoType != null">contact_info_type = #{contactInfoType},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="adminReplyContent != null">admin_reply_content = #{adminReplyContent},</if>
|
||||||
|
<if test="adminReplyTime != null">admin_reply_time = #{adminReplyTime},</if>
|
||||||
|
<if test="adminId != null">admin_id = #{adminId},</if>
|
||||||
|
</trim>
|
||||||
|
where user_feedback.id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteUserFeedbackById" parameterType="Long">
|
||||||
|
delete from user_feedback where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteUserFeedbackByIds" parameterType="String">
|
||||||
|
delete from user_feedback where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -0,0 +1,12 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>404 Not Found</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>404 页面未找到</h1>
|
||||||
|
<p>您访问的页面不存在。</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,12 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>典型案例列表</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>典型案例列表页面</h1>
|
||||||
|
<p>这里将显示典型案例列表内容。</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,12 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>表单下载列表</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>表单下载列表页面</h1>
|
||||||
|
<p>这里将显示表单下载列表内容。</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,12 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>淮安市司法局首页</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>淮安市司法局首页</h1>
|
||||||
|
<p>这里是首页内容。</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,12 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>法律规定列表</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>法律规定列表页面</h1>
|
||||||
|
<p>这里将显示法律规定列表内容。</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
x
Reference in New Issue
Block a user