|
@@ -15,6 +15,8 @@ import io.swagger.annotations.ApiResponse;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import javax.validation.Valid;
|
|
|
+
|
|
|
@RestController
|
|
|
@RequestMapping("/web/price")
|
|
|
public class ProductTypePriceController extends BaseController {
|
|
@@ -28,7 +30,7 @@ public class ProductTypePriceController extends BaseController {
|
|
|
})
|
|
|
@ApiResponse(code = 0, message = "操作成功")
|
|
|
@PostMapping("/save")
|
|
|
- private ResponseBase save(@RequestBody ProductTypePriceWithBLOBs productTypePriceWithBLOBs){
|
|
|
+ private ResponseBase save(@RequestBody @Valid ProductTypePriceWithBLOBs productTypePriceWithBLOBs){
|
|
|
int i = productTypePriceService.saveSelective(productTypePriceWithBLOBs);
|
|
|
if (i < 1){
|
|
|
return responseResultFailure();
|