普通用户申请成为管理员
This commit is contained in:
parent
0dec46fc8b
commit
dcee2ec067
|
@ -26,8 +26,8 @@ public class ApplyForAdminController {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/auditAnApplication")
|
@PostMapping("/auditAnApplication")
|
||||||
public void auditAnApplication (@RequestBody ApplyForAdmin applyForAdmin){
|
public R auditAnApplication (@RequestBody ApplyForAdmin applyForAdmin){
|
||||||
applyForAdminServer.auditAnApplication(applyForAdmin);
|
return R.status(applyForAdminServer.auditAnApplication(applyForAdmin));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/SendAnApplication")
|
@PostMapping("/SendAnApplication")
|
||||||
|
|
|
@ -11,5 +11,5 @@ public interface ApplyForAdminServer extends IService<ApplyForAdmin> {
|
||||||
|
|
||||||
void updateApplyForAdminData(ApplyForAdmin applyForAdmin);
|
void updateApplyForAdminData(ApplyForAdmin applyForAdmin);
|
||||||
|
|
||||||
void auditAnApplication(ApplyForAdmin applyForAdmin);
|
Boolean auditAnApplication(ApplyForAdmin applyForAdmin);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class ApplyForAdminServerImpl extends ServiceImpl<ApplyForAdminMapper, Ap
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void auditAnApplication(ApplyForAdmin applyForAdmin) {
|
public Boolean auditAnApplication(ApplyForAdmin applyForAdmin) {
|
||||||
Email email = new Email();
|
Email email = new Email();
|
||||||
email.setSubject("VORDM:Administrator application result");
|
email.setSubject("VORDM:Administrator application result");
|
||||||
email.setHtmlText(false);
|
email.setHtmlText(false);
|
||||||
|
@ -78,5 +78,6 @@ public class ApplyForAdminServerImpl extends ServiceImpl<ApplyForAdminMapper, Ap
|
||||||
log.error("发送邮件失败:{}", e);
|
log.error("发送邮件失败:{}", e);
|
||||||
}
|
}
|
||||||
baseMapper.updateById(applyForAdmin);
|
baseMapper.updateById(applyForAdmin);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue