|
|
@@ -3,6 +3,7 @@ package com.fdkankan.manage.controller.inner;
|
|
|
import cn.hutool.extra.servlet.ServletUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.dtflys.forest.annotation.Post;
|
|
|
import com.fdkankan.manage.common.CameraTypeEnum;
|
|
|
@@ -19,6 +20,7 @@ import com.fdkankan.manage.vo.request.*;
|
|
|
import com.fdkankan.manage.vo.response.ManageLoginResponse;
|
|
|
import com.fdkankan.manage.vo.response.UserAuthSceneVo;
|
|
|
import com.fdkankan.manage.vo.response.UserShareSceneVo;
|
|
|
+import com.fdkankan.rabbitmq.util.RabbitMqProducer;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -432,4 +434,33 @@ public class InnerAPIController extends BaseController {
|
|
|
}
|
|
|
return ResultData.ok(map);
|
|
|
}
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ RabbitMqProducer rabbitMqProducer;
|
|
|
+
|
|
|
+ @PostMapping("/updateKno")
|
|
|
+ public ResultData updateKno(@RequestBody ManageLoginRequest param){
|
|
|
+ if(StringUtils.isBlank(param.getProjectId())){
|
|
|
+ throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
+ }
|
|
|
+ LambdaQueryWrapper<ScenePlus> sceneQw = new LambdaQueryWrapper<>();
|
|
|
+ sceneQw.eq(ScenePlus::getTaskId,param.getProjectId());
|
|
|
+ List<ScenePlus> list = scenePlusService.list(sceneQw);
|
|
|
+ if(list == null || list.isEmpty()){
|
|
|
+ throw new BusinessException(ResultCode.SCENE_NOT_EXIST);
|
|
|
+ }
|
|
|
+ ScenePlus scenePlus = list.get(0);
|
|
|
+
|
|
|
+
|
|
|
+ LambdaUpdateWrapper<ScenePlus> wrapper = new LambdaUpdateWrapper<>();
|
|
|
+ wrapper.eq(ScenePlus::getTaskId,param.getProjectId());
|
|
|
+ wrapper.set(ScenePlus::getKNo,param.getKno());
|
|
|
+ scenePlusService.update(wrapper);
|
|
|
+ HashMap<String,Object> map = new HashMap<>();
|
|
|
+ map.put("num",scenePlus.getNum());
|
|
|
+ map.put("kNo",param.getKno());
|
|
|
+ //rabbitMqProducer.sendByWorkQueue("queue-aj-add-scene",map);
|
|
|
+
|
|
|
+ return ResultData.ok();
|
|
|
+ }
|
|
|
}
|