|
|
@@ -8,7 +8,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.tuoheng.common.ServiceException; |
|
|
|
import com.tuoheng.constant.*; |
|
|
|
import com.tuoheng.mapper.*; |
|
|
|
import com.tuoheng.model.dto.*; |
|
|
|
import com.tuoheng.model.dto.LoginUser; |
|
|
|
import com.tuoheng.model.dto.OidcTenantDto; |
|
|
|
import com.tuoheng.model.dto.Platform; |
|
|
|
import com.tuoheng.model.dto.TTenant; |
|
|
|
import com.tuoheng.model.param.*; |
|
|
|
import com.tuoheng.model.po.AuthoritiesPo; |
|
|
|
import com.tuoheng.model.po.ClientUserRolePo; |
|
|
@@ -18,10 +21,12 @@ import com.tuoheng.model.query.TenantQuery; |
|
|
|
import com.tuoheng.model.query.UserQuery; |
|
|
|
import com.tuoheng.model.vo.BusinessSystemVo; |
|
|
|
import com.tuoheng.model.vo.TenantVo; |
|
|
|
import com.tuoheng.model.vo.UserVo; |
|
|
|
import com.tuoheng.service.ClientUserSevice; |
|
|
|
import com.tuoheng.until.JsonResult; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.data.annotation.Id; |
|
|
|
import org.springframework.http.*; |
|
|
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@@ -249,7 +254,23 @@ public class ClientUserServiceImpl implements ClientUserSevice { |
|
|
|
} |
|
|
|
//开启分页 |
|
|
|
IPage<UserPo> page = new Page<>(query.getPage(), query.getLimit()); |
|
|
|
IPage<UserPo> pageData = clientUserMapper.selectByTenantIdAndPage(query.getTenantId(), page); |
|
|
|
IPage<UserVo> pageData = clientUserMapper.selectByTenantIdAndPage(query, page); |
|
|
|
pageData.convert(x -> { |
|
|
|
|
|
|
|
String platformCode = x.getPlatformCode(); |
|
|
|
if (platformCode.contains(HhzUrlConstant.HHZ_CLIENT)) { |
|
|
|
x.setPlatformName(HhzUrlConstant.HHZ_NAME); |
|
|
|
} else if (platformCode.contains(WaterWayConstant.WATERWAY_CLIENT)) { |
|
|
|
x.setPlatformName(WaterWayConstant.WATERWAY_NAME); |
|
|
|
} else if (platformCode.contains(FreeWayConstant.FREEWAY_CLIENT)) { |
|
|
|
x.setPlatformName(FreeWayConstant.FREEWAY_NAME); |
|
|
|
} else if (platformCode.contains(PilotConstant.PILOT_CLIENT)) { |
|
|
|
x.setPlatformName(PilotConstant.PILOT_NAME); |
|
|
|
} else if (platformCode.contains(AirportConstant.AIRPORT_CLIENT)) { |
|
|
|
x.setPlatformName(AirportConstant.AIRPORT_NAME); |
|
|
|
} |
|
|
|
return x; |
|
|
|
}); |
|
|
|
return JsonResult.success(pageData); |
|
|
|
} |
|
|
|
|
|
|
@@ -354,13 +375,13 @@ public class ClientUserServiceImpl implements ClientUserSevice { |
|
|
|
//TODO 后期维护各个业务平台 |
|
|
|
if (authoritiesPo.getAuthority().contains("hhz")) { |
|
|
|
businessSystemVoList.add(getbusinessSystemVo(HhzUrlConstant.HHZ_CLIENT, HhzUrlConstant.HHZ_NAME)); |
|
|
|
}else if (authoritiesPo.getAuthority().contains("airport")) { |
|
|
|
} else if (authoritiesPo.getAuthority().contains("airport")) { |
|
|
|
businessSystemVoList.add(getbusinessSystemVo(AirportConstant.AIRPORT_CLIENT, AirportConstant.AIRPORT_NAME)); |
|
|
|
}else if (authoritiesPo.getAuthority().contains("waterway")) { |
|
|
|
} else if (authoritiesPo.getAuthority().contains("waterway")) { |
|
|
|
businessSystemVoList.add(getbusinessSystemVo(WaterWayConstant.WATERWAY_CLIENT, WaterWayConstant.WATERWAY_NAME)); |
|
|
|
}else if (authoritiesPo.getAuthority().contains("freeway")) { |
|
|
|
} else if (authoritiesPo.getAuthority().contains("freeway")) { |
|
|
|
businessSystemVoList.add(getbusinessSystemVo(FreeWayConstant.FREEWAY_CLIENT, FreeWayConstant.FREEWAY_NAME)); |
|
|
|
}else if(authoritiesPo.getAuthority().contains("pilot")) { |
|
|
|
} else if (authoritiesPo.getAuthority().contains("pilot")) { |
|
|
|
businessSystemVoList.add(getbusinessSystemVo(PilotConstant.PILOT_CLIENT, PilotConstant.PILOT_NAME)); |
|
|
|
} |
|
|
|
} |