问答记录
This commit is contained in:
+141
@@ -0,0 +1,141 @@
|
|||||||
|
package com.jero.modules.personal.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.system.vo.LoginUser;
|
||||||
|
import com.jero.modules.personal.entity.LawsStandardQa;
|
||||||
|
import com.jero.modules.personal.entity.LawsStandardQuestions;
|
||||||
|
import com.jero.modules.personal.service.ILawsStandardQaService;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.jero.modules.personal.service.ILawsStandardQuestionsService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 标准问答记录
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-09-08
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="标准问答记录")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/personal/lawsStandardQa")
|
||||||
|
@Slf4j
|
||||||
|
public class LawsStandardQaController extends JeroController<LawsStandardQa, ILawsStandardQaService> {
|
||||||
|
@Autowired
|
||||||
|
private ILawsStandardQuestionsService lawsStandardQuestionsService;
|
||||||
|
@Autowired
|
||||||
|
private ILawsStandardQaService lawsStandardQaService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "标准问答记录-分页列表查询")
|
||||||
|
@ApiOperation(value="标准问答记录-分页列表查询", notes="标准问答记录-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<IPage<LawsStandardQa>> queryPageList(LawsStandardQa lawsStandardQa,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
IPage<LawsStandardQa> pageList = lawsStandardQaService.queryPage(lawsStandardQa, pageNo, pageSize, req);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "标准问答记录-列表查询")
|
||||||
|
@ApiOperation(value="标准问答记录-列表查询", notes="标准问答记录-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<LawsStandardQa>> queryList(LawsStandardQa lawsStandardQa, HttpServletRequest req) {
|
||||||
|
List<LawsStandardQa> list = lawsStandardQaService.queryList(lawsStandardQa, req);
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "标准问答记录-添加")
|
||||||
|
@ApiOperation(value="标准问答记录-添加", notes="标准问答记录-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<T> add(@Validated @RequestBody LawsStandardQa lawsStandardQa) {
|
||||||
|
Date date = new Date();
|
||||||
|
LawsStandardQuestions questions = lawsStandardQuestionsService.queryById(lawsStandardQa.getQuestionsId());
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
//说明是提问人发的消息
|
||||||
|
lawsStandardQa.setRecordType(sysUser.getId().equals(questions.getQuestionerId()) ? "1" : "2");
|
||||||
|
lawsStandardQa.setReadingStatus("1");
|
||||||
|
lawsStandardQa.setRecoveryTime(date);
|
||||||
|
lawsStandardQa.setAnswererId(sysUser.getId());
|
||||||
|
lawsStandardQa.setAnswererName(sysUser.getRealname());
|
||||||
|
lawsStandardQaService.add(lawsStandardQa);
|
||||||
|
return Result.OK("操作成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "标准问答记录-编辑")
|
||||||
|
@ApiOperation(value="标准问答记录-编辑", notes="标准问答记录-编辑")
|
||||||
|
@PostMapping(value = "/edit")
|
||||||
|
public Result<T> edit(@Validated @RequestBody LawsStandardQa lawsStandardQa) {
|
||||||
|
lawsStandardQaService.editById(lawsStandardQa);
|
||||||
|
return Result.OK("操作成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "标准问答记录-通过id删除")
|
||||||
|
@ApiOperation(value="标准问答记录-通过id删除", notes="标准问答记录-通过id删除")
|
||||||
|
@PostMapping(value = "/delete")
|
||||||
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
|
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
|
||||||
|
return Result.error("请选择数据!");
|
||||||
|
}
|
||||||
|
lawsStandardQaService.deleteById(map.get("id"));
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "标准问答记录-批量删除")
|
||||||
|
@ApiOperation(value="标准问答记录-批量删除", notes="标准问答记录-批量删除")
|
||||||
|
@PostMapping(value = "/deleteBatch")
|
||||||
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
||||||
|
return Result.error("请选择数据!");
|
||||||
|
}
|
||||||
|
this.lawsStandardQaService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "标准问答记录-通过id查询")
|
||||||
|
@ApiOperation(value="标准问答记录-通过id查询", notes="标准问答记录-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<LawsStandardQa> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
LawsStandardQa lawsStandardQa = lawsStandardQaService.queryById(id);
|
||||||
|
if(lawsStandardQa==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(lawsStandardQa);
|
||||||
|
}
|
||||||
|
}
|
||||||
+119
@@ -0,0 +1,119 @@
|
|||||||
|
package com.jero.modules.personal.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.system.vo.LoginUser;
|
||||||
|
import com.jero.modules.personal.entity.LawsStandardQuestions;
|
||||||
|
import com.jero.modules.personal.service.ILawsStandardQuestionsService;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 标准提问
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-09-08
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="标准提问")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/personal/lawsStandardQuestions")
|
||||||
|
@Slf4j
|
||||||
|
public class LawsStandardQuestionsController extends JeroController<LawsStandardQuestions, ILawsStandardQuestionsService> {
|
||||||
|
@Autowired
|
||||||
|
private ILawsStandardQuestionsService lawsStandardQuestionsService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "标准提问-分页列表查询")
|
||||||
|
@ApiOperation(value="标准提问-分页列表查询", notes="标准提问-分页列表查询")
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public Result<IPage<LawsStandardQuestions>> queryPageList(LawsStandardQuestions lawsStandardQuestions,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
IPage<LawsStandardQuestions> pageList = lawsStandardQuestionsService.queryPage(lawsStandardQuestions, pageNo, pageSize, req);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "标准提问-列表查询")
|
||||||
|
@ApiOperation(value="标准提问-列表查询", notes="标准提问-列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<List<LawsStandardQuestions>> queryList(LawsStandardQuestions lawsStandardQuestions, HttpServletRequest req) {
|
||||||
|
List<LawsStandardQuestions> list = lawsStandardQuestionsService.queryList(lawsStandardQuestions, req);
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "标准提问-提交问题")
|
||||||
|
@ApiOperation(value="标准提问-提交问题", notes="标准提问-提交问题")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<T> add(@Validated @RequestBody LawsStandardQuestions lawsStandardQuestions) {
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
lawsStandardQuestions.setQuestionerId(sysUser.getId());
|
||||||
|
lawsStandardQuestionsService.add(lawsStandardQuestions);
|
||||||
|
return Result.OK("操作成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "标准提问-通过id删除")
|
||||||
|
@ApiOperation(value="标准提问-通过id删除", notes="标准提问-通过id删除")
|
||||||
|
@PostMapping(value = "/delete")
|
||||||
|
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||||
|
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
|
||||||
|
return Result.error("请选择数据!");
|
||||||
|
}
|
||||||
|
lawsStandardQuestionsService.deleteById(map.get("id"));
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "标准提问-批量删除")
|
||||||
|
@ApiOperation(value="标准提问-批量删除", notes="标准提问-批量删除")
|
||||||
|
@PostMapping(value = "/deleteBatch")
|
||||||
|
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||||
|
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
||||||
|
return Result.error("请选择数据!");
|
||||||
|
}
|
||||||
|
this.lawsStandardQuestionsService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "标准提问-通过id查询")
|
||||||
|
@ApiOperation(value="标准提问-通过id查询", notes="标准提问-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<LawsStandardQuestions> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
LawsStandardQuestions lawsStandardQuestions = lawsStandardQuestionsService.queryById(id);
|
||||||
|
if(lawsStandardQuestions==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(lawsStandardQuestions);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
package com.jero.modules.personal.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 标准问答记录
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-09-08
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("laws_standard_qa")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="laws_standard_qa对象", description="标准问答记录")
|
||||||
|
public class LawsStandardQa implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**标准提问ID*/
|
||||||
|
@ApiModelProperty(value = "标准提问ID")
|
||||||
|
@NotBlank(message = "questionsId not null")
|
||||||
|
private String questionsId;
|
||||||
|
|
||||||
|
/**对话内容*/
|
||||||
|
@ApiModelProperty(value = "对话内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**附件*/
|
||||||
|
@ApiModelProperty(value = "附件")
|
||||||
|
private String annex;
|
||||||
|
|
||||||
|
/**对话人ID*/
|
||||||
|
@ApiModelProperty(value = "对话人ID")
|
||||||
|
private String answererId;
|
||||||
|
|
||||||
|
/**对话人名字*/
|
||||||
|
@ApiModelProperty(value = "对话人名字")
|
||||||
|
private String answererName;
|
||||||
|
|
||||||
|
/**记录创建人类型(1提问人、2回答人)*/
|
||||||
|
@ApiModelProperty(value = "记录创建人类型(1提问人、2回答人)")
|
||||||
|
private String recordType;
|
||||||
|
|
||||||
|
/**阅读状态(1未读、2已读)*/
|
||||||
|
@ApiModelProperty(value = "阅读状态(1未读、2已读)")
|
||||||
|
private String readingStatus;
|
||||||
|
|
||||||
|
/**对话时间*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "对话时间")
|
||||||
|
private Date recoveryTime;
|
||||||
|
|
||||||
|
/**已读时间*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@ApiModelProperty(value = "已读时间")
|
||||||
|
private Date readTime;
|
||||||
|
|
||||||
|
/**创建人*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**更新人*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新日期")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**所属部门*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private String orgCode;
|
||||||
|
}
|
||||||
+106
@@ -0,0 +1,106 @@
|
|||||||
|
package com.jero.modules.personal.entity;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 标准提问
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-09-08
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("laws_standard_questions")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="laws_standard_questions对象", description="标准提问")
|
||||||
|
public class LawsStandardQuestions implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**提问标题*/
|
||||||
|
@ApiModelProperty(value = "提问标题")
|
||||||
|
@NotBlank(message = "title not null")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**标准编号*/
|
||||||
|
@ApiModelProperty(value = "标准编号")
|
||||||
|
@NotBlank(message = "standardNum not null")
|
||||||
|
private String standardNum;
|
||||||
|
|
||||||
|
/**标准ID*/
|
||||||
|
@ApiModelProperty(value = "标准ID")
|
||||||
|
@NotBlank(message = "standardId not null")
|
||||||
|
private String standardId;
|
||||||
|
|
||||||
|
/**项目ID*/
|
||||||
|
@ApiModelProperty(value = "项目ID")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
/**提问人ID*/
|
||||||
|
@ApiModelProperty(value = "提问人ID")
|
||||||
|
private String questionerId;
|
||||||
|
|
||||||
|
/**回答人ID*/
|
||||||
|
@ApiModelProperty(value = "回答人ID")
|
||||||
|
@NotBlank(message = "answererId not null")
|
||||||
|
private String answererId;
|
||||||
|
|
||||||
|
/**问题描述*/
|
||||||
|
@ApiModelProperty(value = "问题描述")
|
||||||
|
@NotBlank(message = "description not null")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**问题发生时间*/
|
||||||
|
@ApiModelProperty(value = "问题发生时间")
|
||||||
|
private String occurrenceTime;
|
||||||
|
|
||||||
|
/**附件*/
|
||||||
|
@ApiModelProperty(value = "附件")
|
||||||
|
private String annex;
|
||||||
|
|
||||||
|
/**创建人*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**更新人*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新日期")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**所属部门*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private String orgCode;
|
||||||
|
|
||||||
|
/**删除状态(0-正常,1-删除)*/
|
||||||
|
@ApiModelProperty(value = "删除状态(0-正常,1-删除)")
|
||||||
|
private String delFlag;
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.jero.modules.personal.mapper;
|
||||||
|
|
||||||
|
import com.jero.modules.personal.entity.LawsStandardQa;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 标准问答记录
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-09-08
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface LawsStandardQaMapper extends BaseMapper<LawsStandardQa> {
|
||||||
|
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
package com.jero.modules.personal.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import com.jero.modules.personal.entity.LawsStandardQuestions;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 标准提问
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-09-08
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface LawsStandardQuestionsMapper extends BaseMapper<LawsStandardQuestions> {
|
||||||
|
|
||||||
|
}
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
<?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.jero.modules.personal.mapper.LawsStandardQaMapper">
|
||||||
|
<resultMap id="LawsStandardQaResultMap" type="com.jero.modules.personal.entity.LawsStandardQa">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="create_by" property="createBy" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_by" property="updateBy" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="org_code" property="orgCode" />
|
||||||
|
<result column="questions_id" property="questionsId" />
|
||||||
|
<result column="content" property="content" />
|
||||||
|
<result column="annex" property="annex" />
|
||||||
|
<result column="questioner_id" property="questionerId" />
|
||||||
|
<result column="answerer_id" property="answererId" />
|
||||||
|
<result column="questioner_name" property="questionerName" />
|
||||||
|
<result column="answerer_name" property="answererName" />
|
||||||
|
<result column="record_type" property="recordType" />
|
||||||
|
<result column="reading_status" property="readingStatus" />
|
||||||
|
<result column="recovery_time" property="recoveryTime" />
|
||||||
|
<result column="read_time" property="readTime" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
<?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.jero.modules.personal.mapper.LawsStandardQuestionsMapper">
|
||||||
|
<resultMap id="LawsStandardQuestionsResultMap" type="com.jero.modules.personal.entity.LawsStandardQuestions">
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="create_by" property="createBy" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_by" property="updateBy" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="org_code" property="orgCode" />
|
||||||
|
<result column="title" property="title" />
|
||||||
|
<result column="standard_num" property="standardNum" />
|
||||||
|
<result column="standard_id" property="standardId" />
|
||||||
|
<result column="project_id" property="projectId" />
|
||||||
|
<result column="answerer_id" property="answererId" />
|
||||||
|
<result column="description" property="description" />
|
||||||
|
<result column="occurrence_time" property="occurrenceTime" />
|
||||||
|
<result column="annex" property="annex" />
|
||||||
|
<result column="del_flag" property="delFlag" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
+51
@@ -0,0 +1,51 @@
|
|||||||
|
package com.jero.modules.personal.service;
|
||||||
|
|
||||||
|
import com.jero.modules.personal.entity.LawsStandardQa;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 标准问答记录
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-09-08
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ILawsStandardQaService extends IService<LawsStandardQa> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
IPage<LawsStandardQa> queryPage(LawsStandardQa lawsStandardQa, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*/
|
||||||
|
List<LawsStandardQa> queryList(LawsStandardQa lawsStandardQa, HttpServletRequest req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*/
|
||||||
|
void add(LawsStandardQa lawsStandardQa);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*/
|
||||||
|
void editById(LawsStandardQa lawsStandardQa);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*/
|
||||||
|
void deleteById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*/
|
||||||
|
LawsStandardQa queryById(String id);
|
||||||
|
}
|
||||||
+51
@@ -0,0 +1,51 @@
|
|||||||
|
package com.jero.modules.personal.service;
|
||||||
|
|
||||||
|
import com.jero.modules.personal.entity.LawsStandardQuestions;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 标准提问
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-09-08
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ILawsStandardQuestionsService extends IService<LawsStandardQuestions> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
IPage<LawsStandardQuestions> queryPage(LawsStandardQuestions lawsStandardQuestions, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*/
|
||||||
|
List<LawsStandardQuestions> queryList(LawsStandardQuestions lawsStandardQuestions, HttpServletRequest req);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*/
|
||||||
|
void add(LawsStandardQuestions lawsStandardQuestions);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*/
|
||||||
|
void editById(LawsStandardQuestions lawsStandardQuestions);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*/
|
||||||
|
void deleteById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
void deleteByIds(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*/
|
||||||
|
LawsStandardQuestions queryById(String id);
|
||||||
|
}
|
||||||
+93
@@ -0,0 +1,93 @@
|
|||||||
|
package com.jero.modules.personal.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.jero.modules.personal.entity.LawsStandardQa;
|
||||||
|
import com.jero.modules.personal.mapper.LawsStandardQaMapper;
|
||||||
|
import com.jero.modules.personal.service.ILawsStandardQaService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import com.jero.common.exception.JeroBootException;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 标准问答记录
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-09-08
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Transactional(rollbackFor = JeroBootException.class)
|
||||||
|
public class LawsStandardQaServiceImpl extends ServiceImpl<LawsStandardQaMapper, LawsStandardQa> implements ILawsStandardQaService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public IPage<LawsStandardQa> queryPage(LawsStandardQa lawsStandardQa, Integer pageNo, Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<LawsStandardQa> queryWrapper = QueryGenerator.initQueryWrapper(lawsStandardQa, req.getParameterMap());
|
||||||
|
Page<LawsStandardQa> page = new Page<>(pageNo, pageSize);
|
||||||
|
return page(page, queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<LawsStandardQa> queryList(LawsStandardQa lawsStandardQa, HttpServletRequest req) {
|
||||||
|
return list(QueryGenerator.initQueryWrapper(lawsStandardQa, req.getParameterMap()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void add(LawsStandardQa lawsStandardQa) {
|
||||||
|
Date now = new Date();
|
||||||
|
lawsStandardQa.setCreateTime(now);
|
||||||
|
lawsStandardQa.setUpdateTime(now);
|
||||||
|
save(lawsStandardQa);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void editById(LawsStandardQa lawsStandardQa) {
|
||||||
|
Date now = new Date();
|
||||||
|
lawsStandardQa.setUpdateTime(now);
|
||||||
|
saveOrUpdate(lawsStandardQa);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteById(String id) {
|
||||||
|
removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<String> ids) {
|
||||||
|
removeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public LawsStandardQa queryById(String id) {
|
||||||
|
return getById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
+99
@@ -0,0 +1,99 @@
|
|||||||
|
package com.jero.modules.personal.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.jero.modules.personal.entity.LawsStandardQuestions;
|
||||||
|
import com.jero.modules.personal.mapper.LawsStandardQuestionsMapper;
|
||||||
|
import com.jero.modules.personal.service.ILawsStandardQaService;
|
||||||
|
import com.jero.modules.personal.service.ILawsStandardQuestionsService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import com.jero.common.exception.JeroBootException;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 标准提问
|
||||||
|
* @Author: jero-boot
|
||||||
|
* @Date: 2023-09-08
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Transactional(rollbackFor = JeroBootException.class)
|
||||||
|
public class LawsStandardQuestionsServiceImpl extends ServiceImpl<LawsStandardQuestionsMapper, LawsStandardQuestions> implements ILawsStandardQuestionsService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ILawsStandardQaService lawsStandardQaService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public IPage<LawsStandardQuestions> queryPage(LawsStandardQuestions lawsStandardQuestions, Integer pageNo, Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<LawsStandardQuestions> queryWrapper = QueryGenerator.initQueryWrapper(lawsStandardQuestions, req.getParameterMap());
|
||||||
|
Page<LawsStandardQuestions> page = new Page<>(pageNo, pageSize);
|
||||||
|
return page(page, queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<LawsStandardQuestions> queryList(LawsStandardQuestions lawsStandardQuestions, HttpServletRequest req) {
|
||||||
|
return list(QueryGenerator.initQueryWrapper(lawsStandardQuestions, req.getParameterMap()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void add(LawsStandardQuestions lawsStandardQuestions) {
|
||||||
|
Date now = new Date();
|
||||||
|
lawsStandardQuestions.setCreateTime(now);
|
||||||
|
lawsStandardQuestions.setUpdateTime(now);
|
||||||
|
save(lawsStandardQuestions);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void editById(LawsStandardQuestions lawsStandardQuestions) {
|
||||||
|
Date now = new Date();
|
||||||
|
lawsStandardQuestions.setUpdateTime(now);
|
||||||
|
saveOrUpdate(lawsStandardQuestions);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteById(String id) {
|
||||||
|
removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<String> ids) {
|
||||||
|
removeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public LawsStandardQuestions queryById(String id) {
|
||||||
|
return getById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user