From 574fa6e3e638b59a82d97164ec02f40f035908b0 Mon Sep 17 00:00:00 2001 From: "jiaji.H" Date: Mon, 2 Feb 2026 15:24:32 +0800 Subject: [PATCH] =?UTF-8?q?Updata=EF=BC=9A=E5=A2=9E=E5=8A=A0=E5=8C=BA?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/dao/invoiceDao.go | 1 + internal/logic/invoiceLogic.go | 2 +- internal/model/invoice.go | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/dao/invoiceDao.go b/internal/dao/invoiceDao.go index ec2aba7..9335f47 100644 --- a/internal/dao/invoiceDao.go +++ b/internal/dao/invoiceDao.go @@ -37,6 +37,7 @@ func GetInvoiceList(req *bundle.GetInvoiceListReq) (data []*model.InvoiceInfo, t query := app.ModuleClients.BundleDB.Model(&model.Invoice{}). Select(` COALESCE(pia.name, rn.name) AS name, + COALESCE(pia.tel_area_code, user.tel_area_code) AS tel_area_code, COALESCE(pia.phone, user.tel_num) AS phone, COALESCE(pia.country, rn.nationality) AS country, COALESCE(pia.address, rn.place_of_residence) AS address, diff --git a/internal/logic/invoiceLogic.go b/internal/logic/invoiceLogic.go index f8b609e..a9b6c25 100644 --- a/internal/logic/invoiceLogic.go +++ b/internal/logic/invoiceLogic.go @@ -37,7 +37,7 @@ func GetInvoiceList(req *bundle.GetInvoiceListReq) (*bundle.GetInvoiceListResp, res.Data = lo.Map(data, func(m *model.InvoiceInfo, _ int) *bundle.InvoiceInfo { return &bundle.InvoiceInfo{ Name: m.Name, - Phone: m.Phone, + Phone: m.TelAreaCode + m.Phone, Country: m.Country, Address: m.Address, ApplyTime: m.ApplyTime, diff --git a/internal/model/invoice.go b/internal/model/invoice.go index 68936e0..ba655a2 100644 --- a/internal/model/invoice.go +++ b/internal/model/invoice.go @@ -55,6 +55,7 @@ func (p *PaperInvoiceAddress) TableName() string { type InvoiceInfo struct { Name string `gorm:"column:name;comment:姓名"` + TelAreaCode string `gorm:"column:tel_area_code;comment:电话区号"` Phone string `gorm:"column:phone;comment:电话"` Country string `gorm:"column:country;comment:国家"` Address string `gorm:"column:address;comment:地址"`