From 5351125ee13310b119844b6cb4ec01f99f8ed5fc Mon Sep 17 00:00:00 2001 From: ljt <18301674552@163.com> Date: Fri, 22 Mar 2024 16:00:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8F=AF=E7=96=91=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OcrTaskchildDubiousFileController.java | 46 ++++++------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildDubiousFileController.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildDubiousFileController.java index 5b091ce1..2d7fc78e 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildDubiousFileController.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildDubiousFileController.java @@ -60,7 +60,8 @@ public class OcrTaskchildDubiousFileController { @RequestMapping(value = "/dubiousfilelist", method = RequestMethod.GET) public ResultVo dubiousfilelist(HttpServletRequest request, @RequestParam(value = "pageNo", required = false, defaultValue = "0") int pageNo, - @RequestParam(value = "pageSize", required = false, defaultValue = "10") int pageSize) { + @RequestParam(value = "pageSize", required = false, defaultValue = "10") int pageSize, + @RequestParam(value = "orderbyname", required = true, defaultValue = "0") String orderbyname) { UserToken userToken = this.userTokenService.getUserToken(RequestBaseUtil.getToken(request)); @@ -80,6 +81,17 @@ public class OcrTaskchildDubiousFileController { wrapper.in("ID",list.stream().map(i->i.getPictureId()).collect(Collectors.toList())); + if(orderbyname.equals("desc")){ + wrapper.orderByDesc("create_time"); + }else { + wrapper.orderByAsc("create_time"); + } + + + + + + //执行查询方法 IPage page = ocrpictureservice.page(iPage, wrapper); @@ -121,36 +133,6 @@ public class OcrTaskchildDubiousFileController { boolean b = ocrTaskchildDubiousFileService.removeByIds(fileList); return ResultVoUtil.success(b); } - -// /** -// * 通过 ID 查询 单条 信息 -// * -// * @param request -// * @param id 编号 -// * @return -// */ -// @RequestMapping(value = "", method = RequestMethod.GET) -// public ResponseEntity findById(HttpServletRequest request, @PathVariable("id") Integer id) { -// //获取用户信息 -// User user = userService.getUserInfo(request); -// OcrTaskchildDubiousFile ocrTaskchildDubiousFile= ocrTaskchildDubiousFileService.selectById(id); -// return new ResponseEntity(ocrTaskchildDubiousFile, HttpStatus.OK); -// } -// -// /** 修改操作 -// * @param request -// * @param ocrTaskchildDubiousFile -// * @return -// */ -// @RequestMapping(value = "", method = RequestMethod.PATCH) -// public ResponseEntity update(HttpServletRequest request, @RequestBody OcrTaskchildDubiousFile ocrTaskchildDubiousFile) { -// //获取用户信息 -// User user = userService.getUserInfo(request); -// ocrTaskchildDubiousFileService.insertOrUpdate(ocrTaskchildDubiousFile); -// //此处需要手工处理 返回需要将修改后的数据返回 -// return new ResponseEntity(HttpStatus.CREATED); -// } - /** * 添加 * @param request @@ -177,7 +159,7 @@ public class OcrTaskchildDubiousFileController { ocrtaskchilddubiousfile.setCreatedate(System.currentTimeMillis()); QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.select("PICTUREID as pictureid").eq("ID",asd); + wrapper.eq("ID",asd); OcrTaskchildPicture one = ocrtaskchildpictureservice.getOne(wrapper); ocrtaskchilddubiousfile.setPictureId(one.getPictureid()); From b9acf812becba401d3afb56648e84324ed85b384 Mon Sep 17 00:00:00 2001 From: ljt <18301674552@163.com> Date: Fri, 22 Mar 2024 16:48:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=A7=BB=E5=85=A5=E5=8F=AF=E7=96=91?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B9=E5=92=8C=E5=A2=9E=E5=8A=A0=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocr/controller/OcrTaskchildDubiousFileController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildDubiousFileController.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildDubiousFileController.java index 2d7fc78e..e2c7f58f 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildDubiousFileController.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/controller/OcrTaskchildDubiousFileController.java @@ -130,8 +130,8 @@ public class OcrTaskchildDubiousFileController { //根据具体情况 判断 是否需要 进行数据返回, 默认不返回数据 - boolean b = ocrTaskchildDubiousFileService.removeByIds(fileList); - return ResultVoUtil.success(b); + + return ocrTaskchildDubiousFileService.removeByIds(fileList)?ResultVoUtil.success():ResultVoUtil.error(); } /** * 添加 @@ -171,8 +171,8 @@ public class OcrTaskchildDubiousFileController { list.add(ocrtaskchilddubiousfile); } - boolean b = ocrTaskchildDubiousFileService.saveBatch(list); - return ResultVoUtil.success(b); + + return ocrTaskchildDubiousFileService.saveBatch(list)?ResultVoUtil.success():ResultVoUtil.error(); } }