xhxu 5 лет назад
Родитель
Сommit
659ab71619
1 измененных файлов: 9 добавлений и 26 удалений
  1. +9
    -26
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml

+ 9
- 26
mallinkService/src/main/resources/mapper/WxMerchantMapper.xml Просмотреть файл

@@ -197,38 +197,21 @@
and status in(2,3,4)) r
on m.id=r.merchant_id
<include refid="dynamicWhereConditionsVo"/>
<if test=" null != sortColumns">order by ${sortColumns}</if>
</select>

<select id="findListVo2" parameterType="com.iformall.domain.po.WxMerchant" resultMap="BaseResultMap">
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">
and m.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and m.`parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != name and ''!=name ">
and m.`name` like concat('%', #{name},'%')
</if>
<if test=" null != linkPhone and ''!=linkPhone ">
and m.`link_phone` like concat('%', #{linkPhone},'%')
</if>
<include refid="dynamicWhereConditionsVo"/>

<if test=" null != phone and ''!=phone ">
and wmbu.`phone` like concat('%', #{phone},'%')
</if>
<if test=" null != businessId ">
and m.`business_id` = #{businessId}
</if>
<if test=" null != status ">
and m.`status` = #{status}
</if>
<if test=" null != type ">
and m.`type` = #{type}
</if>
<include refid="dynamicWhereConditionsVo"/>

<if test=" null != sortColumns">order by ${sortColumns}</if>

</select>
<sql id="dataRule">
@@ -272,11 +255,11 @@
and m.`img_url` like concat('%', #{imgUrl},'%')
</if>
<if test=" null != name and ''!=name ">
<if test=" null != name and '' != name ">
and m.`name` like concat('%', #{name},'%')
</if>
<if test=" null != linkPhone and ''!=linkPhone ">
<if test=" null != linkPhone and '' != linkPhone ">
and m.`link_phone` like concat('%', #{linkPhone},'%')
</if>
@@ -362,7 +345,7 @@
</if>
<include refid="dataRule"/>
<if test=" null != sortColumns">order by ${sortColumns}</if>
</sql>


Загрузка…
Отмена
Сохранить