作者 邓超

1

@@ -85,12 +85,15 @@ class Home extends Base { @@ -85,12 +85,15 @@ class Home extends Base {
85 app()->e('sync_request_param_error'); 85 app()->e('sync_request_param_error');
86 }else{ 86 }else{
87 // 查询id 87 // 查询id
88 - $ids = db()->all(emailSql::getValues($where));  
89 - foreach ($ids as $v){  
90 - redis()->rPush('sync_email_lists', $v['id']); 88 + $datas = db()->all(emailSql::getValues($where,'`id`,`email`,`pwd_error`'));
  89 + foreach ($datas as &$v){
  90 + if(!$v['pwd_error']){
  91 + redis()->rPush('sync_email_lists', $v['id']);
  92 + }
  93 + unset($v['id']);
91 } 94 }
92 // 返回成功的参数值 95 // 返回成功的参数值
93 - app()->_json(array_values($where)); 96 + app()->_json($datas);
94 } 97 }
95 98
96 } 99 }
@@ -60,8 +60,8 @@ class emailSql { @@ -60,8 +60,8 @@ class emailSql {
60 * @author:dc 60 * @author:dc
61 * @time 2023/3/10 10:46 61 * @time 2023/3/10 10:46
62 */ 62 */
63 - public static function getValues($where,$field='id'){  
64 - return "select `{$field}` from `".static::$table."` where ".dbWhere($where); 63 + public static function getValues($where,$field='`id`'){
  64 + return "select {$field} from `".static::$table."` where ".dbWhere($where);
65 } 65 }
66 66
67 67