浏览代码

Controller annotation

zhangchenm 1 月之前
父节点
当前提交
e0ec3b7e6e

+ 2 - 2
trade-admin/src/main/java/com/trade/admin/companyrelated/ImporterEntityBController.java

@@ -5,12 +5,12 @@ import javax.validation.constraints.NotNull;
 
 import com.trade.common.core.domain.ResponseResult;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.stereotype.Controller;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import com.trade.service.companyrelated.domain.vo.ImporterEntitySearch;
 import com.trade.service.companyrelated.service.IImporterEntityService;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -20,7 +20,7 @@ import com.trade.service.companyrelated.service.IImporterEntityService;
  * @author zhangchenm
  * @since 2024-09-03
  */
-@Controller
+@RestController
 @RequestMapping("/importerEntityB")
 @Validated
 public class ImporterEntityBController {

+ 2 - 2
trade-admin/src/main/java/com/trade/admin/companyrelated/VendorEntityBController.java

@@ -5,12 +5,12 @@ import javax.validation.constraints.NotNull;
 
 import com.trade.common.core.domain.ResponseResult;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.stereotype.Controller;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import com.trade.service.companyrelated.domain.vo.VendorEntitySearch;
 import com.trade.service.companyrelated.service.IVendorEntityService;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -20,7 +20,7 @@ import com.trade.service.companyrelated.service.IVendorEntityService;
  * @author zhangchenm
  * @since 2024-09-03
  */
-@Controller
+@RestController
 @RequestMapping("/vendorEntityB")
 @Validated
 public class VendorEntityBController {

+ 2 - 2
trade-admin/src/main/java/com/trade/admin/salesorder/SalesOrderBController.java

@@ -4,15 +4,15 @@ import javax.annotation.Resource;
 import javax.validation.constraints.NotNull;
 
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.stereotype.Controller;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import com.trade.common.core.domain.ResponseResult;
 import com.trade.service.salesorder.service.ISalesOrderService;
 import com.trade.service.salesorder.vo.SalesOrderSearch;
+import org.springframework.web.bind.annotation.RestController;
 
-@Controller
+@RestController
 @RequestMapping("/salesOrderB")
 @Validated
 public class SalesOrderBController {

+ 2 - 3
trade-admin/src/main/java/com/trade/admin/salesorder/SalesOrderInvoiceBController.java

@@ -2,10 +2,8 @@ package com.trade.admin.salesorder;
 
 import javax.annotation.Resource;
 import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
 
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.stereotype.Controller;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.RequestMapping;
 
@@ -15,8 +13,9 @@ import com.trade.service.salesorder.service.ISalesOrderInvoiceService;
 import com.trade.service.salesorder.vo.SalesOrderInvoiceDtlVO;
 import com.trade.service.salesorder.vo.SalesOrderInvoiceSearch;
 import com.trade.service.salesorder.vo.SalesOrderInvoiceVO;
+import org.springframework.web.bind.annotation.RestController;
 
-@Controller
+@RestController
 @RequestMapping("/salesOrderInvoiceB")
 @Validated
 public class SalesOrderInvoiceBController {

+ 2 - 2
trade-admin/src/main/java/com/trade/admin/salesorder/SalesOrderLogisticsBController.java

@@ -4,7 +4,6 @@ import javax.annotation.Resource;
 import javax.validation.constraints.NotBlank;
 
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.stereotype.Controller;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.RequestMapping;
 
@@ -14,8 +13,9 @@ import com.trade.service.salesorder.service.ISalesOrderLogisticsService;
 import com.trade.service.salesorder.vo.SalesOrderLogisticsDtlVO;
 import com.trade.service.salesorder.vo.SalesOrderLogisticsSearch;
 import com.trade.service.salesorder.vo.SalesOrderLogisticsVO;
+import org.springframework.web.bind.annotation.RestController;
 
-@Controller
+@RestController
 @RequestMapping("/salesOrderLogisticsB")
 @Validated
 public class SalesOrderLogisticsBController {

+ 2 - 2
trade-client/src/main/java/com/trade/client/companyrelated/controller/ImporterEntityController.java

@@ -7,7 +7,6 @@ import javax.validation.constraints.NotNull;
 import com.github.pagehelper.PageInfo;
 import com.trade.common.core.domain.ResponseResult;
 import org.springframework.http.HttpStatus;
-import org.springframework.stereotype.Controller;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -18,6 +17,7 @@ import com.trade.common.validate.OnCreate;
 import com.trade.common.validate.OnUpdate;
 import com.trade.service.companyrelated.domain.ImporterEntity;
 import com.trade.service.companyrelated.domain.vo.ImporterEntitySearch;
+import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
 
@@ -29,7 +29,7 @@ import java.util.List;
  * @author zhangchenm
  * @since 2024-09-03
  */
-@Controller
+@RestController
 @RequestMapping("/importerEntity")
 public class ImporterEntityController {
 

+ 2 - 2
trade-client/src/main/java/com/trade/client/companyrelated/controller/VendorEntityController.java

@@ -6,7 +6,6 @@ import javax.validation.constraints.NotNull;
 
 import com.trade.common.core.domain.ResponseResult;
 import org.springframework.http.HttpStatus;
-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.ResponseStatus;
@@ -14,6 +13,7 @@ import org.springframework.web.bind.annotation.ResponseStatus;
 import com.trade.client.companyrelated.service.VendorEntityCService;
 import com.trade.service.companyrelated.domain.VendorEntity;
 import com.trade.service.companyrelated.domain.vo.VendorEntitySearch;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -23,7 +23,7 @@ import com.trade.service.companyrelated.domain.vo.VendorEntitySearch;
  * @author zhangchenm
  * @since 2024-09-03
  */
-@Controller
+@RestController
 @RequestMapping("/vendorEntity")
 public class VendorEntityController {
 

+ 2 - 2
trade-client/src/main/java/com/trade/client/salesorder/controller/SalesOrderController.java

@@ -11,8 +11,8 @@ import com.trade.service.salesorder.vo.SalesOrderVO;
 import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.ResponseStatus;
+import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
 import javax.validation.Valid;
@@ -25,7 +25,7 @@ import javax.validation.Valid;
  * @author zhangchenm
  * @since 2024-09-06
  */
-@Controller
+@RestController
 @RequestMapping("/salesOrder")
 public class SalesOrderController {