dlhmaster/app/admin/logic/goods/PriceLogic.php
2024-08-02 14:37:23 +08:00

32 lines
648 B
PHP
Executable File

<?php
namespace app\admin\logic\goods;
use app\common\basics\Logic;
use app\common\model\goods\GoodsPrice;
class PriceLogic extends Logic
{
public static function getAllConfig()
{
return GoodsPrice::select()->toArray();
}
public static function editConfig($form)
{
if (!empty($form)) {
foreach ($form as $key => $v) {
GoodsPrice::where([
'key' => $key
])->update([
'value' => $v,
'update_time' => time()
]);
}
return true;
}
return false;
}
}