您的位置:首页 > 其它

测试写博客

2016-08-24 00:00 239 查看
摘要: 测试

编辑器代码测试

package com.xx.cms.controller;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.xx.cms.domain.Category;
import com.xx.cms.domain.Course;
import com.xx.cms.service.ICategoryService;
import com.xx.cms.service.ICourseService;
import com.xx.maker.core.domain.SystemConstant;
import com.xx.maker.core.pagination.PageList;
import com.xx.maker.core.service.ICoreService;
import com.xx.maker.security.controller.SecurityController;

@Controller
@RequestMapping(value="cms")
public class CmsController  extends SecurityController{

@Resource
private ICategoryService categoryService;

@Resource
private ICoreService coreService;
@Resource
private ICourseService courseService;

@RequestMapping(value="/index")
public ModelAndView manage() {
ModelAndView ma =this.getSecurityMV("/pages/kecheng");
List<SystemConstant> kclbList = new ArrayList<SystemConstant>();
kclbList = this.coreService.searchSunByParentCode("cklb");

ma.addObject("kclbList", kclbList);

List<Category> rootCategorys = new ArrayList<Category>();
rootCategorys = this.categoryService.findCategoryByHQL("from Category c where c.parent is null and c.special =:special", new String[]{"special"},new Object[]{Boolean.FALSE});

ma.addObject("rootCategorys", rootCategorys);

List<Course> courses = courseService.findAll();
ma.addObject("courses", courses);
PageList pl = this.courseService.findAllCourse(1, 10);
System.out.println(pl == null);

return ma;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  测试写博客