feat: import services and standardize Go 1.26.5
This commit is contained in:
41
apps/ec/mall/internal/server/ads_server.go
Normal file
41
apps/ec/mall/internal/server/ads_server.go
Normal file
@@ -0,0 +1,41 @@
|
||||
// Code generated by protoc-gen-slc. DO NOT EDIT.
|
||||
package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.apinb.com/bsm-ec/mall/internal/logic/ads"
|
||||
pb "git.apinb.com/bsm-ec/mall/pb"
|
||||
)
|
||||
|
||||
type AdsServer struct {
|
||||
pb.UnimplementedAdsServer
|
||||
}
|
||||
|
||||
func NewAdsServer() *AdsServer {
|
||||
return &AdsServer{}
|
||||
}
|
||||
|
||||
// 通过广告位获取广告信息
|
||||
func (s *AdsServer) ByPos(ctx context.Context, in *pb.ByPosRequest) (*pb.AdsListReply, error) {
|
||||
return ads.ByPos(ctx, in)
|
||||
}
|
||||
|
||||
// 广告列表
|
||||
func (s *AdsServer) Fetch(ctx context.Context, in *pb.FetchRequest) (*pb.AdsListReply, error) {
|
||||
return ads.Fetch(ctx, in)
|
||||
}
|
||||
|
||||
// 新建广告
|
||||
func (s *AdsServer) Create(ctx context.Context, in *pb.AdsItem) (*pb.StatusReply, error) {
|
||||
return ads.Create(ctx, in)
|
||||
}
|
||||
|
||||
// 修改广告
|
||||
func (s *AdsServer) Modify(ctx context.Context, in *pb.AdsItem) (*pb.StatusReply, error) {
|
||||
return ads.Modify(ctx, in)
|
||||
}
|
||||
|
||||
// 删除广告
|
||||
func (s *AdsServer) Delete(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
||||
return ads.Delete(ctx, in)
|
||||
}
|
||||
Reference in New Issue
Block a user