|
@@ -308,11 +308,11 @@ public class NewPlatformApi {
|
|
|
try {
|
|
|
String department = userBypassAccount.getDepartment();
|
|
|
String realName = userBypassAccount.getRealName();
|
|
|
- OrganizationDepartment organizationDepartment = organizationDepartmentService.getById(department);
|
|
|
- OrganizationDepartmentUser organizationDepartmentUser = organizationDepartmentUserService.getById(realName);
|
|
|
- userBypassAccount.setDepartment(organizationDepartment.getName());
|
|
|
- userBypassAccount.setRealName(organizationDepartmentUser.getName());
|
|
|
- userBypassAccountService.updateById(userBypassAccount);
|
|
|
+ UserBypassAccount userBypassAccount1 = userBypassAccountService.getById(userBypassAccount.getId());
|
|
|
+
|
|
|
+ userBypassAccount1.setDepartment(department);
|
|
|
+ userBypassAccount1.setRealName(realName);
|
|
|
+ userBypassAccountService.updateById(userBypassAccount1);
|
|
|
return CommonResult.success("修改子账号信息成功");
|
|
|
} catch (Exception e) {
|
|
|
return CommonResult.failed("修改子账号信息失败,接口错误");
|
|
@@ -580,7 +580,7 @@ public class NewPlatformApi {
|
|
|
// }
|
|
|
@ApiOperation(value = "平台端组织机构新增-企业")
|
|
|
@RequestMapping(value = "/organizationSave", method = RequestMethod.POST)
|
|
|
- public CommonResult<String> organizationSave(@RequestBody Organization request) {
|
|
|
+ public CommonResult<String> organizationSave(@RequestBody Organization request) {
|
|
|
SystemAdmin systemAdmin = SecurityUtil.getLoginUserVo().getUser();
|
|
|
organizationService.saveOrganization(request, systemAdmin);
|
|
|
return CommonResult.success("操作成功");
|
|
@@ -609,7 +609,7 @@ public class NewPlatformApi {
|
|
|
public CommonResult<String> userSave(@RequestParam(value = "organizationId") String organizationId,
|
|
|
@RequestParam(value = "departmentId") String departmentId,
|
|
|
@RequestParam(value = "name") String name,
|
|
|
- @RequestParam(value = "uid" ,required = false) String uid,
|
|
|
+ @RequestParam(value = "uid", required = false) String uid,
|
|
|
@RequestParam(value = "phone") String phone
|
|
|
) {
|
|
|
OrganizationDepartmentUser request = new OrganizationDepartmentUser();
|
|
@@ -629,8 +629,6 @@ public class NewPlatformApi {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 通过id查询
|
|
|
*
|
|
@@ -696,11 +694,11 @@ public class NewPlatformApi {
|
|
|
@ApiOperation(value = "查看子用户信息根据企业用户id和用户id")
|
|
|
@RequestMapping(value = "/selectBypassByUserId", method = RequestMethod.GET)
|
|
|
public CommonResult<?> selectBypassByUserId(@RequestParam(name = "id", required = true) String id,
|
|
|
- @RequestParam(name = "userId", required = true) String userId
|
|
|
+ @RequestParam(name = "userId", required = true) String userId
|
|
|
) {
|
|
|
LambdaQueryWrapper<UserBypassAccount> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper.eq(UserBypassAccount::getUserId,userId);
|
|
|
- queryWrapper.eq(UserBypassAccount::getEnterpriseId,id);
|
|
|
+ queryWrapper.eq(UserBypassAccount::getUserId, userId);
|
|
|
+ queryWrapper.eq(UserBypassAccount::getEnterpriseId, id);
|
|
|
UserBypassAccount one = userBypassAccountService.getOne(queryWrapper);
|
|
|
return CommonResult.success(one);
|
|
|
}
|
|
@@ -719,9 +717,9 @@ public class NewPlatformApi {
|
|
|
public CommonResult<String> organizationUserEdit(@RequestBody @Validated OrganizationDepartmentUser request) {
|
|
|
String username = request.getName();
|
|
|
LambdaQueryWrapper<UserBypassAccount> userBypassAccountLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
- userBypassAccountLambdaQueryWrapper.eq(UserBypassAccount::getRealName,username);
|
|
|
+ userBypassAccountLambdaQueryWrapper.eq(UserBypassAccount::getRealName, username);
|
|
|
List<UserBypassAccount> list = userBypassAccountService.list(userBypassAccountLambdaQueryWrapper);
|
|
|
- if (null!=list&&list.size()>0){
|
|
|
+ if (null != list && list.size() > 0) {
|
|
|
for (UserBypassAccount userBypassAccount : list) {
|
|
|
String name = request.getName();
|
|
|
userBypassAccount.setRealName(name);
|
|
@@ -743,10 +741,6 @@ public class NewPlatformApi {
|
|
|
@ApiOperation(value = "企业账号编辑")
|
|
|
@RequestMapping(value = "/enterpriseEdit", method = RequestMethod.POST)
|
|
|
public CommonResult<UserEnterprise> organizationEdit(@RequestBody @Validated UserEnterprise request) {
|
|
|
- String department = request.getDepartment();
|
|
|
- OrganizationDepartment organizationDepartment = organizationDepartmentService.getById(department);
|
|
|
- String name = organizationDepartment.getName();
|
|
|
- request.setDepartment(name);
|
|
|
userEnterpriseService.updateById(request);
|
|
|
return CommonResult.success("操作成功");
|
|
|
}
|