|
|
|
@@ -114,36 +114,15 @@ |
|
|
|
<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.is_public,m.email |
|
|
|
m.is_public,m.email |
|
|
|
</sql> |
|
|
|
|
|
|
|
<resultMap id="MerchantVoResultMap" type="com.iformall.domain.vo.WxMerchantVo"> |
|
|
|
<id column="id" jdbcType="BIGINT" property="id"/> |
|
|
|
<result column="img_url" jdbcType="VARCHAR" property="merchantImgUrl"/> |
|
|
|
<result column="name" jdbcType="VARCHAR" property="merchantName"/> |
|
|
|
<result column="link_phone" jdbcType="VARCHAR" property="merchantLinkPhone"/> |
|
|
|
<result column="status" jdbcType="VARCHAR" property="merchantStatus"/> |
|
|
|
<result column="business_id" jdbcType="INTEGER" property="businessId"/> |
|
|
|
<result column="sub_business_id" jdbcType="INTEGER" property="subBusinessId"/> |
|
|
|
<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"/> |
|
|
|
<result column="is_public" jdbcType="SMALLINT" property="isPublic"/> |
|
|
|
<result column="email" property="email"/> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getMerchantByCode" parameterType="java.util.Map" resultMap="MerchantVoResultMap"> |
|
|
|
select |
|
|
|
<include refid="allMerchantVoColumns"/> |
|
|
|
FROM wx_merchant m |
|
|
|
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 |
|
|
|
left join wx_merchant_shop ms on ms.merchant_id = m.id |
|
|
|
where ms.is_del = 0 |
|
|
|
<where> |
|
|
|
<if test=" null != tenantId "> |
|
|
|
and m.`tenant_id` = #{tenantId} |
|
|
|
@@ -156,16 +135,32 @@ |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<resultMap id="MerchantVoResultMap" type="com.iformall.domain.vo.WxMerchantVo"> |
|
|
|
<id column="id" jdbcType="BIGINT" property="id"/> |
|
|
|
<result column="img_url" jdbcType="VARCHAR" property="merchantImgUrl"/> |
|
|
|
<result column="name" jdbcType="VARCHAR" property="merchantName"/> |
|
|
|
<result column="link_phone" jdbcType="VARCHAR" property="merchantLinkPhone"/> |
|
|
|
<result column="status" jdbcType="VARCHAR" property="merchantStatus"/> |
|
|
|
<result column="business_id" jdbcType="INTEGER" property="businessId"/> |
|
|
|
<result column="sub_business_id" jdbcType="INTEGER" property="subBusinessId"/> |
|
|
|
<result column="is_public" jdbcType="INTEGER" property="isPublic"/> |
|
|
|
<result column="email" jdbcType="VARCHAR" property="email"/> |
|
|
|
|
|
|
|
<collection column="{merchantId=id}" property="shopVoList" |
|
|
|
ofType="com.iformall.domain.vo.WxShopVo" |
|
|
|
javaType="java.util.List" |
|
|
|
select="com.iformall.mapper.WxShopMapper.findShopVoList"> |
|
|
|
</collection> |
|
|
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<select id="findListCVo" parameterType="com.iformall.domain.vo.WxMerchantVo" resultMap="MerchantVoResultMap"> |
|
|
|
select |
|
|
|
<include refid="allMerchantVoColumns"/> |
|
|
|
FROM wx_merchant m |
|
|
|
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 1 = 1 |
|
|
|
left join wx_merchant_shop ms on ms.merchant_id = m.id |
|
|
|
where ms.is_del = 0 |
|
|
|
<if test=" null != merchantName and ''!=merchantName "> |
|
|
|
and m.`name` like concat('%', #{merchantName},'%') |
|
|
|
</if> |
|
|
|
@@ -185,18 +180,6 @@ |
|
|
|
<if test=" null != merchantStatus "> |
|
|
|
and m.`status` = #{merchantStatus} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != shopNumber and ''!=shopNumber "> |
|
|
|
and s.`shop_number` like concat('%', #{shopNumber},'%') |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != buildingName and ''!=buildingName "> |
|
|
|
and mb.`building_name` like concat('%', #{buildingName},'%') |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != floorName and ''!=floorName "> |
|
|
|
and mf.`floor_name` like concat('%', #{floorName},'%') |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != isPublic"> |
|
|
|
and m.`is_public` = #{isPublic} |
|
|
|
|