初始化项目
This commit is contained in:
@@ -3,19 +3,20 @@ package controller
|
||||
import (
|
||||
"context"
|
||||
|
||||
"cidService/model/dto"
|
||||
"cidService/service"
|
||||
"cidservice/model/dto"
|
||||
"cidservice/service"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
)
|
||||
|
||||
var (
|
||||
CID = cCID{}
|
||||
CID = cid{}
|
||||
)
|
||||
|
||||
type cCID struct{}
|
||||
type cid struct{}
|
||||
|
||||
// GenerateCID 生成CID广告
|
||||
func (c *cCID) GenerateCID(ctx context.Context, req *dto.GenerateCIDReq) (res *dto.GenerateCIDRes, err error) {
|
||||
func (c *cid) GenerateCID(ctx context.Context, req *dto.GenerateCIDReq) (res *dto.GenerateCIDRes, err error) {
|
||||
if req == nil {
|
||||
return nil, gerror.New("请求参数不能为空")
|
||||
}
|
||||
@@ -33,7 +34,7 @@ func (c *cCID) GenerateCID(ctx context.Context, req *dto.GenerateCIDReq) (res *d
|
||||
}
|
||||
|
||||
// GetStatistics 获取CID统计信息
|
||||
func (c *cCID) GetStatistics(ctx context.Context, req *dto.GetCIDStatisticsReq) (res *dto.GetCIDStatisticsRes, err error) {
|
||||
func (c *cid) GetStatistics(ctx context.Context, req *dto.GetCIDStatisticsReq) (res *dto.GetCIDStatisticsRes, err error) {
|
||||
if req == nil {
|
||||
return nil, gerror.New("请求参数不能为空")
|
||||
}
|
||||
@@ -47,7 +48,7 @@ func (c *cCID) GetStatistics(ctx context.Context, req *dto.GetCIDStatisticsReq)
|
||||
}
|
||||
|
||||
// GetCIDHistory 获取CID历史记录
|
||||
func (c *cCID) GetCIDHistory(ctx context.Context, req *dto.GetCIDHistoryReq) (res *dto.GetCIDHistoryRes, err error) {
|
||||
func (c *cid) GetCIDHistory(ctx context.Context, req *dto.GetCIDHistoryReq) (res *dto.GetCIDHistoryRes, err error) {
|
||||
if req == nil {
|
||||
return nil, gerror.New("请求参数不能为空")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user