fix 企业管理员不允许变更企业

This commit is contained in:
lijiarao
2022-03-09 17:56:12 +08:00
parent 518f36857d
commit 4b432c5d08
@@ -285,12 +285,9 @@ public class PayContactsManagementController extends JeroController<PayContactsM
LambdaUpdateWrapper<PayContactsManagement> updatePayContactsManagement = new LambdaUpdateWrapper<>();
// 企业管理员变更需要同步会员项目
if(Objects.equals(payContactsManagementOld.getRoleCode(),PayContactsManagementCommon.ROLE_CODE2)){
// 变更了企业,变更企业联系人
// 变更了企业,企业管理员不允许变更企业
if(!Objects.equals(payContactsManagementOld.getCompanyId(),payContactsManagement.getCompanyId())){
updatePayContactsManagement.set(PayContactsManagement::getRoleCode,PayContactsManagementCommon.ROLE_CODE1);
updatePayContactsManagement.set(PayContactsManagement::getMemberNature,null);
updatePayContactsManagement.set(PayContactsManagement::getUsername,null);
updatePayContactsManagement.set(PayContactsManagement::getDelFlag,null);
throw new JeroBootException("企业管理员不允许变更企业");
}else{
// 调用会员项目接口
MemberInfo memberInfo = new MemberInfo();