| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpSession; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.yeshi.buwan.domain.VideoResource; |
| | | import com.yeshi.buwan.service.imp.VideoResourceService; |
| | | import com.yeshi.buwan.util.SystemUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | private VideoService videoService; |
| | | @Resource |
| | | private SystemService systemService; |
| | | |
| | | @Resource |
| | | private VideoResourceService videoResourceService; |
| | | |
| | | @RequestMapping(value = "/searchvideo", method = RequestMethod.POST) |
| | | public void searchVideo(String key, PrintWriter out) { |
| | |
| | | out.print(object); |
| | | } |
| | | |
| | | @RequestMapping(value = "/resourceList", method = RequestMethod.POST) |
| | | public void resourceList(String key, HttpSession session, PrintWriter out) { |
| | | List<VideoResource> videoResources = videoResourceService.getResourceList(); |
| | | JSONObject object = new JSONObject(); |
| | | object.put("code", 0); |
| | | object.put("data", new Gson().toJson(videoResources)); |
| | | out.print(object); |
| | | } |
| | | |
| | | } |