|
|
@@ -201,34 +201,34 @@ |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="findListVo2" parameterType="com.iformall.domain.po.WxMerchant" resultMap="BaseResultMap"> |
|
|
<select id="findListVo2" parameterType="com.iformall.domain.po.WxMerchant" resultMap="BaseResultMap"> |
|
|
select distinct wm.* from wx_merchant wm |
|
|
|
|
|
left join wx_merchant_b_user wmbu on wmbu.merchant_id = wm.id |
|
|
|
|
|
where 1=1 and wm.is_del=0 |
|
|
|
|
|
|
|
|
select distinct m.* from wx_merchant m |
|
|
|
|
|
left join wx_merchant_b_user wmbu on wmbu.merchant_id = m.id |
|
|
|
|
|
where 1=1 and m.is_del=0 |
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
and wm.`tenant_id` = #{tenantId} |
|
|
|
|
|
|
|
|
and m.`tenant_id` = #{tenantId} |
|
|
</if> |
|
|
</if> |
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
and wm.`parent_tenant_id` = #{parentTenantId} |
|
|
|
|
|
|
|
|
and m.`parent_tenant_id` = #{parentTenantId} |
|
|
</if> |
|
|
</if> |
|
|
<if test=" null != name and ''!=name "> |
|
|
<if test=" null != name and ''!=name "> |
|
|
and wm.`name` like concat('%', #{name},'%') |
|
|
|
|
|
|
|
|
and m.`name` like concat('%', #{name},'%') |
|
|
</if> |
|
|
</if> |
|
|
<if test=" null != linkPhone and ''!=linkPhone "> |
|
|
<if test=" null != linkPhone and ''!=linkPhone "> |
|
|
and wm.`link_phone` like concat('%', #{linkPhone},'%') |
|
|
|
|
|
|
|
|
and m.`link_phone` like concat('%', #{linkPhone},'%') |
|
|
</if> |
|
|
</if> |
|
|
<if test=" null != phone and ''!=phone "> |
|
|
<if test=" null != phone and ''!=phone "> |
|
|
and wmbu.`phone` like concat('%', #{phone},'%') |
|
|
and wmbu.`phone` like concat('%', #{phone},'%') |
|
|
</if> |
|
|
</if> |
|
|
<if test=" null != businessId "> |
|
|
<if test=" null != businessId "> |
|
|
and wm.`business_id` = #{businessId} |
|
|
|
|
|
|
|
|
and m.`business_id` = #{businessId} |
|
|
</if> |
|
|
</if> |
|
|
<if test=" null != status "> |
|
|
<if test=" null != status "> |
|
|
and wm.`status` = #{status} |
|
|
|
|
|
|
|
|
and m.`status` = #{status} |
|
|
</if> |
|
|
</if> |
|
|
<if test=" null != type "> |
|
|
<if test=" null != type "> |
|
|
and wm.`type` = #{type} |
|
|
|
|
|
|
|
|
and m.`type` = #{type} |
|
|
</if> |
|
|
</if> |
|
|
order by wm.create_date desc |
|
|
|
|
|
|
|
|
<include refid="dynamicWhereConditionsVo"/> |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<sql id="dataRule"> |
|
|
<sql id="dataRule"> |
|
|
@@ -345,6 +345,21 @@ |
|
|
#{idItem} |
|
|
#{idItem} |
|
|
</foreach> |
|
|
</foreach> |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
<if test=" null != building or null != floor"> |
|
|
|
|
|
and m.id in( |
|
|
|
|
|
select ms.merchant_id from (select merchant_id,shop_id from wx_merchant_shop where is_del=0) ms |
|
|
|
|
|
inner join wx_merchant m on ms.merchant_id = m.id |
|
|
|
|
|
inner join wx_shop s on s.id=ms.shop_id |
|
|
|
|
|
where s.is_del=0 |
|
|
|
|
|
<if test=" null != building "> |
|
|
|
|
|
and s.`building`= #{building} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test=" null != floor"> |
|
|
|
|
|
and s.`floor` = #{floor} |
|
|
|
|
|
</if> |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
</if> |
|
|
<include refid="dataRule"/> |
|
|
<include refid="dataRule"/> |
|
|
|
|
|
|
|
|
<if test=" null != sortColumns">order by ${sortColumns}</if> |
|
|
<if test=" null != sortColumns">order by ${sortColumns}</if> |
|
|
|