无意义更新

master
星期八 5 years ago
parent 9dca4970d4
commit eb384365ff
  1. 2
      src/main/java/com/lq/cms/web/FileSystemController.java
  2. 1
      src/main/java/com/lq/cms/web/IndexController.java
  3. 11
      src/main/java/com/lq/cms/web/LoginController.java
  4. 2
      src/main/java/com/lq/cms/web/sys/MenuController.java
  5. 8
      src/main/java/com/lq/cms/web/sys/PermissionController.java
  6. 23
      src/main/java/com/lq/cms/web/sys/RoleController.java

@ -28,8 +28,6 @@ import java.util.Date;
public class FileSystemController extends BaseController{ public class FileSystemController extends BaseController{
public static final Logger LOGGER = LoggerFactory.getLogger(FileSystemController.class); public static final Logger LOGGER = LoggerFactory.getLogger(FileSystemController.class);
// @Autowired
// private SysFileService sysFileService;
public static final String UPLOAD_FILE_PATH="/Users/qi_liang/java/fileManger"; public static final String UPLOAD_FILE_PATH="/Users/qi_liang/java/fileManger";

@ -50,7 +50,6 @@ public class IndexController {
@RequestMapping(value = {"/index",""}) @RequestMapping(value = {"/index",""})
public ModelAndView toCmsIndix(ModelAndView modelAndView, HttpServletRequest request){ public ModelAndView toCmsIndix(ModelAndView modelAndView, HttpServletRequest request){
Subject subject=SecurityUtils.getSubject(); Subject subject=SecurityUtils.getSubject();
Session session = subject.getSession();
SysUser sysUser=(SysUser) subject.getPrincipal(); SysUser sysUser=(SysUser) subject.getPrincipal();
List<MenusComposite> list ; List<MenusComposite> list ;
String contextPath = request.getContextPath(); String contextPath = request.getContextPath();

@ -16,9 +16,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@ -41,16 +39,15 @@ public class LoginController extends BaseController{
@Autowired @Autowired
private SysUserService sysUserService; private SysUserService sysUserService;
// @Autowired
// private MailService mailService;
@RequestMapping(value = {"/index",""})
@GetMapping(value = {"/index",""})
public String toLogin(){ public String toLogin(){
return "cms/login"; return "cms/login";
} }
@ResponseBody @ResponseBody
@RequestMapping(value = "/doLogin",method = RequestMethod.POST) @PostMapping(value = "/doLogin")
public Object doLogin(String loginName, String password, HttpSession session,String authCode,Boolean rememberMe){ public Object doLogin(String loginName, String password, HttpSession session,String authCode,Boolean rememberMe){
AjaxResult ajaxResult= this.getAjaxResult(); AjaxResult ajaxResult= this.getAjaxResult();
String strCode=(String) session.getAttribute("strCode"); String strCode=(String) session.getAttribute("strCode");

@ -46,8 +46,8 @@ public class MenuController {
return modelAndView; return modelAndView;
} }
@RequestMapping("/list")
@ResponseBody @ResponseBody
@RequestMapping("/list")
@RequiresPermissions(INDEX_URL+ Constant.PERSSION_MARK+Constant.PERMISSION_SELECT) @RequiresPermissions(INDEX_URL+ Constant.PERSSION_MARK+Constant.PERMISSION_SELECT)
public Object list(SysResourceVo vo){ public Object list(SysResourceVo vo){
AdminDataGridParam<SysResourceVo> adminDataGridParam = new AdminDataGridParam<>(); AdminDataGridParam<SysResourceVo> adminDataGridParam = new AdminDataGridParam<>();

@ -57,8 +57,8 @@ public class PermissionController extends BaseController{
return "cms/sys/permission/edit"; return "cms/sys/permission/edit";
} }
@RequestMapping("/list")
@ResponseBody @ResponseBody
@RequestMapping("/list")
public Object list(SysPermissionVo vo){ public Object list(SysPermissionVo vo){
AdminDataGridParam<SysPermissionVo> adminDataGridParam = new AdminDataGridParam<>(); AdminDataGridParam<SysPermissionVo> adminDataGridParam = new AdminDataGridParam<>();
adminDataGridParam.setRows(sysPermissionService.findListPage(vo)); adminDataGridParam.setRows(sysPermissionService.findListPage(vo));
@ -66,8 +66,8 @@ public class PermissionController extends BaseController{
return adminDataGridParam; return adminDataGridParam;
} }
@RequestMapping("/save")
@ResponseBody @ResponseBody
@RequestMapping("/save")
public Object save(SysPermissionVo vo){ public Object save(SysPermissionVo vo){
AjaxResult ajaxResult = this.getAjaxResult(); AjaxResult ajaxResult = this.getAjaxResult();
SysPermission sysPermission = sysPermissionService.save(vo); SysPermission sysPermission = sysPermissionService.save(vo);
@ -75,8 +75,8 @@ public class PermissionController extends BaseController{
return ajaxResult; return ajaxResult;
} }
@RequestMapping("/update")
@ResponseBody @ResponseBody
@RequestMapping("/update")
public Object update(SysPermissionVo vo){ public Object update(SysPermissionVo vo){
AjaxResult ajaxResult = this.getAjaxResult(); AjaxResult ajaxResult = this.getAjaxResult();
SysPermission sysPermission = sysPermissionService.update(vo); SysPermission sysPermission = sysPermissionService.update(vo);
@ -84,8 +84,8 @@ public class PermissionController extends BaseController{
return ajaxResult; return ajaxResult;
} }
@RequestMapping("/delete")
@ResponseBody @ResponseBody
@RequestMapping("/delete")
public Object delete(SysPermissionVo vo){ public Object delete(SysPermissionVo vo){
sysPermissionService.delete(vo.getId()); sysPermissionService.delete(vo.getId());

@ -49,9 +49,11 @@ public class RoleController {
return modelAndView; return modelAndView;
} }
@RequiresPermissions(INDEX_URL+ Constant.PERSSION_MARK+Constant.PERMISSION_SELECT)
@RequestMapping("/list")
@ResponseBody @ResponseBody
@RequestMapping("/list")
@RequiresPermissions(INDEX_URL+ Constant.PERSSION_MARK+Constant.PERMISSION_SELECT)
public Object list(SysRoleVo vo){ public Object list(SysRoleVo vo){
AdminDataGridParam<SysRoleVo> adminDataGridParam = new AdminDataGridParam<>(); AdminDataGridParam<SysRoleVo> adminDataGridParam = new AdminDataGridParam<>();
adminDataGridParam.setTotal(sysRoleService.count(vo)); adminDataGridParam.setTotal(sysRoleService.count(vo));
@ -78,9 +80,10 @@ public class RoleController {
return modelAndView; return modelAndView;
} }
@RequiresPermissions(INDEX_URL+ Constant.PERSSION_MARK+Constant.PERMISSION_UPDATE)
@RequestMapping("/updatePermission")
@ResponseBody @ResponseBody
@RequestMapping("/updatePermission")
@RequiresPermissions(INDEX_URL+ Constant.PERSSION_MARK+Constant.PERMISSION_UPDATE)
public Object updatePermission(@RequestBody List<SysRoleResourcePermissionVo> list){ public Object updatePermission(@RequestBody List<SysRoleResourcePermissionVo> list){
AjaxResult ajaxResult=new AjaxResult(); AjaxResult ajaxResult=new AjaxResult();
boolean result=sysRoleResourcePermissionService.updateRolePermission(list); boolean result=sysRoleResourcePermissionService.updateRolePermission(list);
@ -91,9 +94,9 @@ public class RoleController {
return ajaxResult; return ajaxResult;
} }
@RequiresPermissions(INDEX_URL+ Constant.PERSSION_MARK+Constant.PERMISSION_INSERT)
@RequestMapping("/save")
@ResponseBody @ResponseBody
@RequestMapping("/save")
@RequiresPermissions(INDEX_URL+ Constant.PERSSION_MARK+Constant.PERMISSION_INSERT)
public Object save(SysRole sysRole){ public Object save(SysRole sysRole){
Date nowTime = new Date(); Date nowTime = new Date();
AjaxResult ajaxResult = new AjaxResult(true," 保存成功",""); AjaxResult ajaxResult = new AjaxResult(true," 保存成功","");
@ -109,9 +112,9 @@ public class RoleController {
return ajaxResult; return ajaxResult;
} }
@RequiresPermissions(INDEX_URL+ Constant.PERSSION_MARK+Constant.PERMISSION_UPDATE)
@RequestMapping("/update")
@ResponseBody @ResponseBody
@RequestMapping("/update")
@RequiresPermissions(INDEX_URL+ Constant.PERSSION_MARK+Constant.PERMISSION_UPDATE)
public Object update(SysRole sysRole){ public Object update(SysRole sysRole){
AjaxResult ajaxResult = new AjaxResult(true," 保存成功",""); AjaxResult ajaxResult = new AjaxResult(true," 保存成功","");
if (sysRole!=null&&sysRole.getId()!=null){ if (sysRole!=null&&sysRole.getId()!=null){
@ -126,9 +129,9 @@ public class RoleController {
return ajaxResult; return ajaxResult;
} }
@RequiresPermissions(INDEX_URL+ Constant.PERSSION_MARK+Constant.PERMISSION_DELETE)
@RequestMapping("/delete")
@ResponseBody @ResponseBody
@RequestMapping("/delete")
@RequiresPermissions(INDEX_URL+ Constant.PERSSION_MARK+Constant.PERMISSION_DELETE)
public Object delte(SysRole sysRole){ public Object delte(SysRole sysRole){
AjaxResult ajaxResult=new AjaxResult(); AjaxResult ajaxResult=new AjaxResult();
if (sysRole!=null&&sysRole.getId()!=null){ if (sysRole!=null&&sysRole.getId()!=null){

Loading…
Cancel
Save