|
|
@@ -27,6 +27,19 @@ use yii\console\Controller;
|
|
|
class TestController extends Controller
|
|
|
{
|
|
|
|
|
|
+ public function actionOrder()
|
|
|
+ {
|
|
|
+ $list = \bizGhs\order\classes\OrderClass::getAllByCondition(['mainId' => 10975, 'customId' => 19746, 'onlinePay' => 1, 'payTime>' => '2024-9-30 23:59:59', 'payTime<' => '2024-11-01 00:00:00', 'payStatus' => 1], null, '*', null, true);
|
|
|
+ if (!empty($list)) {
|
|
|
+ $total = 0;
|
|
|
+ foreach ($list as $order) {
|
|
|
+ $actPrice = $order->actPrice ?? 0;
|
|
|
+ $total = bcadd($actPrice, $total, 2);
|
|
|
+ }
|
|
|
+ echo $total;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//更新核销码 ssh 20240804
|
|
|
public function actionCheckCode()
|
|
|
{
|
|
|
@@ -38,10 +51,10 @@ class TestController extends Controller
|
|
|
|
|
|
foreach ($query->batch() as $batch) {
|
|
|
foreach ($batch as $cg) {
|
|
|
- $orderSn = $cg['orderSn']??'';
|
|
|
- $id = $cg['id']??0;
|
|
|
- $checkCode = substr($orderSn,-4);
|
|
|
- CgOrderClass::updateById($id,['checkCode'=>$checkCode]);
|
|
|
+ $orderSn = $cg['orderSn'] ?? '';
|
|
|
+ $id = $cg['id'] ?? 0;
|
|
|
+ $checkCode = substr($orderSn, -4);
|
|
|
+ CgOrderClass::updateById($id, ['checkCode' => $checkCode]);
|
|
|
}
|
|
|
}
|
|
|
}
|