mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-15 20:59:59 +08:00
update
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.pile.service.OrderBasicInfoService;
|
||||
import com.jsowell.pile.vo.UnsplitOrderFieldsVO;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 内部查询接口(仅供 Task/脚本 调用,不对外暴露鉴权)
|
||||
* 用于 PRE 环境向本地数据库查询订单补齐字段
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/internal/order")
|
||||
public class InternalOrderController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private OrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
/**
|
||||
* 批量查询未分账订单补齐所需字段
|
||||
* POST /internal/order/unsplit-fields
|
||||
* Body: ["C202401010001", "C202401010002", ...]
|
||||
* 返回:order_code, pile_sn, settle_amount, refund_amount
|
||||
*/
|
||||
@PostMapping("/unsplit-fields")
|
||||
public AjaxResult getUnsplitOrderFields(@RequestBody Set<String> orderCodes) {
|
||||
if (CollectionUtils.isEmpty(orderCodes)) {
|
||||
return AjaxResult.error("orderCodes 不能为空");
|
||||
}
|
||||
List<UnsplitOrderFieldsVO> list = orderBasicInfoService.selectUnsplitOrderFields(orderCodes);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
}
|
||||
@@ -299,3 +299,7 @@ dubbo:
|
||||
port: -1
|
||||
consumer:
|
||||
check: false # 关键配置:启动时不检查提供者
|
||||
|
||||
# PRE 环境自身地址(供 Task 调用内部接口补齐订单字段)
|
||||
pre:
|
||||
base-url: http://localhost:8080
|
||||
|
||||
Reference in New Issue
Block a user