Эх сурвалжийг харах

Merge branch 'master' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 3 жил өмнө
parent
commit
39f4e3db0e

+ 1 - 1
controllers/activity.go

@@ -3340,7 +3340,7 @@ func (this *ActivityCoAntroller) LabelTypeListV5() {
 		conditionOr += ` OR (1=1 AND art.customer_type_ids LIKE '%5%'	 ` + condition + `) `
 	}
 	if userType == 1 {
-		conditionOr += ` OR (` + condition + permissionSqlStr + `) `
+		conditionOr += ` OR (1=1 ` + condition + permissionSqlStr + `) `
 	}
 
 	if companyProduct != nil {

+ 2 - 2
models/report.go

@@ -57,7 +57,7 @@ WHERE
 	chart_permission_id = any( SELECT chart_permission_id FROM cygx_report_mapping WHERE category_id = ` + strconv.Itoa(categoryId) + ` ) 
 	AND match_type_name = any( SELECT match_type_name FROM cygx_report_mapping WHERE category_id = ` + strconv.Itoa(categoryId) + ` ) )
 	AND a.is_class = 1
-	AND man_g.industrial_management_id = ?`
+	AND man_g.industrial_management_id = ?  `
 	err = o.Raw(sql, industrialManagementId).QueryRow(&count)
 	return
 }
@@ -80,7 +80,7 @@ WHERE
 	AND match_type_name = any( SELECT match_type_name FROM cygx_report_mapping WHERE category_id = ` + strconv.Itoa(categoryId) + ` ) )
     AND a.is_class = 1
 	AND man_g.industrial_management_id = ?`
-	sql += ` ORDER BY publish_date DESC LIMIT ?,? `
+	sql += `   GROUP BY a.article_id ORDER BY publish_date DESC LIMIT ?,? `
 	_, err = o.Raw(sql, pars, industrialManagementId, startSize, pageSize).QueryRows(&items)
 	return
 }