|
|
@@ -1,4 +1,13 @@
|
|
|
-select * from plm_itemclass t1 where siteid=$siteid$ and parentid=0 and not exists (
|
|
|
+select itemclassid,itemclassname,0 isused from plm_itemclass t1 where siteid=$siteid$ and parentid=0 and classtype='营销' and not exists (
|
|
|
+SELECT
|
|
|
+ t.v
|
|
|
+FROM
|
|
|
+ sa_accountclass,
|
|
|
+ JSON_TABLE(bindingcategories,"$[*]" COLUMNS ( v VARCHAR (128) PATH "$")) t where t.v=t1.itemclassid)
|
|
|
+
|
|
|
+ UNION ALL
|
|
|
+
|
|
|
+ select itemclassid,itemclassname,1 isused from plm_itemclass t1 where siteid=$siteid$ and parentid=0 and classtype='营销' and exists (
|
|
|
SELECT
|
|
|
t.v
|
|
|
FROM
|