|
@@ -342,7 +342,29 @@ func (this *SciHqDataController) BatchIndexList() {
|
|
|
pars = append(pars, req.SelectedId)
|
|
|
}
|
|
|
}
|
|
|
- if req.ClassifyId >= 0 {
|
|
|
+ if req.ClassifyId < 0 {
|
|
|
+ br.Msg = "分类选择错误"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if req.ClassifyId > 0 {
|
|
|
+ var classifyIds []int
|
|
|
+ tmpClassifyIds, err := data_manage.GetSciHqChildClassifyIdsById(req.ClassifyId)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取分类信息失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if len(tmpClassifyIds) > 0 {
|
|
|
+ classifyIds = append(classifyIds, tmpClassifyIds...)
|
|
|
+ }
|
|
|
+ if len(classifyIds) > 0 {
|
|
|
+ condition += ` AND classify_id IN (` + utils.GetOrmInReplace(len(classifyIds)) + `)`
|
|
|
+ pars = append(pars, classifyIds)
|
|
|
+ } else {
|
|
|
+ br.Msg = "请选择正确的分类"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ } else {
|
|
|
condition += ` AND classify_id=?`
|
|
|
pars = append(pars, req.ClassifyId)
|
|
|
}
|