Merge branch 'xjjdev'
This commit is contained in:
commit
5b04150a2e
@ -8,11 +8,11 @@ package dao
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/clause"
|
||||
)
|
||||
|
||||
var ArtistinfoArtshowVideo = new(artistinfoArtshowVideo)
|
||||
@ -75,10 +75,12 @@ func (a artistinfoArtshowVideo) GetDataList(req *artistinfoArtshow.GetArtshowVid
|
||||
tx = tx.Where("lock_time = ?", req.LockTime)
|
||||
}
|
||||
if req.ArtistName != "" {
|
||||
tx = tx.Clauses(clause.Like{
|
||||
Column: "artist_name",
|
||||
Value: "%" + req.ArtistName + "%",
|
||||
})
|
||||
// tx = tx.Clauses(clause.Like{
|
||||
// Column: "artist_name",
|
||||
// Value: "%" + req.ArtistName + "%",
|
||||
// })
|
||||
var searchName = "%" + req.ArtistName + "%"
|
||||
tx = tx.Where("artist_name LIKE ? OR artist_uid LIKE ?", searchName, searchName)
|
||||
}
|
||||
if req.Status != 0 {
|
||||
tx = tx.Where("status = ?", req.Status)
|
||||
|
@ -10,6 +10,8 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistInfoArtwork"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artwork_query"
|
||||
@ -17,7 +19,6 @@ import (
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/service"
|
||||
"github.com/fonchain/fonchain-artistinfo/pkg/util/stime"
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
)
|
||||
|
||||
func CreateArtworkLockRecord(in *model.ArtworkLockRecord) error {
|
||||
@ -142,8 +143,14 @@ func GetArtworkLockRecords(req *artistInfoArtwork.GetArtworkLockRecordsRequest)
|
||||
case artistInfoArtwork.ArtworkQueryMode_AllAuditPassArtwork: //所有审核通过的画作
|
||||
tx = tx.Where("supplement_audit_status = 4").Order("lock_time desc")
|
||||
}
|
||||
if req.AuditStatus != 0 {
|
||||
tx = tx.Where("audit_status = ?", req.AuditStatus)
|
||||
if req.BaseAuditStatus != 0 {
|
||||
tx = tx.Where("base_audit_status = ?", req.BaseAuditStatus)
|
||||
}
|
||||
if req.SupplementAuditStatus != 0 {
|
||||
tx = tx.Where("supplement_audit_status = ?", req.SupplementAuditStatus)
|
||||
}
|
||||
if len(req.ArtworkUids) > 0 {
|
||||
tx = tx.Where("artwork_uid in ?", req.ArtworkUids)
|
||||
}
|
||||
err = tx.Find(&datas).Error
|
||||
for _, v := range datas {
|
||||
|
@ -15,7 +15,7 @@ type ArtshowVideoRecord struct {
|
||||
|
||||
//AccountId int64 `json:"accountId" gorm:"column:account_id;comment:"`
|
||||
ArtistName string `json:"artistName" gorm:"column:artist_name;comment:"`
|
||||
VideoUrl string `json:"videoUrl" gorm:"column:video_url;comment:"`
|
||||
VideoUrl string `json:"videoUrl" gorm:"column:video_url;type:varchar(2000);comment:"`
|
||||
|
||||
//审批字段
|
||||
AuditStatus AuditStatus `json:"auditStatus" gorm:"column:audit_status;comment:审核状态:2= 待审核,3= 审核失败,4= 审核通过,5= 待补充"`
|
||||
|
@ -362,9 +362,11 @@ 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"` //查询模式
|
||||
AuditStatus int64 `protobuf:"varint,3,opt,name=AuditStatus,proto3" json:"AuditStatus,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"` //查询模式
|
||||
BaseAuditStatus int64 `protobuf:"varint,3,opt,name=baseAuditStatus,proto3" json:"baseAuditStatus,omitempty"` //基本信息审批状态 可选
|
||||
SupplementAuditStatus int64 `protobuf:"varint,4,opt,name=supplementAuditStatus,proto3" json:"supplementAuditStatus,omitempty"` //基本信息审批状态 可选
|
||||
ArtworkUids []string `protobuf:"bytes,5,rep,name=artworkUids,proto3" json:"artworkUids,omitempty"` //画作uid列表
|
||||
}
|
||||
|
||||
func (x *GetArtworkLockRecordsRequest) Reset() {
|
||||
@ -413,13 +415,27 @@ func (x *GetArtworkLockRecordsRequest) GetQueryType() ArtworkQueryMode {
|
||||
return ArtworkQueryMode_Non
|
||||
}
|
||||
|
||||
func (x *GetArtworkLockRecordsRequest) GetAuditStatus() int64 {
|
||||
func (x *GetArtworkLockRecordsRequest) GetBaseAuditStatus() int64 {
|
||||
if x != nil {
|
||||
return x.AuditStatus
|
||||
return x.BaseAuditStatus
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetArtworkLockRecordsRequest) GetSupplementAuditStatus() int64 {
|
||||
if x != nil {
|
||||
return x.SupplementAuditStatus
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetArtworkLockRecordsRequest) GetArtworkUids() []string {
|
||||
if x != nil {
|
||||
return x.ArtworkUids
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ArtistLockInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -1595,7 +1611,7 @@ var file_pb_artistinfoArtwork_proto_rawDesc = []byte{
|
||||
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, 0x12, 0x1a, 0x0a, 0x08, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xa6, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x41,
|
||||
0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x86, 0x02, 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, 0xe9, 0xc0,
|
||||
@ -1603,9 +1619,15 @@ var file_pb_artistinfoArtwork_proto_rawDesc = []byte{
|
||||
0x69, 0x64, 0x12, 0x3a, 0x0a, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 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, 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,
|
||||
0x6f, 0x64, 0x65, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28,
|
||||
0x0a, 0x0f, 0x62, 0x61, 0x73, 0x65, 0x41, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x62, 0x61, 0x73, 0x65, 0x41, 0x75, 0x64,
|
||||
0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x75, 0x70, 0x70,
|
||||
0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x65, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20,
|
||||
0x0a, 0x0b, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20,
|
||||
0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x72, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x55, 0x69, 0x64, 0x73,
|
||||
0x22, 0xec, 0x04, 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,
|
||||
|
@ -587,7 +587,9 @@ func (m *GetArtworkLockRecordsRequest) validate(all bool) error {
|
||||
|
||||
// no validation rules for QueryType
|
||||
|
||||
// no validation rules for AuditStatus
|
||||
// no validation rules for BaseAuditStatus
|
||||
|
||||
// no validation rules for SupplementAuditStatus
|
||||
|
||||
if len(errors) > 0 {
|
||||
return GetArtworkLockRecordsRequestMultiError(errors)
|
||||
|
@ -54,7 +54,9 @@ enum ArtworkQueryMode {
|
||||
message GetArtworkLockRecordsRequest{
|
||||
string artistUid =1 [(validate.rules).message.required = true];//画家uid
|
||||
ArtworkQueryMode queryType =2 ; //查询模式
|
||||
int64 AuditStatus =3; //审批状态 可选
|
||||
int64 baseAuditStatus =3; //基本信息审批状态 可选
|
||||
int64 supplementAuditStatus =4; //基本信息审批状态 可选
|
||||
repeated string artworkUids=5; //画作uid列表
|
||||
}
|
||||
|
||||
message ArtistLockInfo{
|
||||
|
Loading…
Reference in New Issue
Block a user