upgrade
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/xinliangnote/go-gin-api/internal/pkg/cache"
|
||||
"github.com/xinliangnote/go-gin-api/internal/pkg/core"
|
||||
"github.com/xinliangnote/go-gin-api/internal/pkg/db"
|
||||
"github.com/xinliangnote/go-gin-api/pkg/ddm"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
@@ -169,7 +170,7 @@ func (u *userDemo) Detail() core.HandlerFunc {
|
||||
res.Id = user.Id
|
||||
res.UserName = user.UserName
|
||||
res.NickName = user.NickName
|
||||
res.Mobile = user.Mobile
|
||||
res.Mobile = ddm.Mobile(user.Mobile)
|
||||
c.Payload(code.OK.WithData(res))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package user_model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/xinliangnote/go-gin-api/pkg/ddm"
|
||||
)
|
||||
|
||||
// 用户Demo表
|
||||
@@ -54,8 +56,8 @@ type DetailRequest struct {
|
||||
|
||||
// user_handler Detail Response
|
||||
type DetailResponse struct {
|
||||
Id uint `json:"id"` // 用户主键ID
|
||||
UserName string `json:"user_name"` // 用户名
|
||||
NickName string `json:"nick_name"` // 昵称
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Id uint `json:"id"` // 用户主键ID
|
||||
UserName string `json:"user_name"` // 用户名
|
||||
NickName string `json:"nick_name"` // 昵称
|
||||
Mobile ddm.Mobile `json:"mobile"` // 手机号(脱敏)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user