1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
| <?php
|
| namespace app\shop\model\plus\work;
|
| use think\facade\Cache;
| use app\common\model\plus\work\Setting as SettingModel;
|
| class Setting extends SettingModel
| {
| /**
| * 更新系统设置
| */
| public function edit($key, $values, $shop_supplier_id = 0)
| {
| $model = self::detail($key, $shop_supplier_id) ?: $this;
| // 删除系统设置缓存
| Cache::delete('setting_work' . self::$app_id . '_' . $shop_supplier_id);
| return $model->save([
| 'key' => $key,
| 'describe' => '基础设置',
| 'values' => $values,
| 'app_id' => self::$app_id,
| 'shop_supplier_id' => $shop_supplier_id
| ]) !== false;
| }
|
| }
|
|