From 42ea3066b6996cdef38eab51dd3ac58c87d8e4b1 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Thu, 4 Jul 2024 12:19:51 +0800 Subject: [PATCH] 1 --- ...ud_issuance_user_robot_bind_source_follow_group_db.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/implement/super_cloud_issuance_user_robot_bind_source_follow_group_db.go b/src/implement/super_cloud_issuance_user_robot_bind_source_follow_group_db.go index 0b45909..6e2dafb 100644 --- a/src/implement/super_cloud_issuance_user_robot_bind_source_follow_group_db.go +++ b/src/implement/super_cloud_issuance_user_robot_bind_source_follow_group_db.go @@ -6,16 +6,17 @@ import ( "xorm.io/xorm" ) -func NewSuperCloudIssuanceUserRobotBindSourceFollowGroupDb(engine *xorm.Engine) dao.SuperCloudIssuanceUserRobotBindSourceFollowGroupDao { - return &SuperCloudIssuanceUserRobotBindSourceFollowGroupDb{Db: engine} +func NewSuperCloudIssuanceUserRobotBindSourceFollowGroupDb(engine *xorm.Engine, session *xorm.Session) dao.SuperCloudIssuanceUserRobotBindSourceFollowGroupDao { + return &SuperCloudIssuanceUserRobotBindSourceFollowGroupDb{Db: engine, Session: session} } type SuperCloudIssuanceUserRobotBindSourceFollowGroupDb struct { - Db *xorm.Engine + Db *xorm.Engine + Session *xorm.Session } func (s SuperCloudIssuanceUserRobotBindSourceFollowGroupDb) BatchAddSuperCloudIssuanceUserRobotBindSourceFollowGroups(data []*models.SuperCloudIssuanceUserRobotBindSourceFollowGroup) (int64, error) { - affected, err := s.Db.Insert(data) + affected, err := s.Session.Insert(data) if err != nil { return 0, err }