123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- syntax = "proto3";
- package stdlib;
- message DocQueryRequest {
- int64 pageNum = 1; //页码
- int64 pageSize = 2; //每页数量
- string keyWord = 3; //检索词 文档名检索 模糊
- repeated string docClass = 4; // 分类 []string
- repeated string docTag = 5; // 标签 []string
- repeated string sort = 6; //默认正序,倒序字段前加-,uploadDate:上架时间 viewTimes:浏览量 downTimes:下载量
- string userId = 7; //用户id
- string appId = 8; //appId
- }
- message DocQueryResponse {
- int64 code = 1; //响应代码
- string msg = 2; //响应消息
- repeated Doc docs = 3;//文档列表集合,没有分页参数
- int64 total = 4; //总数
- }
- message Doc {
- string docId = 1;//文档id
- string docName = 2;//文档名称
- int64 price = 3;//价格
- int64 docFileSize = 4;//文档大小
- int64 docPageSize = 5;//文档页码数
- int64 downTimes = 6;//下载次数
- int64 viewTimes = 7;//浏览次数
- string uploadDate = 8;//上传时间
- string docSummary = 9; //摘要
- string docFileType = 10;//文档类型
- int64 isDownload = 11;//是否转存 0:未转存 1:转存
- }
- message DocChangeReq {
- string id = 1; //文档id
- int32 reason = 2; //处理原因 1机审通过上架 2人审通过上加 10投诉下架 11过期下架
- string appId = 3; //appId
- }
- message DocChangeResp {
- bool state = 1; //是否成功
- }
- message DocStatisticsReq {
- string docId = 1; //文档id
- int32 DocStatisticsType = 2; //文档统计类型 1增加下载次数 2增加浏览次数 3评分
- string appId = 3; //appId
- }
- message DocGetCheckReq {
- string docId = 1; //文档id
- string userId = 2; //用户id
- string appId = 3; //appId
- }
- message DocGetCheckResp {
- int64 code = 1; //响应代码
- string msg = 2; //响应消息
- bool isBuy = 3; //是否购买
- bool isCollect = 4; //是否收藏
- DocInfo DocDeail = 5;
- }
- message DocInfo {
- string docId = 1;//文档id
- string docName = 2;//文档名称
- int64 price = 3;//价格
- int64 docFileSize = 4;//文档大小
- int64 docPageSize = 5;//文档页码数
- string tags = 6;//文档标签
- int64 downTimes = 7;//下载次数
- int64 viewTimes = 8;//浏览次数
- string uploadDate = 9;//上传时间
- string docSummary = 10; //摘要
- int64 docFileType = 11;//文档类型
- string previewImgId = 12; //缩略图oss
- string ossPdfId = 13; //pdf oss
- string ossDocId = 14; //doc oss
- }
- message DocGetContentResp {
- int32 code = 1; //响应代码
- string msg = 2; //响应消息
- bytes docContent = 3; //文件内容
- }
- message DocActivityReq {
- int64 pageNum = 1; //页码
- int64 pageSize = 2; //每页数量
- string appId = 3; //appId
- string userId = 4; //当前用户id
- int64 activityId = 5; //活动id
- }
- message DocActivity {
- string docId = 1; //文档id
- int64 activityId = 2; //活动id
- string docTitle = 3; //文档标题
- string docSummary = 4; //文档摘要
- string docImg = 5; //文档配图
- int64 price = 6; //活动价
- int64 costPrice = 7; //成本价
- int64 downTimes = 8; //下载次数
- string sourceUserId = 9; //贡献人
- int64 docFileSize = 10; //文件大小
- int64 docPageSize = 11; //页码数
- int64 docFileType = 12; //文件类型,1 doc 2 pdf 3 xls 4 ppt 5 txt 6 其他
- string uploadDate = 13; //上传时间
- bool isBuy = 14; //是否购买
- }
- message DocActivityResp {
- int32 code = 1; //响应代码
- string msg = 2; //响应消息
- repeated DocActivity docs = 3;//活动文档列表
- int32 total = 4; //总数
- }
- service Stdlib {
- rpc DocQuery(DocQueryRequest) returns(DocQueryResponse); //文档检索
- rpc DocOn(DocChangeReq) returns(DocChangeResp); //文档上架
- rpc DocOff(DocChangeReq) returns(DocChangeResp); //文档下架
- rpc DocStatistics(DocStatisticsReq) returns(DocChangeResp); //文档浏览次数下载次数处理
- rpc DocGetCheck(DocGetCheckReq) returns(DocGetCheckResp); //获取文档-检查文档是否可获取,返回页面数据
- rpc DocGetContent(DocGetCheckReq) returns(DocGetContentResp); //获取文档-页面打开pdf调用查询oss
- rpc DocActivity(DocActivityReq) returns(DocActivityResp); //活动文档列表
- }
|