更新价格

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'],
'order_status' => $orderInfo['order_status'],
'create_time' => $orderInfo['create_time'],
'store_id' => $orderInfo['store_id'],
'merchant_id' => $orderInfo['merchant_id'],
'showExpiration' => $orderCloseTime > 0,
'expirationTime' => format_time($expirationTime),
];

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

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

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

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

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

Loading…
Cancel
Save