作者 邓超

1

... ... @@ -85,12 +85,15 @@ class Home extends Base {
app()->e('sync_request_param_error');
}else{
// 查询id
$ids = db()->all(emailSql::getValues($where));
foreach ($ids as $v){
$datas = db()->all(emailSql::getValues($where,'`id`,`email`,`pwd_error`'));
foreach ($datas as &$v){
if(!$v['pwd_error']){
redis()->rPush('sync_email_lists', $v['id']);
}
unset($v['id']);
}
// 返回成功的参数值
app()->_json(array_values($where));
app()->_json($datas);
}
}
... ...
... ... @@ -60,8 +60,8 @@ class emailSql {
* @author:dc
* @time 2023/3/10 10:46
*/
public static function getValues($where,$field='id'){
return "select `{$field}` from `".static::$table."` where ".dbWhere($where);
public static function getValues($where,$field='`id`'){
return "select {$field} from `".static::$table."` where ".dbWhere($where);
}
... ...