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
package com.panzhihua.applets.api;
 
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.common.EditOrderAddressDto;
import com.panzhihua.common.model.dtos.common.EditOrderLogisticsDto;
import com.panzhihua.common.model.dtos.common.PageComBatteryCommodityOrderDto;
import com.panzhihua.common.model.dtos.common.UserCreateOrderDto;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.common.ComBatteryCommodityOrderVo;
import com.panzhihua.common.service.community.ComBatteryCommodityOrderFeign;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
/**
 * title: 电动车商城-订单表(ComBatteryCommodityOrder)  表控制层
 * <p>
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * <p>
 * description: 电动车商城-订单表
 *
 * @author lyq
 * @date 2022-03-29 16:05:04
 */
@Slf4j
@Api(tags = {"电动车商城-订单管理"})
@RestController
@RequestMapping("/comBatteryCommodityOrder")
public class ComBatteryCommodityOrderApi extends BaseController {
 
    @Resource
    private ComBatteryCommodityOrderFeign comBatteryCommodityOrderService;
 
    /**
     * description  queryByPage  分页查询
     *
     * @param comBatteryCommodityOrder 请求参数
     * @return 分页查询返回参数
     * @author lyq
     * @date 2022-03-29 16:05:04
     */
    @ApiOperation(value = "分页查询订单列表",response = ComBatteryCommodityOrderVo.class)
    @PostMapping("/page")
    public R queryByPage(@RequestBody PageComBatteryCommodityOrderDto comBatteryCommodityOrder) {
        comBatteryCommodityOrder.setUserId(this.getUserId());
        comBatteryCommodityOrder.setIsApplets(1);
        return this.comBatteryCommodityOrderService.queryByPage(comBatteryCommodityOrder);
    }
 
    /**
     * description  detailById  查询详情
     *
     * @param id 主键id
     * @return 详情数据
     * @author lyq
     * @date 2022-03-29 16:05:04
     */
    @ApiOperation(value = "查询订单详情",response = ComBatteryCommodityOrderVo.class)
    @GetMapping("/detail")
    public R detailById(@RequestParam("id") Long id) {
        return this.comBatteryCommodityOrderService.detailById(id);
    }
 
    @ApiOperation(value = "创建订单")
    @PostMapping("/create")
    public R appletsOrderCreate(@RequestBody UserCreateOrderDto createOrderDto) {
        createOrderDto.setUserId(this.getUserId());
        return this.comBatteryCommodityOrderService.appletsOrderCreate(createOrderDto);
    }
 
 
    @ApiOperation(value = "用户确认收货")
    @GetMapping("/receiving")
    public R appletsOrderReceiving(@RequestParam("id") Long id){
        return this.comBatteryCommodityOrderService.appletsOrderReceiving(id,this.getUserId());
    }
}