Browse Source

三维数据接口测试

guarantee-lsq 3 months ago
parent
commit
898bd84f6d

+ 25 - 0
platform-common/src/main/java/com/platform/common/util/StringUtils.java

@@ -367,4 +367,29 @@ public class StringUtils {
         return roleCodes.toString();
     }
 
+    public static String getThreeTestById(String id){
+        String name = "后端数据为空";
+        switch (id){
+            case "Obj3d66-5389849-330-170_4" :
+                name = "楼层大平台";
+                break;
+            case "Obj3d66-5389849-330-170_3" :
+                name = "楼层蓝色小窗户";
+                break;
+            case "Obj3d66-5389849-330-170_5" :
+                name = "卡其色外墙";
+                break;
+            case "Obj3d66-5389849-330-170" :
+                name = "楼层-深卡其色外墙";
+                break;
+            case "Obj3d66-5389849-330-170_7" :
+                name = "楼层平台阳台";
+                break;
+            case "Obj3d66-5389849-330-170_1" :
+                name = "楼层窗户格栅";
+                break;
+        }
+        return name;
+    }
+
 }

+ 0 - 1
platform-rest/src/main/java/com/platform/rest/controller/purchase/PurchaseApplyController.java

@@ -55,7 +55,6 @@ public class PurchaseApplyController {
      */
     @SysLog("新增采购申请")
     @PostMapping
-    @PreAuthorize("@pms.hasPermission('purchase-purchase-applies-add')")
     public R save(@Validated({AddGroup.class}) @RequestBody PurchaseApplyDTO purchaseApplyDTO) {
         return new R<>(purchaseApplyService.saveModel(purchaseApplyDTO));
     }

+ 12 - 0
platform-rest/src/main/java/com/platform/rest/controller/store/InStoreDetailController.java

@@ -1,6 +1,7 @@
 package com.platform.rest.controller.store;
 
 import com.platform.common.util.R;
+import com.platform.common.util.StringUtils;
 import com.platform.dao.dto.store.InStoreDetailDTO;
 import com.platform.dao.entity.store.InStoreDetail;
 import com.platform.service.store.InStoreDetailService;
@@ -43,6 +44,17 @@ public class InStoreDetailController {
       return new R<>(inStoreDetailService.getModelById(id));
   }
 
+  /**
+   * 通过id查询单条记录
+   *
+   * @param id 主键
+   * @return R
+   */
+  @GetMapping("/three/{id}")
+  public R<String> getThreeTest(@PathVariable("id") String id){
+    return new R<>(StringUtils.getThreeTestById(id));
+  }
+
   /**
    * 新增记录
    *

+ 1 - 1
platform-rest/src/main/resources/application-dev.yml

@@ -1,6 +1,6 @@
 server:
   # 端口号
-  port: 5001
+  port: 5000
 
 security:
   oauth2: