From 9dfd9506d0743a22d404046ffe7cda6081404a8a Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Tue, 30 Jun 2026 17:09:36 +0800
Subject: [PATCH] feat(order): 添加XT支付功能和确认收款功能
---
src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java | 61 ++++++++++++++++++++++++++++++
1 files changed, 61 insertions(+), 0 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java b/src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java
index 7432165..00cd1b2 100644
--- a/src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java
+++ b/src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java
@@ -33,6 +33,7 @@
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;
@@ -41,6 +42,7 @@
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.util.Arrays;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -134,6 +136,65 @@
return new FebsResponse().success().message("保存成功");
}
+ @PostMapping(value = "/payLink")
+ @ControllerEndpoint(operation = "保存付款链接配置")
+ public FebsResponse payLink(PayLinkDto dto) {
+ if (StrUtil.isBlank(dto.getXtLink())) {
+ return new FebsResponse().fail().message("付款链接不能为空");
+ }
+ if (StrUtil.isBlank(dto.getXtLinkImg())) {
+ return new FebsResponse().fail().message("付款链接图片不能为空");
+ }
+ commonService.addDataDic("PAY_LINK", "XT_LINK", dto.getXtLink(), "付款链接", false);
+ commonService.addDataDic("PAY_LINK", "XT_LINK_IMG", dto.getXtLinkImg(), "付款链接图片", false);
+ return new FebsResponse().success().message("保存成功");
+ }
+
+ @GetMapping(value = "/moneyChangeList")
+ public FebsResponse moneyChangeList() {
+ List<DataDictionaryCustom> list = dataDictionaryCustomMapper.selectDicByType("MONEY_CHANGE");
+ Map<String, Object> data = new HashMap<>();
+ data.put("rows", list);
+ data.put("total", list.size());
+ return new FebsResponse().success().data(data);
+ }
+
+ @PostMapping(value = "/moneyChangeSave")
+ @ControllerEndpoint(operation = "保存汇率配置")
+ public FebsResponse moneyChangeSave(@RequestParam Map<String, String> params) {
+ String id = params.get("id");
+ String code = params.get("code");
+ String value = params.get("value");
+ String description = params.get("description");
+
+ if (StrUtil.isBlank(code)) return new FebsResponse().fail().message("货币编码不能为空");
+ if (StrUtil.isBlank(value)) return new FebsResponse().fail().message("汇率不能为空");
+ if (StrUtil.isBlank(description)) return new FebsResponse().fail().message("符号不能为空");
+
+ code = code.toUpperCase();
+
+ // 编辑模式:先删旧记录
+ if (StrUtil.isNotBlank(id)) {
+ dataDictionaryCustomMapper.deleteById(Long.valueOf(id));
+ }
+
+ // 检查编码是否已存在(避免重复)
+ DataDictionaryCustom exist = dataDictionaryCustomMapper.selectDicDataByTypeAndCode("MONEY_CHANGE", code);
+ if (exist != null) {
+ return new FebsResponse().fail().message("货币编码 " + code + " 已存在");
+ }
+
+ commonService.addDataDic("MONEY_CHANGE", code, value, description, false);
+ return new FebsResponse().success().message("保存成功");
+ }
+
+ @GetMapping(value = "/moneyChangeDelete/{id}")
+ @ControllerEndpoint(operation = "删除汇率配置")
+ public FebsResponse moneyChangeDelete(@PathVariable Long id) {
+ dataDictionaryCustomMapper.deleteById(id);
+ return new FebsResponse().success().message("删除成功");
+ }
+
@GetMapping("countryDeliveryList")
public FebsResponse countryDeliveryList(MallCountryDelivery dto, QueryRequest request) {
Map<String, Object> data = getDataTable(countryDeliveryService.countryDeliveryList(dto, request));
--
Gitblit v1.9.1