Files
ai-agent/internal/services/user_identity_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.1 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 UserIdentityService = newUserIdentityService()
func newUserIdentityService() *userIdentityService {
return &userIdentityService{}
}
type userIdentityService struct {
}
func (s *userIdentityService) Get(id int64) *models.UserIdentity {
return repositories.UserIdentityRepository.Get(sqls.DB(), id)
}
func (s *userIdentityService) Take(where ...interface{}) *models.UserIdentity {
return repositories.UserIdentityRepository.Take(sqls.DB(), where...)
}
func (s *userIdentityService) Find(cnd *sqls.Cnd) []models.UserIdentity {
return repositories.UserIdentityRepository.Find(sqls.DB(), cnd)
}
func (s *userIdentityService) FindOne(cnd *sqls.Cnd) *models.UserIdentity {
return repositories.UserIdentityRepository.FindOne(sqls.DB(), cnd)
}
func (s *userIdentityService) FindPageByParams(params *params.QueryParams) (list []models.UserIdentity, paging *sqls.Paging) {
return repositories.UserIdentityRepository.FindPageByParams(sqls.DB(), params)
}
func (s *userIdentityService) FindPageByCnd(cnd *sqls.Cnd) (list []models.UserIdentity, paging *sqls.Paging) {
return repositories.UserIdentityRepository.FindPageByCnd(sqls.DB(), cnd)
}
func (s *userIdentityService) Count(cnd *sqls.Cnd) int64 {
return repositories.UserIdentityRepository.Count(sqls.DB(), cnd)
}
func (s *userIdentityService) Create(t *models.UserIdentity) error {
return repositories.UserIdentityRepository.Create(sqls.DB(), t)
}
func (s *userIdentityService) Update(t *models.UserIdentity) error {
return repositories.UserIdentityRepository.Update(sqls.DB(), t)
}
func (s *userIdentityService) Updates(id int64, columns map[string]interface{}) error {
return repositories.UserIdentityRepository.Updates(sqls.DB(), id, columns)
}
func (s *userIdentityService) UpdateColumn(id int64, name string, value interface{}) error {
return repositories.UserIdentityRepository.UpdateColumn(sqls.DB(), id, name, value)
}
func (s *userIdentityService) Delete(id int64) {
repositories.UserIdentityRepository.Delete(sqls.DB(), id)
}