Commit 0597d925 by 杨树贤

fix

parent 72cd6358
......@@ -1435,14 +1435,14 @@ class DataService
// 获取该供应商的所有采购跟单员
$contacts = SupplierContactModel::where('supplier_id', $supplier->supplier_id)
->where('channel_user_type', 4)
->whereIn('can_check_uids',[
"10009",
"10546"
])
->get();
// 如果有采购跟单员,就删除它们
foreach ($contacts as $contact) {
//如果can_check_uids不在 10009 / 10546
if ($contact->can_check_uids != 10009 && $contact->can_check_uids != 10546) {
continue;
}
//判断创建时间是不是2025年1月3日的时间戳之前创建的
//如果是的话,那么就改成普通采购员
if ($contact->add_time < strtotime('2025-01-02')) {
......
......@@ -10,6 +10,7 @@ class SupplierContactModel extends Model
protected $connection = 'web';
protected $table = 'supplier_contact';
public $timestamps = false;
protected $primaryKey = 'contact_id';
const CHANNEL_USER_TYPE_LIEXIN = 1;
const CHANNEL_USER_TYPE_JD = 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment