insert into t_store_other_config(id,
url,
`name`,
page,
`type`,
turnId,
sort,
state,pageId,typeId
) value (null ,#{url},#{name},#{s},#{s1},#{turnId},#{sort},1,#{page},#{type})
update t_img_config
set content = #{p1}
where `position` =#{position}
update t_img_config
set content = #{p1}
where `position` =#{position}
update t_js
set jieshao = #{jieshao} ,vedio = #{vedio}
where id = #{id}
delete from t_store_other_config where id =#{id}
select t1.*,
t2.name as userName,
coalesce(nullif(t1.phone, ''), nullif(t2.phone, '')) as phone,
coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) as userPhone,
t3.name as yysName
from t_store t1
left join sys_user t2 on t1.storeStaffId = t2.id
left join t_operator t3 on t1.operatorId = t3.id
where 1=1
and t1.provinceCode = #{provinceCode}
and t1.cityCode = #{cityCode}
and t2.name like concat("%",#{name},"%")
and coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
and t1.name like concat("%",#{shopName},"%")
and t1.operatorId = #{operatorId}
order by t1.id desc
select * from (
select provinceCode as code, MIN(province) as name from t_store where state = 1
and cityCode = #{cityCode}
group by provinceCode
) as aa order by aa.code
select * from (
select cityCode as code, MIN(city) as name from t_store where state = 1 and provinceCode = #{provinceCode}
and cityCode = #{cityCode}
group by cityCode
) as aa order by aa.code
select * from (
select cityCode as code, MIN(city) as name
from t_store where state = 1 and provinceCode = #{provinceCode}
and cityCode = #{cityCode}
and `type` = #{type}
and operatorId = #{operatorId}
group by cityCode
) as aa order by aa.code
select * from (
select cityCode as code, MIN(city) as name from t_store where state = 1
group by cityCode
) as aa order by aa.code
SELECT `id`, `operatorId`, `province`, `city`, `name`,ids
from t_store
where state=1
and provinceCode = #{provinceCode}
and cityCode = #{cityCode}
and operatorId = #{operatorId}
and `name` like CONCAT('%',#{storeName},'%')
order by id desc
select id,name,sort,state from t_store_other where storeId=#{id} order by id desc
select t1.id,t1.name from t_turn t1 left join t_turn t2 on t1.pid = t2.id where t2.name =#{name} order by t1.id desc
select id,name from t_turn where pid =#{id} order by id desc
select name from t_turn where id =#{page}
select id,url,name , page,sort from t_store_other_config order by id desc
select * from t_turn
AND t_turn.pid IN
#{id}
order by t_turn.id desc
select * from t_turn where pid = 0 order by id desc
select * from t_js where id = #{id}
select * from t_img_config order by id desc
SELECT op.id , CONCAT(us.name,'-',us.`phone`) as value
FROM t_operator op
LEFT JOIN sys_user us on op.userId = us.id
order by op.id desc
select t1.*,
t2.name as userName,
coalesce(nullif(t1.phone, ''), nullif(t2.phone, '')) as phone,
coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) as userPhone,
t3.name as yysName
from t_store t1
left join sys_user t2 on t1.storeStaffId = t2.id
left join t_operator t3 on t1.operatorId = t3.id
where t1.id =#{id}
and t1.provinceCode = #{provinceCode}
and t1.cityCode = #{cityCode}
and t2.name like concat("%",#{name},"%")
and coalesce(nullif(t2.phone, ''), nullif(t1.phone, '')) like concat("%",#{phone},"%")
and t1.name like concat("%",#{shopName},"%")
order by t1.id desc
SELECT t1.id, t2.operatorId, t1.province, t1.city, t2.name,t1.ids,t1.name as siteName
,t2.type as `type`
from t_site t1
left join t_store t2 on t1.storeId =t2.id
where t1.state=1 and t2.state=1 and t1.isCanBeBooked = 0 and t1.reservation=0
and t1.provinceCode = #{provinceCode}
and t1.cityCode = #{cityCode}
and t1.operatorId = #{operatorId}
and t2.name like CONCAT('%',#{storeName},'%')
and t1.storeId = #{storeId}
order by t1.id desc
SELECT t1.id, t2.operatorId, t1.province, t1.city, t2.name,t1.ids,t1.name as siteName
,t2.type as `type`
from t_site t1
left join t_store t2 on t1.storeId =t2.id
where t1.state=1 and t2.state=1
and t1.provinceCode = #{provinceCode}
and t1.cityCode = #{cityCode}
and t2.name like CONCAT('%',#{storeName},'%')
AND t1.storeId IN
#{id}
order by t1.id desc
select
a.id,
CONCAT(a.province, a.city) as province,
b.name as operator,
a.name,
c.gate
from t_store a
left join t_operator b on (a.operatorId = b.id)
left join (select GROUP_CONCAT(id) as gate, storeId from t_gate group by storeId) c on (a.id = c.storeId)
where a.state = 1
and a.name like CONCAT('%', #{name}, '%')
and a.operatorId = #{operator}
and a.provinceCode = #{provinceCode}
and a.cityCode = #{cityCode}
order by a.id desc
select
a.id,
CONCAT(a.province, a.city) as province,
b.name as operator,
a.name,
c.gate
from t_store a
left join t_operator b on (a.operatorId = b.id)
left join (select GROUP_CONCAT(id) as gate, storeId from t_gate group by storeId) c on (a.id = c.storeId)
where a.id in
#{item}
order by a.id desc