|
|
|
@@ -92,20 +92,20 @@ |
|
|
|
<include refid="dynamicWhereConditions"/> |
|
|
|
</select> |
|
|
|
|
|
|
|
<sql id="allMerchantDiscountVoColumns"> |
|
|
|
<sql id="allMerchantVoColumns"> |
|
|
|
m.id, |
|
|
|
m.img_url,m.name,m.link_phone,m.status, |
|
|
|
m.img_url,m.name,m.link_phone,m.status,m.business_id, |
|
|
|
s.addr,s.shop_number,s.baidu_poi, |
|
|
|
mb.building_name,mf.floor_name |
|
|
|
</sql> |
|
|
|
|
|
|
|
<resultMap id="MerchantDiscountVoResultMap" type="com.iformall.domain.vo.WxMerchantVo"> |
|
|
|
<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="addr" jdbcType="VARCHAR" property="addr"/> |
|
|
|
<result column="shop_number" jdbcType="VARCHAR" property="shopNumber"/> |
|
|
|
<result column="building_name" jdbcType="VARCHAR" property="buildingName"/> |
|
|
|
@@ -115,9 +115,9 @@ |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
|
|
<select id="getMerchantByCode" parameterType="java.util.Map" resultMap="MerchantDiscountVoResultMap"> |
|
|
|
<select id="getMerchantByCode" parameterType="java.util.Map" resultMap="MerchantVoResultMap"> |
|
|
|
select |
|
|
|
<include refid="allMerchantDiscountVoColumns"/> |
|
|
|
<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 |
|
|
|
@@ -136,5 +136,43 @@ |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<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 |
|
|
|
<if test=" null != merchantName and ''!=merchantName "> |
|
|
|
and m.`name` like concat('%', #{merchantName},'%') |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != merchantLinkPhone and ''!=merchantLinkPhone "> |
|
|
|
and m.`link_phone` like concat('%', #{merchantLinkPhone},'%') |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != businessId "> |
|
|
|
and m.`business_id` = #{businessId} |
|
|
|
</if> |
|
|
|
|
|
|
|
<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> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |