| | |
| | | import com.ycl.jxkg.domain.entity.UserEventLog; |
| | | import com.ycl.jxkg.event.UserEvent; |
| | | import com.ycl.jxkg.service.UserService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.ApplicationEventPublisher; |
| | | import org.springframework.security.core.Authentication; |
| | |
| | | userEventLog.setContent(user.getUserName() + " 登录了江西语音视频培训系统"); |
| | | eventPublisher.publishEvent(new UserEvent(userEventLog)); |
| | | com.ycl.jxkg.domain.entity.User newUser = new com.ycl.jxkg.domain.entity.User(); |
| | | newUser.setUserName(user.getUserName()); |
| | | newUser.setImagePath(user.getImagePath()); |
| | | BeanUtils.copyProperties(user,newUser); |
| | | RestUtil.response(response, SystemCode.OK.getCode(), SystemCode.OK.getMessage(), newUser); |
| | | } |
| | | } else { |