feature/main20240421
郭嘉 6 months ago
parent 5390622114
commit 89d17018dc
  1. 7
      app/common/model/Payment.php

@ -88,11 +88,12 @@ class Payment extends BaseModel
if (empty($merchantId)) {
$merchantId = 0;
}
if (!$data = Cache::get("payment_{$storeId}_{$merchantId}")) {
//if (!$data = Cache::get("payment_{$storeId}_{$merchantId}")) {
if (true) {
// 获取所有支付方式
$data = $model->dataByStorage($storeId, $defaultData, $merchantId);
// 写入缓存中
Cache::tag('cache')->set("payment_{$storeId}_{$merchantId}", $data);
//Cache::tag('cache')->set("payment_{$storeId}_{$merchantId}", $data);
}
// 重组缓存数据 (多维)
return static::reorganize2($defaultData, $data);
@ -124,7 +125,7 @@ class Payment extends BaseModel
foreach ($data as &$item) {
$item['methods'] = array_values($item['methods']);
}
unset($item);
//unset($item);
return $data;
}

Loading…
Cancel
Save