MrShi
3 天以前 82f707ece09a906007f3d760b6bb025896e3bba6
server/services/src/main/java/com/doumee/service/business/impl/ShopInfoServiceImpl.java
@@ -239,8 +239,6 @@
    public void applyShop(ShopApplyDTO request) {
        Member member = memberMapper.selectById(request.getMemberId());
        // 1. 校验门店手机号唯一性(shop_info.telephone)
        checkTelephoneUnique(request.getTelephone(), null);
        // 2. 根据类型校验附件
        if (Constants.equalsInteger(request.getCompanyType(), Constants.ZERO)) {
@@ -315,14 +313,17 @@
            existing.setPassword(encryptedPassword);
            existing.setSalt(salt);
            existing.setAliAccount(request.getAliAccount());
            existing.setAuditStatus(Constants.ZERO);
            existing.setAliName(request.getAliName());
            existing.setUpdateTime(now);
            existing.setAuditRemark(null);
            existing.setAuditTime(null);
            existing.setAuditUserId(null);
            existing.setAuditStatus(Constants.ZERO);
            shopInfoMapper.updateById(existing);
            shopId = existing.getId();
        } else {
            // 1. 校验门店手机号唯一性(shop_info.telephone)
            checkTelephoneUnique(request.getTelephone(), null);
            // 新建
            ShopInfo shopInfo = new ShopInfo();
            shopInfo.setCompanyType(request.getCompanyType());
@@ -344,8 +345,7 @@
            shopInfo.setPassword(encryptedPassword);
            shopInfo.setSalt(salt);
            shopInfo.setAliAccount(request.getAliAccount());
            shopInfo.setOpenid(member.getOpenid());
            shopInfo.setAuditStatus(Constants.ZERO);
            shopInfo.setAliName(request.getAliName());
            shopInfo.setStatus(Constants.ZERO);
            shopInfo.setDeleted(Constants.ZERO);
            shopInfo.setCreateTime(now);
@@ -552,6 +552,8 @@
        shopInfo.setLegalPersonName(request.getLegalPersonName());
        shopInfo.setLegalPersonPhone(request.getLegalPersonPhone());
        shopInfo.setLegalPersonCard(request.getLegalPersonCard());
        shopInfo.setAliAccount(request.getAliAccount());
        shopInfo.setAliName(request.getAliName());
        shopInfo.setUpdateTime(now);
        shopInfoMapper.updateById(shopInfo);
@@ -655,6 +657,9 @@
        vo.setPayStatus(shopInfo.getPayStatus());
        vo.setScore(shopInfo.getScore());
        vo.setCreateTime(shopInfo.getCreateTime());
        vo.setAliAccount(shopInfo.getAliAccount());
        vo.setAliName(shopInfo.getAliName());
        vo.setDepositAmount(shopInfo.getDepositAmount());
        // 拼接图片前缀
        String imgPrefix = "";
@@ -1054,12 +1059,13 @@
    }
    @Override
    public ShopLoginVO shopSilentLogin(String openid) {
        if (StringUtils.isBlank(openid)) {
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "openid不能为空");
    public ShopLoginVO shopSilentLogin(Integer memberId) {
        Member member = memberMapper.selectById(memberId);
        if(Objects.isNull(member)||StringUtils.isBlank(member.getOpenid())){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "当前登录会员身份异常,请联系管理员!");
        }
        ShopInfo shop = shopInfoMapper.selectOne(new QueryWrapper<ShopInfo>().lambda()
                .eq(ShopInfo::getOpenid, openid)
                .eq(ShopInfo::getOpenid, member.getOpenid())
                .eq(ShopInfo::getDeleted, Constants.ZERO)
                .last("limit 1"));
        if (shop == null) {