| | |
| | | import cc.mrbird.febs.mall.service.IApiMallMemberWalletService; |
| | | import cc.mrbird.febs.mall.service.ICommonService; |
| | | import cc.mrbird.febs.mall.vo.*; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.IdUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | |
| | | private final IApiMallMemberWalletService walletService; |
| | | private final MallMemberPaymentMapper mallMemberPaymentMapper; |
| | | private final DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | private final MallShopApplyMapper mallShopApplyMapper; |
| | | |
| | | |
| | | @Value("${spring.profiles.active}") |
| | |
| | | commissionVo.setWaitCommission(BigDecimal.ZERO); |
| | | return commissionVo; |
| | | } |
| | | |
| | | @Override |
| | | public void shopApply(ShopApplyDto shopApplyDto) { |
| | | MallMember member = LoginUserUtil.getLoginUser(); |
| | | |
| | | MallShopApply hasApply = mallShopApplyMapper.selectNewestApplyByMemberId(member.getId()); |
| | | if (hasApply != null) { |
| | | if (!hasApply.getStatus().equals(MallShopApply.APPLY_DISAGREE)) { |
| | | throw new FebsException("审核中或审核已通过"); |
| | | } |
| | | } |
| | | |
| | | MallShopApply mallShopApply = new MallShopApply(); |
| | | BeanUtil.copyProperties(shopApplyDto, mallShopApply); |
| | | |
| | | mallShopApply.setStatus(MallShopApply.APPLY_ING); |
| | | mallShopApply.setMemberId(member.getId()); |
| | | mallShopApplyMapper.insert(mallShopApply); |
| | | } |
| | | |
| | | @Override |
| | | public MallShopApply findNewestApply() { |
| | | MallMember member = LoginUserUtil.getLoginUser(); |
| | | |
| | | return mallShopApplyMapper.selectNewestApplyByMemberId(member.getId()); |
| | | } |
| | | } |