Files
fdesk/app/crmAdmin/logic/CustomerLogic.php
T

25 lines
479 B
PHP
Raw Normal View History

2025-08-01 14:20:12 +08:00
<?php
namespace app\crmAdmin\logic;
use app\crm\model\Customer;
class CustomerLogic
{
public function status(int $id,int $status)
{
2025-08-06 15:25:10 +08:00
$customer = Customer::withTrashed()->find($id);
2025-08-01 14:20:12 +08:00
$customer->status = $status;
$res = $customer->save();
return $res;
}
2025-08-01 17:18:08 +08:00
public function forceDelete(int $id)
2025-08-01 14:20:12 +08:00
{
$customer = Customer::find($id);
2025-08-01 17:18:08 +08:00
//强制删除
2025-08-01 14:20:12 +08:00
$res = $customer->forceDelete();
return $res;
}
}