This commit is contained in:
邹宗楠
2022-11-07 17:29:46 +08:00
parent 8674dbe329
commit c1a4797932
2 changed files with 17 additions and 3 deletions

View File

@@ -399,6 +399,12 @@ func onUpdateThing(ctx *jxcontext.Context, db *dao.DaoDB, vendorInfoList []*mode
return err
}
func DeleteThingByData(ctx *jxcontext.Context, db *dao.DaoDB, appOrgCode string, startTime time.Time, endTime time.Time) error {
sql := ` DELETE FROM thing_map WHERE vendor_org_code = ? AND created_at >= ? AND created_at < ? `
_, err := dao.ExecuteSQL(db, sql, []interface{}{appOrgCode, startTime, endTime})
return err
}
func OnUpdateThing(ctx *jxcontext.Context, db *dao.DaoDB, vendorInfoList []*model.VendorOrgCode, thingID int64, thingType int8) (err error) {
return onUpdateThing(ctx, db, vendorInfoList, thingID, thingType, model.SyncFlagModifiedMask)
}