chore: 并入 iotlcm-admin-svr 历史到 admin-svr/(原提交 49818c6)
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "git.5iot.com/iotlcm-public/iotlcm-admin-svr/api/system/v1"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/response"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/service"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) SysOssList(ctx context.Context, req *v1.SysOssListReq) (res *v1.SysOssListRes, err error) {
|
||||
items, total, err := service.SysOss().List(ctx, &req.SysOssListParam, &req.PageInfo)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
res = &v1.SysOssListRes{
|
||||
Items: items,
|
||||
PageResult: response.PageResult{
|
||||
Page: req.Page,
|
||||
PageSize: req.PageSize,
|
||||
Total: total,
|
||||
},
|
||||
}
|
||||
return
|
||||
}
|
||||
func (c *ControllerV1) SysOssView(ctx context.Context, req *v1.SysOssViewReq) (res *v1.SysOssViewRes, err error) {
|
||||
info, err := service.SysOss().View(ctx, req.SysOssViewParam)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
res = &v1.SysOssViewRes{
|
||||
SysOssViewModel: info,
|
||||
}
|
||||
return
|
||||
}
|
||||
func (c *ControllerV1) SysOssDelete(ctx context.Context, req *v1.SysOssDeleteReq) (res *v1.SysOssDeleteRes, err error) {
|
||||
_, err = service.SysOss().Delete(ctx, req.SysOssDeleteParam)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
res = &v1.SysOssDeleteRes{}
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user