修改
This commit is contained in:
parent
e51a1fcb2b
commit
0d373d7936
8
DockerBuildProd.bat
Normal file
8
DockerBuildProd.bat
Normal file
@ -0,0 +1,8 @@
|
||||
go env -w GOOS=linux
|
||||
go build -ldflags "-s -w" -o ./build/artShowServerProd ./cmd/app.go
|
||||
docker rmi artshow-server-prod
|
||||
docker rmi 192.168.12.3:9015/artshow-server
|
||||
docker build . -f .\DockerfileProd -t artshow-server-prod
|
||||
docker tag artshow-server-prod 192.168.12.3:9015/artshow-server
|
||||
docker push 192.168.12.3:9015/artshow-server
|
||||
pause
|
8
DockerBuildTest.bat
Normal file
8
DockerBuildTest.bat
Normal file
@ -0,0 +1,8 @@
|
||||
go env -w GOOS=linux
|
||||
go build -ldflags "-s -w" -o ./build/artShowServerTest ./cmd/app.go
|
||||
docker rmi artshow-server-test
|
||||
docker rmi 121.229.45.214:9006/artshow-server
|
||||
docker build . -f .\Dockerfile -t artshow-server-test
|
||||
docker tag artshow-server-test 121.229.45.214:9006/artshow-server
|
||||
docker push 121.229.45.214:9006/artshow-server
|
||||
pause
|
19
Dockerfile
19
Dockerfile
@ -1,28 +1,29 @@
|
||||
FROM golang:alpine AS builder
|
||||
|
||||
LABEL stage=gobuilder
|
||||
#ENV DUBBO_GO_CONFIG_PATH ./conf/dubbogo.yaml
|
||||
#ENV MODE_ENV test
|
||||
ENV DUBBO_GO_CONFIG_PATH ./conf/dubbogo.yaml
|
||||
ENV CGO_ENABLED 0
|
||||
ENV GOOS linux
|
||||
ENV GOPROXY https://goproxy.cn,direct
|
||||
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
#RUN apk update --no-cache && apk add --no-cache tzdata
|
||||
|
||||
WORKDIR /build
|
||||
COPY ./utils ../utils
|
||||
ADD ./fonchain-artshow/go.mod .
|
||||
ADD ./fonchain-artshow/go.sum .
|
||||
RUN go mod download
|
||||
COPY ./fonchain-artshow .
|
||||
#COPY ./utils ../utils
|
||||
#ADD ./fonchain-artshow/go.mod .
|
||||
#ADD ./fonchain-artshow/go.sum .
|
||||
#RUN go mod download
|
||||
#COPY ./fonchain-artshow .
|
||||
|
||||
RUN go build -ldflags "-s -w" -o /app/artshowServer ./cmd/app.go
|
||||
#RUN go build -ldflags "-s -w" -o /app/artshowServer ./cmd/app.go
|
||||
COPY ./build/artShowServerTest /app/artshowServer
|
||||
|
||||
FROM alpine
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
RUN apk update --no-cache
|
||||
RUN apk add --no-cache ca-certificates
|
||||
RUN apk add --no-cache tzdata
|
||||
COPY ./fonchain-artshow/conf /app/conf
|
||||
COPY ./conf /app/conf
|
||||
|
||||
ENV TZ Asia/Shanghai
|
||||
#ENV MODE_ENV test
|
||||
|
32
Dockerfile1
Normal file
32
Dockerfile1
Normal file
@ -0,0 +1,32 @@
|
||||
FROM golang:alpine AS builder
|
||||
|
||||
LABEL stage=gobuilder
|
||||
#ENV DUBBO_GO_CONFIG_PATH ./conf/dubbogo.yaml
|
||||
#ENV MODE_ENV test
|
||||
ENV CGO_ENABLED 0
|
||||
ENV GOPROXY https://goproxy.cn,direct
|
||||
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
#RUN apk update --no-cache && apk add --no-cache tzdata
|
||||
|
||||
WORKDIR /build
|
||||
#COPY ./utils ../utils
|
||||
#ADD ./fonchain-artshow/go.mod .
|
||||
#ADD ./fonchain-artshow/go.sum .
|
||||
#RUN go mod download
|
||||
#COPY ./fonchain-artshow .
|
||||
|
||||
RUN go build -ldflags "-s -w" -o /app/artshowServer ./cmd/app.go
|
||||
|
||||
FROM alpine
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
RUN apk update --no-cache
|
||||
RUN apk add --no-cache ca-certificates
|
||||
RUN apk add --no-cache tzdata
|
||||
COPY ./fonchain-artshow/conf /app/conf
|
||||
|
||||
ENV TZ Asia/Shanghai
|
||||
#ENV MODE_ENV test
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/artshowServer .
|
||||
#EXPOSE 9022
|
||||
CMD ["/app/artshowServer"]
|
33
DockerfileProd
Normal file
33
DockerfileProd
Normal file
@ -0,0 +1,33 @@
|
||||
FROM golang:alpine AS builder
|
||||
|
||||
LABEL stage=gobuilder
|
||||
ENV DUBBO_GO_CONFIG_PATH ./conf/dubbogo.yaml
|
||||
ENV CGO_ENABLED 0
|
||||
ENV GOOS linux
|
||||
ENV GOPROXY https://goproxy.cn,direct
|
||||
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
#RUN apk update --no-cache && apk add --no-cache tzdata
|
||||
|
||||
WORKDIR /build
|
||||
#COPY ./utils ../utils
|
||||
#ADD ./fonchain-artshow/go.mod .
|
||||
#ADD ./fonchain-artshow/go.sum .
|
||||
#RUN go mod download
|
||||
#COPY ./fonchain-artshow .
|
||||
|
||||
#RUN go build -ldflags "-s -w" -o /app/artshowServer ./cmd/app.go
|
||||
COPY ./build/artShowServerProd /app/artshowServer
|
||||
|
||||
FROM alpine
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
RUN apk update --no-cache
|
||||
RUN apk add --no-cache ca-certificates
|
||||
RUN apk add --no-cache tzdata
|
||||
COPY ./conf /app/conf
|
||||
|
||||
ENV TZ Asia/Shanghai
|
||||
#ENV MODE_ENV test
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/artshowServer .
|
||||
#EXPOSE 9022
|
||||
CMD ["/app/artshowServer"]
|
@ -96,6 +96,23 @@ func (p *ArtShowProvider) ShowList(ctx context.Context, req *artShow.ShowListReq
|
||||
return
|
||||
}
|
||||
|
||||
func (p *ArtShowProvider) ShowListWithRel(ctx context.Context, req *artShow.ShowListReq) (res *artShow.ShowListRes, err error) {
|
||||
if req.Page == 0 {
|
||||
req.Page = 1
|
||||
}
|
||||
if req.PageSize == 0 {
|
||||
req.Page = 10
|
||||
}
|
||||
res = new(artShow.ShowListRes)
|
||||
err, res = service.ArtShowListWithRel(req)
|
||||
if err != nil {
|
||||
res.Msg = err.Error()
|
||||
err = errors.New(m.ERROR_QUERY)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (p *ArtShowProvider) ShowArtworkInfo(ctx context.Context, req *artShow.ShowDetailReq) (res *artShow.ShowArtworkDetailRes, err error) {
|
||||
err, res = service.ShowArtworkInfo(req)
|
||||
if err != nil {
|
||||
@ -107,6 +124,7 @@ func (p *ArtShowProvider) ShowArtworkInfo(ctx context.Context, req *artShow.Show
|
||||
}
|
||||
|
||||
func (p *ArtShowProvider) ShowDetail(ctx context.Context, req *artShow.ShowDetailReq) (res *artShow.ShowDetailRes, err error) {
|
||||
res = new(artShow.ShowDetailRes)
|
||||
err, res = service.ShowDetail(req)
|
||||
if err != nil {
|
||||
res.Msg = err.Error()
|
||||
@ -179,3 +197,14 @@ func (p *ArtShowProvider) ShowListForArtwork(ctx context.Context, req *artShow.S
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (p *ArtShowProvider) ArtworkPriceList(ctx context.Context, req *artShow.ShowDetailReq) (res *artShow.ArtworkPriceListRes, err error) {
|
||||
res = new(artShow.ArtworkPriceListRes)
|
||||
err, res.Data = service.ArtworkPriceList(req)
|
||||
if err != nil {
|
||||
res.Msg = err.Error()
|
||||
err = errors.New(m.ERROR_QUERY)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fonchain-artshow/cmd/model"
|
||||
"fonchain-artshow/pb/artShow"
|
||||
"fonchain-artshow/pkg/db"
|
||||
@ -38,31 +37,84 @@ func UpdateArtShow(tx *gorm.DB, artShow *model.ArtShow) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func ArtShowList(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").
|
||||
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, 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.is_show, c.address ,c.show_time").
|
||||
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 ")
|
||||
|
||||
if in.Name != "" {
|
||||
queryDB.Where(" a.artist_name like ? or a.show_name like ? or b.artwork_name like ? ", "%"+in.Name+"%", "%"+in.Name+"%", "%"+in.Name+"%")
|
||||
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").
|
||||
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 ")
|
||||
if in.ArtistName != "" {
|
||||
queryDB.Where(" a.artist_name like ? ", "%"+in.ArtistName+"%")
|
||||
countDB.Where(" a.artist_name like ? ", "%"+in.ArtistName+"%")
|
||||
}
|
||||
if in.ShowName != "" {
|
||||
queryDB.Where(" a.show_name like ? ", "%"+in.ShowName+"%")
|
||||
countDB.Where(" a.show_name like ? ", "%"+in.ShowName+"%")
|
||||
}
|
||||
if in.ShowSeq != "" {
|
||||
queryDB.Where(" a.show_seq like ? ", "%"+in.ShowSeq+"%")
|
||||
countDB.Where(" a.show_seq like ? ", "%"+in.ShowSeq+"%")
|
||||
}
|
||||
if in.IsShow != 0 {
|
||||
queryDB.Where(" a.is_show = ?", in.IsShow)
|
||||
countDB.Where(" a.is_show = ?", in.IsShow)
|
||||
}
|
||||
if in.StartTime != "" && in.EndTime != "" {
|
||||
queryDB.Where("convert(a.create_time, date) between ? and ?", in.StartTime, in.EndTime)
|
||||
countDB.Where("convert(a.create_time, date) between ? and ?", in.StartTime, in.EndTime)
|
||||
}
|
||||
if in.EndPrice != 0 {
|
||||
queryDB.Where(" a.price between ? and ?", in.StartPrice, in.EndPrice)
|
||||
countDB.Where(" a.price between ? and ?", in.StartPrice, in.EndPrice)
|
||||
}
|
||||
if in.EndReward != 0 {
|
||||
queryDB.Where(" a.reward between ? and ?", in.StartReward, in.EndReward)
|
||||
countDB.Where(" a.reward between ? and ?", in.StartReward, in.EndReward)
|
||||
}
|
||||
|
||||
//selectDb := queryDB
|
||||
//countDb := queryDB
|
||||
|
||||
out = make([]*model.ArtShowRes, 0)
|
||||
err = queryDB.Where("a.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
|
||||
if err != nil {
|
||||
zap.L().Error("ArtShowList Find err", zap.Error(err))
|
||||
return
|
||||
}
|
||||
|
||||
err = queryDB.Where("a.deleted_at is null").Group("a.id").Count(&total).Error
|
||||
err = countDB.Where("a.deleted_at is null").Group("a.id").Count(&total).Error
|
||||
if err != nil {
|
||||
zap.L().Error("ArtShowList Count err", zap.Error(err))
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func ArtShowList(in *artShow.ShowListReq) (err error, total int64, out []*model.ArtShowRes) {
|
||||
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")
|
||||
|
||||
if in.IsShow != 0 {
|
||||
queryDB.Where(" is_show = ?", in.IsShow)
|
||||
}
|
||||
if in.StartTime != "" && in.EndTime != "" {
|
||||
queryDB.Where("convert(a.create_time, date) between ? and ?", in.StartTime, in.EndTime)
|
||||
}
|
||||
|
||||
out = make([]*model.ArtShowRes, 0)
|
||||
err = queryDB.Offset(int((in.Page - 1) * in.PageSize)).
|
||||
Limit(int(in.PageSize)).Find(&out).Error
|
||||
if err != nil {
|
||||
zap.L().Error("ArtShowList Find err", zap.Error(err))
|
||||
return
|
||||
}
|
||||
|
||||
err = queryDB.Count(&total).Error
|
||||
if err != nil {
|
||||
zap.L().Error("ArtShowList Count err", zap.Error(err))
|
||||
return
|
||||
@ -113,7 +165,6 @@ func QueryArtShow(show_uid string) (err error, out *model.ArtShowRes) {
|
||||
zap.L().Error("ArtShow Find err", zap.Error(err))
|
||||
return
|
||||
}
|
||||
fmt.Printf("%+v\n", out)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -2,12 +2,12 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"fonchain-artshow/cmd/controller"
|
||||
grpc2 "fonchain-artshow/pb/grpc"
|
||||
"net"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"fonchain-artshow/cmd/controller"
|
||||
"fonchain-artshow/pkg/db"
|
||||
"fonchain-artshow/pkg/logger"
|
||||
"fonchain-artshow/pkg/m"
|
||||
|
@ -27,6 +27,7 @@ type ArtShowRes struct {
|
||||
ArtworkNum int32 `json:"artwork_num" gorm:"artwork_num"` // 画作数量
|
||||
Ruler int32 `json:"ruler" gorm:"ruler"` // 画作总平尺
|
||||
Price int64 `json:"price" gorm:"price"` // 画展包价格
|
||||
Reward int64 `json:"reward" gorm:"reward"` // 润格
|
||||
CreateTime string `json:"create_time" gorm:"create_time"` // 创建时间
|
||||
IsShow int8 `json:"is_show" gorm:"is_show"` // 是否出展 1,内部(default) 2,可展 3,已展
|
||||
|
||||
|
@ -136,7 +136,7 @@ func DelArtShow(in *artShow.DelShowReq) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// 画展包列表
|
||||
// 画展包列表 不携带 画展地址 画展时间
|
||||
func ArtShowList(in *artShow.ShowListReq) (err error, out *artShow.ShowListRes) {
|
||||
out = new(artShow.ShowListRes)
|
||||
artShows := make([]*model.ArtShowRes, 0)
|
||||
@ -152,6 +152,22 @@ func ArtShowList(in *artShow.ShowListReq) (err error, out *artShow.ShowListRes)
|
||||
return
|
||||
}
|
||||
|
||||
// 画展包列表 携带 画展地址 画展时间
|
||||
func ArtShowListWithRel(in *artShow.ShowListReq) (err error, out *artShow.ShowListRes) {
|
||||
out = new(artShow.ShowListRes)
|
||||
artShows := make([]*model.ArtShowRes, 0)
|
||||
err, out.Total, artShows = dao.ArtShowListWithRel(in)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err, out.TotalArtistNum, out.TotalPackageNum, _, _, _ = dao.ShowStatistical(m.ARTSHOW_PASS)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
out.Data = serializer.BuildArtShowListRes(artShows)
|
||||
return
|
||||
}
|
||||
|
||||
// 画展包关联画作信息
|
||||
func ShowArtworkInfo(in *artShow.ShowDetailReq) (err error, out *artShow.ShowArtworkDetailRes) {
|
||||
out = new(artShow.ShowArtworkDetailRes)
|
||||
|
@ -2,6 +2,7 @@ package service
|
||||
|
||||
import (
|
||||
"fonchain-artshow/cmd/dao"
|
||||
"fonchain-artshow/cmd/model"
|
||||
"fonchain-artshow/pb/artShow"
|
||||
"fonchain-artshow/pkg/serializer"
|
||||
)
|
||||
@ -14,3 +15,13 @@ func ArtworkPriceInfo(in *artShow.ArtworkPriceReq) (err error, artworkPriceRes *
|
||||
artworkPriceRes = serializer.BuildArtworkPriceRes(artworkPrice)
|
||||
return
|
||||
}
|
||||
|
||||
func ArtworkPriceList(in *artShow.ShowDetailReq) (err error, artworkPriceList []*artShow.ArtworkPriceDetail) {
|
||||
list := make([]*model.ArtworkPrice, 0)
|
||||
artworkPriceList = make([]*artShow.ArtworkPriceDetail, 0)
|
||||
err, list = dao.ArtworkPriceList(in.ShowUID)
|
||||
if len(list) > 0 {
|
||||
artworkPriceList = serializer.BuildShowArtworkListRpc(list)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -3,13 +3,13 @@
|
||||
mode = dev #正式prod #测试dev
|
||||
|
||||
;本地测试
|
||||
[mysql]
|
||||
Db = mysql
|
||||
DbHost = 127.0.0.1
|
||||
DbPort = 3306
|
||||
DbUser = root
|
||||
DbPassWord = 123456
|
||||
DbName = art_show
|
||||
;[mysql]
|
||||
;Db = mysql
|
||||
;DbHost = 127.0.0.1
|
||||
;DbPort = 3306
|
||||
;DbUser = root
|
||||
;DbPassWord = 123456
|
||||
;DbName = art_show
|
||||
|
||||
;正式服
|
||||
;[mysql]
|
||||
@ -30,13 +30,13 @@ DbName = art_show
|
||||
;DbName = art_show
|
||||
|
||||
;214
|
||||
;[mysql]
|
||||
;Db = mysql
|
||||
;DbHost = 172.16.100.99 #214
|
||||
;DbPort = 9007
|
||||
;DbUser = artuser
|
||||
;DbPassWord = "C250PflXIWv2SQm8"
|
||||
;DbName = art_show
|
||||
[mysql]
|
||||
Db = mysql
|
||||
DbHost = 172.16.100.99 #214
|
||||
DbPort = 9007
|
||||
DbUser = artuser
|
||||
DbPassWord = "C250PflXIWv2SQm8"
|
||||
DbName = art_show
|
||||
|
||||
;[mysql]
|
||||
;Db = mysql
|
||||
|
4
go.mod
4
go.mod
@ -6,7 +6,6 @@ replace github.com/fonchain_enterprise/utils/aes => ../utils/aes
|
||||
|
||||
require (
|
||||
dubbo.apache.org/dubbo-go/v3 v3.0.2
|
||||
github.com/360EntSecGroup-Skylar/excelize v1.4.1
|
||||
github.com/dubbogo/grpc-go v1.42.10
|
||||
github.com/dubbogo/triple v1.1.8
|
||||
github.com/fonchain_enterprise/utils/aes v0.0.0-00010101000000-000000000000
|
||||
@ -15,6 +14,7 @@ require (
|
||||
github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f
|
||||
github.com/mwitkow/go-proto-validators v0.3.2
|
||||
github.com/natefinch/lumberjack v2.0.0+incompatible
|
||||
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
|
||||
github.com/spf13/cast v1.3.0
|
||||
go.uber.org/zap v1.21.0
|
||||
google.golang.org/grpc v1.47.0
|
||||
@ -97,7 +97,6 @@ require (
|
||||
github.com/mitchellh/reflectwalk v1.0.2 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
||||
github.com/mschoch/smat v0.2.0 // indirect
|
||||
github.com/nacos-group/nacos-sdk-go v1.1.1 // indirect
|
||||
github.com/opentracing/opentracing-go v1.2.0 // indirect
|
||||
@ -112,7 +111,6 @@ require (
|
||||
github.com/prometheus/procfs v0.7.3 // indirect
|
||||
github.com/prometheus/statsd_exporter v0.21.0 // indirect
|
||||
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
|
||||
github.com/shirou/gopsutil v3.20.11+incompatible // indirect
|
||||
github.com/shirou/gopsutil/v3 v3.21.6 // indirect
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
|
5
go.sum
5
go.sum
@ -37,8 +37,6 @@ contrib.go.opencensus.io/exporter/prometheus v0.4.1/go.mod h1:t9wvfitlUjGXG2IXAZ
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
dubbo.apache.org/dubbo-go/v3 v3.0.2 h1:+WuMFN6RSjXHT41QS1Xi5tFfaPuczIVoeQuKq7pISYI=
|
||||
dubbo.apache.org/dubbo-go/v3 v3.0.2/go.mod h1:bODgByAf72kzG/5YIfZIODXx81pY3gaAdIQ8B4mN/Yk=
|
||||
github.com/360EntSecGroup-Skylar/excelize v1.4.1 h1:l55mJb6rkkaUzOpSsgEeKYtS6/0gHwBYyfo5Jcjv/Ks=
|
||||
github.com/360EntSecGroup-Skylar/excelize v1.4.1/go.mod h1:vnax29X2usfl7HHkBrX5EvSCJcmH3dT9luvxzu8iGAE=
|
||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
@ -569,8 +567,6 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
|
||||
github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
|
||||
github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM=
|
||||
github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw=
|
||||
@ -744,7 +740,6 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
|
||||
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.2.3-0.20181224173747-660f15d67dbb/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -94,6 +94,19 @@ func (this *DelShowReq) Validate() error {
|
||||
func (this *ArtworkDetail) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ArtworkPriceDetail) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ArtworkPriceListRes) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DelArtworkDetail) Validate() error {
|
||||
return nil
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ type ArtShowClient interface {
|
||||
UpdateShow(ctx context.Context, in *SaveShowReq, opts ...grpc_go.CallOption) (*SaveShowRes, common.ErrorWithAttachment)
|
||||
DelShow(ctx context.Context, in *DelShowReq, opts ...grpc_go.CallOption) (*CommonRes, 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)
|
||||
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)
|
||||
ShowDetail(ctx context.Context, in *ShowDetailReq, opts ...grpc_go.CallOption) (*ShowDetailRes, common.ErrorWithAttachment)
|
||||
@ -44,6 +45,7 @@ type ArtShowClient interface {
|
||||
UpdateApplyStatus(ctx context.Context, in *UpdateApplyStatusReq, opts ...grpc_go.CallOption) (*CommonRes, common.ErrorWithAttachment)
|
||||
ApplyList(ctx context.Context, in *ApplyListReq, opts ...grpc_go.CallOption) (*ApplyListRes, common.ErrorWithAttachment)
|
||||
ApplyDetail(ctx context.Context, in *ApplyShowReq, opts ...grpc_go.CallOption) (*ApplyShowRes, common.ErrorWithAttachment)
|
||||
ArtworkPriceList(ctx context.Context, in *ShowDetailReq, opts ...grpc_go.CallOption) (*ArtworkPriceListRes, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
type artShowClient struct {
|
||||
@ -55,6 +57,7 @@ type ArtShowClientImpl struct {
|
||||
UpdateShow func(ctx context.Context, in *SaveShowReq) (*SaveShowRes, error)
|
||||
DelShow func(ctx context.Context, in *DelShowReq) (*CommonRes, error)
|
||||
ShowList 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)
|
||||
ShowArtworkInfo func(ctx context.Context, in *ShowDetailReq) (*ShowArtworkDetailRes, error)
|
||||
ShowDetail func(ctx context.Context, in *ShowDetailReq) (*ShowDetailRes, error)
|
||||
@ -67,6 +70,7 @@ type ArtShowClientImpl struct {
|
||||
UpdateApplyStatus func(ctx context.Context, in *UpdateApplyStatusReq) (*CommonRes, error)
|
||||
ApplyList func(ctx context.Context, in *ApplyListReq) (*ApplyListRes, error)
|
||||
ApplyDetail func(ctx context.Context, in *ApplyShowReq) (*ApplyShowRes, error)
|
||||
ArtworkPriceList func(ctx context.Context, in *ShowDetailReq) (*ArtworkPriceListRes, error)
|
||||
}
|
||||
|
||||
func (c *ArtShowClientImpl) GetDubboStub(cc *triple.TripleConn) ArtShowClient {
|
||||
@ -105,6 +109,12 @@ func (c *artShowClient) ShowList(ctx context.Context, in *ShowListReq, opts ...g
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ShowList", in, out)
|
||||
}
|
||||
|
||||
func (c *artShowClient) ShowListWithRel(ctx context.Context, in *ShowListReq, opts ...grpc_go.CallOption) (*ShowListRes, common.ErrorWithAttachment) {
|
||||
out := new(ShowListRes)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ShowListWithRel", in, out)
|
||||
}
|
||||
|
||||
func (c *artShowClient) ShowListForArtwork(ctx context.Context, in *ShowListForArtworkReq, opts ...grpc_go.CallOption) (*ShowListForArtworkRes, common.ErrorWithAttachment) {
|
||||
out := new(ShowListForArtworkRes)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -177,6 +187,12 @@ func (c *artShowClient) ApplyDetail(ctx context.Context, in *ApplyShowReq, opts
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ApplyDetail", in, out)
|
||||
}
|
||||
|
||||
func (c *artShowClient) ArtworkPriceList(ctx context.Context, in *ShowDetailReq, opts ...grpc_go.CallOption) (*ArtworkPriceListRes, common.ErrorWithAttachment) {
|
||||
out := new(ArtworkPriceListRes)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ArtworkPriceList", in, out)
|
||||
}
|
||||
|
||||
// ArtShowServer is the server API for ArtShow service.
|
||||
// All implementations must embed UnimplementedArtShowServer
|
||||
// for forward compatibility
|
||||
@ -185,6 +201,7 @@ type ArtShowServer interface {
|
||||
UpdateShow(context.Context, *SaveShowReq) (*SaveShowRes, error)
|
||||
DelShow(context.Context, *DelShowReq) (*CommonRes, error)
|
||||
ShowList(context.Context, *ShowListReq) (*ShowListRes, error)
|
||||
ShowListWithRel(context.Context, *ShowListReq) (*ShowListRes, error)
|
||||
ShowListForArtwork(context.Context, *ShowListForArtworkReq) (*ShowListForArtworkRes, error)
|
||||
ShowArtworkInfo(context.Context, *ShowDetailReq) (*ShowArtworkDetailRes, error)
|
||||
ShowDetail(context.Context, *ShowDetailReq) (*ShowDetailRes, error)
|
||||
@ -197,6 +214,7 @@ type ArtShowServer interface {
|
||||
UpdateApplyStatus(context.Context, *UpdateApplyStatusReq) (*CommonRes, error)
|
||||
ApplyList(context.Context, *ApplyListReq) (*ApplyListRes, error)
|
||||
ApplyDetail(context.Context, *ApplyShowReq) (*ApplyShowRes, error)
|
||||
ArtworkPriceList(context.Context, *ShowDetailReq) (*ArtworkPriceListRes, error)
|
||||
mustEmbedUnimplementedArtShowServer()
|
||||
}
|
||||
|
||||
@ -217,6 +235,9 @@ func (UnimplementedArtShowServer) DelShow(context.Context, *DelShowReq) (*Common
|
||||
func (UnimplementedArtShowServer) ShowList(context.Context, *ShowListReq) (*ShowListRes, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ShowList not implemented")
|
||||
}
|
||||
func (UnimplementedArtShowServer) ShowListWithRel(context.Context, *ShowListReq) (*ShowListRes, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ShowListWithRel not implemented")
|
||||
}
|
||||
func (UnimplementedArtShowServer) ShowListForArtwork(context.Context, *ShowListForArtworkReq) (*ShowListForArtworkRes, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ShowListForArtwork not implemented")
|
||||
}
|
||||
@ -253,6 +274,9 @@ func (UnimplementedArtShowServer) ApplyList(context.Context, *ApplyListReq) (*Ap
|
||||
func (UnimplementedArtShowServer) ApplyDetail(context.Context, *ApplyShowReq) (*ApplyShowRes, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ApplyDetail not implemented")
|
||||
}
|
||||
func (UnimplementedArtShowServer) ArtworkPriceList(context.Context, *ShowDetailReq) (*ArtworkPriceListRes, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ArtworkPriceList not implemented")
|
||||
}
|
||||
func (s *UnimplementedArtShowServer) XXX_SetProxyImpl(impl protocol.Invoker) {
|
||||
s.proxyImpl = impl
|
||||
}
|
||||
@ -397,6 +421,35 @@ func _ArtShow_ShowList_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ArtShow_ShowListWithRel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ShowListReq)
|
||||
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("ShowListWithRel", 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 _ArtShow_ShowListForArtwork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ShowListForArtworkReq)
|
||||
if err := dec(in); err != nil {
|
||||
@ -745,6 +798,35 @@ func _ArtShow_ApplyDetail_Handler(srv interface{}, ctx context.Context, dec func
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ArtShow_ArtworkPriceList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ShowDetailReq)
|
||||
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("ArtworkPriceList", 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)
|
||||
}
|
||||
|
||||
// ArtShow_ServiceDesc is the grpc_go.ServiceDesc for ArtShow service.
|
||||
// It's only intended for direct use with grpc_go.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@ -768,6 +850,10 @@ var ArtShow_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "ShowList",
|
||||
Handler: _ArtShow_ShowList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ShowListWithRel",
|
||||
Handler: _ArtShow_ShowListWithRel_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ShowListForArtwork",
|
||||
Handler: _ArtShow_ShowListForArtwork_Handler,
|
||||
@ -816,6 +902,10 @@ var ArtShow_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "ApplyDetail",
|
||||
Handler: _ArtShow_ApplyDetail_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ArtworkPriceList",
|
||||
Handler: _ArtShow_ArtworkPriceList_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc_go.StreamDesc{},
|
||||
Metadata: "pb/artshow.proto",
|
||||
|
@ -7,7 +7,8 @@ service ArtShow {
|
||||
rpc CreateShow (SaveShowReq) returns (SaveShowRes) {} // 画展包创建操作
|
||||
rpc UpdateShow (SaveShowReq) returns (SaveShowRes) {} // 画展包更新操作
|
||||
rpc DelShow (DelShowReq) returns (CommonRes) {} // 画展包删除操作
|
||||
rpc ShowList (ShowListReq) returns (ShowListRes) {} // 画展包列表展示
|
||||
rpc ShowList (ShowListReq) returns (ShowListRes) {} // 画展包列表展示 不携带 画展时间 画展地址
|
||||
rpc ShowListWithRel (ShowListReq) returns (ShowListRes) {} // 画展包列表展示 携带 画展时间 画展地址
|
||||
rpc ShowListForArtwork (ShowListForArtworkReq) returns (ShowListForArtworkRes) {} // 画展包列表展示 画作使用
|
||||
rpc ShowArtworkInfo (ShowDetailReq) returns (ShowArtworkDetailRes) {} // 画展包画作展示
|
||||
rpc ShowDetail (ShowDetailReq) returns (ShowDetailRes) {} // 画展包展示
|
||||
@ -20,6 +21,7 @@ service ArtShow {
|
||||
rpc UpdateApplyStatus (UpdateApplyStatusReq) returns (CommonRes) {} // 更新画展包状态
|
||||
rpc ApplyList (ApplyListReq) returns (ApplyListRes) {} // 画展包申请列表
|
||||
rpc ApplyDetail (ApplyShowReq) returns (ApplyShowRes) {} // 画展包申请列表
|
||||
rpc ArtworkPriceList (ShowDetailReq) returns (ArtworkPriceListRes) {} // 画作详情列表
|
||||
}
|
||||
|
||||
// 创建 更新画展包
|
||||
@ -89,8 +91,14 @@ message ShowListReq {
|
||||
|
||||
string StartTime = 3 [json_name = "start_time"];
|
||||
string EndTime = 4 [json_name = "end_time"];
|
||||
string Name = 5 [json_name = "name"];
|
||||
int32 IsShow = 6 [json_name = "is_show"];
|
||||
string ShowSeq = 5 [json_name = "show_seq"];
|
||||
string ShowName = 6 [json_name = "show_name"];
|
||||
string ArtistName = 7 [json_name = "artist_name"];
|
||||
int64 StartPrice = 8 [json_name = "start_price"];
|
||||
int64 EndPrice = 9 [json_name = "end_price"];
|
||||
int64 StartReward = 10 [json_name = "start_reward"];
|
||||
int64 EndReward = 11 [json_name = "end_reward"];
|
||||
int32 IsShow = 12 [json_name = "is_show"];
|
||||
}
|
||||
|
||||
message ShowListForArtworkReq {
|
||||
@ -134,6 +142,29 @@ message ArtworkDetail {
|
||||
string SmallPic = 9 [json_name = "small_pic"];
|
||||
}
|
||||
|
||||
// 画作详情
|
||||
message ArtworkPriceDetail {
|
||||
string ArtworkPriceUID = 1 [json_name = "artwork_price_uid"];
|
||||
string ShowUID =2 [json_name = "show_uid"];
|
||||
string ArtworkUID = 3 [json_name = "artwork_uid"];
|
||||
string ArtworkName = 4 [json_name = "artwork_name"];
|
||||
string ArtistName = 5 [json_name = "artist_name"];
|
||||
int32 Length = 6 [json_name = "length"];
|
||||
int32 Width = 7 [json_name = "width"];
|
||||
int32 Ruler = 8 [json_name = "ruler"];
|
||||
string SmallPic = 9 [json_name = "small_pic"];
|
||||
int64 Price = 10 [json_name = "price"];
|
||||
int64 RulerPrice = 11 [json_name = "ruler_price"];
|
||||
int64 ArtworkPrice = 12 [json_name = "artwork_price"];
|
||||
int64 MarketPrice = 13 [json_name = "market_price"];
|
||||
int64 CopyrightPrice = 14 [json_name = "copyright_price"];
|
||||
}
|
||||
|
||||
message ArtworkPriceListRes {
|
||||
repeated ArtworkPriceDetail Data = 1 [json_name = "data"];
|
||||
string Msg = 2 [json_name = "msg"];
|
||||
}
|
||||
|
||||
// 画展包 删除的画作信息
|
||||
message DelArtworkDetail {
|
||||
string ArtworkPriceUID = 1 [json_name = "artwork_price_uid"];
|
||||
|
@ -1,646 +0,0 @@
|
||||
// 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)
|
||||
ShowListForArtwork(ctx context.Context, in *artShow.ShowListForArtworkReq, opts ...grpc.CallOption) (*artShow.ShowListForArtworkRes, error)
|
||||
ShowArtworkInfo(ctx context.Context, in *artShow.ShowDetailReq, 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)
|
||||
}
|
||||
|
||||
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) 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.ShowDetailReq, 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
|
||||
}
|
||||
|
||||
// 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)
|
||||
ShowListForArtwork(context.Context, *artShow.ShowListForArtworkReq) (*artShow.ShowListForArtworkRes, error)
|
||||
ShowArtworkInfo(context.Context, *artShow.ShowDetailReq) (*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)
|
||||
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) ShowListForArtwork(context.Context, *artShow.ShowListForArtworkReq) (*artShow.ShowListForArtworkRes, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ShowListForArtwork not implemented")
|
||||
}
|
||||
func (UnimplementedArtShowServer) ShowArtworkInfo(context.Context, *artShow.ShowDetailReq) (*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) 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_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.ShowDetailReq)
|
||||
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.ShowDetailReq))
|
||||
}
|
||||
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)
|
||||
}
|
||||
|
||||
// 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: "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,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "pb/artshow.proto",
|
||||
}
|
@ -24,7 +24,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
ARTSHOW_PREFIX = "AS" // 画展包编号前缀
|
||||
ARTSHOW_PREFIX = "B" // 画展包编号前缀
|
||||
ARTSHOWAPPLY_PREFIX = "ASA" // 申请画展包前缀
|
||||
)
|
||||
|
||||
|
@ -46,6 +46,7 @@ func BuildArtShowRpc(artShowM *model.ArtShowRes) (out *artShow.ShowDetail) {
|
||||
out.ArtworkNum = artShowM.ArtworkNum
|
||||
out.Ruler = artShowM.Ruler
|
||||
out.Price = artShowM.Price
|
||||
out.Reward = artShowM.Reward
|
||||
out.CreateTime = artShowM.CreateTime
|
||||
out.IsShow = int32(artShowM.IsShow)
|
||||
out.Address = artShowM.Address
|
||||
|
@ -46,6 +46,30 @@ func BuildShowArtworkRpc(in []*model.ArtworkPrice) (out []*artShow.ArtworkDetail
|
||||
return
|
||||
}
|
||||
|
||||
func BuildShowArtworkListRpc(in []*model.ArtworkPrice) (out []*artShow.ArtworkPriceDetail) {
|
||||
out = make([]*artShow.ArtworkPriceDetail, len(in))
|
||||
for i := 0; i < len(in); i++ {
|
||||
artworkPrice := new(artShow.ArtworkPriceDetail)
|
||||
artworkPrice.ArtworkPriceUID = in[i].ArtworkPriceUID
|
||||
artworkPrice.ShowUID = in[i].ShowUID
|
||||
artworkPrice.ArtworkUID = in[i].ArtworkUID
|
||||
artworkPrice.ArtworkName = in[i].ArtworkName
|
||||
artworkPrice.ArtistName = in[i].ArtistName
|
||||
artworkPrice.SmallPic = in[i].SmallPic
|
||||
artworkPrice.Ruler = in[i].Ruler
|
||||
artworkPrice.Length = in[i].Length
|
||||
artworkPrice.Width = in[i].Width
|
||||
artworkPrice.Price = in[i].Price
|
||||
artworkPrice.RulerPrice = in[i].RulerPrice
|
||||
artworkPrice.ArtworkPrice = in[i].ArtworkPrice
|
||||
artworkPrice.MarketPrice = in[i].MarketPrice
|
||||
artworkPrice.CopyrightPrice = in[i].CopyrightPrice
|
||||
|
||||
out[i] = artworkPrice
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func BuildArtworkPriceRes(artworkPrice *model.ArtworkPrice) (out *artShow.ArtworkPriceRes) {
|
||||
out = new(artShow.ArtworkPriceRes)
|
||||
out.Data = new(artShow.ArtworkPriceRes_PriceInfo)
|
||||
|
@ -3,6 +3,7 @@ package serializer
|
||||
import (
|
||||
"fonchain-artshow/cmd/model"
|
||||
"math"
|
||||
"sort"
|
||||
)
|
||||
|
||||
func CalcPrice(total_price int64, total_ruler int32, artworksPrices []*model.ArtworkPrice) []*model.ArtworkPrice {
|
||||
@ -147,27 +148,53 @@ func calcTotalPrice(artworks []*model.ArtworkPrice, add_balance, price int64) in
|
||||
|
||||
func findArtworkToAdd(artworks []*model.ArtworkPrice, ruler_price int64) (int, int) {
|
||||
var (
|
||||
current_ruler int
|
||||
max_ruler int
|
||||
maxIndex int
|
||||
difIndex int
|
||||
max_ruler = -1
|
||||
maxIndex = -1
|
||||
difIndex = -1
|
||||
)
|
||||
|
||||
bucket := make(map[int][]int, 0)
|
||||
|
||||
sortFir := make(map[int]int, 0)
|
||||
sortSec := make([]int, 0)
|
||||
|
||||
for i := 0; i < len(artworks); i++ {
|
||||
if artworks[i].Ruler > int32(max_ruler) {
|
||||
maxIndex = i
|
||||
max_ruler = int(artworks[i].Ruler)
|
||||
if len(bucket[int(artworks[i].Ruler)]) > 0 {
|
||||
bucket[int(artworks[i].Ruler)] = append(bucket[int(artworks[i].Ruler)], i)
|
||||
} else {
|
||||
bucket[int(artworks[i].Ruler)] = make([]int, 0)
|
||||
bucket[int(artworks[i].Ruler)] = append(bucket[int(artworks[i].Ruler)], i)
|
||||
}
|
||||
sortFir[int(artworks[i].Ruler)] = i
|
||||
//fmt.Println(bucket[artworks[i].Ruler])
|
||||
}
|
||||
|
||||
for ruler, _ := range sortFir {
|
||||
sortSec = append(sortSec, int(ruler))
|
||||
}
|
||||
|
||||
sort.Ints(sortSec)
|
||||
|
||||
if len(sortSec) == 1 {
|
||||
maxIndex = bucket[sortSec[0]][0]
|
||||
//return maxIndex ,0
|
||||
} else {
|
||||
for i := len(sortSec); i > 0; i-- {
|
||||
if max_ruler < sortSec[i-1] {
|
||||
max_ruler = sortSec[i-1]
|
||||
}
|
||||
if len(bucket[sortSec[i-1]]) > 1 {
|
||||
continue
|
||||
}
|
||||
if len(bucket[sortSec[i-1]]) == 1 {
|
||||
difIndex = bucket[sortSec[i-1]][0]
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if artworks[i].Ruler > int32(current_ruler) {
|
||||
difIndex = i
|
||||
current_ruler = int(artworks[i].Ruler)
|
||||
} else if artworks[i].Ruler == int32(current_ruler) {
|
||||
current_ruler = 0
|
||||
difIndex = 0
|
||||
if difIndex == -1 {
|
||||
maxIndex = bucket[max_ruler][0]
|
||||
}
|
||||
//artworks[i].ShowID = show_id
|
||||
artworks[i].RulerPrice = ruler_price
|
||||
}
|
||||
|
||||
return maxIndex, difIndex
|
||||
|
3
runtime/log/artshow_server.log
Normal file
3
runtime/log/artshow_server.log
Normal file
@ -0,0 +1,3 @@
|
||||
{"level":"ERROR","time":"2023-01-16T14:48:39.634+0800","caller":"dao/art_show.go:66","msg":"ArtShowList Find err","error":"Error 1055: Expression #11 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'art_show.c.address' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by"}
|
||||
{"level":"ERROR","time":"2023-01-16T14:50:09.407+0800","caller":"dao/art_show.go:66","msg":"ArtShowList Find err","error":"Error 1055: Expression #11 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'art_show.c.address' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by"}
|
||||
{"level":"ERROR","time":"2023-01-16T15:01:44.067+0800","caller":"dao/art_show.go:69","msg":"ArtShowList Find err","error":"Error 1055: Expression #11 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'art_show.c.address' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by"}
|
Loading…
Reference in New Issue
Block a user