Commit 79ff5c94 authored by suntengda's avatar suntengda

update 自提点相关接口

parent 475f8aba
......@@ -12,6 +12,7 @@ class MarketingException extends BaseException
const LIFE_ACCOUNT_NO_EXIST = 16;
const RELATION_ALREADY_EXIST = 17;
const TAKE_PLACE_NOT_EXIST = 20;
protected $cus = [
0 => '活动名称不能为空',
......@@ -34,5 +35,6 @@ class MarketingException extends BaseException
self::RELATION_ALREADY_EXIST => '该关联记录已存在',
18 => '当前填写的拼单活动名称已经存在',
19 => '当前活动不存在',
self::TAKE_PLACE_NOT_EXIST => '自提点不存在',
];
}
\ No newline at end of file
......@@ -75,6 +75,9 @@ class TakePlaceService
*/
public static function delete($takePlaceId)
{
if(empty(self::detail($takePlaceId))) {
throw new MarketingException(['cus' => MarketingException::TAKE_PLACE_NOT_EXIST]);
}
return TakePlace::update(
['is_delete'=>TakePlace::STATUS_DELETE],
['take_place_id'=>$takePlaceId]
......
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