| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace console\controllers;
- use bizGhs\order\classes\OrderItemClass;
- use yii\console\Controller;
- /**
- * 订单相关
- */
- class OrderItemController extends Controller
- {
- public function actionCost()
- {
- ini_set('memory_limit', '2045M');
- set_time_limit(0);
- $list = OrderItemClass::getAllByCondition(['id<' => 333152, 'xhUnitType' => 1], 'id DESC', '*', null, true);
- if (!empty($list)) {
- foreach ($list as $key => $item) {
- $cost = $item->cost ?? 0;
- $ratio = $item->ratio ?? 21;
- $productId = $item->productId ?? 0;
- $name = $item->name ?? '';
- if ($cost < 10) {
- echo $productId . ' ' . $name . ' ' . $cost . ' ' . $ratio . "\n";
- }
- }
- }
- }
- }
|