zyh
This commit is contained in:
parent
a6719d57a3
commit
5e3a15e769
|
@ -1,12 +1,10 @@
|
|||
package net.maku.maku.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import net.maku.framework.mybatis.entity.BaseEntity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -9,7 +9,6 @@ import net.maku.framework.common.exception.ServerException;
|
|||
import net.maku.framework.common.utils.PageResult;
|
||||
import net.maku.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import net.maku.maku.convert.TBookConvert;
|
||||
import net.maku.maku.entity.TBookCommentEntity;
|
||||
import net.maku.maku.entity.TBookEntity;
|
||||
import net.maku.maku.query.TBookQuery;
|
||||
import net.maku.maku.vo.TBookVO;
|
||||
|
@ -66,16 +65,14 @@ public class TBookServiceImpl extends BaseServiceImpl<TBookDao, TBookEntity> imp
|
|||
}
|
||||
|
||||
@Override
|
||||
public TBookEntity getByName(String bookName) {
|
||||
public List<TBookEntity> getByName(String bookName) {
|
||||
LambdaQueryWrapper<TBookEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.like(TBookEntity::getBookName, bookName);
|
||||
TBookEntity tBookEntity = baseMapper.selectOne(wrapper);
|
||||
wrapper.eq(TBookEntity::getBookName, bookName);
|
||||
List<TBookEntity> tBookEntity = baseMapper.selectList(wrapper);
|
||||
if (ObjectUtil.isNull(tBookEntity)){
|
||||
throw new ServerException("没有找到书籍");
|
||||
}
|
||||
tBookEntity.setBookCover("obhhi");
|
||||
return tBookEntity;
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user