t_wifi.id as id,
t_wifi.name as name,
t_wifi.SSID as SSID,
t_wifi.location as location,
t_wifi.apmac as apmac,
t_wifi.address as address,
t_wifi.longitude as longitude,
t_wifi.latitude as latitude,
t_wifi.place as place,
t_wifi.place_id as placeId,
t_wifi.operator_id as operatorId,
t_wifi.status as status,
t_wifi.updated as updated
id,
location,
address,
longitude,
latitude
select count(c.wifiId) from
(
select t_wifi.id as wifiId, t_wifi.place_id as placeId from t_wifi w, t_location l
where
w.location = l.location and w.status != -1
and w.operator_id = #{operatorId}
and l.cn = #{cn}
and l.cn_city = #{cnCity}
and w.place = #{place}
and (w.apmac like #{mac})
) as c left join t_place_class pc on c.placeId = pc.place_id
and pc.class_id = #{placeClassId}
select c.*, t_place_class_info.name as placeClassName from
(
select
, t_location.cn as cn, t_location.cn_city as cnCity, t_place.name as placeName, t_operator.company_name as operatorName
from t_wifi, t_location, t_place, t_operator
t_wifi.location = t_location.location and t_wifi.place_id = t_place.id and t_wifi.operator_id = t_operator.id
and t_wifi.status != -1
and t_wifi.operator_id = #{operatorId}
and t_location.cn = #{cn}
and t_location.cn_city = #{cnCity}
and t_wifi.place = #{place}
and (t_wifi.apmac like #{mac})
) as c left join t_place_class pc on c.placeId = pc.place_id
left join t_place_class_info on pc.class_id = t_place_class_info.id
and pc.class_id = #{placeClassId}
limit #{pager.offset}, #{pager.limit}
select c.*, t_place_class_info.name as placeClassName from
(
select
, t_location.cn as cn, t_location.cn_city as cnCity, t_place.name as placeName, t_operator.company_name as operatorName
from t_wifi, t_location, t_place, t_operator
t_wifi.location = t_location.location and t_wifi.place_id = t_place.id and t_wifi.operator_id = t_operator.id
and t_wifi.status != -1
and t_wifi.operator_id = #{operatorId}
and t_location.cn = #{cn}
and t_location.cn_city = #{cnCity}
and t_wifi.place = #{place}
and (t_wifi.apmac like #{mac})
) as c left join t_place_class pc on c.placeId = pc.place_id
left join t_place_class_info on pc.class_id = t_place_class_info.id
and pc.class_id = #{placeClassId}
select count(w.id) from t_wifi w, t_location l
w.location = l.location and w.status != -1 and w.operator_id = #{operatorId}
and l.cn = #{cn}
and l.cn_city = #{cnCity}
and w.place_id = #{placeId}
and w.place = #{place}
and (w.address like #{searchValue} or w.name like #{searchValue})
select
, t_location.cn as cn, t_location.cn_city as cnCity, t_place.name as placeName
from t_wifi, t_location, t_place
t_wifi.location = t_location.location and t_wifi.place_id = t_place.id
and t_wifi.status != -1 and t_wifi.operator_id = #{operatorId}
and t_location.cn = #{cn}
and t_location.cn_city = #{cnCity}
and t_wifi.place_id = #{placeId}
and t_wifi.place = #{place}
and (t_wifi.address like #{searchValue} or t_wifi.name like #{searchValue})
limit #{pager.offset}, #{pager.limit}
select
, t_location.cn as cn, t_location.cn_city as cnCity, t_place.name as placeName
from t_wifi, t_location, t_place
t_wifi.location = t_location.location and t_wifi.place_id = t_place.id
and t_wifi.status != -1 and t_wifi.operator_id = #{operatorId}
and t_location.cn = #{cn}
and t_location.cn_city = #{cnCity}
and t_wifi.place_id = #{placeId}
and t_wifi.place = #{place}
and (t_wifi.address like #{searchValue} or t_wifi.name like #{searchValue})
select
, t_location.cn as cn, t_location.cn_city as cnCity, t_place.name as placeName
from t_wifi, t_location, t_place
t_wifi.location = t_location.location and t_wifi.place_id = t_place.id
and t_wifi.status != -1 and t_wifi.id = #{id}
update t_wifi
set status=#{status},updated = #{updated}
where id in
#{id}
update t_wifi set name = #{name},
location = #{location},
address = #{address},
longitude = #{longitude},
latitude = #{latitude},
apmac = #{apmac},
place = #{place},
place_id = #{placeId}
where id = #{id}
insert into t_wifi(name, SSID, location, apmac, address, longitude, latitude, place, place_id, operator_id, updated)
values(#{name}, #{SSID}, #{location}, #{apmac}, #{address}, #{longitude}, #{latitude}, #{place}, #{placeId}, #{operatorId}, #{updated})
select
from t_wifi where 1 = 1
and address like #{value}
order by id
select
from t_wifi where location in (select location from t_wifi where location = #{location})
and latitude <= #{maxlat} and latitude >= #{minlat}
and longitude <= #{maxlng} and longitude >= #{minlng}
select
from t_wifi where location = #{location}
select
from t_wifi where id in (select wifi_id from t_adgroup_wifi where adgroup_id = #{adGroupId})
order by id
insert into
t_adgroup_wifi (adgroup_id,wifi_id)
values (#{adGroupId},#{wifiId})
delete from t_adgroup_wifi where adgroup_id = #{adGroupId}
select
from t_wifi where 1 = 1
and address like #{value}
order by id
limit #{pager.offset}, #{pager.limit}
select count(id)
from t_wifi where 1 = 1
and address like #{value}
SELECT count(wifi.id) FROM t_wifi wifi,t_wifi_group wg,t_wifi_group_info wgi
WHERE wg.wifi_id = wifi.id AND wg.group_id = wgi.id
and wifi.operator_id = #{operatorId}
and wifi.apmac = #{apmac}
and wgi.name = #{name}
SELECT
wifi.id id,
wifi.operator_id operatorId,
wifi.name name,
wifi.SSID SSID,
wifi.location location,
wifi.apmac apmac,
wifi.address adderss,
wifi.longitude longitude,
wifi.latitude latitude,
wgi.name groupName,
wg.supdated supdated,
wg.status status
FROM
t_wifi wifi,
t_wifi_group wg,
t_wifi_group_info wgi
WHERE
wg.wifi_id = wifi.id
AND wg.group_id = wgi.id
and wifi.operator_id = #{operatorId}
and wifi.apmac = #{apmac}
and wgi.name = #{name}
SELECT
wifi.id id,
wifi.NAME name,
wifi.SSID SSID,
wifi.location location,
wifi.apmac apmac,
wifi.address address,
wifi.longitude longitude,
wifi.latitude latitude,
loc.cn cn,
loc.cn_city cnCity
FROM
t_wifi wifi,
t_location loc
WHERE
wifi.place_id = loc.id
and wifi.operator_id = #{operatorId}
and wifi.apmac = #{apmac}
and loc.cn = #{cn}
and loc.cn_city = #{cnCity}
SELECT count(wifi.id) FROM t_wifi wifi,t_location loc WHERE
wifi.place_id = loc.id
and wifi.operator_id = #{operatorId}
and wifi.apmac = #{apmac}
and loc.cn = #{cn}
and loc.cn_city = #{cnCity}