1、文件:app/services/user/label/UserLabelRelationServices.php
2、復(fù)制一下代碼:替換原來(lái)方法:unUserLabel
public function unUserLabel(int $uid, array $labels = [], int $type = 0, int $relation_id = 0)
{
if (!count($labels)) {
return true;
}
$where = [
['uid', '=', $uid],
['label_id', 'in', $labels],
['type', '=', $type],
['relation_id', '=', $relation_id]
];
$this->dao->delete($where);
return true;
}
3、復(fù)制代碼,放在截圖部位
/**
* 清空用戶標(biāo)簽
* @param int $uid
* @param int $type
* @param int $relation_id
* @return bool
*/
public function delUserLabel(int $uid, int $type = 0, int $relation_id = 0)
{
$where = [
['uid', '=', $uid],
['type', '=', $type],
['relation_id', '=', $relation_id]
];
$this->dao->delete($where);
return true;
}
4、文件:app/services/user/UserServices.php
5、按下圖(修改后截圖)修改,
6、重啟swoole,重新在門店給用戶設(shè)置標(biāo)簽測(cè)試