|
@@ -35,13 +35,13 @@ func GetExcelDetailInfoByExcelInfoId(excelInfoId, sysUserId int) (excelDetail re
|
|
|
}
|
|
|
|
|
|
// 数据权限
|
|
|
- excelDetail.HaveOperaAuth, err = data_manage_permission.CheckExcelPermissionByExcelInfoId(excelInfo.ExcelInfoId, excelInfo.ExcelClassifyId, excelInfo.IsJoinPermission, sysUserId)
|
|
|
+ haveOperaAuth, err := data_manage_permission.CheckExcelPermissionByExcelInfoId(excelInfo.ExcelInfoId, excelInfo.ExcelClassifyId, excelInfo.IsJoinPermission, sysUserId)
|
|
|
if err != nil {
|
|
|
err = errors.New("获取表格权限信息失败,Err" + err.Error())
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- return formatExcelInfo2Detail(excelInfo)
|
|
|
+ return formatExcelInfo2Detail(excelInfo, haveOperaAuth)
|
|
|
}
|
|
|
|
|
|
// GetExcelDetailInfoByUnicode 根据表格编码获取表格详情
|
|
@@ -61,7 +61,7 @@ func GetExcelDetailInfoByUnicode(unicode string) (excelDetail response.ExcelInfo
|
|
|
return formatExcelInfo2Detail(excelInfo)
|
|
|
}
|
|
|
|
|
|
-func formatExcelInfo2Detail(excelInfo *excel.ExcelInfo) (excelDetail response.ExcelInfoDetail, errMsg string, err error) {
|
|
|
+func formatExcelInfo2Detail(excelInfo *excel.ExcelInfo, haveOperaAuth bool) (excelDetail response.ExcelInfoDetail, errMsg string, err error) {
|
|
|
excelDetail = response.ExcelInfoDetail{
|
|
|
ExcelInfoId: excelInfo.ExcelInfoId,
|
|
|
Source: excelInfo.Source,
|
|
@@ -81,6 +81,11 @@ func formatExcelInfo2Detail(excelInfo *excel.ExcelInfo) (excelDetail response.Ex
|
|
|
TableData: nil,
|
|
|
}
|
|
|
|
|
|
+ // 无权限,不需要返回数据
|
|
|
+ if !haveOperaAuth {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
switch excelInfo.Source {
|
|
|
case utils.TIME_TABLE: // 自定义表格
|
|
|
var tableDataConfig TableDataConfig
|