作者 tangxvhui

Merge branch 'dev' into test

... ... @@ -20,6 +20,10 @@ func MiniUserInfoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
l := user.NewMiniUserInfoLogic(r.Context(), svcCtx)
resp, err := l.MiniUserInfo(&req)
if len(resp.Accounts) == 0 { // 无账号时登出
httpx.WriteJson(w, http.StatusUnauthorized, nil)
return
}
result.HttpResult(r, w, resp, err)
}
}
... ...
... ... @@ -83,8 +83,8 @@ func (l *MiniUserInfoLogic) MiniUserInfo(req *types.MiniUserInfoRequest) (resp *
CompanyName: companyName,
Logo: logo,
UserId: account.Id,
Name: user.Name,
Position: user.Position,
Name: account.Name,
Position: account.Position,
})
}
// 拥有的权限
... ...
... ... @@ -44,7 +44,11 @@ func (repository *ArticleRepository) Update(ctx context.Context, conn transactio
return nil, err
}
queryFunc := func() (interface{}, error) {
<<<<<<< HEAD
tx = tx.Model(m).Save(m)
=======
tx = tx.Model(m).Select("*").Updates(m)
>>>>>>> dev
return nil, tx.Error
}
if _, err = repository.Query(queryFunc, m.CacheKeyFunc()); err != nil {
... ...
... ... @@ -42,7 +42,7 @@ func (repository *ArticleSectionRepository) Update(ctx context.Context, conn tra
return nil, err
}
queryFunc := func() (interface{}, error) {
tx = tx.Model(m).Save(m)
tx = tx.Model(m).Select("*").Updates(m)
return nil, tx.Error
}
if _, err = repository.Query(queryFunc, m.CacheKeyFunc()); err != nil {
... ...