mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
package com.panzhihua.service_jinhui_community.api;
 
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.jinhui.JinhuiShoppingOrderVO;
import com.panzhihua.common.model.vos.jinhui.JinhuiShoppingVO;
import com.panzhihua.service_jinhui_community.service.JinhuiShoppingOrderService;
import com.panzhihua.service_jinhui_community.service.JinhuiShoppingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
 
/**
 * 金汇商城商品表
 */
@Slf4j
@RestController
@RequestMapping("/jinhuiShopping")
public class JinhuiShoppingApi extends BaseController
{
 
    @Resource
    private JinhuiShoppingService shoppingService;
 
    @Resource
    private JinhuiShoppingOrderService orderService;
    /**
     * 分页查询
     *
     * @param
     * @return
     */
    @GetMapping("/shoppingGetList")
    public R shoppingGetList(@RequestParam("pageNum") int pageNum,
                     @RequestParam("pageSize") int pageSize,
                     @RequestParam(value = "goodName", required = false) String goodName,
                     @RequestParam(value = "goodType", required = false) String goodType,
                     @RequestParam(value = "id", required = false) String id)
    {
        return shoppingService.getList(pageNum, pageSize, goodName, goodType, id);
    }
 
 
    @GetMapping("/shoppingGetDetails")
    public R shoppingGetDetails(@RequestParam("id") String id,
                                @RequestParam("communityId") String communityId)
    {
        return R.ok(shoppingService.getDetails(id,communityId));
    }
 
    /**
     * 新增
     *
     * @param
     * @return
     */
    @PostMapping("/shoppingAddData")
    public R shoppingAddData(@RequestBody JinhuiShoppingVO item) {
        return shoppingService.addData(item);
    }
 
 
    @PostMapping("/shoppingEditData")
    public R shoppingEditData(@RequestBody JinhuiShoppingVO item) {
        return shoppingService.editData(item);
    }
 
    @DeleteMapping("/shoppingExpurgateData")
    public R shoppingExpurgateData(@RequestParam("id") String id)
    {
        return shoppingService.expurgateData(id);
    }
 
 
    /********************************************************************************************************
     *
     *
     *                         金汇商城商品订单
     *
     *
     ********************************************************************************************************/
 
 
    /**
     * 分页查询
     * @param
     * @return
     */
    @GetMapping("/orderGetList")
    public R orderGetList(@RequestParam("pageNum") int pageNum,
                          @RequestParam("pageSize") int pageSize,
                          @RequestParam(value = "userId", required = false)String userId,
                          @RequestParam(value = "goodsId", required = false)String goodsId,
                          @RequestParam(value = "orderNumber", required = false)String orderNumber,
                          @RequestParam(value = "goodName", required = false)String goodName,
                          @RequestParam(value = "name", required = false)String name,
                          @RequestParam(value = "cancelType", required = false)String cancelType)
    {
        return orderService.getList(pageNum,pageSize,userId,goodsId,orderNumber,
                goodName,name,cancelType,getCommunityId()+"");
    }
 
    /**
     * 分页详情
     * @param
     * @return
     */
    @GetMapping("/orderGetDetails")
    public R orderGetDetails(@RequestParam("id") String id)
    {
        return R.ok(orderService.getDetails(id,getCommunityId()+""));
    }
 
    /**
     * 新增
     * @param
     * @return
     */
    @PostMapping("/orderAddData")
    public R orderAddData(@RequestBody JinhuiShoppingOrderVO item)
    {
        return orderService.addData(item);
    }
 
 
    /**
     * 编辑
     * @param
     * @return
     */
    @PostMapping("/orderEditData")
    public R orderEditData(@RequestBody JinhuiShoppingOrderVO item)
    {
        return orderService.editData(item);
    }
 
 
    /**
     * 取消
     * @param
     * @return
     */
    @GetMapping("/orderCancelOrder")
    public R orderCancelOrder(@RequestParam("orderId") String orderId)
    {
        return orderService.cancelOrder(orderId,getCommunityId()+"");
    }
 
 
    /**
     * 删除
     * @param
     * @return
     */
    @DeleteMapping("/orderExpurgateData")
    public R orderExpurgateData(@RequestParam("id") String id)
    {
        return orderService.expurgateData(id,getCommunityId()+"");
    }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
}