Browse Source

Merge branch 'master' into yhg_250102

jimmyyem 1 month ago
parent
commit
148ecd5e33

+ 3 - 0
internal/logic/User/do_gpts_user_login_logic.go

@@ -36,9 +36,11 @@ func (l *DoGptsUserLoginLogic) DoGptsUserLogin(req *types.GptsUserLoginReq) (res
 		})
 
 	if err != nil {
+		l.Logger.Errorf("gpts user login err=%v\n", err)
 		return nil, errorx.NewCodeInvalidArgumentError("用户名或密码错误")
 	}
 	if user == nil {
+		l.Logger.Errorf("gpts user login user=%v\n", user)
 		return nil, errorx.NewCodeInvalidArgumentError("用户名或密码错误")
 	}
 
@@ -47,6 +49,7 @@ func (l *DoGptsUserLoginLogic) DoGptsUserLogin(req *types.GptsUserLoginReq) (res
 	}
 
 	if !utils.BcryptCheck(*req.Password, *user.Password) {
+		l.Logger.Errorf("gpts user login check password failed\n")
 		return nil, errorx.NewCodeInvalidArgumentError("用户名或密码错误")
 	}
 

+ 1 - 1
internal/logic/chatrecords/gpts_submit_api_chat_logic.go

@@ -209,7 +209,7 @@ func (l *GptsSubmitApiChatLogic) GptsSubmitApiChat(tokenStr string, req *types.G
 						SetType(3).            //1-微信 2-名片 3-智能体
 						SetBotID(agentId).     //智能体ID
 						SetReceiverID(userId). //接收者userID
-						SetApp(8).             //8-智能体
+						SetApp(8). //8-智能体
 						SetSessionID(0).
 						SetRequest(*req.Content).
 						SetResponse(answer).