修改三维课程管理接口逻辑

This commit is contained in:
sheng 2021-12-24 10:58:27 +08:00
parent 5babfecb4c
commit 48a3b8c6cf

View File

@ -53,14 +53,14 @@ public class Lesson3DServiceImpl implements Lesson3DService {
@Override
public List<Lesson3DVO> queryBy(Lesson3DQueryVO queryVO) {
Lesson3dExample example = this.buildExampleByQueryVo(queryVO);
example.getOredCriteria().get(0).andStateEqualTo(StatusEnum.Valid.getCode());
List<Lesson3d> lesson3ds = this.lesson3dDAO.selectByExample(example);
return Lesson3DVO.convertPublish2VOList(lesson3ds);
}
private Lesson3dExample buildExampleByQueryVo(Lesson3DQueryVO queryVO) {
Lesson3dExample example = new Lesson3dExample();
Lesson3dExample.Criteria criteria = example.createCriteria()
.andStateEqualTo(StatusEnum.Valid.getCode());
Lesson3dExample.Criteria criteria = example.createCriteria();
if (StringUtils.hasText(queryVO.getName())) {
criteria.andNameLike(String.format("%%%s%%", queryVO.getName()));
}