|
@@ -33,9 +33,13 @@ func (cp *ChartPermissionController) SyncClassifyChartPermission(c *gin.Context)
|
|
|
resp.Fail("分类名称不能为空", c)
|
|
|
return
|
|
|
}
|
|
|
+ if req.ClassifyId <= 0 {
|
|
|
+ resp.Fail("分类ID不能为空", c)
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
etaOb := new(eta.ChartPermissionSearchKeyWordMapping)
|
|
|
- mappingList, err := etaOb.GetPermissionByKeyword(req.Keyword)
|
|
|
+ mappingList, err := etaOb.GetPermissionByKeyword(req.ClassifyId)
|
|
|
if err != nil {
|
|
|
resp.FailData("查询分类权限失败", err.Error(), c)
|
|
|
return
|
|
@@ -49,11 +53,12 @@ func (cp *ChartPermissionController) SyncClassifyChartPermission(c *gin.Context)
|
|
|
From: v.From,
|
|
|
TacticType: v.TacticType,
|
|
|
TeleconferenceSort: v.TeleconferenceSort,
|
|
|
+ ClassifyId: v.ClassifyId,
|
|
|
}
|
|
|
finalList = append(finalList, tmp)
|
|
|
}
|
|
|
ob := new(crm.ChartPermissionSearchKeyWordMapping)
|
|
|
- e := ob.EditChartPermissionSearchKeyWordMappingMulti(req.Keyword, finalList)
|
|
|
+ e := ob.EditChartPermissionSearchKeyWordMappingMulti(req.Keyword, finalList, req.ClassifyId)
|
|
|
if e != nil {
|
|
|
resp.FailData("设置分类权限失败", e.Error(), c)
|
|
|
return
|
|
@@ -98,8 +103,8 @@ func (this *ChartPermissionController) SyncReportMapping(c *gin.Context) {
|
|
|
resp.Fail("报告ID不能为空", c)
|
|
|
return
|
|
|
}
|
|
|
- if req.ClassifyNameSecond == "" {
|
|
|
- resp.Fail("报告分类不能为空", c)
|
|
|
+ if req.ClassifyIdSecond <= 0 {
|
|
|
+ resp.Fail("分类ID不能为空", c)
|
|
|
return
|
|
|
}
|
|
|
e, msg := crmService.SyncChartPermissionReportMapping(req)
|
|
@@ -132,11 +137,11 @@ func (this *ChartPermissionController) SyncKeywordMapping(c *gin.Context) {
|
|
|
resp.Fail("新报告分类名称不能为空", c)
|
|
|
return
|
|
|
}
|
|
|
- if req.Keyword == "" {
|
|
|
- resp.Fail("报告分类名称不能为空", c)
|
|
|
+ if req.ClassifyId <= 0 {
|
|
|
+ resp.Fail("分类ID不能为空", c)
|
|
|
return
|
|
|
}
|
|
|
- e := crm.UpdateChartPermissionNameFromMappingByKeyword(req.NewKeyword, req.Keyword, "rddp")
|
|
|
+ e := crm.UpdateChartPermissionNameFromMappingByKeyword(req.NewKeyword, req.ClassifyId, "rddp")
|
|
|
if e != nil {
|
|
|
resp.FailData("更新权限中的报告分类名称失败", e.Error(), c)
|
|
|
return
|