Browse Source

Merge branch 'master' of ssh://git.dever.cc:10022/dever-product/churen

rabin 3 years ago
parent
commit
d09900a335
2 changed files with 15 additions and 1 deletions
  1. 13 0
      tool/work/database/question.php
  2. 2 1
      tool/work/lib/Manage.php

+ 13 - 0
tool/work/database/question.php

@@ -239,5 +239,18 @@ return array
             'order' => array('reorder' => 'desc', 'id' => 'asc'),
             'order' => array('reorder' => 'desc', 'id' => 'asc'),
             'col' => 'id as value, name',
             'col' => 'id as value, name',
         ),
         ),
+        'getTotal' => array
+        (
+            # 匹配的正则或函数 选填项
+            'option' => array
+            (
+                'branch_id'=>'yes',
+                'state' => 1,
+                'type' => 1,
+            ),
+            'type' => 'count',
+            // 'order' => array('reorder' => 'desc', 'id' => 'asc'),
+            'col' => '*',
+        ),
     ),
     ),
 );
 );

+ 2 - 1
tool/work/lib/Manage.php

@@ -168,10 +168,11 @@ Class Manage
 		foreach ($admin as $k => $v) {
 		foreach ($admin as $k => $v) {
 			$res[$k] = $v['username'].'<br/>'.$v['email'];
 			$res[$k] = $v['username'].'<br/>'.$v['email'];
 		}
 		}
-		$total = Dever::db('work/info')->getquestTotal(array('group'=>$data['group'][0]));
+		// $total = Dever::db('work/info')->getquestTotal(array('group'=>$data['group'][0]));
 		$html = array();
 		$html = array();
 		$html['group'] = $group['name'].'<br/>'.$gad['username'];
 		$html['group'] = $group['name'].'<br/>'.$gad['username'];
 		$html['name'] = implode('<br/>',$res);
 		$html['name'] = implode('<br/>',$res);
+		$total = Dever::db('work/question')->getTotal(array('branch_id'=>$data['group_id']));
 		$html['num'] = $total;
 		$html['num'] = $total;
 		return $html;
 		return $html;
 	}
 	}