Merge branch 'main' of http://192.168.2.166:3180/WFC/be.wfc into feature/multi-packages
This commit is contained in:
@@ -117,8 +117,7 @@ public class TokenController {
|
|||||||
@PostMapping("checkRepeat")
|
@PostMapping("checkRepeat")
|
||||||
public R<?> checkRepeat(@RequestBody RegisterBody form) {
|
public R<?> checkRepeat(@RequestBody RegisterBody form) {
|
||||||
if ("u".equals(form.getAuthType())) {
|
if ("u".equals(form.getAuthType())) {
|
||||||
uLoginService.checkRepeat(form);
|
return R.ok(uLoginService.checkRepeat(form));
|
||||||
return R.ok();
|
|
||||||
}
|
}
|
||||||
if ("sys".equals(form.getAuthType())) {
|
if ("sys".equals(form.getAuthType())) {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,19 +160,17 @@ public class ULoginService {
|
|||||||
/**
|
/**
|
||||||
* 检查重复
|
* 检查重复
|
||||||
*/
|
*/
|
||||||
public void checkRepeat(RegisterBody registerBody) {
|
public boolean checkRepeat(RegisterBody registerBody) {
|
||||||
UUser user = new UUser();
|
UUser user = new UUser();
|
||||||
user.setUserName(registerBody.getUsername());
|
user.setUserName(registerBody.getUsername());
|
||||||
user.setPhonenumber(registerBody.getPhonenumber());
|
user.setPhonenumber(registerBody.getPhonenumber());
|
||||||
user.setEmail(registerBody.getEmail());
|
user.setEmail(registerBody.getEmail());
|
||||||
R<Boolean> result = remoteUserService.checkRepeat(user, SecurityConstants.INNER );
|
R<Boolean> result = remoteUserService.checkRepeat(user, SecurityConstants.INNER );
|
||||||
|
|
||||||
if (R.FAIL == result.getCode()) {
|
if (R.FAIL == result.getCode()) {
|
||||||
throw new ServiceException(result.getMsg());
|
return true;
|
||||||
}
|
|
||||||
Boolean isRepeat = result.getData();
|
|
||||||
if (isRepeat) {
|
|
||||||
throw new ServiceException("auth.user.registered");
|
|
||||||
}
|
}
|
||||||
|
return result.getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,6 +177,7 @@ common.no.permission=No permission, please contact the administrator to add perm
|
|||||||
common.request.path.variable.not.blank=Request path variable''{0}'' cannot be blank
|
common.request.path.variable.not.blank=Request path variable''{0}'' cannot be blank
|
||||||
common.request.parameter.type.not.match=Request parameter''{0}'' requires type: ''{1}'', but the input value is: ''{2}''
|
common.request.parameter.type.not.match=Request parameter''{0}'' requires type: ''{1}'', but the input value is: ''{2}''
|
||||||
common.demo.mode=Demo mode, no operation is allowed
|
common.demo.mode=Demo mode, no operation is allowed
|
||||||
|
common.system.error=Internal error, please contact the administrator
|
||||||
|
|
||||||
## system portal menu
|
## system portal menu
|
||||||
menu.system.management=System Management
|
menu.system.management=System Management
|
||||||
|
|||||||
@@ -179,6 +179,7 @@ common.no.permission=没有访问权限,请联系管理员授权
|
|||||||
common.request.path.variable.not.blank=请求路径中缺少必需的路径变量''{0}''
|
common.request.path.variable.not.blank=请求路径中缺少必需的路径变量''{0}''
|
||||||
common.request.parameter.type.not.match=请求参数类型不匹配,参数''{0}''要求类型为:''{1}'',但输入值为:''{2}''
|
common.request.parameter.type.not.match=请求参数类型不匹配,参数''{0}''要求类型为:''{1}'',但输入值为:''{2}''
|
||||||
common.demo.mode=演示模式,不允许操作
|
common.demo.mode=演示模式,不允许操作
|
||||||
|
common.system.error=内部错误,请联系管理员
|
||||||
|
|
||||||
## system portal menu
|
## system portal menu
|
||||||
menu.system.management=系统管理
|
menu.system.management=系统管理
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package org.wfc.common.security.handler;
|
package org.wfc.common.security.handler;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.validation.BindException;
|
import org.springframework.validation.BindException;
|
||||||
@@ -22,6 +21,8 @@ import org.wfc.common.core.utils.StringUtils;
|
|||||||
import org.wfc.common.core.utils.html.EscapeUtil;
|
import org.wfc.common.core.utils.html.EscapeUtil;
|
||||||
import org.wfc.common.core.web.domain.AjaxResult;
|
import org.wfc.common.core.web.domain.AjaxResult;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全局异常处理器
|
* 全局异常处理器
|
||||||
*
|
*
|
||||||
@@ -111,7 +112,7 @@ public class GlobalExceptionHandler
|
|||||||
{
|
{
|
||||||
String requestURI = request.getRequestURI();
|
String requestURI = request.getRequestURI();
|
||||||
log.error("Requesting address '{}', an unknown exception occurred.", requestURI, e);
|
log.error("Requesting address '{}', an unknown exception occurred.", requestURI, e);
|
||||||
return AjaxResult.error(e.getMessage());
|
return AjaxResult.error(MessageUtils.message("common.system.error"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -53,13 +53,13 @@ public class ${table.controllerName} extends BaseController {
|
|||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public TableDataInfo page(${entity} $entityName) {
|
public TableDataInfo page(${entity} $entityName) {
|
||||||
startPage();
|
startPage();
|
||||||
List<${entity}> list = ${serviceName}.list();
|
List<${entity}> list = ${serviceName}.queryList($entityName);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public AjaxResult list(${entity} $entityName) {
|
public AjaxResult list(${entity} $entityName) {
|
||||||
List<${entity}> list = ${serviceName}.list();
|
List<${entity}> list = ${serviceName}.queryList($entityName);
|
||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user