where 标签

This commit is contained in:
2026-01-09 16:15:04 +08:00
parent e3bf70ab9e
commit 16a814568d

View File

@@ -8,18 +8,19 @@
select merchant.*,shop.shop_name as shopName
from tb_shop_direct_merchant merchant
left join tb_shop_info shop on merchant.shop_id = shop.id
where
<if test="queryParam.userType != null">
and merchant.user_type = #{queryParam.userType}
</if>
<if test="queryParam.shopName != null">
and shop.shop_name like concat('%',#{queryParam.shopName},'%')
</if>
<if test="queryParam.status != null">
and (merchant.wechat_status = #{queryParam.status} or merchant.alipay_status = #{queryParam.status})
</if>
<if test="queryParam.alipayAccount != null">
and merchant.alipay_account like concat('%',#{queryParam.alipayAccount},'%')
</if>
<where>
<if test="queryParam.userType != null">
and merchant.user_type = #{queryParam.userType}
</if>
<if test="queryParam.shopName != null">
and shop.shop_name like concat('%',#{queryParam.shopName},'%')
</if>
<if test="queryParam.status != null">
and (merchant.wechat_status = #{queryParam.status} or merchant.alipay_status = #{queryParam.status})
</if>
<if test="queryParam.alipayAccount != null">
and merchant.alipay_account like concat('%',#{queryParam.alipayAccount},'%')
</if>
</where>
</select>
</mapper>