content: package me.flyray.rbac.controller;
  
  import java.util.List;
  import java.util.Map;
  
  import org.apache.shiro.authz.annotation.RequiresPermissions;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestParam;
  import org.springframework.web.bind.annotation.ResponseBody;
  
  import me.flyray.rbac.entity.SysLogEntity;
  import me.flyray.rbac.service.SysLogService;
  import me.flyray.rbac.utils.PageUtils;
  import me.flyray.rbac.utils.Query;
  import me.flyray.rbac.utils.R;
  
  
  /**
   * 系统日志
   * 
   * @author chenshun
   * @email sunlightcs@gmail.com
   * @date 2017-03-08 10:40:56
   */
  @Controller
  @RequestMapping("/sys/log")
  public class SysLogController {
  	@Autowired
  	private SysLogService sysLogService;
  	
  	/**
  	 * 列表
  	 */
  	@ResponseBody
  	@RequestMapping("/list")
  	@RequiresPermissions("sys:log:list")
  	public R list(@RequestParam Map<String, Object> params){
  		//查询列表数据
  		Query query = new Query(params);
  		List<SysLogEntity> sysLogList = sysLogService.queryList(query);
  		int total = sysLogService.queryTotal(query);
  		
  		PageUtils pageUtil = new PageUtils(sysLogList, total, query.getLimit(), query.getPage());
  		
  		return R.ok().put("page", pageUtil);
  	}
  	
  }
  