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
}