brook 3 anni fa
parent
commit
d7c39bb937
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      common/helpers/bonus/Calc/PullCalcBonusData.php

+ 3 - 3
common/helpers/bonus/Calc/PullCalcBonusData.php

@@ -80,9 +80,9 @@ class PullCalcBonusData extends BaseBusiness
                     $_offset = 0;
                     sameBonus:
                     $offset = $_offset * $this->_limit;
-                    if (isset($info['condition_type']) && $info['condition_type'] == 'id' && isset($info['param_name '])) {
+                    if (isset($info['condition_type']) && $info['condition_type'] == 'id' && isset($info['param_name'])) {
                         $param = $info['param_name'];
-                        $data  = \Yii::$app->$db->createCommand("SELECT * from $table where " . $info['condition_field'] . " = $this->$param) limit $this->_limit offset $offset;")->queryAll();
+                        $data = \Yii::$app->$db->createCommand("SELECT * from $table  where " . $info['condition_field'] . '=' . $this->$param . " limit $this->_limit offset $offset;")->queryAll();
                     } elseif (isset($info['condition_type']) && $info['condition_type'] == 'custom' && $info['condition'] == 'group') {
                         $data = \Yii::$app->$db->createCommand("SELECT * from $table where CALC_MONTH = $this->_calcMonth and CALC_YEAR=$this->_calcYear limit $this->_limit offset $offset;")->queryAll();
                     } else {
@@ -300,7 +300,7 @@ class PullCalcBonusData extends BaseBusiness
 
         foreach (self::BASE_INFO_METHODS as $info) {
             if ('same' == $info['same'] && isset($info['general_clear']) && $info['general_clear']) {
-                if (isset($info['condition_type']) && $info['condition_type'] == 'id' && isset($info['param_name '])) {
+                if (isset($info['condition_type']) && $info['condition_type'] == 'id' && isset($info['param_name'])) {
                     $param = $info['param_name'];
                     $res   = self::pageDeleteAll($info['table'], $info['condition_field'] . '=' . $this->$param);
                 } else if (isset($info['condition_type']) && $info['condition_type'] == 'custom' && $info['condition'] == 'group') {