【fix sonar】 IndexController.java文件
This commit is contained in:
+7
-9
@@ -8,10 +8,7 @@ import org.springframework.beans.propertyeditors.CustomDateEditor;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.annotation.InitBinder;
|
||||
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.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -45,8 +42,7 @@ public class IndexController {
|
||||
@RequestMapping("/chartInfo")
|
||||
@ResponseBody
|
||||
public ReturnT<Map<String, Object>> chartInfo(Date startDate, Date endDate) {
|
||||
ReturnT<Map<String, Object>> chartInfo = xxlJobService.chartInfo(startDate, endDate);
|
||||
return chartInfo;
|
||||
return xxlJobService.chartInfo(startDate, endDate);
|
||||
}
|
||||
|
||||
@RequestMapping("/toLogin")
|
||||
@@ -58,15 +54,17 @@ public class IndexController {
|
||||
return "login";
|
||||
}
|
||||
|
||||
@RequestMapping(value="login", method=RequestMethod.POST)
|
||||
// @RequestMapping(value="login", method=RequestMethod.POST)
|
||||
@PostMapping("login")
|
||||
@ResponseBody
|
||||
@PermissionLimit(limit=false)
|
||||
public ReturnT<String> loginDo(HttpServletRequest request, HttpServletResponse response, String userName, String password, String ifRemember){
|
||||
boolean ifRem = (ifRemember!=null && ifRemember.trim().length()>0 && "on".equals(ifRemember))?true:false;
|
||||
boolean ifRem = ifRemember!=null && ifRemember.trim().length()>0 && "on".equals(ifRemember);
|
||||
return loginService.login(request, response, userName, password, ifRem);
|
||||
}
|
||||
|
||||
@RequestMapping(value="logout", method=RequestMethod.POST)
|
||||
// @RequestMapping(value="logout", method=RequestMethod.POST)
|
||||
@PostMapping("logout")
|
||||
@ResponseBody
|
||||
@PermissionLimit(limit=false)
|
||||
public ReturnT<String> logout(HttpServletRequest request, HttpServletResponse response){
|
||||
|
||||
Reference in New Issue
Block a user