预览按钮发送请求 到内容管理服务
内容管理服务调取系统管理服务的大小分类数据
内容管理服务内部 把所有数据 组合到一个课程发布数据库中
然后从课程发布数据库中 获取数据 生成数据模型map
使用controller组装数据模型和模板 并响应到前端
在@RestController注解下 需要先new ModelAndView() 参数为模板文件名和数据模型map 就可以直接把这个ModelAndView类型 直接返回
此返回不会走json 而是响应的 数据模型和视图对象
@Slf4j@RestController@RequestMapping("coursePub")public class CoursePubController implements CoursePubApi {@Autowiredprivate CoursePubService coursePubService;@Override@GetMapping("course/preview/{courseBaseId}/{companyId}")public Object previewCourse(@PathVariable Long courseBaseId,@PathVariable Long companyId) {Map<String,Object> map=coursePubService.generateDataMap(courseBaseId,companyId);ModelAndView modelAndView = new ModelAndView("learing_article",map);return modelAndView;}}
