2026-08-09 10:43:45 +08:00
|
|
|
package logic
|
|
|
|
|
|
|
|
|
|
// import (
|
|
|
|
|
// "context"
|
|
|
|
|
// "net/http"
|
|
|
|
|
|
2026-08-09 12:41:08 +08:00
|
|
|
// "bsm/full/module/base/fts/internal/models"
|
|
|
|
|
// "bsm/full/module/base/fts/internal/svc"
|
|
|
|
|
// "bsm/full/module/base/fts/internal/types"
|
2026-08-09 10:43:45 +08:00
|
|
|
// "git.apinb.com/bsm-sdk/core/exception"
|
|
|
|
|
|
|
|
|
|
// "github.com/zeromicro/go-zero/core/logx"
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
|
|
// func (l *ListLogic) List(in *types.Paginate, r *http.Request) (resp *types.Base, err error) {
|
|
|
|
|
// // 解析token
|
|
|
|
|
// claims, err := parseToken(r.Header.Get("Authorization"))
|
|
|
|
|
// if err != nil {
|
|
|
|
|
// return nil, exception.ErrAuthNotFound
|
|
|
|
|
// }
|
|
|
|
|
// // 获取数据
|
|
|
|
|
// data, cnt, err := models.GetFileList(in.Offset, in.Size, claims.Identity)
|
|
|
|
|
// if err != nil {
|
|
|
|
|
// return nil, exception.ErrDBFatal
|
|
|
|
|
// }
|
|
|
|
|
// if cnt == 0 {
|
|
|
|
|
// return Success(""), nil
|
|
|
|
|
// }
|
|
|
|
|
// return Success(data), nil
|
|
|
|
|
// }
|