This commit is contained in:
邹宗楠
2022-12-19 11:14:00 +08:00
parent e10db669dc
commit 57f699d16c
8 changed files with 51 additions and 13 deletions

View File

@@ -1631,8 +1631,15 @@ func InsertIntoFreightTemplate(storeID int, vendorStoreID string, templateID, wa
return err
}
//只获取美团平台的京西storeID
// GetCodeAndIDByMeiTuan 只获取美团平台的京西storeID
func GetCodeAndIDByMeiTuan(vendorStoreID string, vendorId int) (storeID int, err error) {
err = GetRow(GetDB(), &storeID, "SELECT s.store_id FROM store_map s WHERE s.vendor_store_id = ? AND s.vendor_id = ? ", vendorStoreID, vendorId)
err = GetRow(GetDB(), &storeID, "SELECT s.store_id FROM store_map s WHERE s.vendor_store_id = ? AND s.vendor_id = ? AND deleted_at = ?", vendorStoreID, vendorId, utils.DefaultTimeValue)
return storeID, err
}
// BindJXPrintToStore 更新绑定门店的京西打印机 PrinterFontSize printer_sn printer_key printer_vendor_id printer_font_size
func BindJXPrintToStore(storeId int64, printSn, printKey string) error {
sql := ` UPDATE store SET printer_sn = ? , printer_key = ? , printer_vendor_id = ? , printer_font_size = ? WHERE id = ?`
_, err := ExecuteSQL(GetDB(), sql, []interface{}{printSn, printKey, model.VendorIDJxprint, model.NO, storeId})
return err
}

View File

@@ -43,15 +43,16 @@ func CreateThingMap(thingId int64, vendorThingID, appOrgCode, err string, thingT
}
// GetThingToTiktokMapList 抖店获取同步类型
func GetThingToTiktokMapList(db *DaoDB, vendorId int, thingId int64) (cats []*model.ThingMap, err error) {
func GetThingToTiktokMapList(db *DaoDB, vendorId int, thingId int64, vendorOrgCode string) (cats []*model.ThingMap, err error) {
sql := `
SELECT t1.*
FROM thing_map t1
WHERE t1.thing_id = ? AND t1.vendor_id = ? AND t1.deleted_at = ?
WHERE t1.thing_id = ? AND t1.vendor_id = ? AND vendor_org_code = ? AND t1.deleted_at = ?
`
sqlParams := []interface{}{
thingId,
vendorId,
vendorOrgCode,
utils.DefaultTimeValue,
}