Commit 335254ea by 杨清松

购砂单位路径更改

parent 745106e3
......@@ -334,8 +334,8 @@ public class SecurityConfig {
http.sessionManagement().maximumSessions(1);
http.csrf().disable();
http.cors().disable();
http.antMatcher("/sand/**").authorizeRequests()
.antMatchers("/sand/user").permitAll()
http.antMatcher("/sand/user/**").authorizeRequests()
// .antMatchers("/sand/user").permitAll()
.anyRequest().authenticated();
http.exceptionHandling().authenticationEntryPoint(authenticationEntryPoint);
......@@ -348,7 +348,7 @@ public class SecurityConfig {
http.addFilterAfter(new INZTenantAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class);
http.logout().logoutUrl("/sand/logout")
http.logout().logoutUrl("/sand/user/logout")
.addLogoutHandler(logoutHandler).invalidateHttpSession(true)
.permitAll();
}
......
......@@ -54,6 +54,7 @@ public class SandUserAuthenticationSuccessHandler extends SimpleUrlAuthenticatio
request.getSession().setAttribute(AuthcConstants.USERID, SandUser.getId());
request.getSession().setAttribute(AuthcConstants.USERNAME, SandUser.getUsername());
request.getSession().setAttribute(AuthcConstants.TELEPHONE, SandUser.getTelephone());
request.getSession().setAttribute(AuthcConstants.TITLE, SandUser.getTitle());
request.getSession().setAttribute("mobile", true);
request.getSession().setMaxInactiveInterval(30 * 24 * 60 * 60);
......@@ -65,9 +66,11 @@ public class SandUserAuthenticationSuccessHandler extends SimpleUrlAuthenticatio
returnJson.put(AuthcConstants.USERID, SandUser.getId());
returnJson.put(AuthcConstants.USERNAME, SandUser.getUsername());
returnJson.put(AuthcConstants.TELEPHONE, SandUser.getTelephone());
returnJson.put(AuthcConstants.TITLE, SandUser.getTitle());
returnJson.put(AuthcConstants.MESSAGE, "success");
returnJson.put(AuthcConstants.TOKEN, attr.getSessionId());
returnJson.put(AuthcConstants.TENANT, tenant);
response.setCharacterEncoding("UTF-8");
response.getWriter().append(returnJson.toString());
}
} catch (IOException e) {
......
......@@ -15,7 +15,7 @@ public class InzBasisFunctionTreeController {
@Autowired
private InzBasisFunctionTreeService inzBasisFunctionTreeService;
@RequestMapping(value = "/sand/basis/functionTree", method = RequestMethod.GET)
@RequestMapping(value = "/sand/user/functionTree", method = RequestMethod.GET)
public Object getFunctionTreeCompany() {
String functreeName = "com.beecode.inz.portal.functiontree.CompanyFunctionTree";
......
......@@ -37,7 +37,6 @@ import com.beecode.xlib.utils.StringUtil;
* @author Jackpot
*/
@RestController
@RequestMapping("/sandUser")
public class SandUserController {
@Autowired
......@@ -54,7 +53,7 @@ public class SandUserController {
* @param obj
* @return
*/
@PostMapping("/save")
@PostMapping("/sandUser/save")
public Object create(@RequestBody SandUser sandUser) {
try {
......@@ -87,7 +86,7 @@ public class SandUserController {
* @return
* @throws Exception
*/
@RequestMapping(value ="/login/status",method = RequestMethod.GET)
@RequestMapping(value ="/sand/user/login/status",method = RequestMethod.GET)
public String loginState(){
return Integer.toString(HttpStatus.OK.value());
}
......@@ -98,7 +97,7 @@ public class SandUserController {
* @param obj
* @return
*/
@GetMapping("/getUserBySandId/{sandId}")
@GetMapping("/sandUser/getUserBySandId/{sandId}")
public Object getBySandId(@PathVariable(name="sandId") String sandId) {
if(StringUtil.isEmpty(sandId)) {
return ResponseObj.error("sandId不能为空");
......@@ -122,7 +121,7 @@ public class SandUserController {
* @param obj
* @return
*/
@GetMapping("/queryById/{id}")
@GetMapping("/sandUser/queryById/{id}")
public Object queryById(@PathVariable(name="id") String id) {
if(StringUtil.isEmpty(id)) {
return ResponseObj.error("id不能为空");
......@@ -142,7 +141,7 @@ public class SandUserController {
* @param obj
* @return
*/
@PostMapping("/modify")
@PostMapping("/sandUser/modify")
public Object modify(@RequestBody String body) {
if(StringUtil.isEmpty(body)) {
return ResponseObj.error("参数不能为空");
......@@ -170,7 +169,7 @@ public class SandUserController {
* @return
*/
@ResponseBody
@RequestMapping(value = "/verify", method = RequestMethod.PUT)
@RequestMapping(value = "/sandUser/verify", method = RequestMethod.PUT)
public Object verify(@RequestBody String body){
Assert.notNull(body, "The body must not be null");
String operation = request.getHeader("operation");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment