Commit 121c6583e5f662fe78d48989d537745a2e5cdcde
1 parent
19ae0675
.
Showing
3 changed files
with
28 additions
and
23 deletions
src/main/java/com/diligrp/xtrade/product/controllor/CategoryController.java
... | ... | @@ -23,37 +23,40 @@ import com.diligrp.xtrade.shared.domain.Message; |
23 | 23 | @RestController |
24 | 24 | @RequestMapping("sapi/category/") |
25 | 25 | public class CategoryController { |
26 | - | |
26 | + | |
27 | 27 | @Autowired |
28 | 28 | private CategoryService categoryService; |
29 | - | |
29 | + | |
30 | 30 | /** |
31 | - * 新增品类 | |
32 | - * @Title insert | |
33 | - * @Description 新增品类 | |
31 | + * | |
32 | + * @Title save | |
33 | + * @Description 保存 | |
34 | 34 | * @param categoryDTO |
35 | 35 | * @return |
36 | 36 | * @throws |
37 | 37 | */ |
38 | + public Message<?> save(CategoryDto categoryDTO) { | |
38 | 39 | categoryService.insert(categoryDTO); |
39 | - return Message.builder().success(); | |
40 | 40 | return Message.success(); |
41 | 41 | } |
42 | + | |
42 | 43 | /** |
43 | - * 修改品类 | |
44 | + * | |
44 | 45 | * @Title update |
45 | - * @Description 修改品类 | |
46 | + * @Description 修改 | |
46 | 47 | * @param categoryDTO |
47 | 48 | * @return |
48 | 49 | * @throws |
49 | 50 | */ |
50 | 51 | @RequestMapping("update") |
51 | - public Message<Object> update(CategoryDto categoryDTO){ categoryService.update(categoryDTO); | |
52 | + public Message<Object> update(CategoryDto categoryDTO) { | |
53 | + categoryService.update(categoryDTO); | |
54 | + return null; | |
52 | 55 | |
53 | 56 | } |
54 | - | |
57 | + | |
55 | 58 | /** |
56 | - * id获取 | |
59 | + * | |
57 | 60 | * @Title get |
58 | 61 | * @Description id获取 |
59 | 62 | * @param id |
... | ... | @@ -61,11 +64,12 @@ public class CategoryController { |
61 | 64 | * @throws |
62 | 65 | */ |
63 | 66 | @RequestMapping("get/{id}") |
64 | - public Message<?> get(@PathVariable Long id){ | |
67 | + public Message<?> get(@PathVariable Long id) { | |
65 | 68 | return Message.success(categoryService.selectEntityById(id)); |
66 | 69 | } |
70 | + | |
67 | 71 | /** |
68 | - * 主键删除 | |
72 | + * | |
69 | 73 | * @Title delect |
70 | 74 | * @Description 主键删除 |
71 | 75 | * @param id |
... | ... | @@ -73,22 +77,22 @@ public class CategoryController { |
73 | 77 | * @throws |
74 | 78 | */ |
75 | 79 | @RequestMapping("delect/{id}") |
76 | - public Message<?> delect(@PathVariable Long id){ | |
80 | + public Message<?> delect(@PathVariable Long id) { | |
77 | 81 | categoryService.delectById(id); |
78 | - return Message.builder().success(); | |
82 | + return Message.success(); | |
79 | 83 | } |
80 | - | |
84 | + | |
81 | 85 | /** |
82 | 86 | * |
83 | 87 | * @Title selectCategoryChild |
84 | 88 | * @Description TODO |
85 | - * @param id | |
89 | + * @param cateCode | |
86 | 90 | * @return |
87 | 91 | * @throws |
88 | 92 | */ |
89 | 93 | @RequestMapping("selectCategoryChild/{cateCode}") |
90 | - public Message<?> selectCategoryChild(@PathVariable String cateCode){ | |
94 | + public Message<?> selectCategoryChild(@PathVariable String cateCode) { | |
91 | 95 | List<CategoryDo> categoryDos = categoryService.selectCateChild(cateCode); |
92 | - return Message.builder().success(categoryDos); | |
96 | + return Message.success(categoryDos); | |
93 | 97 | } |
94 | 98 | } | ... | ... |
src/main/java/com/diligrp/xtrade/product/controllor/ShopController.java
... | ... | @@ -37,10 +37,9 @@ public class ShopController { |
37 | 37 | * @throws |
38 | 38 | */ |
39 | 39 | @RequestMapping("save") |
40 | - | |
41 | 40 | public Message<?> save(@Validated @RequestBody ShopDto shop){ |
42 | 41 | shopService.insert(shop); |
43 | - | |
42 | + return Message.success(); | |
44 | 43 | } |
45 | 44 | |
46 | 45 | /** |
... | ... | @@ -54,7 +53,7 @@ public class ShopController { |
54 | 53 | @RequestMapping("get/{shopId}") |
55 | 54 | |
56 | 55 | public Message<?> get(@PathVariable Long shopId){ |
57 | - | |
56 | + return Message.success(shopService.selectByShopId(shopId)); | |
58 | 57 | } |
59 | 58 | |
60 | 59 | /** |
... | ... | @@ -68,6 +67,7 @@ public class ShopController { |
68 | 67 | @RequestMapping("selectShopByMerId/{merId}") |
69 | 68 | public Message<?> selectShopByMerId(@PathVariable Long merId){ |
70 | 69 | List<ShopDo> shopDos = shopService.selectShopByMerId(merId); |
70 | + return Message.success(shopDos); | |
71 | 71 | |
72 | 72 | } |
73 | 73 | ... | ... |
src/main/java/com/diligrp/xtrade/product/domain/emuns/IKeyGeneratorKeys.java
... | ... | @@ -10,7 +10,8 @@ package com.diligrp.xtrade.product.domain.emuns; |
10 | 10 | public enum IKeyGeneratorKeys { |
11 | 11 | SHOP_SEQUENCE("SHOP_SEQUENCE","店铺id"), |
12 | 12 | MERCHANT_SEQUENCE("MERCHANT_SEQUENCE","市场id"), |
13 | - ACCOUNT_SEQUENCE("ACCOUNT_SEQUENCE","账号id") | |
13 | + ACCOUNT_SEQUENCE("ACCOUNT_SEQUENCE","账号id"), | |
14 | + CATEGORY_SEQUENCE("CATEGORY_SEQUENCE","品类is") | |
14 | 15 | ; |
15 | 16 | |
16 | 17 | private String code; | ... | ... |