chore: 并入 iotlcm-admin-svr 历史到 admin-svr/(原提交 49818c6)
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
package iot
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/api/iot/v1"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/service"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) TSimCardRenewInputPrepare(ctx context.Context, req *v1.TSimCardRenewInputPrepareReq) (res *v1.TSimCardRenewInputPrepareRes, err error) {
|
||||
data, err := service.IotTSimCardRenew().PrepareInput(ctx, &req.TSimCardRenewInputPrepareParam)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
res = &v1.TSimCardRenewInputPrepareRes{
|
||||
TSimCardRenewBatchPrepareRes: data,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c *ControllerV1) TSimCardRenewExcelTemplate(ctx context.Context, req *v1.TSimCardRenewExcelTemplateReq) (res *v1.TSimCardRenewExcelTemplateRes, err error) {
|
||||
err = service.IotTSimCardRenew().DownloadExcelTemplate(ctx)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func (c *ControllerV1) TSimCardRenewExcelSubmit(ctx context.Context, req *v1.TSimCardRenewExcelSubmitReq) (res *v1.TSimCardRenewExcelSubmitRes, err error) {
|
||||
data, err := service.IotTSimCardRenew().SubmitExcel(ctx, &req.TSimCardRenewExcelSubmitParam)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
res = &v1.TSimCardRenewExcelSubmitRes{
|
||||
TSimCardRenewExcelSubmitRes: data,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c *ControllerV1) TSimCardRenewBatchConfirm(ctx context.Context, req *v1.TSimCardRenewBatchConfirmReq) (res *v1.TSimCardRenewBatchConfirmRes, err error) {
|
||||
data, err := service.IotTSimCardRenew().ConfirmBatch(ctx, &req.TSimCardRenewBatchConfirmParam)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
res = &v1.TSimCardRenewBatchConfirmRes{
|
||||
TSimCardRenewBatchConfirmRes: data,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c *ControllerV1) TSimCardRenewPrepareResult(ctx context.Context, req *v1.TSimCardRenewPrepareResultReq) (res *v1.TSimCardRenewPrepareResultRes, err error) {
|
||||
data, err := service.IotTSimCardRenew().PrepareResult(ctx, strings.TrimSpace(req.BatchNo))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
res = &v1.TSimCardRenewPrepareResultRes{
|
||||
TSimCardRenewPrepareResultRes: data,
|
||||
}
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user