|
@@ -15,6 +15,8 @@ import com.ym.mec.common.security.SecurityUtils;
|
|
|
import com.ym.mec.common.service.IdGeneratorService;
|
|
|
import com.ym.mec.im.ImFeignService;
|
|
|
import com.ym.mec.thirdparty.eseal.ESealPlugin;
|
|
|
+import com.ym.mec.thirdparty.user.realname.RealnameAuthenticationPluginContext;
|
|
|
+import com.ym.mec.thirdparty.user.realname.provider.LinkfaceRealnameAuthenticationPlugin;
|
|
|
import com.ym.mec.util.date.DateUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
@@ -23,6 +25,7 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.beanutils.BeanUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.http.MediaType;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
@@ -48,6 +51,10 @@ public class UserController extends BaseController {
|
|
|
private IdGeneratorService smsCodeService;
|
|
|
@Autowired
|
|
|
private ESealPlugin eSealPlugin;
|
|
|
+ @Value("${message.debugMode}")
|
|
|
+ private boolean debugMode;
|
|
|
+ @Autowired
|
|
|
+ private RealnameAuthenticationPluginContext realnameAuthenticationPluginContext;
|
|
|
|
|
|
@ApiOperation(value = "分页查询用户信息")
|
|
|
@ApiImplicitParams({ @ApiImplicitParam(name = "userType", value = "用户类型", required = false, dataType = "String"),
|
|
@@ -231,12 +238,8 @@ public class UserController extends BaseController {
|
|
|
throw new BizException("出生日期不可超过当前时间");
|
|
|
}
|
|
|
|
|
|
- String accountId = eSealPlugin.createUserAccount(
|
|
|
- sysUser.getRealName(),
|
|
|
- sysUser.getIdCardNo(),
|
|
|
- user.getUsername().split(":")[1]);
|
|
|
- if (StringUtils.isBlank(accountId)) {
|
|
|
- throw new BizException("用户信息错误");
|
|
|
+ if(debugMode){
|
|
|
+ realnameAuthenticationPluginContext.getRealnameAuthenticationPlugin(LinkfaceRealnameAuthenticationPlugin.getName()).verify(sysUser.getRealName(), sysUser.getIdCardNo());
|
|
|
}
|
|
|
|
|
|
sysUserService.updateBaseInfo(sysUser);
|