fonchain-fiee/pkg/service/artistInfo/asArtist/dtoArtist.go

191 lines
11 KiB
Go
Raw Normal View History

2025-02-19 06:24:15 +00:00
// Package dto -----------------------------
// @file : asArtist.go
// @author : JJXu
// @contact : wavingbear@163.com
// @time : 2023/2/27 9:30
// -------------------------------------------
package asArtist
import (
"github.com/fonchain_enterprise/fonchain-main/api/artistInfoArtwork"
"github.com/fonchain_enterprise/fonchain-main/api/artistInfoUser"
)
type queryType int
const (
QueryArtworkSupplyUser queryType = 1 //查询画作补充信息模块的用户
QueryArtistIndexUser queryType = 2 //查询画家指数模块的用户
)
type SortItem struct {
SortField string `json:"sortField"` //排序字段
SortOrder string `json:"sortOrder"` //排序方式
}
type GetArtistProfileListRequest struct {
ArtistName string `json:"artistName"` //画家名字
InviterName string `json:"inviterName"` //首个邀请人名字
MultInviterName string `json:"multInviterName"` //从全部邀请人名字中查询
IsArtist int32 `json:"isArtist"` //是否是画家 1是2否
Page int32 `json:"page"`
PageSize int32 `json:"pageSize"`
Keyword string `json:"Keyword"` //关键字搜索
Tnum string `json:"tnum"` //画家编号
//单数据排序
SortItem
//多字段排序
MultSort []SortItem `json:"multSort"`
//新增查询信息
QueryType queryType `json:"queryType"` // 1=画作补充信息
//画作补充信息页面筛筛选
IncludeArtworkName string `json:"includeArtworkName"`
IncludeArtworkSupplyAuditStatus int64 `json:"includeArtworkSupplyAuditStatus"` // 查询画作补充信息中有此审批状态的画家 5=待补充 2=待审核 3=审核不通过 4=审核通过
IncludeArtworkSupplyFlowType int64 `json:"includeArtworkSupplyFlowType"` // 查询画作补充信息中由此流程状态的画家 1=未完成 2=历史
LowState int64 `json:"lowState"` //是否低优先级画家 1=是 2=否
ArtShowCountStart *int64 `json:"artShowCountStart"` //合作次数区间
ArtShowCountEnd *int64 `json:"artShowCountEnd"` //合作次数区间
NativePlace string `json:"nativePlace"` //籍贯
Sex string `json:"sex"` //性别 男/女
}
type UserView struct {
UserId int64 `json:"userId"`
AccId int64 `json:"accId"`
ArtistUid string `json:"artistUid"`
TelNum string `json:"telNum"`
InviteCode string `json:"inviteCode"`
Account string `json:"account"`
Photo string `json:"photo"`
IsRealName int64 `json:"isRealName"`
FddState int64 `json:"fddState"`
IsRead int64 `json:"isRead"`
IsLock bool `json:"isLock"`
RealName string `json:"realName"`
IdNum string `json:"idNum"`
Sex string `json:"sex"`
Age int64 `json:"age"`
Address []string `json:"address"`
IdcardBack string `json:"idcardBack"`
IdcardFront string `json:"idcardFront"`
InviterInviteCode string `json:"inviterInviteCode"`
InviterRealName string `json:"inviterRealName"`
JoinAssoTime string `json:"joinAssoTime"`
DeletedAt int64 `json:"deletedAt"`
UpdatedAt string `json:"updatedAt"`
CreatedAt string `json:"createdAt"`
PenName string `json:"penName"`
StageName string `json:"stageName"`
CertificateNum string `json:"certificateNum"`
CertificateImg string `json:"certificateImg"`
BankName string `json:"bankName"`
BankNum string `json:"bankNum"`
ArtistProfile string `json:"artistProfile"`
LatestLockTime string `json:"latestLockTime"`
WxAccount string `json:"wxAccount"`
InSource int32 `json:"insource"`
Tnum string `json:"tnum"`
IdType int32 `json:"idType"`
NativePlace string `json:"nativePlace"`
CanGenerateSupplyInfo bool `json:"canGenerateSupplyInfo"` //是否可以生成补充信息(管理系统按钮控制)
CanGenerateBrokerInfo bool `json:"canGenerateBrokerInfo"` //是否可以生成经纪人补充信息
ExistPendingArtworkSupplyData int64 `json:"existPendingArtworkSupplyData"` //是否存在待审核的画作补充信息 1=存在 0=不存在
LowState int64 `json:"lowState"` //是否低优先级画家 1=是 2=否
ExistIndexSupplyData int64 `json:"existIndexSupplyData"` //是否存在待补充的画家补充信息
ArtShowCount int64 `json:"artShowCount"` //画展次数
MasterVerifyTime string `json:"masterVerifyTime"` //美协认证时间
IsCpc int `json:"isCpc"`
Faction artistInfoUser.CpcFactionType `json:"faction"`
IsSystemUnit int `json:"isSystemUnit"`
LBankName string `json:"lBankName"`
BankCode string `json:"bankCode"`
BankArea string `json:"bankArea"`
ArtistShowCount string `json:"artistShowCount"`
}
// func (u *UserView) AdditionalArtistInfo() {
// artistData, err := service.GrpcArtistImpl.ArtistInfo(context.Background(), &artist.ArtistInfoRequest{Uid: u.ArtistUid})
// if err != nil {
// fmt.Println("\n补充userview数据失败", err.Error(), "\n")
// }
// if artistData.ProfileInfo != nil {
// u.Address = strings.Split(artistData.ProfileInfo.Address, "")
// u.PenName = artistData.ProfileInfo.PenName
// u.StageName = artistData.ProfileInfo.StageName
// }
// }
type ArtistArtworkStaticStaticData struct {
Idx int64 `json:"idx"`
IsLock bool `json:"isLock"`
ArtistUid string `json:"artistUid"`
LatestLockTime string `json:"latestLockTime"`
PassedArtworkNumber int64 `json:"passwdArtworkNumber"`
LatestUpdatedAt string `json:"latestUpdatedAt"`
RealName string `json:"realName"`
PenName string `json:"penName"`
StageName string `json:"stageName"`
ArtworkTotal int64 `json:"artworkTotal"`
RulerTotal int64 `json:"rulerTotal"`
PassedRulerTotal int64 `json:"passedRulerTotal"`
PassedArtworkTotal int64 `json:"passwdArtworkTotal"`
NoAuditArtworkTotal int64 `json:"noAuditArtworkTotal"`
IdNum string `json:"idNum"`
// InSource int32 `json:"inSource"`
Tnum string `json:"tnum"`
CaaCertNum string `json:"caaCertNum"`
IsMaster bool `json:"isMaster"`
NowConditionArtworkTotal int64 `json:"nowConditionArtworkTotal"` //当前筛选条件下,画家的画作数量
NotifyAt string `json:"notifyAt"`
IsNew bool `json:"isNew"` // 当次有新画作加入
}
type ImportArtistRequest struct {
ArtistUid string `json:"artistUid"`
ArtistUids []string `json:"artistUids"`
}
type ArtistArtworkStaticRequest struct {
Page int64 `json:"page"`
PageSize int64 `json:"pageSize"`
//画家筛选条件
ArtistName string `json:"artistName"` //画家名字
Tnum string `json:"tnum"` //画家编号
IsMaster int `json:"isMaster"` //是否大师画家 1是 2否
PassedRulerTotalStart *int `json:"passedRulerTotalStart"` //通过画作平尺数起始值
PassedRulerTotalEnd *int `json:"passedRulerTotalEnd"` //通过画作平尺数结束值
SortField string `json:"sortField"`
SortOrder string `json:"sortOrder"`
IsLock artistInfoArtwork.IsLock `json:"isLock"` //画家锁定状态
//画作筛选条件
RulerStart *int `json:"rulerStart"` //平尺数区间起始值
RulerEnd *int `json:"rulerEnd"` //平尺数区间结束值
BaseAuditStatus StaticReqAuditStatus `json:"baseAuditStatus"` //审批状态 1=暂存 2=待审核 3=不通过 4=通过 6=驳回 7=复审 10=未完成审批的画作
NationalExhibition int `json:"nationalExhibition"` //是否国展 2=入围 3=入选
QueryHaveProof int `json:"queryHaveProof"` //有入选凭证 0不查询 1查询
ArtworkName string `json:"artworkName"` //画作名字
Tfnum string `json:"tfnum"` // 画作编号
}
func (a *ArtistArtworkStaticRequest) WhereAdd(old, new string) string {
if old != "" {
old += " AND "
}
old += new
return old
}
type StaticReqAuditStatus int
const (
StaticReq_preSave StaticReqAuditStatus = iota + 1 //暂存
SaticReq_pending //待审核
SaticReq_noPass //不通过
SaticReq_pass //通过
SaticReq_reject = 6 //驳回
SaticReq_review = 7 //复审
StaticReq_noFinish = 10 //未完成审批
)