作者 邓超

x

@@ -211,16 +211,18 @@ class SendJob { @@ -211,16 +211,18 @@ class SendJob {
211 $this->cnum--; 211 $this->cnum--;
212 // 验证是否完成 212 // 验证是否完成
213 if($data['maildata']['massSuit']??0){ 213 if($data['maildata']['massSuit']??0){
214 - $total = db()->first(\Model\sendJobStatusSql::countSum($data['id']));  
215 - if($total){  
216 - // 更新状态  
217 - db()->update(\Model\sendJobsSql::$table,[  
218 - 'status' => $total['t'] == $data['total'] ? 2 : 0,  
219 - 'success' => $total['s'],  
220 - 'error' => $total['e'],  
221 - ],dbWhere(['id'=>$data['id']])); 214 + $dst = db()->first(\Model\sendJobsSql::isStatus($data['id']));
  215 + if($dst && $dst['status'] != 3){
  216 + $total = db()->first(\Model\sendJobStatusSql::countSum($data['id']));
  217 + if($total){
  218 + // 更新状态
  219 + db()->update(\Model\sendJobsSql::$table,[
  220 + 'status' => $total['t'] == $data['total'] ? 2 : 0,
  221 + 'success' => $total['s'],
  222 + 'error' => $total['e'],
  223 + ],dbWhere(['id'=>$data['id']]));
  224 + }
222 } 225 }
223 -  
224 } 226 }
225 227
226 // 写入日志 228 // 写入日志