update service

This commit is contained in:
shuzheng 2016-10-16 20:48:44 +08:00
parent 560a34e4d8
commit 4e48fc4aae
5 changed files with 69 additions and 4 deletions

View File

@ -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接口

View File

@ -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;

View File

@ -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;
/**

View File

@ -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;

View File

@ -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";
}
}