dataLists(new UserLists()); } /** * @notes 获取用户详情 * @return \think\response\Json * @author 段誉 * @date 2022/9/22 16:34 */ public function detail() { $params = (new UserValidate())->goCheck('detail'); $detail = UserLogic::detail($params['id']); return $this->success('', $detail); } public function add() { $params = $this->request->param(); $re = UserLogic::addUser($params); if ($re) { return $this->success('添加成功'); } return $this->fail(UserLogic::getError()); } /** * @notes 编辑用户信息 * @return \think\response\Json * @author 段誉 * @date 2022/9/22 16:34 */ public function edit() { $params = $this->request->param(); UserLogic::editUser($params); return $this->success('操作成功', [], 1, 1); } /** * @notes 调整用户余额 * @return \think\response\Json * @author 段誉 * @date 2023/2/23 14:33 */ public function adjustMoney() { $params = (new AdjustUserMoney())->post()->goCheck(); $res = UserLogic::adjustUserMoney($params); if (true === $res) { return $this->success('操作成功', [], 1, 1); } return $this->fail($res); } //**发起合同 */ public function initiate_contract(){ $params = Request::param(); $find=Db::name('company')->where('admin_id',$this->adminId)->field('id,area_manager')->find(); if(!$find||$find['party_a']<=0){ return $this->fail('甲方不存在,请联系平台绑定公司'); } $params['check_status']=1; $params['area_manager'] = $find['area_manager']; $res=ContractLogic::Initiate_contract($params); if (true === $res) { return $this->success('发起成功,等待平台风控部上传合同', [], 1, 1); } return $this->fail('发起失败'); } // /**发送合同 */ public function Draftingcontracts() { $params = Request::param(); $result = ContractLogic::Draftingcontracts($params, 2); if ($result === true) { return $this->success('发送合同成功', [], 1, 1); } else { return $this->fail(ContractLogic::getError()); } } public function getCompanyList() { return $this->data(CompanyLogic::getList()); } }