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} +