mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-11 18:32:50 +00:00
改价后订单号没有更换问题
This commit is contained in:
parent
6c08fee309
commit
1e95864e93
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller\admin;
|
||||
|
||||
use app\models\store\StoreOrder;
|
||||
@ -203,7 +204,8 @@ class StoreOrderController
|
||||
if ($price === '') return app('json')->fail('请填写实际支付金额');
|
||||
if ($price < 0) return app('json')->fail('实际支付金额不能小于0元');
|
||||
if ($order['pay_price'] == $price) return app('json')->successful('修改成功');
|
||||
if(!StoreOrder::edit(['pay_price'=>$price], $order['id'], 'id'))
|
||||
$order['order_id'] = StoreOrder::changeOrderId($order['order_id']);
|
||||
if (!StoreOrder::edit(['pay_price' => $price, 'order_id' => $order['order_id']], $order['id'], 'id'))
|
||||
return app('json')->fail('状态错误');
|
||||
$order['pay_price'] = $price;
|
||||
event('StoreProductOrderEditAfter', [$order, $order['id']]);
|
||||
@ -300,7 +302,8 @@ class StoreOrderController
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
public function offline(Request $request){
|
||||
public function offline(Request $request)
|
||||
{
|
||||
list($orderId) = UtilService::postMore([['order_id', '']], $request, true);
|
||||
$orderInfo = StoreOrder::getAdminOrderDetail($orderId, 'id');
|
||||
if (!$orderInfo) return app('json')->fail('参数错误');
|
||||
|
||||
@ -50,7 +50,7 @@ class SystemStore extends BaseModel
|
||||
if($storeInfo) {
|
||||
$storeInfo['latlng'] = self::getLatlngAttr(null, $storeInfo);
|
||||
$storeInfo['valid_time'] = $storeInfo['valid_time'] ? explode(' - ', $storeInfo['valid_time']) : [];
|
||||
$storeInfo['_valid_time'] = str_replace('-','/',$storeInfo['valid_time'][0].' ~ '.$storeInfo['valid_time'][1]);
|
||||
$storeInfo['_valid_time'] = str_replace('-','/',($storeInfo['valid_time'][0] ?? '').' ~ '.($storeInfo['valid_time'][1]) ?? '');
|
||||
$storeInfo['day_time'] = $storeInfo['day_time'] ? str_replace(' - ',' ~ ',$storeInfo['day_time']) : [];
|
||||
$storeInfo['_detailed_address'] = $storeInfo['address'].' '.$storeInfo['detailed_address'];
|
||||
$storeInfo['address'] = $storeInfo['address'] ? explode(',', $storeInfo['address']) : [];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user