Kaynağa Gözat

wip:增加h5平台

wkyuer 2 yıl önce
ebeveyn
işleme
4b19a43af1

+ 3 - 0
api/internal/logic/workdesktopclearuserinfologic.go

@@ -30,6 +30,9 @@ func NewWorkDesktopClearUserInfoLogic(ctx context.Context, svcCtx *svc.ServiceCo
 }
 
 func (l *WorkDesktopClearUserInfoLogic) WorkDesktopClearUserInfo(req *types.WorkDesktopClearUserInfo) (resp *types.CommonResp, err error) {
+	if req.Platform == "H5" {
+		req.Platform = "APP"
+	}
 	//有管理员权限
 	if config.ManagerUserIdsMap[req.UserId] {
 		res, err := entity.UserCenterRpc.WorkDesktopClearUserInfo(l.ctx, &pb.WorkDesktopClearUserInfoReq{

+ 3 - 0
api/internal/logic/workdesktopcomprehensivelogic.go

@@ -29,6 +29,9 @@ func NewWorkDesktopComprehensiveLogic(ctx context.Context, svcCtx *svc.ServiceCo
 }
 
 func (l *WorkDesktopComprehensiveLogic) WorkDesktopComprehensive(req *types.WorkDesktopComprehensiveReq) (resp *types.CommonResp, err error) {
+	if req.Platform == "H5" {
+		req.Platform = "APP"
+	}
 	res, err := entity.UserCenterRpc.WorkDesktopComprehensive(l.ctx, &pb.WorkDesktopComprehensiveReq{
 		AppId:      req.AppId,
 		UserId:     req.UserId,

+ 3 - 0
api/internal/logic/workdesktopmenuinfologic.go

@@ -32,6 +32,9 @@ func NewWorkDesktopMenuInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext
 }
 
 func (l *WorkDesktopMenuInfoLogic) WorkDesktopMenuInfo(req *types.WorkDesktopMenuInfoReq) (resp *types.CommonResp, err error) {
+	if req.Platform == "H5" {
+		req.Platform = "APP"
+	}
 	res, err := entity.UserCenterRpc.WorkDesktopMenuInfo(l.ctx, &pb.WorkDesktopMenuInfoReq{
 		AppId:        req.AppId,
 		UserId:       req.UserId,

+ 3 - 3
api/internal/types/types.go

@@ -236,7 +236,7 @@ type UserDelReq struct {
 }
 
 type WorkDesktopMenuInfoReq struct {
-	Platform  string `json:"platform,default=PC,options=PC|WX|APP"`
+	Platform  string `json:"platform,default=PC,options=PC|WX|APP|H5"`
 	UserId    string `header:"userId"`
 	AppId     string `header:"appId"`
 	Phone     string `header:"phone,optional"`
@@ -246,7 +246,7 @@ type WorkDesktopMenuInfoReq struct {
 }
 
 type WorkDesktopComprehensiveReq struct {
-	Platform   string `json:"platform,default=PC,options=PC|WX|APP"`
+	Platform   string `json:"platform,default=PC,options=PC|WX|APP|H5"`
 	UserId     string `header:"userId"`
 	AppId      string `header:"appId"`
 	Phone      string `header:"phone,optional"`
@@ -265,7 +265,7 @@ type CommonResp struct {
 }
 
 type WorkDesktopClearUserInfo struct {
-	Platform  string `json:"platform,default=PC,options=PC|WX|APP"`
+	Platform  string `json:"platform,default=PC,options=PC|WX|APP|H5"`
 	UserId    string `header:"userId"`
 	AppId     string `header:"appId"`
 	UserIds   string `json:"userIds,optional"`

+ 3 - 3
api/userCenter.api

@@ -250,7 +250,7 @@ type (
 
 	//工作桌面 -- 菜单
 	WorkDesktopMenuInfoReq {
-		Platform  string `json:"platform,default=PC,options=PC|WX|APP"`
+		Platform  string `json:"platform,default=PC,options=PC|WX|APP|H5"`
 		UserId    string `header:"userId"`
 		AppId     string `header:"appId"`
 		Phone     string `header:"phone,optional"`
@@ -261,7 +261,7 @@ type (
 	//工作桌面-- 菜单模式:全部/可用选择记录
 	//工作桌面--常用功能更新
 	WorkDesktopComprehensiveReq {
-		Platform   string `json:"platform,default=PC,options=PC|WX|APP"`
+		Platform   string `json:"platform,default=PC,options=PC|WX|APP|H5"`
 		UserId     string `header:"userId"`
 		AppId      string `header:"appId"`
 		Phone      string `header:"phone,optional"`
@@ -280,7 +280,7 @@ type (
 	}
 	//工作桌面清用户内存信息
 	WorkDesktopClearUserInfo {
-		Platform  string `json:"platform,default=PC,options=PC|WX|APP"`
+		Platform  string `json:"platform,default=PC,options=PC|WX|APP|H5"`
 		UserId    string `header:"userId"`
 		AppId     string `header:"appId"`
 		UserIds   string `json:"userIds,optional"`