chore: 并入 iotlcm-admin-svr 历史到 admin-svr/(原提交 49818c6)
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
// 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) TSimCardStockList(ctx context.Context, req *v1.TSimCardStockListReq) (res *v1.TSimCardStockListRes, err error) {
|
||||
list, totalCount, err := service.IotTSimCardStock().List(ctx, &req.TSimCardStockListParam)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if list == nil {
|
||||
list = []*model.TSimCardStockListModel{}
|
||||
}
|
||||
|
||||
res = new(v1.TSimCardStockListRes)
|
||||
res.Items = list
|
||||
res.PageResult.Page = req.Page
|
||||
res.PageResult.PageSize = req.PageSize
|
||||
res.PageResult.Total = totalCount
|
||||
return
|
||||
}
|
||||
|
||||
// Export 导出库存卡信息表列表
|
||||
func (c *ControllerV1) TSimCardStockExport(ctx context.Context, req *v1.TSimCardStockExportReq) (res *v1.TSimCardStockExportRes, err error) {
|
||||
err = service.IotTSimCardStock().Export(ctx, &req.TSimCardStockListParam)
|
||||
return
|
||||
}
|
||||
|
||||
// Edit 更新库存卡信息表
|
||||
func (c *ControllerV1) TSimCardStockEdit(ctx context.Context, req *v1.TSimCardStockEditReq) (res *v1.TSimCardStockEditRes, err error) {
|
||||
err = service.IotTSimCardStock().Edit(ctx, &req.TSimCardStockEditParam)
|
||||
return
|
||||
}
|
||||
|
||||
// View 获取指定库存卡信息表信息
|
||||
func (c *ControllerV1) TSimCardStockView(ctx context.Context, req *v1.TSimCardStockViewReq) (res *v1.TSimCardStockViewRes, err error) {
|
||||
data, err := service.IotTSimCardStock().View(ctx, &req.TSimCardStockViewParam)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
res = new(v1.TSimCardStockViewRes)
|
||||
res.TSimCardStockViewModel = data
|
||||
return
|
||||
}
|
||||
|
||||
// Delete 删除库存卡信息表
|
||||
func (c *ControllerV1) TSimCardStockDelete(ctx context.Context, req *v1.TSimCardStockDeleteReq) (res *v1.TSimCardStockDeleteRes, err error) {
|
||||
err = service.IotTSimCardStock().Delete(ctx, &req.TSimCardStockDeleteParam)
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user