|
|
@@ -253,7 +253,7 @@ class CalcServePerfCalc {
|
|
|
*/
|
|
|
public function loopGrandPerf($offset = 0) {
|
|
|
$allData = PerfOrder::findUseDbCalc()
|
|
|
- ->select('ORDER_AMOUNT,PERF_TYPE,USER_ID,PV,PERIOD_NUM,DEC_USER_ID,PAY_TYPE')
|
|
|
+ ->select('ORDER_AMOUNT,DEC_TYPE,USER_ID,PV,PERIOD_NUM,DEC_USER_ID,PAY_TYPE')
|
|
|
->where(
|
|
|
"PERIOD_NUM=:PERIOD_NUM",
|
|
|
[':PERIOD_NUM' => $this->_periodNum]
|
|
|
@@ -268,7 +268,7 @@ class CalcServePerfCalc {
|
|
|
// 循环累计报单业绩
|
|
|
try{
|
|
|
echo "开始累计用户业绩,用户ID为:".$data['USER_ID'].PHP_EOL;
|
|
|
- if ($data['PERF_TYPE'] == PerfOrder::ZC_TYPE) {
|
|
|
+ if ($data['DEC_TYPE'] == PerfOrder::ZC_TYPE) {
|
|
|
// 给自己增加PCS(个人消费)
|
|
|
CalcCache::nowPeriodPerf($data['USER_ID'], $this->_periodNum, [
|
|
|
'PV_PCS' => $data['PV'],
|
|
|
@@ -294,7 +294,7 @@ class CalcServePerfCalc {
|
|
|
CalcCache::nowPeriodPerf($parent['PARENT_UID'], $this->_periodNum, [
|
|
|
'PV_' . $parent['LOCATION'] . 'L' => $data['PV'],
|
|
|
'PV_' . $parent['LOCATION'] . 'L_TOUCH' => $data['PV'],
|
|
|
- 'PV_' . $parent['LOCATION'] . 'L_' . $data['PERF_TYPE'] => $data['PV'],
|
|
|
+ 'PV_' . $parent['LOCATION'] . 'L_' . $data['DEC_TYPE'] => $data['PV'],
|
|
|
]);
|
|
|
// 把该会员加入到能拿到业绩的会员缓存中
|
|
|
CalcCache::addHasPerfUsers($parent['PARENT_UID'], $this->_periodNum);
|
|
|
@@ -317,7 +317,7 @@ class CalcServePerfCalc {
|
|
|
|
|
|
// 循环累计复消业绩
|
|
|
try{
|
|
|
- if ($data['PERF_TYPE'] == PerfOrder::FX_TYPE) {
|
|
|
+ if ($data['DEC_TYPE'] == PerfOrder::FX_TYPE) {
|
|
|
if( $data['PAY_TYPE'] === self::ORDER_PAY_TYPE_CASH ) {
|
|
|
$orderCashAmount = $data['ORDER_AMOUNT'];
|
|
|
$payPv = $data['PV'] * $this->_sysConfig['cashReconsumeBonusPercent']['VALUE'] / 100;
|