Files
ai-agent/internal/services/login_credential_log_service.go
T
mlogclub 5d7c10aeab refactor: rename agent widget references to AI agent for consistency
- Updated runtime configuration to use __CS_AI_AGENT_WIDGET_CONFIG__ instead of __CS_AGENT_WIDGET_CONFIG__.
- Changed message types in support host bridge from "cs-agent" to "cs-ai-agent".
- Minified SDK script updated to reflect new AI agent naming conventions.
- Adjusted scrollbar styles in main.scss to use .cs-ai-agent-scrollbar instead of .cs-agent-scrollbar.
2026-05-30 21:19:36 +08:00

67 lines
2.4 KiB
Go

package services
import (
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/repositories"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
)
var LoginCredentialLogService = newLoginCredentialLogService()
func newLoginCredentialLogService() *loginCredentialLogService {
return &loginCredentialLogService{}
}
type loginCredentialLogService struct {
}
func (s *loginCredentialLogService) Get(id int64) *models.LoginCredentialLog {
return repositories.LoginCredentialLogRepository.Get(sqls.DB(), id)
}
func (s *loginCredentialLogService) Take(where ...interface{}) *models.LoginCredentialLog {
return repositories.LoginCredentialLogRepository.Take(sqls.DB(), where...)
}
func (s *loginCredentialLogService) Find(cnd *sqls.Cnd) []models.LoginCredentialLog {
return repositories.LoginCredentialLogRepository.Find(sqls.DB(), cnd)
}
func (s *loginCredentialLogService) FindOne(cnd *sqls.Cnd) *models.LoginCredentialLog {
return repositories.LoginCredentialLogRepository.FindOne(sqls.DB(), cnd)
}
func (s *loginCredentialLogService) FindPageByParams(params *params.QueryParams) (list []models.LoginCredentialLog, paging *sqls.Paging) {
return repositories.LoginCredentialLogRepository.FindPageByParams(sqls.DB(), params)
}
func (s *loginCredentialLogService) FindPageByCnd(cnd *sqls.Cnd) (list []models.LoginCredentialLog, paging *sqls.Paging) {
return repositories.LoginCredentialLogRepository.FindPageByCnd(sqls.DB(), cnd)
}
func (s *loginCredentialLogService) Count(cnd *sqls.Cnd) int64 {
return repositories.LoginCredentialLogRepository.Count(sqls.DB(), cnd)
}
func (s *loginCredentialLogService) Create(t *models.LoginCredentialLog) error {
return repositories.LoginCredentialLogRepository.Create(sqls.DB(), t)
}
func (s *loginCredentialLogService) Update(t *models.LoginCredentialLog) error {
return repositories.LoginCredentialLogRepository.Update(sqls.DB(), t)
}
func (s *loginCredentialLogService) Updates(id int64, columns map[string]interface{}) error {
return repositories.LoginCredentialLogRepository.Updates(sqls.DB(), id, columns)
}
func (s *loginCredentialLogService) UpdateColumn(id int64, name string, value interface{}) error {
return repositories.LoginCredentialLogRepository.UpdateColumn(sqls.DB(), id, name, value)
}
func (s *loginCredentialLogService) Delete(id int64) {
repositories.LoginCredentialLogRepository.Delete(sqls.DB(), id)
}