mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
restful http请求方法错误修正
This commit is contained in:
+2
-2
@@ -34,14 +34,14 @@ public class AdvertisementController {
|
||||
private AdvertisementService advertisementService;
|
||||
|
||||
|
||||
@PutMapping("")
|
||||
@PostMapping("")
|
||||
@Operation(summary = "新建广告")
|
||||
public CommonResult<Long> createAdvertisement(@Valid @RequestBody AdvertisementSaveReqVO createReqVO) {
|
||||
return success(advertisementService.create(createReqVO));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("")
|
||||
@PutMapping("")
|
||||
@Operation(summary = "更新广告")
|
||||
public CommonResult<Boolean> updateAdvertisement(@Valid @RequestBody AdvertisementSaveReqVO reqVO) {
|
||||
advertisementService.update(reqVO);
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -37,7 +37,7 @@ public class ProductDelayController {
|
||||
@Resource
|
||||
private ProductDelayService productDelayService;
|
||||
|
||||
@PutMapping()
|
||||
@PostMapping()
|
||||
@Operation(summary = "新增组织延期")
|
||||
public CommonResult<Long> createProductDelay(@RequestBody @Valid ProductDelaySaveReqVO productDelaySaveReqVO){
|
||||
return success(productDelayService.createProductDelay(productDelaySaveReqVO));
|
||||
|
||||
+2
-2
@@ -28,13 +28,13 @@ public class ProductPromotionController {
|
||||
@Resource
|
||||
private ProductPromotionService productPromotionService;
|
||||
|
||||
@PutMapping("")
|
||||
@PostMapping("")
|
||||
@Operation(summary = "新建优惠活动")
|
||||
public CommonResult<Long> createProductPromotion(@Valid @RequestBody ProductPromotionSaveReqVO createReqVO) {
|
||||
return success(productPromotionService.create(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("")
|
||||
@PutMapping("")
|
||||
@Operation(summary = "更新优惠活动")
|
||||
public CommonResult<Boolean> updateProductPromotion(@Valid @RequestBody ProductPromotionSaveReqVO updateReqVO) {
|
||||
productPromotionService.update(updateReqVO);
|
||||
|
||||
+4
-4
@@ -32,20 +32,20 @@ public class ProductsController {
|
||||
@Resource
|
||||
private ProductsService productsService;
|
||||
|
||||
@PutMapping("")
|
||||
@PostMapping("")
|
||||
@Operation(summary = "新建产品")
|
||||
public CommonResult<Long> createProducts(@Valid @RequestBody ProductSaveReqVO updateReqVO) {
|
||||
return success(productsService.create(updateReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("")
|
||||
@PutMapping("")
|
||||
@Operation(summary = "更新产品")
|
||||
public CommonResult<Boolean> updateProducts(@Valid @RequestBody ProductSaveReqVO updateReqVO) {
|
||||
productsService.update(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/freeze")
|
||||
@PutMapping("/freeze")
|
||||
@Operation(summary = "下架产品")
|
||||
public CommonResult<Boolean> freezeProducts(@Valid Long id) {
|
||||
ProductSaveReqVO updateReqVO = new ProductSaveReqVO().setId(id).setStatus(ProductStatusEnum.PRODUCT_DELIS.getStatus());
|
||||
@@ -53,7 +53,7 @@ public class ProductsController {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/melt")
|
||||
@PutMapping("/melt")
|
||||
@Operation(summary = "上架产品")
|
||||
public CommonResult<Boolean> meltProducts(@Valid Long id) {
|
||||
ProductSaveReqVO updateReqVO = new ProductSaveReqVO().setId(id).setStatus(ProductStatusEnum.PRODUCT_UPDATES.getStatus());
|
||||
|
||||
+2
-2
@@ -34,13 +34,13 @@ public class ProductsDetailController {
|
||||
@Resource
|
||||
private PurchaseService purchaseService;
|
||||
|
||||
@PutMapping("")
|
||||
@PostMapping("")
|
||||
@Operation(summary = "新建产品明细")
|
||||
public CommonResult<Long> createProductsDetails(@Valid @RequestBody ProductDetailsSaveReqVO createReqVO) {
|
||||
return success(productDetailsService.create(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("")
|
||||
@PutMapping("")
|
||||
@Operation(summary = "更新产品明细")
|
||||
public CommonResult<Boolean> updateProductsDetails(@Valid @RequestBody ProductDetailsSaveReqVO updateReqVO) {
|
||||
productDetailsService.update(updateReqVO);
|
||||
|
||||
Reference in New Issue
Block a user