Commit c368cd50 authored by 廖旭伟's avatar 廖旭伟

bug修改

parent ee40adaa
...@@ -2,6 +2,7 @@ package com.mortals.xhx.base.login.web; ...@@ -2,6 +2,7 @@ package com.mortals.xhx.base.login.web;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.ap.CookieService;
import com.mortals.framework.ap.GlobalSysInfo; import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.ap.SysConstains; import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -121,9 +122,13 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi ...@@ -121,9 +122,13 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
} }
@RequestMapping("logout") @RequestMapping("logout")
public void logout() throws Exception { public String logout() throws Exception {
recordSysLog(request, "退出登录"); recordSysLog(request, "退出登录");
super.removeCurrUser(request); super.removeCurrUser(request);
JSONObject ret = new JSONObject();
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "用户退出系统成功!");
return ret.toJSONString();
} }
@RequestMapping("index") @RequestMapping("index")
......
...@@ -87,6 +87,8 @@ public class GoviewProjectAPi extends BaseJsonBodyController { ...@@ -87,6 +87,8 @@ public class GoviewProjectAPi extends BaseJsonBodyController {
IUser user = this.getCurUser(); IUser user = this.getCurUser();
if (user != null && user.getUserType() == Constant.CUSTOMER_USER) { if (user != null && user.getUserType() == Constant.CUSTOMER_USER) {
query.setCustomerId(user.getId()); query.setCustomerId(user.getId());
}else {
throw new AppException("非法用户,不可访问");
} }
Rest<Object> ret = new Rest(); Rest<Object> ret = new Rest();
Map<String, Object> model = new HashMap(); Map<String, Object> model = new HashMap();
......
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