|
@ -1,8 +1,10 @@
|
|
package com.yihu.jw.care.endpoint.video;
|
|
package com.yihu.jw.care.endpoint.video;
|
|
|
|
|
|
import com.yihu.jw.care.dao.video.BaseVideoDao;
|
|
import com.yihu.jw.care.dao.video.BaseVideoDao;
|
|
|
|
import com.yihu.jw.care.service.video.BaseVideoService;
|
|
import com.yihu.jw.restmodel.web.ListEnvelop;
|
|
import com.yihu.jw.restmodel.web.ListEnvelop;
|
|
import com.yihu.jw.restmodel.web.ObjEnvelop;
|
|
import com.yihu.jw.restmodel.web.ObjEnvelop;
|
|
|
|
import com.yihu.jw.restmodel.web.PageEnvelop;
|
|
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
|
|
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
@ -27,6 +29,8 @@ public class PatientVideoEndpoint extends EnvelopRestEndpoint {
|
|
private BaseVideoDao baseVideoDao;
|
|
private BaseVideoDao baseVideoDao;
|
|
@Autowired
|
|
@Autowired
|
|
private JdbcTemplate jdbcTemplate;
|
|
private JdbcTemplate jdbcTemplate;
|
|
|
|
@Autowired
|
|
|
|
private BaseVideoService baseVideoService;
|
|
|
|
|
|
@RequestMapping(value = "findVideoNum", method = RequestMethod.GET)
|
|
@RequestMapping(value = "findVideoNum", method = RequestMethod.GET)
|
|
@ApiOperation(value = "按类型获取视频列表")
|
|
@ApiOperation(value = "按类型获取视频列表")
|
|
@ -61,4 +65,27 @@ public class PatientVideoEndpoint extends EnvelopRestEndpoint {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("/getVideoGroup")
|
|
|
|
@ApiOperation(value = "获取视频栏目")
|
|
|
|
public ListEnvelop getVideoGroup(){
|
|
|
|
try {
|
|
|
|
return baseVideoService.getVideoGroup();
|
|
|
|
}catch (Exception e){
|
|
|
|
return failedListEnvelopException2(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/getVideoPageByGroup")
|
|
|
|
@ApiOperation(value = "获取视频列表")
|
|
|
|
public PageEnvelop getVideoPageByGroup(@ApiParam(name = "groupId",value = "栏目id")@RequestParam(required = false,defaultValue = "0") Integer groupId,
|
|
|
|
@ApiParam @RequestParam(required = false,defaultValue = "1")Integer page,
|
|
|
|
@ApiParam @RequestParam(required = false,defaultValue = "20")Integer pageSize){
|
|
|
|
try {
|
|
|
|
return baseVideoService.getVideoPageByGroup(groupId, page, pageSize);
|
|
|
|
}catch (Exception e){
|
|
|
|
return failedPageEnvelopException(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|