This commit is contained in:
邹宗楠
2022-12-12 09:33:24 +08:00
parent cec915fda9
commit 632c96f059
14 changed files with 432 additions and 89 deletions

View File

@@ -687,8 +687,6 @@ func GetStoreSkus2(db *DaoDB, vendorID, storeID int, skuIDs []int, mustDirty boo
// }
sql = fmt.Sprintf(sql, fmtParams...)
sql += " ORDER BY t1.price"
globals.SugarLogger.Debugf("==========sql:= %s", sql)
globals.SugarLogger.Debugf("==========sqlParams:= %s", utils.Format4Output(sqlParams, false))
if err = GetRows(db, &skus, sql, sqlParams...); err != nil {
return nil, err
}

View File

@@ -63,6 +63,14 @@ func GetThingToTiktokMapList(db *DaoDB, vendorId int, thingId int64) (cats []*mo
return cats, err
}
// DeleteThingToTiktokMapList 删除同步关联关系
func DeleteThingToTiktokMapList(vendorId int, vendorThingId string) error {
sql := ` DELETE FROM thing_map t1 WHERE vendor_thing_id = ? AND vendor_id = ? `
param := []interface{}{vendorThingId, vendorId}
_, err := ExecuteSQL(GetDB(), sql, param...)
return err
}
func GetThingMapMap(db *DaoDB, thingType int, vendorIDs, thingIDs []int) (thingMapMap map[int64][]*model.ThingMap, err error) {
thingMapList, err := GetThingMapList(db, thingType, vendorIDs, thingIDs, nil)
if err == nil {