更新价格

feature/main20240421
lqmac 6 months ago
parent b8c356c089
commit b1fa8391b2
  1. 2
      app/api/model/Order.php
  2. 4
      app/api/service/cashier/Payment.php
  3. 4
      app/common/model/Payment.php
  4. 7
      app/common/model/PaymentTemplate.php
  5. 2
      app/store/model/Payment.php
  6. 8
      app/store/model/PaymentTemplate.php

@ -469,6 +469,8 @@ class Order extends OrderModel
'pay_status' => $orderInfo['pay_status'], 'pay_status' => $orderInfo['pay_status'],
'order_status' => $orderInfo['order_status'], 'order_status' => $orderInfo['order_status'],
'create_time' => $orderInfo['create_time'], 'create_time' => $orderInfo['create_time'],
'store_id' => $orderInfo['store_id'],
'merchant_id' => $orderInfo['merchant_id'],
'showExpiration' => $orderCloseTime > 0, 'showExpiration' => $orderCloseTime > 0,
'expirationTime' => format_time($expirationTime), 'expirationTime' => format_time($expirationTime),
]; ];

@ -95,10 +95,12 @@ class Payment extends BaseService
$userInfo = UserService::getCurrentLoginUser(true); $userInfo = UserService::getCurrentLoginUser(true);
// 根据指定客户端获取可用的支付方式 // 根据指定客户端获取可用的支付方式
$PaymentModel = new PaymentModel; $PaymentModel = new PaymentModel;
$methods = $PaymentModel->getMethodsByClient($this->client);
// 获取结算订单信息 // 获取结算订单信息
$OrderModel = new OrderModel; $OrderModel = new OrderModel;
$orderInfo = $OrderModel->getUnpaidOrderDetail($this->orderId); $orderInfo = $OrderModel->getUnpaidOrderDetail($this->orderId);
$methods = $PaymentModel->getMethodsByClient($this->client, true, $orderInfo['store_id'], $orderInfo['merchant_id']);
return [ return [
'order' => $orderInfo, 'order' => $orderInfo,
'personal' => $userInfo, 'personal' => $userInfo,

@ -142,9 +142,9 @@ class Payment extends BaseModel
{ {
// 获取数据库中所有的支付方式 // 获取数据库中所有的支付方式
$where = []; $where = [];
if (isset($merchantId) && $merchantId) { //if (isset($merchantId) && $merchantId) {
$where['merchant_id'] = $merchantId; $where['merchant_id'] = $merchantId;
} //}
$list = $this->where($where)->where('store_id', '=', $storeId)->select(); $list = $this->where($where)->where('store_id', '=', $storeId)->select();
if ($list->isEmpty()) { if ($list->isEmpty()) {
return []; return [];

@ -115,9 +115,10 @@ class PaymentTemplate extends BaseModel
$where = [ $where = [
['is_delete', '=', 0], ['is_delete', '=', 0],
]; ];
if (isset($merchantId) && $merchantId) { // if (isset($merchantId) && $merchantId) {
$where[] = ['merchant_id', '=', $merchantId]; // $where[] = ['merchant_id', '=', $merchantId];
} // }
$where[] = ['merchant_id', '=', $merchantId];
return $this->where($where) return $this->where($where)
->order(['sort' => 'asc', $this->getPk()]) ->order(['sort' => 'asc', $this->getPk()])
->select(); ->select();

@ -32,7 +32,7 @@ class Payment extends PaymentModel
// 生成写入的数据 // 生成写入的数据
$dataList = $this->buildData($form, $merchantId); $dataList = $this->buildData($form, $merchantId);
// 删除所有的支付方式记录 // 删除所有的支付方式记录
static::deleteAll([]); static::deleteAll(['merchant_id' => $merchantId]);
// 批量写入商品图片记录 // 批量写入商品图片记录
$res = static::increased($dataList); $res = static::increased($dataList);
// 删除系统设置缓存 // 删除系统设置缓存

@ -37,10 +37,10 @@ class PaymentTemplate extends PaymentTemplateModel
$where = [ $where = [
['is_delete', '=', 0], ['is_delete', '=', 0],
]; ];
if (isset($merchantId) && $merchantId) { // if (isset($merchantId) && $merchantId) {
$where[] = ['merchant_id', '=', $merchantId]; // $where[] = ['merchant_id', '=', $merchantId];
} // }
$where[] = ['merchant_id', '=', $merchantId];
return $this->where($where)->where('is_delete', '=', 0) return $this->where($where)->where('is_delete', '=', 0)
->order(['sort' => 'asc', $this->getPk()]) ->order(['sort' => 'asc', $this->getPk()])
->paginate(15); ->paginate(15);

Loading…
Cancel
Save