fix(ai): 调整公司成员申请状态处理逻辑
- 修改申请同意后的状态更新为2
- 修改解绑操作前的状态校验为1
- 在同意和解绑操作中添加状态为3的更新
- 移除冗余的公司ID获取逻辑
- 统一前端确认弹窗样式为modal.confirm
- 移除AJAX请求前的loading显示逻辑
| | |
| | | throw new FebsException("公司编码不存在"); |
| | | } |
| | | |
| | | this.update( |
| | | null, |
| | | Wrappers.lambdaUpdate(AiCompanyMemberApply.class) |
| | | .set(AiCompanyMemberApply::getState, 1) |
| | | .eq(AiCompanyMemberApply::getId, id) |
| | | ); |
| | | |
| | | String memberUuid = aiCompanyMemberApply.getMemberId(); |
| | | String companyId = aiCompany.getId(); |
| | | |
| | |
| | | } |
| | | this.update(null, |
| | | Wrappers.lambdaUpdate(AiCompanyMemberApply.class) |
| | | .set(AiCompanyMemberApply::getState, 3) |
| | | .set(AiCompanyMemberApply::getState, 2) |
| | | .eq(AiCompanyMemberApply::getId, id) |
| | | ); |
| | | return new FebsResponse().success(); |
| | |
| | | if (ObjectUtil.isEmpty(aiCompanyMemberApply)){ |
| | | throw new RuntimeException("申请不存在"); |
| | | } |
| | | if (0 != aiCompanyMemberApply.getState()){ |
| | | if (1 != aiCompanyMemberApply.getState()){ |
| | | throw new RuntimeException("申请已处理"); |
| | | } |
| | | String companyCode = aiCompanyMemberApply.getCompanyCode(); |
| | |
| | | throw new FebsException("公司编码不存在"); |
| | | } |
| | | |
| | | String memberUuid = aiCompanyMemberApply.getMemberId(); |
| | | String companyId = aiCompany.getId(); |
| | | this.update(null, |
| | | Wrappers.lambdaUpdate(AiCompanyMemberApply.class) |
| | | .set(AiCompanyMemberApply::getState, 3) |
| | | .eq(AiCompanyMemberApply::getId, id) |
| | | ); |
| | | |
| | | String memberUuid = aiCompanyMemberApply.getMemberId(); |
| | | mallMemberMapper.update(null, |
| | | Wrappers.lambdaUpdate(MallMember.class) |
| | | .set(MallMember::getCompanyId, null) |
| | |
| | | } |
| | | }); |
| | | } else if (layEvent === 'aiApplyInfoAgreeEvent') { |
| | | febs.modal.confirm('删除', '确认删除?', function () { |
| | | memberRoleDeleteEvent(data.id); |
| | | }); |
| | | // 同意操作 |
| | | febs.confirm('确定要同意该申请吗?', function () { |
| | | febs.modal.confirm('审核','确定要同意该申请吗?', function () { |
| | | handleApplyAction(data.id, 'agree'); |
| | | }); |
| | | } else if (layEvent === 'aiApplyInfoDisagreeEvent') { |
| | | // 拒绝操作 |
| | | febs.confirm('确定要拒绝该申请吗?', function () { |
| | | febs.modal.confirm('审核','确定要拒绝该申请吗?', function () { |
| | | handleApplyAction(data.id, 'disagree'); |
| | | }); |
| | | } else if (layEvent === 'aiApplyInfoUnbindEvent') { |
| | | // 解绑操作 |
| | | febs.confirm('确定要解除绑定吗?此操作不可撤销!', function () { |
| | | febs.modal.confirm('审核','确定要解除绑定吗?此操作不可撤销!', function () { |
| | | handleApplyAction(data.id, 'unbind'); |
| | | }); |
| | | } |
| | |
| | | data: JSON.stringify({id: id}), |
| | | dataType: 'json', |
| | | headers: {'Content-Type': 'application/json;charset=utf-8'}, |
| | | beforeSend: function() { |
| | | febs.loading.show(); |
| | | }, |
| | | success: function(res) { |
| | | if (res.code === 200) { |
| | | febs.alert.success(actionName + '成功'); |