Commit a3486877 authored by clone's avatar clone

创建活动

parent 1758a2e9
......@@ -25,7 +25,7 @@ class Activity extends Basic
public function createActivity()
{
$params = $this->params;
$params = array(
/* $params = array(
'title' => '活动1',
'return_type' => '1',
'money' => '1121',
......@@ -36,7 +36,7 @@ class Activity extends Basic
'total' => 100,
'available' => 1,
'activity_rule' => '加拉时间的发送去问问人情味',
);
);*/
$checkResult = $this->validate($params, "ActivityValidate.create");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
......@@ -56,6 +56,11 @@ class Activity extends Basic
}
$is_ok = $this->activityService->createActivity($title, $return_type, $money, $return_action, $activity_start_time,
$activity_end_time, $use_period, $total, $available, $activity_rule);
if($is_ok > 0){
return $this->response("200","add success");
}else{
return $this->response("101","faild");
}
}
}
\ No newline at end of file
......@@ -512,6 +512,8 @@ Route::group('api', [
'addUserCallAgent' => ['api/CallAgent/addUserCallAgent', ['method' => 'POST|GET']],//客户来电记录
'addUserCallAgentV2' => ['api/CallAgent/addUserCallAgentV2', ['method' => 'POST|GET']],//客户来电记录h5
'createActivity' => ['api/Activity/createActivity', ['method' => 'POST|GET']],//新增活动
]);
......
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