| | |
| | | package com.zy.acs.manager.system.controller; |
| | | |
| | | import com.zy.acs.common.utils.Utils; |
| | | import com.zy.acs.framework.common.BaseRes; |
| | | import com.zy.acs.framework.common.Cools; |
| | | import com.zy.acs.framework.common.R; |
| | | import com.zy.acs.manager.common.annotation.OperationLog; |
| | | import com.zy.acs.manager.common.config.ConfigProperties; |
| | | import com.zy.acs.manager.common.domain.BusinessRes; |
| | | import com.zy.acs.manager.common.security.JwtSubject; |
| | | import com.zy.acs.manager.common.service.EmailService; |
| | | import com.zy.acs.manager.common.utils.JwtUtil; |
| | | import com.zy.acs.manager.manager.enums.StatusType; |
| | | import com.zy.acs.manager.system.controller.param.LoginParam; |
| | |
| | | import com.zy.acs.manager.system.service.TenantService; |
| | | import com.zy.acs.manager.system.service.UserLoginService; |
| | | import com.zy.acs.manager.system.service.UserService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | private RoleMenuService roleMenuService; |
| | | @Resource |
| | | private TenantService tenantService; |
| | | @Autowired |
| | | private EmailService emailService; |
| | | |
| | | @GetMapping("/system/info") |
| | | public R systemInfo() { |
| | |
| | | if (!emailService.isValid(user.getEmail())) { |
| | | return R.parse(BusinessRes.INVALID_EMAIL); |
| | | } |
| | | User one = userService.getByEmail(user.getEmail(), null); |
| | | if (null != one && !one.getId().equals(user.getId())) { |
| | | return R.parse(BusinessRes.EMAIL_EXIT); |
| | | } |
| | | // User one = userService.getByEmail(user.getEmail(), null); |
| | | // if (null != one && !one.getId().equals(user.getId())) { |
| | | // return R.parse(BusinessRes.EMAIL_EXIT); |
| | | // } |
| | | } |
| | | if (userService.updateById(user)) { |
| | | return R.ok("Save Success").add(userService.getById(user.getId())); |