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();
|
}
|
|
|
}
|