@@ -64,5 +64,4 @@ public class Chart implements Serializable {
* 用户组id集合
*/
private List<UserGroup> userGroupList = new ArrayList<>();
- ;
}
@@ -18,6 +18,8 @@ public class ChartItem implements Serializable {
* 统计图id
private Integer chartId;
+ //虚拟字段
+ private Integer itemGroupId;
/**
* 数据项id
@@ -91,10 +91,13 @@
</select>
<select id="getChartItemList" resultType="com.example.opc_common.entity.ChartItem">
- select
- <include refid="chartItem"/>
- from t_chart_item
- where chart_id = #{chartId}
+ select tci.id
+ , tci.chart_id
+ , tci.item_id
+ , ti.item_group_id
+ from t_chart_item tci
+ left join t_item ti on tci.item_id = ti.id
+ where tci.chart_id = #{chartId}
<select id="getChartByUserGroupId" resultType="com.example.opc_common.entity.Chart">