Browse Source

设备子系统----接口注解变更

zhoudazhuang 1 năm trước cách đây
mục cha
commit
fd92acae8b

+ 2 - 1
cx-equipment/cx-equipment-server/src/main/java/com/rongwei/bsserver/sys/controller/EquOverhaulInventoryController.java

@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 import java.util.Map;
 
@@ -21,7 +22,7 @@ import java.util.Map;
  * @author zdz
  * @since 2023-11-22
  */
-@Controller
+@RestController
 @RequestMapping("/equOverhaulInventory")
 public class EquOverhaulInventoryController {
 

+ 6 - 5
cx-equipment/cx-equipment-server/src/main/java/com/rongwei/bsserver/sys/controller/EquWarrantyProviderController.java

@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
@@ -25,7 +26,7 @@ import javax.servlet.http.HttpServletRequest;
  * @author zdz
  * @since 2023-12-01
  */
-@Controller
+@RestController
 @RequestMapping("/equWarrantyProvider")
 public class EquWarrantyProviderController {
 
@@ -46,10 +47,10 @@ public class EquWarrantyProviderController {
         if (file == null){
             return R.error("文件解析失败");
         }
-//        String errorMsg = checkUtil.fileCheckDetail(file,"2a4972593c094256871805368885e2b2");
-//        if (StringUtils.isNotBlank(errorMsg)){
-//            return R.error(errorMsg);
-//        }
+        String errorMsg = checkUtil.fileCheckDetail(file,"2a4972593c094256871805368885e2b2");
+        if (StringUtils.isNotBlank(errorMsg)){
+            return R.error(errorMsg);
+        }
         return equWarrantyProviderService.importEquWarrantyProvider(file);
     }