feat: 迁移plant
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"sundynix-micro-go/app/plant/api/internal/svc"
|
||||
"sundynix-micro-go/app/plant/api/internal/types"
|
||||
"sundynix-micro-go/app/plant/rpc/plant"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
@@ -28,7 +29,13 @@ func NewCreateTopicLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Creat
|
||||
}
|
||||
|
||||
func (l *CreateTopicLogic) CreateTopic(req *types.TopicReq) error {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return nil
|
||||
name := req.Name
|
||||
if name == "" {
|
||||
name = req.Title
|
||||
}
|
||||
_, err := l.svcCtx.PlantRpc.CreateTopic(l.ctx, &plant.CreateTopicReq{
|
||||
Name: name, Icon: req.Icon, Desc: req.Desc,
|
||||
Title: req.Title, Remark: req.Remark, StartTime: req.StartTime, EndTime: req.EndTime,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user