Search in sources :

Example 1 with Phone

use of com.ch999.haha.admin.entity.Phone in project haha by hahafreeasair666.

the class PhoneServiceImpl method checkPhoneNum.

@Override
public Boolean checkPhoneNum(String mobile) {
    Wrapper<Phone> wrapper = new EntityWrapper<>();
    wrapper.eq("phone_num", mobile);
    Integer count = this.selectCount(wrapper);
    if (count != 0) {
        return false;
    } else {
        Phone phone = new Phone(mobile);
        this.insert(phone);
        return true;
    }
}
Also used : Phone(com.ch999.haha.admin.entity.Phone) EntityWrapper(com.baomidou.mybatisplus.mapper.EntityWrapper)

Aggregations

EntityWrapper (com.baomidou.mybatisplus.mapper.EntityWrapper)1 Phone (com.ch999.haha.admin.entity.Phone)1