Commit a58977b1 authored by 赵啸非's avatar 赵啸非

添加网关验证码验证

parent 60556dcd
package com.mortals.xhx.module.user.web;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
......@@ -95,6 +96,35 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
}
@Override
public Rest<Map<String, Object>> list(UserEntity query) {
Map<String, Object> model = new HashMap();
Rest<Map<String, Object>> ret = new Rest<>();
Context context = this.getContext();
String busiDesc = "查询" + this.getModuleDesc();
int code;
try {
PageInfo pageInfo = this.buildPageInfo(query);
this.doListBefore(query, model, context);
Result result = this.getService().findExt(query, pageInfo, context);
model.put("data", result.getList());
model.put("pageInfo", result.getPageInfo());
this.parsePageInfo(model, result.getPageInfo());
code = this.doListAfter(query, model, context);
this.recordSysLog(this.request, busiDesc + " 【成功】");
} catch (Exception var9) {
code = -1;
this.doException(this.request, busiDesc, model, var9);
}
this.init(model, context);
ret.setCode(code);
ret.setData(model);
ret.setDict((Map<String, Object>) model.remove(KEY_RESULT_DICT));
ret.setMsg(model.remove(MESSAGE_INFO).toString());
return ret;
}
/* @Override
public String list(@RequestBody(required = false) UserEntity query) {
Map<String, Object> model = new HashMap();
JSONObject ret = new JSONObject();
......@@ -121,7 +151,7 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
ret.put("dict", model.remove("dict"));
ret.put("data", model);
return ret.toJSONString();
}
}*/
@RequestMapping(value = "change/password", method = RequestMethod.POST)
......
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