|
|
@@ -466,6 +466,30 @@ class ItemController extends BaseController
|
|
|
util::complete('清除成功');
|
|
|
}
|
|
|
|
|
|
+ //清空单个客户的已购 ssh 20250710
|
|
|
+ public function actionClearOneLimitBuy()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $productId = $get['productId'] ?? '';
|
|
|
+ $customId = $get['customId'] ?? 0;
|
|
|
+ $item = ItemClass::getById($productId, true);
|
|
|
+ if (empty($item)) {
|
|
|
+ util::fail('没有找到花材');
|
|
|
+ }
|
|
|
+ if ($item->mainId != $this->mainId) {
|
|
|
+ util::fail('不是你的花材');
|
|
|
+ }
|
|
|
+ $custom = \bizGhs\custom\classes\CustomClass::getById($customId, true);
|
|
|
+ if (empty($custom)) {
|
|
|
+ util::fail('没有客户');
|
|
|
+ }
|
|
|
+ if ($custom->ownMainId != $this->mainId) {
|
|
|
+ util::fail('不是你的客户');
|
|
|
+ }
|
|
|
+ ProductClass::baseClearLimitBuy($productId, $customId);
|
|
|
+ util::complete('清除成功');
|
|
|
+ }
|
|
|
+
|
|
|
//花材已购客户列表
|
|
|
public function actionHasLimitBuyCustomList()
|
|
|
{
|