| | |
| | | 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)) { |
| | |
| | | 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()); |
| | |
| | | vo.setCreateTime(shopInfo.getCreateTime()); |
| | | vo.setAliAccount(shopInfo.getAliAccount()); |
| | | vo.setAliName(shopInfo.getAliName()); |
| | | vo.setDepositAmount(shopInfo.getDepositAmount()); |
| | | |
| | | // 拼接图片前缀 |
| | | String imgPrefix = ""; |
| | |
| | | } |
| | | |
| | | @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) { |