32 lines
726 B
Go
32 lines
726 B
Go
package logic
|
|
|
|
import (
|
|
"context"
|
|
|
|
"gitea.youtukeji.com.cn/youtu/youtu_grpc/app/admin_service/admin_service"
|
|
"gitea.youtukeji.com.cn/youtu/youtu_grpc/app/admin_service/internal/svc"
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
)
|
|
|
|
type UpdateOneLogic struct {
|
|
ctx context.Context
|
|
svcCtx *svc.ServiceContext
|
|
logx.Logger
|
|
}
|
|
|
|
func NewUpdateOneLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateOneLogic {
|
|
return &UpdateOneLogic{
|
|
ctx: ctx,
|
|
svcCtx: svcCtx,
|
|
Logger: logx.WithContext(ctx),
|
|
}
|
|
}
|
|
|
|
// UpdateOne 修改app数据
|
|
func (l *UpdateOneLogic) UpdateOne(in *admin_service.AppInfo) (*admin_service.CommonResponse, error) {
|
|
l.svcCtx.Cached.UpdateOne(in)
|
|
|
|
return &admin_service.CommonResponse{}, nil
|
|
}
|