From 5807f0d93d9a9f411f067a07f84f1db9a4e87aeb Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Thu, 29 Feb 2024 17:26:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=A3=80=E4=BB=BB=E5=8A=A1=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hnac/hzinfo/inspect/ai/service/impl/RobotServiceImpl.java | 5 ++++- .../main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotServiceImpl.java index e6c3164..c3c14ef 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotServiceImpl.java @@ -1,5 +1,6 @@ package com.hnac.hzinfo.inspect.ai.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.hnac.hzinfo.inspect.ai.vo.RobotVO; import com.hnac.hzinfo.inspect.ai.wrapper.RobotWrapper; import lombok.AllArgsConstructor; @@ -28,7 +29,9 @@ public class RobotServiceImpl extends BaseServiceImpl public RobotVO getDetailByUserId(Long userId){ RobotEntity query = new RobotEntity(); query.setUserId(userId); - RobotEntity robot = getOne(Condition.getQueryWrapper(query)); + QueryWrapper queryWrapper = Condition.getQueryWrapper(query); + queryWrapper.lambda().last("limit 1;"); + RobotEntity robot = getOne(queryWrapper); RobotVO re = RobotWrapper.build().entityVO(robot); return re; } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml index 21fdb28..4c17bba 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml @@ -30,6 +30,12 @@ and t.KEEP_ON_RECORD=#{task.keepOnRecord} + + and t.CREATE_DEPT=#{task.createDept} + + + and t.AUTO_VIDEO=#{task.autoVideo} +