...
|
...
|
@@ -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);
|
|
|
}
|
|
|
|
|
|
}
|
...
|
...
|
|