截流自动化的商城平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Center.php 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace app\shop\controller\distribution;
  3. use app\common\basics\ShopBase;
  4. use app\common\server\JsonServer;
  5. use app\common\model\distribution\DistributionOrderGoods;
  6. use app\shop\logic\distribution\CenterLogic;
  7. class Center extends ShopBase
  8. {
  9. public function data()
  10. {
  11. // 已结算: 已结算
  12. $settled = DistributionOrderGoods::where([
  13. ['status', '=', '2'],
  14. ['shop_id', '=', $this->shop_id]
  15. ])->sum('money');
  16. // 预估: 待返佣 + 已结算
  17. $estimate = DistributionOrderGoods::where([
  18. ['status', 'in', [1, 2]],
  19. ['shop_id', '=', $this->shop_id]
  20. ])->sum('money');
  21. return view('', [
  22. 'settled' => $settled,
  23. 'estimate' => $estimate
  24. ]);
  25. }
  26. /**
  27. * @notes 分销概况
  28. * @author Tab
  29. * @date 2021/9/3 15:53
  30. */
  31. public function center()
  32. {
  33. $data = CenterLogic::center($this->shop_id);
  34. return view('', ['data' => $data]);
  35. }
  36. }