|
|
|
@@ -63,10 +63,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<sql id="allMerchantVoColumns"> |
|
|
|
m.id, |
|
|
|
m.img_url,m.name,m.link_phone,m.status,m.business_id,m.sub_business_id, |
|
|
|
s.addr,s.shop_number,s.baidu_poi, |
|
|
|
mb.building_name,mf.floor_name, |
|
|
|
m.id,m.img_url,m.name,m.link_phone,m.status,m.business_id,m.sub_business_id, |
|
|
|
cm.parameter |
|
|
|
</sql> |
|
|
|
|
|
|
|
@@ -79,23 +76,39 @@ |
|
|
|
<result column="business_id" jdbcType="INTEGER" property="businessId"/> |
|
|
|
<result column="sub_business_id" jdbcType="INTEGER" property="subBusinessId"/> |
|
|
|
<result column="parameter" jdbcType="VARCHAR" property="parameter"/> |
|
|
|
|
|
|
|
|
|
|
|
<collection column="{merchantId=id}" property="shopVoList" |
|
|
|
ofType="com.iformall.domain.vo.WxShopVo" |
|
|
|
javaType="java.util.List" |
|
|
|
select="com.iformall.mapper.WxCouponMerchantMapper.findShopVoList"> |
|
|
|
</collection> |
|
|
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<resultMap id="ShopVoResultMap" type="com.iformall.domain.vo.WxShopVo"> |
|
|
|
<id column="id" jdbcType="BIGINT" property="id"/> |
|
|
|
<result column="addr" jdbcType="VARCHAR" property="addr"/> |
|
|
|
<result column="shop_number" jdbcType="VARCHAR" property="shopNumber"/> |
|
|
|
<result column="building_name" jdbcType="VARCHAR" property="buildingName"/> |
|
|
|
<result column="floor_name" jdbcType="VARCHAR" property="floorName"/> |
|
|
|
<result column="baidu_poi" jdbcType="VARCHAR" property="baiduPoi"/> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
|
|
<select id="findShopVoList" parameterType="java.util.Map" resultMap="ShopVoResultMap"> |
|
|
|
select s.id,s.shop_number,b.building_name,f.floor_name,s.addr,s.baidu_poi |
|
|
|
from wx_shop s left join wx_merchant_shop ms on ms.shop_id=s.id |
|
|
|
left join wx_merchant m on ms.merchant_id=m.id |
|
|
|
left join wx_mall_building b on s.building=b.id |
|
|
|
left join wx_mall_floor f on s.floor=f.id |
|
|
|
where s.is_del=0 and ms.is_del=0 |
|
|
|
and m.id=#{merchantId} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="findMerchantVoList" parameterType="java.util.Map" resultMap="MerchantVoResultMap"> |
|
|
|
select |
|
|
|
<include refid="allMerchantVoColumns"/> |
|
|
|
from wx_coupon_merchant cm |
|
|
|
left join wx_merchant m on m.id = cm.merchant_id |
|
|
|
left join wx_merchant_shop ms on ms.merchant_id = m.id and ms.is_del = 0 |
|
|
|
left join wx_shop s on ms.shop_id = s.id |
|
|
|
left join wx_mall_building mb on s.building = mb.id |
|
|
|
left join wx_mall_floor mf on s.floor = mf.id |
|
|
|
where cm.status = 0 |
|
|
|
and cm.product_id = #{productId} |
|
|
|
</select> |
|
|
|
|