|
@@ -72,6 +72,9 @@ func (s *System) GetProgramGroup(ctx context.Context, req *user.UserQualificatio
|
|
|
// 请求类型参数 req.ReqType 1 查询主用户 2 查询相关从用户 3 查询可添加为从主用户
|
|
// 请求类型参数 req.ReqType 1 查询主用户 2 查询相关从用户 3 查询可添加为从主用户
|
|
|
func (s *System) GetUserList(ctx context.Context, req *user.UserInfoReq, rsp *comm_def.CommonMsg) error {
|
|
func (s *System) GetUserList(ctx context.Context, req *user.UserInfoReq, rsp *comm_def.CommonMsg) error {
|
|
|
tenant, err := micro_srv.GetTenant(ctx)
|
|
tenant, err := micro_srv.GetTenant(ctx)
|
|
|
|
|
+ if err != nil {
|
|
|
|
|
+ return err
|
|
|
|
|
+ }
|
|
|
userInfo, err := micro_srv.GetUserInfo(ctx)
|
|
userInfo, err := micro_srv.GetUserInfo(ctx)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return err
|
|
return err
|
|
@@ -92,6 +95,9 @@ func (s *System) GetUserList(ctx context.Context, req *user.UserInfoReq, rsp *co
|
|
|
// 请求类型参数 req.ReqType 1 添加主用户(只需修改base_user的IsMain字段)
|
|
// 请求类型参数 req.ReqType 1 添加主用户(只需修改base_user的IsMain字段)
|
|
|
func (s *System) AddMainUserOrSubUser(ctx context.Context, req *user.AddMainOrSubReq, rsp *comm_def.CommonMsg) error {
|
|
func (s *System) AddMainUserOrSubUser(ctx context.Context, req *user.AddMainOrSubReq, rsp *comm_def.CommonMsg) error {
|
|
|
tenant, err := micro_srv.GetTenant(ctx)
|
|
tenant, err := micro_srv.GetTenant(ctx)
|
|
|
|
|
+ if err != nil {
|
|
|
|
|
+ return err
|
|
|
|
|
+ }
|
|
|
userInfo, err := micro_srv.GetUserInfo(ctx)
|
|
userInfo, err := micro_srv.GetUserInfo(ctx)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return err
|
|
return err
|
|
@@ -110,6 +116,9 @@ func (s *System) AddMainUserOrSubUser(ctx context.Context, req *user.AddMainOrSu
|
|
|
// DeleteMainUserOrSubUser 删除主从用户
|
|
// DeleteMainUserOrSubUser 删除主从用户
|
|
|
func (s *System) DeleteMainUserOrSubUser(ctx context.Context, req *user.AddMainOrSubReq, rsp *comm_def.CommonMsg) error {
|
|
func (s *System) DeleteMainUserOrSubUser(ctx context.Context, req *user.AddMainOrSubReq, rsp *comm_def.CommonMsg) error {
|
|
|
tenant, err := micro_srv.GetTenant(ctx)
|
|
tenant, err := micro_srv.GetTenant(ctx)
|
|
|
|
|
+ if err != nil {
|
|
|
|
|
+ return err
|
|
|
|
|
+ }
|
|
|
userInfo, err := micro_srv.GetUserInfo(ctx)
|
|
userInfo, err := micro_srv.GetUserInfo(ctx)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return err
|
|
return err
|
|
@@ -141,3 +150,16 @@ func (s *System) UserBindAccount(ctx context.Context, req *user.UserBindAccountR
|
|
|
rsp.Code = code
|
|
rsp.Code = code
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+// 获取登录人信息
|
|
|
|
|
+func (s *System) GetLoginUser(ctx context.Context, _, rsp *comm_def.CommonMsg) error {
|
|
|
|
|
+ userInfo, err := micro_srv.GetUserInfo(ctx)
|
|
|
|
|
+ if err != nil {
|
|
|
|
|
+ return err
|
|
|
|
|
+ }
|
|
|
|
|
+ rsp.Msg = "登录成功"
|
|
|
|
|
+ rsp.Code = 200
|
|
|
|
|
+ rsp.Data = userInfo
|
|
|
|
|
+ return nil
|
|
|
|
|
+}
|