multi-store/app/common/logic/ChangePriceLogLogic.php
mkm dbb7b9e4c8 feat(store): 添加价格变更日志功能
- 新增价格变更日志模型、控制器、列表、逻辑和验证器
- 在商品编辑时记录价格变更日志
- 实现价格变更日志的添加、编辑、删除和详情功能
2025-01-10 17:24:37 +08:00

21 lines
491 B
PHP

<?php
namespace app\common\logic;
use app\common\model\change_price_log\ChangePriceLog;
class ChangePriceLogLogic extends BaseLogic
{
public function insert($product_id=0, $group_id=0, $before_price=0,$after_price=0):void
{
ChangePriceLog::create([
'product_id' => $product_id,
'group_id' => $group_id,
'before_price' => $before_price,
'after_price' => $after_price,
'create_time' => time()
]);
}
}