优惠券

This commit is contained in:
2025-10-17 19:01:20 +08:00
parent b825373174
commit e5b775a834
2 changed files with 3 additions and 3 deletions

View File

@@ -150,7 +150,7 @@
LEFT JOIN `tb_order_info` o ON u.user_id = o.user_id and o.user_id is not null AND o.shop_id = #{shopId}
AND o.status = 'done'
</if>
WHERE u.main_shop_id = #{mainShopId} and u.phone is not null
WHERE u.main_shop_id = #{mainShopId} and u.phone is not null and u.user_id is not null
<!-- 性别筛选条件 -->
<if test="!(param.sexMan == 1 and param.sexWoman == 1 and param.sexUnknown == 1)
and (param.sexMan == 1 or param.sexWoman == 1 or param.sexUnknown == 1)">

View File

@@ -265,8 +265,8 @@ public class MkShopCouponRecordServiceImpl extends ServiceImpl<MkShopCouponRecor
});
couponService.updateByQuery(newCoupon, queryWrapper);
} else {
queryWrapper.eq(ShopCoupon::getId, coupon.getId());
couponService.update(coupon, true);
newCoupon.setId(coupon.getId());
couponService.update(newCoupon, true);
}
}