Explorar o código

feat:错误信息提示

wangshan %!s(int64=3) %!d(string=hai) anos
pai
achega
99e653cdcb
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      jyBXBase/rpc/internal/logic/newestbiddinglogic.go

+ 3 - 1
jyBXBase/rpc/internal/logic/newestbiddinglogic.go

@@ -45,7 +45,8 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 		if redisByte != nil && len(*redisByte) > 0 && err != nil {
 			err := json.Unmarshal(*redisByte, res.Data)
 			if err != nil {
-				logx.Info("读取缓存 序列化异常")
+				res.ErrCode = -1
+				res.ErrMsg = fmt.Sprintf("读取缓存 序列化异常,err:%s", err.Error())
 			}
 			return res
 		}
@@ -55,6 +56,7 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 			userMap, ok := IC.Mgo.FindById("user", rks, `{"o_jy":1,"o_vipjy":1,"i_vip_status":1}`)
 			if !ok || userMap == nil || len(*userMap) == 0 {
 				//查询出错
+				res.ErrCode = -1
 				res.ErrMsg = fmt.Errorf("未查询到用户信息").Error()
 				return res
 			}