- normal store weixin msg.

This commit is contained in:
gazebo
2018-12-25 21:50:18 +08:00
parent e90d36e827
commit e8ce327fc0
11 changed files with 396 additions and 15 deletions

View File

@@ -137,6 +137,17 @@ func CreateEntity(db *DaoDB, item interface{}) (err error) {
return err
}
// InsertMulti执行成功后ID不会改写成正确的象Insert一样
func CreateMultiEntities(db *DaoDB, item interface{}) (err error) {
if db == nil {
db = GetDB()
}
if _, err = db.db.InsertMulti(20, item); err != nil && !IsDuplicateError(err) {
globals.SugarLogger.Errorf("CreateEntity %s failed with error:%v", reflect.TypeOf(item).Name(), err)
}
return err
}
func CreateOrUpdate(db *DaoDB, item interface{}, colConflitAndArgs ...string) (err error) {
if db == nil {
db = GetDB()