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