作者 邓超

x uuid

... ... @@ -162,6 +162,12 @@ class Home extends Base {
)
);
// map
$lists = array_map(function ($v){
$v['uuid'] = get_email_uuid($v['subject'],$v['udate'],$v['folder_id'],$v['from'],$v['to'],$v['size']);
return $v;
},$lists);
// 总数
$total = db()->count(
listsSql::listCount(dbWhere($where))
... ... @@ -627,6 +633,9 @@ class Home extends Base {
if($data){
$sync_num = 0;
$data['uuid'] = get_email_uuid($data['subject'],$data['udate'],$data['folder_id'],$data['from'],$data['to'],$data['size']);
$data['to_name'] = $data['to_name'] ? json_decode($data['to_name'],true) : [];
$data['cc'] = $data['cc'] ? json_decode($data['cc'],true) : [];
$data['bcc'] = $data['bcc'] ? json_decode($data['bcc'],true) : [];
... ...
... ... @@ -443,3 +443,16 @@ function strip_tags_content($text, $tags = '', $invert = FALSE) {
}
/**
* 返回邮件的uuid来区分是否是同一封邮件
* @return string
* @author:dc
* @time 2023/9/18 9:33
*/
function get_email_uuid($subject,$udate,$folder,$form,$to,$size){
return md5(json_encode([$subject,$udate,$folder,$form,$to,$size]));
}
... ...