Browse Source

feat:提示信息

wangshan 2 years ago
parent
commit
3bc12178aa

+ 2 - 2
jyBXCore/api/internal/logic/participateActionLogic.go

@@ -48,8 +48,8 @@ func (l *ParticipateActionLogic) ParticipateAction(req *types.ParticipateActionR
 	})
 	if err != nil {
 		return &types.CommonResp{
-			Err_code: res.ErrCode,
-			Err_msg:  res.ErrMsg,
+			Err_code: -1,
+			Err_msg:  "操作失败",
 			Data:     false,
 		}, nil
 	}

+ 10 - 3
jyBXCore/api/internal/logic/participateListLogic.go

@@ -54,9 +54,16 @@ func (l *ParticipateListLogic) ParticipateList(req *types.ParticipateListReq) (r
 		EntAccountId:  req.EntAccountId,
 		Phone:         req.Phone,
 	})
+	if res != nil && (*res).Data != nil {
+		return &types.CommonResp{
+			Err_code: res.ErrCode,
+			Err_msg:  res.ErrMsg,
+			Data:     res.Data,
+		}, err
+	}
 	return &types.CommonResp{
-		Err_code: res.ErrCode,
-		Err_msg:  res.ErrMsg,
-		Data:     res.Data,
+		Err_code: 0,
+		Err_msg:  "",
+		Data:     nil,
 	}, nil
 }

+ 7 - 0
jyBXCore/api/internal/logic/participatePersonsLogic.go

@@ -42,6 +42,13 @@ func (l *ParticipatePersonsLogic) ParticipatePersons(req *types.ParticipatePerso
 		EntAccountId: req.EntAccountId,
 		Phone:        req.Phone,
 	})
+	if err != nil {
+		return &types.CommonResp{
+			Err_code: -1,
+			Err_msg:  "查询失败",
+			Data:     map[string]interface{}{},
+		}, nil
+	}
 	return &types.CommonResp{
 		Err_code: res.ErrCode,
 		Err_msg:  res.ErrMsg,

+ 2 - 2
jyBXCore/api/internal/logic/participateSetUpInfoLogic.go

@@ -69,8 +69,8 @@ func (l *ParticipateSetUpInfoLogic) ParticipateSetUpInfo(req *types.ParticipateS
 	})
 	if err != nil {
 		return &types.CommonResp{
-			Err_code: res.ErrCode,
-			Err_msg:  res.ErrMsg,
+			Err_code: -1,
+			Err_msg:  "操作失败",
 			Data:     false,
 		}, nil
 	}