diff --git a/api/handler/chatimpl/chat_handler.go b/api/handler/chatimpl/chat_handler.go index 90f6a9b5..af69e717 100644 --- a/api/handler/chatimpl/chat_handler.go +++ b/api/handler/chatimpl/chat_handler.go @@ -198,7 +198,7 @@ func (h *ChatHandler) sendMessage(ctx context.Context, session *types.ChatSessio } if userVo.Power < session.Model.Power { - utils.ReplyMessage(ws, fmt.Sprintf("您当前剩余对话次数(%d)已不足以支付当前模型的单次对话需要消耗的对话额度(%d)!", userVo.Power, session.Model.Power)) + utils.ReplyMessage(ws, fmt.Sprintf("您当前剩余算力(%d)已不足以支付当前模型的单次对话需要消耗的算力(%d)!", userVo.Power, session.Model.Power)) utils.ReplyMessage(ws, ErrImg) return nil } diff --git a/api/service/xxl_job_service.go b/api/service/xxl_job_service.go index 76053b73..69cb1b79 100644 --- a/api/service/xxl_job_service.go +++ b/api/service/xxl_job_service.go @@ -142,6 +142,10 @@ func (e *XXLJobExecutor) ResetUserPower(cxt context.Context, param *xxl.RunReq) return "error with decode system config: " + err.Error() } + if config.DailyPower <= 0 { + return "success" + } + var counter = 0 var totalPower = 0 for _, u := range users { diff --git a/api/test/test.go b/api/test/test.go index e4677075..1ca737cf 100644 --- a/api/test/test.go +++ b/api/test/test.go @@ -17,8 +17,5 @@ type Student struct { func main() { - text := "2024-06-01 08:34:46" - fmt.Println(utils.Str2stamp(text)) - - fmt.Println(utils.Stamp2str(utils.Str2stamp(text))) + fmt.Println(utils.RandString(64)) }