调整任务列表以及同步任务接口
This commit is contained in:
@ -61,6 +61,11 @@ func (s *sStoreAdmin) Login(ctx context.Context, in *model.StoreAdminLoginIn) (o
|
||||
if !encrypt.ComparePassword(one[dao.StoreAdmins.Columns().PasswordHash].String(), in.Password) {
|
||||
return nil, ecode.Params.Sub("密码错误")
|
||||
}
|
||||
var store entity.Stores
|
||||
if err = dao.Stores.Ctx(ctx).WherePri(one[dao.StoreAdmins.Columns().StoreId]).Scan(&store); err != nil {
|
||||
return nil, ecode.Fail.Sub("查询门店失败")
|
||||
}
|
||||
|
||||
value, err := dao.Roles.Ctx(ctx).WherePri(one[dao.StoreAdmins.Columns().RoleId].Int()).Fields(dao.Roles.Columns().Code).Value()
|
||||
if err != nil {
|
||||
return nil, ecode.Fail.Sub("查询角色失败")
|
||||
@ -71,7 +76,10 @@ func (s *sStoreAdmin) Login(ctx context.Context, in *model.StoreAdminLoginIn) (o
|
||||
return nil, ecode.Fail.Sub("生成token失败")
|
||||
}
|
||||
out = &model.StoreAdminLoginOut{
|
||||
Token: token,
|
||||
Token: token,
|
||||
StoreId: store.Id,
|
||||
StoreName: store.Name,
|
||||
NetbarAccount: store.NetbarAccount,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user