feat: 迁移plant
This commit is contained in:
@@ -3,6 +3,7 @@ package logic
|
||||
import (
|
||||
"context"
|
||||
|
||||
plantModel "sundynix-micro-go/app/plant/model"
|
||||
"sundynix-micro-go/app/plant/rpc/internal/svc"
|
||||
"sundynix-micro-go/app/plant/rpc/plant"
|
||||
|
||||
@@ -23,8 +24,10 @@ func NewDeleteTopicLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Delet
|
||||
}
|
||||
}
|
||||
|
||||
// 删除话题
|
||||
func (l *DeleteTopicLogic) DeleteTopic(in *plant.IdsReq) (*plant.CommonResp, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
|
||||
return &plant.CommonResp{}, nil
|
||||
if err := l.svcCtx.DB.Where("id in ?", in.Ids).Delete(&plantModel.Topic{}).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &plant.CommonResp{Code: 0, Msg: "ok"}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user