Updata:增加区号

This commit is contained in:
jiaji.H 2026-02-02 15:24:32 +08:00
parent 01e488555f
commit 574fa6e3e6
3 changed files with 3 additions and 1 deletions

View File

@ -37,6 +37,7 @@ func GetInvoiceList(req *bundle.GetInvoiceListReq) (data []*model.InvoiceInfo, t
query := app.ModuleClients.BundleDB.Model(&model.Invoice{}). query := app.ModuleClients.BundleDB.Model(&model.Invoice{}).
Select(` Select(`
COALESCE(pia.name, rn.name) AS name, 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.phone, user.tel_num) AS phone,
COALESCE(pia.country, rn.nationality) AS country, COALESCE(pia.country, rn.nationality) AS country,
COALESCE(pia.address, rn.place_of_residence) AS address, COALESCE(pia.address, rn.place_of_residence) AS address,

View File

@ -37,7 +37,7 @@ func GetInvoiceList(req *bundle.GetInvoiceListReq) (*bundle.GetInvoiceListResp,
res.Data = lo.Map(data, func(m *model.InvoiceInfo, _ int) *bundle.InvoiceInfo { res.Data = lo.Map(data, func(m *model.InvoiceInfo, _ int) *bundle.InvoiceInfo {
return &bundle.InvoiceInfo{ return &bundle.InvoiceInfo{
Name: m.Name, Name: m.Name,
Phone: m.Phone, Phone: m.TelAreaCode + m.Phone,
Country: m.Country, Country: m.Country,
Address: m.Address, Address: m.Address,
ApplyTime: m.ApplyTime, ApplyTime: m.ApplyTime,

View File

@ -55,6 +55,7 @@ func (p *PaperInvoiceAddress) TableName() string {
type InvoiceInfo struct { type InvoiceInfo struct {
Name string `gorm:"column:name;comment:姓名"` Name string `gorm:"column:name;comment:姓名"`
TelAreaCode string `gorm:"column:tel_area_code;comment:电话区号"`
Phone string `gorm:"column:phone;comment:电话"` Phone string `gorm:"column:phone;comment:电话"`
Country string `gorm:"column:country;comment:国家"` Country string `gorm:"column:country;comment:国家"`
Address string `gorm:"column:address;comment:地址"` Address string `gorm:"column:address;comment:地址"`