作者 Your Name
@@ -31,7 +31,7 @@ class countProject extends Command @@ -31,7 +31,7 @@ class countProject extends Command
31 protected $description = '项目数据统计生成文件'; 31 protected $description = '项目数据统计生成文件';
32 32
33 public function handle(){ 33 public function handle(){
34 - $start = '2024-01'; 34 + $start = '2023-10';
35 $end = '2024-09'; 35 $end = '2024-09';
36 $data = $this->exportDataProject($start,$end); 36 $data = $this->exportDataProject($start,$end);
37 $result = $this->exportData($data); 37 $result = $this->exportData($data);
@@ -185,7 +185,7 @@ class countProject extends Command @@ -185,7 +185,7 @@ class countProject extends Command
185 */ 185 */
186 public function countAll(){ 186 public function countAll(){
187 $projectModel = new Project(); 187 $projectModel = new Project();
188 - $data['count'] = $projectModel->count(['deleted_at'=>0]);//所有项目总数 188 + $data['count'] = $projectModel->counts(['deleted_at'=>0]);//所有项目总数
189 $data['go_online_count'] = $projectModel->counts(['uptime'=>['!=',null],'deleted_at'=>0]);//上线项目总数 189 $data['go_online_count'] = $projectModel->counts(['uptime'=>['!=',null],'deleted_at'=>0]);//上线项目总数
190 $data['promotion_web_count'] = $projectModel->counts(['type'=>3,'deleted_at'=>0]);//推广项目总数 190 $data['promotion_web_count'] = $projectModel->counts(['type'=>3,'deleted_at'=>0]);//推广项目总数
191 $data['create_web_count'] = $projectModel->counts(['type'=>2,'deleted_at'=>0]);//建站项目总数 191 $data['create_web_count'] = $projectModel->counts(['type'=>2,'deleted_at'=>0]);//建站项目总数
@@ -608,9 +608,6 @@ class ProjectController extends BaseController @@ -608,9 +608,6 @@ class ProjectController extends BaseController
608 */ 608 */
609 public function getManagerList(){ 609 public function getManagerList(){
610 $hrManagerModel = new ManageHr(); 610 $hrManagerModel = new ManageHr();
611 - if(!isset($this->param['name']) || empty($this->param['name'])){  
612 - $this->map['status'] = $hrManagerModel::STATUS_ONE;  
613 - }  
614 if(isset($this->map['entry_position']) && !empty($this->map['entry_position'])){ 611 if(isset($this->map['entry_position']) && !empty($this->map['entry_position'])){
615 $this->map['entry_position'] = ['in',$this->map['entry_position']]; 612 $this->map['entry_position'] = ['in',$this->map['entry_position']];
616 } 613 }
@@ -173,16 +173,15 @@ class FileManageController extends BaseController @@ -173,16 +173,15 @@ class FileManageController extends BaseController
173 173
174 public function delete(Request $request){ 174 public function delete(Request $request){
175 $request->validate([ 175 $request->validate([
176 - 'id'=>'required', 176 + 'id'=>'required | array',
177 ],[ 177 ],[
178 'id.required' => 'ID不能为空', 178 'id.required' => 'ID不能为空',
179 ]); 179 ]);
180 - $fileManage = FileManage::find($this->param['id']);  
181 - if(!$fileManage){  
182 - $this->response('数据不存在或者已经删除'); 180 + if(!is_array($this->param['id'])){
  181 + $this->param['id'] = [$this->param['id']];
183 } 182 }
184 - $fileManage->delete();  
185 - 183 + $fileManage = new FileManage();
  184 + $fileManage->del(['id'=>['in',$this->param['id']]]);
186 $this->response('success'); 185 $this->response('success');
187 } 186 }
188 } 187 }