chore: 并入 iotlcm-admin-svr 历史到 admin-svr/(原提交 49818c6)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package iot
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "git.5iot.com/iotlcm-public/iotlcm-admin-svr/api/iot/v1"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/service"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) TSimCardCancellationList(ctx context.Context, req *v1.TSimCardCancellationListReq) (res *v1.TSimCardCancellationListRes, err error) {
|
||||
list, total, err := service.IotTSimCardCancellation().List(ctx, &req.TSimCardCancellationListParam)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if list == nil {
|
||||
list = []*model.TSimCardCancellationListModel{}
|
||||
}
|
||||
res = &v1.TSimCardCancellationListRes{Items: list}
|
||||
res.Page = req.Page
|
||||
res.PageSize = req.PageSize
|
||||
res.Total = total
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func (c *ControllerV1) TSimCardCancellationExport(ctx context.Context, req *v1.TSimCardCancellationExportReq) (res *v1.TSimCardCancellationExportRes, err error) {
|
||||
if err = service.IotTSimCardCancellation().Export(ctx, &req.TSimCardCancellationFilter); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
Reference in New Issue
Block a user