From 5fe926d5732b9553fb9625813969cabf59868210 Mon Sep 17 00:00:00 2001 From: lc <15038716315@163.com> Date: Thu, 11 Apr 2024 16:30:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E9=A1=B9=E7=9B=AE=E5=8F=8A=E7=BB=B4=E4=BF=9D?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=A0=B9=E6=8D=AE=E5=88=9B=E5=BB=BA=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/abuwxapi/WxLoginController.java | 21 ++++++++++++++++--- .../abuwx/WbMaintenanceInformationMapper.xml | 1 + .../mapper/abuwx/WbProjectMapper.xml | 1 + 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ruoyi-abuwx/src/main/java/com/ruoyi/abuwxapi/WxLoginController.java b/ruoyi-abuwx/src/main/java/com/ruoyi/abuwxapi/WxLoginController.java index fb9627b..2b24fee 100644 --- a/ruoyi-abuwx/src/main/java/com/ruoyi/abuwxapi/WxLoginController.java +++ b/ruoyi-abuwx/src/main/java/com/ruoyi/abuwxapi/WxLoginController.java @@ -176,15 +176,27 @@ public class WxLoginController extends BaseController { return tokenService.createToken(loginUser); } - /** +/* *//** * * * 根据项目id获取维保记录列表 - */ + *//* @RequestMapping("/informationList") public AjaxResult getInformationList(@RequestParam Long projectId) { - return success(wbMaintenanceInformationService.selectWbMaintenanceInformationListByProjectId(projectId)); + return success(wbMaintenanceInformationService.selectWbMaintenanceInformationListByProjectId(projectId)) + .put("total",wbMaintenanceInformationService.selectWbMaintenanceInformationListByProjectId(projectId).size()); + }*/ + + /** + * 小程序分页查询维保记录列表 + */ + @GetMapping("/informationList") + public TableDataInfo list(WbMaintenanceInformation wbMaintenanceInformation) + { + startPage(); + List list = wbMaintenanceInformationService.selectWbMaintenanceInformationList(wbMaintenanceInformation); + return getDataTable(list); } /** @@ -239,6 +251,9 @@ public class WxLoginController extends BaseController { */ @RequestMapping("/selectWXuserRole") public AjaxResult selectWXuserRole(@RequestParam String openid){ + if (StringUtils.isEmpty(openid)){ + return AjaxResult.error("请登录!"); + } //获取当前用户信息 SysUser user = iSysUserService.selectUserByopenid(openid); if(user == null){ diff --git a/ruoyi-abuwx/src/main/resources/mapper/abuwx/WbMaintenanceInformationMapper.xml b/ruoyi-abuwx/src/main/resources/mapper/abuwx/WbMaintenanceInformationMapper.xml index e04d8db..12cb0af 100644 --- a/ruoyi-abuwx/src/main/resources/mapper/abuwx/WbMaintenanceInformationMapper.xml +++ b/ruoyi-abuwx/src/main/resources/mapper/abuwx/WbMaintenanceInformationMapper.xml @@ -31,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and image_url = #{imageUrl} and file_url = #{fileUrl} + order by create_time desc