puzhibing
2026-05-14 4f7fd9e879d9de211b255eb21535a034893ffbff
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
package com.xiaopeng.order.controller;
 
import com.xiaopeng.api.dto.order.UpdateInvoiceStatusDto;
import com.xiaopeng.api.query.order.InvoiceOrdersQuery;
import com.xiaopeng.api.query.order.XpOrderInvoiceQuery;
import com.xiaopeng.api.vo.order.XpInvoiceVo;
import com.xiaopeng.common.core.domain.R;
import com.xiaopeng.common.security.service.TokenService;
import com.xiaopeng.order.service.IXpOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
 
/**
 * <p>
 * 订单 前端控制器
 * </p>
 *
 * @author mitao
 * @since 2026-02-03
 */
@RestController
@Api(tags = "订单发票")
@RequiredArgsConstructor(onConstructor_ = @Lazy)
public class XpInvoiceController {
 
    private final IXpOrderService xpOrderService;
 
    @Resource
    private TokenService tokenService;
 
 
    /**
     * 开票列表数据查询
     *
     * @param query 查询参数
     * @return 开票列表数据查询
     */
    @ApiOperation(value = "开票列表数据查询", tags = {"三方对接"})
    @PostMapping("/logan/order/invoice/invoiceList")
    public R<List<XpInvoiceVo>> invoiceList(@RequestBody @Valid XpOrderInvoiceQuery query) {
        return R.ok(xpOrderService.invoiceList(query));
    }
 
 
    /**
     * 查询开票数据(批量)
     *
     * @param query
     * @return
     */
    @ApiOperation(value = "查询开票数据(批量)", tags = {"三方对接"})
    @PostMapping("/logan/order/invoice/queryInvoiceOrders")
    public R<List<XpInvoiceVo>> queryInvoiceOrders(@RequestBody @Valid InvoiceOrdersQuery query) {
        return R.ok(xpOrderService.queryInvoiceOrders(query));
    }
 
 
    /**
     * 订单状态推送
     */
 
    @ApiOperation(value = "订单状态推送", tags = {"三方对接"})
    @PostMapping("/logan/order/invoice/updateInvoiceStatus")
    public R<?> updateInvoiceStatus(@RequestBody @Valid UpdateInvoiceStatusDto dto) {
        xpOrderService.updateInvoiceStatus(dto);
        return R.ok();
    }
 
 
}