作者 邓超

x

... ... @@ -480,7 +480,7 @@ class Mail {
}
bodySql::insertOrUpdate($db,[
bodySql::insertOrUpdate([
'lists_id' => $id,
'text_html' => $body // todo::因为邮件会出现多编码问题,会导致数据库写不进去
]);
... ...
... ... @@ -47,12 +47,12 @@ class bodySql {
* @author:dc
* @time 2023/4/10 17:30
*/
public static function insertOrUpdate(DbPool $db,$data){
public static function insertOrUpdate($data){
if($db->count(self::has($data['lists_id']))){
return $db->update(bodySql::$table,$data,dbWhere(['lists_id' => $data['lists_id']]),false);
if(db()->count(self::has($data['lists_id']))){
return db()->update(bodySql::$table,$data,dbWhere(['lists_id' => $data['lists_id']]),false);
}else{
return $db->insert(bodySql::$table,$data,false);
return db()->insert(bodySql::$table,$data,false);
}
}
... ...
... ... @@ -154,7 +154,7 @@ class listsSql {
$draftBody[] = $da;
}
bodySql::insertOrUpdate(db(),[
bodySql::insertOrUpdate([
'lists_id' => $draftid,
'text_html' => $draftBody
]);
... ...