From 3f1e7569d9956837d2fa305dd78a7f9583dfa3e5 Mon Sep 17 00:00:00 2001 From: jiangqs <jiangqs> Date: 星期日, 23 七月 2023 18:46:30 +0800 Subject: [PATCH] bug --- ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/birthday/BirthdayCardServiceImpl.java | 33 +++++++++++++++++++++++++++++---- 1 files changed, 29 insertions(+), 4 deletions(-) diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/birthday/BirthdayCardServiceImpl.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/birthday/BirthdayCardServiceImpl.java index 5a04222..f15aace 100644 --- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/birthday/BirthdayCardServiceImpl.java +++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/service/impl/birthday/BirthdayCardServiceImpl.java @@ -1,6 +1,7 @@ package com.ruoyi.member.service.impl.birthday; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.common.core.utils.bean.BeanUtils; import com.ruoyi.common.core.utils.uuid.IdUtils; @@ -91,7 +92,11 @@ // 创建新的生日卡 BirthdayCard birthdayCard = new BirthdayCard(); birthdayCard.setDelFlag(0); - birthdayCard.setShopId(0L); + if(mgtBirthdayEditDto.getShopId()!=null){ + birthdayCard.setShopId(mgtBirthdayEditDto.getShopId()); + }else{ + birthdayCard.setShopId(0L); + } birthdayCard.setCardStatus(mgtBirthdayEditDto.getCardStatus()); // 根据卡状态设置开启或关闭时间 if(mgtBirthdayEditDto.getCardStatus()==1){ @@ -101,8 +106,8 @@ } // 设置创建时间 birthdayCard.setCreateTime(new Date()); - // 如果店铺ID不为空,则进行相关设置 - if(mgtBirthdayEditDto.getShopId()!=null){ + // 如果店铺ID为空,则进行相关设置 + if(mgtBirthdayEditDto.getShopId()==null){ birthdayCard.setAreaFlag(mgtBirthdayEditDto.getAreaFlag()); if(mgtBirthdayEditDto.getAreaFlag()==2){ birthdayCard.setDesignatedArea(mgtBirthdayEditDto.getDesignatedArea()); @@ -230,6 +235,7 @@ giftDesc = giftSj.toString(); birthdayGetVo.setGiftDesc(giftDesc); } + birthdayGetVo.setCardStatus(birthdayCard.getCardStatus()); }else{ birthdayGetVo.setCardStatus(2); } @@ -346,7 +352,7 @@ // 创建新的生日卡 BirthdayCard birthdayCard = new BirthdayCard(); birthdayCard.setDelFlag(0); - birthdayCard.setShopId(0L); + birthdayCard.setShopId(merBirthdayEditDto.getShopId()); birthdayCard.setCardStatus(merBirthdayEditDto.getCardStatus()); // 根据卡状态设置开启或关闭时间 if(merBirthdayEditDto.getCardStatus()==1){ @@ -625,4 +631,23 @@ appBirthdayCardVo.setBirthdayGiftVoList(birthdayGiftVoList); return appBirthdayCardVo; } + + /** + * @description + * @author jqs + * @date 2023/7/11 18:02 + * @param page + * @param userId + * @return List<AppMemberPrizePageVo> + */ + @Override + public List<AppMemberPrizePageVo> pageAppMemberPrize(Page page, Long userId){ + List<AppMemberPrizePageVo> memberPrizePageVoList = birthdayCardMapper.pageAppMemberPrize(page, userId); + if(memberPrizePageVoList!=null&&!memberPrizePageVoList.isEmpty()){ + for(AppMemberPrizePageVo appMemberPrizePageVo : memberPrizePageVoList){ + appMemberPrizePageVo.setVerifyCode("3-"+appMemberPrizePageVo.getPrizeId()); + } + } + return memberPrizePageVoList; + } } -- Gitblit v1.7.1