无意义更新

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 static final Logger LOGGER = LoggerFactory.getLogger(FileSystemController.class);
// @Autowired
// private SysFileService sysFileService;
public static final String UPLOAD_FILE_PATH="/Users/qi_liang/java/fileManger";

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

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

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

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

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

Loading…
Cancel
Save