Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to fix the error of self-purchase commission display of crmeb multi-merchants

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

如何修复crmeb多商户1.4自购佣金显示错误问题,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。

找到 \app\common\repositories\user\UserRepository.php 文件,复制下面的内容替换原来的 subOrder 方法(832-869行)

public function subOrder($uid, $page, $limit, array $where = []){if (isset($where['level'])) {if (!$where['level']) {$ids = $this->dao->getSubIds($uid);$subIds = $ids ? $this->dao->getSubAllIds($ids) : [];$ids[] = $uid; } else if ($where['level'] == 2) {$ids = $this->dao->getSubIds($uid);$subIds = $ids ? $this->dao->getSubAllIds($ids) : [];$ids = []; } else {$ids = $this->dao->getSubIds($uid);$subIds = [];$ids[] = $uid; } } else {$ids = $this->dao->getSubIds($uid);$subIds = $ids ? $this->dao->getSubAllIds($ids) : [];$ids[] = $uid; }$all = array_unique(array_merge($ids, $subIds));if (!count($all)) return ['count' => 0, 'list' => []];$query = app()->make(StoreOrderRepository::class)->usersOrderQuery($where, $all);$count = $query->count();$list = $query->page($page, $limit)->field('uid,order_sn,pay_time,extension_one,extension_two,is_selfbuy')->with(['user' => function ($query) {$query->field('avatar,nickname,uid'); }])->select()->toArray();foreach ($list as $k => $item) {if ($item['is_selfbuy']) {$list[$k]['brokerage'] = $item['uid'] == $uid ? $item['extension_one'] : $item['extension_two']; } else {$list[$k]['brokerage'] = in_array($item['uid'], $ids) ? $item['extension_one'] : $item['extension_two']; }unset($list[$k]['extension_one'], $list[$k]['extension_two']); }return compact('count', 'list'); }

修改完毕后重启 swoole 即可

看完上述内容,你们掌握如何修复crmeb多商户1.4自购佣金显示错误问题的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢迎关注行业资讯频道,感谢各位的阅读!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report