huliguo
2025-07-03 e3a2245265516fef78b4737d6fffc939e7c5e0af
pt-errand/src/main/java/com/ruoyi/errand/service/impl/PhoneServiceImpl.java
@@ -24,20 +24,22 @@
        AppUser appuser = (AppUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        //查找小区客服
        Phone phone = this.getBaseMapper().selectOne(new LambdaUpdateWrapper<Phone>().eq(Phone::getType, 2)
                .eq(Phone::getCommunity_id, appuser.getCommunityId()));
                .eq(Phone::getCommunityId, appuser.getCommunityId()));
        if (phone!=null){
            return phone.getPhone();
        }
        //查找平台客服
        List<Phone> list = this.getBaseMapper().selectList(new LambdaUpdateWrapper<Phone>().eq(Phone::getType, 1));
        if (list.size()>0){}
        return list.get(0).getPhone();
    }
    @Override
    public void saveServicePhone(String phone) {
        Phone phoneEntity = this.getBaseMapper().selectOne(new LambdaUpdateWrapper<Phone>().eq(Phone::getType, 1));
        if (phoneEntity!=null){
        if (phoneEntity==null){
            //不存在
            phoneEntity = new Phone();
            phoneEntity.setType(1);
            phoneEntity.setPhone(phone);
            this.save(phoneEntity);