dataLists(); } /** * @notes 添加分销会员等级 * @return \think\response\Json * @author Tab * @date 2021/7/22 11:19 */ public function add() { $params = (new DistributionLevelValidate())->post()->goCheck('add'); $result = DistributionLevelLogic::add($params); if($result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(DistributionLevelLogic::getError()); } /** * @notes 查看分销会员等级详情 * @return \think\response\Json * @author Tab * @date 2021/7/22 14:51 */ public function detail() { $params = (new DistributionLevelValidate())->goCheck('detail'); $result = DistributionLevelLogic::detail($params); return $this->data($result); } /** * @notes 编辑分销会员等级 * @return \think\response\Json * @author Tab * @date 2021/7/22 16:22 */ public function edit() { $params = (new DistributionLevelValidate())->post()->goCheck('edit'); $result = DistributionLevelLogic::edit($params); if($result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(DistributionLevelLogic::getError()); } /** * @notes 删除分销会员等级 * @return \think\response\Json * @author Tab * @date 2021/7/22 16:29 */ public function delete() { $params = (new DistributionLevelValidate())->post()->goCheck('delete'); $result = DistributionLevelLogic::delete($params); if($result) { return $this->success('删除成功', [], 1, 1); } return $this->fail(DistributionLevelLogic::getError()); } /** * @notes 更新分销会员等级 * @param $userId * @author Tab * @date 2021/7/27 14:02 */ public function updateDistributionLevel($userId) { DistributionLevelLogic::updateDistributionLevel($userId); } }