select *
from tz_shop_detail
where mobile = #{mobile}
update tz_shop_detail
set `password` = #{newPassword}
where mobile = #{username}
select *
from tz_shop_detail
where user_id = #{userId}
UPDATE tz_shop_detail sd
SET sd.`update_time` = NOW(),
sd.`shop_status` = #{status}
WHERE sd.`shop_id` = #{shopId}
SELECT sd.`shop_id`,
sd.`out_station_no`,
sd.`shop_name`,
sd.`shop_logo`,
sd.shop_status,
COUNT(ucs.`shop_id`) fansCount,
sd.`tel`
FROM tz_shop_detail sd
LEFT JOIN `tz_user_collection_shop` ucs
ON ucs.`shop_id` = sd.`shop_id`
GROUP BY sd.`shop_id`
HAVING sd.shop_status = 1
ORDER BY fansCount DESC LIMIT 8
SELECT
sd.`shop_id`,
sd.`out_station_no`,
sd.`shop_name`,
sd.`shop_logo`,
sd.shop_status,
COUNT(ucs.`shop_id`) fansCount,
sd.`tel`
FROM
tz_shop_detail sd
LEFT JOIN `tz_user_collection_shop` ucs
ON ucs.`shop_id` = sd.`shop_id`
GROUP BY sd.`shop_id`
HAVING sd.shop_status = 1
and sd.`shop_name` like concat('%', #{shopHeadInfoDto.shopName}, '%')
ORDER BY fansCount DESC
select shop_id,
out_station_no,
shop_name,
user_id,
intro,
shop_owner,
mobile,
tel,
shop_lat,
shop_lng,
shop_address,
province,
province_id,
city,
city_id,
area,
area_id,
shop_logo,
shop_status,
create_time,
update_time,
is_distribution,
business_license,
identity_card_front,
identity_card_later,
sync,
category,
third_party_code
from tz_shop_detail
where shop_id = #{shopId}
select
sd.shop_id,
shop_name,
( 6371 * acos( cos( radians(#{lat}) ) * cos( radians( shop_lat ) ) * cos( radians( shop_lng ) - radians(#{lon})
) + sin( radians(#{lat}) ) * sin( radians( shop_lat ) ) ) ) distance
from
tz_shop_detail sd
right join tz_transport2 tp on tp.shop_id = sd.shop_id
right join tz_channel_shop tcs on tcs.shop_id = sd.shop_id
where shop_status = 1
tcs.`channel_id`= #{platform} and tcs.`is_delete`=0
order by
distance
select shop_id,
out_station_no,
shop_name,
user_id,
intro,
shop_owner,
mobile,
tel,
shop_lat,
shop_lng,
shop_address,
province,
province_id,
city,
city_id,
area,
area_id,
shop_logo,
shop_status,
create_time,
update_time,
is_distribution,
business_license,
identity_card_front,
identity_card_later,
sync,
category,
third_party_code
from tz_shop_detail
where out_station_no = #{outStationNo}
select shop_id,
hb_station_id,
out_station_no,
shop_name,
user_id,
intro,
shop_owner,
mobile,
tel,
shop_lat,
shop_lng,
shop_address,
province,
province_id,
city,
city_id,
area,
area_id,
shop_logo,
shop_status,
create_time,
update_time,
is_distribution,
business_license,
identity_card_front,
identity_card_later,
sync,
category,
third_party_code
from tz_shop_detail
where hb_station_id = #{hbStationId}