Documentation ¶
Index ¶
- Constants
- func VerifyCollectType(collectType int) bool
- func VerifyColletAction(action int) bool
- func VerifyModuleType(moduleType int) bool
- func VerifyRecommend(recommend int) bool
- func VerifySoure(soure int) bool
- func VerifyStatus(status int) bool
- type AddExplorationReq
- type AddHeadlineReq
- type AdminCommentsListBase
- type AdminReplyCommentLsitBase
- type Answer
- type Args
- type ArgsAddAuthor
- type ArgsAddCommnets
- type ArgsAddReplyComment
- type ArgsAdminAddRaiders
- type ArgsAdminCommentsList
- type ArgsAdminDelReplyComment
- type ArgsAdminRaiderInfo
- type ArgsAdminRaidersList
- type ArgsAdminReplyCommentList
- type ArgsAdminUpdateRaiders
- type ArgsAnswerAdd
- type ArgsAnswerCheck
- type ArgsAnswerCollect
- type ArgsAnswerGetP
- type ArgsAuditComment
- type ArgsAuditRaider
- type ArgsAuthorList
- type ArgsCateAdd
- type ArgsCollectCancel
- type ArgsExplorationInfo
- type ArgsExplorationListByAuthId
- type ArgsExplorationRecommend
- type ArgsGetAuthors
- type ArgsGetShop
- type ArgsGiveALike
- type ArgsKeyWordAdd
- type ArgsKeyWordDel
- type ArgsKeyWordGet
- type ArgsQuizAdd
- type ArgsQuizAdd2
- type ArgsQuizCheck
- type ArgsQuizD
- type ArgsQuizGet
- type ArgsQuizGetA
- type ArgsQuizGetP
- type ArgsRaiderRecommend
- type ArgsRecommendAuthor
- type ArgsRecommendAuthorList
- type ArgsReplyCommentList
- type ArgsRollRecommendHeadline
- type ArgsSubCateAdd
- type ArgsUpdateAuthor
- type ArgsUserAddRaider
- type ArgsUserAuthorList
- type ArgsUserCollect
- type ArgsUserCollectList
- type ArgsUserComentList
- type ArgsUserCommentList
- type ArgsUserExplorationInfo
- type ArgsUserExplorationList
- type ArgsUserRaiderInfo
- type ArgsUserRaiderList
- type ArgsWebHeadlineList
- type Author
- type AuthorBase
- type AuthorListBase
- type CateInfo
- type Collect
- type CollectBase
- type Comment
- type CommentInfo
- type Comments
- type ContextImg
- type Empty
- type Exploration
- type ExplorationDescribe
- type ExplorationID
- type ExplorationInfo
- type ExplorationItemReq
- type ExplorationItemResp
- type ExplorationList
- type ExplorationListByAuthIdBase
- type ExplorationReq
- type ExplorationResp
- type Headline
- type HeadlineID
- type HeadlineListBase
- type HeadlineListResp
- type HeadlineReq
- type HeadlineResp
- type ImgExp
- type ImgHashExplain
- type KeyWordInfo
- type ListReq
- type MyCollect
- type MyQuiz
- type MyReply
- type PageReq
- type Quiz
- type QuizInfo
- type QuizRes
- type Raiders
- type RaidersArticleBase
- type RaidersBase
- type RaidersBusRelationBase
- type RaidersListBase
- type RecomendReadBase
- type RecommendationReadingBase
- type RecommendationReadingReq
- type RecommendationReadingResp
- type ReplyAddComments
- type ReplyAddReplyComment
- type ReplyAdminAddRaiders
- type ReplyAdminCommentsList
- type ReplyAdminRaiderInfo
- type ReplyAdminRaidersList
- type ReplyAdminReplyCommentLsit
- type ReplyAnswerPage
- type ReplyAuthorInfo
- type ReplyAuthorList
- type ReplyCateAll
- type ReplyCateDetail
- type ReplyCommentList
- type ReplyCommentListBase
- type ReplyCommentPage
- type ReplyExplorationInfo
- type ReplyExplorationListByAuthId
- type ReplyExplorationRecommend
- type ReplyGetAuthors
- type ReplyGetShop
- type ReplyInfo
- type ReplyKeyWord
- type ReplyQuiz
- type ReplyQuizB
- type ReplyQuizGetA
- type ReplyQuizOne
- type ReplyQuizPage
- type ReplyRaiderRecommend
- type ReplyRecommendAuthorList
- type ReplyRollRecommendHeadline
- type ReplyUserAddRaider
- type ReplyUserAuthorList
- type ReplyUserCollectList
- type ReplyUserComentList
- type ReplyUserCommentList
- type ReplyUserExplorationList
- type ReplyUserRaiderInfo
- type ReplyUserRaiderList
- type ReplyWebHeadlineList
- type ShopInfo
- type SubCateInfo
- type UserAuthorListBase
- type UserCollectListBase
- type UserCommentListBase
- type UserExplorationListBase
- type UserRaiderListBase
Constants ¶
const ( // 收藏动作 // 未收藏 COLLECT_NO = 0 // 已收藏 COLLECT_YES = 1 // 收藏类型 // 攻略 Collect_Raider = 1 // 探店 Collect_Exploration = 2 // 单项目 Collect_Signle = 3 // 服务套餐 Collect_Sm = 4 // 综合卡 Collect_Card = 5 // 限时卡 Collect_Hcard = 6 // 限次卡 Collect_Ncard = 7 // 限时限次卡 Collect_Hncard = 8 // 产品 Collect_Product = 9 // 门店 Collect_Shop = 10 )
const ( IS_DEL_YES = 1 IS_DEL_NO = 0 MY_QUIZ = 1 MY_REPLY = 2 MY_COLLECT = 3 CHECK_STATUS_PASS = 2 )
const ( // 状态待审核 STATUS_WAITING = 0 // 状态通过 STATUS_PASS = 1 // 状态不通过 STATUS_NOT_PASS = 2 // 来源后台 SOURE_ADMIN = 0 // 来源用户 SOURE_USER = 1 // 是否推荐:不推荐 RECOMMEND_NO = 0 // 是否推荐:推荐 RECOMMEND_YES = 1 // 模块类型 // 攻略 MODULE_TYPE_RAIDERS = 1 // 探店 MODULE_TYPE_EXPLORATION = 2 // 问答 MODULE_TYPE_QUIZ = 3 // 头条 MODULE_TYPE_HEADLINE = 4 // 是否关联商户 // 否 RELATION_BUS_NO = 0 // 是 RELATION_BUS_YES = 1 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddExplorationReq ¶
type AddHeadlineReq ¶
type AdminCommentsListBase ¶
type AdminCommentsListBase struct { Id int `mapstructure:"id"` // 评论id CommentId int `mapstructure:"comment_id"` // 模块id Uid int `mapstructure:"uid"` // uid Nick string `mapstructure:"nick"` // 用户昵称 Content string `mapstructure:"content"` // 评论内容 Title string `mapstructure:"title"` // 主题:攻略,探店 Type int `mapstructure:"type"` // 板块类型 1-攻略 2-探店 Ctime int64 `mapstructure:"ctime"` // 评论时间 CtimeStr string `mapstructure:"ctime_str"` // Status int `mapstructure:"status"` // 状态 }
type AdminReplyCommentLsitBase ¶
type AdminReplyCommentLsitBase struct { Id int CommentId int `mapstructure:"comment_id"` // 评论的模块id Content string ReplyUid int `mapstructure:"reply_uid"` Author string Ctime int64 CtimeStr string }
AdminReplyCommentLsitBase 后台评论回复列表base
type ArgsAddAuthor ¶
type ArgsAddAuthor struct { AuthorId int Type int AvatarImgHash string // 探员头像hash Introduction string // 探员简介 BackgroundImgHash string // 探员背景图hash }
ArgsAddAuthor 添加作者入参
type ArgsAddCommnets ¶
type ArgsAddCommnets struct { common.Utoken // 必须登陆才可以评论 CommentId int // Uid int // Type int // Content string }
ArgsAddCommnets 添加评论入参
type ArgsAddReplyComment ¶
type ArgsAddReplyComment struct { common.Utoken CommentId int // 评论id Content string // 回复内容 Type int // 板块类型 1-攻略 2-探店 ReplyUid int // 回复人id }
ArgsAddReplyComment 添加评论回复入参
type ArgsAdminAddRaiders ¶
type ArgsAdminAddRaiders struct { common.Autoken RaidersBase RaidersArticle []RaidersArticleBase // 攻略文章base RaidersBusRelation []RaidersBusRelationBase // 攻略关联的商户 }
ArgsAdminAddRaiders 添加攻略入参
type ArgsAdminCommentsList ¶
ArgsAdminCommentsList 后台攻略/探店评论列表入参
type ArgsAdminDelReplyComment ¶
ArgsAdminDelReplyComment 管理员删除回复评论
type ArgsAdminRaiderInfo ¶
ArgsAdminRaiderInfo ArgsAdminRaiderInfo
type ArgsAdminRaidersList ¶
type ArgsAdminRaidersList struct { common.Autoken common.Paging Soure string // 来源 0-后台 1-用户 Recommend string // 是否推荐 0-不推荐 1-推荐 }
ArgsAdminRaidersList 后台攻略列表入参
type ArgsAdminReplyCommentList ¶
ArgsAdminReplyCommentList 后台评论回复列表入参
type ArgsAdminUpdateRaiders ¶
type ArgsAdminUpdateRaiders struct { common.Autoken RaidersBase RaiderId int // 攻略ID RaidersArticle []RaidersArticleBase // 攻略文章base RaidersBusRelation []RaidersBusRelationBase // 攻略关联的商户 }
ArgsAdminUpdateRaiders 更新攻略入参
type ArgsAnswerAdd ¶
type ArgsAnswerAdd struct { common.Autoken QuizId int //提问id AnswerId int //答案id //如果是 评论 必须要传答案id Content string //回复内容 }
用户 添加 回复
type ArgsAnswerCheck ¶
通过审核 或者 拒绝审核 答案 or 评论
type ArgsAnswerCollect ¶
用户收藏提问
type ArgsAnswerGetP ¶
按 分页 审核 查询答案或者评论
type ArgsAuditComment ¶
ArgsAuditComment 审核用户评论
type ArgsAuditRaider ¶
ArgsAuditRaider 审核攻略
type ArgsAuthorList ¶
ArgsAuthorList 作者列表入参
type ArgsExplorationInfo ¶
type ArgsExplorationInfo struct {
ID int
}
type ArgsExplorationListByAuthId ¶
ArgsExplorationListByAuthId 获取探员下所有的探店
type ArgsExplorationRecommend ¶
前台探店推荐入参
type ArgsGiveALike ¶
用户点赞
type ArgsKeyWordAdd ¶
type ArgsKeyWordAdd struct { common.Autoken Id int //关键字 id ModId int //关键字 所属模块id KeyWord string //关键字 }
添加 关键字 或者修改
type ArgsQuizAdd ¶
type ArgsQuizAdd struct { common.Autoken Context string //问题内容 Id int //问题Id AuthorId int //作者id CateId int //二级分类id Source int //0是用户 1是平台 Status int //审核状态 默认 1待审核 2已通过 3未通过 //后台用 IsRec int //是否推荐 默认 1不推荐 2推荐 //后台用 Imgs []ImgHashExplain //图片和说明 RecTime string //推荐日期 起始时间-结束时间 }
添加提问
type ArgsQuizAdd2 ¶
type ArgsQuizAdd2 struct { common.Autoken CateId int Content string Imgs []ImgHashExplain //图片和说明 }
用户添加提问
type ArgsQuizCheck ¶
审核
type ArgsQuizGetP ¶
按分页 推荐 审核 查询提问 后台查询
type ArgsRaiderRecommend ¶
type ArgsRaiderRecommend struct { common.Paging common.Utoken Count int // 展示量 RaiderId int ContainOwn bool // 如果不包含当前文章时,须将当前文章的id传递过来 }
ArgsRaiderRecommend 推荐阅读入参
type ArgsRecommendAuthor ¶
ArgsRecommendAuthor 是否推荐作者入参
type ArgsRecommendAuthorList ¶
ArgsRecommendAuthorList 推荐探员/作者
type ArgsReplyCommentList ¶
ArgsReplyCommentList 前台评论回复列表
type ArgsRollRecommendHeadline ¶
type ArgsRollRecommendHeadline struct { }
type ArgsSubCateAdd ¶
type ArgsSubCateAdd struct { common.Autoken Id int //一级分类id Name string //二级分类名称 ImgHash string //分类图片 }
添加子分类
type ArgsUpdateAuthor ¶
type ArgsUpdateAuthor struct { Id int AvatarImgHash string // 探员头像hash Introduction string // 探员简介 BackgroundImgHash string // 探员背景图hash }
ArgsUpdateAuthor 更新探员信息
type ArgsUserAddRaider ¶
type ArgsUserAddRaider struct { common.Utoken Title string // 攻略文章标题 Body string // 正文 ImgHash string // 封面图片ID,不能为空 RaidersArticle []RaidersArticleBase // 攻略文章base }
ArgsUserAddRaider 前台用户添加攻略入参
type ArgsUserAuthorList ¶
type ArgsUserAuthorList struct { common.Paging Nick string Type int GetAll bool // 全部数据,为true时,type无效 }
ArgsUserAuthorList 探员列表入参
type ArgsUserCollect ¶
ArgsUserCollect 前台收藏入参
type ArgsUserCollectList ¶
ArgsUserCollectList 用户收藏的文章:攻略/探店
type ArgsUserComentList ¶
ArgsUserComentList 前台获取评论列表入参
type ArgsUserCommentList ¶
ArgsUserCommentList 前台用户评论列表入参
type ArgsUserExplorationInfo ¶
前台探店详情入参
type ArgsUserExplorationList ¶
前台探店列表入参
type ArgsUserRaiderInfo ¶
ArgsUserRaiderInfo 前台攻略详情入参
type ArgsUserRaiderList ¶
-----------------------------前台攻略rpc------------------------------- ArgsUserRaiderList 前台攻略列表入参
type ArgsWebHeadlineList ¶
前台头条列表入参
type Author ¶
type Author interface { // AddAuthor 添加作者 AddAuthor(ctx context.Context, args *ArgsAddAuthor, reply *bool) error // DelAuthor 删除作者 DelAuthor(ctx context.Context, id *int, reply *bool) error // RecommendAuthor 是否推荐作者 RecommendAuthor(ctx context.Context, args *ArgsRecommendAuthor, reply *bool) error // AuthorList 作者列表 AuthorList(ctx context.Context, args *ArgsAuthorList, reply *ReplyAuthorList) error // AuthorInfo 作者详情 AuthorInfo(ctx context.Context, id *int, reply *ReplyAuthorInfo) error // UpdateAuthor 更新探员作者 UpdateAuthor(ctx context.Context, args *ArgsUpdateAuthor, reply *bool) error // GetAuthors 获取作者,只获取Nick和UID GetAuthors(ctx context.Context, args *ArgsGetAuthors, reply *[]ReplyGetAuthors) error // UserAuthorList 前台探员列表 UserAuthorList(ctx context.Context, args *ArgsUserAuthorList, reply *ReplyUserAuthorList) error // RecommendAuthorList 前台探员/作者推荐 RecommendAuthorList(ctx context.Context, args *ArgsRecommendAuthorList, reply *ReplyRecommendAuthorList) error }
type AuthorBase ¶
type AuthorBase struct { Id int `mapstructure:"id"` AuthorId int `mapstructure:"author_id"` Type int `mapstructure:"type"` Recommend int `mapstructure:"recommend"` // 是否推荐 0-不推荐 1-推荐 AvatarImgId int `mapstructure:"avatar_img_id"` // 探员头像id Introduction string `mapstructure:"introduction"` // 探员简介 BackgroundImgId int `mapstructure:"background_img_id"` // 探员背景图id Ctime int64 `mapstructure:"ctime"` CtimeStr string }
AuthorBase AuthorBase
type AuthorListBase ¶
type AuthorListBase struct { Id int `mapstructure:"id"` AuthorId int `mapstructure:"author_id"` Type int `mapstructure:"type"` Recommend int `mapstructure:"recommend"` // 是否推荐 0-不推荐 1-推荐 Introduction string `mapstructure:"introduction"` // 探员简介 Ctime int64 `mapstructure:"ctime"` CtimeStr string Nick string }
AuthorListBase AuthorListBase
type CateInfo ¶
type CateInfo struct { Id int `mapstructure:"id"` Name string `mapstructure:"name"` Sub []SubCateInfo }
type Collect ¶
type Collect interface { // UserCollect 用户收藏 UserCollect(ctx context.Context, args *ArgsUserCollect, reply *bool) error // UserCollectList 用户收藏的攻略和探店 UserCollectList(ctx context.Context, args *ArgsUserCollectList, reply *ReplyUserCollectList) error }
type CollectBase ¶
type CollectBase struct { Id int `mapstructure:id` CollectId int `mapstructure:"collect_id"` Type int `mapstructure:"type"` Uid int `mapstructure:"uid"` Attention int `mapstructure:"attention"` }
CollectBase 收藏基础结构体
type CommentInfo ¶
type Comments ¶
type Comments interface { // AdminCommentsList 后台攻略/探店评论列表 AdminCommentsList(ctx context.Context, args *ArgsAdminCommentsList, reply *ReplyAdminCommentsList) error // AuditComment 后台审核用户评论 AuditComment(ctx context.Context, args *ArgsAuditComment, reply *bool) error // AddCommnets 添加评论 AddCommnets(ctx context.Context, args *ArgsAddCommnets, reply *ReplyAddComments) error // UserCommentList 前台评论列表 UserCommentList(ctx context.Context, args *ArgsUserCommentList, reply *ReplyUserCommentList) error // ReplyCommentList 前台评论回复列表 ReplyCommentList(ctx context.Context, args *ArgsReplyCommentList, reply *ReplyCommentList) error // AddReplyComments 添加评论回复 AddReplyComments(ctx context.Context, args *ArgsAddReplyComment, reply *ReplyAddReplyComment) error // AdminDelReplyComment 管理员删除评论回复 AdminDelReplyComment(ctx context.Context, args *ArgsAdminDelReplyComment, reply *bool) error // AdminReplyCommentList 后台评论回复列表 AdminReplyCommentList(ctx context.Context, args *ArgsAdminReplyCommentList, reply *ReplyAdminReplyCommentLsit) error }
type Exploration ¶
type Exploration interface { // 后台添加探店 AddExploration(ctx context.Context, req *AddExplorationReq, resp *ExplorationID) (err error) // 后台更新探店 UpdateExploration(ctx context.Context, req *ExplorationReq, resp *Empty) (err error) // 后台探店详情 ExplorationInfo(ctx context.Context, req *ExplorationID, resp *ExplorationResp) (err error) ExplorationInfo2(ctx context.Context, req *ExplorationID, resp *ExplorationResp) (err error) // 后台探店列表 ExplorationList(ctx context.Context, req *ListReq, resp *ExplorationList) (err error) // ExlorationListByAuthId 前台获取探员下的探店 ExplorationListByAuthId(ctx context.Context, args *ArgsExplorationListByAuthId, reply *ReplyUserExplorationList) (err error) // UserExplorationInfo 前台探店详情 UserExplorationInfo(ctx context.Context, args *ArgsUserExplorationInfo, reply *ReplyExplorationInfo) (err error) // UserExplorationList 前台探店列表 UserExplorationList(ctx context.Context, args *ArgsUserExplorationList, reply *ReplyUserExplorationList) (err error) // ExplorationRecommend 前台探店推荐 ExplorationRecommend(ctx context.Context, args *ArgsExplorationRecommend, reply *ReplyUserExplorationList) (err error) }
type ExplorationDescribe ¶
type ExplorationDescribe struct { ID int `mapstructure:"id"` Title string `mapstructure:"title"` Area string `mapstructure:"area"` AuthorID int `mapstructure:"author_id"` Author string `mapstructure:"author"` Admin bool `mapstructure:"admin"` Recommendation bool `mapstructure:"recommendation"` ShopID int `mapstructure:"shop_id"` CommentCount int `mapstructure:"comment_count"` CollectionCount int `mapstructure:"collection_count"` View int }
type ExplorationID ¶
type ExplorationID struct {
ID int
}
type ExplorationInfo ¶
type ExplorationInfo struct { ID int `mapstructure:"id"` Title string `mapstructure:"title"` // 标题 Area string `mapstructure:"area"` // 地区 AuthorID int `mapstructure:"author_id"` // 探员ID AvatarUrl string //用户头像 Author string `mapstructure:"author"` // 探员 Recommendation bool `mapstructure:"recommendation"` //是否推荐 RecommendationStartTime int64 `mapstructure:"recommendation_start_time"` // 推荐开始时间 RecommendationEndTime int64 `mapstructure:"recommendation_end_time"` // 推荐结束时间 ImageID int `mapstructure:"image_id"` // 封面图片ID ImageUrl string ImageHash string VideoUrl string `mapstructure:"video_url"` // 关联视频连接 ShopID int `mapstructure:"shop_id"` // 关联shopID ShopInfo ShopInfo Description string `mapstructure:"description"` // 描述 Content string `mapstructure:"content"` // 正文 View int // 浏览量 Ctime int64 CtimeStr string Collection bool // 用户是否收藏 }
type ExplorationItemReq ¶
type ExplorationItemResp ¶
type ExplorationList ¶
type ExplorationList struct { TotalNum int Lists []ExplorationDescribe }
type ExplorationReq ¶
type ExplorationResp ¶
type ExplorationResp struct { ID int `mapstructure:"id"` Title string `mapstructure:"title"` // 标题 Area string `mapstructure:"area"` // 地区 AuthorID int `mapstructure:"author_id"` // 探员ID Author string `mapstructure:"author"` // 探员 Recommendation bool `mapstructure:"recommendation"` //是否推荐 RecommendationStartTime int64 `mapstructure:"recommendation_start_time"` // 推荐开始时间 RecommendationEndTime int64 `mapstructure:"recommendation_end_time"` // 推荐结束时间 ImageID int `mapstructure:"image_id"` // 封面图片ID ImageUrl string ImageHash string VideoUrl string `mapstructure:"video_url"` // 关联视频连接 ShopID int `mapstructure:"shop_id"` // 关联shopID Description string `mapstructure:"description"` // 描述 Content string `mapstructure:"content"` // 正文 View int Items []ExplorationItemResp }
type Headline ¶
type Headline interface { // 后台添加头条 AddHeadline(ctx context.Context, req *AddHeadlineReq, resp *HeadlineID) (err error) // 后台删除头条 DeleteHeadline(ctx context.Context, req *HeadlineID, resp *Empty) (err error) // 后台更新头条 UpdateHeadline(ctx context.Context, req *HeadlineReq, resp *Empty) (err error) // 后台头条详情 HeadlineInfo(ctx context.Context, req *HeadlineID, resp *HeadlineResp) (err error) // 后台头条列表 HeadlineList(ctx context.Context, req *PageReq, resp *HeadlineListResp) (err error) // 前台头条详情 HeadlineInfo2(ctx context.Context, req *HeadlineID, resp *HeadlineResp) (err error) // 前台头条推荐列表 RecommendationReadingList(ctx context.Context, req *RecommendationReadingReq, resp *RecommendationReadingResp) (err error) // 前台头条列表 WebHeadlineList(ctx context.Context, req *ArgsWebHeadlineList, resp *ReplyWebHeadlineList) (err error) // 前台滚动的推荐头条 RollRecommendHeadline(ctx context.Context, req *ArgsRollRecommendHeadline, resp *[]ReplyRollRecommendHeadline) (err error) }
type HeadlineID ¶
type HeadlineID struct {
ID int
}
type HeadlineListBase ¶
type HeadlineListResp ¶
type HeadlineListResp struct { TotalNum int Lists []HeadlineListBase }
type HeadlineReq ¶
type HeadlineResp ¶
type HeadlineResp struct { ID int `mapstructure:"id"` Title string `mapstructure:"title"` Author string `mapstructure:"author"` Source string `mapstructure:"source"` Link string `mapstructure:"link"` ImgHash string ImageUrl string Recommendation bool `mapstructure:"recommendation"` ReleaseTime int64 `mapstructure:"release_time"` ReleaseTimeStr string // 发布时间str Ctime int64 `mapstructure:"ctime"` CtimeStr string Synopsis string `mapstructure:"synopsis"` Content string `mapstructure:"content"` View int }
type ImgHashExplain ¶
type KeyWordInfo ¶
type Quiz ¶
type Quiz interface { //添加一级分类 AddCate(ctx context.Context, args *ArgsCateAdd, reply *int) error //添加二级分类 AddSubCate(ctx context.Context, args *ArgsSubCateAdd, reply *int) error //修改二级分类 UpdateSubCate(ctx context.Context, args *ArgsSubCateAdd, reply *bool) error //查询所有一级分类一级下属二级分类 GetCateAll(ctx context.Context, args *Args, reply *ReplyCateAll) error //按分页 推荐 审核 查询提问 后台查询 GetQuizByPage(ctx context.Context, args *ArgsQuizGetP, reply *ReplyQuizPage) error //添加提问 AddQuiz(ctx context.Context, args *ArgsQuizAdd, reply *int) error //修改提问 UpdateQuiz(ctx context.Context, args *ArgsQuizAdd, reply *bool) error //通过审核 或者 拒绝审核 CheckQuiz(ctx context.Context, args *ArgsQuizCheck, reply *bool) error //按 分页 审核 查询答案 后台用 GetAnswerByPage(ctx context.Context, args *ArgsAnswerGetP, reply *ReplyAnswerPage) error //通过审核 或者 拒绝审核 答案 or 评论 CheckAnswer(ctx context.Context, args *ArgsAnswerCheck, reply *bool) error //按 分页 审核 查询评论 GetCommentByPage(ctx context.Context, args *ArgsAnswerGetP, reply *ReplyCommentPage) error //添加 关键字 AddKeyWord(ctx context.Context, args *ArgsKeyWordAdd, reply *int) error //修改 关键字 UpdateKeyWord(ctx context.Context, args *ArgsKeyWordAdd, reply *bool) error //删除 关键字 DelKeyWord(ctx context.Context, args *ArgsKeyWordDel, reply *bool) error //根据提问id查询详情 GetQuizOne(ctx context.Context, args *int, reply *ReplyQuizOne) error //根据2级分类查询1级分类id GetCateBySubId(ctx context.Context, args *int, reply *int) error //根据二级分类id查询详情 GetCateDetailById(ctx context.Context, args *int, reply *ReplyCateDetail) error //按模块查询关键字 GetKeyWordByModId(ctx context.Context, args *ArgsKeyWordGet, reply *ReplyKeyWord) error //添加提问 AddQuiz2(ctx context.Context, args *ArgsQuizAdd2, reply *int) error //根据用户Id查询 我的问答 数据 GetQuizByUid(ctx context.Context, args *ArgsQuizGet, reply *ReplyQuiz) error //App端查询提问 GetQuizByApp(ctx context.Context, args *ArgsQuizGetA, reply *ReplyQuizGetA) error //app端根据问题id查询答案和评论 //从问答列表 进入 GetQuizDetail(ctx context.Context, args *ArgsQuizD, reply *[]ReplyInfo) error //app端根据问题id查询答案和评论 //从我的问答 问题id 查询详情 GetQuizDetailB(ctx context.Context, args *ArgsQuizD, reply *ReplyQuizB) error //用户 添加 回复 AddAnswer(ctx context.Context, args *ArgsAnswerAdd, reply *int) error //用户 收藏 提问 CollectAnswer(ctx context.Context, args *ArgsAnswerCollect, reply *int) error //用户 取消 收藏提问 CancelCollect(ctx context.Context, args *ArgsCollectCancel, reply *bool) error //用户点赞 包括 提问点赞 答案点赞 AddGiveALike(ctx context.Context, args *ArgsGiveALike, reply *bool) error }
type QuizInfo ¶
type QuizInfo struct { Id int `mapstructure:"id"` //提问id Uid int `mapstructure:"author_id"` //用户id Context string `mapstructure:"content"` //问题内容 CateId int `mapstructure:"cate_id"` //所属分类 GiveALike int `mapstructure:"give_a_like"` //点赞 数量 Answer int `mapstructure:"answer"` //回答 数量 Collect int `mapstructure:"collect"` //关注 数量 CreateTime string `mapstructure:"create_time"` //时间 List []ContextImg //图片和说明的集合 }
问题查询返回
type QuizRes ¶
type QuizRes struct { Id int `mapstructure:"id"` //提问id Context string `mapstructure:"content"` //问题内容 CateId int `mapstructure:"cate_id"` //所属分类 CateName string GiveALike int `mapstructure:"give_a_like"` //点赞 数量 Answer int `mapstructure:"answer"` //回答 数量 Collect int `mapstructure:"collect"` //关注 数量 Time string `mapstructure:"create_time"` //时间 Status int `mapstructure:"status"` //审核状态默认2 1待审核 2已通过 3未通过 IsRec int `mapstructure:"is_rec"` //是否推荐首页默认1 1不推荐 2推荐 Source int `mapstructure:"source"` //来源默认0 0是用户 1是后台 }
type Raiders ¶
type Raiders interface { // AdminAddRaiders 后台添加攻略 AdminAddRaiders(ctx context.Context, args *ArgsAdminAddRaiders, reply *ReplyAdminAddRaiders) error // AdminUpdateRaiders 后台更新攻略 AdminUpdateRaiders(ctx context.Context, args *ArgsAdminUpdateRaiders, reply *bool) error // AdminRaidersList 后台攻略列表 AdminRaidersList(ctx context.Context, args *ArgsAdminRaidersList, reply *ReplyAdminRaidersList) error // AdminRaiderInfo 后台攻略详情 AdminRaiderInfo(ctx context.Context, args *ArgsAdminRaiderInfo, reply *ReplyAdminRaiderInfo) error // AuditRaider 审核攻略 AuditRaider(ctx context.Context, args *ArgsAuditRaider, reply *bool) error // UserAddRaider 前台用户添加攻略 UserAddRaider(ctx context.Context, args *ArgsUserAddRaider, reply *ReplyUserAddRaider) error // UserRaidersList 前台台攻略列表 UserRaidersList(ctx context.Context, args *ArgsUserRaiderList, reply *ReplyUserRaiderList) error //GetUserPublishRaiderList 用户发布的攻略 GetUserPublishRaiderList(ctx context.Context, args *ArgsUserRaiderList, reply *ReplyUserRaiderList) error // UserRaiderInfo 前台攻略详情 UserRaiderInfo(ctx context.Context, args *ArgsUserRaiderInfo, reply *ReplyUserRaiderInfo) error // RecommendList 推荐阅读 RecommendList(ctx context.Context, args *ArgsRaiderRecommend, reply *ReplyRaiderRecommend) error // GetShop 获取攻略关联的店铺 GetShop(ctx context.Context, args *ArgsGetShop, reply *ReplyGetShop) error }
type RaidersArticleBase ¶
type RaidersArticleBase struct { Id int // RaiderId int `mapstructure:"raider_id"` // 攻略ID ImgId int `mapstructure:"img_id"` // 文章图片id ImgUrl string `mapstructure:"img_url"` ImgHash string `mapstructure:"img_hash"` // 文章图片hash ArticleDesc string `mapstructure:"article_desc"` // 文章内容 }
RaidersArticleBase 攻略文章base
type RaidersBase ¶
type RaidersBase struct { Id int `mapstructure:id` Title string `mapstructure:"title"` // 攻略文章标题 AuthorId int `mapstructure:"author_id"` // 文章作者 Recommend int `mapstructure:"raider_id"` // 是否推荐 0-不推荐 1-推荐 Body string `mapstructure:"body"` // 正文 ImgId int `mapstructure:"img_id"` // 封面图片ID,不能为空 ImgHash string `mapstructure:"img_hash"` // 封面图片hash ImgUrl string `mapstructure:"img_url"` StartTime int64 `mapstructure:"start_time"` // 起始时间 EndTime int64 `mapstructure:"end_time"` // 结束时间 IsRelation int `mapstructure:"is_relation"` // 是否已关联商户 BusBody string `mapstructure:"bus_body"` // 关联的商户正文 Soure int `mapstructure:"soure"` // 来源 0-后台 1-用户 Ctime int64 `mapstructure:"ctime"` // 创建时间 CtimeStr string `mapstructure:"ctime_str"` // 创建时间字符串 Attention bool `mapstructure:"attention"` // 是否收藏 }
RaidersBase 攻略base
type RaidersBusRelationBase ¶
type RaidersBusRelationBase struct { Id int RaiderId int `mapstructure:"raider_id"` // 攻略ID BusId int `mapstructure:"bus_id"` // 商户ID ImgId int `mapstructure:"img_id"` // 图片ID ImgUrl string `mapstructure:"img_url"` ImgHash string `mapstructure:"img_hash"` // 图片Hash ImgDesc string `mapstructure:"img_desc"` // 图片内容 }
RaidersBusRelationBase 攻略关联的商户
type RaidersListBase ¶
type RaidersListBase struct { Id int `mapstructure:"id"` // id Title string `mapstructure:"title"` // 文章标题 Soure int `mapstructure:"soure"` // 来源 0-后台 1-用户 Author string `mapstructure:"author"` // 作者 AuditStatus int `mapstructure:"audit_status"` AuthorId int `mapstructure:"author_id"` AttentionNum int `mapstructure:"attention_num"` // 搜藏量 ViewsNum int `mapstructure:"views_num"` // 浏览量 CommentsNum int `mapstructure:"comments_num"` // 评论量 Recommend int `mapstructure:"recommend"` // 是否推荐 0-不推荐 1-推荐 IsRelation int `mapstructure:"is_relation"` // 是否已关联商户 Ctime int64 `mapstructure:"ctime"` // 创建时间 CtimeStr string `mapstructure:"ctime_str"` // 创建时间字符串 }
RaidersListBase RaidersListBase
type RecomendReadBase ¶
type RecomendReadBase []RecommendationReadingBase
func (RecomendReadBase) Len ¶
func (slice RecomendReadBase) Len() int
func (RecomendReadBase) Less ¶
func (slice RecomendReadBase) Less(i, j int) bool
func (RecomendReadBase) Swap ¶
func (slice RecomendReadBase) Swap(i, j int)
type RecommendationReadingBase ¶
type RecommendationReadingBase struct { ID int `mapstructure:"id"` Title string `mapstructure:"title"` Author string `mapstructure:"author"` ReleaseTime int64 `mapstructure:"release_time"` ReleaseTimeStr string Synopsis string `mapstructure:"synopsis"` Ctime int64 `mapstructure:"ctime"` CtimeStr string ImgUrl string `mapstructure:"img_url"` ImgId int `mapstructure:"img_id"` View int }
type RecommendationReadingResp ¶
type RecommendationReadingResp struct { TotalNum int Lists []RecommendationReadingBase }
type ReplyAddReplyComment ¶
type ReplyAddReplyComment struct {
ReplyId int // 评论回复id
}
ReplyAddReplyComment 添加评论回复出参
type ReplyAdminAddRaiders ¶
type ReplyAdminAddRaiders struct {
RaiderId int
}
ReplyAdminAddRaiders 添加攻略返回参数
type ReplyAdminCommentsList ¶
type ReplyAdminCommentsList struct { TotalNum int // Lists []AdminCommentsListBase }
ReplyAdminCommentsList 后台攻略/探店评论列表出参
type ReplyAdminRaiderInfo ¶
type ReplyAdminRaiderInfo struct { RaidersBase Author string // 作者 //RaiderId int // 攻略ID RaidersArticle []RaidersArticleBase // 攻略文章base RaidersBusRelation []RaidersBusRelationBase // 攻略关联的商户 }
ReplyAdminRaiderInfo ReplyAdminRaiderInfo
type ReplyAdminRaidersList ¶
type ReplyAdminRaidersList struct { TotalNum int // Lists []RaidersListBase }
ReplyAdminRaidersList 后台攻略列表返回参数
type ReplyAdminReplyCommentLsit ¶
type ReplyAdminReplyCommentLsit struct { TotalNum int Lists []AdminReplyCommentLsitBase }
ReplyAdminReplyCommentLsit 后台评论回复列表出参
type ReplyAuthorInfo ¶
type ReplyAuthorInfo struct { AuthorBase AvatarImgHash string // 探员头像hash BackgroundImgHash string // 探员背景图hash AvatarImgUrl string // 探员头像url BackgroundImgUrl string // 探员背景图url }
ReplyAuthorInfo ReplyAuthorInfo
type ReplyAuthorList ¶
type ReplyAuthorList struct { TotalNum int Lists []AuthorListBase }
ReplyAuthorList 作者列表出参
type ReplyCateAll ¶
查询所有一级和子类分类
type ReplyCateDetail ¶
根据二级分类id查询二级分类详情
type ReplyCommentList ¶
type ReplyCommentList struct { TotalNum int Lists []ReplyCommentListBase }
type ReplyCommentListBase ¶
type ReplyCommentListBase struct { Id int CommentId int `mapstructure:"comment_id"` // 主评论id Nick string // 用户昵称 ImgUrl string // 头像url ImgHash string // 头像hash ImgId int // 头像id Content string // 内容 Ctime int64 // 评论时间 CtimeStr string // ReplyUid int `mapstructure:"reply_uid"` // 回复人 }
ReplyCommentList ReplyCommentList
type ReplyExplorationInfo ¶
type ReplyExplorationInfo struct { ExplorationInfo Items []ExplorationItemResp }
type ReplyExplorationListByAuthId ¶
type ReplyExplorationListByAuthId struct { TotalNum int Lists []ExplorationListByAuthIdBase }
type ReplyExplorationRecommend ¶
type ReplyExplorationRecommend struct { TotalNum int Lists []UserExplorationListBase }
前台探店推荐出参
type ReplyGetAuthors ¶
ReplyGetAuthors 获取作者出参
type ReplyGetShop ¶
type ReplyGetShop struct { BusBody string `mapstructure:"bus_body"` TotalNum int Lists []RaidersBusRelationBase }
ReplyGetShop 获取攻略关联的店铺出参
type ReplyInfo ¶
type ReplyInfo struct { Uid int `mapstructure:"uid"` //用户id Id int `mapstructure:"id"` //答案id Reply int `mapstructure:"reply"` //回复数量 GiveALike int `mapstructure:"give_a_like"` //点赞数量 Content string `mapstructure:"content"` //内容 CreateTime string `mapstructure:"create_time"` //回复时间 //ParentId int //0代表 是答案 有值代表 是评论一条答案 Sub []CommentInfo `mapstructure:"sub"` }
根据问题id查询 答案和评论 //列表进入查询返回 //答案或者评论回复
type ReplyQuiz ¶
type ReplyQuiz struct { MyQuiz []MyQuiz `mapstructure:"myQuiz"` //我的提问数据 MyReply []MyReply `mapstructure:"myReply"` //我的回复 MyCollect []MyCollect `mapstructure:"myCollect"` //我的收藏 ReplyNum []map[string]interface{} //回复数量 }
根据用户id查询问题返回 //app 我的提问 我的回复 我的收藏
type ReplyQuizB ¶
根据问题id查询 答案和评论 //我的问答 进入查询返回
type ReplyQuizOne ¶
type ReplyQuizOne struct { Context string `mapstructure:"content"` //问题内容 Id int `mapstructure:"id"` //问题Id AuthorId int `mapstructure:"author_id"` //作者id CateId int `mapstructure:"cate_id"` //二级分类id Status int `mapstructure:"status"` //审核状态 默认 1待审核 2已通过 3未通过 //后台用 IsRec int `mapstructure:"is_rec"` //是否推荐 默认 1不推荐 2推荐 //后台用 Imgs []ImgExp //图片和说明 StartTime string `mapstructure:"start_time"` //推荐日期 起始时间 EndTime string `mapstructure:"end_time"` //推荐日期 结束时间 }
查询一条问题详情
type ReplyRaiderRecommend ¶
type ReplyRaiderRecommend struct { TotalNum int Lists []UserRaiderListBase }
ReplyRaiderRecommend 推荐阅读出参
type ReplyRecommendAuthorList ¶
type ReplyRecommendAuthorList struct { TotalNum int Lists []UserAuthorListBase }
type ReplyRollRecommendHeadline ¶
type ReplyRollRecommendHeadline struct { ID int `mapstructure:"id"` Title string `mapstructure:"title"` }
前台滚动的推荐头条入参
type ReplyUserAuthorList ¶
type ReplyUserAuthorList struct { TotalNum int Lists []UserAuthorListBase }
ReplyUserAuthorList 探员列表出参
type ReplyUserCollectList ¶
type ReplyUserCollectList struct { TotalNum int Lists []UserCollectListBase }
type ReplyUserCommentList ¶
type ReplyUserCommentList struct { TotalNum int Lists []UserCommentListBase }
ReplyUserCommentList 前台用户评论列表出参
type ReplyUserExplorationList ¶
type ReplyUserExplorationList struct { TotalNum int Lists []UserExplorationListBase }
前台探店列表出参
type ReplyUserRaiderInfo ¶
type ReplyUserRaiderInfo struct { RaidersBase AttentionNum int `mapstructure:"attention_num"` // 搜藏量 ViewsNum int `mapstructure:"views_num"` // 浏览量 CommentsNum int `mapstructure:"comments_num"` // 评论量 Author string // 作者 AvatarUrl string //用户头像 RaidersArticle []RaidersArticleBase // 攻略文章base }
ReplyUserRaiderInfo 前台攻略详情出参
type ReplyUserRaiderList ¶
type ReplyUserRaiderList struct { TotalNum int `mapstructure:"total_num"` Lists []UserRaiderListBase }
ReplyUserRaiderList 前台攻略列表出参
type ReplyWebHeadlineList ¶
type ReplyWebHeadlineList struct { TotalNum int Lists []HeadlineListBase }
前台头条列表出参
type ShopInfo ¶
type ShopInfo struct { BusId int //商户信息 ShopId int //门店id ShopName string //门店名称 BranchName string //分店名 ShopAddress string //门店地址 ShopImage string //门店图片 ShopPhone string //门店电话 IndustryId int //领域id MainBindId int //主行业id BindId []int //行业id集合 BindNames string //行业名称 Pid int //省id Cid int //市id Did int //区id DName string //区名称 DistrictId []int //商圈id DistrictNames string //商圈名称 Lon float64 //经度 Lat float64 //纬度 CommentScore float64 //平均评分 Distance int //距离 m SafeCode int //商家安全码颜色 1=黑色 2=红色 3=黄色 4=绿色 }
type SubCateInfo ¶
type UserAuthorListBase ¶
type UserAuthorListBase struct { AuthorId int `mapstructure:"author_id"` Nick string // 昵称 Introduction string `mapstructure:"introduction"` // 探员简介 AvatarImgId int `mapstructure:"avatar_img_id"` // 探员头像id AvatarImgUrl string // 探员头像 Recommend int `mapstructure:"recommend"` // 是否推荐 BackgroundImgId int `mapstructure:"background_img_id"` // 探员背景ID BackgroundImgUrl string // 探员背景 Type int `mapstructure:"type"` // 类型 }
UserAuthorListBase UserAuthorListBase
type UserCollectListBase ¶
type UserCollectListBase struct { CollectId int `mapstructure:"collect_id"` Title string `mapstructure:"title"` ImageID int `mapstructure:"image_id"` // 封面图片ID ImageUrl string AuthorID int `mapstructure:"author_id"` Author string `mapstructure:"author"` // 探员 Introduction string // 探员简介 AvatarImgUrl string // 探员头像 BackgroundImgUrl string // 探员背景 CollectionCount int `mapstructure:"collection_count"` // 收藏量 View int Type int `mapstructure:"type"` // 1-攻略;2-探店 }
type UserCommentListBase ¶
type UserCommentListBase struct { Id int Uid int Nick string // 用户昵称 ImgUrl string // 头像url ImgHash string // 头像hash ImgId int // 头像id Content string // 内容 Ctime int64 // 评论时间 CtimeStr string // NewReply *ReplyCommentListBase // 最新的评论回复 ReplyTotal int // 回复评论量 }
UserCommentListBase UserCommentListBase
type UserExplorationListBase ¶
type UserExplorationListBase struct { ID int `mapstructure:"id"` Title string `mapstructure:"title"` ImageID int `mapstructure:"image_id"` // 封面图片ID ImageUrl string ImageHash string AuthorID int `mapstructure:"author_id"` Author string `mapstructure:"author"` // 探员 Introduction string `mapstructure:"introduction"` // 探员简介 AvatarImgUrl string // 探员头像 BackgroundImgUrl string // 探员背景 //Admin bool `mapstructure:"admin"` //Recommendation bool `mapstructure:"recommendation"` //ShopID int `mapstructure:"shop_id"` CommentCount int `mapstructure:"comment_count"` // 评论量 CollectionCount int `mapstructure:"collection_count"` // 收藏量 View int Collection bool // 用户是否收藏 }
type UserRaiderListBase ¶
type UserRaiderListBase struct { Id int `mapstructure:"id"` // id Title string `mapstructure:"title"` // 文章标题 AttentionNum int `mapstructure:"attention_num"` // 搜藏量 ViewsNum int `mapstructure:"views_num"` // 浏览量 CommentsNum int `mapstructure:"comments_num"` // 评论量 Attention bool `mapstructure:"attention"` // 是否收藏 ImgUrl string // 封面url ImgHash string // 封面hash ImgId int `mapstructure:"img_id"` Ctime int64 `mapstructure:"ctime"` // 创建时间 CtimeStr string // 创建时间字符串 }