浏览代码

Merge branch 'ETA_1.8.1' into debug

zwxi 11 月之前
父节点
当前提交
17d06cf7d6
共有 3 个文件被更改,包括 16 次插入16 次删除
  1. 6 6
      controllers/smart_report/smart_resource.go
  2. 2 2
      models/smart_report/smart_resource.go
  3. 8 8
      routers/commentsRouter.go

+ 6 - 6
controllers/smart_report/smart_resource.go

@@ -120,13 +120,13 @@ func (this *SmartReportResourceController) List() {
 	br.Data = resp
 }
 
-// Rename
-// @Title 重命名
-// @Description 重命名
+// Edit
+// @Title 编辑
+// @Description 编辑
 // @Param	request	body smart_report.SmartReportPublishReq true "type json string"
 // @Success 200 string "操作成功"
-// @router /resource/rename [post]
-func (this *SmartReportResourceController) Rename() {
+// @router /resource/edit [post]
+func (this *SmartReportResourceController) Edit() {
 	br := new(models.BaseResponse).Init()
 	defer func() {
 		if br.ErrMsg == "" {
@@ -142,7 +142,7 @@ func (this *SmartReportResourceController) Rename() {
 		br.Ret = 408
 		return
 	}
-	var req smart_report.SmartReportRenameReq
+	var req smart_report.SmartReportResourceEditReq
 	err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
 	if err != nil {
 		br.Msg = "参数解析异常!"

+ 2 - 2
models/smart_report/smart_resource.go

@@ -82,8 +82,8 @@ func (m *SmartReportResource) GetPageItemsByCondition(condition string, pars []i
 	return
 }
 
-// SmartReportRenameReq 智能研报资源重命名请求体
-type SmartReportRenameReq struct {
+// SmartReportResourceEditReq 智能研报资源编辑请求体
+type SmartReportResourceEditReq struct {
 	ResourceId int    `description:"资源ID"`
 	ImgName    string `description:"图片名称"`
 	Style      string `description:"版图样式"`

+ 8 - 8
routers/commentsRouter.go

@@ -6264,26 +6264,26 @@ func init() {
 
     beego.GlobalControllerRouter["eta/eta_api/controllers/smart_report:SmartReportResourceController"] = append(beego.GlobalControllerRouter["eta/eta_api/controllers/smart_report:SmartReportResourceController"],
         beego.ControllerComments{
-            Method: "List",
-            Router: `/resource/list`,
-            AllowHTTPMethods: []string{"get"},
+            Method: "Edit",
+            Router: `/resource/edit`,
+            AllowHTTPMethods: []string{"post"},
             MethodParams: param.Make(),
             Filters: nil,
             Params: nil})
 
     beego.GlobalControllerRouter["eta/eta_api/controllers/smart_report:SmartReportResourceController"] = append(beego.GlobalControllerRouter["eta/eta_api/controllers/smart_report:SmartReportResourceController"],
         beego.ControllerComments{
-            Method: "Remove",
-            Router: `/resource/remove`,
-            AllowHTTPMethods: []string{"post"},
+            Method: "List",
+            Router: `/resource/list`,
+            AllowHTTPMethods: []string{"get"},
             MethodParams: param.Make(),
             Filters: nil,
             Params: nil})
 
     beego.GlobalControllerRouter["eta/eta_api/controllers/smart_report:SmartReportResourceController"] = append(beego.GlobalControllerRouter["eta/eta_api/controllers/smart_report:SmartReportResourceController"],
         beego.ControllerComments{
-            Method: "Rename",
-            Router: `/resource/rename`,
+            Method: "Remove",
+            Router: `/resource/remove`,
             AllowHTTPMethods: []string{"post"},
             MethodParams: param.Make(),
             Filters: nil,