diff --git a/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthUserVideoController.java b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthUserVideoController.java index f3311e7..490eb78 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthUserVideoController.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/controller/HealthUserVideoController.java @@ -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> findVideoVoList(@RequestBody VideoDto videoDto){ - startPage(videoDto.getPage(), videoDto.getCount()); - List List = healthUserVideoService.findVideoVoList(videoDto); + public HealthR> findVideoVoList(@RequestParam Integer categoryId,@RequestParam Integer page,@RequestParam Integer count){ + startPage(page,count); + List List = healthUserVideoService.findVideoVoList(categoryId); return HealthR.ok(List); } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthUserVideoMapper.java b/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthUserVideoMapper.java index bba93fb..7120dfb 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthUserVideoMapper.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/mapper/HealthUserVideoMapper.java @@ -12,5 +12,5 @@ import java.util.List; public interface HealthUserVideoMapper { List findVideoCategoryList(); - List findVideoVoList(VideoDto videoDto); + List findVideoVoList(@Param("categoryId") Integer categoryId); } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/HealthUserVideoService.java b/doctor-modules/doctor-health/src/main/java/doctor/service/HealthUserVideoService.java index 5540cce..56e0b1e 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/HealthUserVideoService.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/HealthUserVideoService.java @@ -13,5 +13,5 @@ import java.util.List; public interface HealthUserVideoService { List findVideoCategoryList(); - List findVideoVoList(VideoDto videoDto); + List findVideoVoList(Integer categoryId); } diff --git a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthUserVideoServiceImpl.java b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthUserVideoServiceImpl.java index 49236b6..b5e36d9 100644 --- a/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthUserVideoServiceImpl.java +++ b/doctor-modules/doctor-health/src/main/java/doctor/service/impl/HealthUserVideoServiceImpl.java @@ -29,8 +29,8 @@ public class HealthUserVideoServiceImpl implements HealthUserVideoService { } @Override - public List findVideoVoList(VideoDto videoDto) { - List videoVoList = healthUserVideoMapper.findVideoVoList(videoDto); + public List findVideoVoList(Integer categoryId) { + List videoVoList = healthUserVideoMapper.findVideoVoList(categoryId); List videoVos = ConvertUtil.entityToVoList(videoVoList, VideoVo.class); return videoVos; } diff --git a/doctor-modules/doctor-health/src/main/resources/mapper/HealthUserVideoMapper.xml b/doctor-modules/doctor-health/src/main/resources/mapper/HealthUserVideoMapper.xml index 25c0127..8e1c34c 100644 --- a/doctor-modules/doctor-health/src/main/resources/mapper/HealthUserVideoMapper.xml +++ b/doctor-modules/doctor-health/src/main/resources/mapper/HealthUserVideoMapper.xml @@ -11,4 +11,5 @@ +