From 8cd7afb86cc0f327360387458b85cb77f29b0db8 Mon Sep 17 00:00:00 2001 From: wei-chun-Nien <116613597+wei-chun-Nien@users.noreply.github.com> Date: Tue, 2 Jan 2024 17:51:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E4=BB=A5=E8=B2=B7=E8=87=AA?= =?UTF-8?q?=E5=B7=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auction/spring/product/controller/ProductController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ntou/auction/spring/product/controller/ProductController.java b/src/main/java/ntou/auction/spring/product/controller/ProductController.java index c62c06d..4277b69 100644 --- a/src/main/java/ntou/auction/spring/product/controller/ProductController.java +++ b/src/main/java/ntou/auction/spring/product/controller/ProductController.java @@ -163,7 +163,7 @@ ResponseEntity> buyProduct(@Valid @RequestBody BuyProductReq Map errorMessage = Collections.singletonMap("message", "只能將不二價商品加入購物車"); Map productNotExistMessage = Collections.singletonMap("message", "商品不存在或無法購買"); - Map violate = Collections.singletonMap("message", "不可以出價自己的商品"); + Map violate = Collections.singletonMap("message", "不可以買自己的商品"); if(Objects.equals(userService.findByUsername(userIdentity.getUsername()).getId(), productService.getID(request.getProductID()).getSellerID())){ return ResponseEntity.badRequest().body(violate);