添加:文创空间明细信息 - 添加新团队业绩明细
This commit is contained in:
parent
8121a08267
commit
4e34142693
|
|
@ -28,6 +28,7 @@ use Yunshop\TeamDividend\models\TeamDividendLevelModel;
|
|||
use Yunshop\TeamDividend\models\TeamDividendModel;
|
||||
use Yunshop\TeamDividend\models\Uplog;
|
||||
use Yunshop\UseStaff\models\UseStaff;
|
||||
use Yunshop\WeightValue\models\WeightValue;
|
||||
|
||||
class IndexController extends ApiController{
|
||||
/**
|
||||
|
|
@ -126,6 +127,10 @@ class IndexController extends ApiController{
|
|||
case 'team_performance':
|
||||
$result = $this->getPerformanceChangeList($uid);
|
||||
break;
|
||||
// 团队业绩(新)
|
||||
case 'new_team_performance':
|
||||
$result = (new WeightValue())->orderDetail($uid, 1);
|
||||
break;
|
||||
// 加权收益明细 合伙人受益
|
||||
case 'weight_income':
|
||||
$result = ShareholderDividendModel::getIncome((int)$uid,(int)1)
|
||||
|
|
|
|||
|
|
@ -784,10 +784,11 @@ class WeightValue extends BaseModel{
|
|||
* Common: 奖励明细 - 团队订单记录
|
||||
* Author: wu-hui
|
||||
* Time: 2023/10/19 17:10
|
||||
* @param $uid
|
||||
* @param $uid
|
||||
* @param int $isOpenCultural
|
||||
* @return array
|
||||
*/
|
||||
public function orderDetail($uid){
|
||||
public function orderDetail($uid,$isOpenCultural = 0){
|
||||
$result = [];
|
||||
$subUserIds = MemberChildren::getTeamModel($uid)->pluck('yz_member_children.child_id')->toArray();
|
||||
if(count($subUserIds) > 0){
|
||||
|
|
@ -804,7 +805,7 @@ class WeightValue extends BaseModel{
|
|||
->leftJoin('yz_goods_cultural_space','yz_goods_cultural_space.goods_id','yz_order_goods.goods_id')
|
||||
->whereIn('yz_order.uid',$subUserIds)
|
||||
->where('yz_order.uid','!=',$uid)
|
||||
->where('yz_goods_cultural_space.is_open',0)
|
||||
->where('yz_goods_cultural_space.is_open',$isOpenCultural)
|
||||
->with([
|
||||
'belongsToMember' => function($query){
|
||||
$query->select(['uid','nickname','realname','avatar']);
|
||||
|
|
|
|||
Loading…
Reference in New Issue