ErrorListController.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: shenyang
  5. * Date: 2018/11/16
  6. * Time: 3:39 PM
  7. */
  8. namespace app\backend\modules\order\controllers;
  9. use app\common\models\Order;
  10. use Illuminate\Support\Facades\DB;
  11. class ErrorListController extends ListController
  12. {
  13. /**
  14. * @return string
  15. * @throws \Throwable
  16. */
  17. public function pointFix()
  18. {
  19. $this->orderModel->select($this->orderModel->getModel()->getTable() . '.*')->
  20. where('create_time', '>', strtotime("2018-10-25"))->join('yz_order_deduction', function ($query) {
  21. $query->on('yz_order_deduction.order_id', 'yz_order.id')
  22. ->on('yz_order_deduction.amount', '>', 'yz_order.deduction_price')
  23. ->where('yz_order_deduction.amount', '>', 0)->where('code', 'point');
  24. })->where('status', -1);
  25. return view('order.index', $this->getData())->render();
  26. }
  27. /**
  28. * @return string
  29. * @throws \Throwable
  30. */
  31. public function errorPoint()
  32. {
  33. $this->orderModel->whereIn('order_sn', explode(',','SN20181026141637GP,SN20181026141840Rz,SN20181026142743XX,SN20181026143007AT,SN20181026154345AT,SN20181026203108FQ,SN20181026203129KM,SN20181027135712Vj'));
  34. return view('order.index', $this->getData())->render();
  35. }
  36. }