Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 9 months ago
parent
commit
940a0aad71
  1. 5
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotServiceImpl.java
  2. 6
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml

5
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<RobotMapper, RobotEntity>
public RobotVO getDetailByUserId(Long userId){
RobotEntity query = new RobotEntity();
query.setUserId(userId);
RobotEntity robot = getOne(Condition.getQueryWrapper(query));
QueryWrapper<RobotEntity> queryWrapper = Condition.getQueryWrapper(query);
queryWrapper.lambda().last("limit 1;");
RobotEntity robot = getOne(queryWrapper);
RobotVO re = RobotWrapper.build().entityVO(robot);
return re;
}

6
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.xml

@ -30,6 +30,12 @@
<if test="task.keepOnRecord != null">
and t.KEEP_ON_RECORD=#{task.keepOnRecord}
</if>
<if test="task.createDept != null">
and t.CREATE_DEPT=#{task.createDept}
</if>
<if test="task.autoVideo != null">
and t.AUTO_VIDEO=#{task.autoVideo}
</if>
</sql>

Loading…
Cancel
Save