This commit is contained in:
richboo111
2022-11-04 18:27:54 +08:00
parent 6e3e0c4b9c
commit ccc061c90a
2 changed files with 16 additions and 18 deletions

View File

@@ -106,14 +106,10 @@ func CreateFenceByStore(appOrgCode string, storeID int64) (fenceID string, err e
vertex []warehouse_createFence_request.VerticesItem
param = &warehouse_createFence_request.WarehouseCreateFenceParam{}
)
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 = ? `
sqlParam := []interface{}{}
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必填")