完成画家指数相关接口

This commit is contained in:
徐俊杰 2023-03-03 09:12:26 +08:00
parent af0bdc6ea9
commit 951791ea9a
14 changed files with 3190 additions and 271 deletions

View File

@ -0,0 +1,81 @@
// Package controller -----------------------------
// @file : artshowVideo.go
// @author : JJXu
// @contact : wavingbear@163.com
// @time : 2023/3/2 10:52
// -------------------------------------------
package controller
import (
context "context"
"github.com/fonchain/fonchain-artistinfo/cmd/internal/logic"
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 画展包视频
var _ artistinfoArtshow.ArtistInfoArtshowServer = new(ArtistInfoArtshowProvider)
type ArtistInfoArtshowProvider struct {
artistinfoArtshow.UnimplementedArtistInfoArtshowServer
videoLogic logic.ArtshowVideoLogic
artistIndexLogic logic.ArtshowArtistIndexLogic
}
// ----------------- 画展包-画家指数
func (a ArtistInfoArtshowProvider) GetArtistIndexDetail(ctx context.Context, request *artistinfoArtshow.GetArtistIndexDetailRequest) (*artistinfoArtshow.ArtistIndexInfo, error) {
return a.artistIndexLogic.GetArtistIndexDetail(request)
}
func (a ArtistInfoArtshowProvider) GetArtistIndexList(ctx context.Context, request *artistinfoArtshow.GetArtistIndexListRequest) (*artistinfoArtshow.GetArtistIndexListResponse, error) {
return a.artistIndexLogic.GetArtistIndexList(request)
}
func (a ArtistInfoArtshowProvider) CreateArtistIndex(ctx context.Context, info *artistinfoArtshow.ArtistIndexInfo) (*emptypb.Empty, error) {
return nil, a.artistIndexLogic.CreateArtistIndex(info)
}
func (a ArtistInfoArtshowProvider) BatchCreateArtistIndex(ctx context.Context, request *artistinfoArtshow.BatchCreateArtistIndexRequest) (*emptypb.Empty, error) {
return nil, a.artistIndexLogic.BatchCreateArtistIndex(request)
}
func (a ArtistInfoArtshowProvider) AuditArtistIndex(ctx context.Context, request *artistinfoArtshow.AuditArtistIndexRequest) (*emptypb.Empty, error) {
return a.artistIndexLogic.AuditArtistIndex(request)
}
func (a ArtistInfoArtshowProvider) UpdateArtistIndex(ctx context.Context, request *artistinfoArtshow.UpdateArtistIndexRequest) (*emptypb.Empty, error) {
return a.artistIndexLogic.UpdateArtistIndex(request)
}
func (a ArtistInfoArtshowProvider) DeletedArtistIndex(ctx context.Context, request *artistinfoArtshow.DeletedArtistIndexRequest) (*emptypb.Empty, error) {
return a.artistIndexLogic.DeletedArtistIndex(request)
}
// ----------------- 画展包-视频资料
func (a ArtistInfoArtshowProvider) GetArtshowVideoDetail(ctx context.Context, request *artistinfoArtshow.GetArtshowVideoDetailRequest) (*artistinfoArtshow.ArtshowVideoInfo, error) {
return a.videoLogic.GetArtshowVideoDetail(request)
}
func (a ArtistInfoArtshowProvider) BatchCreateArtshowVideo(ctx context.Context, request *artistinfoArtshow.BatchCreateArtshowVideoRequest) (*emptypb.Empty, error) {
return nil, a.videoLogic.BatchCreateArtshowVideo(request)
}
func (a ArtistInfoArtshowProvider) CreateArtshowVideo(ctx context.Context, info *artistinfoArtshow.ArtshowVideoInfo) (*emptypb.Empty, error) {
return nil, a.videoLogic.CreateArtshowVideo(info)
}
func (a ArtistInfoArtshowProvider) GetArtshowVideoList(ctx context.Context, requst *artistinfoArtshow.GetArtshowVideoListRequst) (*artistinfoArtshow.GetArtshowVideoListResponse, error) {
return a.videoLogic.GetArtshowVideoList(requst)
}
func (a ArtistInfoArtshowProvider) AuditArtshowVideo(ctx context.Context, request *artistinfoArtshow.AuditArtshowVideoRequest) (*emptypb.Empty, error) {
return a.videoLogic.AuditArtshowVideo(request)
}
func (a ArtistInfoArtshowProvider) UpdateArtshowVideo(ctx context.Context, request *artistinfoArtshow.UpdateArtshowVideoRequest) (*emptypb.Empty, error) {
return a.videoLogic.UpdateArtshowVideo(request)
}
func (a ArtistInfoArtshowProvider) DeletedArtshowVideo(ctx context.Context, request *artistinfoArtshow.DeletedArtshowVideoRequest) (*emptypb.Empty, error) {
return a.videoLogic.DeletedArtshowVideo(request)
}

View File

@ -1,46 +0,0 @@
// Package controller -----------------------------
// @file : artshowVideo.go
// @author : JJXu
// @contact : wavingbear@163.com
// @time : 2023/3/2 10:52
// -------------------------------------------
package controller
import (
context "context"
"github.com/fonchain/fonchain-artistinfo/cmd/internal/logic"
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 画展包视频
var _ artistinfoArtshow.ArtistInfoArtshowServer = new(ArtistInfoArtshowProvider)
type ArtistInfoArtshowProvider struct {
artistinfoArtshow.UnimplementedArtistInfoArtshowServer
logic logic.ArtshowVideoLogic
}
func (a ArtistInfoArtshowProvider) BatchCreateArtshowVideo(ctx context.Context, request *artistinfoArtshow.BatchCreateArtshowVideoRequest) (*emptypb.Empty, error) {
return nil, a.logic.BatchCreateArtshowVideo(request)
}
func (a ArtistInfoArtshowProvider) CreateArtshowVideo(ctx context.Context, info *artistinfoArtshow.ArtshowVideoInfo) (*emptypb.Empty, error) {
return nil, a.logic.CreateArtshowVideo(info)
}
func (a ArtistInfoArtshowProvider) GetArtshowVideoList(ctx context.Context, requst *artistinfoArtshow.GetArtshowVideoListRequst) (*artistinfoArtshow.GetArtshowVideoListResponse, error) {
return a.logic.GetArtshowVideoList(requst)
}
func (a ArtistInfoArtshowProvider) AuditArtshowVideo(ctx context.Context, request *artistinfoArtshow.AuditArtshowVideoRequest) (*emptypb.Empty, error) {
return a.logic.AuditArtshowVideo(request)
}
func (a ArtistInfoArtshowProvider) UpdateArtshowVideo(ctx context.Context, request *artistinfoArtshow.UpdateArtshowVideoRequest) (*emptypb.Empty, error) {
return a.logic.UpdateArtshowVideo(request)
}
func (a ArtistInfoArtshowProvider) DeletedArtshowVideo(ctx context.Context, request *artistinfoArtshow.DeletedArtshowVideoRequest) (*emptypb.Empty, error) {
return a.logic.DeletedArtshowVideo(request)
}

View File

@ -0,0 +1,124 @@
// Package dao -----------------------------
// @file : artistinfo_artshow_artistIndex.go
// @author : JJXu
// @contact : wavingbear@163.com
// @time : 2023/3/3 0:20
// -------------------------------------------
package dao
import (
"errors"
"fmt"
"github.com/fonchain/fonchain-artistinfo/cmd/model"
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
"gorm.io/gorm"
)
var ArtistinfoArtshowArtistIndex = new(artistinfoArtshowArtistIndex)
type artistinfoArtshowArtistIndex struct{}
func (a artistinfoArtshowArtistIndex) BatchCreateData(datas []model.ArtshowArtistIndex) error {
//return db.DB.Create(&datas).Error
tx := db.DB.Begin()
for _, v := range datas {
err := a.CreateData(&v, tx)
if err != nil {
return err
}
}
tx.Commit()
return nil
}
func (a artistinfoArtshowArtistIndex) CreateData(data *model.ArtshowArtistIndex, tx ...*gorm.DB) error {
var txdb *gorm.DB
if tx != nil {
txdb = tx[0]
} else {
txdb = db.DB
}
var exist = model.ArtshowArtistIndex{}
db.DB.Where("artist_uid = ? AND status = 2 AND class= ?", data.ArtistUid, data.Class).Find(&exist)
if exist.ID != 0 {
return errors.New(fmt.Sprintf("主题[%s]已存在", data.Title))
}
return txdb.Create(&data).Error
}
func (a artistinfoArtshowArtistIndex) UpdateData(data *model.ArtshowArtistIndex) error {
return db.DB.Updates(&data).Error
}
func (a artistinfoArtshowArtistIndex) DeletedData(id ...int64) (err error) {
if len(id) == 1 {
err = db.DB.Where("id = ?", id[0]).Delete(&model.ArtshowArtistIndex{}).Error
} else if len(id) > 0 {
err = db.DB.Where("id = ?", id).Delete(&model.ArtshowArtistIndex{}).Error
}
return err
}
func (a artistinfoArtshowArtistIndex) GetData(id int64) (data *model.ArtshowArtistIndex, err error) {
err = db.DB.Where("id = ?", id).First(data).Error
return
}
func (a artistinfoArtshowArtistIndex) GetDataList(req *artistinfoArtshow.GetArtistIndexListRequest) (datas []model.ArtshowArtistIndex, total int64, err error) {
datas = []model.ArtshowArtistIndex{}
var tx = db.DB.Model(model.ArtshowArtistIndex{})
if req.ArtistUid != "" {
tx = tx.Where("artist_uid = ?", req.ArtistUid)
}
if req.LockTime != "" {
tx = tx.Where("lock_time = ?", req.LockTime)
}
if req.Status != 0 {
tx = tx.Where("status = ?", req.Status)
}
if req.AuditStatus != 0 {
tx = tx.Where("audit_status = ?", req.AuditStatus)
}
//if req.AuditMark1 != "" {
// tx = tx.Where("audit_mark1 = ?", req.AuditMark1)
//}
//if req.AuditMark2 != "" {
// tx = tx.Where("audit_mark2 = ?", req.AuditMark2)
//}
err = tx.Count(&total).Scopes(db.Pagination(req.Page, req.PageSize)).Find(&datas).Error
return
}
func (a artistinfoArtshowArtistIndex) Audit(auditStatus model.AuditStatus, mark1, mark2 string, ids ...int64) (err error) {
tx := db.DB.Begin()
err = tx.Model(model.ArtshowArtistIndex{}).Where("id in ?", ids).Update("audit_status", auditStatus).Error
if err != nil {
return err
}
err = tx.Model(model.ArtshowArtistIndex{}).Where("id in ?", ids).Update("audit_mark1", mark1).Error
if err != nil {
return err
}
err = tx.Model(model.ArtshowArtistIndex{}).Where("id in ?", ids).Update("audit_mark2", mark2).Error
if err != nil {
return err
}
tx.Commit()
return
}
func (a artistinfoArtshowArtistIndex) GetArtshowVideoDetail(in *artistinfoArtshow.GetArtshowVideoDetailRequest) (rep model.ArtshowArtistIndex, err error) {
var tx = db.DB.Model(model.ArtshowArtistIndex{})
if in.ArtistUid != "" {
tx = tx.Where("artist_uid =?", in.ArtistUid)
}
if in.LockTime != "" {
tx = tx.Where("lock_time", in.LockTime)
}
if in.Status != 0 {
tx = tx.Where("status", in.Status)
}
var data model.ArtshowArtistIndex
err = tx.First(&data).Error
return
}

View File

@ -47,7 +47,7 @@ func (a artistinfoArtshowVideo) CreateData(data *model.ArtshowRecord, tx ...*gor
}
func (a artistinfoArtshowVideo) UpdateData(data *model.ArtshowRecord) error {
return db.DB.Create(&data).Error
return db.DB.Updates(&data).Error
}
@ -98,9 +98,35 @@ func (a artistinfoArtshowVideo) GetDataList(req *artistinfoArtshow.GetArtshowVid
err = tx.Count(&total).Scopes(db.Pagination(req.Page, req.PageSize)).Find(&datas).Error
return
}
func (a artistinfoArtshowVideo) Audit(auditStatus model.AuditStatus, mark1, mark2 string, ids ...int64) error {
return db.DB.Model(model.ArtshowRecord{}).Where("id in ?", ids).
Update("audit_status", auditStatus).
Update("audit_mark1", mark1).
Update("audit_mark2", mark2).Error
func (a artistinfoArtshowVideo) Audit(auditStatus model.AuditStatus, mark1, mark2 string, ids ...int64) (err error) {
tx := db.DB.Begin()
err = tx.Model(model.ArtshowRecord{}).Where("id in ?", ids).Update("audit_status", auditStatus).Error
if err != nil {
return err
}
err = tx.Model(model.ArtshowRecord{}).Where("id in ?", ids).Update("audit_mark1", mark1).Error
if err != nil {
return err
}
err = tx.Model(model.ArtshowRecord{}).Where("id in ?", ids).Update("audit_mark2", mark2).Error
if err != nil {
return err
}
tx.Commit()
return
}
func (a artistinfoArtshowVideo) GetArtshowVideoDetail(in *artistinfoArtshow.GetArtshowVideoDetailRequest) (rep model.ArtshowRecord, err error) {
var tx = db.DB.Model(model.ArtshowRecord{})
if in.ArtistUid != "" {
tx = tx.Where("artist_uid =?", in.ArtistUid)
}
if in.LockTime != "" {
tx = tx.Where("lock_time", in.LockTime)
}
if in.Status != 0 {
tx = tx.Where("status", in.Status)
}
var data model.ArtshowRecord
err = tx.First(&data).Error
return
}

View File

@ -0,0 +1,141 @@
// Package logic -----------------------------
// @file : artistinfo_artshowVideo.go
// @author : JJXu
// @contact : wavingbear@163.com
// @time : 2023/3/2 11:51
// -------------------------------------------
package logic
import (
"errors"
"fmt"
"github.com/fonchain/fonchain-artistinfo/cmd/internal/dao"
"github.com/fonchain/fonchain-artistinfo/cmd/model"
"github.com/fonchain/fonchain-artistinfo/pb/artistInfoUser"
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
"google.golang.org/protobuf/types/known/emptypb"
"gorm.io/gorm"
)
type ArtshowArtistIndexLogic struct{}
func (a ArtshowArtistIndexLogic) BatchCreateArtistIndex(request *artistinfoArtshow.BatchCreateArtistIndexRequest) error {
var datas = []model.ArtshowArtistIndex{}
for _, v := range request.ArtistUids {
userInfo, err := NewArtistInfo().FindUser(&artistInfoUser.FindUserRequest{
MgmtArtistUid: v,
IsArtist: true,
})
if err != nil {
return err
}
if userInfo.Id == 0 {
return errors.New(fmt.Sprintf("用户%s不存在", v))
}
datas = append(datas,
model.ArtshowArtistIndex{LockTime: userInfo.LatestLockTime, ArtistUid: v, Class: "exhibition", Title: "艺术家-展览", Types: "2", Status: 2},
model.ArtshowArtistIndex{LockTime: userInfo.LatestLockTime, ArtistUid: v, Class: "seniority", Title: "艺术家-资历", Types: "1", Status: 2},
model.ArtshowArtistIndex{LockTime: userInfo.LatestLockTime, ArtistUid: v, Class: "specialized", Title: "艺术家-专业", Types: "1", Status: 2},
model.ArtshowArtistIndex{LockTime: userInfo.LatestLockTime, ArtistUid: v, Class: "Influence", Title: "艺术家-影响力", Types: "1", Status: 2},
model.ArtshowArtistIndex{LockTime: userInfo.LatestLockTime, ArtistUid: v, Class: "collect", Title: "艺术家-收藏", Types: "1", Status: 2},
)
}
return dao.ArtistinfoArtshowArtistIndex.BatchCreateData(datas)
}
func (a ArtshowArtistIndexLogic) CreateArtistIndex(request *artistinfoArtshow.ArtistIndexInfo) error {
return dao.ArtistinfoArtshowArtistIndex.CreateData(&model.ArtshowArtistIndex{
LockTime: request.LockTime,
ArtistUid: request.ArtistUid,
Class: request.Class,
Title: request.Title,
Types: request.Types,
Status: 2,
})
}
func (a ArtshowArtistIndexLogic) GetArtistIndexDetail(request *artistinfoArtshow.GetArtistIndexDetailRequest) (rep *artistinfoArtshow.ArtistIndexInfo, err error) {
data, err := dao.ArtistinfoArtshowArtistIndex.GetData(request.Id)
if err != nil {
if gorm.ErrRecordNotFound == err {
err = errors.New("找不到数据")
}
return nil, err
}
rep = &artistinfoArtshow.ArtistIndexInfo{
ArtistUid: data.ArtistUid,
Title: data.Title,
Class: data.Class,
TitleScore: data.TitleScore,
Score: data.Score,
Types: data.Types,
Status: data.Status,
LockTime: data.LockTime,
AuditMark1: data.AuditMark1,
AuditMark2: data.AuditMark2,
AuditStatus: int64(data.AuditStatus),
Id: data.ID,
CreatedAt: data.CreatedAt.Unix(),
UpdatedAt: data.UpdatedAt.Unix(),
DeletedAt: int64(data.DeletedAt),
}
return nil, nil
}
func (a ArtshowArtistIndexLogic) GetArtistIndexList(request *artistinfoArtshow.GetArtistIndexListRequest) (res *artistinfoArtshow.GetArtistIndexListResponse, err error) {
res = &artistinfoArtshow.GetArtistIndexListResponse{}
datas, total, err := dao.ArtistinfoArtshowArtistIndex.GetDataList(request)
if err != nil {
return nil, err
}
res.Page = &artistinfoArtshow.VideoPagination{
Page: request.Page,
PageSize: request.PageSize,
Total: total,
}
for _, v := range datas {
res.Data = append(res.Data, &artistinfoArtshow.ArtistIndexInfo{
ArtistUid: v.ArtistUid,
Title: v.Title,
Class: v.Class,
TitleScore: v.TitleScore,
Score: v.Score,
Types: v.Types,
Status: v.Status,
LockTime: v.LockTime,
AuditMark1: v.AuditMark1,
AuditMark2: v.AuditMark2,
AuditStatus: int64(v.AuditStatus),
Id: v.ID,
CreatedAt: v.CreatedAt.Unix(),
UpdatedAt: v.UpdatedAt.Unix(),
DeletedAt: int64(v.DeletedAt),
})
}
return
}
func (a ArtshowArtistIndexLogic) AuditArtistIndex(request *artistinfoArtshow.AuditArtistIndexRequest) (*emptypb.Empty, error) {
err := dao.ArtistinfoArtshowArtistIndex.Audit(model.AuditStatus(request.AuditStatus), request.AuditMark1, request.AuditMark2, request.ArtistIndexIds...)
return nil, err
}
func (a ArtshowArtistIndexLogic) UpdateArtistIndex(request *artistinfoArtshow.UpdateArtistIndexRequest) (*emptypb.Empty, error) {
err := dao.ArtistinfoArtshowArtistIndex.UpdateData(&model.ArtshowArtistIndex{
Model: model.Model{ID: request.Id},
TitleScore: request.TitleScore,
Score: request.Score,
AuditStatus: model.AuditType_Pending,
})
return nil, err
}
func (a ArtshowArtistIndexLogic) DeletedArtistIndex(request *artistinfoArtshow.DeletedArtistIndexRequest) (*emptypb.Empty, error) {
var ids = []int64{}
if request.Id != 0 {
ids = append(ids, request.Id)
} else if len(request.Ids) > 0 {
ids = append(ids, request.Ids...)
}
err := dao.ArtistinfoArtshowArtistIndex.DeletedData(ids...)
return nil, err
}

View File

@ -7,10 +7,12 @@
package logic
import (
"errors"
"github.com/fonchain/fonchain-artistinfo/cmd/internal/dao"
"github.com/fonchain/fonchain-artistinfo/cmd/model"
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
"google.golang.org/protobuf/types/known/emptypb"
"gorm.io/gorm"
)
type ArtshowVideoLogic struct{}
@ -43,6 +45,31 @@ func (a ArtshowVideoLogic) CreateArtshowVideo(request *artistinfoArtshow.Artshow
Status: request.Status,
})
}
func (a ArtshowVideoLogic) GetArtshowVideoDetail(request *artistinfoArtshow.GetArtshowVideoDetailRequest) (rep *artistinfoArtshow.ArtshowVideoInfo, err error) {
data, err := dao.ArtistinfoArtshowVideo.GetArtshowVideoDetail(request)
if err != nil {
if gorm.ErrRecordNotFound == err {
err = errors.New("找不到数据")
}
return nil, err
}
rep = &artistinfoArtshow.ArtshowVideoInfo{
Id: data.ID,
ArtistUid: data.ArtistUid,
LockTime: data.LockTime,
VideoUrl: data.VideoUrl,
AuditStatus: int64(data.AuditStatus),
AuditMark1: data.AuditMark1,
AuditMark2: data.AuditMark2,
CreatedAt: data.CreatedAt.Unix(),
UpdatedAt: data.UpdatedAt.Unix(),
DeletedAt: int64(data.DeletedAt),
ArtistName: data.ArtistName,
Status: data.Status,
}
return nil, nil
}
func (a ArtshowVideoLogic) GetArtshowVideoList(request *artistinfoArtshow.GetArtshowVideoListRequst) (res *artistinfoArtshow.GetArtshowVideoListResponse, err error) {
res = &artistinfoArtshow.GetArtshowVideoListResponse{}
datas, total, err := dao.ArtistinfoArtshowVideo.GetDataList(request)

View File

@ -0,0 +1,27 @@
// Package model -----------------------------
// @file : artshow_artistIndex.go
// @author : JJXu
// @contact : wavingbear@163.com
// @time : 2023/3/2 23:11
// -------------------------------------------
package model
// 画家指数
type ArtshowArtistIndex struct {
Model
ArtistUid string `gorm:"column:artist_uid;comment:画家uid" json:"artistUid"`
Title string `gorm:"column:title;comment:" json:"title"` //艺术家-展览(exhibition) 、 艺术家-资历seniority 、艺术家-专业specialized 、艺术家-影响力Influence、艺术家-收藏collect
Class string `gorm:"column:class;comment:指数类别" json:"class"` //exhibition 、seniority 、specialized 、Influence 、collect
TitleScore int64 `gorm:"column:title_score;comment:总分" json:"titleScore"`
Score string `gorm:"column:score;comment:前端定义的分数列表" json:"score"` //
Types string `gorm:"column:types;comment:" json:"types"`
Status int64 `json:"status" gorm:"column:status;default:2;comment:2=锁定 3=解锁"` //跟随用户的锁定和解锁状态,用于控制数据的展示
LockTime string `json:"lockTime" gorm:"column:lock_time;comment:锁定时间"`
AuditStatus AuditStatus `json:"auditStatus" gorm:"column:audit_status;default:5;comment:审核状态2= 待审核,3= 审核失败,4= 审核通过,5= 待补充"`
AuditMark1 string `json:"auditMark1" gorm:"column:audit_mark1;comment:审核备注1"`
AuditMark2 string `json:"auditMark2" gorm:"column:audit_mark2;comment:审核备注2"`
}
func (a ArtshowArtistIndex) TableName() string {
return "artshow_artist_index"
}

View File

@ -10,7 +10,7 @@ type ArtshowRecord struct {
Model
//通过这两个字段弱关联 artwork_lock_record表中对应的画作
ArtistUid string `json:"artistUid" gorm:"column:artist_uid;comment:"`
Status int64 `json:"status" gorm:"column:status;default:1;comment:2=锁定 3=解锁"` //跟随用户的锁定和解锁状态,用于控制数据的展示
Status int64 `json:"status" gorm:"column:status;default:2;comment:2=锁定 3=解锁"` //跟随用户的锁定和解锁状态,用于控制数据的展示
LockTime string `json:"lockTime" gorm:"column:lock_time;comment:"`
//AccountId int64 `json:"accountId" gorm:"column:account_id;comment:"`

View File

@ -1,8 +1,10 @@
package model
package old
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
// 画家指数
type ArtworkExExam struct {
Model
model.Model
UserId uint `gorm:"column:user_id;default:0;comment:账号id" json:"userId"`
ArtistUid string `json:"artistUid" gorm:"column:artist_uid;comment:"`
Title string `gorm:"column:title;type:varchar(64);default:''" json:"title"`

View File

@ -9,15 +9,30 @@ import "google/protobuf/empty.proto"; //使用 google.protobuf.Empty
// protoc -I . -I ./pb --proto_path=. --go_out=./pb/artistinfoArtshow --go-triple_out=./pb/artistinfoArtshow --validate_out="lang=go:./pb/artistinfoArtshow" ./pb/artistinfoArtshow.proto
service ArtistInfoArtshow {
//
rpc GetArtshowVideoDetail(GetArtshowVideoDetailRequest)returns(ArtshowVideoInfo){} //
rpc GetArtshowVideoList(GetArtshowVideoListRequst)returns(GetArtshowVideoListResponse){}//
rpc CreateArtshowVideo(ArtshowVideoInfo)returns(google.protobuf.Empty){}
rpc BatchCreateArtshowVideo(BatchCreateArtshowVideoRequest)returns(google.protobuf.Empty){}
rpc AuditArtshowVideo(AuditArtshowVideoRequest)returns(google.protobuf.Empty){} //
rpc UpdateArtshowVideo(UpdateArtshowVideoRequest)returns(google.protobuf.Empty){} //
rpc DeletedArtshowVideo(DeletedArtshowVideoRequest)returns(google.protobuf.Empty){} //
rpc CheckeExists(CheckeExistsRequest)returns(google.protobuf.Empty){} //
}
// rpc CheckeExists(CheckeExistsRequest)returns(google.protobuf.Empty){} //
// rpc GetArtistListOfVideo(ArtistListRequest)returns(){}//
//
rpc GetArtistIndexDetail(GetArtistIndexDetailRequest)returns(ArtistIndexInfo){} //
rpc GetArtistIndexList(GetArtistIndexListRequest)returns(GetArtistIndexListResponse){}//
rpc CreateArtistIndex(ArtistIndexInfo)returns(google.protobuf.Empty){}
rpc BatchCreateArtistIndex(BatchCreateArtistIndexRequest)returns(google.protobuf.Empty){}
rpc AuditArtistIndex(AuditArtistIndexRequest)returns(google.protobuf.Empty){} //
rpc UpdateArtistIndex(UpdateArtistIndexRequest)returns(google.protobuf.Empty){} //
rpc DeletedArtistIndex(DeletedArtistIndexRequest)returns(google.protobuf.Empty){} //
// rpc GetArtistListOfArtistIndex(ArtistListRequest)returns(){}//
}
message ArtistListRequest{
string artistName =1;
}
message videoPagination{
int64 page =1;
int64 pageSize=2;
@ -81,3 +96,67 @@ message CheckeExistsRequest{
string artistUid =1;
string lockTime =2;
}
message GetArtshowVideoDetailRequest{
string artistUid=1;
string lockTime=2;
int32 status=3;
}
//-------------------
message ArtistIndexInfo{
string artistUid=1;
string title=2;
string class=3;
int64 titleScore=4;
string score=5;
string types=6;
int64 status=7;
string lockTime=8;
string auditMark1=9;
string auditMark2=10;
int64 auditStatus=11;
int64 id=12;
int64 createdAt=13;
int64 updatedAt=14;
int64 deletedAt=15;
}
message GetArtistIndexListResponse{
repeated ArtistIndexInfo Data=1;
videoPagination page=2;
}
message GetArtistIndexDetailRequest{
int64 id =1;
}
message GetArtistIndexListRequest{
string artistUid =1;
string artistName =3;
string lockTime=4;
int64 auditStatus=5;
int64 status=6; // 2= 3=
int64 page=7;
int64 pageSize=8;
}
message BatchCreateArtistIndexRequest{
repeated string artistUids =1;
// string lockTime=2;
}
message AuditArtistIndexRequest{
repeated int64 artistIndexIds =1;
int64 auditStatus =5;
string auditMark1 =6;
string auditMark2 =7;
}
message UpdateArtistIndexRequest{
int64 id=12;
int64 titleScore=4;
string score=5;
int64 status=7;
}
message DeletedArtistIndexRequest{
int64 Id=1; //
repeated int64 Ids =2; //
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -30,13 +30,21 @@ const _ = grpc_go.SupportPackageIsVersion7
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ArtistInfoArtshowClient interface {
// 画展视频
GetArtshowVideoDetail(ctx context.Context, in *GetArtshowVideoDetailRequest, opts ...grpc_go.CallOption) (*ArtshowVideoInfo, common.ErrorWithAttachment)
GetArtshowVideoList(ctx context.Context, in *GetArtshowVideoListRequst, opts ...grpc_go.CallOption) (*GetArtshowVideoListResponse, common.ErrorWithAttachment)
CreateArtshowVideo(ctx context.Context, in *ArtshowVideoInfo, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
BatchCreateArtshowVideo(ctx context.Context, in *BatchCreateArtshowVideoRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
AuditArtshowVideo(ctx context.Context, in *AuditArtshowVideoRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
UpdateArtshowVideo(ctx context.Context, in *UpdateArtshowVideoRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
DeletedArtshowVideo(ctx context.Context, in *DeletedArtshowVideoRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
CheckeExists(ctx context.Context, in *CheckeExistsRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
// 画家指数
GetArtistIndexDetail(ctx context.Context, in *GetArtistIndexDetailRequest, opts ...grpc_go.CallOption) (*ArtistIndexInfo, common.ErrorWithAttachment)
GetArtistIndexList(ctx context.Context, in *GetArtistIndexListRequest, opts ...grpc_go.CallOption) (*GetArtistIndexListResponse, common.ErrorWithAttachment)
CreateArtistIndex(ctx context.Context, in *ArtistIndexInfo, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
BatchCreateArtistIndex(ctx context.Context, in *BatchCreateArtistIndexRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
AuditArtistIndex(ctx context.Context, in *AuditArtistIndexRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
UpdateArtistIndex(ctx context.Context, in *UpdateArtistIndexRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
DeletedArtistIndex(ctx context.Context, in *DeletedArtistIndexRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
}
type artistInfoArtshowClient struct {
@ -44,13 +52,20 @@ type artistInfoArtshowClient struct {
}
type ArtistInfoArtshowClientImpl struct {
GetArtshowVideoDetail func(ctx context.Context, in *GetArtshowVideoDetailRequest) (*ArtshowVideoInfo, error)
GetArtshowVideoList func(ctx context.Context, in *GetArtshowVideoListRequst) (*GetArtshowVideoListResponse, error)
CreateArtshowVideo func(ctx context.Context, in *ArtshowVideoInfo) (*emptypb.Empty, error)
BatchCreateArtshowVideo func(ctx context.Context, in *BatchCreateArtshowVideoRequest) (*emptypb.Empty, error)
AuditArtshowVideo func(ctx context.Context, in *AuditArtshowVideoRequest) (*emptypb.Empty, error)
UpdateArtshowVideo func(ctx context.Context, in *UpdateArtshowVideoRequest) (*emptypb.Empty, error)
DeletedArtshowVideo func(ctx context.Context, in *DeletedArtshowVideoRequest) (*emptypb.Empty, error)
CheckeExists func(ctx context.Context, in *CheckeExistsRequest) (*emptypb.Empty, error)
GetArtistIndexDetail func(ctx context.Context, in *GetArtistIndexDetailRequest) (*ArtistIndexInfo, error)
GetArtistIndexList func(ctx context.Context, in *GetArtistIndexListRequest) (*GetArtistIndexListResponse, error)
CreateArtistIndex func(ctx context.Context, in *ArtistIndexInfo) (*emptypb.Empty, error)
BatchCreateArtistIndex func(ctx context.Context, in *BatchCreateArtistIndexRequest) (*emptypb.Empty, error)
AuditArtistIndex func(ctx context.Context, in *AuditArtistIndexRequest) (*emptypb.Empty, error)
UpdateArtistIndex func(ctx context.Context, in *UpdateArtistIndexRequest) (*emptypb.Empty, error)
DeletedArtistIndex func(ctx context.Context, in *DeletedArtistIndexRequest) (*emptypb.Empty, error)
}
func (c *ArtistInfoArtshowClientImpl) GetDubboStub(cc *triple.TripleConn) ArtistInfoArtshowClient {
@ -65,6 +80,12 @@ func NewArtistInfoArtshowClient(cc *triple.TripleConn) ArtistInfoArtshowClient {
return &artistInfoArtshowClient{cc}
}
func (c *artistInfoArtshowClient) GetArtshowVideoDetail(ctx context.Context, in *GetArtshowVideoDetailRequest, opts ...grpc_go.CallOption) (*ArtshowVideoInfo, common.ErrorWithAttachment) {
out := new(ArtshowVideoInfo)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetArtshowVideoDetail", in, out)
}
func (c *artistInfoArtshowClient) GetArtshowVideoList(ctx context.Context, in *GetArtshowVideoListRequst, opts ...grpc_go.CallOption) (*GetArtshowVideoListResponse, common.ErrorWithAttachment) {
out := new(GetArtshowVideoListResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
@ -101,10 +122,46 @@ func (c *artistInfoArtshowClient) DeletedArtshowVideo(ctx context.Context, in *D
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeletedArtshowVideo", in, out)
}
func (c *artistInfoArtshowClient) CheckeExists(ctx context.Context, in *CheckeExistsRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
func (c *artistInfoArtshowClient) GetArtistIndexDetail(ctx context.Context, in *GetArtistIndexDetailRequest, opts ...grpc_go.CallOption) (*ArtistIndexInfo, common.ErrorWithAttachment) {
out := new(ArtistIndexInfo)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetArtistIndexDetail", in, out)
}
func (c *artistInfoArtshowClient) GetArtistIndexList(ctx context.Context, in *GetArtistIndexListRequest, opts ...grpc_go.CallOption) (*GetArtistIndexListResponse, common.ErrorWithAttachment) {
out := new(GetArtistIndexListResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetArtistIndexList", in, out)
}
func (c *artistInfoArtshowClient) CreateArtistIndex(ctx context.Context, in *ArtistIndexInfo, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
out := new(emptypb.Empty)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CheckeExists", in, out)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateArtistIndex", in, out)
}
func (c *artistInfoArtshowClient) BatchCreateArtistIndex(ctx context.Context, in *BatchCreateArtistIndexRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
out := new(emptypb.Empty)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BatchCreateArtistIndex", in, out)
}
func (c *artistInfoArtshowClient) AuditArtistIndex(ctx context.Context, in *AuditArtistIndexRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
out := new(emptypb.Empty)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AuditArtistIndex", in, out)
}
func (c *artistInfoArtshowClient) UpdateArtistIndex(ctx context.Context, in *UpdateArtistIndexRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
out := new(emptypb.Empty)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateArtistIndex", in, out)
}
func (c *artistInfoArtshowClient) DeletedArtistIndex(ctx context.Context, in *DeletedArtistIndexRequest, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
out := new(emptypb.Empty)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/DeletedArtistIndex", in, out)
}
// ArtistInfoArtshowServer is the server API for ArtistInfoArtshow service.
@ -112,13 +169,21 @@ func (c *artistInfoArtshowClient) CheckeExists(ctx context.Context, in *CheckeEx
// for forward compatibility
type ArtistInfoArtshowServer interface {
// 画展视频
GetArtshowVideoDetail(context.Context, *GetArtshowVideoDetailRequest) (*ArtshowVideoInfo, error)
GetArtshowVideoList(context.Context, *GetArtshowVideoListRequst) (*GetArtshowVideoListResponse, error)
CreateArtshowVideo(context.Context, *ArtshowVideoInfo) (*emptypb.Empty, error)
BatchCreateArtshowVideo(context.Context, *BatchCreateArtshowVideoRequest) (*emptypb.Empty, error)
AuditArtshowVideo(context.Context, *AuditArtshowVideoRequest) (*emptypb.Empty, error)
UpdateArtshowVideo(context.Context, *UpdateArtshowVideoRequest) (*emptypb.Empty, error)
DeletedArtshowVideo(context.Context, *DeletedArtshowVideoRequest) (*emptypb.Empty, error)
CheckeExists(context.Context, *CheckeExistsRequest) (*emptypb.Empty, error)
// 画家指数
GetArtistIndexDetail(context.Context, *GetArtistIndexDetailRequest) (*ArtistIndexInfo, error)
GetArtistIndexList(context.Context, *GetArtistIndexListRequest) (*GetArtistIndexListResponse, error)
CreateArtistIndex(context.Context, *ArtistIndexInfo) (*emptypb.Empty, error)
BatchCreateArtistIndex(context.Context, *BatchCreateArtistIndexRequest) (*emptypb.Empty, error)
AuditArtistIndex(context.Context, *AuditArtistIndexRequest) (*emptypb.Empty, error)
UpdateArtistIndex(context.Context, *UpdateArtistIndexRequest) (*emptypb.Empty, error)
DeletedArtistIndex(context.Context, *DeletedArtistIndexRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedArtistInfoArtshowServer()
}
@ -127,6 +192,9 @@ type UnimplementedArtistInfoArtshowServer struct {
proxyImpl protocol.Invoker
}
func (UnimplementedArtistInfoArtshowServer) GetArtshowVideoDetail(context.Context, *GetArtshowVideoDetailRequest) (*ArtshowVideoInfo, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetArtshowVideoDetail not implemented")
}
func (UnimplementedArtistInfoArtshowServer) GetArtshowVideoList(context.Context, *GetArtshowVideoListRequst) (*GetArtshowVideoListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetArtshowVideoList not implemented")
}
@ -145,8 +213,26 @@ func (UnimplementedArtistInfoArtshowServer) UpdateArtshowVideo(context.Context,
func (UnimplementedArtistInfoArtshowServer) DeletedArtshowVideo(context.Context, *DeletedArtshowVideoRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeletedArtshowVideo not implemented")
}
func (UnimplementedArtistInfoArtshowServer) CheckeExists(context.Context, *CheckeExistsRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckeExists not implemented")
func (UnimplementedArtistInfoArtshowServer) GetArtistIndexDetail(context.Context, *GetArtistIndexDetailRequest) (*ArtistIndexInfo, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetArtistIndexDetail not implemented")
}
func (UnimplementedArtistInfoArtshowServer) GetArtistIndexList(context.Context, *GetArtistIndexListRequest) (*GetArtistIndexListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetArtistIndexList not implemented")
}
func (UnimplementedArtistInfoArtshowServer) CreateArtistIndex(context.Context, *ArtistIndexInfo) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateArtistIndex not implemented")
}
func (UnimplementedArtistInfoArtshowServer) BatchCreateArtistIndex(context.Context, *BatchCreateArtistIndexRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method BatchCreateArtistIndex not implemented")
}
func (UnimplementedArtistInfoArtshowServer) AuditArtistIndex(context.Context, *AuditArtistIndexRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method AuditArtistIndex not implemented")
}
func (UnimplementedArtistInfoArtshowServer) UpdateArtistIndex(context.Context, *UpdateArtistIndexRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateArtistIndex not implemented")
}
func (UnimplementedArtistInfoArtshowServer) DeletedArtistIndex(context.Context, *DeletedArtistIndexRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeletedArtistIndex not implemented")
}
func (s *UnimplementedArtistInfoArtshowServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl
@ -176,6 +262,35 @@ func RegisterArtistInfoArtshowServer(s grpc_go.ServiceRegistrar, srv ArtistInfoA
s.RegisterService(&ArtistInfoArtshow_ServiceDesc, srv)
}
func _ArtistInfoArtshow_GetArtshowVideoDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetArtshowVideoDetailRequest)
if err := dec(in); err != nil {
return nil, err
}
base := srv.(dubbo3.Dubbo3GrpcService)
args := []interface{}{}
args = append(args, in)
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("GetArtshowVideoDetail", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
info := &grpc_go.UnaryServerInfo{
Server: srv,
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
return interceptor(ctx, in, info, handler)
}
func _ArtistInfoArtshow_GetArtshowVideoList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetArtshowVideoListRequst)
if err := dec(in); err != nil {
@ -350,8 +465,8 @@ func _ArtistInfoArtshow_DeletedArtshowVideo_Handler(srv interface{}, ctx context
return interceptor(ctx, in, info, handler)
}
func _ArtistInfoArtshow_CheckeExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CheckeExistsRequest)
func _ArtistInfoArtshow_GetArtistIndexDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetArtistIndexDetailRequest)
if err := dec(in); err != nil {
return nil, err
}
@ -363,7 +478,181 @@ func _ArtistInfoArtshow_CheckeExists_Handler(srv interface{}, ctx context.Contex
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("CheckeExists", args, invAttachment)
invo := invocation.NewRPCInvocation("GetArtistIndexDetail", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
info := &grpc_go.UnaryServerInfo{
Server: srv,
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
return interceptor(ctx, in, info, handler)
}
func _ArtistInfoArtshow_GetArtistIndexList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetArtistIndexListRequest)
if err := dec(in); err != nil {
return nil, err
}
base := srv.(dubbo3.Dubbo3GrpcService)
args := []interface{}{}
args = append(args, in)
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("GetArtistIndexList", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
info := &grpc_go.UnaryServerInfo{
Server: srv,
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
return interceptor(ctx, in, info, handler)
}
func _ArtistInfoArtshow_CreateArtistIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(ArtistIndexInfo)
if err := dec(in); err != nil {
return nil, err
}
base := srv.(dubbo3.Dubbo3GrpcService)
args := []interface{}{}
args = append(args, in)
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("CreateArtistIndex", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
info := &grpc_go.UnaryServerInfo{
Server: srv,
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
return interceptor(ctx, in, info, handler)
}
func _ArtistInfoArtshow_BatchCreateArtistIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(BatchCreateArtistIndexRequest)
if err := dec(in); err != nil {
return nil, err
}
base := srv.(dubbo3.Dubbo3GrpcService)
args := []interface{}{}
args = append(args, in)
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("BatchCreateArtistIndex", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
info := &grpc_go.UnaryServerInfo{
Server: srv,
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
return interceptor(ctx, in, info, handler)
}
func _ArtistInfoArtshow_AuditArtistIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(AuditArtistIndexRequest)
if err := dec(in); err != nil {
return nil, err
}
base := srv.(dubbo3.Dubbo3GrpcService)
args := []interface{}{}
args = append(args, in)
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("AuditArtistIndex", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
info := &grpc_go.UnaryServerInfo{
Server: srv,
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
return interceptor(ctx, in, info, handler)
}
func _ArtistInfoArtshow_UpdateArtistIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateArtistIndexRequest)
if err := dec(in); err != nil {
return nil, err
}
base := srv.(dubbo3.Dubbo3GrpcService)
args := []interface{}{}
args = append(args, in)
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("UpdateArtistIndex", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
info := &grpc_go.UnaryServerInfo{
Server: srv,
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
}
return interceptor(ctx, in, info, handler)
}
func _ArtistInfoArtshow_DeletedArtistIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(DeletedArtistIndexRequest)
if err := dec(in); err != nil {
return nil, err
}
base := srv.(dubbo3.Dubbo3GrpcService)
args := []interface{}{}
args = append(args, in)
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
invo := invocation.NewRPCInvocation("DeletedArtistIndex", args, invAttachment)
if interceptor == nil {
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
return result, result.Error()
@ -386,6 +675,10 @@ var ArtistInfoArtshow_ServiceDesc = grpc_go.ServiceDesc{
ServiceName: "artistinfo.ArtistInfoArtshow",
HandlerType: (*ArtistInfoArtshowServer)(nil),
Methods: []grpc_go.MethodDesc{
{
MethodName: "GetArtshowVideoDetail",
Handler: _ArtistInfoArtshow_GetArtshowVideoDetail_Handler,
},
{
MethodName: "GetArtshowVideoList",
Handler: _ArtistInfoArtshow_GetArtshowVideoList_Handler,
@ -411,8 +704,32 @@ var ArtistInfoArtshow_ServiceDesc = grpc_go.ServiceDesc{
Handler: _ArtistInfoArtshow_DeletedArtshowVideo_Handler,
},
{
MethodName: "CheckeExists",
Handler: _ArtistInfoArtshow_CheckeExists_Handler,
MethodName: "GetArtistIndexDetail",
Handler: _ArtistInfoArtshow_GetArtistIndexDetail_Handler,
},
{
MethodName: "GetArtistIndexList",
Handler: _ArtistInfoArtshow_GetArtistIndexList_Handler,
},
{
MethodName: "CreateArtistIndex",
Handler: _ArtistInfoArtshow_CreateArtistIndex_Handler,
},
{
MethodName: "BatchCreateArtistIndex",
Handler: _ArtistInfoArtshow_BatchCreateArtistIndex_Handler,
},
{
MethodName: "AuditArtistIndex",
Handler: _ArtistInfoArtshow_AuditArtistIndex_Handler,
},
{
MethodName: "UpdateArtistIndex",
Handler: _ArtistInfoArtshow_UpdateArtistIndex_Handler,
},
{
MethodName: "DeletedArtistIndex",
Handler: _ArtistInfoArtshow_DeletedArtistIndex_Handler,
},
},
Streams: []grpc_go.StreamDesc{},

View File

@ -110,7 +110,8 @@ func migration() {
&old.ArtworkBatch{},
&model.TempArtistInfo{},
&model.ArtworkLockRecord{},
&model.ArtshowRecord{}, //画展视频记录
&model.ArtshowRecord{}, //画展视频记录
&model.ArtshowArtistIndex{}, //画展-画家指数
)
if err != nil {
fmt.Println("register table fail")