更新商机
This commit is contained in:
parent
54bd214e55
commit
772d76477a
@ -23,6 +23,9 @@ class InformationController extends BaseApiController
|
||||
return $this->success('ok', $res->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$param = Request()->param();
|
||||
@ -35,6 +38,9 @@ class InformationController extends BaseApiController
|
||||
return $this->success('成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
public function details(){
|
||||
$param = Request()->param();
|
||||
$res = UserInformationg::details($param['id']);
|
||||
@ -43,4 +49,30 @@ class InformationController extends BaseApiController
|
||||
}
|
||||
return $this->success('成功',$res->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* 商机更新
|
||||
*/
|
||||
public function opportunity_update(){
|
||||
$param = Request()->param();
|
||||
foreach ($param['datas'] as $k => $v) {
|
||||
$res = UserInformationg::informationg_demand($v,$param['id'],$this->userId);
|
||||
}
|
||||
if ($res != true) {
|
||||
return $this->fail( BaseLogic::getError());
|
||||
}
|
||||
return $this->success('成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
public function edit(){
|
||||
$param = Request()->param();
|
||||
$res = UserInformationg::edit($param);
|
||||
if ($res != true) {
|
||||
return $this->fail( BaseLogic::getError());
|
||||
}
|
||||
return $this->success('成功');
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ class UserInformationg extends BaseModel
|
||||
'status' => 1,
|
||||
'information_id' => $id,
|
||||
];
|
||||
UserInformationgDemand::create($data);
|
||||
return UserInformationgDemand::create($data);
|
||||
}
|
||||
|
||||
public static function details($id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user