This commit is contained in:
2026-01-05 14:33:21 +08:00
commit ee348b4925
451 changed files with 39954 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
<?php
namespace app\crmAdmin\logic;
use app\crm\model\Customer;
class CustomerLogic
{
public function status(int $id,int $status)
{
$customer = Customer::withTrashed()->find($id);
$customer->status = $status;
$res = $customer->save();
if($status == 1){
$customer->restore();
}
return $res;
}
public function forceDelete(int $id ,string $status_desc = '')
{
$customer = Customer::withTrashed()->find($id);
//强制删除
// $res = $customer->forceDelete();
$customer->status = 3;
$customer->status_desc = $status_desc;
$res = $customer->save();
return $res;
}
}