| | |
| | | |
| | | <!--查询员工和商户信息--> |
| | | <select id="getStoreUserInfo" parameterType="Map" resultType="Map"> |
| | | select s.store_id,s.b_id,s.user_id,s.name,s.address,s.tel,s.store_type_cd, |
| | | select s.store_id,s.store_id storeId,s.b_id,s.user_id,s.user_id userId,s.name,s.address,s.tel,s.store_type_cd,s.store_type_cd storeTypeCd, |
| | | s.nearby_landmarks,s.map_x,s.map_y,s.create_time,su.store_user_id,su.rel_cd |
| | | from s_store s left join s_store_user su on s.store_id=su.store_id |
| | | <where> |
| | | s.status_cd = "0" and su.status_cd = "0" |
| | | <if test="userId != null and userId != ''"> |
| | | and su.user_id = #{userId} |
| | | </if> |
| | | </where> |
| | | from s_store s |
| | | left join s_store_user su on s.store_id=su.store_id and su.status_cd = '0' |
| | | where |
| | | s.status_cd = '0' |
| | | <if test="userId != null and userId != ''"> |
| | | and su.user_id = #{userId} |
| | | </if> |
| | | <if test="storeTypeCd != null and storeTypeCd != ''"> |
| | | and s.store_type_cd = #{storeTypeCd} |
| | | </if> |
| | | <if test="storeId != null and storeId != ''"> |
| | | and s.store_id = #{storeId} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |