Updata:增加区号
This commit is contained in:
parent
01e488555f
commit
574fa6e3e6
@ -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,
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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:地址"`
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user