dataLists(new StoreProductPriceLists()); } /** * @notes 添加 * @author admin * @date 2025/04/03 15:19 */ public function add() { $params = (new StoreProductPriceValidate())->post()->goCheck('add'); $result = StoreProductPriceLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(StoreProductPriceLogic::getError()); } /** * @notes 编辑 * @author admin * @date 2025/04/03 15:19 */ public function edit() { $params = (new StoreProductPriceValidate())->post()->goCheck('edit'); $result = StoreProductPriceLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(StoreProductPriceLogic::getError()); } /** * @notes 删除 * @author admin * @date 2025/04/03 15:19 */ public function delete() { $params = (new StoreProductPriceValidate())->post()->goCheck('delete'); StoreProductPriceLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取详情 * @author admin * @date 2025/04/03 15:19 */ public function detail() { $params = (new StoreProductPriceValidate())->goCheck('detail'); $result = StoreProductPriceLogic::detail($params); return $this->data($result); } /** * @notes 确认改价 */ public function enterPrice() { $params = $this->request->post(); $result = StoreProductPriceLogic::enterPrice($params); return $this->success('设置成功', [], 1, 1); } public function export() { $params = $this->request->post(); $file_path = StoreProductPriceLogic::export($params); return $this->success('导出成功', ['url' => $file_path]); } public function chart() { $params = $this->request->get(); $data = StoreProductPriceLogic::chart($params); return $this->data($data); } }