diff --git a/cms/cms-service/src/main/java/com/zheng/cms/service/UserService.java b/cms/cms-service/src/main/java/com/zheng/cms/service/UserService.java index 32f8d45a..1f4bd3fd 100644 --- a/cms/cms-service/src/main/java/com/zheng/cms/service/UserService.java +++ b/cms/cms-service/src/main/java/com/zheng/cms/service/UserService.java @@ -6,7 +6,6 @@ import java.util.Map; import com.zheng.cms.mapper.UserMapper; import com.zheng.cms.model.User; import com.zheng.cms.model.UserVO; -import com.zheng.cms.service.BaseService; /** * 用户service接口 diff --git a/cms/cms-service/src/main/java/com/zheng/cms/service/impl/UserServiceImpl.java b/cms/cms-service/src/main/java/com/zheng/cms/service/impl/UserServiceImpl.java index a91dd533..8b6cf917 100644 --- a/cms/cms-service/src/main/java/com/zheng/cms/service/impl/UserServiceImpl.java +++ b/cms/cms-service/src/main/java/com/zheng/cms/service/impl/UserServiceImpl.java @@ -5,6 +5,7 @@ import java.util.Map; import com.zheng.cms.mapper.UserMapper; import com.zheng.cms.model.User; +import com.zheng.cms.model.UserExample; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/cms/cms-web/src/main/java/com/zheng/cms/controller/HelloController.java b/cms/cms-web/src/main/java/com/zheng/cms/controller/HelloController.java index e51b3201..6be37f87 100644 --- a/cms/cms-web/src/main/java/com/zheng/cms/controller/HelloController.java +++ b/cms/cms-web/src/main/java/com/zheng/cms/controller/HelloController.java @@ -7,6 +7,7 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; +import com.zheng.cms.model.User; import org.apache.commons.io.FileUtils; import org.apache.commons.lang.builder.ReflectionToStringBuilder; import org.slf4j.Logger; @@ -24,7 +25,6 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; -import com.zheng.cms.model.User; import com.zheng.cms.service.impl.UserServiceImpl; /** diff --git a/cms/cms-web/src/main/java/com/zheng/cms/controller/UserController.java b/cms/cms-web/src/main/java/com/zheng/cms/controller/UserController.java index 9325bc5a..1cd7ea2c 100644 --- a/cms/cms-web/src/main/java/com/zheng/cms/controller/UserController.java +++ b/cms/cms-web/src/main/java/com/zheng/cms/controller/UserController.java @@ -9,6 +9,8 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.validation.Valid; +import com.zheng.cms.model.User; +import com.zheng.cms.model.UserExample; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -24,8 +26,6 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; -import com.zheng.cms.model.User; -import com.zheng.cms.model.UserExample; import com.zheng.cms.service.UserService; import com.zheng.cms.util.Paginator; diff --git a/cms/cms-web/src/main/java/com/zheng/cms/controller/cms/CategoryController.java b/cms/cms-web/src/main/java/com/zheng/cms/controller/cms/CategoryController.java new file mode 100644 index 00000000..a52b71a4 --- /dev/null +++ b/cms/cms-web/src/main/java/com/zheng/cms/controller/cms/CategoryController.java @@ -0,0 +1,65 @@ +package com.zheng.cms.controller.cms; + +import com.zheng.cms.controller.BaseController; +import com.zheng.cms.model.User; +import com.zheng.cms.model.UserExample; +import com.zheng.cms.service.UserService; +import com.zheng.cms.util.Paginator; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.BindingResult; +import org.springframework.validation.ObjectError; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; +import java.io.File; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 文章类目 + * @author shuzheng + * @date 2016年10月16日 17:23 + */ +@Controller +@RequestMapping("/category") +public class CategoryController extends BaseController { + + private static Logger logger = LoggerFactory.getLogger(CategoryController.class); + + @Autowired + private UserService userService; + + /** + * 首页 + * @return + */ + @RequestMapping(value = {""}) + public String index() { + return "redirect:/category/list"; + } + + /** + * 列表 + * @param page + * @param rows + * @param request + * @return + */ + @RequestMapping("/list") + public String list( + @RequestParam(required = false, defaultValue = "1") int page, + @RequestParam(required = false, defaultValue = "20") int rows, + HttpServletRequest request) { + + return "/category/list"; + } + +} \ No newline at end of file