瀏覽代碼

Merge remote-tracking branch 'origin/master' into master

icole 4 年之前
父節點
當前提交
e1a87f9240
共有 5 個文件被更改,包括 10 次插入3 次删除
  1. 3 1
      go.mod
  2. 2 0
      go.sum
  3. 1 0
      i2bill.api
  4. 3 2
      internal/logic/user/getuserlogic.go
  5. 1 0
      internal/types/types.go

+ 3 - 1
go.mod

@@ -2,9 +2,11 @@ module git.i2edu.net/i2/i2-bill-api
 
 go 1.16
 
+// replace git.i2edu.net/i2/i2-bill-erp => ../i2-bill-erp
+
 require (
 	git.i2edu.net/i2/go-zero v1.0.1-0.20210616091154-7fac117e009f
-	git.i2edu.net/i2/i2-bill-erp v0.0.0-20210623022310-19bfc0a41451
+	git.i2edu.net/i2/i2-bill-erp v0.0.0-20210623100936-f771ca34055a
 	github.com/dgrijalva/jwt-go v3.2.0+incompatible
 	github.com/satori/go.uuid v1.2.0
 	gopkg.in/yaml.v2 v2.4.0

+ 2 - 0
go.sum

@@ -3,6 +3,8 @@ git.i2edu.net/i2/go-zero v1.0.1-0.20210616091154-7fac117e009f h1:zD6rIG7+PhJwYXu
 git.i2edu.net/i2/go-zero v1.0.1-0.20210616091154-7fac117e009f/go.mod h1:a9idDtfMmMXrZIHyDg6XnYjWuCpKG0I6zv6Vo9Fpncc=
 git.i2edu.net/i2/i2-bill-erp v0.0.0-20210623022310-19bfc0a41451 h1:uDtYmC19dlGyhyfHMSORWUfizSTpf1T/nqg/c5DW0XE=
 git.i2edu.net/i2/i2-bill-erp v0.0.0-20210623022310-19bfc0a41451/go.mod h1:WymRAuTBomfIIWmSxOKOkF/0jPQw8KoQlw4C5W7D2rU=
+git.i2edu.net/i2/i2-bill-erp v0.0.0-20210623100936-f771ca34055a h1:uyF8Q80LN3T0YjdB34cuTGlkfnp+0XjsDY06dEHcT+4=
+git.i2edu.net/i2/i2-bill-erp v0.0.0-20210623100936-f771ca34055a/go.mod h1:WymRAuTBomfIIWmSxOKOkF/0jPQw8KoQlw4C5W7D2rU=
 github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
 github.com/ClickHouse/clickhouse-go v1.4.3/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=

+ 1 - 0
i2bill.api

@@ -88,6 +88,7 @@ type infoResponse {
 	ID          int64  `json:"id"`
 	Mobile      string `json:"mobile"`
 	UserName    string `json:"username"`
+	CityName    string `json:"cityname"`
 	NickName    string `json:"nickname"`
 	Gender      int64  `json:"gender"`
 	Avatar      string `json:"avatar"`

+ 3 - 2
internal/logic/user/getuserlogic.go

@@ -45,10 +45,11 @@ func (l *GetUserLogic) GetUser() (*types.InfoResponse, error) {
 	info.ID = user.Id
 	info.Avatar = user.Avatar
 	info.Birthday = user.Birthday
-	info.UserName = user.Username
 	info.NickName = user.Nickname
-	info.Gender = user.Gender
 	info.Mobile = user.Mobile
+	info.UserName = resp.UserName
+	info.Gender = resp.Gender
+	info.CityName = resp.CityName
 	info.ErpRoleType = resp.ErpRoleType
 	return info, nil
 }

+ 1 - 0
internal/types/types.go

@@ -81,6 +81,7 @@ type InfoResponse struct {
 	ID          int64  `json:"id"`
 	Mobile      string `json:"mobile"`
 	UserName    string `json:"username"`
+	CityName    string `json:"cityname"`
 	NickName    string `json:"nickname"`
 	Gender      int64  `json:"gender"`
 	Avatar      string `json:"avatar"`