huliguo
1 天以前 d15bb55822001421572bfee603b3d503cd63e07d
pt-errand/src/main/java/com/ruoyi/errand/service/impl/PhoneServiceImpl.java
@@ -36,8 +36,9 @@
    @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);
@@ -52,4 +53,13 @@
        }
    }
    @Override
    public String getPhone() {
        List<Phone> list = this.getBaseMapper().selectList(new LambdaUpdateWrapper<Phone>().eq(Phone::getType, 1));
        if (list!=null && !list.isEmpty()){
            return list.get(0).getPhone();
        }
        return "";
    }
}