绑定门店逻辑修改

This commit is contained in:
richboo111
2022-11-07 14:05:31 +08:00
parent 02c1309acc
commit ec7812f80f
2 changed files with 47 additions and 48 deletions

View File

@@ -196,10 +196,9 @@ func UpdateFenceByStore(appOrgCode, outFenceID string, storeID int) error {
sqlParam := []interface{}{
model.VendorIDDD,
}
sqlStr := ` SELECT t.lng,t.lat,t.delivery_range_type,t.delivery_range,s.vendor_store_id FROM store t
LEFT JOIN store_map s ON t.id = s.store_id WHERE s.vendor_id = ? `
sqlStr := `SELECT t.lng,t.lat,t.delivery_range_type,t.delivery_range FROM store t`
if storeID != 0 {
sqlStr += " AND t.id = ? "
sqlStr += " WHERE t.id = ? "
sqlParam = append(sqlParam, storeID)
} else {
return fmt.Errorf("storeID必填")