Commit 335254ea by 杨清松

购砂单位路径更改

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