dever 4 years ago
parent
commit
7006f47c71
3 changed files with 17 additions and 22 deletions
  1. 2 2
      database/action.php
  2. 7 7
      database/action_log.php
  3. 8 13
      lib/Core.php

+ 2 - 2
database/action.php

@@ -72,8 +72,8 @@ return array
 		# 列表
 		'list_button' => array
 		(
-			'list' => array('普通行为日志', '"action_log&search_option_action_id={id}&oper_parent=action"'),
-			'list1' => array('积分计算日志', '"action_log_finish&search_option_action_id={id}&oper_parent=action"'),
+			'list' => array('未计算日志', '"action_log&search_option_action_id={id}&oper_parent=action"'),
+			'list1' => array('计算日志', '"action_log_finish&search_option_action_id={id}&oper_parent=action"'),
 		),
 	),
 );

+ 7 - 7
database/action_log.php

@@ -94,7 +94,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> '所属数据源',
 			'match' 	=> 'is_string',
-			//'list'		=> true,
+			'list'		=> true,
 		),
 		
 		'type_id' 		=> array
@@ -104,7 +104,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> '数据源id',
 			'match' 	=> 'is_numeric',
-			//'list'		=> true,
+			'list'		=> true,
 		),
 
 		'score_type'		=> array
@@ -116,8 +116,8 @@ return array
 			'match' 	=> 'is_numeric',
 			'update'	=> 'select',
 			'option'	=> $score_type,
-			'search'	=> 'select',
-			'list'		=> true,
+			//'search'	=> 'select',
+			//'list'		=> true,
 		),
 
 		'cron_type'		=> array
@@ -129,8 +129,8 @@ return array
 			'match' 	=> 'is_numeric',
 			'update'	=> 'select',
 			'option'	=> $cron_type,
-			'search'	=> 'select',
-			'list'		=> true,
+			//'search'	=> 'select',
+			//'list'		=> true,
 		),
 
 		'score'		=> array
@@ -140,7 +140,7 @@ return array
 			'default' 	=> '0',
 			'desc' 		=> '积分数',
 			'match' 	=> 'is_string',
-			'list'		=> true,
+			//'list'		=> true,
 		),
 
 		'num'		=> array

+ 8 - 13
lib/Core.php

@@ -55,7 +55,7 @@ class Core
 			$insert['cron_type'] = 1;
 			$log_id = Dever::db('score/action_log')->insert($insert);
 
-			//Dever::load('score/lib/core.oper_commit?log_id='.$log_id);
+			Dever::load('score/lib/core.oper_commit?log_id='.$log_id);
 			return;
 			$sync = Dever::config('base', 'project')->score['sync'];
 			if ($sync) {
@@ -144,14 +144,9 @@ class Core
 		return true;
 	}
 
-	public function oper_api()
+	public function oper_commit_api()
 	{
-
-	}
-
-	public function oper_commit()
-	{
-
+		
 	}
 
 	/**
@@ -159,7 +154,7 @@ class Core
 	 *
 	 * @return mixed
 	 */
-	public function oper()
+	public function oper_commit()
 	{
 		$log_id = Dever::input('log_id');
 
@@ -227,8 +222,8 @@ class Core
 			return;
 		}
 
-		$user_log['type'] = $info['type'];
-		$user_log['type_id'] = $info['type_id'];
+		$user_log['type'] = $log['type'];
+		$user_log['type_id'] = $log['type_id'];
 
 		# 增加返利
 		if ($info['rebate_type'] > 1) {
@@ -291,7 +286,7 @@ class Core
 		$insert['cdate'] = time();
 		$insert['id'] = Dever::db($this->user_log)->insert($insert);
 
-		if ($user_log_id) {
+		if ($insert['id']) {
 			Dever::db($this->user)->update($update);
 
 			# 提升等级
@@ -418,7 +413,7 @@ class Core
 
 	private function operAction($log)
 	{
-		if ($log && $log['cron_type'] == 1) {
+		if ($log && $log['cron_type']) {
 			Dever::db('score/action_log')->update(array('where_id' => $log['id'], 'cron_type' => 2));
 			$where = array();
 			$where['state'] = 1;