| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.service.SysLoginService; |
| | | import com.ruoyi.framework.web.service.SysPermissionService; |
| | | import com.ruoyi.project.domain.BaseOrganization; |
| | | import com.ruoyi.project.mapper.BaseOrganizationMapper; |
| | | import com.ruoyi.project.service.DingTalkService; |
| | | import com.ruoyi.project.service.IBaseOrganizationService; |
| | | import com.ruoyi.system.service.ISysMenuService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | * @author ruoyi |
| | | */ |
| | | @Slf4j |
| | | @Api("用户登录") |
| | | @Api(description = "用户登录") |
| | | @RestController |
| | | public class SysLoginController { |
| | | @Autowired |
| | |
| | | |
| | | @Autowired |
| | | private DingTalkService dingTalkService; |
| | | |
| | | @Autowired |
| | | private IBaseOrganizationService baseOrganizationService; |
| | | |
| | | |
| | | /** |
| | |
| | | // 权限集合 |
| | | Set<String> permissions = permissionService.getMenuPermission(user); |
| | | |
| | | //获取协调员 |
| | | BaseOrganization baseOrganization = new BaseOrganization(); |
| | | baseOrganization.setReporterNo(user.getUserName()); |
| | | baseOrganization.setDelFlag(0); |
| | | List<BaseOrganization> baseOrganizations = baseOrganizationService.queryList(baseOrganization); |
| | | if (CollectionUtils.isNotEmpty(baseOrganizations) && baseOrganizations.size() > 0) { |
| | | user.setCoordinatorName(baseOrganizations.get(0).getCoordinatorName()); |
| | | user.setCoordinatorNo(baseOrganizations.get(0).getCoordinatorNo()); |
| | | } |
| | | |
| | | AjaxResult ajax = AjaxResult.success(); |
| | | ajax.put("user", user); |