dataLists(new MerchantLists()); } /** * @notes 添加商户列表 * @return \think\response\Json * @author likeadmin * @date 2024/04/23 16:35 */ public function add() { $params = (new MerchantValidate())->post()->goCheck('add'); $result = MerchantLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(MerchantLogic::getError()); } /** * @notes 编辑商户列表 * @return \think\response\Json * @author likeadmin * @date 2024/04/23 16:35 */ public function edit() { $params = (new MerchantValidate())->post()->goCheck('edit'); $result = MerchantLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(MerchantLogic::getError()); } /** * @notes 删除商户列表 * @return \think\response\Json * @author likeadmin * @date 2024/04/23 16:35 */ public function delete() { $params = (new MerchantValidate())->post()->goCheck('delete'); MerchantLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取商户列表详情 * @return \think\response\Json * @author likeadmin * @date 2024/04/23 16:35 */ public function detail() { $params = (new MerchantValidate())->goCheck('detail'); $result = MerchantLogic::detail($params); return $this->data($result); } public function bind_goods(){ $params = (new MerchantValidate())->post()->goCheck('detail'); $result = MerchantLogic::bindGoods($params); if (true === $result) { return $this->success('绑定成功', [], 1, 1); } return $this->fail(MerchantLogic::getError()); } }