Commit 3f0a5427 authored by zhuwei's avatar zhuwei

新增客户,需要设置保护期截止日期

parent 7441f585
......@@ -172,9 +172,16 @@ class ImageDepot extends Basic
public function ceshi(){
//查询客户是否在保护期内
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
$user_service = new UserService();
$res = $user_service->isUserProtect(1);
dump($res);
$is_outstrip_twenty_four_hours = $user_service->isUserProtect(1);
dump($is_outstrip_twenty_four_hours);
if($is_outstrip_twenty_four_hours == 0){
dump('保护器内');
}else{
dump('超过保护期');
}
}
......
......@@ -84,6 +84,12 @@ class UserService
$id = $this->user->edit($data, $id, $operation_id); //新增或编辑
//操作完成之后判断下是什么动作
if($type == 'add'){
//$type等于'add'说明是新增客户,需要设置保护期截止日期
$this->setUserProtectTime($id);
}
if ($id <= 0) {
$msg = $this->getCodeMsg($id);
$result['status'] = 'fail';
......
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