Browse Source

update tag insert by session

master
shenjiachi 6 days ago
parent
commit
d96f2ffb31
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      src/dao/user_tag_records_dao.go
  2. +2
    -2
      src/implement/user_tag_records_implement.go

+ 1
- 1
src/dao/user_tag_records_dao.go View File

@@ -10,6 +10,6 @@ type UserTagRecordsDao interface {
UserTagRecordsGetOneByParams(params map[string]interface{}) (*model.UserTagRecords, error) UserTagRecordsGetOneByParams(params map[string]interface{}) (*model.UserTagRecords, error)
UserTagRecordsUpdateBySession(session *xorm.Session, uid interface{}, user *model.UserTagRecords, forceColumns ...string) (int64, error) UserTagRecordsUpdateBySession(session *xorm.Session, uid interface{}, user *model.UserTagRecords, forceColumns ...string) (int64, error)
UserTagRecordsDeleteBySession(session *xorm.Session, params map[string]interface{}) (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) UserTagRecordsFindByParams(params map[string]interface{}) (*[]model.UserTagRecords, error)
} }

+ 2
- 2
src/implement/user_tag_records_implement.go View File

@@ -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 { if err != nil {
return 0, zhios_order_relate_logx.Error(err) return 0, zhios_order_relate_logx.Error(err)
} }


Loading…
Cancel
Save