更新接口
This commit is contained in:
parent
ee087e77f8
commit
c8c093654d
@ -41,16 +41,16 @@ func (a ArtistInfoArtworkProvider) ArtworkLockAction(ctx context.Context, reques
|
||||
return a.artistInfoLogic.ArtworkLockAction(request)
|
||||
}
|
||||
|
||||
// GetArtworkRecordUids 获取画作锁记录
|
||||
func (a ArtistInfoArtworkProvider) GetArtworkLockRecords(ctx context.Context, request *artistInfoArtwork.GetArtworkLockRecordsRequest) (*artistInfoArtwork.ArtworkLockList, error) {
|
||||
return a.artistInfoLogic.GetArtworkLockRecords(request)
|
||||
}
|
||||
|
||||
// DeleteArtworkRecord 删除话走锁记录
|
||||
func (a ArtistInfoArtworkProvider) DeleteArtworkRecord(ctx context.Context, request *artistInfoArtwork.DeleteArtworkRecordRequest) (*artistInfoArtwork.ArtworkCommonNoParams, error) {
|
||||
return a.artistInfoLogic.DeleteArtworkRecord(request)
|
||||
}
|
||||
|
||||
// GetArtworkRecordUids 获取画作锁记录
|
||||
func (a ArtistInfoArtworkProvider) GetArtworkLockRecords(ctx context.Context, request *artistInfoArtwork.GetArtworkLockRecordsRequest) (*artistInfoArtwork.ArtworkLockList, error) {
|
||||
return a.artistInfoLogic.GetArtworkLockRecords(request)
|
||||
}
|
||||
|
||||
// GetArtworkLockHistoryGroup 查询画作历史记录,按照锁定时间分组
|
||||
func (a ArtistInfoArtworkProvider) GetArtworkLockHistoryGroup(ctx context.Context, request *artistInfoArtwork.GetArtworkLockHistoryRequest) (*artistInfoArtwork.GetArtworkLockHistoryResponse, error) {
|
||||
return a.artistInfoLogic.GetArtworkLockHistoryGroup(request)
|
||||
|
@ -1,110 +1,103 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/logic"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/supplyinfo"
|
||||
)
|
||||
|
||||
type SupplyProvider struct {
|
||||
supplyinfo.UnimplementedSupplyInfoServer
|
||||
SupplyLogic *logic.Supply
|
||||
}
|
||||
|
||||
func (a *SupplyProvider) GetSupplyInfoList(ctx context.Context, req *supplyinfo.GetSupplyInfoListRequest) (rep *supplyinfo.GetSupplyInfoListRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.SupplyLogic.GetSupplyInfoList(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *SupplyProvider) GetSupplyInfo(ctx context.Context, req *supplyinfo.GetSupplyInfoRequest) (rep *supplyinfo.GetSupplyInfoData, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.SupplyLogic.GetSupplyInfo(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *SupplyProvider) UpdateSupplyInfo(ctx context.Context, req *supplyinfo.UpdateSupplyInfoRequest) (rep *supplyinfo.UpdateSupplyInfoRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.SupplyLogic.UpdateSupplyInfo(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *SupplyProvider) GetVideoList(ctx context.Context, req *supplyinfo.GetVideoListRequest) (rep *supplyinfo.GetVideoListRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.SupplyLogic.GetVideoList(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *SupplyProvider) GetVideo(ctx context.Context, req *supplyinfo.GetVideoRequest) (rep *supplyinfo.GetVideoListData, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.SupplyLogic.GetVideo(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *SupplyProvider) UpdateVideo(ctx context.Context, req *supplyinfo.UpdateVideoRequest) (rep *supplyinfo.UpdateVideoRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.SupplyLogic.UpdateVideo(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *SupplyProvider) GetExam(ctx context.Context, req *supplyinfo.GetExamRequest) (rep *supplyinfo.GetExamListData, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.SupplyLogic.GetExam(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *SupplyProvider) GetExamList(ctx context.Context, req *supplyinfo.GetExamListRequest) (rep *supplyinfo.GetExamListRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.SupplyLogic.GetExamList(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *SupplyProvider) UpdateExam(ctx context.Context, req *supplyinfo.UpdateExamRequest) (rep *supplyinfo.UpdateExamRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.SupplyLogic.UpdateExam(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *SupplyProvider) GetArtistInfoList(ctx context.Context, req *supplyinfo.GetArtistInfoListRequest) (rep *supplyinfo.GetArtistInfoListRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.SupplyLogic.GetArtistInfoList(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *SupplyProvider) GetArtistInfo(ctx context.Context, req *supplyinfo.GetArtistInfoRequest) (rep *supplyinfo.GetArtistInfoListData, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.SupplyLogic.GetArtistInfo(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
|
||||
func (a *SupplyProvider) UpdateArtistInfo(ctx context.Context, req *supplyinfo.UpdateArtistInfoRequest) (rep *supplyinfo.UpdateArtistInfoRespond, err error) {
|
||||
fmt.Println("第一处")
|
||||
if rep, err = a.SupplyLogic.UpdateArtistInfo(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rep, nil
|
||||
}
|
||||
//
|
||||
//type SupplyProvider struct {
|
||||
// supplyinfo.UnimplementedSupplyInfoServer
|
||||
// SupplyLogic *logic.Supply
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetSupplyInfoList(ctx context.Context, req *supplyinfo.GetSupplyInfoListRequest) (rep *supplyinfo.GetSupplyInfoListRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetSupplyInfoList(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetSupplyInfo(ctx context.Context, req *supplyinfo.GetSupplyInfoRequest) (rep *supplyinfo.GetSupplyInfoData, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetSupplyInfo(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) UpdateSupplyInfo(ctx context.Context, req *supplyinfo.UpdateSupplyInfoRequest) (rep *supplyinfo.UpdateSupplyInfoRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.UpdateSupplyInfo(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetVideoList(ctx context.Context, req *supplyinfo.GetVideoListRequest) (rep *supplyinfo.GetVideoListRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetVideoList(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetVideo(ctx context.Context, req *supplyinfo.GetVideoRequest) (rep *supplyinfo.GetVideoListData, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetVideo(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) UpdateVideo(ctx context.Context, req *supplyinfo.UpdateVideoRequest) (rep *supplyinfo.UpdateVideoRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.UpdateVideo(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetExam(ctx context.Context, req *supplyinfo.GetExamRequest) (rep *supplyinfo.GetExamListData, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetExam(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetExamList(ctx context.Context, req *supplyinfo.GetExamListRequest) (rep *supplyinfo.GetExamListRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetExamList(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) UpdateExam(ctx context.Context, req *supplyinfo.UpdateExamRequest) (rep *supplyinfo.UpdateExamRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.UpdateExam(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetArtistInfoList(ctx context.Context, req *supplyinfo.GetArtistInfoListRequest) (rep *supplyinfo.GetArtistInfoListRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetArtistInfoList(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) GetArtistInfo(ctx context.Context, req *supplyinfo.GetArtistInfoRequest) (rep *supplyinfo.GetArtistInfoListData, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.GetArtistInfo(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
//
|
||||
//func (a *SupplyProvider) UpdateArtistInfo(ctx context.Context, req *supplyinfo.UpdateArtistInfoRequest) (rep *supplyinfo.UpdateArtistInfoRespond, err error) {
|
||||
// fmt.Println("第一处")
|
||||
// if rep, err = a.SupplyLogic.UpdateArtistInfo(req); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return rep, nil
|
||||
//}
|
||||
|
@ -386,30 +386,30 @@ func UnFinishList(req *artistInfoUser.UnFinishListRequest) (rep *artistInfoUser.
|
||||
// return nil, err
|
||||
//}
|
||||
//rep.AccountStateList = accountStateCount
|
||||
var supplyInfo model.SupplyInfo
|
||||
var supplyInfoCount int64
|
||||
if err := db.DB.Model(&supplyInfo).Where("types = ? and user_id = ? ", "1", user.ID).Count(&supplyInfoCount).Error; err != nil {
|
||||
zap.L().Error("get user info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
rep.SupplyInfoList += supplyInfoCount
|
||||
var exhVideo model.ExhVideo
|
||||
var exhVideoCount int64
|
||||
if err := db.DB.Model(&exhVideo).Where("types = ? and user_id = ? ", "1", user.ID).Count(&exhVideoCount).Error; err != nil {
|
||||
zap.L().Error("get user info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
rep.SupplyInfoList += exhVideoCount
|
||||
var exhExam model.ExhExam
|
||||
var exhExamCount int64
|
||||
if err := db.DB.Model(&exhExam).Where("types = ? and user_id = ? ", "1", user.ID).Count(&exhExamCount).Error; err != nil {
|
||||
zap.L().Error("get user info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
rep.SupplyInfoList += exhExamCount
|
||||
//var supplyInfo model.SupplyInfo
|
||||
//var supplyInfoCount int64
|
||||
//if err := db.DB.Model(&supplyInfo).Where("types = ? and user_id = ? ", "1", user.ID).Count(&supplyInfoCount).Error; err != nil {
|
||||
// zap.L().Error("get user info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
//}
|
||||
//rep.SupplyInfoList += supplyInfoCount
|
||||
//var exhVideo model.ExhVideo
|
||||
//var exhVideoCount int64
|
||||
//if err := db.DB.Model(&exhVideo).Where("types = ? and user_id = ? ", "1", user.ID).Count(&exhVideoCount).Error; err != nil {
|
||||
// zap.L().Error("get user info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
//}
|
||||
//rep.SupplyInfoList += exhVideoCount
|
||||
//var exhExam model.ExhExam
|
||||
//var exhExamCount int64
|
||||
//if err := db.DB.Model(&exhExam).Where("types = ? and user_id = ? ", "1", user.ID).Count(&exhExamCount).Error; err != nil {
|
||||
// zap.L().Error("get user info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
//}
|
||||
//rep.SupplyInfoList += exhExamCount
|
||||
|
||||
return rep, nil
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ func GetArtworkLockRecords(req *artistInfoArtwork.GetArtworkLockRecordsRequest)
|
||||
case artistInfoArtwork.ArtworkQueryMode_NowPreSaveArtwork: //当前暂存的画作
|
||||
tx = tx.Where("status = 1")
|
||||
case artistInfoArtwork.ArtworkQueryMode_NowLockedArtwork: //当前已锁定的画作
|
||||
tx = tx.Where("status = 2", req.ArtistUid)
|
||||
tx = tx.Where("status = 2")
|
||||
case artistInfoArtwork.ArtworkQueryMode_ArtistCanSee: //画家能看到的画作(暂存和锁定) //弃用,画家看到的是暂存的画作
|
||||
tx = tx.Where("status < 3")
|
||||
case artistInfoArtwork.ArtworkQueryMode_AllUnlockArtwork: //所有已解锁的画作(历史画作)
|
||||
@ -125,6 +125,9 @@ func GetArtworkLockRecords(req *artistInfoArtwork.GetArtworkLockRecordsRequest)
|
||||
//case artistInfoArtwork.ArtworkQueryMode_AllHistoryArtwork: //所有历史画作
|
||||
// tx = tx.Where("status > 1")
|
||||
}
|
||||
if req.AuditStatus != 0 {
|
||||
tx = tx.Where("audit_status = ?", req.AuditStatus)
|
||||
}
|
||||
err = tx.Find(&datas).Error
|
||||
for _, v := range datas {
|
||||
resp.Data = append(resp.Data, &artistInfoArtwork.ArtistLockInfo{
|
||||
|
@ -2,6 +2,7 @@ package dao
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model/old"
|
||||
"time"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
@ -12,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func FinishContract(id string) (err error) {
|
||||
var contracts model.Contract
|
||||
var contracts old.Contract
|
||||
if err = db.DB.Where("transaction_id = ?", id).First(&contracts).Error; err != nil {
|
||||
zap.L().Error("get contract info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
@ -59,7 +60,7 @@ func ContractList(req *contract.ContractListRequest) (rep *contract.ContractList
|
||||
args = append(args, req.State)
|
||||
}
|
||||
|
||||
var contractModel []model.Contract
|
||||
var contractModel []old.Contract
|
||||
if err = db.DB.Where(sqlWhere, args...).Find(&contractModel).Error; err != nil {
|
||||
zap.L().Error("get contractModels info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
@ -150,7 +151,7 @@ func ContractTxList(req *contract.ContractTxListRequest) (rep *contract.Contract
|
||||
}
|
||||
|
||||
func GetContract(id int32) (rep *contract.ContractData, err error) {
|
||||
var con model.Contract
|
||||
var con old.Contract
|
||||
if err = db.DB.Where("id = ? ", id).First(&con).Error; err != nil {
|
||||
zap.L().Error("get contract info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
@ -175,8 +176,8 @@ func GetContract(id int32) (rep *contract.ContractData, err error) {
|
||||
// 更新交易id
|
||||
func UpdateContract(req *contract.UpdateContractRequest) error {
|
||||
//数据库操作异常
|
||||
var con model.Contract
|
||||
if err := db.DB.Model(&con).Updates(&model.Contract{ContractId: req.ContractId, ViewUrl: req.ViewUrl, DownloadUrl: req.DownloadUrl}).Error; err != nil {
|
||||
var con old.Contract
|
||||
if err := db.DB.Model(&con).Updates(&old.Contract{ContractId: req.ContractId, ViewUrl: req.ViewUrl, DownloadUrl: req.DownloadUrl}).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
@ -184,7 +185,7 @@ func UpdateContract(req *contract.UpdateContractRequest) error {
|
||||
|
||||
// 更新交易id
|
||||
func UpdateContractTx(txId string, contractId int32) (err error) {
|
||||
var con model.Contract
|
||||
var con old.Contract
|
||||
con.ID = contractId
|
||||
if err = db.DB.Model(&con).Update("transaction_id", txId).Error; err != nil {
|
||||
return
|
||||
|
@ -1,398 +1,388 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/supplyinfo"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/m"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func GetSupplyInfoList(id, num int32) (rep *supplyinfo.GetSupplyInfoListRespond, err error) {
|
||||
rep = &supplyinfo.GetSupplyInfoListRespond{}
|
||||
var datas []*supplyinfo.GetSupplyInfoData
|
||||
|
||||
var supplyInfoList []model.SupplyInfo
|
||||
if err := db.DB.Where("user_id = ? and types <= ?", id, num).Find(&supplyInfoList).Error; err != nil {
|
||||
zap.L().Error("get supplyInfo infos err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for i, v := range supplyInfoList {
|
||||
supplyInfoList[i].CreateTime = v.CreatedAt.Format("2006-01-02")
|
||||
data := &supplyinfo.GetSupplyInfoData{}
|
||||
data.ID = uint64(supplyInfoList[i].ID)
|
||||
data.ArtworkId = supplyInfoList[i].ArtworkId
|
||||
data.ArtistId = supplyInfoList[i].ArtistId
|
||||
data.UserId = uint64(supplyInfoList[i].UserId)
|
||||
data.Name = supplyInfoList[i].Name
|
||||
data.ModelYear = supplyInfoList[i].ModelYear
|
||||
data.Photo = supplyInfoList[i].Photo
|
||||
data.ArtistPhoto = supplyInfoList[i].ArtistPhoto
|
||||
data.Width = uint64(supplyInfoList[i].Width)
|
||||
data.Height = uint64(supplyInfoList[i].Height)
|
||||
data.Ruler = uint64(supplyInfoList[i].Ruler)
|
||||
data.ExhibitInfo = supplyInfoList[i].ExhibitInfo
|
||||
data.ExhibitPic1 = supplyInfoList[i].ExhibitPic1
|
||||
data.ExhibitPic2 = supplyInfoList[i].ExhibitPic2
|
||||
data.CreateTime = supplyInfoList[i].CreateTime
|
||||
data.Introduct = supplyInfoList[i].Introduct
|
||||
data.NetworkTrace = supplyInfoList[i].NetworkTrace
|
||||
data.CreateAddress = supplyInfoList[i].CreateAddress
|
||||
data.Url = supplyInfoList[i].Url
|
||||
data.Types = supplyInfoList[i].State
|
||||
data.Remark = supplyInfoList[i].Remark
|
||||
data.Remark2 = supplyInfoList[i].Remark2
|
||||
data.Enable = supplyInfoList[i].Enable
|
||||
datas = append(datas, data)
|
||||
}
|
||||
rep.Data = datas
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GetSupplyInfo(req *supplyinfo.GetSupplyInfoRequest) (rep *supplyinfo.GetSupplyInfoData, err error) {
|
||||
rep = &supplyinfo.GetSupplyInfoData{}
|
||||
|
||||
var supplyInfoTmp model.SupplyInfo
|
||||
if err := db.DB.Where("id = ?", req.Id).Find(&supplyInfoTmp).Error; err != nil {
|
||||
zap.L().Error("get supplyInfo infos err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
rep.ID = uint64(supplyInfoTmp.ID)
|
||||
rep.ArtworkId = supplyInfoTmp.ArtworkId
|
||||
rep.ArtistId = supplyInfoTmp.ArtistId
|
||||
rep.UserId = uint64(supplyInfoTmp.UserId)
|
||||
rep.Name = supplyInfoTmp.Name
|
||||
rep.ModelYear = supplyInfoTmp.ModelYear
|
||||
rep.Photo = supplyInfoTmp.Photo
|
||||
rep.ArtistPhoto = supplyInfoTmp.ArtistPhoto
|
||||
rep.Width = uint64(supplyInfoTmp.Width)
|
||||
rep.Height = uint64(supplyInfoTmp.Height)
|
||||
rep.Ruler = uint64(supplyInfoTmp.Ruler)
|
||||
rep.ExhibitInfo = supplyInfoTmp.ExhibitInfo
|
||||
rep.ExhibitPic1 = supplyInfoTmp.ExhibitPic1
|
||||
rep.ExhibitPic2 = supplyInfoTmp.ExhibitPic2
|
||||
rep.CreateTime = supplyInfoTmp.CreateTime
|
||||
rep.Introduct = supplyInfoTmp.Introduct
|
||||
rep.NetworkTrace = supplyInfoTmp.NetworkTrace
|
||||
rep.CreateAddress = supplyInfoTmp.CreateAddress
|
||||
rep.Url = supplyInfoTmp.Url
|
||||
rep.Types = supplyInfoTmp.State
|
||||
rep.Remark = supplyInfoTmp.Remark
|
||||
rep.Remark2 = supplyInfoTmp.Remark2
|
||||
rep.Enable = supplyInfoTmp.Enable
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func UpdateSupplyInfo(req *supplyinfo.UpdateSupplyInfoRequest) (rep *supplyinfo.UpdateSupplyInfoRespond, err error) {
|
||||
var SupplyInfo model.SupplyInfo
|
||||
if err := db.DB.Where("id = ? ", req.ID).Find(&SupplyInfo).Error; err != nil {
|
||||
zap.L().Error("get supplyInfo info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
SupplyInfo.CreateTime = req.CreateTime
|
||||
SupplyInfo.ModelYear = req.ModelYear
|
||||
SupplyInfo.NetworkTrace = req.NetworkTrace
|
||||
SupplyInfo.Url = req.Url
|
||||
SupplyInfo.Introduct = req.Introduct
|
||||
SupplyInfo.State = req.Types
|
||||
SupplyInfo.ExhibitInfo = req.ExhibitInfo
|
||||
SupplyInfo.ExhibitPic1 = req.ExhibitPic1
|
||||
SupplyInfo.ExhibitPic2 = req.ExhibitPic2
|
||||
|
||||
if err = db.DB.Save(&SupplyInfo).Error; err != nil {
|
||||
zap.L().Error("save supplyInfo info err", zap.Error(err))
|
||||
err = errors.New(m.SAVE_ERROR)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GetVideoList(id int32) (rep *supplyinfo.GetVideoListRespond, err error) {
|
||||
rep = &supplyinfo.GetVideoListRespond{}
|
||||
var datas []*supplyinfo.GetVideoListData
|
||||
|
||||
var ExhVideo []model.ExhVideo
|
||||
if err := db.DB.Where("user_id = ? and types <=4", id).Find(&ExhVideo).Error; err != nil {
|
||||
zap.L().Error("get exhVideo infos err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for _, v := range ExhVideo {
|
||||
var data supplyinfo.GetVideoListData
|
||||
data.ID = uint64(v.ID)
|
||||
data.UserId = uint64(v.UserId)
|
||||
data.Url = v.Url
|
||||
data.Types = v.State
|
||||
data.Remark = v.Remark
|
||||
data.Remark2 = v.Remark2
|
||||
data.Enable = v.Enable
|
||||
|
||||
datas = append(datas, &data)
|
||||
}
|
||||
|
||||
rep.Data = datas
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GetVideo(req *supplyinfo.GetVideoRequest) (rep *supplyinfo.GetVideoListData, err error) {
|
||||
rep = &supplyinfo.GetVideoListData{}
|
||||
|
||||
var ExhVideo model.ExhVideo
|
||||
if err := db.DB.Where("id = ?", req.ID).First(&ExhVideo).Error; err != nil {
|
||||
zap.L().Error("get exhVideo info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
rep.ID = uint64(ExhVideo.ID)
|
||||
rep.UserId = uint64(ExhVideo.UserId)
|
||||
rep.Url = ExhVideo.Url
|
||||
rep.Types = ExhVideo.State
|
||||
rep.Remark = ExhVideo.Remark
|
||||
rep.Remark2 = ExhVideo.Remark2
|
||||
rep.Enable = ExhVideo.Enable
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func UpdateVideo(req *supplyinfo.UpdateVideoRequest) (rep *supplyinfo.UpdateVideoRespond, err error) {
|
||||
rep = &supplyinfo.UpdateVideoRespond{}
|
||||
|
||||
var ExhVideo model.ExhVideo
|
||||
if err := db.DB.Where("id = ? ", req.ID).First(&ExhVideo).Error; err != nil {
|
||||
zap.L().Error("get exhVideo info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ExhVideo.Url = req.Url
|
||||
ExhVideo.State = req.Types
|
||||
|
||||
if err := db.DB.Save(&ExhVideo).Error; err != nil {
|
||||
zap.L().Error("save exhVideo info err", zap.Error(err))
|
||||
err = errors.New(m.SAVE_ERROR)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GetExam(req *supplyinfo.GetExamRequest) (rep *supplyinfo.GetExamListData, err error) {
|
||||
rep = &supplyinfo.GetExamListData{}
|
||||
|
||||
var ExhExam model.ExhExam
|
||||
if err := db.DB.Where("id = ?", req.ID).First(&ExhExam).Error; err != nil {
|
||||
zap.L().Error("get exhVideo info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
rep.ID = uint64(ExhExam.ID)
|
||||
rep.UserId = uint64(ExhExam.UserId)
|
||||
rep.Title = ExhExam.Title
|
||||
rep.Class = ExhExam.Class
|
||||
rep.TitleScore = uint64(ExhExam.TitleScore)
|
||||
rep.Score = ExhExam.Score
|
||||
rep.Types = ExhExam.State
|
||||
rep.Remark = ExhExam.Remark
|
||||
rep.Remark2 = ExhExam.Remark2
|
||||
rep.Enable = ExhExam.Enable
|
||||
return
|
||||
}
|
||||
|
||||
func GetExamList(req *supplyinfo.GetExamListRequest) (rep *supplyinfo.GetExamListRespond, err error) {
|
||||
rep = &supplyinfo.GetExamListRespond{}
|
||||
var datas []*supplyinfo.GetExamListData
|
||||
|
||||
var ExhExam []model.ExhExam
|
||||
if err := db.DB.Where("user_id = ? and types <=4", req.ID).Find(&ExhExam).Error; err != nil {
|
||||
zap.L().Error("get exhVideo infos err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for _, v := range ExhExam {
|
||||
var data supplyinfo.GetExamListData
|
||||
|
||||
data.ID = uint64(v.ID)
|
||||
data.UserId = uint64(v.UserId)
|
||||
data.Title = v.Title
|
||||
data.Class = v.Class
|
||||
data.TitleScore = uint64(v.TitleScore)
|
||||
data.Score = v.Score
|
||||
data.Types = v.State
|
||||
data.Remark = v.Remark
|
||||
data.Remark2 = v.Remark2
|
||||
data.Enable = v.Enable
|
||||
|
||||
datas = append(datas, &data)
|
||||
}
|
||||
|
||||
rep.Data = datas
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func UpdateExam(req *supplyinfo.UpdateExamRequest) (rep *supplyinfo.UpdateExamRespond, err error) {
|
||||
rep = &supplyinfo.UpdateExamRespond{}
|
||||
|
||||
var ExhExam model.ExhExam
|
||||
if err := db.DB.Where("id = ? ", req.ID).First(&ExhExam).Error; err != nil {
|
||||
zap.L().Error("get exhVideo info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ExhExam.Score = req.Score
|
||||
ExhExam.Class = req.Class
|
||||
ExhExam.State = req.Types
|
||||
ExhExam.Title = req.Title
|
||||
ExhExam.Class = req.Class
|
||||
ExhExam.TitleScore = uint(req.TitleScore)
|
||||
ExhExam.Score = req.Score
|
||||
ExhExam.State = req.Types
|
||||
ExhExam.Remark = req.Remark
|
||||
ExhExam.Remark2 = req.Remark2
|
||||
|
||||
var score map[string]int32
|
||||
var titleScore int32
|
||||
|
||||
json.Unmarshal([]byte(req.Score), &score)
|
||||
|
||||
for _, v := range score {
|
||||
titleScore = titleScore + v
|
||||
}
|
||||
|
||||
ExhExam.TitleScore = uint(titleScore)
|
||||
|
||||
if err = db.DB.Save(&ExhExam).Error; err != nil {
|
||||
zap.L().Error("save supplyInfo info err", zap.Error(err))
|
||||
err = errors.New(m.SAVE_ERROR)
|
||||
return
|
||||
}
|
||||
|
||||
if req.Types == "2" {
|
||||
type titleScore struct {
|
||||
UserId uint
|
||||
Score int
|
||||
}
|
||||
|
||||
var tmp []model.ExhExam
|
||||
if err = db.DB.Where("class = ?", req.Class).Order("title_score desc").Find(&tmp).Error; err != nil {
|
||||
zap.L().Error("get exhExam infos err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var ranking int
|
||||
for k, v := range tmp {
|
||||
if v.UserId == uint(req.UserId) {
|
||||
ranking = k
|
||||
}
|
||||
}
|
||||
|
||||
percent := (ranking + 1) / len(tmp) * 100
|
||||
rep.Percent = int32(percent)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GetArtistInfoList(id int32) (rep *supplyinfo.GetArtistInfoListRespond, err error) {
|
||||
rep = &supplyinfo.GetArtistInfoListRespond{}
|
||||
var datas []*supplyinfo.GetArtistInfoListData
|
||||
|
||||
var artistInfoTmp []model.ArtistInfo
|
||||
if err = db.DB.Where("user_id = ? and state <=4 ", id).Find(&artistInfoTmp).Error; err != nil {
|
||||
zap.L().Error("get artistInfo infos err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for k, v := range artistInfoTmp {
|
||||
artistInfoTmp[k].Model.ID = v.ID
|
||||
data := &supplyinfo.GetArtistInfoListData{}
|
||||
|
||||
data.ID = uint64(artistInfoTmp[k].ID)
|
||||
data.UserId = uint64(artistInfoTmp[k].UserId)
|
||||
data.ArtistId = artistInfoTmp[k].ArtistId
|
||||
data.BankAccount = artistInfoTmp[k].BankAccount
|
||||
data.BankName = artistInfoTmp[k].BankName
|
||||
data.Introduct = artistInfoTmp[k].Introduct
|
||||
data.CountryArtLevel = artistInfoTmp[k].CountryArtLevel
|
||||
data.ArtistCertPic = artistInfoTmp[k].ArtistCertPic
|
||||
data.Remark = artistInfoTmp[k].Remark
|
||||
data.Remark2 = artistInfoTmp[k].Remark2
|
||||
data.State = uint64(artistInfoTmp[k].State)
|
||||
|
||||
datas = append(datas, data)
|
||||
}
|
||||
|
||||
rep.Data = datas
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func GetArtistInfo(req *supplyinfo.GetArtistInfoRequest) (rep *supplyinfo.GetArtistInfoListData, err error) {
|
||||
rep = &supplyinfo.GetArtistInfoListData{}
|
||||
|
||||
var artistInfoTmp model.ArtistInfo
|
||||
if err := db.DB.Where("id = ?", req.ID).Find(&artistInfoTmp).Error; err != nil {
|
||||
zap.L().Error("get artistInfo info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
rep.ID = uint64(artistInfoTmp.ID)
|
||||
rep.UserId = uint64(artistInfoTmp.UserId)
|
||||
rep.ArtistId = artistInfoTmp.ArtistId
|
||||
rep.BankAccount = artistInfoTmp.BankAccount
|
||||
rep.BankName = artistInfoTmp.BankName
|
||||
rep.Introduct = artistInfoTmp.Introduct
|
||||
rep.CountryArtLevel = artistInfoTmp.CountryArtLevel
|
||||
rep.ArtistCertPic = artistInfoTmp.ArtistCertPic
|
||||
rep.Remark = artistInfoTmp.Remark
|
||||
rep.Remark2 = artistInfoTmp.Remark2
|
||||
rep.State = uint64(artistInfoTmp.State)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func UpdateArtistInfo(req *supplyinfo.UpdateArtistInfoRequest) (rep *supplyinfo.UpdateArtistInfoRespond, err error) {
|
||||
rep = &supplyinfo.UpdateArtistInfoRespond{}
|
||||
|
||||
var artistInfoTmp model.ArtistInfo
|
||||
if err := db.DB.Where("id = ? ", req.ID).Find(&artistInfoTmp).Error; err != nil {
|
||||
zap.L().Error("get artistInfo info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
artistInfoTmp.BankAccount = req.BankAccount
|
||||
artistInfoTmp.BankName = req.BankName
|
||||
artistInfoTmp.Introduct = req.Introduct
|
||||
artistInfoTmp.State = uint(req.State)
|
||||
artistInfoTmp.CountryArtLevel = req.CountryArtLevel
|
||||
artistInfoTmp.ArtistCertPic = req.ArtistCertPic
|
||||
|
||||
if err = db.DB.Save(&artistInfoTmp).Error; err != nil {
|
||||
zap.L().Error("save supplyInfo info err", zap.Error(err))
|
||||
err = errors.New(m.SAVE_ERROR)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
//
|
||||
//func GetSupplyInfoList(id, num int32) (rep *supplyinfo.GetSupplyInfoListRespond, err error) {
|
||||
// rep = &supplyinfo.GetSupplyInfoListRespond{}
|
||||
// var datas []*supplyinfo.GetSupplyInfoData
|
||||
//
|
||||
// var supplyInfoList []model.SupplyInfo
|
||||
// if err := db.DB.Where("user_id = ? and types <= ?", id, num).Find(&supplyInfoList).Error; err != nil {
|
||||
// zap.L().Error("get supplyInfo infos err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// for i, v := range supplyInfoList {
|
||||
// supplyInfoList[i].CreateTime = v.CreatedAt.Format("2006-01-02")
|
||||
// data := &supplyinfo.GetSupplyInfoData{}
|
||||
// data.ID = uint64(supplyInfoList[i].ID)
|
||||
// data.ArtworkId = supplyInfoList[i].ArtworkId
|
||||
// data.ArtistId = supplyInfoList[i].ArtistId
|
||||
// data.UserId = uint64(supplyInfoList[i].UserId)
|
||||
// data.Name = supplyInfoList[i].Name
|
||||
// data.ModelYear = supplyInfoList[i].ModelYear
|
||||
// data.Photo = supplyInfoList[i].Photo
|
||||
// data.ArtistPhoto = supplyInfoList[i].ArtistPhoto
|
||||
// data.Width = uint64(supplyInfoList[i].Width)
|
||||
// data.Height = uint64(supplyInfoList[i].Height)
|
||||
// data.Ruler = uint64(supplyInfoList[i].Ruler)
|
||||
// data.ExhibitInfo = supplyInfoList[i].ExhibitInfo
|
||||
// data.ExhibitPic1 = supplyInfoList[i].ExhibitPic1
|
||||
// data.ExhibitPic2 = supplyInfoList[i].ExhibitPic2
|
||||
// data.CreateTime = supplyInfoList[i].CreateTime
|
||||
// data.Introduct = supplyInfoList[i].Introduct
|
||||
// data.NetworkTrace = supplyInfoList[i].NetworkTrace
|
||||
// data.CreateAddress = supplyInfoList[i].CreateAddress
|
||||
// data.Url = supplyInfoList[i].Url
|
||||
// data.Types = supplyInfoList[i].State
|
||||
// data.Remark = supplyInfoList[i].Remark
|
||||
// data.Remark2 = supplyInfoList[i].Remark2
|
||||
// data.Enable = supplyInfoList[i].Enable
|
||||
// datas = append(datas, data)
|
||||
// }
|
||||
// rep.Data = datas
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func GetSupplyInfo(req *supplyinfo.GetSupplyInfoRequest) (rep *supplyinfo.GetSupplyInfoData, err error) {
|
||||
// rep = &supplyinfo.GetSupplyInfoData{}
|
||||
//
|
||||
// var supplyInfoTmp model.SupplyInfo
|
||||
// if err := db.DB.Where("id = ?", req.Id).Find(&supplyInfoTmp).Error; err != nil {
|
||||
// zap.L().Error("get supplyInfo infos err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
// rep.ID = uint64(supplyInfoTmp.ID)
|
||||
// rep.ArtworkId = supplyInfoTmp.ArtworkId
|
||||
// rep.ArtistId = supplyInfoTmp.ArtistId
|
||||
// rep.UserId = uint64(supplyInfoTmp.UserId)
|
||||
// rep.Name = supplyInfoTmp.Name
|
||||
// rep.ModelYear = supplyInfoTmp.ModelYear
|
||||
// rep.Photo = supplyInfoTmp.Photo
|
||||
// rep.ArtistPhoto = supplyInfoTmp.ArtistPhoto
|
||||
// rep.Width = uint64(supplyInfoTmp.Width)
|
||||
// rep.Height = uint64(supplyInfoTmp.Height)
|
||||
// rep.Ruler = uint64(supplyInfoTmp.Ruler)
|
||||
// rep.ExhibitInfo = supplyInfoTmp.ExhibitInfo
|
||||
// rep.ExhibitPic1 = supplyInfoTmp.ExhibitPic1
|
||||
// rep.ExhibitPic2 = supplyInfoTmp.ExhibitPic2
|
||||
// rep.CreateTime = supplyInfoTmp.CreateTime
|
||||
// rep.Introduct = supplyInfoTmp.Introduct
|
||||
// rep.NetworkTrace = supplyInfoTmp.NetworkTrace
|
||||
// rep.CreateAddress = supplyInfoTmp.CreateAddress
|
||||
// rep.Url = supplyInfoTmp.Url
|
||||
// rep.Types = supplyInfoTmp.State
|
||||
// rep.Remark = supplyInfoTmp.Remark
|
||||
// rep.Remark2 = supplyInfoTmp.Remark2
|
||||
// rep.Enable = supplyInfoTmp.Enable
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func UpdateSupplyInfo(req *supplyinfo.UpdateSupplyInfoRequest) (rep *supplyinfo.UpdateSupplyInfoRespond, err error) {
|
||||
// var SupplyInfo model.SupplyInfo
|
||||
// if err := db.DB.Where("id = ? ", req.ID).Find(&SupplyInfo).Error; err != nil {
|
||||
// zap.L().Error("get supplyInfo info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// SupplyInfo.CreateTime = req.CreateTime
|
||||
// SupplyInfo.ModelYear = req.ModelYear
|
||||
// SupplyInfo.NetworkTrace = req.NetworkTrace
|
||||
// SupplyInfo.Url = req.Url
|
||||
// SupplyInfo.Introduct = req.Introduct
|
||||
// SupplyInfo.State = req.Types
|
||||
// SupplyInfo.ExhibitInfo = req.ExhibitInfo
|
||||
// SupplyInfo.ExhibitPic1 = req.ExhibitPic1
|
||||
// SupplyInfo.ExhibitPic2 = req.ExhibitPic2
|
||||
//
|
||||
// if err = db.DB.Save(&SupplyInfo).Error; err != nil {
|
||||
// zap.L().Error("save supplyInfo info err", zap.Error(err))
|
||||
// err = errors.New(m.SAVE_ERROR)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func GetVideoList(id int32) (rep *supplyinfo.GetVideoListRespond, err error) {
|
||||
// rep = &supplyinfo.GetVideoListRespond{}
|
||||
// var datas []*supplyinfo.GetVideoListData
|
||||
//
|
||||
// var ExhVideo []model.ExhVideo
|
||||
// if err := db.DB.Where("user_id = ? and types <=4", id).Find(&ExhVideo).Error; err != nil {
|
||||
// zap.L().Error("get exhVideo infos err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// for _, v := range ExhVideo {
|
||||
// var data supplyinfo.GetVideoListData
|
||||
// data.ID = uint64(v.ID)
|
||||
// data.UserId = uint64(v.UserId)
|
||||
// data.Url = v.Url
|
||||
// data.Types = v.State
|
||||
// data.Remark = v.Remark
|
||||
// data.Remark2 = v.Remark2
|
||||
// data.Enable = v.Enable
|
||||
//
|
||||
// datas = append(datas, &data)
|
||||
// }
|
||||
//
|
||||
// rep.Data = datas
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func GetVideo(req *supplyinfo.GetVideoRequest) (rep *supplyinfo.GetVideoListData, err error) {
|
||||
// rep = &supplyinfo.GetVideoListData{}
|
||||
//
|
||||
// var ExhVideo model.ExhVideo
|
||||
// if err := db.DB.Where("id = ?", req.ID).First(&ExhVideo).Error; err != nil {
|
||||
// zap.L().Error("get exhVideo info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// rep.ID = uint64(ExhVideo.ID)
|
||||
// rep.UserId = uint64(ExhVideo.UserId)
|
||||
// rep.Url = ExhVideo.Url
|
||||
// rep.Types = ExhVideo.State
|
||||
// rep.Remark = ExhVideo.Remark
|
||||
// rep.Remark2 = ExhVideo.Remark2
|
||||
// rep.Enable = ExhVideo.Enable
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func UpdateVideo(req *supplyinfo.UpdateVideoRequest) (rep *supplyinfo.UpdateVideoRespond, err error) {
|
||||
// rep = &supplyinfo.UpdateVideoRespond{}
|
||||
//
|
||||
// var ExhVideo model.ExhVideo
|
||||
// if err := db.DB.Where("id = ? ", req.ID).First(&ExhVideo).Error; err != nil {
|
||||
// zap.L().Error("get exhVideo info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// ExhVideo.Url = req.Url
|
||||
// ExhVideo.State = req.Types
|
||||
//
|
||||
// if err := db.DB.Save(&ExhVideo).Error; err != nil {
|
||||
// zap.L().Error("save exhVideo info err", zap.Error(err))
|
||||
// err = errors.New(m.SAVE_ERROR)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func GetExam(req *supplyinfo.GetExamRequest) (rep *supplyinfo.GetExamListData, err error) {
|
||||
// rep = &supplyinfo.GetExamListData{}
|
||||
//
|
||||
// var ExhExam model.ExhExam
|
||||
// if err := db.DB.Where("id = ?", req.ID).First(&ExhExam).Error; err != nil {
|
||||
// zap.L().Error("get exhVideo info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// rep.ID = uint64(ExhExam.ID)
|
||||
// rep.UserId = uint64(ExhExam.UserId)
|
||||
// rep.Title = ExhExam.Title
|
||||
// rep.Class = ExhExam.Class
|
||||
// rep.TitleScore = uint64(ExhExam.TitleScore)
|
||||
// rep.Score = ExhExam.Score
|
||||
// rep.Types = ExhExam.State
|
||||
// rep.Remark = ExhExam.Remark
|
||||
// rep.Remark2 = ExhExam.Remark2
|
||||
// rep.Enable = ExhExam.Enable
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func GetExamList(req *supplyinfo.GetExamListRequest) (rep *supplyinfo.GetExamListRespond, err error) {
|
||||
// rep = &supplyinfo.GetExamListRespond{}
|
||||
// var datas []*supplyinfo.GetExamListData
|
||||
//
|
||||
// var ExhExam []model.ExhExam
|
||||
// if err := db.DB.Where("user_id = ? and types <=4", req.ID).Find(&ExhExam).Error; err != nil {
|
||||
// zap.L().Error("get exhVideo infos err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// for _, v := range ExhExam {
|
||||
// var data supplyinfo.GetExamListData
|
||||
//
|
||||
// data.ID = uint64(v.ID)
|
||||
// data.UserId = uint64(v.UserId)
|
||||
// data.Title = v.Title
|
||||
// data.Class = v.Class
|
||||
// data.TitleScore = uint64(v.TitleScore)
|
||||
// data.Score = v.Score
|
||||
// data.Types = v.State
|
||||
// data.Remark = v.Remark
|
||||
// data.Remark2 = v.Remark2
|
||||
// data.Enable = v.Enable
|
||||
//
|
||||
// datas = append(datas, &data)
|
||||
// }
|
||||
//
|
||||
// rep.Data = datas
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func UpdateExam(req *supplyinfo.UpdateExamRequest) (rep *supplyinfo.UpdateExamRespond, err error) {
|
||||
// rep = &supplyinfo.UpdateExamRespond{}
|
||||
//
|
||||
// var ExhExam model.ExhExam
|
||||
// if err := db.DB.Where("id = ? ", req.ID).First(&ExhExam).Error; err != nil {
|
||||
// zap.L().Error("get exhVideo info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// ExhExam.Score = req.Score
|
||||
// ExhExam.Class = req.Class
|
||||
// ExhExam.State = req.Types
|
||||
// ExhExam.Title = req.Title
|
||||
// ExhExam.Class = req.Class
|
||||
// ExhExam.TitleScore = uint(req.TitleScore)
|
||||
// ExhExam.Score = req.Score
|
||||
// ExhExam.State = req.Types
|
||||
// ExhExam.Remark = req.Remark
|
||||
// ExhExam.Remark2 = req.Remark2
|
||||
//
|
||||
// var score map[string]int32
|
||||
// var titleScore int32
|
||||
//
|
||||
// json.Unmarshal([]byte(req.Score), &score)
|
||||
//
|
||||
// for _, v := range score {
|
||||
// titleScore = titleScore + v
|
||||
// }
|
||||
//
|
||||
// ExhExam.TitleScore = uint(titleScore)
|
||||
//
|
||||
// if err = db.DB.Save(&ExhExam).Error; err != nil {
|
||||
// zap.L().Error("save supplyInfo info err", zap.Error(err))
|
||||
// err = errors.New(m.SAVE_ERROR)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// if req.Types == "2" {
|
||||
// type titleScore struct {
|
||||
// UserId uint
|
||||
// Score int
|
||||
// }
|
||||
//
|
||||
// var tmp []model.ExhExam
|
||||
// if err = db.DB.Where("class = ?", req.Class).Order("title_score desc").Find(&tmp).Error; err != nil {
|
||||
// zap.L().Error("get exhExam infos err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// var ranking int
|
||||
// for k, v := range tmp {
|
||||
// if v.UserId == uint(req.UserId) {
|
||||
// ranking = k
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// percent := (ranking + 1) / len(tmp) * 100
|
||||
// rep.Percent = int32(percent)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func GetArtistInfoList(id int32) (rep *supplyinfo.GetArtistInfoListRespond, err error) {
|
||||
// rep = &supplyinfo.GetArtistInfoListRespond{}
|
||||
// var datas []*supplyinfo.GetArtistInfoListData
|
||||
//
|
||||
// var artistInfoTmp []old.ArtistInfo
|
||||
// if err = db.DB.Where("user_id = ? and state <=4 ", id).Find(&artistInfoTmp).Error; err != nil {
|
||||
// zap.L().Error("get artistInfo infos err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// for k, v := range artistInfoTmp {
|
||||
// artistInfoTmp[k].Model.ID = v.ID
|
||||
// data := &supplyinfo.GetArtistInfoListData{}
|
||||
//
|
||||
// data.ID = uint64(artistInfoTmp[k].ID)
|
||||
// data.UserId = uint64(artistInfoTmp[k].UserId)
|
||||
// data.ArtistId = artistInfoTmp[k].ArtistId
|
||||
// data.BankAccount = artistInfoTmp[k].BankAccount
|
||||
// data.BankName = artistInfoTmp[k].BankName
|
||||
// data.Introduct = artistInfoTmp[k].Introduct
|
||||
// data.CountryArtLevel = artistInfoTmp[k].CountryArtLevel
|
||||
// data.ArtistCertPic = artistInfoTmp[k].ArtistCertPic
|
||||
// data.Remark = artistInfoTmp[k].Remark
|
||||
// data.Remark2 = artistInfoTmp[k].Remark2
|
||||
// data.State = uint64(artistInfoTmp[k].State)
|
||||
//
|
||||
// datas = append(datas, data)
|
||||
// }
|
||||
//
|
||||
// rep.Data = datas
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func GetArtistInfo(req *supplyinfo.GetArtistInfoRequest) (rep *supplyinfo.GetArtistInfoListData, err error) {
|
||||
// rep = &supplyinfo.GetArtistInfoListData{}
|
||||
//
|
||||
// var artistInfoTmp old.ArtistInfo
|
||||
// if err := db.DB.Where("id = ?", req.ID).Find(&artistInfoTmp).Error; err != nil {
|
||||
// zap.L().Error("get artistInfo info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
// rep.ID = uint64(artistInfoTmp.ID)
|
||||
// rep.UserId = uint64(artistInfoTmp.UserId)
|
||||
// rep.ArtistId = artistInfoTmp.ArtistId
|
||||
// rep.BankAccount = artistInfoTmp.BankAccount
|
||||
// rep.BankName = artistInfoTmp.BankName
|
||||
// rep.Introduct = artistInfoTmp.Introduct
|
||||
// rep.CountryArtLevel = artistInfoTmp.CountryArtLevel
|
||||
// rep.ArtistCertPic = artistInfoTmp.ArtistCertPic
|
||||
// rep.Remark = artistInfoTmp.Remark
|
||||
// rep.Remark2 = artistInfoTmp.Remark2
|
||||
// rep.State = uint64(artistInfoTmp.State)
|
||||
//
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func UpdateArtistInfo(req *supplyinfo.UpdateArtistInfoRequest) (rep *supplyinfo.UpdateArtistInfoRespond, err error) {
|
||||
// rep = &supplyinfo.UpdateArtistInfoRespond{}
|
||||
//
|
||||
// var artistInfoTmp old.ArtistInfo
|
||||
// if err := db.DB.Where("id = ? ", req.ID).Find(&artistInfoTmp).Error; err != nil {
|
||||
// zap.L().Error("get artistInfo info err", zap.Error(err))
|
||||
// err = errors.New(m.ERROR_SELECT)
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// artistInfoTmp.BankAccount = req.BankAccount
|
||||
// artistInfoTmp.BankName = req.BankName
|
||||
// artistInfoTmp.Introduct = req.Introduct
|
||||
// artistInfoTmp.State = uint(req.State)
|
||||
// artistInfoTmp.CountryArtLevel = req.CountryArtLevel
|
||||
// artistInfoTmp.ArtistCertPic = req.ArtistCertPic
|
||||
//
|
||||
// if err = db.DB.Save(&artistInfoTmp).Error; err != nil {
|
||||
// zap.L().Error("save supplyInfo info err", zap.Error(err))
|
||||
// err = errors.New(m.SAVE_ERROR)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// return
|
||||
//}
|
||||
|
@ -1,88 +1,84 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/internal/dao"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/supplyinfo"
|
||||
)
|
||||
|
||||
type ISupply interface {
|
||||
GetSupplyInfoList(req *supplyinfo.GetSupplyInfoListRequest) (rep *supplyinfo.GetSupplyInfoListRespond, err error)
|
||||
GetSupplyInfo(req *supplyinfo.GetSupplyInfoRequest) (rep *supplyinfo.GetSupplyInfoData, err error)
|
||||
UpdateSupplyInfo(req *supplyinfo.UpdateSupplyInfoRequest) (rep *supplyinfo.UpdateSupplyInfoRespond, err error)
|
||||
GetVideoList(req *supplyinfo.GetVideoListRequest) (rep *supplyinfo.GetVideoListRespond, err error)
|
||||
GetVideo(req *supplyinfo.GetVideoRequest) (rep *supplyinfo.GetVideoListData, err error)
|
||||
UpdateVideo(req *supplyinfo.UpdateVideoRequest) (rep *supplyinfo.UpdateVideoRespond, err error)
|
||||
GetExam(req *supplyinfo.GetExamRequest) (rep *supplyinfo.GetExamListData, err error)
|
||||
GetExamList(req *supplyinfo.GetExamListRequest) (rep *supplyinfo.GetExamListRespond, err error)
|
||||
UpdateExam(req *supplyinfo.UpdateExamRequest) (rep *supplyinfo.UpdateExamRespond, err error)
|
||||
GetArtistInfoList(req *supplyinfo.GetArtistInfoListRequest) (rep *supplyinfo.GetArtistInfoListRespond, err error)
|
||||
GetArtistInfo(req *supplyinfo.GetArtistInfoRequest) (rep *supplyinfo.GetArtistInfoListData, err error)
|
||||
UpdateArtistInfo(req *supplyinfo.UpdateArtistInfoRequest) (rep *supplyinfo.UpdateArtistInfoRespond, err error)
|
||||
}
|
||||
|
||||
func NewSupply() ISupply {
|
||||
return &Supply{}
|
||||
}
|
||||
|
||||
type Supply struct {
|
||||
}
|
||||
|
||||
func (a *Supply) GetSupplyInfoList(req *supplyinfo.GetSupplyInfoListRequest) (rep *supplyinfo.GetSupplyInfoListRespond, err error) {
|
||||
rep, err = dao.GetSupplyInfoList(int32(req.ArtistId), int32(req.Types))
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Supply) GetSupplyInfo(req *supplyinfo.GetSupplyInfoRequest) (rep *supplyinfo.GetSupplyInfoData, err error) {
|
||||
rep, err = dao.GetSupplyInfo(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Supply) UpdateSupplyInfo(req *supplyinfo.UpdateSupplyInfoRequest) (rep *supplyinfo.UpdateSupplyInfoRespond, err error) {
|
||||
rep, err = dao.UpdateSupplyInfo(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Supply) GetVideoList(req *supplyinfo.GetVideoListRequest) (rep *supplyinfo.GetVideoListRespond, err error) {
|
||||
rep, err = dao.GetVideoList(int32(req.UserId))
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Supply) GetVideo(req *supplyinfo.GetVideoRequest) (rep *supplyinfo.GetVideoListData, err error) {
|
||||
rep, err = dao.GetVideo(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Supply) UpdateVideo(req *supplyinfo.UpdateVideoRequest) (rep *supplyinfo.UpdateVideoRespond, err error) {
|
||||
rep, err = dao.UpdateVideo(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Supply) GetExam(req *supplyinfo.GetExamRequest) (rep *supplyinfo.GetExamListData, err error) {
|
||||
rep, err = dao.GetExam(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Supply) GetExamList(req *supplyinfo.GetExamListRequest) (rep *supplyinfo.GetExamListRespond, err error) {
|
||||
rep, err = dao.GetExamList(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Supply) UpdateExam(req *supplyinfo.UpdateExamRequest) (rep *supplyinfo.UpdateExamRespond, err error) {
|
||||
rep, err = dao.UpdateExam(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Supply) GetArtistInfoList(req *supplyinfo.GetArtistInfoListRequest) (rep *supplyinfo.GetArtistInfoListRespond, err error) {
|
||||
rep, err = dao.GetArtistInfoList(int32(req.UserId))
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Supply) GetArtistInfo(req *supplyinfo.GetArtistInfoRequest) (rep *supplyinfo.GetArtistInfoListData, err error) {
|
||||
rep, err = dao.GetArtistInfo(req)
|
||||
return
|
||||
}
|
||||
|
||||
func (a *Supply) UpdateArtistInfo(req *supplyinfo.UpdateArtistInfoRequest) (rep *supplyinfo.UpdateArtistInfoRespond, err error) {
|
||||
rep, err = dao.UpdateArtistInfo(req)
|
||||
return
|
||||
}
|
||||
//
|
||||
//type ISupply interface {
|
||||
// GetSupplyInfoList(req *supplyinfo.GetSupplyInfoListRequest) (rep *supplyinfo.GetSupplyInfoListRespond, err error)
|
||||
// GetSupplyInfo(req *supplyinfo.GetSupplyInfoRequest) (rep *supplyinfo.GetSupplyInfoData, err error)
|
||||
// UpdateSupplyInfo(req *supplyinfo.UpdateSupplyInfoRequest) (rep *supplyinfo.UpdateSupplyInfoRespond, err error)
|
||||
// GetVideoList(req *supplyinfo.GetVideoListRequest) (rep *supplyinfo.GetVideoListRespond, err error)
|
||||
// GetVideo(req *supplyinfo.GetVideoRequest) (rep *supplyinfo.GetVideoListData, err error)
|
||||
// UpdateVideo(req *supplyinfo.UpdateVideoRequest) (rep *supplyinfo.UpdateVideoRespond, err error)
|
||||
// GetExam(req *supplyinfo.GetExamRequest) (rep *supplyinfo.GetExamListData, err error)
|
||||
// GetExamList(req *supplyinfo.GetExamListRequest) (rep *supplyinfo.GetExamListRespond, err error)
|
||||
// UpdateExam(req *supplyinfo.UpdateExamRequest) (rep *supplyinfo.UpdateExamRespond, err error)
|
||||
// GetArtistInfoList(req *supplyinfo.GetArtistInfoListRequest) (rep *supplyinfo.GetArtistInfoListRespond, err error)
|
||||
// GetArtistInfo(req *supplyinfo.GetArtistInfoRequest) (rep *supplyinfo.GetArtistInfoListData, err error)
|
||||
// UpdateArtistInfo(req *supplyinfo.UpdateArtistInfoRequest) (rep *supplyinfo.UpdateArtistInfoRespond, err error)
|
||||
//}
|
||||
//
|
||||
//func NewSupply() ISupply {
|
||||
// return &Supply{}
|
||||
//}
|
||||
//
|
||||
//type Supply struct {
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetSupplyInfoList(req *supplyinfo.GetSupplyInfoListRequest) (rep *supplyinfo.GetSupplyInfoListRespond, err error) {
|
||||
// rep, err = dao.GetSupplyInfoList(int32(req.ArtistId), int32(req.Types))
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetSupplyInfo(req *supplyinfo.GetSupplyInfoRequest) (rep *supplyinfo.GetSupplyInfoData, err error) {
|
||||
// rep, err = dao.GetSupplyInfo(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) UpdateSupplyInfo(req *supplyinfo.UpdateSupplyInfoRequest) (rep *supplyinfo.UpdateSupplyInfoRespond, err error) {
|
||||
// rep, err = dao.UpdateSupplyInfo(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetVideoList(req *supplyinfo.GetVideoListRequest) (rep *supplyinfo.GetVideoListRespond, err error) {
|
||||
// rep, err = dao.GetVideoList(int32(req.UserId))
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetVideo(req *supplyinfo.GetVideoRequest) (rep *supplyinfo.GetVideoListData, err error) {
|
||||
// rep, err = dao.GetVideo(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) UpdateVideo(req *supplyinfo.UpdateVideoRequest) (rep *supplyinfo.UpdateVideoRespond, err error) {
|
||||
// rep, err = dao.UpdateVideo(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetExam(req *supplyinfo.GetExamRequest) (rep *supplyinfo.GetExamListData, err error) {
|
||||
// rep, err = dao.GetExam(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetExamList(req *supplyinfo.GetExamListRequest) (rep *supplyinfo.GetExamListRespond, err error) {
|
||||
// rep, err = dao.GetExamList(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) UpdateExam(req *supplyinfo.UpdateExamRequest) (rep *supplyinfo.UpdateExamRespond, err error) {
|
||||
// rep, err = dao.UpdateExam(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetArtistInfoList(req *supplyinfo.GetArtistInfoListRequest) (rep *supplyinfo.GetArtistInfoListRespond, err error) {
|
||||
// rep, err = dao.GetArtistInfoList(int32(req.UserId))
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) GetArtistInfo(req *supplyinfo.GetArtistInfoRequest) (rep *supplyinfo.GetArtistInfoListData, err error) {
|
||||
// rep, err = dao.GetArtistInfo(req)
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//func (a *Supply) UpdateArtistInfo(req *supplyinfo.UpdateArtistInfoRequest) (rep *supplyinfo.UpdateArtistInfoRespond, err error) {
|
||||
// rep, err = dao.UpdateArtistInfo(req)
|
||||
// return
|
||||
//}
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model/old"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/old/artwork"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
@ -19,7 +20,7 @@ func ArtworkAdd(res *artwork.ArtworkAddRequest) (req *artwork.ArtworkAddRespond,
|
||||
err = errors.New(m.ERROR_MARSHAL)
|
||||
return
|
||||
}
|
||||
artwork := &model.Artwork{
|
||||
artwork := &old.Artwork{
|
||||
ArtistId: res.ArtistId,
|
||||
Name: res.Name,
|
||||
ModelYear: res.ModelYear,
|
||||
@ -46,7 +47,7 @@ func ArtworkAdd(res *artwork.ArtworkAddRequest) (req *artwork.ArtworkAddRespond,
|
||||
}
|
||||
|
||||
func UpdateArtwork(data *artwork.UpdateArtworkRequest) (err error) {
|
||||
var artwork model.Artwork
|
||||
var artwork old.Artwork
|
||||
artwork.ID = int32(data.ID)
|
||||
if err = db.DB.First(&artwork).Error; err != nil {
|
||||
zap.L().Error("get artwork info err", zap.Error(err))
|
||||
@ -86,7 +87,7 @@ func UpdateArtwork(data *artwork.UpdateArtworkRequest) (err error) {
|
||||
}
|
||||
|
||||
func DelArtwork(id int32) (err error) {
|
||||
if err = db.DB.Where("id = ?", id).Delete(&model.Artwork{}).Error; err != nil {
|
||||
if err = db.DB.Where("id = ?", id).Delete(&old.Artwork{}).Error; err != nil {
|
||||
zap.L().Error("delete artwork info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_DELETE)
|
||||
return
|
||||
@ -96,7 +97,7 @@ func DelArtwork(id int32) (err error) {
|
||||
}
|
||||
func ApproveArtwork(req *artwork.ApproveArtworkRequest) (rep *artwork.ApproveArtworkRespond, err error) {
|
||||
|
||||
var artwork model.Artwork
|
||||
var artwork old.Artwork
|
||||
artwork.ID = req.ArtworkId
|
||||
var state int32
|
||||
if req.IsApprove {
|
||||
@ -104,7 +105,7 @@ func ApproveArtwork(req *artwork.ApproveArtworkRequest) (rep *artwork.ApproveArt
|
||||
} else {
|
||||
state = 4
|
||||
}
|
||||
if err = db.DB.Model(&artwork).Updates(model.Artwork{State: state, Remark: req.Remark, Remark2: req.Remark2, ArtworkId: req.MgmtArtworkId}).Where("id", req.ArtworkId).Error; err != nil {
|
||||
if err = db.DB.Model(&artwork).Updates(old.Artwork{State: state, Remark: req.Remark, Remark2: req.Remark2, ArtworkId: req.MgmtArtworkId}).Where("id", req.ArtworkId).Error; err != nil {
|
||||
zap.L().Error("get artwork info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
return
|
||||
@ -115,7 +116,7 @@ func GetArtworkList(req *artwork.GetArtworkListRequest) (rep *artwork.GetArtwork
|
||||
rep = &artwork.GetArtworkListRespond{}
|
||||
var datas []*artwork.UpdateArtworkRequest
|
||||
fmt.Println("111")
|
||||
var artworkList []model.Artwork
|
||||
var artworkList []old.Artwork
|
||||
//找到用户 p[]
|
||||
if err = db.DB.Order("created_at desc").Where("artist_id = ?", req.ID).Find(&artworkList).Error; err != nil {
|
||||
fmt.Println("222")
|
||||
@ -154,7 +155,7 @@ func GetArtworkList(req *artwork.GetArtworkListRequest) (rep *artwork.GetArtwork
|
||||
func GetArtwork(id int32) (rep *artwork.GetArtworkRespond, err error) {
|
||||
rep = &artwork.GetArtworkRespond{}
|
||||
|
||||
var artworkRes model.Artwork
|
||||
var artworkRes old.Artwork
|
||||
if err = db.DB.Where("id = ?", id).First(&artworkRes).Error; err != nil {
|
||||
zap.L().Error("get artwork info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
@ -187,7 +188,7 @@ func GetArtwork(id int32) (rep *artwork.GetArtworkRespond, err error) {
|
||||
}
|
||||
|
||||
func UploadArtwork(Id uint64) (err error) {
|
||||
var artwork model.Artwork
|
||||
var artwork old.Artwork
|
||||
if err = db.DB.Find(&artwork, "id = ?", Id).Error; err != nil {
|
||||
zap.L().Error("get artwork info err", zap.Error(err))
|
||||
err = errors.New(m.ERROR_SELECT)
|
||||
@ -238,7 +239,7 @@ func GetMgmtArtworkList(req *artwork.GetMgmtArtworkListRequest) (rep *artwork.Ge
|
||||
return
|
||||
}
|
||||
rep.Count = uint64(artworkCount)
|
||||
var artworkList []model.Artwork
|
||||
var artworkList []old.Artwork
|
||||
//找到用户
|
||||
sqlWhere = sqlWhere + " limit ?,? "
|
||||
args = append(args, (req.Page-1)*req.PageSize)
|
||||
|
71
cmd/model/artworkEx.go
Normal file
71
cmd/model/artworkEx.go
Normal file
@ -0,0 +1,71 @@
|
||||
// Package model -----------------------------
|
||||
// @file : artworkEx.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/2/28 8:58
|
||||
// -------------------------------------------
|
||||
package model
|
||||
|
||||
import "fmt"
|
||||
|
||||
// 画展补充信息审批表
|
||||
//type ArtExhibitionAudit struct {
|
||||
// Model
|
||||
// //ArtworkUid string `json:"artworkUid" gorm:"column:artwork_uid;comment:画作uid"`
|
||||
// //ArtistUid string `json:"artistUid" gorm:"column:artist_uid;comment:画家uid"`
|
||||
// //UserId int64 `json:"userId" gorm:"column:user_id;comment:画家宝用户id"`
|
||||
// LockTime string `json:"lockTime" gorm:"column:lock_time;comment:锁定时间"`
|
||||
// AuditType auditType `json:"auditType" gorm:"column:audit_type;comment:审批类型"`
|
||||
// AuditModel
|
||||
//}
|
||||
//
|
||||
//func (a ArtExhibitionAudit) TableName() string {
|
||||
// return "art_exhibition_audit"
|
||||
//}
|
||||
|
||||
//// 画作信息补充审批
|
||||
//type AuditArtworkExt struct {
|
||||
// AuditInfo ArtExhibitionAudit `json:"AuditInfo" gorm:"polymorphic:Owner;polymorphicValue:AuditType_ArtworkExt"`
|
||||
//}
|
||||
//
|
||||
//// 画家视频资料补充审批
|
||||
//type AuditArtistVideo struct {
|
||||
// ArtworkId
|
||||
// AuditInfo ArtExhibitionAudit `json:"AuditInfo" gorm:"polymorphic:Owner;polymorphicValue:AuditType_ArtistVideo"`
|
||||
//}
|
||||
//
|
||||
//// 画家信息补充审批
|
||||
//type AuditArtistExt struct {
|
||||
// AuditInfo ArtExhibitionAudit `json:"AuditInfo" gorm:"polymorphic:Owner;polymorphicValue:AuditType_ArtistExt"`
|
||||
//}
|
||||
//
|
||||
//// 画家指数补充审批
|
||||
//type AuditArtistIndex struct {
|
||||
// AuditInfo ArtExhibitionAudit `json:"AuditInfo" gorm:"polymorphic:Owner;polymorphicValue:AuditType_ArtistIndex"`
|
||||
//}
|
||||
|
||||
// ======================================
|
||||
// auditType 审批类型
|
||||
type auditType int
|
||||
|
||||
const (
|
||||
AuditType_ArtworkExt auditType = iota + 1
|
||||
AuditType_ArtistVideo
|
||||
AuditType_ArtistIndex
|
||||
AuditType_ArtistExt
|
||||
)
|
||||
|
||||
var auditTypeMapper = map[auditType]string{
|
||||
AuditType_ArtworkExt: "画作信息补充审批",
|
||||
AuditType_ArtistVideo: "画家视频资料补充审批",
|
||||
AuditType_ArtistIndex: "画家指数补充审批",
|
||||
AuditType_ArtistExt: "画家信息补充审批",
|
||||
}
|
||||
|
||||
func (a auditType) String() string {
|
||||
if str, ok := auditTypeMapper[a]; ok {
|
||||
return str
|
||||
} else {
|
||||
return fmt.Sprintf("未知的审批类型:%d", int(a))
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package model
|
||||
|
||||
type ArtworkLockRecord struct {
|
||||
Model
|
||||
ArtistUid string `json:"artistUid" gorm:"column:artist_uid;type:varchar(191);comment:画家uid"`
|
||||
ArtworkUid string `json:"artworkUid" gorm:"column:artwork_uid;type:varchar(191);comment:画作uid"`
|
||||
Status int64 `json:"status" gorm:"column:status;default:1;comment:1=准备/暂存 2=锁定 3=解锁"`
|
||||
LockTime string `json:"lockTime" gorm:"column:lock_time;锁定时间"`
|
||||
AuditStatus int64 `json:"auditStatus" gorm:"column:audit_status;default:1;comment:审核状态 1:待审核/暂存 2:审核通过 3:审核不通过"`
|
||||
AuditMark string `json:"auditMark" gorm:"column:audit_mark;comment:审核备注"`
|
||||
AuditMark2 string `json:"auditMark2" gorm:"column:audit_mark2;comment:审核备注2"`
|
||||
//UserInfo User `gorm:"foreignKey:ArtistUid;reference:MgmtArtistUid"`
|
||||
}
|
||||
|
||||
func (a ArtworkLockRecord) TableName() string {
|
||||
return "artwork_lock_record"
|
||||
}
|
@ -1,9 +1,10 @@
|
||||
package model
|
||||
|
||||
// 画家指数
|
||||
type ExhExam struct {
|
||||
type ArtworkExExam struct {
|
||||
Model
|
||||
UserId uint `gorm:"column:user_id;default:0;comment:账号id" json:"userId"`
|
||||
ArtistUid string `json:"artistUid" gorm:"column:artist_uid;comment:"`
|
||||
Title string `gorm:"column:title;type:varchar(64);default:''" json:"title"`
|
||||
Class string `gorm:"column:class;type:varchar(25);default:''" json:"class"`
|
||||
TitleScore uint `gorm:"column:title_score;default:0" json:"titleScore"`
|
||||
@ -14,6 +15,6 @@ type ExhExam struct {
|
||||
Enable bool `gorm:"column:enable;default:0" json:"enable"`
|
||||
}
|
||||
|
||||
func (e ExhExam) TableName() string {
|
||||
return "exh_exam"
|
||||
func (e ArtworkExExam) TableName() string {
|
||||
return "artwork_ex_exam"
|
||||
}
|
19
cmd/model/artwork_main_lockRecord.go
Normal file
19
cmd/model/artwork_main_lockRecord.go
Normal file
@ -0,0 +1,19 @@
|
||||
package model
|
||||
|
||||
// 此表作为画家宝中的画作中间表的主表(画作主要数据保存在画作微服务中),请悉知
|
||||
type ArtworkLockRecord struct {
|
||||
Model
|
||||
ArtistUid string `json:"artistUid" gorm:"column:artist_uid;type:varchar(191);comment:画家uid"`
|
||||
ArtworkUid string `json:"artworkUid" gorm:"column:artwork_uid;type:varchar(191);comment:画作uid"`
|
||||
Status int64 `json:"status" gorm:"column:status;default:1;comment:1=准备/暂存 2=锁定 3=解锁"`
|
||||
LockTime string `json:"lockTime" gorm:"column:lock_time;comment:锁定时间"`
|
||||
//画作补充信息审批记录
|
||||
AuditStatus int64 `json:"auditStatus" gorm:"column:audit_status;default:1;comment:画作补充信息审核状态 1:待审核/暂存 2:审核通过 3:审核不通过"`
|
||||
AuditMark string `json:"auditMark" gorm:"column:audit_mark;comment:审核备注"`
|
||||
AuditMark2 string `json:"auditMark2" gorm:"column:audit_mark2;comment:审核备注2"`
|
||||
//UserInfo User `gorm:"foreignKey:ArtistUid;reference:MgmtArtistUid"`
|
||||
}
|
||||
|
||||
func (a ArtworkLockRecord) TableName() string {
|
||||
return "artwork_lock_record"
|
||||
}
|
@ -11,3 +11,9 @@ type Model struct {
|
||||
UpdatedAt time.Time `gorm:"column:updated_at" json:"updatedAt"`
|
||||
DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;type:bigint" json:"deletedAt"`
|
||||
}
|
||||
|
||||
type AuditModel struct {
|
||||
AuditStatus int64 `json:"auditStatus" gorm:"column:audit_status;default:1;comment:审核状态 1:待审核/暂存 2:审核通过 3:审核不通过"`
|
||||
AuditMark string `json:"auditMark" gorm:"column:audit_mark;comment:审核备注"`
|
||||
AuditMark2 string `json:"auditMark2" gorm:"column:audit_mark2;comment:审核备注2"`
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
package model
|
||||
package old
|
||||
|
||||
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
|
||||
// User 用户模型
|
||||
type ArtistInfo struct {
|
||||
Model
|
||||
model.Model
|
||||
UserId uint `gorm:"not null default:0" json:"userId"`
|
||||
ArtistId string `gorm:"type:varchar(256) default ''" json:"artistId"`
|
||||
BankAccount string `gorm:"type:varchar(25) not null" json:"bankAccount"`
|
@ -1,8 +1,10 @@
|
||||
package model
|
||||
package old
|
||||
|
||||
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
|
||||
// User 用户模型
|
||||
type Artwork struct {
|
||||
Model
|
||||
model.Model
|
||||
ID int32 `gorm:"not null" json:"id"`
|
||||
ArtistId uint64 `gorm:"not null" json:"artistId"`
|
||||
Name string `gorm:"type:varchar(256) not null" json:"name"`
|
@ -1,8 +1,10 @@
|
||||
package model
|
||||
package old
|
||||
|
||||
//User 用户模型
|
||||
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
|
||||
// User 用户模型
|
||||
type ArtworkBatch struct {
|
||||
Model
|
||||
model.Model
|
||||
ID int32 `gorm:"not null"`
|
||||
BatchId int32 `gorm:"not null"`
|
||||
ArtistId int32 `gorm:"not null"`
|
@ -1,8 +1,10 @@
|
||||
package model
|
||||
package old
|
||||
|
||||
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
|
||||
// 考核 用户模型
|
||||
type ArtworkState struct {
|
||||
Model
|
||||
model.Model
|
||||
ID int32 `gorm:"not null"`
|
||||
ArtworkId int32 `gorm:"default:0"`
|
||||
State int32 `gorm:"default:0"`
|
@ -1,8 +1,10 @@
|
||||
package model
|
||||
package old
|
||||
|
||||
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
|
||||
// User 用户模型
|
||||
type Bank struct {
|
||||
Model
|
||||
model.Model
|
||||
ID int32 `gorm:"not null"`
|
||||
UserId int32 `gorm:" not null"`
|
||||
BankAccount string `gorm:"type:varchar(25) not null"`
|
@ -1,8 +1,10 @@
|
||||
package model
|
||||
package old
|
||||
|
||||
import "github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
|
||||
// Contract 用户模型
|
||||
type Contract struct {
|
||||
Model
|
||||
model.Model
|
||||
ID int32 `gorm:"not null"`
|
||||
UserId int32 `gorm:"not null"`
|
||||
CardId string `gorm:"type:varchar(256) default ''"`
|
55
cmd/model/temp_artwork_ext_data.go
Normal file
55
cmd/model/temp_artwork_ext_data.go
Normal file
@ -0,0 +1,55 @@
|
||||
// Package model -----------------------------
|
||||
// @file : temp_artwork_ext_data.go
|
||||
// @author : JJXu
|
||||
// @contact : wavingbear@163.com
|
||||
// @time : 2023/2/28 11:51
|
||||
// -------------------------------------------
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/plugin/soft_delete"
|
||||
"time"
|
||||
)
|
||||
|
||||
type ArtworkExtData struct {
|
||||
Id int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"Id"` //type:int32 comment:
|
||||
ArtworkId int32 `gorm:"column:artwork_id" json:"ArtworkId"` //type:int32
|
||||
ArtworkUuid string `gorm:"column:artwork_uuid" json:"ArtworkUuid"` //type:string comment:画作的uuid
|
||||
ArtType int32 `gorm:"column:art_type" json:"ArtType"` //type:string comment:艺术类别
|
||||
ArtTitle int32 `gorm:"column:art_title" json:"ArtTitle"` //type:string comment:艺术主题
|
||||
ArtStyle int32 `gorm:"column:art_style" json:"ArtStyle"` //type:string comment:风格
|
||||
Color int32 `gorm:"column:color" json:"Color"` //type:string comment:颜色
|
||||
PenTechniques string `gorm:"column:pen_techniques" json:"PenTechniques"` //type:string comment:笔墨技法
|
||||
ArtIdea string `gorm:"column:art_idea" json:"ArtIdea"` //type:string comment:绘画思想
|
||||
ExpressIdea string `gorm:"column:express_idea" json:"ExpressIdea"` //type:string comment:表达思想
|
||||
ArtStory string `gorm:"column:art_story" json:"ArtStory"` //type:string comment:创作背景故事
|
||||
FirstPublish string `gorm:"column:first_publish" json:"FirstPublish"` //type:string comment:首次发表
|
||||
FirstPublishImg string `gorm:"column:first_publish_img" json:"FirstPublishImg"` //type:string comment:首次发表截图
|
||||
FirstName string `gorm:"column:first_name" json:"FirstName"` //type:string comment:首次命名
|
||||
FirstNameImg string `gorm:"column:first_name_img" json:"FirstNameImg"` //type:string comment:首次命名截图
|
||||
CopyrightHash string `gorm:"column:copyright_hash" json:"CopyrightHash"` //type:string comment:版权哈希
|
||||
RealrightHash string `gorm:"column:realright_hash" json:"RealrightHash"` //type:string comment:物权哈希
|
||||
SprayPosition string `gorm:"column:spray_position" json:"SprayPosition"` //type:string comment:喷涂位置
|
||||
SprayRemark string `gorm:"column:spray_remark" json:"SprayRemark"` //type:string comment:喷涂备注
|
||||
AuthDataHash string `gorm:"column:auth_data_hash" json:"AuthData"` //type:string comment:鉴证数据
|
||||
DigiShootDate string `gorm:"column:digi_shoot_date" json:"DigiShootDate"` //type:string comment:数字化拍摄时间
|
||||
DigiMakeDate string `gorm:"column:digi_make_date" json:"DigiMakeDate"` //type:string comment:数字化后期制作时间
|
||||
DigiArtImg string `gorm:"column:digi_art_img" json:"DigiArtImg"` //type:string comment:数字化画作图
|
||||
DigiArtCopyrightImg string `gorm:"column:digi_art_copyright_img" json:"DigiArtCopyrightImg"` //type:string comment:数字化画作版权图
|
||||
DigiCopyrightInfo string `gorm:"column:digi_copyright_info" json:"DigiCopyrightInfo"` //type:string comment:数字化画作版权信息
|
||||
DigiCopyrightFile string `gorm:"column:digi_copyright_file" json:"DigiCopyrightFile"` //type:string comment:数字化画作版权文件
|
||||
Tags string `gorm:"column:tags" json:"Tags"` //type:string comment:选择标签
|
||||
ThirdComment string `gorm:"column:third_comment" json:"ThirdComment"` //type:string comment:第三方评价
|
||||
AuthTime string `gorm:"column:auth_time;comment:鉴证时间" json:"auth_time"`
|
||||
AuthImg string `gorm:"column:auth_img" json:"AuthImg"` //type:string comment:鉴证图
|
||||
Status int32 `gorm:"column:status;type:tinyint(4);default:1;comment:状态 正常 2 删除;NOT NULL" json:"status"`
|
||||
CreatedAt time.Time `gorm:"column:created_at" json:"CreatedAt"` //type:int32 comment:
|
||||
UpdatedAt time.Time `gorm:"column:updated_at" json:"UpdatedAt"` //type:int32 comment:
|
||||
DeletedAt soft_delete.DeletedAt //type:int32 comment:
|
||||
}
|
||||
|
||||
// TableName 表名:artwork_ext_data,画作补充数据。
|
||||
// 说明:
|
||||
func (ArtworkExtData) TableName() string {
|
||||
return "artwork_ext_data"
|
||||
}
|
@ -247,8 +247,9 @@ type GetArtworkLockRecordsRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
ArtistUid string `protobuf:"bytes,1,opt,name=artistUid,proto3" json:"artistUid,omitempty"` //画家uid
|
||||
QueryType ArtworkQueryMode `protobuf:"varint,2,opt,name=queryType,proto3,enum=artistinfo.ArtworkQueryMode" json:"queryType,omitempty"` //查询模式
|
||||
ArtistUid string `protobuf:"bytes,1,opt,name=artistUid,proto3" json:"artistUid,omitempty"` //画家uid
|
||||
QueryType ArtworkQueryMode `protobuf:"varint,2,opt,name=queryType,proto3,enum=artistinfo.ArtworkQueryMode" json:"queryType,omitempty"` //查询模式
|
||||
AuditStatus int64 `protobuf:"varint,3,opt,name=AuditStatus,proto3" json:"AuditStatus,omitempty"` //审批状态 可选
|
||||
}
|
||||
|
||||
func (x *GetArtworkLockRecordsRequest) Reset() {
|
||||
@ -297,6 +298,13 @@ func (x *GetArtworkLockRecordsRequest) GetQueryType() ArtworkQueryMode {
|
||||
return ArtworkQueryMode_NowPreSaveArtwork
|
||||
}
|
||||
|
||||
func (x *GetArtworkLockRecordsRequest) GetAuditStatus() int64 {
|
||||
if x != nil {
|
||||
return x.AuditStatus
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ArtistLockInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -1025,7 +1033,7 @@ var file_pb_artistinfoArtwork_proto_rawDesc = []byte{
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x73,
|
||||
0x74, 0x55, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69,
|
||||
0x73, 0x74, 0x55, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x84, 0x01, 0x0a, 0x1c, 0x47, 0x65,
|
||||
0x01, 0x28, 0x05, 0x52, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0xa6, 0x01, 0x0a, 0x1c, 0x47, 0x65,
|
||||
0x74, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x63, 0x6f,
|
||||
0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x09, 0x61, 0x72,
|
||||
0x74, 0x69, 0x73, 0x74, 0x55, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba,
|
||||
@ -1034,158 +1042,160 @@ var file_pb_artistinfoArtwork_proto_rawDesc = []byte{
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74,
|
||||
0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x51, 0x75, 0x65, 0x72,
|
||||
0x79, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65,
|
||||
0x22, 0xbc, 0x02, 0x0a, 0x0e, 0x41, 0x72, 0x74, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55, 0x69,
|
||||
0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69,
|
||||
0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x75, 0x64, 0x69,
|
||||
0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x74,
|
||||
0x4d, 0x61, 0x72, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x64, 0x69,
|
||||
0x74, 0x4d, 0x61, 0x72, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4d, 0x61,
|
||||
0x72, 0x6b, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x74,
|
||||
0x4d, 0x61, 0x72, 0x6b, 0x32, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
|
||||
0x41, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74,
|
||||
0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41,
|
||||
0x74, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x11,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22,
|
||||
0x41, 0x0a, 0x0f, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x1a, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x72,
|
||||
0x74, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61,
|
||||
0x74, 0x61, 0x22, 0x32, 0x0a, 0x0e, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69, 0x64,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55,
|
||||
0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x72, 0x74, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x55, 0x69, 0x64, 0x73, 0x22, 0x3e, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55,
|
||||
0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x72, 0x74, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x55, 0x69, 0x64, 0x73, 0x22, 0x3c, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74,
|
||||
0x55, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x73,
|
||||
0x74, 0x55, 0x69, 0x64, 0x22, 0x49, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0xe9, 0xc0, 0x03, 0x05, 0x8a, 0x01,
|
||||
0x02, 0x10, 0x01, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69, 0x64, 0x22,
|
||||
0x96, 0x04, 0x0a, 0x12, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x72, 0x65, 0x76, 0x69,
|
||||
0x65, 0x77, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74,
|
||||
0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69,
|
||||
0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x72, 0x74,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67,
|
||||
0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x72, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e,
|
||||
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06,
|
||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64,
|
||||
0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x50, 0x68,
|
||||
0x6f, 0x74, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x73,
|
||||
0x74, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x68, 0x64, 0x50, 0x69, 0x63, 0x18,
|
||||
0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x68, 0x64, 0x50, 0x69, 0x63, 0x12, 0x1e, 0x0a, 0x0a,
|
||||
0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0a, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b,
|
||||
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20,
|
||||
0x0a, 0x0b, 0x61, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0c, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x18, 0x0d, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x32, 0x18, 0x0e, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x32, 0x12, 0x1c,
|
||||
0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x5c, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x41,
|
||||
0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x67, 0x72, 0x6f,
|
||||
0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61,
|
||||
0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x09, 0x67, 0x72, 0x6f,
|
||||
0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x6d, 0x0a, 0x11, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||
0x6c, 0x6f, 0x63, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3a, 0x0a, 0x08, 0x64, 0x61, 0x74,
|
||||
0x61, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x72,
|
||||
0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x64, 0x61, 0x74,
|
||||
0x61, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xa1, 0x01, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61,
|
||||
0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x75, 0x64,
|
||||
0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b,
|
||||
0x61, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61,
|
||||
0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||
0x61, 0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x64,
|
||||
0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61,
|
||||
0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x32, 0x2a, 0x67, 0x0a, 0x10, 0x41, 0x72, 0x74,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a,
|
||||
0x11, 0x4e, 0x6f, 0x77, 0x50, 0x72, 0x65, 0x53, 0x61, 0x76, 0x65, 0x41, 0x72, 0x74, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4e, 0x6f, 0x77, 0x4c, 0x6f, 0x63, 0x6b, 0x65,
|
||||
0x64, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x72,
|
||||
0x74, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10,
|
||||
0x41, 0x6c, 0x6c, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x10, 0x03, 0x32, 0xe3, 0x05, 0x0a, 0x11, 0x41, 0x72, 0x74, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x66, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x63,
|
||||
0x6f, 0x72, 0x64, 0x12, 0x26, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f,
|
||||
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f,
|
||||
0x63, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x61, 0x72,
|
||||
0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x00,
|
||||
0x12, 0x5e, 0x0a, 0x11, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x41,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e,
|
||||
0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x41, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x72,
|
||||
0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x00,
|
||||
0x12, 0x60, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f,
|
||||
0x63, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x28, 0x2e, 0x61, 0x72, 0x74, 0x69,
|
||||
0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f,
|
||||
0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x22, 0x00, 0x12, 0x73, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x4c, 0x6f, 0x63, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70,
|
||||
0x12, 0x28, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x48, 0x69, 0x73, 0x74,
|
||||
0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61, 0x72, 0x74,
|
||||
0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x26,
|
||||
0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x12, 0x20, 0x0a, 0x0b, 0x41, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x41, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x22, 0xbc, 0x02, 0x0a, 0x0e, 0x41, 0x72, 0x74, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x63,
|
||||
0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x55,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74,
|
||||
0x55, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x55, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x75, 0x64, 0x69, 0x74,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x75,
|
||||
0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x64,
|
||||
0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75,
|
||||
0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x74,
|
||||
0x4d, 0x61, 0x72, 0x6b, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x75, 0x64,
|
||||
0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x32, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x64, 0x41, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64,
|
||||
0x41, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74,
|
||||
0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41,
|
||||
0x74, 0x22, 0x41, 0x0a, 0x0f, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e,
|
||||
0x41, 0x72, 0x74, 0x69, 0x73, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04,
|
||||
0x64, 0x61, 0x74, 0x61, 0x22, 0x32, 0x0a, 0x0e, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55,
|
||||
0x69, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x55, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x72, 0x74,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69, 0x64, 0x73, 0x22, 0x3e, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69,
|
||||
0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||
0x6e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x14, 0x47,
|
||||
0x65, 0x74, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x74,
|
||||
0x61, 0x69, 0x6c, 0x12, 0x27, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f,
|
||||
0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x44,
|
||||
0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61,
|
||||
0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x73, 0x74,
|
||||
0x4c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x18, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x75, 0x64, 0x69, 0x74,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2b, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69,
|
||||
0x6e, 0x66, 0x6f, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x41, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f,
|
||||
0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x6f,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x00, 0x42, 0x16, 0x5a, 0x14, 0x2e, 0x2f, 0x3b, 0x61,
|
||||
0x72, 0x74, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x50, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x55, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x72, 0x74,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69, 0x64, 0x73, 0x22, 0x3c, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x41,
|
||||
0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x72, 0x74, 0x69,
|
||||
0x73, 0x74, 0x55, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x72, 0x74,
|
||||
0x69, 0x73, 0x74, 0x55, 0x69, 0x64, 0x22, 0x49, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x55, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0xe9, 0xc0, 0x03, 0x05,
|
||||
0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69,
|
||||
0x64, 0x22, 0x96, 0x04, 0x0a, 0x12, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x50, 0x72, 0x65,
|
||||
0x76, 0x69, 0x65, 0x77, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x72, 0x74, 0x69,
|
||||
0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72,
|
||||
0x74, 0x69, 0x73, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61,
|
||||
0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65,
|
||||
0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67,
|
||||
0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65,
|
||||
0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x26,
|
||||
0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
|
||||
0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41,
|
||||
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74,
|
||||
0x50, 0x68, 0x6f, 0x74, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x72, 0x74,
|
||||
0x69, 0x73, 0x74, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x68, 0x64, 0x50, 0x69,
|
||||
0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x68, 0x64, 0x50, 0x69, 0x63, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69, 0x64, 0x12, 0x20,
|
||||
0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65,
|
||||
0x12, 0x1e, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x12, 0x20, 0x0a, 0x0b, 0x61, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
|
||||
0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x18,
|
||||
0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b,
|
||||
0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x32, 0x18, 0x0e,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x32,
|
||||
0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0f, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c,
|
||||
0x0a, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x5c, 0x0a, 0x1d, 0x47, 0x65,
|
||||
0x74, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x48, 0x69, 0x73, 0x74,
|
||||
0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x67,
|
||||
0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d,
|
||||
0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x09, 0x67,
|
||||
0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x6d, 0x0a, 0x11, 0x41, 0x72, 0x74, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3a, 0x0a, 0x08, 0x64,
|
||||
0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
|
||||
0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x64,
|
||||
0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xa1, 0x01, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61,
|
||||
0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0a, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x61,
|
||||
0x75, 0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x0b, 0x61, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x61,
|
||||
0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0a, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4d, 0x61, 0x72, 0x6b, 0x32, 0x2a, 0x67, 0x0a, 0x10, 0x41,
|
||||
0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x15, 0x0a, 0x11, 0x4e, 0x6f, 0x77, 0x50, 0x72, 0x65, 0x53, 0x61, 0x76, 0x65, 0x41, 0x72, 0x74,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4e, 0x6f, 0x77, 0x4c, 0x6f, 0x63,
|
||||
0x6b, 0x65, 0x64, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c,
|
||||
0x41, 0x72, 0x74, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x10, 0x02, 0x12, 0x14,
|
||||
0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x72, 0x74, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x10, 0x03, 0x32, 0xe3, 0x05, 0x0a, 0x11, 0x41, 0x72, 0x74, 0x69, 0x73, 0x74, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x66, 0x0a, 0x17, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x52,
|
||||
0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x26, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e,
|
||||
0x66, 0x6f, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e,
|
||||
0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
|
||||
0x22, 0x00, 0x12, 0x5e, 0x0a, 0x11, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63,
|
||||
0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74,
|
||||
0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b,
|
||||
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e,
|
||||
0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
|
||||
0x22, 0x00, 0x12, 0x60, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x28, 0x2e, 0x61, 0x72,
|
||||
0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e,
|
||||
0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x47, 0x72, 0x6f,
|
||||
0x75, 0x70, 0x12, 0x28, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x48, 0x69,
|
||||
0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x61,
|
||||
0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x13, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
||||
0x12, 0x26, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x65, 0x63, 0x6f, 0x72,
|
||||
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73,
|
||||
0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x00, 0x12, 0x5d, 0x0a,
|
||||
0x14, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63, 0x6b, 0x44,
|
||||
0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x27, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e,
|
||||
0x66, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4c, 0x6f, 0x63,
|
||||
0x6b, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a,
|
||||
0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x69,
|
||||
0x73, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x18,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x75, 0x64,
|
||||
0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2b, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73,
|
||||
0x74, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x41, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x69, 0x6e,
|
||||
0x66, 0x6f, 0x2e, 0x41, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x4e, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x00, 0x42, 0x16, 0x5a, 0x14, 0x2e, 0x2f,
|
||||
0x3b, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x41, 0x72, 0x74, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x50, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -379,6 +379,8 @@ func (m *GetArtworkLockRecordsRequest) validate(all bool) error {
|
||||
|
||||
// no validation rules for QueryType
|
||||
|
||||
// no validation rules for AuditStatus
|
||||
|
||||
if len(errors) > 0 {
|
||||
return GetArtworkLockRecordsRequestMultiError(errors)
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ enum ArtworkQueryMode {
|
||||
message GetArtworkLockRecordsRequest{
|
||||
string artistUid =1 [(validate.rules).message.required = true];//画家uid
|
||||
ArtworkQueryMode queryType =2 ; //查询模式
|
||||
int64 AuditStatus =3; //审批状态 可选
|
||||
}
|
||||
|
||||
message ArtistLockInfo{
|
||||
|
@ -2,6 +2,7 @@ package model
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model/old"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
@ -94,19 +95,19 @@ func Database(conn string) {
|
||||
func migration() {
|
||||
//自迁移模式
|
||||
err := DB.AutoMigrate(
|
||||
&model.Bank{},
|
||||
&old.Bank{},
|
||||
&model.RealName{},
|
||||
&model.User{},
|
||||
&model.Invite{},
|
||||
&model.Artwork{},
|
||||
&old.Artwork{},
|
||||
//&model.Contract{},
|
||||
//&model.SupplyInfo{},
|
||||
//&model.ExhVideo{},
|
||||
//&model.ExhExam{},
|
||||
&model.ArtistInfo{},
|
||||
&old.ArtistInfo{},
|
||||
&model.UserInvited{},
|
||||
&model.ArtworkState{},
|
||||
&model.ArtworkBatch{},
|
||||
&old.ArtworkState{},
|
||||
&old.ArtworkBatch{},
|
||||
&model.TempArtistInfo{},
|
||||
&model.ArtworkLockRecord{},
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user