Files
iotlcm/admin-svr/server/internal/controller/iot/iot_v1_tsimcardoutbound.go

84 lines
3.2 KiB
Go

package iot
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/api/iot/v1"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/service"
)
func (c *ControllerV1) TSimCardOutboundExcelTemplate(ctx context.Context, req *v1.TSimCardOutboundExcelTemplateReq) (res *v1.TSimCardOutboundExcelTemplateRes, err error) {
err = service.IotTSimCardOutbound().DownloadExcelTemplate(ctx)
return nil, err
}
func (c *ControllerV1) TSimCardOutboundExcelSubmit(ctx context.Context, req *v1.TSimCardOutboundExcelSubmitReq) (res *v1.TSimCardOutboundExcelSubmitRes, err error) {
data, err := service.IotTSimCardOutbound().SubmitExcel(ctx, &req.TSimCardOutboundExcelSubmitParam)
if err != nil {
return
}
res = &v1.TSimCardOutboundExcelSubmitRes{
TSimCardOutboundExcelSubmitRes: data,
}
return
}
func (c *ControllerV1) TSimCardOutboundRangeSubmit(ctx context.Context, req *v1.TSimCardOutboundRangeSubmitReq) (res *v1.TSimCardOutboundRangeSubmitRes, err error) {
data, err := service.IotTSimCardOutbound().SubmitRange(ctx, &req.TSimCardOutboundRangeSubmitParam)
if err != nil {
return
}
res = &v1.TSimCardOutboundRangeSubmitRes{
TSimCardOutboundRangeSubmitRes: data,
}
return
}
func (c *ControllerV1) TSimCardOutboundInputSubmit(ctx context.Context, req *v1.TSimCardOutboundInputSubmitReq) (res *v1.TSimCardOutboundInputSubmitRes, err error) {
data, err := service.IotTSimCardOutbound().SubmitInput(ctx, &req.TSimCardOutboundInputSubmitParam)
if err != nil {
return
}
res = &v1.TSimCardOutboundInputSubmitRes{
TSimCardOutboundInputSubmitRes: data,
}
return
}
func (c *ControllerV1) TSimCardOutboundInboundBatchList(ctx context.Context, req *v1.TSimCardOutboundInboundBatchListReq) (res *v1.TSimCardOutboundInboundBatchListRes, err error) {
data, err := service.IotTSimCardOutbound().ListInboundBatches(ctx, &req.TSimCardOutboundInboundBatchListParam)
if err != nil {
return
}
res = &v1.TSimCardOutboundInboundBatchListRes{
TSimCardOutboundInboundBatchListRes: data,
}
return
}
func (c *ControllerV1) TSimCardOutboundInboundBatchCards(ctx context.Context, req *v1.TSimCardOutboundInboundBatchCardsReq) (res *v1.TSimCardOutboundInboundBatchCardsRes, err error) {
data, err := service.IotTSimCardOutbound().ListInboundBatchCards(ctx, &req.TSimCardOutboundInboundBatchCardsParam)
if err != nil {
return
}
res = &v1.TSimCardOutboundInboundBatchCardsRes{
TSimCardOutboundInboundBatchCardsRes: data,
}
return
}
func (c *ControllerV1) TSimCardOutboundBatchSubmit(ctx context.Context, req *v1.TSimCardOutboundBatchSubmitReq) (res *v1.TSimCardOutboundBatchSubmitRes, err error) {
data, err := service.IotTSimCardOutbound().SubmitBatch(ctx, &req.TSimCardOutboundBatchSubmitParam)
if err != nil {
return
}
res = &v1.TSimCardOutboundBatchSubmitRes{
TSimCardOutboundBatchSubmitRes: data,
}
return
}
func (c *ControllerV1) TSimCardOutboundCustomerBalance(ctx context.Context, req *v1.TSimCardOutboundCustomerBalanceReq) (res *v1.TSimCardOutboundCustomerBalanceRes, err error) {
data, err := service.IotTSimCardOutbound().CustomerBalance(ctx, &req.TSimCardOutboundCustomerBalanceParam)
if err != nil {
return
}
res = &v1.TSimCardOutboundCustomerBalanceRes{
TSimCardOutboundCustomerBalanceRes: data,
}
return
}