Commit 9f2d188a55daf6c480d63a616116e1e2d4946552
1 parent
1ddc0a16
v
Showing
3 changed files
with
7 additions
and
7 deletions
src/main/java/com/diligrp/xtrade/order/exception/OrderExceptionHandler.java
@@ -16,6 +16,6 @@ public class OrderExceptionHandler { | @@ -16,6 +16,6 @@ public class OrderExceptionHandler { | ||
16 | @ResponseBody | 16 | @ResponseBody |
17 | @ExceptionHandler({OrderException.class}) | 17 | @ExceptionHandler({OrderException.class}) |
18 | public Message<?> handleOrderException(OrderException ex) { | 18 | public Message<?> handleOrderException(OrderException ex) { |
19 | - return Message.builder().failure(ex.getCode(), ex.getMessage()); | 19 | + return Message.failure(ex.getCode(), ex.getMessage()); |
20 | } | 20 | } |
21 | } | 21 | } |
src/main/java/com/diligrp/xtrade/product/controllor/ProductApiControllor.java
@@ -21,17 +21,17 @@ public class ProductApiControllor { | @@ -21,17 +21,17 @@ public class ProductApiControllor { | ||
21 | @RequestMapping(value = "/createProduct") | 21 | @RequestMapping(value = "/createProduct") |
22 | public Message createOrder(@RequestBody ProductCreateRequestDto productCreateRequestDto) { | 22 | public Message createOrder(@RequestBody ProductCreateRequestDto productCreateRequestDto) { |
23 | productService.createProduct(productCreateRequestDto); | 23 | productService.createProduct(productCreateRequestDto); |
24 | - return Message.builder().success(); | 24 | + return Message.success(); |
25 | } | 25 | } |
26 | 26 | ||
27 | @RequestMapping(value = "/listProducts") | 27 | @RequestMapping(value = "/listProducts") |
28 | public Message listOrders(@RequestBody ProductQueryRequestDto productQueryRequestDto) { | 28 | public Message listOrders(@RequestBody ProductQueryRequestDto productQueryRequestDto) { |
29 | - return Message.builder().success(productService.orderLists(productQueryRequestDto)); | 29 | + return Message.success(productService.orderLists(productQueryRequestDto)); |
30 | } | 30 | } |
31 | 31 | ||
32 | @RequestMapping(value = "/productDetail") | 32 | @RequestMapping(value = "/productDetail") |
33 | public Message orderDetail(@RequestBody ProductQueryRequestDto productQueryRequestDto) { | 33 | public Message orderDetail(@RequestBody ProductQueryRequestDto productQueryRequestDto) { |
34 | - return Message.builder().success(productService.orderDetail(productQueryRequestDto)); | 34 | + return Message.success(productService.orderDetail(productQueryRequestDto)); |
35 | } | 35 | } |
36 | 36 | ||
37 | } | 37 | } |
src/main/java/com/diligrp/xtrade/product/controllor/ShopController.java
@@ -36,7 +36,7 @@ public class ShopController { | @@ -36,7 +36,7 @@ public class ShopController { | ||
36 | @RequestMapping("save") | 36 | @RequestMapping("save") |
37 | public Message<?> save(ShopDto shop){ | 37 | public Message<?> save(ShopDto shop){ |
38 | shopService.insert(shop); | 38 | shopService.insert(shop); |
39 | - return Message.builder().success(); | 39 | + return Message.success(); |
40 | } | 40 | } |
41 | 41 | ||
42 | /** | 42 | /** |
@@ -49,7 +49,7 @@ public class ShopController { | @@ -49,7 +49,7 @@ public class ShopController { | ||
49 | */ | 49 | */ |
50 | @RequestMapping("get/{shopId}") | 50 | @RequestMapping("get/{shopId}") |
51 | public Message<ShopDo> get(@PathVariable Long shopId){ | 51 | public Message<ShopDo> get(@PathVariable Long shopId){ |
52 | - return Message.builder().success(shopService.selectByShopId(shopId)); | 52 | + return Message.success(shopService.selectByShopId(shopId)); |
53 | } | 53 | } |
54 | 54 | ||
55 | /** | 55 | /** |
@@ -63,6 +63,6 @@ public class ShopController { | @@ -63,6 +63,6 @@ public class ShopController { | ||
63 | @RequestMapping("selectShopByMerId/{merId}") | 63 | @RequestMapping("selectShopByMerId/{merId}") |
64 | public Message<?> selectShopByMerId(@PathVariable Long merId){ | 64 | public Message<?> selectShopByMerId(@PathVariable Long merId){ |
65 | List<ShopDo> shopDos = shopService.selectShopByMerId(merId); | 65 | List<ShopDo> shopDos = shopService.selectShopByMerId(merId); |
66 | - return Message.builder().success(shopDos); | 66 | + return Message.success(shopDos); |
67 | } | 67 | } |
68 | } | 68 | } |