作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

... ... @@ -41,7 +41,7 @@ class DownloadProject extends Command
public function handle(){
$v6WeekModel = new V6WeeklyReport();
$lists = $v6WeekModel->list([],'id',['*'],'desc',2);
$lists = $v6WeekModel->list([],'id',['*'],'desc',100);
echo date('Y-m-d H:i:s') . 'start' . PHP_EOL;
foreach ($lists as $data){
$this->workChatMessage($data,$data['project_id']);
... ...
... ... @@ -206,7 +206,6 @@ class CopyProject extends Command
}
return true;
}
//复制数据库
public function copyMysql($project_id,$new_project_id){
//切换数据库配置
... ... @@ -267,7 +266,6 @@ class CopyProject extends Command
}
return true;
}
/**
* @param $message
* @return bool
... ...
... ... @@ -136,7 +136,7 @@ class WeekProject extends Command
$data['daily_average_num'] = round($pv_num_count / 7,2);
}
if($value['is_weekly_report'] != 0){
if(isset($value['is_weekly_report']) && $value['is_weekly_report'] != 0){
$this->workChatMessage($data,$value['id']);
}
$v6WeeklyReportModel = new V6WeeklyReport();
... ... @@ -179,7 +179,7 @@ class WeekProject extends Command
};
$country = trim($country,',');
if(!empty($country)){
$content1 .= '询盘主要来源于'.$country.'等国家地区';
$content1 .= '询盘主要来源于'.$country.'等国家地区';
}
}
$content1 .= '如有高质量客户,请您密切关注与跟进;';
... ...
... ... @@ -46,12 +46,18 @@ class UserLoginLogic
$list = $this->model->list(['mobile'=>$this->param['mobile'],
'status'=>$this->model::STATUS_ZERO],'id',['id','project_id']);
}else{
$password = base64_encode(md5($this->param['password']));
$list = $this->model->list(['mobile'=>$this->param['mobile'],
'password'=>$password,'status'=>$this->model::STATUS_ZERO],'id',['id','project_id']);
if(empty($list)){
if($info['is_password'] == $this->model::STATUS_ZERO){//查看是否开启了密码登录:默认未开启
//验证code
$list = $this->verifyCode($this->param['mobile'],$this->param['password']);
}else{
//先验证密码是否正确,在验证验证码
$password = base64_encode(md5($this->param['password']));
$list = $this->model->list(['mobile'=>$this->param['mobile'],
'password'=>$password,'status'=>$this->model::STATUS_ZERO],'id',['id','project_id']);
if(empty($list)){
//默认只能使用验证码登录
$list = $this->verifyCode($this->param['mobile'],$this->param['password']);
}
}
}
//获取所有项目的项目id
... ... @@ -143,10 +149,10 @@ class UserLoginLogic
$smsInfo = $smsModel->formatQuery(['mobile'=>$mobile,'type'=>$smsModel::TYPE_LOGIN])->orderBy('id','desc')->first();
if(!empty($smsInfo)){
if(($password != $smsInfo['code']) || ($smsInfo['created_at'] < date('Y-m-d H:i:s',time() - 300))){
$this->fail('账号密码错误/验证码错误');
$this->fail('验证码错误,如需账号密码登录,请联系管理员开启');
}
}else{
$this->fail('账号密码错误/验证码错误');
$this->fail('验证码错误,如需账号密码登录,请联系管理员开启');
}
$list = $this->model->list(['mobile'=>$this->param['mobile'],'status'=>$this->model::STATUS_ZERO],['id','project_id']);
return $this->success($list);
... ...