getShopInfo($this->shop_id); return JsonServer::success('', $shop); } /** * @notes 获取提现信息 * @return \think\response\Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author cjhao * @date 2021/11/10 16:30 */ public function getWithdrawInfo(){ $result = (new ShopLogic)->getWithdrawInfo($this->shop_id); return JsonServer::success('', $result); } /** * @notes 提现操作 * @return \think\response\Json * @author cjhao * @date 2021/11/10 17:03 */ public function withdraw(){ $post = $this->request->post(); $post['shop_id'] = $this->shop_id; (new ShopWithdrawValidate())->goCheck('',$post); $result = (new ShopLogic)->withdraw($post); if(true === $result){ return JsonServer::success('提现成功'); } return JsonServer::error($result ); } /** * @notes 提现记录 * @return \think\response\Json * @throws \think\db\exception\DbException * @author cjhao * @date 2021/11/10 17:11 */ public function withdrawLog(){ $list = (new ShopLogic)->withdrawLog($this->shop_id,$this->page_no,$this->page_size); return JsonServer::success('', $list); } /** * @notes 添加账户 * @return \think\response\Json * @throws \think\db\exception\DbException * @author cjhao * @date 2021/11/10 18:26 */ public function addBank(){ (new BankValidate())->goCheck('add'); $post = $this->request->post(); $post['shop_id'] = $this->shop_id; (new ShopLogic)->addBank($post); return JsonServer::success('添加成功'); } /** * @notes 获取银行卡 * @return \think\response\Json * @author cjhao * @date 2021/11/11 15:47 */ public function getBank(){ (new BankValidate())->goCheck('id'); $id= $this->request->get('id'); $data= (new ShopLogic)->getBank($id,$this->shop_id); return JsonServer::success('',$data); } /** * @notes 编辑银行卡 * @return \think\response\Json * @author cjhao * @date 2021/11/10 18:40 */ public function editBank(){ (new BankValidate())->goCheck('edit'); $post = $this->request->post(); $post['shop_id'] = $this->shop_id; (new ShopLogic)->editBank($post); return JsonServer::success('编辑成功'); } /** * @notes 删除银行卡 * @return \think\response\Json * @author cjhao * @date 2021/11/10 18:42 */ public function delBank(){ (new BankValidate())->goCheck('id'); $id = $this->request->post('id'); (new ShopLogic)->delBank($id,$this->shop_id); return JsonServer::success('删除成功'); } /** * @notes 设置商家信息 * @return \think\response\Json * @author cjhao * @date 2021/11/11 10:40 */ public function shopSet(){ $post = $this->request->post(); (new ShopDataSetValidate())->goCheck('',['dataset'=>$post]); (new ShopLogic)->shopSet($post,$this->shop_id); return JsonServer::success('设置成功'); } /** * @notes 修改密码接口 * @return \think\response\Json * @author cjhao * @date 2021/11/11 16:11 */ public function changePwd(){ $post = $this->request->post(); $post['admin_id'] = $this->admin_id; (new AdminPasswordValidate())->goCheck('', $post); $res = (new ShopLogic)->updatePassword($post, $this->shop_id); if(true === $res){ return JsonServer::success('密码修改成功'); } return JsonServer::error($res); } }