|
@@ -22,6 +22,7 @@ type ExcelClassifyController struct {
|
|
|
// @Title excel表格分类列表
|
|
|
// @Description excel表格分类列表接口
|
|
|
// @Param Source query int true "格来源,1:excel插件的表格,2:自定义表格,3:混合表格,默认:1"
|
|
|
+// @Param IsShowMe query bool true "是否只看我的,true、false"
|
|
|
// @Success 200 {object} response.ExcelClassifyListResp
|
|
|
// @router /excel_classify/list [get]
|
|
|
func (this *ExcelClassifyController) List() {
|
|
@@ -35,6 +36,12 @@ func (this *ExcelClassifyController) List() {
|
|
|
if source <= 0 {
|
|
|
source = utils.EXCEL_DEFAULT
|
|
|
}
|
|
|
+ //只看我的
|
|
|
+ isShowMe, _ := this.GetBool("IsShowMe")
|
|
|
+ showUserId := 0
|
|
|
+ if isShowMe {
|
|
|
+ showUserId = this.SysUser.AdminId
|
|
|
+ }
|
|
|
|
|
|
// 获取一级分类
|
|
|
rootList, err := excel.GetExcelClassifyByParentId(0, source)
|
|
@@ -45,7 +52,7 @@ func (this *ExcelClassifyController) List() {
|
|
|
}
|
|
|
|
|
|
// 根据来源获取所有excel表格(无内容)
|
|
|
- allExcelInfo, err := excel.GetNoContentExcelInfoAll(source)
|
|
|
+ allExcelInfo, err := excel.GetNoContentExcelInfoAll(source, showUserId)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "获取失败"
|
|
|
br.ErrMsg = "获取表格信息失败,Err:" + err.Error()
|