swagger: "2.0" info: title: 弘则开放API接口 description: | 这是弘则开放API接口文档 <br/><br/><b>1、参数格式与调用方式:</b><br/>(1)接口传输的所有参数使用 UTF8 编码格式,包括签名。接口调用方式请以接口定义的方式进行调用。<br/>(2)接口地址(测试):http://8.136.199.33:8608/api/<br/>(3)如果是POST请求,那么header头请以Content-Type: application/json的方式请求<br/><br/><b>2、公共参数:</b><br/><table style="text-align:center"><tr><td style="border:1px solid">参数名</td><td style="border:1px solid">类型</td><td style="border:1px solid">是否必传</td><td style="border:1px solid">说明</td><tr><td style="border:1px solid">appid</td><td style="border:1px solid">string</td><td style="border:1px solid">是</td><td style="border:1px solid">开放平台给分配的appid</td></tr></tr><tr><td style="border:1px solid">nonce_str</td><td style="border:1px solid">string</td><td style="border:1px solid">是</td><td style="border:1px solid">随机字符串,最大32位长度,26位大小写字母a,b…z和数字组成</td></tr><tr><td style="border:1px solid">timestamp</td><td style="border:1px solid">int</td><td style="border:1px solid">是</td><td style="border:1px solid">系统时间戳 UNIX_TIMESTAMP格式;1970年到目前的秒数</td></tr><tr><td style="border:1px solid">sign</td><td style="border:1px solid">string</td><td style="border:1px solid">是</td><td style="border:1px solid">签名信息(签名规则查看第4节)</td></tr><tr><td style="border:1px solid">_page</td><td style="border:1px solid">int</td><td style="border:1px solid">否</td><td style="border:1px solid">请求页码</td></tr><tr><td style="border:1px solid">_page_size</td><td style="border:1px solid">int</td><td style="border:1px solid">否</td><td style="border:1px solid">每页请求返回数据数,最大不能超过100</td></tr></table> <br/><br/><b>3、公共返回参数:</b><br/><table style="text-align:center"><tr><td style="border:1px solid">参数名</td><td style="border:1px solid">类型</td><td style="border:1px solid">是否必传</td><td style="border:1px solid">说明</td></tr><tr><td style="border:1px solid">code</td><td style="border:1px solid">int</td><td style="border:1px solid">是</td><td style="border:1px solid">接口返回状态码</td></tr><tr><td style="border:1px solid">msg</td><td style="border:1px solid">string</td><td style="border:1px solid">是</td><td style="border:1px solid">提示信息(错误信息)</td></tr><tr><td style="border:1px solid">data</td><td style="border:1px solid">map</td><td style="border:1px solid">是</td><td style="border:1px solid">对应的业务数据</td></tr></table> <br/><br/><b>4、签名规则:</b><br/>(1)所有发送或者接收到的数据为集合M,将集合M内非空参数值的参数按照参数名ASCII码从小到大排序(字典序),使用URL键值对的格式(即key1=value1&key2=value2…)拼接成字符串stringA。<br/>(2)在stringA最后拼接上&secret=secretValue得到stringSignTemp字符串,并对stringSignTemp进行MD5运算,再将得到的字符串所有字符转换为大写,得到sign值signValue。<br/><br/><b>5、code状态码取值:</b><br/><table style="text-align:center"><tr><td style="border:1px solid">200</td><td style="border:1px solid">正常响应码</td></tr> <tr><td style="border:1px solid">400</td><td style="border:1px solid">业务处理失败响应码</td></tr> <tr><td style="border:1px solid">401</td><td style="border:1px solid">参数签名异常,检查下签名是否正常</td></tr></table> version: 1.0.0 contact: email: pyan@hzinsights.com license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html basePath: /api paths: /chart/change: post: tags: - chart description: |- 图表变更通知的插入点接口 <br> operationId: ChartController.图表变更通知的插入点接口 parameters: - in: body name: request description: type json string required: true schema: $ref: '#/definitions/chart.CreatChartCeluePushReq' responses: "200": description: 创建成功 /company_user/user_report_list: get: tags: - company_user description: |- 获取用户阅读数据报表 <br> operationId: CompanyUser.获取用户阅读数据报表 parameters: - in: query name: start_date description: 开始日期,格式:2021-11-03 type: string - in: query name: end_date description: 结束日期,格式:2021-11-04 type: string - in: query name: mobile description: 用户手机号 type: string - in: query name: email description: 用户邮箱 type: string responses: "200": description: "" schema: $ref: '#/definitions/company_user.UserReportListResp' /company_user/view_total_list: get: tags: - company_user description: |- 获取用户阅读数据报表 <br> operationId: CompanyUser.获取用户阅读数据报表 responses: "200": description: "" schema: type: array items: $ref: '#/definitions/logic.UserView' /day_new/refresh: get: tags: - day_new description: |- 手动刷新 <br> operationId: DayNewController.手动刷新企业微信群消息 /day_new/translate: get: tags: - day_new description: |- 手动翻译内容 <br> operationId: DayNewController.手动翻译内容 /en/report/notify: get: tags: - en/report description: |- 策略报告发布通知 <br> operationId: EnglishReportController.策略报告发布通知 /quanshi/callback: post: tags: - quanshi description: |- 全时回调接口 <br> operationId: QuanShiControllerCommon.全时回调接口 /report/article/change: post: tags: - report description: |- 报告变更通知的插入点接口 <br> operationId: ReportController.报告变更通知的插入点接口 parameters: - in: body name: request description: type json string required: true schema: $ref: '#/definitions/article.CreatArticleCeluePushReq' responses: "200": description: 创建成功 /report/classify/list: get: tags: - report description: |- 获取报告分类列表接口 <br> operationId: ReportController.获取报告分类列表接口 parameters: - in: query name: _page_size description: 每页数据条数 required: true type: integer format: int64 - in: query name: _page description: 当前页页码,从1开始 required: true type: integer format: int64 - in: query name: report_type description: 类型 day:晨报 、week :周报、two_week:双周报 、month:月报、other :点评 (默认为day:晨报) required: true type: string - in: query name: keyword description: 搜索关键词 required: true type: string - in: query name: mobile description: 用户手机号(加密后的) required: true type: string responses: "200": description: "" schema: $ref: '#/definitions/classify.ClassifyList' /report/getReportChapterInfo: get: tags: - report description: |- 获取章节详情 <br> operationId: ReportControllerCommon.获取章节详情接口 parameters: - in: query name: ResearchReportTypeId description: 章节ID required: true type: integer format: int64 - in: query name: mobile description: 用户手机号(加密后的) type: string responses: "200": description: "" schema: $ref: '#/definitions/report.ResearchReportTypeContentInfo' /report/getReportChapterInfo/v2: get: tags: - report description: |- 获取章节详情 <br> operationId: ReportControllerCommon.获取章节详情接口 parameters: - in: query name: report_chapter_id description: 章节ID required: true type: integer format: int64 - in: query name: mobile description: 用户手机号(加密后的) type: string responses: "200": description: "" schema: $ref: '#/definitions/report.ReportChapterDetail' /report/getReportInfo: get: tags: - report description: |- 获取报告详情 <br> operationId: ReportControllerCommon.获取报告详情 parameters: - in: query name: research_report_id description: 报告ID required: true type: integer format: int64 - in: query name: mobile description: 用户手机号(加密后的) required: true type: string responses: "200": description: "" schema: $ref: '#/definitions/report.ResearchReportInfo' /report/getReportInfo/v2: get: tags: - report description: |- 获取报告详情 <br> operationId: ReportControllerCommon.获取报告详情 parameters: - in: query name: report_id description: 报告ID required: true type: integer format: int64 - in: query name: mobile description: 用户手机号(加密后的) required: true type: string responses: "200": description: "" schema: $ref: '#/definitions/report.ReportDetail' /report/getTickerData: get: tags: - report description: |- 获取报告详情获取指标数据接口 <br> operationId: ReportControllerCommon.获取报告详情获取指标数据接口 parameters: - in: query name: report_chapter_id description: 章节ID required: true type: integer format: int64 responses: "200": description: "" schema: $ref: '#/definitions/report.TickerData' /report/list: get: tags: - report description: |- 获取报告列表 <br> operationId: ReportController.获取报告列表接口 parameters: - in: query name: _page_size description: 每页数据条数 required: true type: integer format: int64 - in: query name: _page description: 当前页页码,从1开始 required: true type: integer format: int64 - in: query name: report_type description: 类型 day:晨报 、week :周报、two_week:双周报 、month:月报、other :点评 (默认为day:晨报) required: true type: string - in: query name: keyword description: 搜索关键词 required: true type: string - in: query name: mobile description: 用户手机号(加密后的) required: true type: string responses: "200": description: "" schema: $ref: '#/definitions/report.ReportListResp' /report/list/v2: get: tags: - report description: |- 获取报告列表 <br> operationId: ReportController.获取报告列表接口 parameters: - in: query name: _page_size description: 每页数据条数 required: true type: integer format: int64 - in: query name: _page description: 当前页页码,从1开始 required: true type: integer format: int64 - in: query name: classify_id description: 分类id required: true type: integer format: int64 - in: query name: keyword description: 搜索关键词 required: true type: string - in: query name: mobile description: 用户手机号(加密后的) required: true type: string responses: "200": description: "" schema: $ref: '#/definitions/report.ReportListResp' /sys_user/create: post: tags: - sys_user description: |- 创建系统用户 <br> operationId: Admin.创建系统用户 parameters: - in: body name: request description: type json string required: true schema: $ref: '#/definitions/admin.CreateUserReq' responses: "200": description: 创建成功 /wework/notify: get: tags: - wework description: |- 企业微信通知 <br> operationId: WeworkController.企业微信通知 post: tags: - wework description: |- 企业微信通知 <br> operationId: WeworkController.企业微信通知 /yidong/activity/examine/signup: post: tags: - yidong description: |- 易董提交报名用户审核接口 <br> operationId: YiDongController.易董提交报名用户审核接口 parameters: - in: body name: request description: type json string required: true schema: $ref: '#/definitions/yidong.ActivityExamineReq' responses: "200": description: 创建成功 /yidong/activity/user/signup: post: tags: - yidong description: |- 易董提交报名时,获取用户信息接口 <br> operationId: YiDongController.易董提交报名时,获取用户信息接口 parameters: - in: body name: request description: type json string required: true schema: $ref: '#/definitions/yidong.ActivityExamineReq' responses: "200": description: 创建成功 definitions: admin.CreateUserReq: title: CreateUserReq type: object properties: mobile: description: 手机号 type: string real_name: description: 用户真实姓名 type: string role_type: description: 角色类型,枚举值。1:ficc研究员;2:权益研究员;3:ficc销售;4:权益销售 type: integer format: int64 article.CreatArticleCeluePushReq: title: CreatArticleCeluePushReq type: object properties: action: description: 操作方式 add:新增、edit:修改、move:删除 type: string appid: description: 文章ID type: string article_id: description: 文章ID type: integer format: int64 chart.CreatChartCeluePushReq: title: CreatChartCeluePushReq type: object properties: action: description: 操作方式 add:新增、edit:修改、move:删除 type: string appid: description: APPID type: string chart_id: description: 图表ID type: integer format: int64 classify.ClassifyList: title: ClassifyList type: object properties: Child: type: array items: $ref: '#/definitions/classify.ClassifyList' ClassifyName: description: 分类名称 type: string Id: type: integer format: int64 ParentId: description: 父级分类id type: integer format: int64 company_report_permission.ResearchReportTypeContent: title: ResearchReportTypeContent type: object properties: content: description: 内容 type: string content_type: description: 内容分类类型 type: string created_time: description: 创建时间 type: string format: datetime img_url: description: 图片路径 type: string last_updated_time: description: 最近一次更新时间 type: string format: datetime research_report_id: description: 报告id type: integer format: int64 research_report_type_content_id: description: 研究报告内容id type: integer format: int64 research_report_type_title: description: 标题 type: string sort: description: 排序 type: integer format: int64 company_report_permission.ResearchReportTypeInfo: title: ResearchReportTypeInfo type: object properties: banner_url: description: banner url type: string report_chapter_type_id: description: 章节名称 type: integer format: int64 report_chapter_type_name: description: 章节名称 type: string research_report_id: description: 报告id type: integer format: int64 research_report_type_id: description: 研究报告id type: integer format: int64 research_report_type_title: description: 研究报告标题 type: string type: type: string type_id: description: 分类id type: integer format: int64 company_report_permission.ResearchReportTypeList: title: ResearchReportTypeList type: object properties: BannerUrl: description: banner显示图片 type: string Edit: description: 是否编辑过 type: integer format: int32 EditImgUrl: description: 管理后台编辑时选用的图 type: string LastUpdatedTime: description: 最后更新时间 type: string format: datetime PauseEndTime: description: 暂停结束日期 type: string format: datetime PauseStartTime: description: 暂停开始日期 type: string format: datetime ReportChapterTypeKey: description: 章节key type: string ReportChapterTypeName: description: 报告章节类型名称 type: string ReportChapterTypeThumb: description: H5展示的图片 type: string ResearchReportId: description: 研究报告id type: integer format: int64 ResearchReportTypeId: description: 章节ID type: integer format: int64 ResearchReportTypeTitle: description: 研究报告标题 type: string Sort: description: 排序字段 type: integer format: int64 Trend: description: 趋势观点 type: string TypeId: description: 分类id type: integer format: int64 http_url: type: string company_user.UserReportListResp: title: UserReportListResp type: object properties: list: description: 数据列表 type: array items: $ref: '#/definitions/tables.ViewReportList' paging: $ref: '#/definitions/utils.PagingItem' description: 分页数据 logic.UserView: title: UserView type: object properties: count: description: 阅读数 type: integer format: int64 phone: description: 手机号 type: string report.CustomerInfo: title: CustomerInfo type: object properties: company_name: description: 客户(公司)名称 type: string has_apply: description: 是否有申请过 type: boolean is_suspend: description: 启用与否字段:1:暂停,0:启用 type: integer format: int64 mobile: description: 手机号 type: string name: description: 联系人名称 type: string status: description: 状态 type: string report.PermissionCheckInfo: title: PermissionCheckInfo type: object properties: customer_info: $ref: '#/definitions/report.CustomerInfo' description: 客户信息 hz_phone: description: 弘则公司电话 type: string mobile: description: 手机号 type: string name: description: 销售名称 type: string type: description: 校验失败,没有权限,需要让前端处理的类型,枚举值:apply,contact type: string report.ReportChapterDetail: title: ReportChapterDetail type: object properties: auth_ok: type: boolean permission_check: $ref: '#/definitions/report.PermissionCheckInfo' report_chapter_item: $ref: '#/definitions/report.ReportChapterItem' report_chapter_menu_list: type: array items: $ref: '#/definitions/report.ReportChapterMenu' ticker_data_param: description: 指标数据参数 type: string report.ReportChapterItem: title: ReportChapterItem type: object properties: abstract: type: string author: description: 作者 type: string classify_id_first: description: 一级分类id type: integer format: int64 classify_name_first: description: 一级分类名称 type: string content: description: 内容 type: string content_sub: description: 内容前两个章节 type: string publish_time: type: string format: datetime report_chapter_id: type: integer format: int64 report_chapter_type_name: type: string report_id: type: integer format: int64 stage: description: 期数 type: integer format: int64 title: type: string trend: type: string type_id: type: integer format: int64 type_name: type: string video_img: description: 音频播放条的图片 type: string video_name: description: 音频文件名称 type: string video_play_seconds: description: 音频播放时长 type: string video_size: type: string video_url: description: 音频文件URL type: string report.ReportChapterListItem: title: ReportChapterListItem type: object properties: http_url: type: string publish_time: type: string format: datetime report_chapter_id: type: integer format: int64 report_chapter_type_key: type: string report_chapter_type_name: type: string report_chapter_type_thumb: type: string report_id: type: integer format: int64 sort: type: integer format: int64 title: type: string trend: type: string type_id: type: integer format: int64 type_name: type: string report.ReportChapterMenu: title: ReportChapterMenu type: object properties: http_url: type: string pc_selected_thumb: type: string pc_unselected_thumb: type: string report_chapter_id: type: integer format: int64 report_chapter_type_name: type: string report_chapter_type_thumb: type: string report_id: type: integer format: int64 sort: type: integer format: int64 report.ReportDetail: title: ReportDetail type: object properties: auth_ok: type: boolean permission_check: $ref: '#/definitions/report.PermissionCheckInfo' report_chapter_list: type: array items: $ref: '#/definitions/report.ReportChapterListItem' report_info: $ref: '#/definitions/report.ReportItem' report_show_type: type: integer format: int64 report.ReportItem: title: ReportItem type: object properties: abstract: description: 摘要 type: string author: description: 作者 type: string banner_url: description: 详情页banner type: string classify_name_first: description: 一级分类名称 type: string classify_name_second: description: 二级分类名称 type: string content: description: 内容 type: string content_sub: description: 内容前两个章节 type: string frequency: description: 频度 type: string publish_time: description: 发布时间 type: string format: datetime report_id: type: integer format: int64 stage: description: 期数 type: integer format: int64 title: description: 标题 type: string video_img: description: 音频播放条的图片 type: string video_name: description: 音频文件名称 type: string video_play_seconds: description: 音频播放时长 type: string video_size: description: 音频文件大小,单位M type: string video_url: description: 音频文件URL type: string report.ReportList: title: ReportList type: object properties: Author: description: 作者 type: string Id: description: 报告Id type: integer format: int64 Title: description: 标题 type: string create_time: description: 创建时间 type: string format: datetime http_url: description: 跳转地址 type: string stage: description: 期数 type: integer format: int64 report.ReportListResp: title: ReportListResp type: object properties: list: description: 列表 type: array items: $ref: '#/definitions/report.ReportList' paging: $ref: '#/definitions/utils.PagingItem' description: 分页数据 report.ResearchReport: title: ResearchReport type: object properties: author: description: 报告作者 type: string createdTime: description: 创建时间 type: string format: datetime enabled: description: 报告状态 type: integer format: int32 isHasMenu: description: 报告是否含有目录 type: integer format: int32 isSendedMsg: description: 是否发送过模板消息 type: integer format: int32 lastUpdatedTime: type: string format: datetime periods: description: 期数 type: integer format: int64 reportVariety: description: 研究报告的品种,双周报和月报有标识 type: string research_report_id: description: 研究报告id type: integer format: int64 researchReportDate: description: 报告日期 type: string format: datetime researchReportImg: description: 报告缩略图URL type: string researchReportName: description: 研究报告名称 type: string researchReportTitle: description: 研究报告标题 type: string status: description: 状态,draft:草稿, type: string type: description: day 晨报 week 周报 twoweek双周报 month 月报 type: string viewers: description: H5观看用户数 type: integer format: int64 report.ResearchReportInfo: title: ResearchReportInfo type: object properties: ResearchReportTypeContentList: description: 报告详情 type: array items: $ref: '#/definitions/company_report_permission.ResearchReportTypeContent' has_menu: type: integer format: int64 research_report_info: $ref: '#/definitions/report.ResearchReport' research_report_type_list: type: array items: $ref: '#/definitions/company_report_permission.ResearchReportTypeList' report.ResearchReportTypeContentInfo: title: ResearchReportTypeContentInfo type: object properties: add: type: integer format: int64 research_report_type_content_list: description: 报告详情 type: array items: $ref: '#/definitions/company_report_permission.ResearchReportTypeContent' research_report_type_info: $ref: '#/definitions/company_report_permission.ResearchReportTypeInfo' research_report_type_list: type: array items: $ref: '#/definitions/company_report_permission.ResearchReportTypeList' report.TickerData: title: TickerData type: object properties: list: type: array items: $ref: '#/definitions/report.TickerDataItem' ticker_title: $ref: '#/definitions/report.TickerTitleData' report.TickerDataItem: title: TickerDataItem type: object properties: base_column_name: type: string date: type: string dd_value: type: number format: double last_value: type: number format: double mm_value: type: number format: double ticker: type: string ticker_value: type: number format: double ww_value: type: number format: double report.TickerTitleData: title: TickerTitleData type: object properties: data_table_image: type: string report_chapter_type_id: type: integer format: int64 report_chapter_type_name: type: string ticker_title: type: string tables.ViewReportList: title: ViewReportList type: object properties: company_name: description: 公司名称 type: string created_time: description: 报告阅读时间 type: string email: description: 邮箱 type: string mobile: description: 手机号 type: string report_name: description: 报告标题 type: string user_name: description: 用户名称 type: string utils.PagingItem: title: PagingItem type: object properties: current_index: description: 当前页页码 type: integer format: int64 is_end: description: 是否最后一页 type: boolean is_start: description: 是否首页 type: boolean next_index: description: 下一页页码 type: integer format: int64 page_size: description: 每页数据条数 type: integer format: int64 pages: description: 总页数 type: integer format: int64 previous_index: description: 上一页页码 type: integer format: int64 totals: description: 总数据量 type: integer format: int64 yidong.ActivityExamineReq: title: ActivityExamineReq type: object properties: activity_id: description: 文章ID type: string appid: description: 开放平台给分配的appid type: string list: description: 审核结果 type: array items: $ref: '#/definitions/yidong.ExamineStatusReq' sign: description: 签名 type: string time: description: 时间戳 type: integer format: int64 yidong.ExamineStatusReq: title: ExamineStatusReq type: object properties: create_time: description: 报名时间 type: string examine_status: description: 审核状态 1,通过、2:未通过、3:取消报名 type: integer format: int64 mobile: description: 手机号 type: string tags: - name: company_user description: | CompanyUser 客户联系人模块 - name: report description: | 报告模块 - name: report description: | 报告模块 - name: sys_user description: | Admin 系统用户模块 - name: quanshi description: | QuanShiControllerCommon 报告模块 - name: yidong description: | 易董 - name: wework description: | 用户 - name: chart description: | 图表模块