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.
This commit is contained in:
mlogclub
2026-05-30 21:19:36 +08:00
parent 85a57e9930
commit 5d7c10aeab
398 changed files with 1418 additions and 1427 deletions
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,12 +1,12 @@
package repositories
import (
"cs-agent/internal/models"
"cs-agent/internal/pkg/enums"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/enums"
"time"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
+2 -2
View File
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,11 +1,11 @@
package repositories
import (
"cs-agent/internal/models"
"cs-agent/internal/pkg/enums"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/enums"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
+2 -2
View File
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -62,12 +62,12 @@ func (r *channelMessageOutboxRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cn
return
}
func (r *channelMessageOutboxRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (list []models.ChannelMessageOutbox) {
func (r *channelMessageOutboxRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (list []models.ChannelMessageOutbox) {
db.Raw(sqlStr, paramArr...).Scan(&list)
return
}
func (r *channelMessageOutboxRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (count int64) {
func (r *channelMessageOutboxRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (count int64) {
db.Raw(sqlStr, paramArr...).Count(&count)
return
}
@@ -99,4 +99,3 @@ func (r *channelMessageOutboxRepository) UpdateColumn(db *gorm.DB, id int64, nam
func (r *channelMessageOutboxRepository) Delete(db *gorm.DB, id int64) {
db.Delete(&models.ChannelMessageOutbox{}, "id = ?", id)
}
+2 -2
View File
@@ -1,11 +1,11 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/common/strs"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
+2 -2
View File
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,7 +1,7 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"github.com/mlogclub/simple/sqls"
"gorm.io/gorm"
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -62,12 +62,12 @@ func (r *customerContactRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (l
return
}
func (r *customerContactRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (list []models.CustomerContact) {
func (r *customerContactRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (list []models.CustomerContact) {
db.Raw(sqlStr, paramArr...).Scan(&list)
return
}
func (r *customerContactRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (count int64) {
func (r *customerContactRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (count int64) {
db.Raw(sqlStr, paramArr...).Count(&count)
return
}
@@ -99,4 +99,3 @@ func (r *customerContactRepository) UpdateColumn(db *gorm.DB, id int64, name str
func (r *customerContactRepository) Delete(db *gorm.DB, id int64) {
db.Delete(&models.CustomerContact{}, "id = ?", id)
}
@@ -1,12 +1,12 @@
package repositories
import (
"cs-agent/internal/models"
"cs-agent/internal/pkg/enums"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/enums"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/common/strs"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
+2 -2
View File
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,8 +1,8 @@
package repositories
import (
"cs-agent/internal/models"
"cs-agent/internal/pkg/enums"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/enums"
"time"
"gorm.io/gorm"
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -5,8 +5,8 @@ import (
"strings"
"testing"
"cs-agent/internal/models"
"cs-agent/internal/pkg/enums"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/enums"
"github.com/glebarez/sqlite"
"github.com/mlogclub/simple/sqls"
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
+2 -2
View File
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -3,10 +3,10 @@ package repositories
import (
"time"
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
+2 -2
View File
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -62,12 +62,12 @@ func (r *skillRunLogRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (list
return
}
func (r *skillRunLogRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (list []models.SkillRunLog) {
func (r *skillRunLogRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (list []models.SkillRunLog) {
db.Raw(sqlStr, paramArr...).Scan(&list)
return
}
func (r *skillRunLogRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (count int64) {
func (r *skillRunLogRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (count int64) {
db.Raw(sqlStr, paramArr...).Count(&count)
return
}
@@ -99,4 +99,3 @@ func (r *skillRunLogRepository) UpdateColumn(db *gorm.DB, id int64, name string,
func (r *skillRunLogRepository) Delete(db *gorm.DB, id int64) {
db.Delete(&models.SkillRunLog{}, "id = ?", id)
}
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -62,12 +62,12 @@ func (r *systemConfigRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (list
return
}
func (r *systemConfigRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (list []models.SystemConfig) {
func (r *systemConfigRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (list []models.SystemConfig) {
db.Raw(sqlStr, paramArr...).Scan(&list)
return
}
func (r *systemConfigRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (count int64) {
func (r *systemConfigRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (count int64) {
db.Raw(sqlStr, paramArr...).Count(&count)
return
}
@@ -99,4 +99,3 @@ func (r *systemConfigRepository) UpdateColumn(db *gorm.DB, id int64, name string
func (r *systemConfigRepository) Delete(db *gorm.DB, id int64) {
db.Delete(&models.SystemConfig{}, "id = ?", id)
}
+4 -5
View File
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -62,12 +62,12 @@ func (r *tagRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (list []models
return
}
func (r *tagRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (list []models.Tag) {
func (r *tagRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (list []models.Tag) {
db.Raw(sqlStr, paramArr...).Scan(&list)
return
}
func (r *tagRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (count int64) {
func (r *tagRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (count int64) {
db.Raw(sqlStr, paramArr...).Count(&count)
return
}
@@ -99,4 +99,3 @@ func (r *tagRepository) UpdateColumn(db *gorm.DB, id int64, name string, value i
func (r *tagRepository) Delete(db *gorm.DB, id int64) {
db.Delete(&models.Tag{}, "id = ?", id)
}
@@ -1,12 +1,12 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"errors"
"time"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
"gorm.io/gorm/clause"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
+4 -5
View File
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -62,12 +62,12 @@ func (r *ticketRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd) (list []mod
return
}
func (r *ticketRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (list []models.Ticket) {
func (r *ticketRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (list []models.Ticket) {
db.Raw(sqlStr, paramArr...).Scan(&list)
return
}
func (r *ticketRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (count int64) {
func (r *ticketRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (count int64) {
db.Raw(sqlStr, paramArr...).Count(&count)
return
}
@@ -99,4 +99,3 @@ func (r *ticketRepository) UpdateColumn(db *gorm.DB, id int64, name string, valu
func (r *ticketRepository) Delete(db *gorm.DB, id int64) {
db.Delete(&models.Ticket{}, "id = ?", id)
}
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,12 +1,12 @@
package repositories
import (
"cs-agent/internal/models"
"cs-agent/internal/pkg/enums"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/enums"
"strings"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
+2 -2
View File
@@ -1,11 +1,11 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"strings"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -62,12 +62,12 @@ func (r *wxWorkKFConversationRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cn
return
}
func (r *wxWorkKFConversationRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (list []models.WxWorkKFConversation) {
func (r *wxWorkKFConversationRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (list []models.WxWorkKFConversation) {
db.Raw(sqlStr, paramArr...).Scan(&list)
return
}
func (r *wxWorkKFConversationRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (count int64) {
func (r *wxWorkKFConversationRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (count int64) {
db.Raw(sqlStr, paramArr...).Count(&count)
return
}
@@ -99,4 +99,3 @@ func (r *wxWorkKFConversationRepository) UpdateColumn(db *gorm.DB, id int64, nam
func (r *wxWorkKFConversationRepository) Delete(db *gorm.DB, id int64) {
db.Delete(&models.WxWorkKFConversation{}, "id = ?", id)
}
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -62,12 +62,12 @@ func (r *wxWorkKFMessageRefRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd)
return
}
func (r *wxWorkKFMessageRefRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (list []models.WxWorkKFMessageRef) {
func (r *wxWorkKFMessageRefRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (list []models.WxWorkKFMessageRef) {
db.Raw(sqlStr, paramArr...).Scan(&list)
return
}
func (r *wxWorkKFMessageRefRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (count int64) {
func (r *wxWorkKFMessageRefRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (count int64) {
db.Raw(sqlStr, paramArr...).Count(&count)
return
}
@@ -99,4 +99,3 @@ func (r *wxWorkKFMessageRefRepository) UpdateColumn(db *gorm.DB, id int64, name
func (r *wxWorkKFMessageRefRepository) Delete(db *gorm.DB, id int64) {
db.Delete(&models.WxWorkKFMessageRef{}, "id = ?", id)
}
@@ -1,10 +1,10 @@
package repositories
import (
"cs-agent/internal/models"
"cs-ai-agent/internal/models"
"cs-ai-agent/internal/pkg/httpx/params"
"github.com/mlogclub/simple/sqls"
"cs-agent/internal/pkg/httpx/params"
"gorm.io/gorm"
)
@@ -62,12 +62,12 @@ func (r *wxWorkKFSyncStateRepository) FindPageByCnd(db *gorm.DB, cnd *sqls.Cnd)
return
}
func (r *wxWorkKFSyncStateRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (list []models.WxWorkKFSyncState) {
func (r *wxWorkKFSyncStateRepository) FindBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (list []models.WxWorkKFSyncState) {
db.Raw(sqlStr, paramArr...).Scan(&list)
return
}
func (r *wxWorkKFSyncStateRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr... interface{}) (count int64) {
func (r *wxWorkKFSyncStateRepository) CountBySql(db *gorm.DB, sqlStr string, paramArr ...interface{}) (count int64) {
db.Raw(sqlStr, paramArr...).Count(&count)
return
}
@@ -99,4 +99,3 @@ func (r *wxWorkKFSyncStateRepository) UpdateColumn(db *gorm.DB, id int64, name s
func (r *wxWorkKFSyncStateRepository) Delete(db *gorm.DB, id int64) {
db.Delete(&models.WxWorkKFSyncState{}, "id = ?", id)
}