瀏覽代碼

http://39.105.112.36/equip-component/floor/query 获取不到项目id bug调整

lvxianyun 3 年之前
父節點
當前提交
10e2fc977d
共有 1 個文件被更改,包括 3 次插入5 次删除
  1. 3 5
      src/main/java/com/persagy/proxy/adm/controller/AdmEquipFloorController.java

+ 3 - 5
src/main/java/com/persagy/proxy/adm/controller/AdmEquipFloorController.java

@@ -1,17 +1,15 @@
 package com.persagy.proxy.adm.controller;
 
-import com.persagy.proxy.adm.constant.AdmCommonConstant;
 import com.persagy.proxy.adm.model.AdmFloor;
 import com.persagy.proxy.adm.request.AdmQueryCriteria;
 import com.persagy.proxy.adm.request.AdmResponse;
 import com.persagy.proxy.adm.service.IAdmFloorService;
+import com.persagy.proxy.adm.utils.AdmContextUtil;
 import com.persagy.proxy.common.entity.InstanceUrlParam;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
 
-import javax.ws.rs.QueryParam;
-
 /**
  * @author zhangwencheng
  * 楼层相关接口
@@ -32,8 +30,8 @@ public class AdmEquipFloorController {
      *级联对象:建筑(building)、项目(project)、楼层贯通关系(floorThroughList)
      */
     @PostMapping("/query")
-    public AdmResponse query(@RequestBody AdmQueryCriteria criteria,  @RequestParam("projectId") String projectId) {
-        InstanceUrlParam context = new InstanceUrlParam(groupCode, null, projectId, AdmCommonConstant.APP_ID);
+    public AdmResponse query(@RequestBody AdmQueryCriteria criteria) {
+        InstanceUrlParam context = AdmContextUtil.toDmpContext();
         criteria.setName(AdmFloor.OBJ_TYPE);
         return service.doQuery(context, criteria, AdmFloor.class);
     }