Your Name 8 months ago
commit dd5732be04
  1. 1
      addons/shopro/controller/user/WalletLog.php
  2. 34
      addons/shopro/service/CommissionScoreLog.php
  3. 9
      addons/shopro/service/commission/Agent.php
  4. 2
      addons/shopro/service/order/OrderCreate.php

@ -71,6 +71,7 @@ class WalletLog extends Common
$user = auth_user(); $user = auth_user();
$user_id = $user->id; $user_id = $user->id;
if (!Sms::check($params['exchange_phone'], $params['code'], 'score')) { if (!Sms::check($params['exchange_phone'], $params['code'], 'score')) {
$this->error('验证码不正确'); $this->error('验证码不正确');
} }

@ -0,0 +1,34 @@
<?php
namespace addons\shopro\service;
use app\admin\model\User;
use app\admin\model\shopro\commission\Level as LevelModel;
use app\admin\model\shopro\user\WalletLog as WalletLogModel;
class CommissionScoreLog
{
public $user = null;
public function __construct($user = null)
{
$this->user = is_numeric($user) ? User::get($user) : $user;
$this->user = $this->user ?: auth_user();
}
/**
* 计算用户积分
* @return
*/
public function addLog() {
}
/**
* 获取用户等级
*/
public function getUserLevel() {
}
}

@ -538,4 +538,13 @@ class Agent
// 循环完所有的 如果是①的情况则代表都不符合条件,如果是②则代表都符合条件 返回对应状态即可 // 循环完所有的 如果是①的情况则代表都不符合条件,如果是②则代表都符合条件 返回对应状态即可
return boolval($level->upgrade_type); return boolval($level->upgrade_type);
} }
/**
* 计算分销用户用户积分
* @return
*/
public function calcScore() {
$comission_score = 0;
}
} }

@ -614,7 +614,7 @@ class OrderCreate
* *
* @return array * @return array
*/ */
public function getCoupons($calc_type = 'coupons') public function xgetCoupons($calc_type = 'coupons')
{ {
$this->calc_type = $calc_type; $this->calc_type = $calc_type;
// 检查是否可下单 // 检查是否可下单

Loading…
Cancel
Save