|
@@ -3,6 +3,7 @@ package aimod
|
|
|
import (
|
|
|
"eta/eta_api/global"
|
|
|
"eta/eta_api/utils"
|
|
|
+ "gorm.io/gorm"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
@@ -84,6 +85,11 @@ type AiChatTopicView struct {
|
|
|
ThreadId string
|
|
|
}
|
|
|
|
|
|
+func (obj *AiChatTopicView) AfterFind(tx *gorm.DB) (err error) {
|
|
|
+ obj.CreateTime = utils.GormDateStrToDateTimeStr(obj.CreateTime)
|
|
|
+ obj.ModifyTime = utils.GormDateStrToDateTimeStr(obj.ModifyTime)
|
|
|
+ return
|
|
|
+}
|
|
|
func GetAiChatTopicList(sysUserId int) (item []*AiChatTopicView, err error) {
|
|
|
sql := ` SELECT * FROM ai_chat_topic WHERE sys_user_id=? ORDER BY create_time DESC `
|
|
|
o := global.DbMap[utils.DbNameAI]
|