|
|
|
@ -16,6 +16,8 @@ import com.hxhq.business.form.common.SignForm; |
|
|
|
import com.hxhq.business.service.IStudyService; |
|
|
|
import com.hxhq.common.core.exception.ServiceException; |
|
|
|
import com.hxhq.common.core.utils.ServletUtils; |
|
|
|
import com.hxhq.system.api.RemoteIntegrationService; |
|
|
|
import com.hxhq.system.api.RemoteUserService; |
|
|
|
import com.hxhq.system.dto.UserExportDto; |
|
|
|
import com.hxhq.system.form.UserSaveForm; |
|
|
|
import com.hxhq.system.service.*; |
|
|
|
@ -84,6 +86,9 @@ public class SysUserController extends BaseController |
|
|
|
@Autowired |
|
|
|
private ISysMenuService sysMenuService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private RemoteIntegrationService remoteIntegrationService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取用户列表 |
|
|
|
*/ |
|
|
|
@ -291,6 +296,12 @@ public class SysUserController extends BaseController |
|
|
|
return ajax; |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/checkExist") |
|
|
|
public AjaxResult checkExist(@PathVariable("username") String username){ |
|
|
|
AjaxResult exists = remoteIntegrationService.checkAccountExists(username); |
|
|
|
return exists; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 新增用户 |
|
|
|
*/ |
|
|
|
@ -299,6 +310,9 @@ public class SysUserController extends BaseController |
|
|
|
@PostMapping |
|
|
|
public AjaxResult add(@Validated @RequestBody UserSaveForm form) |
|
|
|
{ |
|
|
|
// AjaxResult exists = remoteIntegrationService.checkAccountExists(form.getUser().getUserName()); |
|
|
|
// AjaxResult exists = remoteIntegrationService.validate(form.getUser().getUserName(),form.getUser().getPassword()); |
|
|
|
// return exists; |
|
|
|
SysUser user = form.getUser(); |
|
|
|
deptService.checkDeptDataScope(user.getDeptId()); |
|
|
|
roleService.checkRoleDataScope(user.getRoleIds()); |
|
|
|
|