|
@@ -514,6 +514,45 @@ func (this *ProductController) ProductList() {
|
|
|
br.Msg = "获取成功"
|
|
|
}
|
|
|
|
|
|
+// ProductRisk
|
|
|
+// @Title 产品列表
|
|
|
+// @Description pdf研报列表
|
|
|
+// @Param PageSize query int true "每页数据条数"
|
|
|
+// @Param CurrentIndex query int true "当前页页码,从1开始"
|
|
|
+// @Param ClassifyIds query string true "二级分类id,可多选用英文,隔开"
|
|
|
+// @Param KeyWord query string true "报告标题/创建人"
|
|
|
+// @Param SortType query string true "排序方式"
|
|
|
+// @Success 200 {object} models.ReportAuthorResp
|
|
|
+// @router /productRisk [get]
|
|
|
+func (this *ProductController) ProductRisk() {
|
|
|
+ br := new(models.BaseResponse).Init()
|
|
|
+ defer func() {
|
|
|
+ this.Data["json"] = br
|
|
|
+ this.ServeJSON()
|
|
|
+ }()
|
|
|
+ SourceId, _ := this.GetInt("SourceId", 0)
|
|
|
+ ProductType := this.GetString("ProductType")
|
|
|
+ if SourceId <= 0 {
|
|
|
+ br.Msg = "无效的产品ID"
|
|
|
+ br.ErrMsg = "无效的产品ID:" + strconv.Itoa(SourceId)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ riskLevel, _, err := services.GetRiskLevel(ProductType, SourceId)
|
|
|
+ if err != nil {
|
|
|
+ utils.FileLog.Error("查询产品风险等级失败", err.Error)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ resp := new(response.ProductRiskResp)
|
|
|
+ resp.RiskLevel = riskLevel
|
|
|
+ resp.SourceId = SourceId
|
|
|
+ resp.ProductType = ProductType
|
|
|
+
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Data = resp
|
|
|
+ br.Msg = "获取成功"
|
|
|
+}
|
|
|
+
|
|
|
//
|
|
|
//// OnSale @Title 上架产品
|
|
|
//// @Description 上架产品
|