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