get()->goCheck('supplyDemand'); return $this->dataLists(new SupplyDemandLists()); } /** * @notes 删除服务商 * @return \think\response\Json * @author heshihu * @date 2022/2/21 17:52 */ public function delete() { $params = (new SupplyDemandValidate())->post()->goCheck('delete'); SupplyDemandLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 供应详情 * @return \think\response\Json * @author heshihu * @date 2022/2/21 17:54 */ public function detail() { $params = (new SupplyDemandValidate())->goCheck('detail'); $result = SupplyDemandLogic::detail($params); return $this->data($result); } /** * @notes 更改供需状态 * @return \think\response\Json * @author heshihu * @date 2022/2/21 10:15 */ public function updateStatus() { $params = (new SupplyDemandValidate())->post()->goCheck('status'); $result = SupplyDemandLogic::updateStatus($params); if (true === $result) { return $this->success('审核成功', [], 1, 1); } return $this->fail(SupplyDemandLogic::getError()); } /** * @notes 获取会员列表 * @return \think\response\Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author 段誉 * @date 2022/10/13 10:54 */ public function getUserList() { $result = UserServiceLogic::getValidUserData(); return $this->data($result); } /* * 供需分类列表 * */ public function supplyDemandCateLists(){ $params = (new SupplyDemandCateValidate())->get()->goCheck('SupplyDemandCate'); return $this->dataLists(new SupplyDemandCateLists()); } /** * @notes 添加资讯分类 * @return \think\response\Json * @author heshihu * @date 2022/2/21 17:31 */ public function addCate() { $params = (new SupplyDemandCateValidate())->post()->goCheck('add'); SupplyDemandLogic::addCate($params); return $this->success('添加成功', [], 1, 1); } public function cateDetail() { $params = (new SupplyDemandCateValidate())->goCheck('detail'); $result = SupplyDemandLogic::detailCate($params); return $this->data($result); } public function editCate() { $params = (new SupplyDemandCateValidate())->post()->goCheck('edit'); $result = SupplyDemandLogic::editCate($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(SupplyDemandLogic::getError()); } /** * @notes 更改供需状态 * @return \think\response\Json * @author heshihu * @date 2022/2/21 10:15 */ public function updateCateStatus() { $params = (new SupplyDemandCateValidate())->post()->goCheck('status'); $result = SupplyDemandLogic::updateCateStatus($params); if (true === $result) { return $this->success('修改成功', [], 1, 1); } return $this->fail(SupplyDemandLogic::getError()); } public function deleteCate() { $params = (new SupplyDemandCateValidate())->post()->goCheck('delete'); SupplyDemandLogic::deleteCate($params); return $this->success('删除成功', [], 1, 1); } }