Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop
正在显示
1 个修改的文件
包含
5 行增加
和
0 行删除
| @@ -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); |
-
请 注册 或 登录 后发表评论