Documentation
¶
Overview ¶
@Time : 2021/10/19 20:31 @Author : Jasper @File : CmsListEs @Software: GoLand
Index ¶
- func NewOfIndexType[T baseindex.IndexMapping]() T
- func UpdateContentListEs(in *CmsListEs) interface{}
- type BaseRequest
- type CmdRequest
- func (self *CmdRequest[T]) BulkDelete(ids ...any) *basedto.IchubResult
- func (self *CmdRequest[T]) BulkUpsert() *basedto.IchubResult
- func (self *CmdRequest[T]) CmsExistId(id string) *page.PageResult
- func (self *CmdRequest[T]) Delete(id any) *basedto.IchubResult
- func (self *CmdRequest[T]) DeleteByQuery() *basedto.IchubResult
- func (self *CmdRequest[T]) Save(id any, doc map[string]any) *basedto.IchubResult
- func (self *CmdRequest[T]) SaveIndex(index baseindex.IndexIface) *basedto.IchubResult
- func (self *CmdRequest[T]) SaveStru(id any, stru any) *basedto.IchubResult
- func (self *CmdRequest[T]) UpdataParam2Script(fieldAsParams map[string]interface{}) string
- func (self *CmdRequest[T]) Update(ids any, doc map[string]any) *basedto.IchubResult
- func (self *CmdRequest[T]) Update2Err(id any, doc map[string]any) error
- func (self *CmdRequest[T]) UpdateByQuery(updateClause string, fieldParams map[string]any) *basedto.IchubResult
- func (self *CmdRequest[T]) UpdateByQueryParam(fieldAsParams map[string]any) *basedto.IchubResult
- func (self *CmdRequest[T]) UpdateIndex(doc baseindex.IndexIface) *basedto.IchubResult
- func (self *CmdRequest[T]) UpdateStru(ids any, doc any) *basedto.IchubResult
- func (self *CmdRequest[T]) WebSaveIndex(id any) *basedto.IchubResult
- type CmsListEs
- type MetaRequest
- func (self *MetaRequest[T]) CreateIndexIfNotExist() *basedto.IchubResult
- func (self *MetaRequest[T]) CreateIndexesIfNotExist() *basedto.IchubResult
- func (self *MetaRequest[T]) MetaCreateIndex() *basedto.IchubResult
- func (self *MetaRequest[T]) MetaDropIndex() *basedto.IchubResult
- func (self *MetaRequest[T]) MetaGetMapping() *basedto.IchubResult
- func (self *MetaRequest[T]) MetaIndexExists() *basedto.IchubResult
- type OfficialAccountWeiXinWs
- type WebRequest
- func (self *WebRequest[T]) ExistId(id string) *pagemodel.PageResult[T]
- func (self *WebRequest[T]) FromPageResult(result *page.PageResult) *pagemodel.PageResult[T]
- func (self *WebRequest[T]) GeneralQuery() *pagemodel.PageResult[T]
- func (self *WebRequest[T]) GeneralQueryMax() *pagemodel.PageResult[T]
- func (self *WebRequest[T]) Get(ids any) *pagemodel.PageResult[T]
- func (self *WebRequest[T]) GetIndex(indexTable baseindex.IndexTable, ids any) *pagemodel.PageResult[T]
- func (self *WebRequest[T]) Query(q elastic.Query) *WebRequest[T]
- func (self *WebRequest[T]) QueryResult() *pagemodel.PageResult[T]
- func (self *WebRequest[T]) Result2List(result *page.PageResult) []T
- func (self *WebRequest[T]) Result2Tablers(result *pagemodel.PageResult[T]) []schema.Tabler
- func (self *WebRequest[T]) SetModels(models any) *WebRequest[T]
- func (self *WebRequest[T]) Stru2Filter(result *pagemodel.PageResult[T]) []any
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOfIndexType ¶
func NewOfIndexType[T baseindex.IndexMapping]() T
func UpdateContentListEs ¶
func UpdateContentListEs(in *CmsListEs) interface{}
Types ¶
type BaseRequest ¶
type BaseRequest[T schema.Tabler] struct { EsWebClient *eswebclient.EsWebClient // contains filtered or unexported fields }
func NewBaseRequest ¶
func NewBaseRequest[T schema.Tabler]() *BaseRequest[T]
func (*BaseRequest[T]) Index ¶
func (self *BaseRequest[T]) Index() baseindex.IndexMapping
func (*BaseRequest[T]) NewOfTablerType ¶
func (self *BaseRequest[T]) NewOfTablerType() T
func (*BaseRequest[T]) SetIndex ¶
func (self *BaseRequest[T]) SetIndex(index baseindex.IndexMapping)
type CmdRequest ¶
type CmdRequest[T schema.Tabler] struct { *pagereq.CmdRequest *BaseRequest[T] }
func DefaultCmd ¶
func DefaultCmd[T schema.Tabler]() *CmdRequest[T]
func (*CmdRequest[T]) BulkDelete ¶
func (self *CmdRequest[T]) BulkDelete(ids ...any) *basedto.IchubResult
func (*CmdRequest[T]) BulkUpsert ¶
func (self *CmdRequest[T]) BulkUpsert() *basedto.IchubResult
func (*CmdRequest[T]) CmsExistId ¶
func (self *CmdRequest[T]) CmsExistId(id string) *page.PageResult
func (*CmdRequest[T]) Delete ¶
func (self *CmdRequest[T]) Delete(id any) *basedto.IchubResult
func (*CmdRequest[T]) DeleteByQuery ¶
func (self *CmdRequest[T]) DeleteByQuery() *basedto.IchubResult
func (*CmdRequest[T]) Save ¶
func (self *CmdRequest[T]) Save(id any, doc map[string]any) *basedto.IchubResult
func (*CmdRequest[T]) SaveIndex ¶
func (self *CmdRequest[T]) SaveIndex(index baseindex.IndexIface) *basedto.IchubResult
func (*CmdRequest[T]) SaveStru ¶
func (self *CmdRequest[T]) SaveStru(id any, stru any) *basedto.IchubResult
func (*CmdRequest[T]) UpdataParam2Script ¶
func (self *CmdRequest[T]) UpdataParam2Script(fieldAsParams map[string]interface{}) string
func (*CmdRequest[T]) Update ¶
func (self *CmdRequest[T]) Update(ids any, doc map[string]any) *basedto.IchubResult
func (*CmdRequest[T]) Update2Err ¶
func (self *CmdRequest[T]) Update2Err(id any, doc map[string]any) error
func (*CmdRequest[T]) UpdateByQuery ¶
func (self *CmdRequest[T]) UpdateByQuery(updateClause string, fieldParams map[string]any) *basedto.IchubResult
func (*CmdRequest[T]) UpdateByQueryParam ¶
func (self *CmdRequest[T]) UpdateByQueryParam(fieldAsParams map[string]any) *basedto.IchubResult
参数名=字段名
func (*CmdRequest[T]) UpdateIndex ¶
func (self *CmdRequest[T]) UpdateIndex(doc baseindex.IndexIface) *basedto.IchubResult
func (*CmdRequest[T]) UpdateStru ¶
func (self *CmdRequest[T]) UpdateStru(ids any, doc any) *basedto.IchubResult
func (*CmdRequest[T]) WebSaveIndex ¶
func (self *CmdRequest[T]) WebSaveIndex(id any) *basedto.IchubResult
type CmsListEs ¶
type CmsListEs struct {
basedto.BaseEntityIndex
// 发布id
PublishingId int64 `json:"publishing_id"`
// 内容id
ContentId int64 `json:"content_id"`
/* 商户标识 */
ShopId int64 `json:"shop_id"`
ShopName string `json:"shop_name"`
/* 用户标识 */
UserId int64 `json:"user_id"`
UserName string `json:"user_name"`
/* 作者-成员标识 */
AuthorMemberId int64 `json:"author_member_id"`
AuthorMemberName string `json:"author_member_name"`
/* 内容类型 */
Type int32 `json:"type"`
/* 子类型 */
Subtype int32 `json:"subtype"`
/* 状态 */
State int32 `json:"state"`
IsTop bool `json:"is_top"`
/* 置顶时间 */
TopTime time.Time `json:"top_time"`
/* 标题 */
Name string `json:"name"`
/* 摘要 */
Abstract string `json:"abstract"`
/* 是否是广告 */
IsAd bool `json:"is_ad"`
Open bool `json:"open"`
/* 阶段类型(1原稿 2发表稿 3发布稿 ) */
StageType int32 `json:"stage_type"`
/* 开始时间 */
StartTime time.Time `json:"start_time"`
/* 结束时间 */
EndTime time.Time `json:"end_time"`
/* 创建时间 */
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
/* 附件地址 */
IpfsAddress string `json:"ipfs_address"`
/* 缩略图 */
Thumbnail string `json:"thumbnail"`
TurnInvite bool `json:"turn_invite"`
IsRecommend bool `json:"is_recommend"`
/* 推荐时间 */
RecommendTime time.Time `json:"recommend_time"`
/* 是否公告 */
IsNotice bool `json:"is_notice"`
/* 公告时间 */
NoticeTime time.Time `json:"notice_time"`
/* 阅读时长(分钟) */
ReadingDuration int32 `json:"reading_duration"`
// ------------------------------------
/* 是否下架 */
IsOff bool `json:"is_off"`
PasswordRequired bool `json:"password_required"`
ActivePublishing bool `json:"active_publishing"`
Password string `json:"password"`
// ------------------------------------------------
/* 栏目ID */
ColumnId int64 `json:"column_id"`
/* 画像id */
PersonasId int64 `json:"personas_id"`
/* 阅读次数 */
ReadCount int32 `json:"read_count"`
/* 点赞次数 */
LikeCount int32 `json:"like_count"`
/* 收藏次数 */
CollectCount int32 `json:"collect_count"`
ShareCount int32 `json:"share_count"`
/* 应答次数 */
ReplyCount int32 `json:"reply_count"`
/* 评论次数 */
CommentCount int32 `json:"comment_count"`
/* 栏目名称 */
ColumnName string `json:"column_name"`
/** 栏目经理 **/
ColumnEditorId int64 `json:"column_editor_id"`
EditorId int64 `json:"editor_id"`
/** 栏目经理 */
ColumnEditorIdName string `json:"column_editor_id_name"`
// 版本-------------------------------------------
/* 原稿标识 */
OringalId int64 `json:"oringal_id"`
//广告经理ID
AdEditorId int64 `json:"ad_editor_id"`
//广告经理名称
AdEditorName string `json:"ad_editor_name"`
/* 编辑稿标识 */
ForRevisonId int64 `json:"for_revison_id"`
/* 发布稿标识 */
ForPublishingId int64 `json:"for_publishing_id"`
/* 原稿时间 */
OringalAt time.Time `json:"oringal_at"`
/* 编辑稿时间 */
RevisonAt time.Time `json:"revison_at"`
/* 发布稿时间 */
PublishingAt time.Time `json:"publishing_at"`
Score float64 `json:"score"`
PassScore float64 `json:"pass_score"`
TotalDuration int32 `json:"total_duration"`
AnswersCount int32 `json:"answers_count"`
Times int32 `json:"times"`
SubLink string `json:"sub_link"`
Description string `json:"description"`
SeoTag string `json:"seo_tag"`
Details string `json:"details"`
//审核意见
AuditComments string `json:"audit_comments"`
IsPublic bool `json:"is_public"`
//审核状态
AuditState int32 `json:"audit_state"`
//公开区栏目
PublicColumnId int64 `json:"public_column_id"`
PublicColumnName string `json:"public_column_name"`
//公开区栏目经理
PublicColumnEditorId int64 `json:"public_column_editor_id"`
//平台商户下架,true:下架,false:上架
IsPlatformOff bool `json:"is_platform_off"`
InviteType string `json:"invite_type"`
/* 是否允许评论 */
IsComment bool `json:"is_comment"`
/*撤稿状态*/
WithdrawSate int32 `json:"withdraw_sate"`
/*撤稿名称*/
WithdrawSateName string `json:"withdraw_sate_name"`
/*转发人*/
Forwarder int64 `json:"forwarder"`
/*传阅者*/
Circulater int64 `json:"circulater"`
/*渠道*/
Source int32 `json:"source"`
//阶段(原稿列表)
StateName string `json:"state_name"`
//阶段(发布稿列表)
StateName1 string `json:"state_name_1"`
//渠道名称
SourceName string `json:"source_name"`
//被传阅的内容ID
CirculaterContentId int64 `json:"circulater_content_id"`
//转发内容ID
ForwarderContentId int64 `json:"forwarder_content_id"`
//版本ID
VersionId int64 `json:"version_id"`
//转发、传阅时的源versionId
SourceVersionId int64 `json:"source_version_id"`
//创建人
CreatedBy int64 `json:"created_by"`
//
CreatedByName string `json:"created_by_name"`
UpdatedBy int64 `json:"updated_by"`
UpdatedByName string `json:"updated_by_name"`
//转发者
ForwarderName string `json:"forwarder_name"`
//是否不可见
Disable bool `json:"disable"`
VersionCode string `json:"version_code"`
ReprintCount int32 `json:"reprint_count"` //转发数
FeedbackCount int32 `json:"feedback_count"` //反馈数
Penname string `json:"penname"` //笔名
ProductState int32 `json:"product_state"` //产品化状态
ProductModel string `json:"product_model"` //产品化型号
SpuId int64 `json:"spu_id"` //产品化品项id
ProductSeq int64 `json:"product_seq"` //产品序号
ShopState int32 `json:"shop_state"` //商户状态
BizId int64 `json:"biz_id"` //供货子项id
BizPrice float32 `json:"biz_price"` //供货子项单价
CurrencyId int64 `json:"currency_id"` //货币id
//邮件
SenderId int64 `json:"sender_id"` //发收者id 联系人id
SenderEmail string `json:"sender_email"` //发收邮箱地址
RevIds string `json:"rev_ids"` //接收者ids Json 接收对应的多个联系人id
CcRevIds string `json:"cc_rev_ids"` //Cc接收者ids Json 选填。Cc接收对应的多个联系人id
PlugFlow string `json:"plug_flow"` //推流地址和推流码
ContactId int64 `json:"contact_id"` // 联系人id
ContactEmail string `json:"contact_email"` // 联系人邮箱
ContentType int64 `json:"content_type"` // 0:原稿内部、 1:公开
PublishShopId int64 `json:"publish_shop_id"` // 公开的商户
GroupNumber int64 `json:"group_number"` // 从1开始
MsgCount int32 `json:"msg_count"` // 消息数
SyncWeixinFlag int64 `json:"sync_weixin_flag"` // 同步微信公众号标识
ColumnIds string `json:"column_ids"` // 栏目集合
PublishAuditState int64 `json:"publish_audit_state"` // 初次待审10 修改待审20 已审批30
IsVote bool `json:"is_vote"` // 是否投票
}
type MetaRequest ¶
type MetaRequest[T baseindex.IndexMapping] struct { *pagereq.MetadataRequest *BaseRequest[T] }
func DefaultMeta ¶
func DefaultMeta[T baseindex.IndexMapping]() *MetaRequest[T]
func (*MetaRequest[T]) CreateIndexIfNotExist ¶
func (self *MetaRequest[T]) CreateIndexIfNotExist() *basedto.IchubResult
func (*MetaRequest[T]) CreateIndexesIfNotExist ¶
func (self *MetaRequest[T]) CreateIndexesIfNotExist() *basedto.IchubResult
func (*MetaRequest[T]) MetaCreateIndex ¶
func (self *MetaRequest[T]) MetaCreateIndex() *basedto.IchubResult
func (*MetaRequest[T]) MetaDropIndex ¶
func (self *MetaRequest[T]) MetaDropIndex() *basedto.IchubResult
func (*MetaRequest[T]) MetaGetMapping ¶
func (self *MetaRequest[T]) MetaGetMapping() *basedto.IchubResult
func (*MetaRequest[T]) MetaIndexExists ¶
func (self *MetaRequest[T]) MetaIndexExists() *basedto.IchubResult
type OfficialAccountWeiXinWs ¶
type WebRequest ¶
type WebRequest[T schema.Tabler] struct { *BaseRequest[T] *pagereqcli.HttpCliQuery Records []T `json:"records"` }
func Default ¶
func Default[T schema.Tabler]() *WebRequest[T]
func (*WebRequest[T]) ExistId ¶
func (self *WebRequest[T]) ExistId(id string) *pagemodel.PageResult[T]
func (*WebRequest[T]) FromPageResult ¶
func (self *WebRequest[T]) FromPageResult(result *page.PageResult) *pagemodel.PageResult[T]
func (*WebRequest[T]) GeneralQuery ¶
func (self *WebRequest[T]) GeneralQuery() *pagemodel.PageResult[T]
func (*WebRequest[T]) GeneralQueryMax ¶
func (self *WebRequest[T]) GeneralQueryMax() *pagemodel.PageResult[T]
func (*WebRequest[T]) GetIndex ¶
func (self *WebRequest[T]) GetIndex(indexTable baseindex.IndexTable, ids any) *pagemodel.PageResult[T]
func (*WebRequest[T]) Query ¶
func (self *WebRequest[T]) Query(q elastic.Query) *WebRequest[T]
func (*WebRequest[T]) QueryResult ¶
func (self *WebRequest[T]) QueryResult() *pagemodel.PageResult[T]
func (*WebRequest[T]) Result2List ¶
func (self *WebRequest[T]) Result2List(result *page.PageResult) []T
func (*WebRequest[T]) Result2Tablers ¶
func (self *WebRequest[T]) Result2Tablers(result *pagemodel.PageResult[T]) []schema.Tabler
func (*WebRequest[T]) SetModels ¶
func (self *WebRequest[T]) SetModels(models any) *WebRequest[T]
func (*WebRequest[T]) Stru2Filter ¶
func (self *WebRequest[T]) Stru2Filter(result *pagemodel.PageResult[T]) []any
Click to show internal directories.
Click to hide internal directories.