|
|
@@ -3,6 +3,7 @@ |
|
|
|
import ( |
|
|
|
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao" |
|
|
|
"code.fnuoos.com/EggPlanet/egg_models.git/src/model" |
|
|
|
zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx" |
|
|
|
"xorm.io/xorm" |
|
|
|
) |
|
|
|
|
|
|
@@ -17,23 +18,23 @@ type ImUserBatchSendMessageRecordsDb struct { |
|
|
|
func (i ImUserBatchSendMessageRecordsDb) ImUserBatchSendMessageRecordsInsert(m *model.ImUserBatchSendMessageRecords) (int, error) { |
|
|
|
_, err := i.Db.InsertOne(m) |
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
return 0, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
return m.Id, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (i ImUserBatchSendMessageRecordsDb) ImUserBatchSendMessageRecordsUpdate(id interface{}, m *model.ImUserBatchSendMessageRecords, forceColumns ...string) (int64, error) { |
|
|
|
func (i ImUserBatchSendMessageRecordsDb) ImUserBatchSendMessageRecordsUpdate(id interface{}, m *model.ImUserBatchSendMessageRecords, forceColums ...string) (int64, error) { |
|
|
|
var ( |
|
|
|
affected int64 |
|
|
|
err error |
|
|
|
) |
|
|
|
if forceColumns != nil { |
|
|
|
affected, err = i.Db.Where("id=?", id).MustCols(forceColumns...).Update(m) |
|
|
|
if forceColums != nil { |
|
|
|
affected, err = i.Db.Where("id=?", id).MustCols(forceColums...).Update(m) |
|
|
|
} else { |
|
|
|
affected, err = i.Db.Where("id=?", id).Update(m) |
|
|
|
} |
|
|
|
if err != nil { |
|
|
|
return 0, err |
|
|
|
return 0, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
return affected, nil |
|
|
|
} |