重构账户与商户服务模块

- 移除旧版 account.go 文件中的账户服务实现
- 新增聚合扫码关单、退款、撤销等接口实现
- 新增聚合被扫、主扫及加密接口实现
- 新增交易查询与支付宝吱口令申请接口
- 重构统一退货及退货查询接口,优化泛型使用
- 移除旧版商户进件相关接口实现
- 调整部分服务结构体命名与参数传递方式
- 统一请求时间格式并优化代码结构
This commit is contained in:
2025-10-21 13:24:24 +08:00
parent 7777630306
commit 7b9657a9e8
62 changed files with 1061 additions and 2040 deletions
+6 -13
View File
@@ -6,21 +6,19 @@ import (
"github.com/gogf/gf/v2/os/gtime"
)
type RefundQuery[T any] struct {
client *common.Client[T]
type RefundQuery struct {
client *common.Client[ResponseRefundQuery]
}
// NewRefundQuery 创建统一退货查询API实例
func NewRefundQuery[T any](client *common.Client[T]) *RefundQuery[T] {
return &RefundQuery[T]{
func NewRefundQuery(client *common.Client[ResponseRefundQuery]) *RefundQuery {
return &RefundQuery{
client: client,
}
}
// RefundQuery 发起统一退货查询请求
func (api *RefundQuery[T]) RefundQuery(req *RequestDataRefundQuery) (*T, error) {
// 构建请求参数
url := consts.BASE_URL + consts.LKL_UNIFIED_RETURN_REFUND_QUERY_URL
func (api *RefundQuery) RefundQuery(req *RequestDataRefundQuery) (*ResponseRefundQuery, error) {
// 构建BaseModel请求
baseReq := RequestRefundQuery{
ReqTime: gtime.Now().Format("YmdHis"),
@@ -28,10 +26,5 @@ func (api *RefundQuery[T]) RefundQuery(req *RequestDataRefundQuery) (*T, error)
ReqData: req,
}
// 发送请求
respBody, err := api.client.DoRequest(url, baseReq)
if err != nil {
return nil, err
}
return respBody, nil
return api.client.DoRequest(consts.BASE_URL+consts.LKL_UNIFIED_RETURN_REFUND_QUERY_URL, baseReq)
}