|
@@ -365,6 +365,12 @@ class Home extends Base { |
|
@@ -365,6 +365,12 @@ class Home extends Base { |
365
|
if(empty($to_folder)){
|
365
|
if(empty($to_folder)){
|
366
|
app()->e('folder_move_error');
|
366
|
app()->e('folder_move_error');
|
367
|
}
|
367
|
}
|
|
|
368
|
+ if($to_folder == '草稿箱'){
|
|
|
369
|
+ app()->e('folder_move_to_draft_error');
|
|
|
370
|
+ }
|
|
|
371
|
+ if($to_folder == '发件箱'){
|
|
|
372
|
+ app()->e('folder_move_to_send_error');
|
|
|
373
|
+ }
|
368
|
|
374
|
|
369
|
$data = db()->all(listsSql::first(dbWhere(['id'=>$mail_ids,'email_id'=>array_column($emails,'id')]),'`id`,`uid`,`email_id`,`folder_id`'));
|
375
|
$data = db()->all(listsSql::first(dbWhere(['id'=>$mail_ids,'email_id'=>array_column($emails,'id')]),'`id`,`uid`,`email_id`,`folder_id`'));
|
370
|
if($data){
|
376
|
if($data){
|
|
@@ -372,6 +378,18 @@ class Home extends Base { |
|
@@ -372,6 +378,18 @@ class Home extends Base { |
372
|
$emails = array_column($emails,null,'id');
|
378
|
$emails = array_column($emails,null,'id');
|
373
|
$uids = [];
|
379
|
$uids = [];
|
374
|
foreach ($data as $datum){
|
380
|
foreach ($data as $datum){
|
|
|
381
|
+ // 只有草稿箱才没有uid
|
|
|
382
|
+ if(!$datum['uid']){
|
|
|
383
|
+ // 删除
|
|
|
384
|
+ if ($to_folder == '回收站'){
|
|
|
385
|
+ // 删除数据,真实删除
|
|
|
386
|
+ db()->delete(listsSql::$table,[
|
|
|
387
|
+ 'id' => $datum['id']
|
|
|
388
|
+ ]);
|
|
|
389
|
+ continue;
|
|
|
390
|
+ }
|
|
|
391
|
+ }
|
|
|
392
|
+
|
375
|
if(empty($uids[$datum['email_id']])){
|
393
|
if(empty($uids[$datum['email_id']])){
|
376
|
$uids[$datum['email_id']][$datum['folder_id']] = [];
|
394
|
$uids[$datum['email_id']][$datum['folder_id']] = [];
|
377
|
}
|
395
|
}
|