From 0066395d8a6ea70d622e5173144e9dee2c7a8f1e Mon Sep 17 00:00:00 2001 From: KKSU <15274802129@163.com> Date: Tue, 28 Nov 2023 10:30:02 +0800 Subject: [PATCH] 匹配 --- src/main/resources/mapper/modules/MallProductNftMapper.xml | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main/resources/mapper/modules/MallProductNftMapper.xml b/src/main/resources/mapper/modules/MallProductNftMapper.xml index 3cfd8fd..fcdfe1b 100644 --- a/src/main/resources/mapper/modules/MallProductNftMapper.xml +++ b/src/main/resources/mapper/modules/MallProductNftMapper.xml @@ -27,6 +27,12 @@ <if test="record.accountLogin!=null and record.accountLogin!=''"> and b.account_login like concat('%', #{record.accountLogin},'%') </if> + <if test="record.orderNo!=null and record.orderNo!=''"> + and a.order_no = #{record.orderNo} + </if> + <if test="record.state != null"> + and a.state = #{record.state} + </if> </if> </where> order by a.CREATED_TIME desc @@ -40,15 +46,23 @@ left join mall_member b on a.member_id = b.id <where> <if test="record != null" > - <if test="record.accountLogin!=null and record.accountLogin!=''"> and a.buy_id in ( SELECT c.id FROM mall_product_buy c left join mall_member d on c.member_id = d.id - where d.account_login like concat('%', #{record.accountLogin},'%') + <where> + <if test="record.accountLogin!=null and record.accountLogin!=''"> + and d.account_login like concat('%', #{record.accountLogin},'%') + </if> + <if test="record.orderNo!=null and record.orderNo!=''"> + and c.order_no = #{record.orderNo} + </if> + <if test="record.state!=null"> + and c.state = #{record.state} + </if> + </where> ) - </if> </if> </where> order by a.CREATED_TIME desc -- Gitblit v1.9.1