feature/main20240421
guojia 9 months ago
parent b784f51afb
commit 146692ce4f
  1. 6
      app/common/model/Payment.php

@ -85,11 +85,11 @@ class Payment extends BaseModel
$model = new static;
// 默认的支付方式数据
$defaultData = $model->defaultData();
if (!$data = Cache::get("payment_{$storeId}_{$merchantId}")) {
if (!$data = Cache::get("1payment_{$storeId}_{$merchantId}")) {
// 获取所有支付方式
$data = $model->dataByStorage($storeId, $defaultData, $merchantId);
// 写入缓存中
Cache::tag('cache')->set("payment_{$storeId}_{$merchantId}", $data);
Cache::tag('cache')->set("1payment_{$storeId}_{$merchantId}", $data);
}
// 重组缓存数据 (多维)
return static::reorganize2($defaultData, $data);
@ -138,7 +138,7 @@ class Payment extends BaseModel
// 获取数据库中所有的支付方式
$where = [];
if (isset($merchantId) && $merchantId) {
$where = ['merchant_id', '=', $merchantId];
$where['merchant_id'] = $merchantId;
}
$list = $this->where($where)->where('store_id', '=', $storeId)->select();
if ($list->isEmpty()) {

Loading…
Cancel
Save