diff --git a/mallinkService/src/main/resources/mapper/WxCouponPasswordMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponPasswordMapper.xml index b3fcd6a97..93ab5afa7 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponPasswordMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponPasswordMapper.xml @@ -127,7 +127,7 @@ (select count(*) as coupon_count,coupon_id from wx_coupon_password where tenant_id=#{tenantId} and status=0) cp inner join wx_coupon c on cp.coupon_id = c.id - where c.tenant_id=#{tenantId} and c.status=1 + where c.tenant_id=#{tenantId} and c.status=0 and cp.`coupon_id` = #{couponId}