|
@@ -51,7 +51,7 @@ func (this *MyChartController) ChartList() {
|
|
|
pageSize, _ := this.GetInt("PageSize")
|
|
|
currentIndex, _ := this.GetInt("CurrentIndex")
|
|
|
keyWord := this.GetString("KeyWord")
|
|
|
-
|
|
|
+
|
|
|
var total int
|
|
|
page := paging.GetPaging(currentIndex, pageSize, total)
|
|
|
|
|
@@ -74,14 +74,14 @@ func (this *MyChartController) ChartList() {
|
|
|
chartClassifyIds := make([]int, 0)
|
|
|
var classifyList []*data_manage.ChartClassifyItems
|
|
|
var err error
|
|
|
-
|
|
|
+
|
|
|
classifyList, err = data_manage.GetChartClassifyAllBySourceIsSelected(utils.CHART_SOURCE_DEFAULT, isSelected)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|
|
|
br.ErrMsg = fmt.Sprintf("获取图表分类失败, Err: %v", err)
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if chartClassifyId > 0 {
|
|
|
parents := data.GetChartClassifyChildrenRecursive(classifyList, chartClassifyId)
|
|
|
sort.Slice(parents, func(i, j int) bool {
|
|
@@ -100,7 +100,11 @@ func (this *MyChartController) ChartList() {
|
|
|
pars = append(pars, chartClassifyIds)
|
|
|
}
|
|
|
if keyWord != "" {
|
|
|
- condition += ` AND ( chart_name LIKE '%` + keyWord + `%' OR chart_name_en LIKE '%` + keyWord + `%' )`
|
|
|
+ likeKey := `%` + keyWord + `%`
|
|
|
+ //condition += ` AND ( chart_name LIKE '%` + keyWord + `%' OR chart_name_en LIKE '%` + keyWord + `%' )`
|
|
|
+ condition += ` AND ( chart_name LIKE ? OR chart_name_en LIKE ? )`
|
|
|
+ pars = append(pars, likeKey)
|
|
|
+ pars = append(pars, likeKey)
|
|
|
}
|
|
|
|
|
|
//只看我的
|
|
@@ -1679,7 +1683,10 @@ func (this *MyChartController) MyChartSearch() {
|
|
|
|
|
|
keyWord := this.GetString("KeyWord")
|
|
|
if keyWord != "" {
|
|
|
- condition += ` AND chart_name LIKE '%` + keyWord + `%' `
|
|
|
+ //condition += ` AND chart_name LIKE '%` + keyWord + `%' `
|
|
|
+ condition += ` AND chart_name LIKE ? `
|
|
|
+ likeKey := `%` + keyWord + `%`
|
|
|
+ pars = append(pars, likeKey)
|
|
|
}
|
|
|
|
|
|
//获取图表信息
|