|
|
@@ -130,6 +130,8 @@ class BonusSend extends BaseObject {
|
|
|
*/
|
|
|
public function putFakeOrder() {
|
|
|
echo('开始处理-假订单' . PHP_EOL);
|
|
|
+ $sysConfig = Cache::getSystemConfig();
|
|
|
+ $mesureUpCondition = $sysConfig['monthPcsPvFxCondition']['VALUE']; // 月达标条件 NC默认300
|
|
|
$fakeOrder= Order::find()->where(['PERIOD_NUM'=>$this->_periodNum, 'IS_AUTO'=>'1'])->asArray()->all();
|
|
|
// print_r($fakeOrder);exit;
|
|
|
foreach($fakeOrder as $fOrder){
|
|
|
@@ -139,8 +141,8 @@ class BonusSend extends BaseObject {
|
|
|
$flowRemainPvModel = new FlowRemainPv();
|
|
|
$flowRemainPvModel->ID = $this->_generateSn();
|
|
|
$flowRemainPvModel->USER_ID = $fOrder['USER_ID'];
|
|
|
- $flowRemainPvModel->REMAIN_PV_FLOW = -30;
|
|
|
- $flowRemainPvModel->REMAIN_PV_TOTAL = $oRemainPv->REMAIN_PV - 30;
|
|
|
+ $flowRemainPvModel->REMAIN_PV_FLOW = 0 - $mesureUpCondition;
|
|
|
+ $flowRemainPvModel->REMAIN_PV_TOTAL = $oRemainPv->REMAIN_PV - $mesureUpCondition;
|
|
|
$flowRemainPvModel->PERIOD_NUM = $this->_periodNum;
|
|
|
$flowRemainPvModel->UPDATED_AT = Date::nowTime();
|
|
|
$flowRemainPvModel->ORDER_SN = $fOrder['SN'];
|
|
|
@@ -148,7 +150,7 @@ class BonusSend extends BaseObject {
|
|
|
$this->addErrors($flowRemainPvModel->getErrors());
|
|
|
return false;
|
|
|
}
|
|
|
- $oRemainPv->updateCounters(['REMAIN_PV'=>-30]);
|
|
|
+ $oRemainPv->updateCounters(['REMAIN_PV'=> 0 - $mesureUpCondition]);
|
|
|
$transactionRemain->commit();
|
|
|
} catch (Exception $e) {
|
|
|
$transactionRemain->rollBack();
|