|
@@ -31,30 +31,7 @@ public class RectificationController {
|
|
|
if (Blank.isEmpty(id)) {
|
|
|
return SendUtil.send(false, ConstStr.REQUEST_WRONGPARAMS);
|
|
|
}
|
|
|
- return rectificationService.info(id);
|
|
|
- }
|
|
|
-
|
|
|
- @PostMapping("/front/submit")
|
|
|
- public Map<String, Object> submit(RectificationDO rectificationDO, MultipartFile[] files, HttpSession session) throws IOException {
|
|
|
- String[] o = {"captcha", "errorUrl", "equipment", "mail", "phone", "submitter", "questionDescription", "questionType", "uniqueCode"};
|
|
|
- if (!Blank.checkObjectParamNotNull(rectificationDO, o)) {
|
|
|
- return SendUtil.send(false, ConstStr.REQUEST_WRONGPARAMS);
|
|
|
- }
|
|
|
- if (!Blank.isNotEmpty(files)) {
|
|
|
- return SendUtil.send(false, ConstStr.REQUEST_WRONGPARAMS);
|
|
|
- }
|
|
|
- if (!rectificationDO.getUniqueCode().equals(ConstStr.UNIQUE_CODE)) {
|
|
|
- return SendUtil.send(false, ConstStr.REQUEST_WRONGPARAMS);
|
|
|
- }
|
|
|
- String captcha = (String) session.getAttribute("captcha");
|
|
|
- if (Blank.isNotEmpty(captcha)) {
|
|
|
- if (!captcha.equalsIgnoreCase(rectificationDO.getCaptcha())) {
|
|
|
- return SendUtil.send(false, "验证码错误");
|
|
|
- }
|
|
|
- } else {
|
|
|
- return SendUtil.send(false, "验证码为空");
|
|
|
- }
|
|
|
- return rectificationService.add(rectificationDO, files);
|
|
|
+ return rectificationService.info(id, null, null);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/list")
|
|
@@ -109,6 +86,32 @@ public class RectificationController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * description: 受理问题
|
|
|
+ *
|
|
|
+ * @param id 主键
|
|
|
+ * @return java.util.Map<java.lang.String, java.lang.Object>
|
|
|
+ * @author zwq
|
|
|
+ * @date 2023/1/30 16:19
|
|
|
+ */
|
|
|
+ @PostMapping("/work")
|
|
|
+ public Map<String, Object> work(@RequestBody String id) {
|
|
|
+ return rectificationService.work(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * description: 办结问题
|
|
|
+ *
|
|
|
+ * @param id 主键
|
|
|
+ * @return java.util.Map<java.lang.String, java.lang.Object>
|
|
|
+ * @author zwq
|
|
|
+ * @date 2023/1/30 16:19
|
|
|
+ */
|
|
|
+ @PostMapping("/finish")
|
|
|
+ public Map<String, Object> finish(@RequestBody String id) {
|
|
|
+ return rectificationService.finish(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* description: 前台分页
|
|
|
*
|
|
|
* @param page 分页参数
|
|
@@ -128,28 +131,51 @@ public class RectificationController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * description: 受理问题
|
|
|
- *
|
|
|
- * @param id 主键
|
|
|
- * @return java.util.Map<java.lang.String, java.lang.Object>
|
|
|
+ * description: 查询单条数据
|
|
|
* @author zwq
|
|
|
- * @date 2023/1/30 16:19
|
|
|
+ * @date 2023/1/31 14:29
|
|
|
+ * @param code 编号
|
|
|
+ * @param phone 电话
|
|
|
+ * @return java.util.Map<java.lang.String,java.lang.Object>
|
|
|
*/
|
|
|
- @PostMapping("/work")
|
|
|
- public Map<String, Object> work(@RequestBody String id) {
|
|
|
- return rectificationService.work(id);
|
|
|
+ @GetMapping("/front/search")
|
|
|
+ public Map<String, Object> search(String code, String phone) {
|
|
|
+ if (Blank.isEmpty(code, phone)) {
|
|
|
+ return SendUtil.send(false, ConstStr.REQUEST_WRONGPARAMS);
|
|
|
+ }
|
|
|
+ return rectificationService.info(null, code, phone);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * description: 办结问题
|
|
|
- *
|
|
|
- * @param id 主键
|
|
|
- * @return java.util.Map<java.lang.String, java.lang.Object>
|
|
|
- * @author zwq
|
|
|
- * @date 2023/1/30 16:19
|
|
|
+ * description: 前台提交问题
|
|
|
+ * @author wrh
|
|
|
+ * @date 2023/1/31 14:31
|
|
|
+ * @param rectificationDO 数据
|
|
|
+ * @param files 截图文件
|
|
|
+ * @param session session
|
|
|
+ * @return java.util.Map<java.lang.String,java.lang.Object>
|
|
|
*/
|
|
|
- @PostMapping("/finish")
|
|
|
- public Map<String, Object> finish(@RequestBody String id) {
|
|
|
- return rectificationService.finish(id);
|
|
|
+ @PostMapping("/front/submit")
|
|
|
+ public Map<String, Object> submit(RectificationDO rectificationDO, MultipartFile[] files, HttpSession session) throws IOException {
|
|
|
+ String[] o = {"captcha", "errorUrl", "equipment", "mail", "phone", "submitter", "questionDescription", "questionType", "uniqueCode"};
|
|
|
+ if (!Blank.checkObjectParamNotNull(rectificationDO, o)) {
|
|
|
+ return SendUtil.send(false, ConstStr.REQUEST_WRONGPARAMS);
|
|
|
+ }
|
|
|
+ if (!Blank.isNotEmpty(files)) {
|
|
|
+ return SendUtil.send(false, ConstStr.REQUEST_WRONGPARAMS);
|
|
|
+ }
|
|
|
+ if (!rectificationDO.getUniqueCode().equals(ConstStr.UNIQUE_CODE)) {
|
|
|
+ return SendUtil.send(false, ConstStr.REQUEST_WRONGPARAMS);
|
|
|
+ }
|
|
|
+ String captcha = (String) session.getAttribute("captcha");
|
|
|
+ if (Blank.isNotEmpty(captcha)) {
|
|
|
+ if (!captcha.equalsIgnoreCase(rectificationDO.getCaptcha())) {
|
|
|
+ return SendUtil.send(false, "验证码错误");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return SendUtil.send(false, "验证码为空");
|
|
|
+ }
|
|
|
+ return rectificationService.add(rectificationDO, files);
|
|
|
}
|
|
|
+
|
|
|
}
|