Commit 6c1d9e6b authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

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