From c78ac1e382e63bae6a8345d9bbfc95e9c3035e0f Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Sat, 11 Jun 2022 20:29:49 +0800 Subject: [PATCH] fix --- src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java | 33 ++++++++++++++++++++++++--------- 1 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java index 7d9bedb..2125d43 100644 --- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java +++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java @@ -8,6 +8,7 @@ import cc.mrbird.febs.common.exception.FebsException; import cc.mrbird.febs.common.utils.*; import cc.mrbird.febs.mall.conversion.MallMemberConversion; +import cc.mrbird.febs.mall.conversion.MallShopApplyConversion; import cc.mrbird.febs.mall.dto.*; import cc.mrbird.febs.mall.entity.*; import cc.mrbird.febs.mall.mapper.*; @@ -35,10 +36,7 @@ import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @author wzy @@ -82,10 +80,12 @@ } String account = registerDto.getAccount(); - String code = registerDto.getCode(); - boolean flags = commonService.verifyCode(account, code); - if(!flags) { - throw new FebsException("验证码错误"); + if (!"admin".equals(registerDto.getRegistType())) { + String code = registerDto.getCode(); + boolean flags = commonService.verifyCode(account, code); + if (!flags) { + throw new FebsException("验证码错误"); + } } mallMember = new MallMember(); @@ -495,7 +495,7 @@ MallShopApply hasApply = mallShopApplyMapper.selectNewestApplyByMemberId(member.getId()); if (hasApply != null) { if (!hasApply.getStatus().equals(MallShopApply.APPLY_DISAGREE)) { - throw new FebsException("审核中或审核已通过"); + throw new FebsException("请勿重复提交申请"); } } @@ -538,4 +538,19 @@ } return cashOutSettingVo; } + + @Override + public List<ShopListVo> findShopListVo(ShopListDto shopListDto) { + Page<MallShopApply> page = new Page<>(shopListDto.getPageNow(), shopListDto.getPageSize()); + + MallShopApply shopApply = new MallShopApply(); + shopApply.setStatus(MallShopApply.APPLY_AGREE); + IPage<MallShopApply> pageResult = mallShopApplyMapper.selectShopApplyInPage(shopApply, page); + + List<MallShopApply> list = pageResult.getRecords(); + if (CollUtil.isEmpty(list)) { + list = new ArrayList<>(); + } + return MallShopApplyConversion.INSTANCE.entitiesToVOs(list); + } } -- Gitblit v1.9.1