use of com.baomidou.mybatisplus.core.conditions.query.QueryWrapper in project seckill by yt-King.
the class TOverdueRecordServiceImpl method detail.
public TOverdueRecord detail(String dataId) {
QueryWrapper<TOverdueRecord> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("data_id", dataId);
TOverdueRecord tOverdueRecord = tOverdueRecordMapper.selectOne(queryWrapper);
if (null == tOverdueRecord)
throw new RuntimeException("记录不存在");
return tOverdueRecord;
}
use of com.baomidou.mybatisplus.core.conditions.query.QueryWrapper in project springboot-learning by lyb-geek.
the class BookServiceImpl method getBookByName.
@Override
@RedisCache(type = CacheOperateType.QUERY, expireTime = 180)
public BookDTO getBookByName(String bookName) {
log.info("getBookByName走db");
Wrapper<Book> wrapper = new QueryWrapper<>();
((QueryWrapper<Book>) wrapper).eq("book_name", bookName);
Book book = bookMapper.selectOne(wrapper);
if (ObjectUtils.isNotEmpty(book)) {
return dozerMapper.map(book, BookDTO.class);
}
return null;
}
use of com.baomidou.mybatisplus.core.conditions.query.QueryWrapper in project forum by saysky.
the class TagServiceImpl method findTagByTagName.
@Override
public Tag findTagByTagName(String tagName) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("tag_name", tagName);
return tagMapper.selectOne(queryWrapper);
}
use of com.baomidou.mybatisplus.core.conditions.query.QueryWrapper in project forum by saysky.
the class UserServiceImpl method findByEmail.
@Override
public User findByEmail(String userEmail) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("user_email", userEmail);
return userMapper.selectOne(queryWrapper);
}
use of com.baomidou.mybatisplus.core.conditions.query.QueryWrapper in project forum by saysky.
the class UserServiceImpl method findByUserName.
@Override
public User findByUserName(String userName) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("user_name", userName);
return userMapper.selectOne(queryWrapper);
}
Aggregations