diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysTenantController.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysTenantController.java index 2bde5fddd..a6def334c 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysTenantController.java +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysTenantController.java @@ -412,8 +412,11 @@ public class SysTenantController { */ @PutMapping("/invitationUserJoin") @RequiresPermissions("system:tenant:invitation:user") - public Result invitationUserJoin(@RequestParam("ids") String ids,@RequestParam("phone") String phone){ - sysTenantService.invitationUserJoin(ids,phone); + public Result invitationUserJoin(@RequestParam("ids") String ids,@RequestParam(value = "phone", required = false) String phone, @RequestParam(value = "username", required = false) String username){ + if(oConvertUtils.isEmpty(phone) && oConvertUtils.isEmpty(username)){ + return Result.error("手机号和用户账号不能同时为空!"); + } + sysTenantService.invitationUserJoin(ids,phone,username); return Result.ok("邀请用户成功"); } diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/ISysTenantService.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/ISysTenantService.java index f4c79aaad..12b42e04b 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/ISysTenantService.java +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/ISysTenantService.java @@ -49,8 +49,9 @@ public interface ISysTenantService extends IService { * 邀请用户加入租户,通过手机号 * @param ids * @param phone + * @param username */ - void invitationUserJoin(String ids, String phone); + void invitationUserJoin(String ids, String phone,String username); /** * 请离用户(租户) diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysTenantServiceImpl.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysTenantServiceImpl.java index 4b7d47598..007586b3f 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysTenantServiceImpl.java +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysTenantServiceImpl.java @@ -104,15 +104,27 @@ public class SysTenantServiceImpl extends ServiceImpl