我知道在版本5之前的“客户服务”面板中有一个订单,并且他们有意隐藏了该订单。我看到了这个线程http://forum.broadleafcommerce.org/viewtopic.php?t=25329 但是,当我尝试在数据库中添加该行时,出现错误,表明BLC_ADMIN_MODULE表中不存在MODULE_ID值(4000)。有什么建议么?
答案 0 :(得分:0)
module_id
列需要与blc_admin_module
表中的条目匹配。我认为4000
的值不再是blc_admin_module
中的有效条目。
答案 1 :(得分:0)
您只需要向数据库添加记录。 要对Broadleaf演示站点启用订单或其他实体管理,可以使用以下sql脚本。 这是我的sql,它在DBeaver上运行,如果您的数据库客户端有错误,您可以手动更改参数:
@set SECTION_ID = 80 --check in db to get unique id
@set SECTION_MENU_TITLE = 'Taho Order'
@set SECTION_KEY = 'TahoOrderSection'
@set SECTION_DISPLAY_ORDER = 1
@set MODULE_ID = 80 --check in db to get unique id
@set MODULE_NAME = 'Taho Order Module'
@set MODULE_KEY = 'taho-order-module'
@set MODULE_ICON = 'blc-icon-globe'
@set MODULE_DISPLAY_ORDER = 800
@set PERMISSION_ID = 80 --check in db to get unique id
@set PERMISSION_TYPE = 'ALL'
@set PERMISSION_NAME = 'PERMISSION_ALL_ORDER_CLASS'
@set PERMISSION_KEY = 'PERMISSION_ALL_ORDER_CLASS'
@set ROUTE_PATH = '/taho-order'
@set ENTITY = 'org.broadleafcommerce.core.order.domain.Order'
@set IS_FRIENDLY = false
@set ENTITY_PERMISSION_ID = 80 --check in db to get unique id
@set CHILD_PERMISSION_ID = 80 --check in db to get unique id
--create new module for admin
insert into public.blc_admin_module
(ADMIN_MODULE_ID, "name", MODULE_KEY, ICON, DISPLAY_ORDER)
values
(${MODULE_ID}, ${MODULE_NAME}, ${MODULE_KEY}, ${MODULE_ICON}, ${MODULE_DISPLAY_ORDER});
-- Create Admin permissions and entity permissions for your new entity
insert into public.blc_admin_permission
(ADMIN_PERMISSION_ID, DESCRIPTION, "name", PERMISSION_TYPE, IS_FRIENDLY)
values
(${PERMISSION_ID}, ${PERMISSION_NAME}, ${PERMISSION_KEY}, ${PERMISSION_TYPE}, ${IS_FRIENDLY});
insert into public.blc_admin_permission_entity
(ADMIN_PERMISSION_ENTITY_ID, CEILING_ENTITY, ADMIN_PERMISSION_ID)
values
(${ENTITY_PERMISSION_ID}, ${ENTITY}, ${PERMISSION_ID});
-- Add Role Permission XREF to the Permission
INSERT INTO public.BLC_ADMIN_PERMISSION_XREF
(ADMIN_PERMISSION_ID, CHILD_PERMISSION_ID)
VALUES
(${PERMISSION_ID}, ${CHILD_PERMISSION_ID});
INSERT INTO public.BLC_ADMIN_ROLE_PERMISSION_XREF
(ADMIN_ROLE_ID, ADMIN_PERMISSION_ID)
VALUES
(-1,${PERMISSION_ID});
-- Mapping sections and permissions
INSERT INTO public.BLC_ADMIN_SECTION
(ADMIN_SECTION_ID, DISPLAY_ORDER, ADMIN_MODULE_ID, "name", SECTION_KEY, URL, CEILING_ENTITY)
VALUES
(${SECTION_ID}, ${SECTION_DISPLAY_ORDER}, ${MODULE_ID},
${SECTION_MENU_TITLE}, ${SECTION_KEY}, ${ROUTE_PATH}, ${ENTITY});
INSERT INTO public.BLC_ADMIN_SEC_PERM_XREF
(ADMIN_SECTION_ID, ADMIN_PERMISSION_ID)
VALUES
(${SECTION_ID}, ${PERMISSION_ID});