全部提交
This commit is contained in:
parent
0d373d7936
commit
b67ee2d265
BIN
build/artShowServerProd
Normal file
BIN
build/artShowServerProd
Normal file
Binary file not shown.
BIN
build/artShowServerTest
Normal file
BIN
build/artShowServerTest
Normal file
Binary file not shown.
@ -72,7 +72,7 @@ func (p *ArtShowProvider) DelShow(ctx context.Context, req *artShow.DelShowReq)
|
|||||||
err = service.DelArtShow(req)
|
err = service.DelArtShow(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
res.Msg = err.Error()
|
res.Msg = err.Error()
|
||||||
err = errors.New(m.ERROR_DELETE)
|
err = errors.New(err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
res.Msg = m.DELETE_SUCCESS
|
res.Msg = m.DELETE_SUCCESS
|
||||||
@ -113,7 +113,7 @@ func (p *ArtShowProvider) ShowListWithRel(ctx context.Context, req *artShow.Show
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *ArtShowProvider) ShowArtworkInfo(ctx context.Context, req *artShow.ShowDetailReq) (res *artShow.ShowArtworkDetailRes, err error) {
|
func (p *ArtShowProvider) ShowArtworkInfo(ctx context.Context, req *artShow.ArtworkDetailReq) (res *artShow.ShowArtworkDetailRes, err error) {
|
||||||
err, res = service.ShowArtworkInfo(req)
|
err, res = service.ShowArtworkInfo(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
res.Msg = err.Error()
|
res.Msg = err.Error()
|
||||||
@ -199,6 +199,11 @@ func (p *ArtShowProvider) ShowListForArtwork(ctx context.Context, req *artShow.S
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *ArtShowProvider) ArtworkPriceList(ctx context.Context, req *artShow.ShowDetailReq) (res *artShow.ArtworkPriceListRes, err error) {
|
func (p *ArtShowProvider) ArtworkPriceList(ctx context.Context, req *artShow.ShowDetailReq) (res *artShow.ArtworkPriceListRes, err error) {
|
||||||
|
if len(req.ShowUID) != 1 && req.ShowUID[len(req.ShowUID)-1] == "" {
|
||||||
|
res.Msg = err.Error()
|
||||||
|
err = errors.New(m.ERROR_QUERY)
|
||||||
|
return
|
||||||
|
}
|
||||||
res = new(artShow.ArtworkPriceListRes)
|
res = new(artShow.ArtworkPriceListRes)
|
||||||
err, res.Data = service.ArtworkPriceList(req)
|
err, res.Data = service.ArtworkPriceList(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -29,7 +29,7 @@ func SaveArtShow(tx *gorm.DB, artShow *model.ArtShow) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func UpdateArtShow(tx *gorm.DB, artShow *model.ArtShow) (err error) {
|
func UpdateArtShow(tx *gorm.DB, artShow *model.ArtShow) (err error) {
|
||||||
err = tx.Model(&model.ArtShow{}).Omit("show_uid").Where("show_uid = ?", artShow.ShowUID).Updates(artShow).Error
|
err = tx.Model(&model.ArtShow{}).Omit("show_uid,operator").Where("show_uid = ?", artShow.ShowUID).Updates(artShow).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
zap.L().Error("ArtShow err", zap.Error(err))
|
zap.L().Error("ArtShow err", zap.Error(err))
|
||||||
return
|
return
|
||||||
@ -38,12 +38,12 @@ func UpdateArtShow(tx *gorm.DB, artShow *model.ArtShow) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func ArtShowListWithRel(in *artShow.ShowListReq) (err error, total int64, out []*model.ArtShowRes) {
|
func ArtShowListWithRel(in *artShow.ShowListReq) (err error, total int64, out []*model.ArtShowRes) {
|
||||||
queryDB := db.DbArtShow.Table("art_show as a ").Distinct("a.id").
|
queryDB := db.DbArtShow.Table("art_show as a ").Omit("a.created_at").Distinct("a.id").
|
||||||
Select("a.show_uid, a.show_seq, a.show_name, a.artist_name, a.artist_uid, a.artwork_num, a.ruler, a.price, a.reward ,a.create_time, a.is_show, c.address ,c.show_time").
|
Select("a.show_uid, a.show_seq, a.show_name, a.artist_name, a.artist_uid, a.artwork_num, a.ruler, a.price, a.reward ,a.create_time, a.operator, a.is_show, c.address ,c.show_time, a.created_at").
|
||||||
Joins("left join artwork_price as b on a.show_uid = b.show_uid").
|
Joins("left join artwork_price as b on a.show_uid = b.show_uid").
|
||||||
Joins("left join show_rel as c on a.show_uid = c.show_uid ")
|
Joins("left join show_rel as c on a.show_uid = c.show_uid ")
|
||||||
countDB := db.DbArtShow.Table("art_show as a ").Distinct("a.id").
|
countDB := db.DbArtShow.Table("art_show as a ").Distinct("a.id").
|
||||||
Select("a.show_uid, a.show_seq, a.show_name, a.artist_name, a.artist_uid, a.artwork_num, a.ruler, a.price, a.reward , a.create_time, a.is_show, c.address ,c.show_time").
|
Select("a.show_uid, a.show_seq, a.show_name, a.artist_name, a.artist_uid, a.artwork_num, a.ruler, a.price, a.reward , a.create_time, a.operator, a.is_show, c.address ,c.show_time").
|
||||||
Joins("left join artwork_price as b on a.show_uid = b.show_uid").
|
Joins("left join artwork_price as b on a.show_uid = b.show_uid").
|
||||||
Joins("left join show_rel as c on a.show_uid = c.show_uid ")
|
Joins("left join show_rel as c on a.show_uid = c.show_uid ")
|
||||||
if in.ArtistName != "" {
|
if in.ArtistName != "" {
|
||||||
@ -80,7 +80,7 @@ func ArtShowListWithRel(in *artShow.ShowListReq) (err error, total int64, out []
|
|||||||
|
|
||||||
out = make([]*model.ArtShowRes, 0)
|
out = make([]*model.ArtShowRes, 0)
|
||||||
err = queryDB.Where("a.deleted_at is null and c.deleted_at is null").Offset(int((in.Page - 1) * in.PageSize)).
|
err = queryDB.Where("a.deleted_at is null and c.deleted_at is null").Offset(int((in.Page - 1) * in.PageSize)).
|
||||||
Limit(int(in.PageSize)).Find(&out).Error
|
Limit(int(in.PageSize)).Order("a.created_at desc ").Find(&out).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
zap.L().Error("ArtShowList Find err", zap.Error(err))
|
zap.L().Error("ArtShowList Find err", zap.Error(err))
|
||||||
return
|
return
|
||||||
@ -97,7 +97,7 @@ func ArtShowListWithRel(in *artShow.ShowListReq) (err error, total int64, out []
|
|||||||
|
|
||||||
func ArtShowList(in *artShow.ShowListReq) (err error, total int64, out []*model.ArtShowRes) {
|
func ArtShowList(in *artShow.ShowListReq) (err error, total int64, out []*model.ArtShowRes) {
|
||||||
queryDB := db.DbArtShow.Model(&model.ArtShow{}).
|
queryDB := db.DbArtShow.Model(&model.ArtShow{}).
|
||||||
Select("show_uid, show_seq, show_name, artist_name, artist_uid, artwork_num, ruler, price, create_time, is_show")
|
Select("show_uid, show_seq, show_name, artist_name, artist_uid, artwork_num, ruler, price, create_time, operator, is_show")
|
||||||
|
|
||||||
if in.IsShow != 0 {
|
if in.IsShow != 0 {
|
||||||
queryDB.Where(" is_show = ?", in.IsShow)
|
queryDB.Where(" is_show = ?", in.IsShow)
|
||||||
@ -156,11 +156,12 @@ func DelArtShow(tx *gorm.DB, show_uid string) (err error) {
|
|||||||
zap.L().Error("ArtShow delete err", zap.Error(err))
|
zap.L().Error("ArtShow delete err", zap.Error(err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func QueryArtShow(show_uid string) (err error, out *model.ArtShowRes) {
|
func QueryArtShow(show_uid []string) (err error, out []*model.ArtShowRes) {
|
||||||
err = db.DbArtShow.Table("art_show as a ").Select("a.show_uid, a.show_seq, a.show_name, a.artist_name, a.artist_uid, a.artwork_num, a.ruler, a.price, a.create_time, a.is_show, b.address ,b.show_time").Joins("left join show_rel as b on a.show_uid = b.show_uid").Where("a.show_uid = ?", show_uid).Find(&out).Error
|
out = make([]*model.ArtShowRes, 0)
|
||||||
|
err = db.DbArtShow.Table("art_show as a ").Select("a.show_uid, a.show_seq, a.show_name, a.artist_name, a.artist_uid, a.artwork_num, a.ruler, a.price, a.create_time, a.operator a.is_show, b.address ,b.show_time").Joins("left join show_rel as b on a.show_uid = b.show_uid").Where("a.show_uid in ?", show_uid).Find(&out).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
zap.L().Error("ArtShow Find err", zap.Error(err))
|
zap.L().Error("ArtShow Find err", zap.Error(err))
|
||||||
return
|
return
|
||||||
|
@ -11,6 +11,7 @@ import (
|
|||||||
func SaveShowRels(tx *gorm.DB, showRels []*model.ShowRel) (err error, out []string) {
|
func SaveShowRels(tx *gorm.DB, showRels []*model.ShowRel) (err error, out []string) {
|
||||||
out = make([]string, 0)
|
out = make([]string, 0)
|
||||||
for i := 0; i < len(showRels); i++ {
|
for i := 0; i < len(showRels); i++ {
|
||||||
|
if showRels[i].ShowRelUID == "" {
|
||||||
uid, err := uuid.NewV4()
|
uid, err := uuid.NewV4()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err, out
|
return err, out
|
||||||
@ -21,6 +22,13 @@ func SaveShowRels(tx *gorm.DB, showRels []*model.ShowRel) (err error, out []stri
|
|||||||
zap.L().Error("ShowRels save err", zap.Error(err))
|
zap.L().Error("ShowRels save err", zap.Error(err))
|
||||||
return err, nil
|
return err, nil
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
err = tx.Model(&model.ShowRel{}).Where("show_uid = ? and apply_uid = ?", showRels[i].ShowUID, showRels[i].ApplyUID).First(&showRels[i]).Error
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("ShowRels updates err", zap.Error(err))
|
||||||
|
return err, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
out = append(out, showRels[i].ApplyUID)
|
out = append(out, showRels[i].ApplyUID)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@ -93,3 +101,20 @@ func QueryShowRelList(applyUID string) (err error, out []*model.ShowRel) {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func QueryShowRel(applyUID, showUID string) (err error, out *model.ShowRel) {
|
||||||
|
out = new(model.ShowRel)
|
||||||
|
findDB := db.DbArtShow.Model(&model.ShowRel{})
|
||||||
|
if showUID != "" {
|
||||||
|
findDB = findDB.Where("show_uid = ? ", showUID)
|
||||||
|
}
|
||||||
|
if applyUID != "" {
|
||||||
|
findDB = findDB.Where("apply_uid = ? ", applyUID)
|
||||||
|
}
|
||||||
|
err = findDB.Find(&out).Error
|
||||||
|
if err != nil {
|
||||||
|
zap.L().Error("QueryShowRel err", zap.Error(err))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -15,6 +15,7 @@ type ArtShow struct {
|
|||||||
Price int64 `json:"price" gorm:"price"` // 画展包价格
|
Price int64 `json:"price" gorm:"price"` // 画展包价格
|
||||||
Reward int64 `json:"reward" gorm:"reward"` // 润格
|
Reward int64 `json:"reward" gorm:"reward"` // 润格
|
||||||
CreateTime string `json:"create_time" gorm:"create_time"` // 创建时间
|
CreateTime string `json:"create_time" gorm:"create_time"` // 创建时间
|
||||||
|
Operator string `json:"operator" gorm:"operator"` // 操作人
|
||||||
IsShow int8 `json:"is_show" gorm:"is_show"` // 是否出展 1,内部(default) 2,可展 3,已展
|
IsShow int8 `json:"is_show" gorm:"is_show"` // 是否出展 1,内部(default) 2,可展 3,已展
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,6 +30,7 @@ type ArtShowRes struct {
|
|||||||
Price int64 `json:"price" gorm:"price"` // 画展包价格
|
Price int64 `json:"price" gorm:"price"` // 画展包价格
|
||||||
Reward int64 `json:"reward" gorm:"reward"` // 润格
|
Reward int64 `json:"reward" gorm:"reward"` // 润格
|
||||||
CreateTime string `json:"create_time" gorm:"create_time"` // 创建时间
|
CreateTime string `json:"create_time" gorm:"create_time"` // 创建时间
|
||||||
|
Operator string `json:"operator" gorm:"operator"` // 操作人
|
||||||
IsShow int8 `json:"is_show" gorm:"is_show"` // 是否出展 1,内部(default) 2,可展 3,已展
|
IsShow int8 `json:"is_show" gorm:"is_show"` // 是否出展 1,内部(default) 2,可展 3,已展
|
||||||
|
|
||||||
Address string `json:"address" gorm:"address"` // 地点
|
Address string `json:"address" gorm:"address"` // 地点
|
||||||
|
@ -2,6 +2,7 @@ package service
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"fonchain-artshow/cmd/dao"
|
"fonchain-artshow/cmd/dao"
|
||||||
"fonchain-artshow/cmd/model"
|
"fonchain-artshow/cmd/model"
|
||||||
"fonchain-artshow/pb/artShow"
|
"fonchain-artshow/pb/artShow"
|
||||||
@ -52,6 +53,8 @@ func UpdateArtShowWithArtworkPrice(in *artShow.SaveShowReq) (err error, showUID
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
fmt.Println("artworkPrices ==== ", artworkPrices)
|
||||||
|
|
||||||
if len(artworkPrices) > 0 {
|
if len(artworkPrices) > 0 {
|
||||||
artworks = append(artworks, artworkPrices...)
|
artworks = append(artworks, artworkPrices...)
|
||||||
}
|
}
|
||||||
@ -112,10 +115,13 @@ func UpdateArtShowWithArtworkPrice(in *artShow.SaveShowReq) (err error, showUID
|
|||||||
|
|
||||||
// 删除画展包
|
// 删除画展包
|
||||||
func DelArtShow(in *artShow.DelShowReq) (err error) {
|
func DelArtShow(in *artShow.DelShowReq) (err error) {
|
||||||
|
queryShowErr, shows := dao.QueryArtShow(in.ShowUID)
|
||||||
|
if queryShowErr != nil {
|
||||||
|
return queryShowErr
|
||||||
|
}
|
||||||
tx := db.DbArtShow.Begin()
|
tx := db.DbArtShow.Begin()
|
||||||
for i := 0; i < len(in.ShowUID); i++ {
|
for i := 0; i < len(shows); i++ {
|
||||||
queryShowRelErr, show_rel := dao.QueryShowRel_showUID(in.ShowUID[i])
|
if shows[i].IsShow != m.ARTSHOW_SHOWING {
|
||||||
if queryShowRelErr == nil && show_rel.ID == 0 {
|
|
||||||
delArtShowErr := dao.DelArtShow(tx, in.ShowUID[i])
|
delArtShowErr := dao.DelArtShow(tx, in.ShowUID[i])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
tx.Rollback()
|
tx.Rollback()
|
||||||
@ -126,11 +132,10 @@ func DelArtShow(in *artShow.DelShowReq) (err error) {
|
|||||||
tx.Rollback()
|
tx.Rollback()
|
||||||
return delArtworkPriceErr
|
return delArtworkPriceErr
|
||||||
}
|
}
|
||||||
} else if show_rel.ShowUID != "" {
|
} else {
|
||||||
tx.Rollback()
|
tx.Rollback()
|
||||||
return errors.New("存在画展包被使用,无法删除")
|
return errors.New("存在画展包被使用,无法删除")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
err = tx.Commit().Error
|
err = tx.Commit().Error
|
||||||
return
|
return
|
||||||
@ -169,7 +174,7 @@ func ArtShowListWithRel(in *artShow.ShowListReq) (err error, out *artShow.ShowLi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 画展包关联画作信息
|
// 画展包关联画作信息
|
||||||
func ShowArtworkInfo(in *artShow.ShowDetailReq) (err error, out *artShow.ShowArtworkDetailRes) {
|
func ShowArtworkInfo(in *artShow.ArtworkDetailReq) (err error, out *artShow.ShowArtworkDetailRes) {
|
||||||
out = new(artShow.ShowArtworkDetailRes)
|
out = new(artShow.ShowArtworkDetailRes)
|
||||||
artworkPriceS := make([]*model.ArtworkPrice, 0)
|
artworkPriceS := make([]*model.ArtworkPrice, 0)
|
||||||
err, artworkPriceS = dao.ArtworkPriceList(in.ShowUID)
|
err, artworkPriceS = dao.ArtworkPriceList(in.ShowUID)
|
||||||
@ -183,12 +188,12 @@ func ShowArtworkInfo(in *artShow.ShowDetailReq) (err error, out *artShow.ShowArt
|
|||||||
// 画展包详情
|
// 画展包详情
|
||||||
func ShowDetail(in *artShow.ShowDetailReq) (err error, out *artShow.ShowDetailRes) {
|
func ShowDetail(in *artShow.ShowDetailReq) (err error, out *artShow.ShowDetailRes) {
|
||||||
out = new(artShow.ShowDetailRes)
|
out = new(artShow.ShowDetailRes)
|
||||||
show := new(model.ArtShowRes)
|
shows := make([]*model.ArtShowRes, 0)
|
||||||
err, show = dao.QueryArtShow(in.ShowUID)
|
err, shows = dao.QueryArtShow(in.ShowUID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
out.Data = serializer.BuildArtShowRpc(show)
|
out.Data = serializer.BuildArtShowListRes(shows)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,9 +37,17 @@ func UpdateShowApplyWithShowRel(in *artShow.SaveApplyReq) (err error, applyUID s
|
|||||||
newShowRelS := serializer.BuildShowRelM(in.Rel, showApply.ApplyUID)
|
newShowRelS := serializer.BuildShowRelM(in.Rel, showApply.ApplyUID)
|
||||||
for i := 0; i < len(newShowRelS); i++ {
|
for i := 0; i < len(newShowRelS); i++ {
|
||||||
log.Printf("%+v\n", newShowRelS[i])
|
log.Printf("%+v\n", newShowRelS[i])
|
||||||
|
err, showRel := dao.QueryShowRel(newShowRelS[i].ApplyUID, newShowRelS[i].ShowUID)
|
||||||
|
if err != nil {
|
||||||
|
tx.Rollback()
|
||||||
|
return err, showApply.ApplyUID
|
||||||
|
}
|
||||||
|
if showRel.ShowRelUID != "" {
|
||||||
|
newShowRelS[i].ShowRelUID = showRel.ShowRelUID
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err, _ := dao.SaveShowRels(tx, newShowRelS)
|
err, _ = dao.SaveShowRels(tx, newShowRelS)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
tx.Rollback()
|
tx.Rollback()
|
||||||
return err, showApply.ApplyUID
|
return err, showApply.ApplyUID
|
||||||
|
@ -19,7 +19,7 @@ func ArtworkPriceInfo(in *artShow.ArtworkPriceReq) (err error, artworkPriceRes *
|
|||||||
func ArtworkPriceList(in *artShow.ShowDetailReq) (err error, artworkPriceList []*artShow.ArtworkPriceDetail) {
|
func ArtworkPriceList(in *artShow.ShowDetailReq) (err error, artworkPriceList []*artShow.ArtworkPriceDetail) {
|
||||||
list := make([]*model.ArtworkPrice, 0)
|
list := make([]*model.ArtworkPrice, 0)
|
||||||
artworkPriceList = make([]*artShow.ArtworkPriceDetail, 0)
|
artworkPriceList = make([]*artShow.ArtworkPriceDetail, 0)
|
||||||
err, list = dao.ArtworkPriceList(in.ShowUID)
|
err, list = dao.ArtworkPriceList(in.ShowUID[len(in.ShowUID)-1])
|
||||||
if len(list) > 0 {
|
if len(list) > 0 {
|
||||||
artworkPriceList = serializer.BuildShowArtworkListRpc(list)
|
artworkPriceList = serializer.BuildShowArtworkListRpc(list)
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[system]
|
[system]
|
||||||
;mode = prod #正式prod #测试dev
|
;mode = prod #正式prod #测试dev
|
||||||
mode = dev #正式prod #测试dev
|
mode = prod #正式prod #测试dev
|
||||||
|
|
||||||
;本地测试
|
;本地测试
|
||||||
;[mysql]
|
;[mysql]
|
||||||
@ -12,13 +12,13 @@ mode = dev #正式prod #测试dev
|
|||||||
;DbName = art_show
|
;DbName = art_show
|
||||||
|
|
||||||
;正式服
|
;正式服
|
||||||
;[mysql]
|
[mysql]
|
||||||
;Db = mysql
|
Db = mysql
|
||||||
;DbHost = mysql
|
DbHost = mysql
|
||||||
;DbPort = 3306
|
DbPort = 3306
|
||||||
;DbUser = root
|
DbUser = root
|
||||||
;DbPassWord = sLl0b7stlbwvZ883TV
|
DbPassWord = sLl0b7stlbwvZ883TV
|
||||||
;DbName = art_show
|
DbName = art_show
|
||||||
|
|
||||||
;188
|
;188
|
||||||
;[mysql]
|
;[mysql]
|
||||||
@ -30,13 +30,13 @@ mode = dev #正式prod #测试dev
|
|||||||
;DbName = art_show
|
;DbName = art_show
|
||||||
|
|
||||||
;214
|
;214
|
||||||
[mysql]
|
;[mysql]
|
||||||
Db = mysql
|
;Db = mysql
|
||||||
DbHost = 172.16.100.99 #214
|
;DbHost = 172.16.100.99 #214
|
||||||
DbPort = 9007
|
;DbPort = 9007
|
||||||
DbUser = artuser
|
;DbUser = artuser
|
||||||
DbPassWord = "C250PflXIWv2SQm8"
|
;DbPassWord = "C250PflXIWv2SQm8"
|
||||||
DbName = art_show
|
;DbName = art_show
|
||||||
|
|
||||||
;[mysql]
|
;[mysql]
|
||||||
;Db = mysql
|
;Db = mysql
|
||||||
|
@ -3,8 +3,8 @@ dubbo:
|
|||||||
demoZK:
|
demoZK:
|
||||||
protocol: zookeeper
|
protocol: zookeeper
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
# address: zookeeper:2181 # 正式服务
|
address: zookeeper:2181 # 正式服务
|
||||||
address: 127.0.0.1:2181 # 测试服务
|
# address: 127.0.0.1:2181 # 测试服务
|
||||||
protocols:
|
protocols:
|
||||||
triple: #triple
|
triple: #triple
|
||||||
name: tri
|
name: tri
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -34,7 +34,7 @@ type ArtShowClient interface {
|
|||||||
ShowList(ctx context.Context, in *ShowListReq, opts ...grpc_go.CallOption) (*ShowListRes, common.ErrorWithAttachment)
|
ShowList(ctx context.Context, in *ShowListReq, opts ...grpc_go.CallOption) (*ShowListRes, common.ErrorWithAttachment)
|
||||||
ShowListWithRel(ctx context.Context, in *ShowListReq, opts ...grpc_go.CallOption) (*ShowListRes, common.ErrorWithAttachment)
|
ShowListWithRel(ctx context.Context, in *ShowListReq, opts ...grpc_go.CallOption) (*ShowListRes, common.ErrorWithAttachment)
|
||||||
ShowListForArtwork(ctx context.Context, in *ShowListForArtworkReq, opts ...grpc_go.CallOption) (*ShowListForArtworkRes, common.ErrorWithAttachment)
|
ShowListForArtwork(ctx context.Context, in *ShowListForArtworkReq, opts ...grpc_go.CallOption) (*ShowListForArtworkRes, common.ErrorWithAttachment)
|
||||||
ShowArtworkInfo(ctx context.Context, in *ShowDetailReq, opts ...grpc_go.CallOption) (*ShowArtworkDetailRes, common.ErrorWithAttachment)
|
ShowArtworkInfo(ctx context.Context, in *ArtworkDetailReq, opts ...grpc_go.CallOption) (*ShowArtworkDetailRes, common.ErrorWithAttachment)
|
||||||
ShowDetail(ctx context.Context, in *ShowDetailReq, opts ...grpc_go.CallOption) (*ShowDetailRes, common.ErrorWithAttachment)
|
ShowDetail(ctx context.Context, in *ShowDetailReq, opts ...grpc_go.CallOption) (*ShowDetailRes, common.ErrorWithAttachment)
|
||||||
ShowStatisticalInfo(ctx context.Context, in *ShowStatisticalInfoReq, opts ...grpc_go.CallOption) (*ShowStatisticalInfoRes, common.ErrorWithAttachment)
|
ShowStatisticalInfo(ctx context.Context, in *ShowStatisticalInfoReq, opts ...grpc_go.CallOption) (*ShowStatisticalInfoRes, common.ErrorWithAttachment)
|
||||||
ArtworkPrice(ctx context.Context, in *ArtworkPriceReq, opts ...grpc_go.CallOption) (*ArtworkPriceRes, common.ErrorWithAttachment)
|
ArtworkPrice(ctx context.Context, in *ArtworkPriceReq, opts ...grpc_go.CallOption) (*ArtworkPriceRes, common.ErrorWithAttachment)
|
||||||
@ -59,7 +59,7 @@ type ArtShowClientImpl struct {
|
|||||||
ShowList func(ctx context.Context, in *ShowListReq) (*ShowListRes, error)
|
ShowList func(ctx context.Context, in *ShowListReq) (*ShowListRes, error)
|
||||||
ShowListWithRel func(ctx context.Context, in *ShowListReq) (*ShowListRes, error)
|
ShowListWithRel func(ctx context.Context, in *ShowListReq) (*ShowListRes, error)
|
||||||
ShowListForArtwork func(ctx context.Context, in *ShowListForArtworkReq) (*ShowListForArtworkRes, error)
|
ShowListForArtwork func(ctx context.Context, in *ShowListForArtworkReq) (*ShowListForArtworkRes, error)
|
||||||
ShowArtworkInfo func(ctx context.Context, in *ShowDetailReq) (*ShowArtworkDetailRes, error)
|
ShowArtworkInfo func(ctx context.Context, in *ArtworkDetailReq) (*ShowArtworkDetailRes, error)
|
||||||
ShowDetail func(ctx context.Context, in *ShowDetailReq) (*ShowDetailRes, error)
|
ShowDetail func(ctx context.Context, in *ShowDetailReq) (*ShowDetailRes, error)
|
||||||
ShowStatisticalInfo func(ctx context.Context, in *ShowStatisticalInfoReq) (*ShowStatisticalInfoRes, error)
|
ShowStatisticalInfo func(ctx context.Context, in *ShowStatisticalInfoReq) (*ShowStatisticalInfoRes, error)
|
||||||
ArtworkPrice func(ctx context.Context, in *ArtworkPriceReq) (*ArtworkPriceRes, error)
|
ArtworkPrice func(ctx context.Context, in *ArtworkPriceReq) (*ArtworkPriceRes, error)
|
||||||
@ -121,7 +121,7 @@ func (c *artShowClient) ShowListForArtwork(ctx context.Context, in *ShowListForA
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ShowListForArtwork", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ShowListForArtwork", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *artShowClient) ShowArtworkInfo(ctx context.Context, in *ShowDetailReq, opts ...grpc_go.CallOption) (*ShowArtworkDetailRes, common.ErrorWithAttachment) {
|
func (c *artShowClient) ShowArtworkInfo(ctx context.Context, in *ArtworkDetailReq, opts ...grpc_go.CallOption) (*ShowArtworkDetailRes, common.ErrorWithAttachment) {
|
||||||
out := new(ShowArtworkDetailRes)
|
out := new(ShowArtworkDetailRes)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ShowArtworkInfo", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ShowArtworkInfo", in, out)
|
||||||
@ -203,7 +203,7 @@ type ArtShowServer interface {
|
|||||||
ShowList(context.Context, *ShowListReq) (*ShowListRes, error)
|
ShowList(context.Context, *ShowListReq) (*ShowListRes, error)
|
||||||
ShowListWithRel(context.Context, *ShowListReq) (*ShowListRes, error)
|
ShowListWithRel(context.Context, *ShowListReq) (*ShowListRes, error)
|
||||||
ShowListForArtwork(context.Context, *ShowListForArtworkReq) (*ShowListForArtworkRes, error)
|
ShowListForArtwork(context.Context, *ShowListForArtworkReq) (*ShowListForArtworkRes, error)
|
||||||
ShowArtworkInfo(context.Context, *ShowDetailReq) (*ShowArtworkDetailRes, error)
|
ShowArtworkInfo(context.Context, *ArtworkDetailReq) (*ShowArtworkDetailRes, error)
|
||||||
ShowDetail(context.Context, *ShowDetailReq) (*ShowDetailRes, error)
|
ShowDetail(context.Context, *ShowDetailReq) (*ShowDetailRes, error)
|
||||||
ShowStatisticalInfo(context.Context, *ShowStatisticalInfoReq) (*ShowStatisticalInfoRes, error)
|
ShowStatisticalInfo(context.Context, *ShowStatisticalInfoReq) (*ShowStatisticalInfoRes, error)
|
||||||
ArtworkPrice(context.Context, *ArtworkPriceReq) (*ArtworkPriceRes, error)
|
ArtworkPrice(context.Context, *ArtworkPriceReq) (*ArtworkPriceRes, error)
|
||||||
@ -241,7 +241,7 @@ func (UnimplementedArtShowServer) ShowListWithRel(context.Context, *ShowListReq)
|
|||||||
func (UnimplementedArtShowServer) ShowListForArtwork(context.Context, *ShowListForArtworkReq) (*ShowListForArtworkRes, error) {
|
func (UnimplementedArtShowServer) ShowListForArtwork(context.Context, *ShowListForArtworkReq) (*ShowListForArtworkRes, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method ShowListForArtwork not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method ShowListForArtwork not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedArtShowServer) ShowArtworkInfo(context.Context, *ShowDetailReq) (*ShowArtworkDetailRes, error) {
|
func (UnimplementedArtShowServer) ShowArtworkInfo(context.Context, *ArtworkDetailReq) (*ShowArtworkDetailRes, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method ShowArtworkInfo not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method ShowArtworkInfo not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedArtShowServer) ShowDetail(context.Context, *ShowDetailReq) (*ShowDetailRes, error) {
|
func (UnimplementedArtShowServer) ShowDetail(context.Context, *ShowDetailReq) (*ShowDetailRes, error) {
|
||||||
@ -480,7 +480,7 @@ func _ArtShow_ShowListForArtwork_Handler(srv interface{}, ctx context.Context, d
|
|||||||
}
|
}
|
||||||
|
|
||||||
func _ArtShow_ShowArtworkInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _ArtShow_ShowArtworkInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(ShowDetailReq)
|
in := new(ArtworkDetailReq)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ service ArtShow {
|
|||||||
rpc ShowList (ShowListReq) returns (ShowListRes) {} // 画展包列表展示 不携带 画展时间 画展地址
|
rpc ShowList (ShowListReq) returns (ShowListRes) {} // 画展包列表展示 不携带 画展时间 画展地址
|
||||||
rpc ShowListWithRel (ShowListReq) returns (ShowListRes) {} // 画展包列表展示 携带 画展时间 画展地址
|
rpc ShowListWithRel (ShowListReq) returns (ShowListRes) {} // 画展包列表展示 携带 画展时间 画展地址
|
||||||
rpc ShowListForArtwork (ShowListForArtworkReq) returns (ShowListForArtworkRes) {} // 画展包列表展示 画作使用
|
rpc ShowListForArtwork (ShowListForArtworkReq) returns (ShowListForArtworkRes) {} // 画展包列表展示 画作使用
|
||||||
rpc ShowArtworkInfo (ShowDetailReq) returns (ShowArtworkDetailRes) {} // 画展包画作展示
|
rpc ShowArtworkInfo (ArtworkDetailReq) returns (ShowArtworkDetailRes) {} // 画展包画作展示
|
||||||
rpc ShowDetail (ShowDetailReq) returns (ShowDetailRes) {} // 画展包展示
|
rpc ShowDetail (ShowDetailReq) returns (ShowDetailRes) {} // 画展包展示
|
||||||
rpc ShowStatisticalInfo (ShowStatisticalInfoReq) returns (ShowStatisticalInfoRes) {} // 画展统计(画作数量、画家数量)
|
rpc ShowStatisticalInfo (ShowStatisticalInfoReq) returns (ShowStatisticalInfoRes) {} // 画展统计(画作数量、画家数量)
|
||||||
rpc ArtworkPrice (ArtworkPriceReq) returns (ArtworkPriceRes) {} // 画作价格
|
rpc ArtworkPrice (ArtworkPriceReq) returns (ArtworkPriceRes) {} // 画作价格
|
||||||
@ -25,6 +25,7 @@ service ArtShow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 创建 更新画展包
|
// 创建 更新画展包
|
||||||
|
|
||||||
message SaveShowReq {
|
message SaveShowReq {
|
||||||
string ShowName = 1 [json_name = "show_name"];
|
string ShowName = 1 [json_name = "show_name"];
|
||||||
string ArtistName = 2 [json_name = "artist_name"];
|
string ArtistName = 2 [json_name = "artist_name"];
|
||||||
@ -35,11 +36,12 @@ message SaveShowReq {
|
|||||||
int64 Reward = 7 [json_name = "reward"];
|
int64 Reward = 7 [json_name = "reward"];
|
||||||
int32 IsShow = 8 [json_name = "is_show"];
|
int32 IsShow = 8 [json_name = "is_show"];
|
||||||
string CreateTime = 9 [json_name = "create_time"];
|
string CreateTime = 9 [json_name = "create_time"];
|
||||||
|
string Operator = 10 [json_name = "operator"];
|
||||||
|
|
||||||
string ShowUID = 10 [json_name = "id"];
|
string ShowUID = 11 [json_name = "id"];
|
||||||
|
|
||||||
repeated ArtworkDetail Artwork = 11 [json_name = "show_artwork"];
|
repeated ArtworkDetail Artwork = 12 [json_name = "show_artwork"];
|
||||||
repeated DelArtworkDetail DelArtwork = 12 [json_name = "del_show_artwork"];
|
repeated DelArtworkDetail DelArtwork = 13 [json_name = "del_show_artwork"];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,6 +56,10 @@ message CommonRes {
|
|||||||
|
|
||||||
// 画展包详情
|
// 画展包详情
|
||||||
message ShowDetailReq {
|
message ShowDetailReq {
|
||||||
|
repeated string ShowUID = 1 [json_name = "show_uid"];
|
||||||
|
}
|
||||||
|
|
||||||
|
message ArtworkDetailReq {
|
||||||
string ShowUID = 1 [json_name = "show_uid"];
|
string ShowUID = 1 [json_name = "show_uid"];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,14 +74,15 @@ message ShowDetail {
|
|||||||
int64 Price = 8 [json_name = "price"];
|
int64 Price = 8 [json_name = "price"];
|
||||||
int64 Reward = 9 [json_name = "reward"];
|
int64 Reward = 9 [json_name = "reward"];
|
||||||
string CreateTime = 10 [json_name = "create_time"];
|
string CreateTime = 10 [json_name = "create_time"];
|
||||||
int32 IsShow = 11 [json_name = "is_show"];
|
string Operator = 11 [json_name = "operator"];
|
||||||
|
int32 IsShow = 12 [json_name = "is_show"];
|
||||||
|
|
||||||
string ShowTime = 12 [json_name = "show_time"];
|
string ShowTime = 13 [json_name = "show_time"];
|
||||||
string Address = 13 [json_name = "address"];
|
string Address = 14 [json_name = "address"];
|
||||||
}
|
}
|
||||||
|
|
||||||
message ShowDetailRes {
|
message ShowDetailRes {
|
||||||
ShowDetail Data = 1 [json_name = "data"];
|
repeated ShowDetail Data = 1 [json_name = "data"];
|
||||||
string Msg = 2 [json_name = "msg"];
|
string Msg = 2 [json_name = "msg"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
718
pb/grpc/artshow_grpc.pb.go
Normal file
718
pb/grpc/artshow_grpc.pb.go
Normal file
@ -0,0 +1,718 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.2.0
|
||||||
|
// - protoc v3.10.1
|
||||||
|
// source: pb/artshow.proto
|
||||||
|
|
||||||
|
package grpc
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
"fonchain-artshow/pb/artShow"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
// Requires gRPC-Go v1.32.0 or later.
|
||||||
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
|
// ArtShowClient is the client API for ArtShow service.
|
||||||
|
//
|
||||||
|
// 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 ArtShowClient interface {
|
||||||
|
CreateShow(ctx context.Context, in *artShow.SaveShowReq, opts ...grpc.CallOption) (*artShow.SaveShowRes, error)
|
||||||
|
UpdateShow(ctx context.Context, in *artShow.SaveShowReq, opts ...grpc.CallOption) (*artShow.SaveShowRes, error)
|
||||||
|
DelShow(ctx context.Context, in *artShow.DelShowReq, opts ...grpc.CallOption) (*artShow.CommonRes, error)
|
||||||
|
ShowList(ctx context.Context, in *artShow.ShowListReq, opts ...grpc.CallOption) (*artShow.ShowListRes, error)
|
||||||
|
ShowListWithRel(ctx context.Context, in *artShow.ShowListReq, opts ...grpc.CallOption) (*artShow.ShowListRes, error)
|
||||||
|
ShowListForArtwork(ctx context.Context, in *artShow.ShowListForArtworkReq, opts ...grpc.CallOption) (*artShow.ShowListForArtworkRes, error)
|
||||||
|
ShowArtworkInfo(ctx context.Context, in *artShow.ArtworkDetailReq, opts ...grpc.CallOption) (*artShow.ShowArtworkDetailRes, error)
|
||||||
|
ShowDetail(ctx context.Context, in *artShow.ShowDetailReq, opts ...grpc.CallOption) (*artShow.ShowDetailRes, error)
|
||||||
|
ShowStatisticalInfo(ctx context.Context, in *artShow.ShowStatisticalInfoReq, opts ...grpc.CallOption) (*artShow.ShowStatisticalInfoRes, error)
|
||||||
|
ArtworkPrice(ctx context.Context, in *artShow.ArtworkPriceReq, opts ...grpc.CallOption) (*artShow.ArtworkPriceRes, error)
|
||||||
|
CreateApply(ctx context.Context, in *artShow.SaveApplyReq, opts ...grpc.CallOption) (*artShow.SaveApplyRes, error)
|
||||||
|
UpdateApply(ctx context.Context, in *artShow.SaveApplyReq, opts ...grpc.CallOption) (*artShow.SaveApplyRes, error)
|
||||||
|
DelApply(ctx context.Context, in *artShow.DelApplyReq, opts ...grpc.CallOption) (*artShow.CommonRes, error)
|
||||||
|
ShowListWithApply(ctx context.Context, in *artShow.ShowListReq, opts ...grpc.CallOption) (*artShow.ShowListRes, error)
|
||||||
|
UpdateApplyStatus(ctx context.Context, in *artShow.UpdateApplyStatusReq, opts ...grpc.CallOption) (*artShow.CommonRes, error)
|
||||||
|
ApplyList(ctx context.Context, in *artShow.ApplyListReq, opts ...grpc.CallOption) (*artShow.ApplyListRes, error)
|
||||||
|
ApplyDetail(ctx context.Context, in *artShow.ApplyShowReq, opts ...grpc.CallOption) (*artShow.ApplyShowRes, error)
|
||||||
|
ArtworkPriceList(ctx context.Context, in *artShow.ShowDetailReq, opts ...grpc.CallOption) (*artShow.ArtworkPriceListRes, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type artShowClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewArtShowClient(cc grpc.ClientConnInterface) ArtShowClient {
|
||||||
|
return &artShowClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) CreateShow(ctx context.Context, in *artShow.SaveShowReq, opts ...grpc.CallOption) (*artShow.SaveShowRes, error) {
|
||||||
|
out := new(artShow.SaveShowRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/CreateShow", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) UpdateShow(ctx context.Context, in *artShow.SaveShowReq, opts ...grpc.CallOption) (*artShow.SaveShowRes, error) {
|
||||||
|
out := new(artShow.SaveShowRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/UpdateShow", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) DelShow(ctx context.Context, in *artShow.DelShowReq, opts ...grpc.CallOption) (*artShow.CommonRes, error) {
|
||||||
|
out := new(artShow.CommonRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/DelShow", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) ShowList(ctx context.Context, in *artShow.ShowListReq, opts ...grpc.CallOption) (*artShow.ShowListRes, error) {
|
||||||
|
out := new(artShow.ShowListRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/ShowList", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) ShowListWithRel(ctx context.Context, in *artShow.ShowListReq, opts ...grpc.CallOption) (*artShow.ShowListRes, error) {
|
||||||
|
out := new(artShow.ShowListRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/ShowListWithRel", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) ShowListForArtwork(ctx context.Context, in *artShow.ShowListForArtworkReq, opts ...grpc.CallOption) (*artShow.ShowListForArtworkRes, error) {
|
||||||
|
out := new(artShow.ShowListForArtworkRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/ShowListForArtwork", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) ShowArtworkInfo(ctx context.Context, in *artShow.ArtworkDetailReq, opts ...grpc.CallOption) (*artShow.ShowArtworkDetailRes, error) {
|
||||||
|
out := new(artShow.ShowArtworkDetailRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/ShowArtworkInfo", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) ShowDetail(ctx context.Context, in *artShow.ShowDetailReq, opts ...grpc.CallOption) (*artShow.ShowDetailRes, error) {
|
||||||
|
out := new(artShow.ShowDetailRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/ShowDetail", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) ShowStatisticalInfo(ctx context.Context, in *artShow.ShowStatisticalInfoReq, opts ...grpc.CallOption) (*artShow.ShowStatisticalInfoRes, error) {
|
||||||
|
out := new(artShow.ShowStatisticalInfoRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/ShowStatisticalInfo", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) ArtworkPrice(ctx context.Context, in *artShow.ArtworkPriceReq, opts ...grpc.CallOption) (*artShow.ArtworkPriceRes, error) {
|
||||||
|
out := new(artShow.ArtworkPriceRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/ArtworkPrice", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) CreateApply(ctx context.Context, in *artShow.SaveApplyReq, opts ...grpc.CallOption) (*artShow.SaveApplyRes, error) {
|
||||||
|
out := new(artShow.SaveApplyRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/CreateApply", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) UpdateApply(ctx context.Context, in *artShow.SaveApplyReq, opts ...grpc.CallOption) (*artShow.SaveApplyRes, error) {
|
||||||
|
out := new(artShow.SaveApplyRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/UpdateApply", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) DelApply(ctx context.Context, in *artShow.DelApplyReq, opts ...grpc.CallOption) (*artShow.CommonRes, error) {
|
||||||
|
out := new(artShow.CommonRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/DelApply", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) ShowListWithApply(ctx context.Context, in *artShow.ShowListReq, opts ...grpc.CallOption) (*artShow.ShowListRes, error) {
|
||||||
|
out := new(artShow.ShowListRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/ShowListWithApply", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) UpdateApplyStatus(ctx context.Context, in *artShow.UpdateApplyStatusReq, opts ...grpc.CallOption) (*artShow.CommonRes, error) {
|
||||||
|
out := new(artShow.CommonRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/UpdateApplyStatus", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) ApplyList(ctx context.Context, in *artShow.ApplyListReq, opts ...grpc.CallOption) (*artShow.ApplyListRes, error) {
|
||||||
|
out := new(artShow.ApplyListRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/ApplyList", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) ApplyDetail(ctx context.Context, in *artShow.ApplyShowReq, opts ...grpc.CallOption) (*artShow.ApplyShowRes, error) {
|
||||||
|
out := new(artShow.ApplyShowRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/ApplyDetail", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *artShowClient) ArtworkPriceList(ctx context.Context, in *artShow.ShowDetailReq, opts ...grpc.CallOption) (*artShow.ArtworkPriceListRes, error) {
|
||||||
|
out := new(artShow.ArtworkPriceListRes)
|
||||||
|
err := c.cc.Invoke(ctx, "/ArtShow.ArtShow/ArtworkPriceList", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ArtShowServer is the server API for ArtShow service.
|
||||||
|
// All implementations must embed UnimplementedArtShowServer
|
||||||
|
// for forward compatibility
|
||||||
|
type ArtShowServer interface {
|
||||||
|
CreateShow(context.Context, *artShow.SaveShowReq) (*artShow.SaveShowRes, error)
|
||||||
|
UpdateShow(context.Context, *artShow.SaveShowReq) (*artShow.SaveShowRes, error)
|
||||||
|
DelShow(context.Context, *artShow.DelShowReq) (*artShow.CommonRes, error)
|
||||||
|
ShowList(context.Context, *artShow.ShowListReq) (*artShow.ShowListRes, error)
|
||||||
|
ShowListWithRel(context.Context, *artShow.ShowListReq) (*artShow.ShowListRes, error)
|
||||||
|
ShowListForArtwork(context.Context, *artShow.ShowListForArtworkReq) (*artShow.ShowListForArtworkRes, error)
|
||||||
|
ShowArtworkInfo(context.Context, *artShow.ArtworkDetailReq) (*artShow.ShowArtworkDetailRes, error)
|
||||||
|
ShowDetail(context.Context, *artShow.ShowDetailReq) (*artShow.ShowDetailRes, error)
|
||||||
|
ShowStatisticalInfo(context.Context, *artShow.ShowStatisticalInfoReq) (*artShow.ShowStatisticalInfoRes, error)
|
||||||
|
ArtworkPrice(context.Context, *artShow.ArtworkPriceReq) (*artShow.ArtworkPriceRes, error)
|
||||||
|
CreateApply(context.Context, *artShow.SaveApplyReq) (*artShow.SaveApplyRes, error)
|
||||||
|
UpdateApply(context.Context, *artShow.SaveApplyReq) (*artShow.SaveApplyRes, error)
|
||||||
|
DelApply(context.Context, *artShow.DelApplyReq) (*artShow.CommonRes, error)
|
||||||
|
ShowListWithApply(context.Context, *artShow.ShowListReq) (*artShow.ShowListRes, error)
|
||||||
|
UpdateApplyStatus(context.Context, *artShow.UpdateApplyStatusReq) (*artShow.CommonRes, error)
|
||||||
|
ApplyList(context.Context, *artShow.ApplyListReq) (*artShow.ApplyListRes, error)
|
||||||
|
ApplyDetail(context.Context, *artShow.ApplyShowReq) (*artShow.ApplyShowRes, error)
|
||||||
|
ArtworkPriceList(context.Context, *artShow.ShowDetailReq) (*artShow.ArtworkPriceListRes, error)
|
||||||
|
mustEmbedUnimplementedArtShowServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedArtShowServer must be embedded to have forward compatible implementations.
|
||||||
|
type UnimplementedArtShowServer struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (UnimplementedArtShowServer) CreateShow(context.Context, *artShow.SaveShowReq) (*artShow.SaveShowRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method CreateShow not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) UpdateShow(context.Context, *artShow.SaveShowReq) (*artShow.SaveShowRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateShow not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) DelShow(context.Context, *artShow.DelShowReq) (*artShow.CommonRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method DelShow not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) ShowList(context.Context, *artShow.ShowListReq) (*artShow.ShowListRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ShowList not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) ShowListWithRel(context.Context, *artShow.ShowListReq) (*artShow.ShowListRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ShowListWithRel not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) ShowListForArtwork(context.Context, *artShow.ShowListForArtworkReq) (*artShow.ShowListForArtworkRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ShowListForArtwork not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) ShowArtworkInfo(context.Context, *artShow.ArtworkDetailReq) (*artShow.ShowArtworkDetailRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ShowArtworkInfo not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) ShowDetail(context.Context, *artShow.ShowDetailReq) (*artShow.ShowDetailRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ShowDetail not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) ShowStatisticalInfo(context.Context, *artShow.ShowStatisticalInfoReq) (*artShow.ShowStatisticalInfoRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ShowStatisticalInfo not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) ArtworkPrice(context.Context, *artShow.ArtworkPriceReq) (*artShow.ArtworkPriceRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ArtworkPrice not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) CreateApply(context.Context, *artShow.SaveApplyReq) (*artShow.SaveApplyRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method CreateApply not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) UpdateApply(context.Context, *artShow.SaveApplyReq) (*artShow.SaveApplyRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateApply not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) DelApply(context.Context, *artShow.DelApplyReq) (*artShow.CommonRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method DelApply not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) ShowListWithApply(context.Context, *artShow.ShowListReq) (*artShow.ShowListRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ShowListWithApply not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) UpdateApplyStatus(context.Context, *artShow.UpdateApplyStatusReq) (*artShow.CommonRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateApplyStatus not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) ApplyList(context.Context, *artShow.ApplyListReq) (*artShow.ApplyListRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ApplyList not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) ApplyDetail(context.Context, *artShow.ApplyShowReq) (*artShow.ApplyShowRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ApplyDetail not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) ArtworkPriceList(context.Context, *artShow.ShowDetailReq) (*artShow.ArtworkPriceListRes, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ArtworkPriceList not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedArtShowServer) mustEmbedUnimplementedArtShowServer() {}
|
||||||
|
|
||||||
|
// UnsafeArtShowServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to ArtShowServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeArtShowServer interface {
|
||||||
|
mustEmbedUnimplementedArtShowServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterArtShowServer(s grpc.ServiceRegistrar, srv ArtShowServer) {
|
||||||
|
s.RegisterService(&ArtShow_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_CreateShow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.SaveShowReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).CreateShow(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/CreateShow",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).CreateShow(ctx, req.(*artShow.SaveShowReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_UpdateShow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.SaveShowReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).UpdateShow(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/UpdateShow",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).UpdateShow(ctx, req.(*artShow.SaveShowReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_DelShow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.DelShowReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).DelShow(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/DelShow",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).DelShow(ctx, req.(*artShow.DelShowReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_ShowList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.ShowListReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).ShowList(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/ShowList",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).ShowList(ctx, req.(*artShow.ShowListReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_ShowListWithRel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.ShowListReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).ShowListWithRel(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/ShowListWithRel",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).ShowListWithRel(ctx, req.(*artShow.ShowListReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_ShowListForArtwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.ShowListForArtworkReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).ShowListForArtwork(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/ShowListForArtwork",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).ShowListForArtwork(ctx, req.(*artShow.ShowListForArtworkReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_ShowArtworkInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.ArtworkDetailReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).ShowArtworkInfo(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/ShowArtworkInfo",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).ShowArtworkInfo(ctx, req.(*artShow.ArtworkDetailReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_ShowDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.ShowDetailReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).ShowDetail(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/ShowDetail",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).ShowDetail(ctx, req.(*artShow.ShowDetailReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_ShowStatisticalInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.ShowStatisticalInfoReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).ShowStatisticalInfo(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/ShowStatisticalInfo",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).ShowStatisticalInfo(ctx, req.(*artShow.ShowStatisticalInfoReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_ArtworkPrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.ArtworkPriceReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).ArtworkPrice(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/ArtworkPrice",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).ArtworkPrice(ctx, req.(*artShow.ArtworkPriceReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_CreateApply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.SaveApplyReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).CreateApply(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/CreateApply",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).CreateApply(ctx, req.(*artShow.SaveApplyReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_UpdateApply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.SaveApplyReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).UpdateApply(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/UpdateApply",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).UpdateApply(ctx, req.(*artShow.SaveApplyReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_DelApply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.DelApplyReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).DelApply(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/DelApply",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).DelApply(ctx, req.(*artShow.DelApplyReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_ShowListWithApply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.ShowListReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).ShowListWithApply(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/ShowListWithApply",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).ShowListWithApply(ctx, req.(*artShow.ShowListReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_UpdateApplyStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.UpdateApplyStatusReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).UpdateApplyStatus(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/UpdateApplyStatus",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).UpdateApplyStatus(ctx, req.(*artShow.UpdateApplyStatusReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_ApplyList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.ApplyListReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).ApplyList(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/ApplyList",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).ApplyList(ctx, req.(*artShow.ApplyListReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_ApplyDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.ApplyShowReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).ApplyDetail(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/ApplyDetail",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).ApplyDetail(ctx, req.(*artShow.ApplyShowReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _ArtShow_ArtworkPriceList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(artShow.ShowDetailReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ArtShowServer).ArtworkPriceList(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/ArtShow.ArtShow/ArtworkPriceList",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ArtShowServer).ArtworkPriceList(ctx, req.(*artShow.ShowDetailReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ArtShow_ServiceDesc is the grpc.ServiceDesc for ArtShow service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var ArtShow_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "ArtShow.ArtShow",
|
||||||
|
HandlerType: (*ArtShowServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "CreateShow",
|
||||||
|
Handler: _ArtShow_CreateShow_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateShow",
|
||||||
|
Handler: _ArtShow_UpdateShow_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "DelShow",
|
||||||
|
Handler: _ArtShow_DelShow_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ShowList",
|
||||||
|
Handler: _ArtShow_ShowList_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ShowListWithRel",
|
||||||
|
Handler: _ArtShow_ShowListWithRel_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ShowListForArtwork",
|
||||||
|
Handler: _ArtShow_ShowListForArtwork_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ShowArtworkInfo",
|
||||||
|
Handler: _ArtShow_ShowArtworkInfo_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ShowDetail",
|
||||||
|
Handler: _ArtShow_ShowDetail_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ShowStatisticalInfo",
|
||||||
|
Handler: _ArtShow_ShowStatisticalInfo_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ArtworkPrice",
|
||||||
|
Handler: _ArtShow_ArtworkPrice_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "CreateApply",
|
||||||
|
Handler: _ArtShow_CreateApply_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateApply",
|
||||||
|
Handler: _ArtShow_UpdateApply_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "DelApply",
|
||||||
|
Handler: _ArtShow_DelApply_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ShowListWithApply",
|
||||||
|
Handler: _ArtShow_ShowListWithApply_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateApplyStatus",
|
||||||
|
Handler: _ArtShow_UpdateApplyStatus_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ApplyList",
|
||||||
|
Handler: _ArtShow_ApplyList_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ApplyDetail",
|
||||||
|
Handler: _ArtShow_ApplyDetail_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ArtworkPriceList",
|
||||||
|
Handler: _ArtShow_ArtworkPriceList_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "pb/artshow.proto",
|
||||||
|
}
|
@ -24,7 +24,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ARTSHOW_PREFIX = "B" // 画展包编号前缀
|
ARTSHOW_PREFIX = "AS" // 画展包编号前缀
|
||||||
ARTSHOWAPPLY_PREFIX = "ASA" // 申请画展包前缀
|
ARTSHOWAPPLY_PREFIX = "ASA" // 申请画展包前缀
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ func BuildArtShowM(in *artShow.SaveShowReq) (out *model.ArtShow) {
|
|||||||
out.Ruler = in.Ruler
|
out.Ruler = in.Ruler
|
||||||
out.Reward = in.Reward
|
out.Reward = in.Reward
|
||||||
out.CreateTime = in.CreateTime
|
out.CreateTime = in.CreateTime
|
||||||
|
out.Operator = in.Operator
|
||||||
if in.IsShow == 0 {
|
if in.IsShow == 0 {
|
||||||
out.IsShow = m.ARTSHOW_INSIDE
|
out.IsShow = m.ARTSHOW_INSIDE
|
||||||
} else {
|
} else {
|
||||||
@ -48,6 +49,7 @@ func BuildArtShowRpc(artShowM *model.ArtShowRes) (out *artShow.ShowDetail) {
|
|||||||
out.Price = artShowM.Price
|
out.Price = artShowM.Price
|
||||||
out.Reward = artShowM.Reward
|
out.Reward = artShowM.Reward
|
||||||
out.CreateTime = artShowM.CreateTime
|
out.CreateTime = artShowM.CreateTime
|
||||||
|
out.Operator = artShowM.Operator
|
||||||
out.IsShow = int32(artShowM.IsShow)
|
out.IsShow = int32(artShowM.IsShow)
|
||||||
out.Address = artShowM.Address
|
out.Address = artShowM.Address
|
||||||
out.ShowTime = artShowM.ShowTime
|
out.ShowTime = artShowM.ShowTime
|
||||||
|
Loading…
Reference in New Issue
Block a user