| | |
| | | import com.ruoyi.member.domain.dto.MgtBirthdayEditDto; |
| | | import com.ruoyi.member.domain.dto.MgtBirthdayGetDto; |
| | | import com.ruoyi.member.domain.dto.MgtBirthdayGiftDto; |
| | | import com.ruoyi.member.domain.pojo.birthday.BirthdayCard; |
| | | import com.ruoyi.system.api.domain.poji.member.BirthdayCard; |
| | | import com.ruoyi.member.domain.pojo.birthday.BirthdayGift; |
| | | import com.ruoyi.member.domain.vo.*; |
| | | import com.ruoyi.member.mapper.birthday.BirthdayCardMapper; |
| | |
| | | import com.ruoyi.system.api.domain.dto.BirthdayGiftSendDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.poji.member.MemberGiftRecord; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.domain.vo.MgtSimpleShopVo; |
| | | import com.ruoyi.system.api.service.RemoteShopService; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | MerBirthdayGetVo birthdayGetVo = new MerBirthdayGetVo(); |
| | | // 获取平台生日卡信息 |
| | | BirthdayCard birthdayCard = birthdayCardMapper.getPlatformBirthdayCard(shopId); |
| | | Shop shop = remoteShopService.getShop(shopId).getData(); |
| | | if(birthdayCard.getAreaFlag()==2&&birthdayCard.getShopFlag()==1&&!StringUtils.checkString(birthdayCard.getDesignatedArea(),shop.getShopCityCode())){ |
| | | birthdayCard = null; |
| | | } |
| | | // 如果生日卡存在 |
| | | if (birthdayCard != null) { |
| | | String giftDesc = ""; |
| | |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public Integer checkBirthdayCard(Long shopId){ |
| | | public Integer checkBirthdayCard(Long shopId,Integer bindingFlag){ |
| | | // 获取平台生日卡信息 |
| | | Boolean platformBirthdayCardOpen = true; |
| | | BirthdayCard plBirthdayCard = birthdayCardMapper.getMerShopBirthdayCard(0L); |
| | | if (plBirthdayCard == null || plBirthdayCard.getCardStatus()!=1) { |
| | | platformBirthdayCardOpen = false; |
| | | }else{ |
| | | if(plBirthdayCard.getShopFlag()==2&&plBirthdayCard.getAreaFlag()==1){ |
| | | Shop shop = remoteShopService.getShop(shopId).getData(); |
| | | if(!StringUtils.checkString(plBirthdayCard.getDesignatedArea(),shop.getShopCityCode())){ |
| | | platformBirthdayCardOpen = false; |
| | | } |
| | | } |
| | | if(plBirthdayCard.getAreaFlag()==2&&!StringUtils.checkString(plBirthdayCard.getApplicableShop(),shopId.toString())){ |
| | | platformBirthdayCardOpen = false; |
| | | } |
| | |
| | | BirthdayCard shopBirthdayCard = birthdayCardMapper.getMerShopBirthdayCard(shopId); |
| | | // 如果生日卡存在 |
| | | Boolean shopBirthdayCardOpen = true; |
| | | if (shopBirthdayCard == null || shopBirthdayCard.getCardStatus()!=1) { |
| | | shopBirthdayCardOpen = false; |
| | | } |
| | | Integer marketingStatus = remoteShopService.getShopMarketingStatus(shopId).getData(); |
| | | if(marketingStatus<=1){ |
| | | if(bindingFlag==1){ |
| | | if (shopBirthdayCard == null || shopBirthdayCard.getCardStatus()!=1) { |
| | | shopBirthdayCardOpen = false; |
| | | } |
| | | Integer marketingStatus = remoteShopService.getShopMarketingStatus(shopId).getData(); |
| | | if(marketingStatus<=1){ |
| | | shopBirthdayCardOpen = false; |
| | | } |
| | | }else{ |
| | | shopBirthdayCardOpen = false; |
| | | } |
| | | if(platformBirthdayCardOpen||shopBirthdayCardOpen){ |
| | |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description 获取平台生日卡 |
| | | * @author jqs |
| | | * @date 2023/8/9 19:35 |
| | | * @param |
| | | * @return BirthdayCard |
| | | */ |
| | | @Override |
| | | public BirthdayCard getBirthdayCard(){ |
| | | LambdaQueryWrapper<BirthdayCard> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(BirthdayCard::getDelFlag,0); |
| | | queryWrapper.eq(BirthdayCard::getShopId,0L); |
| | | queryWrapper.eq(BirthdayCard::getCardStatus,1); |
| | | BirthdayCard shopBirthdayCard = this.getOne(queryWrapper,false); |
| | | return shopBirthdayCard; |
| | | } |
| | | } |