|
@@ -14,11 +14,13 @@ import com.ym.mec.common.security.SecurityConstants;
|
|
|
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.util.date.DateUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
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.http.MediaType;
|
|
@@ -27,6 +29,7 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.Date;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
@RestController()
|
|
|
@RequestMapping("user")
|
|
@@ -43,6 +46,8 @@ public class UserController extends BaseController {
|
|
|
private SysUserRoleService sysUserRoleService;
|
|
|
@Autowired
|
|
|
private IdGeneratorService smsCodeService;
|
|
|
+ @Autowired
|
|
|
+ private ESealPlugin eSealPlugin;
|
|
|
|
|
|
@ApiOperation(value = "分页查询用户信息")
|
|
|
@ApiImplicitParams({ @ApiImplicitParam(name = "userType", value = "用户类型", required = false, dataType = "String"),
|
|
@@ -225,6 +230,15 @@ public class UserController extends BaseController {
|
|
|
if(sysUser.getBirthdate() != null && DateUtil.daysBetween(sysUser.getBirthdate(),date) <= 0){
|
|
|
throw new BizException("出生日期不可超过当前时间");
|
|
|
}
|
|
|
+
|
|
|
+ String accountId = eSealPlugin.createUserAccount(
|
|
|
+ user.getUsername().split(":")[1],
|
|
|
+ sysUser.getIdCardNo(),
|
|
|
+ sysUser.getPhone());
|
|
|
+ if (StringUtils.isBlank(accountId)) {
|
|
|
+ throw new BizException("用户信息错误");
|
|
|
+ }
|
|
|
+
|
|
|
sysUserService.updateBaseInfo(sysUser);
|
|
|
return succeed();
|
|
|
}
|