初始化项目

This commit is contained in:
2025-12-06 15:24:30 +08:00
parent 88a2753211
commit fd08b8925f
59 changed files with 2456 additions and 447 deletions

View File

@@ -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("请求参数不能为空")
}