| | |
| | | package com.ycl.jxkg.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.jxkg.domain.entity.UserEventLog; |
| | | import com.ycl.jxkg.domain.enums.RoleEnum; |
| | | import com.ycl.jxkg.domain.enums.UserStatusEnum; |
| | | import com.ycl.jxkg.domain.form.RegisterForm; |
| | | import com.ycl.jxkg.domain.other.KeyValue; |
| | | import com.ycl.jxkg.event.UserEvent; |
| | | import com.ycl.jxkg.exception.BusinessException; |
| | | import com.ycl.jxkg.domain.entity.User; |
| | | import com.ycl.jxkg.event.OnRegistrationCompleteEvent; |
| | |
| | | teacher.setStatus(UserStatusEnum.Enable.getCode()); |
| | | teacher.setDeleted(0); |
| | | this.insertUser(teacher); |
| | | // 发布注册事件,保存注册日志 |
| | | UserEventLog userEventLog = new UserEventLog(teacher.getId(), teacher.getUserName(), teacher.getRealName(), new Date()); |
| | | userEventLog.setContent("欢迎 " + teacher.getUserName() + " 注册来到江西空管音视频培训系统"); |
| | | eventPublisher.publishEvent(new UserEvent(userEventLog)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | student.setStatus(UserStatusEnum.Enable.getCode()); |
| | | student.setDeleted(0); |
| | | this.insertUser(student); |
| | | // 发布注册事件,保存注册日志 |
| | | UserEventLog userEventLog = new UserEventLog(student.getId(), student.getUserName(), student.getRealName(), new Date()); |
| | | userEventLog.setContent("欢迎 " + student.getUserName() + " 注册来到江西空管音视频培训系统"); |
| | | eventPublisher.publishEvent(new UserEvent(userEventLog)); |
| | | } |
| | | } |