| | |
| | | and t1.name like concat("%",#{shopName},"%") |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="listStoreAll" resultType="map"> |
| | | 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 |
| | | <if test="null != name and '' != name"> |
| | | and a.name like CONCAT('%', #{name}, '%') |
| | | </if> |
| | | <if test="null != operator"> |
| | | and a.operatorId = #{operator} |
| | | </if> |
| | | <if test="null != provinceCode and '' != provinceCode"> |
| | | and a.provinceCode = #{provinceCode} |
| | | </if> |
| | | <if test="null != cityCode and '' != cityCode"> |
| | | and a.cityCode = #{cityCode} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="listStoreAllByIds" resultType="map"> |
| | | 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 |
| | | <foreach collection="ids" item="item" index="index" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </select> |
| | | </mapper> |