diff --git a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml index e4824de3e..4b8db4a39 100644 --- a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml @@ -1,155 +1,150 @@ - - - - - - - - - - - - - - - - - - - `id`,`order_number`,`tenant_id`,`c_user_id`,`merchant_id`,`b_user_id`,`payment_type`,`payment`,`payment_time`,`order_status`,`create_date`,`update_date`,`detail` + + + + + + + + + + + + + + + + + + + + `id`,`order_number`,`tenant_id`,`c_user_id`,`merchant_id`,`coupon_id`,`type`,`b_user_id`,`payment_type`,`payment`,`payment_time`,`order_status`,`create_date`,`update_date`,`detail` - - where 1 = 1 - - - and `id` = #{id} - - - - - and `order_number` = #{orderNumber} - - - - - and `tenant_id` = #{tenantId} - - - - - and `c_user_id` = #{cUserId} - - - - - and `merchant_id` = #{merchantId} - - - - - and `b_user_id` = #{bUserId} - - - - - and `coupon_id` = #{couponId} - - - - - and `payment_type` = #{paymentType} - - - - - and `payment` = #{payment} - - - - - and `payment_time` = #{paymentTime} - - - - - and `order_status` = #{orderStatus} - - - - - and `create_date` = #{createDate} - - - - - and `update_date` = #{updateDate} - - - - - and `detail` like concat('%', #{detail},'%') - - - - and id in - - #{idItem} - - - order by ${sortColumns} - - - - - - - - - - - - + + where 1 = 1 + + + and `id` = #{id} + + + + and `order_number` = #{orderNumber} + + + + and `tenant_id` = #{tenantId} + + + + and `c_user_id` = #{cUserId} + + + + and `merchant_id` = #{merchantId} + + + + and `b_user_id` = #{bUserId} + + + + and `coupon_id` = #{couponId} + + + + and `type` = #{type} + + + + and `payment_type` = #{paymentType} + + + + and `payment` = #{payment} + + + + and `payment_time` = #{paymentTime} + + + + and `order_status` = #{orderStatus} + + + + and `create_date` = #{createDate} + + + + and `update_date` = #{updateDate} + + + + and `detail` like concat('%', #{detail},'%') + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + + + + + + + + + + o.id,o.order_number,o.tenant_id,o.c_user_id,o.merchant_id,o.b_user_id,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date, co.cover_img,co.title,co.sub_title,co.sale_price,co.use_price,co.price, m.name - + o.id,o.order_number,o.tenant_id,o.c_user_id,o.merchant_id,o.b_user_id,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date, co.type,co.cover_img,co.title,co.sub_title,co.sale_price,co.use_price,co.price,co.detail,co.remark, m.img_url,m.name,m.link_phone,m.status, @@ -158,88 +153,90 @@ c.id as coupon_order_id,c.coupon_order_status - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + select + + from wx_order o,wx_coupon co,wx_merchant m + where o.coupon_id = co.id + and co.merchant_id = m.id + + and o.c_user_id = #{cUserId} + + + and o.tenant_id = #{tenantId} + + + AND o.order_status = #{orderStatus} + + order by ${sortColumns} + + + + 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 o.coupon_id = co.id + and co.merchant_id = m.id + + and o.c_user_id = #{cUserId} + + + and o.tenant_id = #{tenantId} + + + and o.id = #{id} + + + diff --git a/mallinkService/src/main/resources/mapper/WxPayOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxPayOrderMapper.xml index c6fff3b33..d48a2e120 100644 --- a/mallinkService/src/main/resources/mapper/WxPayOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxPayOrderMapper.xml @@ -8,6 +8,8 @@ + + @@ -23,7 +25,7 @@ - `id`,`tenant_id`,`create_time`,`update_time`,`order_id`,`c_user_id`,`ip`,`pay_amount`,`pay_time_start`,`pay_time_end`,`prepay_id`,`transaction_id`,`pay_vendor`,`pay_order_no`,`pay_order_status`,`share`,`share_amount`,`fail_reason` + `id`,`tenant_id`,`create_time`,`update_time`,`order_id`,`c_user_id`,`b_user_id`,`auth_code`,`ip`,`pay_amount`,`pay_time_start`,`pay_time_end`,`prepay_id`,`transaction_id`,`pay_vendor`,`pay_order_no`,`pay_order_status`,`share`,`share_amount`,`fail_reason` @@ -53,6 +55,10 @@ and `c_user_id` = #{cUserId} + + and `auth_code` = #{authCode} + + and `ip` like concat('%', #{ip},'%')