作者 zhl

Merge remote-tracking branch 'origin/master' into zhl

@@ -438,7 +438,7 @@ class RelayInquiry extends Command @@ -438,7 +438,7 @@ class RelayInquiry extends Command
438 { 438 {
439 $cache_key = 'inquiry_ads_task'; 439 $cache_key = 'inquiry_ads_task';
440 $ads = Cache::get($cache_key, function () use ($cache_key) { 440 $ads = Cache::get($cache_key, function () use ($cache_key) {
441 - $ads = ReInquiryTask::where(['status' => ReInquiryTask::STATUS_OPEN])->get(['id', 'ad_id', 'num', 'target']); 441 + $ads = ReInquiryTask::where(['status' => ReInquiryTask::STATUS_OPEN])->get(['id', 'ad_id', 'num', 'target', 'is_replace_text']);
442 $array = []; 442 $array = [];
443 foreach ($ads as $key=>$val) { 443 foreach ($ads as $key=>$val) {
444 $array[$val->ad_id] = $val; 444 $array[$val->ad_id] = $val;
@@ -987,6 +987,20 @@ if (!function_exists('check_domain_record')) { @@ -987,6 +987,20 @@ if (!function_exists('check_domain_record')) {
987 return false; 987 return false;
988 } 988 }
989 } 989 }
  990 +
  991 + /**
  992 + * 邮箱脱敏
  993 + * @author zbj
  994 + * @date 2024/10/25
  995 + */
  996 + function email_desensitize($email){
  997 + $parts = explode('@', $email);
  998 + $username = $parts[0];
  999 + $domain = $parts[1];
  1000 + $maskedUsername = substr($username, 0, -4) . '****';
  1001 + $maskedDomain = '****.' . substr($domain, -5);
  1002 + return $maskedUsername . '@' . $maskedDomain;
  1003 + }
990 } 1004 }
991 1005
992 1006
@@ -167,6 +167,13 @@ class InquiryController extends BaseController @@ -167,6 +167,13 @@ class InquiryController extends BaseController
167 167
168 $data = $data['list'] ?? []; 168 $data = $data['list'] ?? [];
169 foreach ($data as &$item){ 169 foreach ($data as &$item){
  170 + //非正常登录的
  171 + if($this->param['login_source'] != 2){
  172 + //脱敏
  173 + $item['email'] = email_desensitize($item['email']);
  174 + $item['phone'] = substr($item['phone'], 0, -4) . '****';
  175 + }
  176 +
170 $item['ip_address'] = "{$item['country']}({$item['ip']})"; 177 $item['ip_address'] = "{$item['country']}({$item['ip']})";
171 178
172 if(!empty($this->param['form_id'])){ 179 if(!empty($this->param['form_id'])){