mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-08-02 05:20:15 +08:00
Fix some team project bugs
This commit is contained in:
@ -0,0 +1,23 @@
|
||||
package ai.chat2db.server.domain.api.param.dashboard;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* selectro
|
||||
*
|
||||
* @author Jiaju Zhuang
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DashboardSelector {
|
||||
|
||||
/**
|
||||
* 图表ID列表
|
||||
*/
|
||||
private Boolean chartIds;
|
||||
}
|
@ -45,6 +45,7 @@ public interface DashboardService {
|
||||
* 查询一条数据
|
||||
*
|
||||
* @param param
|
||||
* @param selector
|
||||
* @return
|
||||
*/
|
||||
DataResult<Dashboard> queryExistent(@NotNull DashboardQueryParam param);
|
||||
|
@ -102,7 +102,14 @@ public class DashboardServiceImpl implements DashboardService {
|
||||
if (CollectionUtils.isEmpty(page.getRecords())) {
|
||||
throw new DataNotFoundException();
|
||||
}
|
||||
return DataResult.of(dashboardConverter.do2model(page.getRecords().get(0)));
|
||||
Dashboard data = dashboardConverter.do2model(page.getRecords().get(0));
|
||||
LambdaQueryWrapper<DashboardChartRelationDO> dashboardChartRelationQueryWrapper = new LambdaQueryWrapper<>();
|
||||
dashboardChartRelationQueryWrapper.eq(DashboardChartRelationDO::getDashboardId, param.getId());
|
||||
List<DashboardChartRelationDO> relationDO = dashboardChartRelationMapper.selectList(
|
||||
dashboardChartRelationQueryWrapper);
|
||||
List<Long> chartIds = relationDO.stream().map(DashboardChartRelationDO::getChartId).toList();
|
||||
data.setChartIds(chartIds);
|
||||
return DataResult.of(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user