From 38e7e1aac6269fa9e280310201263eb1353d6b66 Mon Sep 17 00:00:00 2001 From: zhoujunyao Date: Tue, 23 Sep 2025 16:20:21 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E8=87=AA=E5=8A=A8=E5=88=B7=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E7=9A=84=EF=BC=8C=E8=BF=87=E6=9C=9F=E6=97=B6=E9=97=B4?= =?UTF-8?q?10=E5=B9=B4=E5=8F=981=E5=B9=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/service/bundle/reconciliation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/service/bundle/reconciliation.go b/pkg/service/bundle/reconciliation.go index c1e31df..c3ef61e 100644 --- a/pkg/service/bundle/reconciliation.go +++ b/pkg/service/bundle/reconciliation.go @@ -306,7 +306,7 @@ func AutoCreateUserAndOrder(c *gin.Context) { ) // 当前 未将 签名 写入合同中 todo 金额和有效时间待修改 contract := "https://e-cdn.fontree.cn/fonchain-main/prod/file/saas/contract/template-25032801.pdf" - expirationDay = t.AddDate(10, 0, 0).Format("2006-01-02") + expirationDay = t.AddDate(1, 0, 0).Format("2006-01-02") signContract, signContractErr := logic.SignContractV2(userReq.UserNum, contract, TotalPrice, expirationDay) if signContractErr != nil { service.Error(c, signContractErr) From 6e6f159b23993de5576d03fa6f807e3dc04f9344 Mon Sep 17 00:00:00 2001 From: JNG <365252428@qq.com> Date: Wed, 24 Sep 2025 16:07:23 +0800 Subject: [PATCH 2/3] Update reconciliation.go --- pkg/service/bundle/reconciliation.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/service/bundle/reconciliation.go b/pkg/service/bundle/reconciliation.go index c3ef61e..ea1e5f0 100644 --- a/pkg/service/bundle/reconciliation.go +++ b/pkg/service/bundle/reconciliation.go @@ -92,7 +92,7 @@ func GetReconciliationListDownload(c *gin.Context) { } } titleList := []string{ - "关联套餐订单号", "关联增值服务订单号", "对账单创建时间", "用户编号", "艺人", "艺人手机号", "套餐", "支付金额", "手续费", "币种", "支付渠道", "支付时间", "支付状态", "流水号", + "关联套餐订单号", "关联增值服务订单号", "用户编号", "艺人", "艺人手机号", "套餐", "支付金额", "手续费", "币种", "支付渠道", "支付时间", "支付状态", "流水号", } var dataList []interface{} @@ -106,7 +106,7 @@ func GetReconciliationListDownload(c *gin.Context) { data := []any{ i.BundleOrderOn, i.BundleAddOrderOn, - i.CreationTime, + //i.CreationTime, i.SubNum, i.UserName, i.UserTel, From 9f7e2d166770dba6cdc8521ae0c4f07d3d09e1d5 Mon Sep 17 00:00:00 2001 From: JNG <365252428@qq.com> Date: Sun, 28 Sep 2025 14:41:24 +0800 Subject: [PATCH 3/3] Update reconciliation.go --- pkg/service/bundle/reconciliation.go | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/pkg/service/bundle/reconciliation.go b/pkg/service/bundle/reconciliation.go index ea1e5f0..6e3aab8 100644 --- a/pkg/service/bundle/reconciliation.go +++ b/pkg/service/bundle/reconciliation.go @@ -24,6 +24,32 @@ func GetReconciliationList(c *gin.Context) { service.Error(c, err) return } + res := &bundle.GetReconciliationListResp{} + // Step 1: 如果有姓名/电话筛选,先查用户列表 + if req.UserName != "" { + userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{ + BlurNameTel: req.UserName, + Domain: "app", + }) + if err != nil { + service.Error(c, err) + return + } + + if len(userListResp.UserList) == 0 { + // 没查到用户,直接返回空结果 + res.Page = req.Page + res.PageSize = req.PageSize + res.Total = 0 + service.Success(c, res) + return + } + + // 提取用户ID列表 + for _, u := range userListResp.UserList { + req.UserIDS = append(req.UserIDS, u.Id) + } + } detail, detailErr := service.BundleProvider.GetReconciliationList(context.Background(), &req) if detailErr != nil { service.Error(c, detailErr) @@ -63,6 +89,31 @@ func GetReconciliationListDownload(c *gin.Context) { service.Error(c, err) return } + res := &bundle.GetReconciliationListResp{} + if req.UserName != "" { + userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{ + BlurNameTel: req.UserName, + Domain: "app", + }) + if err != nil { + service.Error(c, err) + return + } + + if len(userListResp.UserList) == 0 { + // 没查到用户,直接返回空结果 + res.Page = req.Page + res.PageSize = req.PageSize + res.Total = 0 + service.Success(c, res) + return + } + + // 提取用户ID列表 + for _, u := range userListResp.UserList { + req.UserIDS = append(req.UserIDS, u.Id) + } + } detail, detailErr := service.BundleProvider.GetReconciliationList(context.Background(), &req) if detailErr != nil { service.Error(c, detailErr)