diff --git a/webapp/models/Contribution.php b/webapp/models/Contribution.php index 7094d053..964d2d13 100644 --- a/webapp/models/Contribution.php +++ b/webapp/models/Contribution.php @@ -47,7 +47,7 @@ class Contribution extends BaseModel ); } - public static function addHistory($gold,$point){ + public static function addHistory($gold,$point,$controller,$action){ SqlHelper::insert( myself()->_getSelfMysql(), 't_contribution_history', @@ -55,6 +55,8 @@ class Contribution extends BaseModel 'account_id' => myself()->_getAccountId(), 'consume_gold' => $gold, 'contribution' => $point, + 'controller' => $controller, + 'action' => $action, 'createtime' => myself()->_getNowTime(), 'modifytime' => myself()->_getNowTime(), ) diff --git a/webapp/services/ContributionService.php b/webapp/services/ContributionService.php index b722be03..27ab0262 100644 --- a/webapp/services/ContributionService.php +++ b/webapp/services/ContributionService.php @@ -17,7 +17,7 @@ class ContributionService extends BaseService { } myself()->_giveContributionPoint(round($params/10,2)); myself()->_callModelStatic('Contribution', 'add', round($params/10,2)); - myself()->_callModelStatic('Contribution', 'addHistory', $params, round($params/10,2)); + myself()->_callModelStatic('Contribution', 'addHistory', $params, round($params/10,2),getReqVal('c', ''),getReqVal('a','')); } }