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; 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.vo.RobotVO;
import com.hnac.hzinfo.inspect.ai.wrapper.RobotWrapper; import com.hnac.hzinfo.inspect.ai.wrapper.RobotWrapper;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -28,7 +29,9 @@ public class RobotServiceImpl extends BaseServiceImpl<RobotMapper, RobotEntity>
public RobotVO getDetailByUserId(Long userId){ public RobotVO getDetailByUserId(Long userId){
RobotEntity query = new RobotEntity(); RobotEntity query = new RobotEntity();
query.setUserId(userId); 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); RobotVO re = RobotWrapper.build().entityVO(robot);
return re; 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"> <if test="task.keepOnRecord != null">
and t.KEEP_ON_RECORD=#{task.keepOnRecord} and t.KEEP_ON_RECORD=#{task.keepOnRecord}
</if> </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> </sql>

Loading…
Cancel
Save