|
|
@@ -470,12 +470,11 @@ class User extends \common\components\ActiveRecord
|
|
|
// return $pv >= $sysConfig['monthPcsPvFxCondition']['VALUE'] ? 1 : 0;
|
|
|
// }
|
|
|
|
|
|
- // 判断会员是否活跃:1. 当月消费30BV. 2.任意水机+150粒的EKSP. (满足任意条件即可)
|
|
|
-
|
|
|
/**
|
|
|
+ * 判断会员是否活跃:1. 当月消费30BV. 2.任意水机+150粒的EKSP. (满足任意条件即可)
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- public static function isPerfActive($userId, $periodNum, $calcYearMonth): bool
|
|
|
+ public static function isPerfActive($userId, $periodNum, $calcYearMonth): int
|
|
|
{
|
|
|
$sysConfig = Cache::getSystemConfig();
|
|
|
|
|
|
@@ -485,7 +484,7 @@ class User extends \common\components\ActiveRecord
|
|
|
->SUM('PV_PCS');
|
|
|
|
|
|
if ($pv >= $sysConfig['monthPcsPvFxCondition']['VALUE']) {
|
|
|
- return true;
|
|
|
+ return 1;
|
|
|
}
|
|
|
|
|
|
$periodObj = Period::instance();
|
|
|
@@ -502,7 +501,7 @@ class User extends \common\components\ActiveRecord
|
|
|
['USER_ID' => $userId, 'P_CALC_MONTH' => $calcMonth, 'PERIOD_NUM' => $periodNum, ':SKU_CODE' => 'HES150N'])
|
|
|
->count();
|
|
|
if (!$orderEKSP) {
|
|
|
- return false;
|
|
|
+ return 0;
|
|
|
}
|
|
|
|
|
|
// 所有分期商品
|
|
|
@@ -515,9 +514,9 @@ class User extends \common\components\ActiveRecord
|
|
|
['USER_ID' => $userId, 'P_CALC_MONTH' => $calcMonth, 'PERIOD_NUM' => $periodNum])
|
|
|
->count();
|
|
|
if (!$orderInstalment) {
|
|
|
- return false;
|
|
|
+ return 0;
|
|
|
}
|
|
|
|
|
|
- return true;
|
|
|
+ return 1;
|
|
|
}
|
|
|
}
|