|
@@ -1581,14 +1581,17 @@ class OrderController extends BaseController
|
|
|
//余额支付 ssh 20250410
|
|
//余额支付 ssh 20250410
|
|
|
public function actionBalancePay()
|
|
public function actionBalancePay()
|
|
|
{
|
|
{
|
|
|
- $post = Yii::$app->request->post();
|
|
|
|
|
- $orderSn = $post['orderSn'] ?? '';
|
|
|
|
|
|
|
+ $orderSn = Yii::$app->request->post('orderSn');
|
|
|
|
|
+ if (empty($orderSn)) {
|
|
|
|
|
+ util::fail('订单编号缺失');
|
|
|
|
|
+ }
|
|
|
//避免重复提交
|
|
//避免重复提交
|
|
|
util::checkRepeatCommit($orderSn, 5);
|
|
util::checkRepeatCommit($orderSn, 5);
|
|
|
$connection = Yii::$app->db;
|
|
$connection = Yii::$app->db;
|
|
|
$transaction = $connection->beginTransaction();
|
|
$transaction = $connection->beginTransaction();
|
|
|
try {
|
|
try {
|
|
|
- $order = OrderClass::getByCondition(['orderSn' => $orderSn], true);
|
|
|
|
|
|
|
+ $fields = 'id,orderSn,shopId,sjId,mainId,customId,hdId,customName,shopAdminId,shopAdminName,status,payStatus,deadline,actPrice,realPrice,mainPay,cash,remainDebtPrice,onlinePay,fromType,sendType,showAddress,packingFee,groupBuyId,thirdNo,hbId,hbAmount';
|
|
|
|
|
+ $order = OrderClass::getByCondition(['orderSn' => $orderSn], true, null, $fields);
|
|
|
if (empty($order)) {
|
|
if (empty($order)) {
|
|
|
util::fail('没有找到订单');
|
|
util::fail('没有找到订单');
|
|
|
}
|
|
}
|
|
@@ -1609,7 +1612,8 @@ class OrderController extends BaseController
|
|
|
Yii::$app->redis->executeCommand('SETEX', [$cacheKey, 864000, 'has']);
|
|
Yii::$app->redis->executeCommand('SETEX', [$cacheKey, 864000, 'has']);
|
|
|
|
|
|
|
|
//打印小票和语音播报
|
|
//打印小票和语音播报
|
|
|
- $order = \bizHd\order\classes\OrderClass::getByCondition(['orderSn' => $orderSn], true);
|
|
|
|
|
|
|
+ $fields = 'id,orderSn,shopId,mainId,customId,needPrint,payStatus,printNum,fromType,sendType,actPrice,addTime,sendNum,customName,customMobile,shopAdminName,bookName,bookMobile,receiveUserName,receiveMobile,fullAddress,showAddress,reachDate,reachPeriod,anonymity,cardInfo,remark,goodsPrice,sendCost,serviceFee,labourCost,prePrice,orderPrice,discountAmount,realPrice,refundPrice,debt,remainDebtPrice,thirdSn,goodsNum';
|
|
|
|
|
+ $order = \bizHd\order\classes\OrderClass::getByCondition(['orderSn' => $orderSn], true, null, $fields);
|
|
|
if (!empty($order)) {
|
|
if (!empty($order)) {
|
|
|
\bizHd\order\classes\OrderClass::onlinePrint($order);
|
|
\bizHd\order\classes\OrderClass::onlinePrint($order);
|
|
|
|
|
|