1
This commit is contained in:
@@ -1037,7 +1037,6 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat
|
||||
if len(vendorIDs) > 0 {
|
||||
sqlWhere += " AND t1.vendor_id IN (" + GenQuestionMarks(len(vendorIDs)) + ")"
|
||||
sqlParams = append(sqlParams, vendorIDs)
|
||||
//globals.SugarLogger.Debugf("sqlParams vendorIDs================%d", vendorIDs)
|
||||
}
|
||||
}
|
||||
if userID != "" {
|
||||
|
||||
@@ -45,8 +45,21 @@ func CreateThingMap(thingId int64, vendorThingID, appOrgCode, err string, thingT
|
||||
return CreateEntity(GetDB(), thingMap)
|
||||
}
|
||||
|
||||
func UpdateThingMap(thingMap *model.ThingMap) error {
|
||||
_, err := UpdateEntity(GetDB(), thingMap, "ID")
|
||||
func UpdateThingMap(db *DaoDB, syncStatus int8, vendorThingId string, thingId int, vendorId int, vendorOrgCode string) error {
|
||||
sql := `
|
||||
UPDATE thing_map t1
|
||||
SET t1.sync_status = ?,t1.vendor_thing_id = ?
|
||||
WHERE t1.deleted_at = ? AND t1.thing_id = ? AND t1.vendor_id = ? AND t1.vendor_org_code = ?
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
syncStatus,
|
||||
vendorThingId,
|
||||
utils.DefaultTimeValue,
|
||||
thingId,
|
||||
vendorId,
|
||||
vendorOrgCode,
|
||||
}
|
||||
_, err := ExecuteSQL(db, sql, sqlParams...)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -65,7 +78,6 @@ func GetThingToTiktokMapList(db *DaoDB, vendorId int, thingId int64, vendorOrgCo
|
||||
}
|
||||
|
||||
err = GetRows(db, &cats, sql, sqlParams...)
|
||||
|
||||
return cats, err
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,12 @@ const (
|
||||
ThingTypeOrder = 6 // 同步订单
|
||||
)
|
||||
|
||||
const (
|
||||
ThingTypeSyncSuccess = 0 // 主商品创建成功
|
||||
ThingTypeSyncFail = 2 // 主商品创建失败
|
||||
ThingTypeSyncing = 3 // 主商品创建中
|
||||
)
|
||||
|
||||
type ThingMap struct {
|
||||
ModelIDCULD
|
||||
|
||||
|
||||
Reference in New Issue
Block a user