| | |
| | | package com.ruoyi.member.service.impl.coupon; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.member.domain.pojo.coupon.CouponRelUser; |
| | | import com.ruoyi.member.domain.vo.MgtCouponMemberListVo; |
| | | import com.ruoyi.member.mapper.coupon.CouponRelUserMapper; |
| | | import com.ruoyi.member.service.coupon.CouponRelUserService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class CouponRelUserServiceImpl extends ServiceImpl<CouponRelUserMapper, CouponRelUser> implements CouponRelUserService { |
| | | |
| | | @Resource |
| | | private CouponRelUserMapper couponRelUserMapper; |
| | | |
| | | /** |
| | | * @description 获取优惠券关联用户 |
| | | * @author jqs |
| | | * @date 2023/6/13 16:17 |
| | | * @param |
| | | * @return List<MgtCouponMemberListVo> |
| | | */ |
| | | @Override |
| | | public List<MgtCouponMemberListVo> listCouponMemberVo(String couponId){ |
| | | return couponRelUserMapper.listCouponMemberVo(couponId); |
| | | } |
| | | |
| | | /** |
| | | * @description 刪除优惠券关联 |
| | | * @author jqs |
| | | * @date 2023/6/13 17:05 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public void deleteCouponRelByCouponId(String couponId){ |
| | | LambdaUpdateWrapper<CouponRelUser> wrapper = new LambdaUpdateWrapper<>(); |
| | | wrapper.eq(CouponRelUser::getCouponId, couponId); |
| | | wrapper.eq(CouponRelUser::getDelFlag, 0); |
| | | wrapper.set(CouponRelUser::getDelFlag, 1); |
| | | this.update(wrapper); |
| | | } |
| | | } |