作者 lyh

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop

@@ -25,6 +25,11 @@ class ImportLogic extends BaseLogic @@ -25,6 +25,11 @@ class ImportLogic extends BaseLogic
25 */ 25 */
26 public function addImportTask() 26 public function addImportTask()
27 { 27 {
  28 + $ext = explode('.', $this->param['file_url']);
  29 + if (end($ext) != 'csv') {
  30 + $this->fail('导入文件格式必须为csv');
  31 + }
  32 +
28 $this->param['project_id'] = $this->user['project_id']; 33 $this->param['project_id'] = $this->user['project_id'];
29 $this->param['user_id'] = $this->user['id']; 34 $this->param['user_id'] = $this->user['id'];
30 $rs = $this->model->add($this->param); 35 $rs = $this->model->add($this->param);