zmy05
parent
16030f8df7
commit
bc77718110
|
@ -2,15 +2,10 @@ package doctor.controller;
|
|||
|
||||
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.common.core.web.controller.BaseController;
|
||||
import doctor.common.core.web.page.TableDataInfo;
|
||||
import doctor.domain.dto.VideoDto;
|
||||
import doctor.domain.entity.VideoCategoryEntity;
|
||||
import doctor.domain.entity.VideoEntity;
|
||||
import doctor.domain.vo.VideoCategoryVo;
|
||||
import doctor.domain.vo.VideoVo;
|
||||
import doctor.service.HealthUserVideoService;
|
||||
import doctor.util.ConvertUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -31,9 +26,9 @@ public class HealthUserVideoController{
|
|||
}
|
||||
|
||||
@GetMapping("/findVideoVoList")
|
||||
public HealthR<List<VideoVo>> findVideoVoList(@RequestBody VideoDto videoDto){
|
||||
startPage(videoDto.getPage(), videoDto.getCount());
|
||||
List<VideoVo> List = healthUserVideoService.findVideoVoList(videoDto);
|
||||
public HealthR<List<VideoVo>> findVideoVoList(@RequestParam Integer categoryId,@RequestParam Integer page,@RequestParam Integer count){
|
||||
startPage(page,count);
|
||||
List<VideoVo> List = healthUserVideoService.findVideoVoList(categoryId);
|
||||
return HealthR.ok(List);
|
||||
}
|
||||
|
||||
|
|
|
@ -12,5 +12,5 @@ import java.util.List;
|
|||
public interface HealthUserVideoMapper {
|
||||
List<VideoCategoryEntity> findVideoCategoryList();
|
||||
|
||||
List<VideoEntity> findVideoVoList(VideoDto videoDto);
|
||||
List<VideoEntity> findVideoVoList(@Param("categoryId") Integer categoryId);
|
||||
}
|
||||
|
|
|
@ -13,5 +13,5 @@ import java.util.List;
|
|||
public interface HealthUserVideoService {
|
||||
List<VideoCategoryVo> findVideoCategoryList();
|
||||
|
||||
List<VideoVo> findVideoVoList(VideoDto videoDto);
|
||||
List<VideoVo> findVideoVoList(Integer categoryId);
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@ public class HealthUserVideoServiceImpl implements HealthUserVideoService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<VideoVo> findVideoVoList(VideoDto videoDto) {
|
||||
List<VideoEntity> videoVoList = healthUserVideoMapper.findVideoVoList(videoDto);
|
||||
public List<VideoVo> findVideoVoList(Integer categoryId) {
|
||||
List<VideoEntity> videoVoList = healthUserVideoMapper.findVideoVoList(categoryId);
|
||||
List<VideoVo> videoVos = ConvertUtil.entityToVoList(videoVoList, VideoVo.class);
|
||||
return videoVos;
|
||||
}
|
||||
|
|
|
@ -11,4 +11,5 @@
|
|||
<select id="findVideoVoList" resultType="doctor.domain.entity.VideoEntity">
|
||||
select * from video where category_id=#{categoryId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue