chore: 并入 iotlcm-admin-svr 历史到 admin-svr/(原提交 49818c6)
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
// Package gen
|
||||
// @Link https://github.com/xiujiecn/xiu-admin
|
||||
// @Copyright Copyright (c) 2026 LiXiujie
|
||||
// @Author Lxj <xxx@example.com>
|
||||
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
|
||||
// @AutoGenerate Version
|
||||
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"
|
||||
)
|
||||
|
||||
// List 查看流量池表列表
|
||||
func (c *ControllerV1) TSimFlowPoolList(ctx context.Context, req *v1.TSimFlowPoolListReq) (res *v1.TSimFlowPoolListRes, err error) {
|
||||
list, totalCount, err := service.IotTSimFlowPool().List(ctx, &req.TSimFlowPoolListParam)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if list == nil {
|
||||
list = []*model.TSimFlowPoolListModel{}
|
||||
}
|
||||
|
||||
res = new(v1.TSimFlowPoolListRes)
|
||||
res.Items = list
|
||||
res.PageResult.Page = req.Page
|
||||
res.PageResult.PageSize = req.PageSize
|
||||
res.PageResult.Total = totalCount
|
||||
return
|
||||
}
|
||||
|
||||
// Export 导出流量池表列表
|
||||
func (c *ControllerV1) TSimFlowPoolExport(ctx context.Context, req *v1.TSimFlowPoolExportReq) (res *v1.TSimFlowPoolExportRes, err error) {
|
||||
err = service.IotTSimFlowPool().Export(ctx, &req.TSimFlowPoolListParam)
|
||||
return
|
||||
}
|
||||
|
||||
// Edit 更新流量池表
|
||||
func (c *ControllerV1) TSimFlowPoolEdit(ctx context.Context, req *v1.TSimFlowPoolEditReq) (res *v1.TSimFlowPoolEditRes, err error) {
|
||||
err = service.IotTSimFlowPool().Edit(ctx, &req.TSimFlowPoolEditParam)
|
||||
return
|
||||
}
|
||||
|
||||
// View 获取指定流量池表信息
|
||||
func (c *ControllerV1) TSimFlowPoolView(ctx context.Context, req *v1.TSimFlowPoolViewReq) (res *v1.TSimFlowPoolViewRes, err error) {
|
||||
data, err := service.IotTSimFlowPool().View(ctx, &req.TSimFlowPoolViewParam)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
res = new(v1.TSimFlowPoolViewRes)
|
||||
res.TSimFlowPoolViewModel = data
|
||||
return
|
||||
}
|
||||
|
||||
// Delete 删除流量池表
|
||||
func (c *ControllerV1) TSimFlowPoolDelete(ctx context.Context, req *v1.TSimFlowPoolDeleteReq) (res *v1.TSimFlowPoolDeleteRes, err error) {
|
||||
err = service.IotTSimFlowPool().Delete(ctx, &req.TSimFlowPoolDeleteParam)
|
||||
return
|
||||
}
|
||||
|
||||
// SyncPoolCard 流量池同步卡信息
|
||||
func (c *ControllerV1) TSimFlowPoolSyncPoolCard(ctx context.Context, req *v1.TSimFlowPoolSyncPoolCardReq) (res *v1.TSimFlowPoolSyncPoolCardRes, err error) {
|
||||
err = service.IotTSimFlowPool().SyncPoolCard(ctx, req.DeptId)
|
||||
return
|
||||
}
|
||||
|
||||
// GetCardsByPackageCodes 根据套餐编码列表获取卡列表
|
||||
func (c *ControllerV1) TSimFlowPoolGetCardsByPackageCodes(ctx context.Context, req *v1.TSimFlowPoolGetCardsByPackageCodesReq) (res *v1.TSimFlowPoolGetCardsByPackageCodesRes, err error) {
|
||||
list, totalCount, err := service.IotTSimFlowPool().GetCardsByPackageCodes(ctx, &req.GetCardsByPackageCodesParam)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if list == nil {
|
||||
list = []*model.TSimCardInfoListModel{}
|
||||
}
|
||||
|
||||
res = new(v1.TSimFlowPoolGetCardsByPackageCodesRes)
|
||||
res.Items = list
|
||||
res.PageResult.Page = req.Page
|
||||
res.PageResult.PageSize = req.PageSize
|
||||
res.PageResult.Total = totalCount
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user