|
@@ -7,7 +7,7 @@ import (
|
|
|
)
|
|
|
|
|
|
// GetAllShareChartListByFromUserId
|
|
|
-// @Description: 根据共享人id获取所有的指标列表
|
|
|
+// @Description: 根据共享人id获取所有的图表列表
|
|
|
// @author: Roc
|
|
|
// @datetime 2024-12-03 10:01:49
|
|
|
// @param sysUserId int
|
|
@@ -24,7 +24,7 @@ func GetAllShareChartListByFromUserId(sysUserId int) (item []*data_manage.ShareC
|
|
|
}
|
|
|
|
|
|
// GetAllShareChartListByReceivedUserId
|
|
|
-// @Description: 根据接收人id获取所有的指标列表
|
|
|
+// @Description: 根据接收人id获取所有的图表列表
|
|
|
// @author: Roc
|
|
|
// @datetime 2024-12-03 10:01:49
|
|
|
// @param sysUserId int
|
|
@@ -41,7 +41,7 @@ func GetAllShareChartListByReceivedUserId(sysUserId int) (item []*data_manage.Sh
|
|
|
}
|
|
|
|
|
|
// GetChartClassifyItemListByShareChartInfoQueryList
|
|
|
-// @Description: 根据共享的指标来获取分类和指标的树形结构
|
|
|
+// @Description: 根据共享的图表来获取分类和图表的树形结构
|
|
|
// @author: Roc
|
|
|
// @datetime 2024-12-03 11:12:26
|
|
|
// @param items []*data_manage.ShareChartInfoQuery
|
|
@@ -131,3 +131,59 @@ func GetChartClassifyItemListByShareChartInfoQueryList(items []*data_manage.Shar
|
|
|
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+// GetAllEditSharedChartInfoIdListByReceivedUserId
|
|
|
+// @Description: 获取所有我收到的共享的、可以编辑的图表id列表
|
|
|
+// @author: Roc
|
|
|
+// @datetime 2024-12-25 14:17:10
|
|
|
+// @param userId int
|
|
|
+// @return editShareChartInfoIdList []int
|
|
|
+// @return err error
|
|
|
+func GetAllEditSharedChartInfoIdListByReceivedUserId(userId int, chartInfoIdList []int) (editShareChartInfoIdList []int, err error) {
|
|
|
+ shareObj := data_manage.ChartInfoShare{}
|
|
|
+ editShareChartInfoIdList, err = shareObj.GetAllEditSharedChartInfoIdListByReceivedUserId(userId, chartInfoIdList)
|
|
|
+
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
+// GetAllEditSharedChartInfoIdMapByReceivedUserId
|
|
|
+// @Description: 获取所有我收到的共享的、可以编辑的图表id map
|
|
|
+// @author: Roc
|
|
|
+// @datetime 2024-12-25 14:19:22
|
|
|
+// @param userId int
|
|
|
+// @return editShareChartInfoIdMap map[int]bool
|
|
|
+// @return err error
|
|
|
+func GetAllEditSharedChartInfoIdMapByReceivedUserId(userId int) (editShareChartInfoIdMap map[int]bool, err error) {
|
|
|
+ editShareChartInfoIdMap = make(map[int]bool)
|
|
|
+ idList, err := GetAllEditSharedChartInfoIdListByReceivedUserId(userId, []int{})
|
|
|
+ if err != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ for _, v := range idList {
|
|
|
+ editShareChartInfoIdMap[v] = true
|
|
|
+ }
|
|
|
+
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
+// GetAllEditSharedChartInfoIdMapByReceivedUserIdAndChartInfoIdList
|
|
|
+// @Description: 获取所有我收到的共享的、可以编辑的图表id map
|
|
|
+// @author: Roc
|
|
|
+// @datetime 2024-12-25 14:19:22
|
|
|
+// @param userId int
|
|
|
+// @return editShareChartInfoIdMap map[int]bool
|
|
|
+// @return err error
|
|
|
+func GetAllEditSharedChartInfoIdMapByReceivedUserIdAndChartInfoIdList(userId int, chartInfoIdList []int) (editShareChartInfoIdMap map[int]bool, err error) {
|
|
|
+ editShareChartInfoIdMap = make(map[int]bool)
|
|
|
+ idList, err := GetAllEditSharedChartInfoIdListByReceivedUserId(userId, chartInfoIdList)
|
|
|
+ if err != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ for _, v := range idList {
|
|
|
+ editShareChartInfoIdMap[v] = true
|
|
|
+ }
|
|
|
+
|
|
|
+ return
|
|
|
+}
|