|
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.fdkankan.manage.common.PageInfo;
|
|
|
import com.fdkankan.manage.common.ResultCode;
|
|
|
+import com.fdkankan.manage.entity.JyPlatform;
|
|
|
import com.fdkankan.manage.entity.JyUser;
|
|
|
import com.fdkankan.manage.entity.SysUser;
|
|
|
import com.fdkankan.manage.service.*;
|
|
@@ -21,6 +22,7 @@ import org.springframework.stereotype.Service;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -91,6 +93,20 @@ public class JyUserPlatformServiceImpl extends ServiceImpl<IJyUserPlatformMapper
|
|
|
param.setIsJm(1);
|
|
|
}
|
|
|
Page<JyUserPlatformVo> page = this.getBaseMapper().pageList(new Page<>(param.getPageNum(),param.getPageSize()),param);
|
|
|
+ List<Integer> ids = page.getRecords().stream().map(JyUserPlatform::getPlatformId).collect(Collectors.toList());
|
|
|
+ HashMap<Integer,JyPlatform> map = new HashMap<>();
|
|
|
+ if(!ids.isEmpty()){
|
|
|
+ List<JyPlatform> jyPlatforms = platformService.listByIds(ids);
|
|
|
+ jyPlatforms.forEach(e -> map.put(e.getId(),e));
|
|
|
+ }
|
|
|
+ for (JyUserPlatformVo record : page.getRecords()) {
|
|
|
+ JyPlatform jyPlatform = map.get(record.getPlatformId());
|
|
|
+ if(jyPlatform != null){
|
|
|
+ record.setPlatformName(jyPlatform.getPlatformName());
|
|
|
+ }else {
|
|
|
+ record.setPlatformName("江门");
|
|
|
+ }
|
|
|
+ }
|
|
|
return PageInfo.PageInfo(page);
|
|
|
}
|
|
|
|