更新
This commit is contained in:
parent
50106e3c12
commit
08b7a3aece
|
@ -26,8 +26,6 @@ func NewGetTypeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetTypeLo
|
|||
}
|
||||
|
||||
func (l *GetTypeLogic) GetType(req *types.Request) (resp *types.Response) {
|
||||
// 必须返回response, 前端需要的是内部约定的Code码, 处理相关的逻辑. 例子(eg): resp.Set(501, "error")
|
||||
|
||||
data, err := model.NewFsCanteenTypeModel(l.svcCtx.MysqlConn).FindGetType(l.ctx)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
|
|
|
@ -26,8 +26,6 @@ func NewUserBasicInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Use
|
|||
}
|
||||
|
||||
func (l *UserBasicInfoLogic) UserBasicInfo(req *types.Request) (resp *types.Response) {
|
||||
// 必须返回response, 前端需要的是内部约定的Code码, 处理相关的逻辑. 例子(eg): resp.Set(501, "error")
|
||||
resp = &types.Response{}
|
||||
loginInfo := auth.GetUserInfoFormCtx(l.ctx)
|
||||
if loginInfo.UserId == 0 {
|
||||
return resp.SetStatus(basic.CodeOK, "parse login info err ")
|
||||
|
|
|
@ -26,9 +26,6 @@ func NewUserFontsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserFon
|
|||
}
|
||||
|
||||
func (l *UserFontsLogic) UserFonts(req *types.Request) (resp *types.Response) {
|
||||
// 必须返回response, 前端需要的是内部约定的Code码, 处理相关的逻辑. 例子(eg): resp.Set(501, "error")
|
||||
resp = &types.Response{}
|
||||
|
||||
data, err := model.NewFsFontModel(l.svcCtx.MysqlConn).FindAllOrderSortByDesc(l.ctx)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
|
|
|
@ -40,10 +40,7 @@ func (l *UserLoginLogic) genJwtToken(accessSecret string, accessExpire, nowSec,
|
|||
|
||||
func (l *UserLoginLogic) UserLogin(req *types.RequestUserLogin) (resp *types.Response, jwtToken string) {
|
||||
// 必须返回response, 前端需要的是内部约定的Code码, 处理相关的逻辑. 例子(eg): resp.Set(501, "error")
|
||||
resp = &types.Response{}
|
||||
|
||||
userModel, err := model.NewFsUserModel(l.svcCtx.MysqlConn).FindOneByEmail(l.ctx, req.Name)
|
||||
// log.Printf("%t %t %v", err, model.ErrNotFound, err == model.ErrNotFound)
|
||||
|
||||
if err == model.ErrNotFound {
|
||||
logx.Error(err)
|
||||
|
|
|
@ -27,9 +27,6 @@ func NewUserSaveBasicInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext)
|
|||
}
|
||||
|
||||
func (l *UserSaveBasicInfoLogic) UserSaveBasicInfo(req *types.RequestBasicInfoForm) (resp *types.Response) {
|
||||
// 必须返回response, 前端需要的是内部约定的Code码, 处理相关的逻辑. 例子(eg): resp.Set(501, "error")
|
||||
resp = &types.Response{}
|
||||
|
||||
loginInfo := auth.GetUserInfoFormCtx(l.ctx)
|
||||
if loginInfo.UserId == 0 {
|
||||
return resp.SetStatus(basic.CodeOK, "parse login info err ")
|
||||
|
|
Loading…
Reference in New Issue
Block a user