From d96f2ffb315157bd4cc6423e23a42d5947c2890a Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Thu, 5 Dec 2024 16:31:27 +0800 Subject: [PATCH] update tag insert by session --- src/dao/user_tag_records_dao.go | 2 +- src/implement/user_tag_records_implement.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dao/user_tag_records_dao.go b/src/dao/user_tag_records_dao.go index 831ce9f..ba20c60 100644 --- a/src/dao/user_tag_records_dao.go +++ b/src/dao/user_tag_records_dao.go @@ -10,6 +10,6 @@ type UserTagRecordsDao interface { UserTagRecordsGetOneByParams(params map[string]interface{}) (*model.UserTagRecords, error) UserTagRecordsUpdateBySession(session *xorm.Session, uid interface{}, user *model.UserTagRecords, forceColumns ...string) (int64, error) UserTagRecordsDeleteBySession(session *xorm.Session, params map[string]interface{}) (int64, error) - UserTagRecordsBatchInsert(userTagRecord []*model.UserTagRecords) (int64, error) + UserTagRecordsBatchInsertBySession(session *xorm.Session, userTagRecord []*model.UserTagRecords) (int64, error) UserTagRecordsFindByParams(params map[string]interface{}) (*[]model.UserTagRecords, error) } diff --git a/src/implement/user_tag_records_implement.go b/src/implement/user_tag_records_implement.go index 3d2e4db..c156ce7 100644 --- a/src/implement/user_tag_records_implement.go +++ b/src/implement/user_tag_records_implement.go @@ -52,8 +52,8 @@ func (u UserTagRecordsDb) UserTagRecordsDeleteBySession(session *xorm.Session, p } } -func (u UserTagRecordsDb) UserTagRecordsBatchInsert(userTagRecord []*model.UserTagRecords) (int64, error) { - affected, err := u.Db.Insert(userTagRecord) +func (u UserTagRecordsDb) UserTagRecordsBatchInsertBySession(session *xorm.Session, userTagRecord []*model.UserTagRecords) (int64, error) { + affected, err := session.Insert(userTagRecord) if err != nil { return 0, zhios_order_relate_logx.Error(err) }