更新
This commit is contained in:
parent
0e0a80fc7c
commit
10ddd7869a
@ -566,10 +566,14 @@ class Project extends BasicApi
|
|||||||
public function positioning(){
|
public function positioning(){
|
||||||
$member_code=Request::post('member_code');
|
$member_code=Request::post('member_code');
|
||||||
$positioning=Request::post('positioning');
|
$positioning=Request::post('positioning');
|
||||||
// $find=Db::name('positioning')->where(['member_code'=>$member_code,'positioning'=>$positioning])->find();
|
$find=Db::name('positioning')->where(['member_code'=>$member_code,'positioning'=>$positioning])->find();
|
||||||
|
if($find){
|
||||||
|
Db::name('positioning')->where(['member_code'=>$member_code,'positioning'=>$positioning])->update(['end_date'=>date('Y-m-d H:i:s')]);
|
||||||
|
}else{
|
||||||
if($member_code && $positioning){
|
if($member_code && $positioning){
|
||||||
Db::name('positioning')->insert(['member_code'=>$member_code,'positioning'=>$positioning,'date'=>date('Y-m-d H:i:s')]);
|
Db::name('positioning')->insert(['member_code'=>$member_code,'positioning'=>$positioning,'date'=>date('Y-m-d H:i:s')]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$this->success('');
|
$this->success('');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user