Commit 3bafeed1 authored by zhuwei's avatar zhuwei

1

parent f0abe54d
......@@ -136,7 +136,7 @@ class Amercement extends Basic
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$this->s_amercement->editAmercement($params['id'],$params['edit_type']);//int(1)
$this->s_amercement->editAmercement($params['id'],$params['edit_type'],$this->userId);//int(1)
return $this->response("200", "成功");
}
......
......@@ -277,24 +277,32 @@ class AmercementService
* 更新数据
* @param $id
* @param $edit_type
* @param $operation_id
* @return bool
*/
public function editAmercement($id, $edit_type)
public function editAmercement($id, $edit_type,$operation_id)
{
//0编辑 1取消 2转已支付
switch ($edit_type) {
case 0 :
//0编辑
$this->updateAmercement($id);
break;
case 1 :
//1取消
$this->cancelAmercement($id);
break;
default :
$this->consummationAmercement($id);
//2转已支付
$this->consummationAmercement($id,$operation_id);
}
return true;
}
/**
* 更新数据 编辑
* @param $id
* @return bool
*/
public function updateAmercement($id)
{
......@@ -317,6 +325,11 @@ class AmercementService
return true;
}
/**
* 更新数据 取消
* @param $id
* @return bool
*/
public function cancelAmercement($id)
{
$data = [];
......@@ -327,11 +340,19 @@ class AmercementService
}
public function consummationAmercement($id)
/**
* 更新数据 转已支付
* @param $id
* @param $operation_id
* @return bool
*/
public function consummationAmercement($id,$operation_id)
{
$data = [];
$data['id'] = $id;
$data['status'] = 2;
$data['operation_id'] = $operation_id;
$data['operation_time'] = date("Y-m-d H:i:s", time());
$this->m_amercement->updateAmercementData($data);
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment