浏览代码

Merge branch 'cygx_v2' of hongze/hongze_cygx into master

hongze 3 年之前
父节点
当前提交
5d03a1363c
共有 2 个文件被更改,包括 6 次插入5 次删除
  1. 2 1
      models/company.go
  2. 4 4
      models/tactics.go

+ 2 - 1
models/company.go

@@ -46,7 +46,8 @@ func GetCompanyPermission(companyId int) (permission string, err error) {
 			AND a.product_id=2
 			AND a.product_id=2
 			AND c.is_suspend=0
 			AND c.is_suspend=0
             AND b.is_report=1
             AND b.is_report=1
-			AND c.status IN('正式','试用','永续') `
+			AND c.status IN('正式','试用','永续')
+			AND a.status IN('正式','试用','永续') `
 	o := orm.NewOrm()
 	o := orm.NewOrm()
 	err = o.Raw(sql, companyId).QueryRow(&permission)
 	err = o.Raw(sql, companyId).QueryRow(&permission)
 	return
 	return

+ 4 - 4
models/tactics.go

@@ -33,7 +33,7 @@ func GetTacticsList(endDate string) (list []*Tactics, err error) {
 				INNER JOIN article_content AS b ON a.id=b.article_id
 				INNER JOIN article_content AS b ON a.id=b.article_id
 				INNER JOIN article_category AS c ON a.id=c.article_id
 				INNER JOIN article_category AS c ON a.id=c.article_id
 				INNER JOIN article_categoryinfo AS d ON c.category_id=d.id
 				INNER JOIN article_categoryinfo AS d ON c.category_id=d.id
-				WHERE a.publish_status=1 AND a.publish_date>=? AND d.id IN (28,32,45,50,57,62,72,74,79,84,86,88,90,93,95,96,98)
+				WHERE a.publish_status=1 AND a.publish_date>=? AND d.id IN (28,32,45,57,62,72,74,79,84,86,88,90,93,95,96,98)
                 AND a.id NOT IN (3454,3456,3457,3459,2449,2450,2453,2454,2459,2530,2583,2663,2670,2699,2715,2732,2748,2759,2399,2356,2870,3173,2978,2826,3470) `
                 AND a.id NOT IN (3454,3456,3457,3459,2449,2450,2453,2454,2459,2530,2583,2663,2670,2699,2715,2732,2748,2759,2399,2356,2870,3173,2978,2826,3470) `
 	_, err = o.Raw(sql, endDate).QueryRows(&list)
 	_, err = o.Raw(sql, endDate).QueryRows(&list)
 	return
 	return
@@ -47,7 +47,7 @@ func GetTacticsListAll() (list []*Tactics, err error) {
 			INNER JOIN article_content AS b ON a.id=b.article_id
 			INNER JOIN article_content AS b ON a.id=b.article_id
 			INNER JOIN article_category AS c ON a.id=c.article_id
 			INNER JOIN article_category AS c ON a.id=c.article_id
 			INNER JOIN article_categoryinfo AS d ON c.category_id=d.id
 			INNER JOIN article_categoryinfo AS d ON c.category_id=d.id
-			WHERE a.publish_status=1 AND d.id IN (28,32,45,50,57,62,72,74,79,84,86,88,90,93,95,96,98) 
+			WHERE a.publish_status=1 AND d.id IN (28,32,45,57,62,72,74,79,84,86,88,90,93,95,96,98) 
             AND a.id NOT IN (3454,3456,3457,3459,2449,2450,2453,2454,2459,2530,2583,2663,2670,2699,2715,2732,2748,2759,2399,2356,2870,3173,2978,2826,3470) `
             AND a.id NOT IN (3454,3456,3457,3459,2449,2450,2453,2454,2459,2530,2583,2663,2670,2699,2715,2732,2748,2759,2399,2356,2870,3173,2978,2826,3470) `
 	//IN(85,71)
 	//IN(85,71)
 	_, err = o.Raw(sql).QueryRows(&list)
 	_, err = o.Raw(sql).QueryRows(&list)
@@ -90,7 +90,7 @@ func GetTacticsList2(endDate string) (list []*Tactics2, err error) {
 			INNER JOIN article_content AS b ON a.id=b.article_id
 			INNER JOIN article_content AS b ON a.id=b.article_id
 			INNER JOIN article_category AS c ON a.id=c.article_id
 			INNER JOIN article_category AS c ON a.id=c.article_id
 			INNER JOIN article_categoryinfo AS d ON c.category_id=d.id
 			INNER JOIN article_categoryinfo AS d ON c.category_id=d.id
-			WHERE a.publish_status=1  AND a.publish_date>=? AND d.id IN (7,9,11,28,32,45,50,51,52,57,62,64,65,66,67,69,71,74,79,80,84,85,86,87,88,89,90,93,95,96,98) `
+			WHERE a.publish_status=1  AND a.publish_date>=? AND d.id IN (7,9,11,28,32,45,51,52,57,62,64,65,66,67,69,71,74,79,80,84,85,86,87,88,89,90,93,95,96,98) `
 	//AND a.id NOT IN (3454,3456,3457,3459,2449,2450,2453,2454,2459,2530,2583,2663,2670,2699,2715,2732,2748,2759,2399,2356,2870,3173,2978,2826,3470) `
 	//AND a.id NOT IN (3454,3456,3457,3459,2449,2450,2453,2454,2459,2530,2583,2663,2670,2699,2715,2732,2748,2759,2399,2356,2870,3173,2978,2826,3470) `
 	//IN(85,71)
 	//IN(85,71)
 	_, err = o.Raw(sql, endDate).QueryRows(&list)
 	_, err = o.Raw(sql, endDate).QueryRows(&list)
@@ -105,7 +105,7 @@ func GetTacticsListAll2() (list []*Tactics2, err error) {
 			INNER JOIN article_content AS b ON a.id=b.article_id
 			INNER JOIN article_content AS b ON a.id=b.article_id
 			INNER JOIN article_category AS c ON a.id=c.article_id
 			INNER JOIN article_category AS c ON a.id=c.article_id
 			INNER JOIN article_categoryinfo AS d ON c.category_id=d.id
 			INNER JOIN article_categoryinfo AS d ON c.category_id=d.id
-			WHERE a.publish_status=1  AND d.id IN (7,9,11,28,32,45,50,51,52,57,62,64,65,66,67,69,71,74,79,80,84,85,86,87,88,89,90,93,95,96,98) `
+			WHERE a.publish_status=1  AND d.id IN (7,9,11,28,32,45,51,52,57,62,64,65,66,67,69,71,74,79,80,84,85,86,87,88,89,90,93,95,96,98) `
 	//AND a.id NOT IN (3454,3456,3457,3459,2449,2450,2453,2454,2459,2530,2583,2663,2670,2699,2715,2732,2748,2759,2399,2356,2870,3173,2978,2826,3470) `
 	//AND a.id NOT IN (3454,3456,3457,3459,2449,2450,2453,2454,2459,2530,2583,2663,2670,2699,2715,2732,2748,2759,2399,2356,2870,3173,2978,2826,3470) `
 	//IN(85,71)
 	//IN(85,71)
 	_, err = o.Raw(sql).QueryRows(&list)
 	_, err = o.Raw(sql).QueryRows(&list)