---
# System prepended metadata

title: menu選項結構排序

---

# menu選項結構排序
![](https://hackmd.io/_uploads/BkLDjFcP3.png)
![](https://hackmd.io/_uploads/SJ-ciFqwn.png)

```
    public MMSResponseDto getRoleFuncTree() {
        List<SysRevampFuncEntity> funcEntities = sysFuncDao.findAllByOrderByParentFuncIdAscPositionAsc();
        RoleFuncTreeDto root = new RoleFuncTreeDto();
        Map<Integer, RoleFuncTreeDto> treeMap = new HashMap<>();
        List<SysRevampFuncEntity> tempChildFuncEntities = new ArrayList<>();

        for (SysRevampFuncEntity entity : funcEntities) {
            RoleFuncTreeDto dto = RoleFuncTreeDto.fromSysRevampFuncEntity(entity);
            treeMap.put(dto.getFuncId(), dto);

            if (entity.getParentFuncId() == 0) {
                root.getChildRoleFunc().add(dto);
            } else {
                RoleFuncTreeDto parent = treeMap.get(entity.getParentFuncId());
                if (parent != null) {
                    parent.getChildRoleFunc().add(dto);
                } else {
                    tempChildFuncEntities.add(entity);
                }
            }
        }

        addChildToParent(treeMap, tempChildFuncEntities);

        MMSResponseDto mmsResponseDto = new MMSResponseDto();
        mmsResponseDto.setStatus(ConstantUtil.ERROR_TYPE_SUCCESS);
        mmsResponseDto.setMessage("Get role function tree success.");
        mmsResponseDto.setData(root.getChildRoleFunc());
        return mmsResponseDto;
    }
```

```
 private void addChildToParent(Map<Integer, RoleFuncTreeDto> treeMap, List<SysRevampFuncEntity> tempChildFuncEntities) {
        Iterator<SysRevampFuncEntity> iterator = tempChildFuncEntities.iterator();
        while (iterator.hasNext()) {
            SysRevampFuncEntity entity = iterator.next();
            RoleFuncTreeDto dto = RoleFuncTreeDto.fromSysRevampFuncEntity(entity);
            treeMap.put(dto.getFuncId(), dto);

            RoleFuncTreeDto parent = treeMap.get(entity.getParentFuncId());
            if (parent != null && parent.getChildRoleFunc() != null) {
                parent.getChildRoleFunc().add(dto);
                iterator.remove();
            }
        }

        if (!tempChildFuncEntities.isEmpty()) {
            addChildToParent(treeMap, tempChildFuncEntities);
        }
    }
```
```
CREATE TABLE `SYS_REVAMP_FUNC` (
   `ID` int(11) NOT NULL AUTO_INCREMENT,
   `PARENT_FUNC_ID` int(11) NOT NULL DEFAULT '0',
   `POSITION` int(11) NOT NULL,
   `FUNC_CODE` varchar(100) NOT NULL,
   `SLA_SERVICE` varchar(45) DEFAULT NULL,
   `FUNC_NAME_EN` varchar(400) NOT NULL,
   `FUNC_NAME_CN` varchar(400) NOT NULL,
   `FUNC_NAME_TW` varchar(400) NOT NULL,
   `CREATED_DATE` datetime NOT NULL,
   `CREATED_BY` varchar(500) DEFAULT NULL,
   `LAST_UPDATED_DATE` datetime NOT NULL,
   `LAST_UPDATED_BY` varchar(500) DEFAULT NULL,
   PRIMARY KEY (`ID`),
   UNIQUE KEY `FUNC_CODE_UNIQUE` (`FUNC_CODE`)
 ) ENGINE=InnoDB AUTO_INCREMENT=146 DEFAULT CHARSET=utf8mb4
```
```
@Data
@Entity
@Table(name = "SYS_REVAMP_FUNC")
public class SysRevampFuncEntity {
    @Id
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @Column(name = "PARENT_FUNC_ID", nullable = false)
    private Integer parentFuncId;

    @Column(name = "POSITION", nullable = false)
    private Integer position;

    @Column(name = "FUNC_CODE", nullable = false, unique = true)
    private String funcCode;

    @Column(name = "SLA_SERVICE")
    private String slaService;

    @Column(name = "FUNC_NAME_EN", nullable = false)
    private String funcNameEn;

    @Column(name = "FUNC_NAME_CN", nullable = false)
    private String funcNameCn;

    @Column(name = "FUNC_NAME_TW", nullable = false)
    private String funcNameTw;

    @Column(name = "CREATED_DATE", nullable = false)
    private Timestamp createdDate;

    @Column(name = "CREATED_BY")
    private String createdBy;

    @Column(name = "LAST_UPDATED_DATE", nullable = false)
    private Timestamp lastUpdatedDate;

    @Column(name = "LAST_UPDATED_BY")
    private String lastUpdatedBy;
}
```
```
@Getter
@Setter
public class RoleFuncTreeDto {
    private Integer funcId;

    private String funcCode;

    @Schema(description = "menu選項名稱(EN)")
    private String funcNameEn;

    @Schema(description = "menu選項名稱(ZH)")
    private String funcNameZh;

    @Schema(description = "下層menu選項列表")
    private List<RoleFuncTreeDto> childRoleFunc;

    public RoleFuncTreeDto() {
        this.childRoleFunc = new ArrayList<>();
    }

    public static RoleFuncTreeDto fromSysRevampFuncEntity(SysRevampFuncEntity entity) {
        RoleFuncTreeDto dto = new RoleFuncTreeDto();
        dto.setFuncId(entity.getId());
        dto.setFuncCode(entity.getFuncCode());
        dto.setFuncNameEn(entity.getFuncNameEn());
        dto.setFuncNameZh(entity.getFuncNameTw());
        dto.setChildRoleFunc(new ArrayList<>());
        return dto;
    }
}
```
```
{
  "status": "success",
  "message": "Get role function tree success.",
  "data": [
    {
      "funcId": 1,
      "funcCode": "TRAINING_GUIDE",
      "funcNameEn": "Help Centre",
      "funcNameZh": "幫助中心",
      "childRoleFunc": []
    },
    {
      "funcId": 122,
      "funcCode": "NOTIFICATION_CENTER",
      "funcNameEn": "Notification Center",
      "funcNameZh": "Notification Center",
      "childRoleFunc": []
    },
    {
      "funcId": 4,
      "funcCode": "3PL_MANAGEMENT",
      "funcNameEn": "3pl",
      "funcNameZh": "3pl",
      "childRoleFunc": [
        {
          "funcId": 6,
          "funcCode": "3PL_HOMEPAGE",
          "funcNameEn": "3PL",
          "funcNameZh": "3PL",
          "childRoleFunc": []
        },
        {
          "funcId": 7,
          "funcCode": "3PL_CONTRACT",
          "funcNameEn": "Subscription Plan",
          "funcNameZh": "訂閱方案",
          "childRoleFunc": []
        },
        {
          "funcId": 8,
          "funcCode": "3PL_STORAGE_SPACE",
          "funcNameEn": "Storage Service",
          "funcNameZh": "倉儲服務",
          "childRoleFunc": [
            {
              "funcId": 12,
              "funcCode": "3PL_STORAGE_SPACE_DASHBOARD",
              "funcNameEn": "Storage Space",
              "funcNameZh": "倉儲容量",
              "childRoleFunc": []
            },
            {
              "funcId": 13,
              "funcCode": "3PL_STORAGE_SPACE_SUBSCRIPTION_RECORD",
              "funcNameEn": "Subscription Record",
              "funcNameZh": "訂閱記錄",
              "childRoleFunc": []
            },
            {
              "funcId": 14,
              "funcCode": "3PL_STORAGE_SPACE_TOTES_ENTERING",
              "funcNameEn": "Totes Stock-in Application Record",
              "funcNameZh": "儲存箱入倉申請紀錄",
              "childRoleFunc": []
            },
            {
              "funcId": 15,
              "funcCode": "3PL_STORAGE_SPACE_TOTES_EXITING",
              "funcNameEn": "Totes Stock-out Application Record",
              "funcNameZh": "儲存箱出倉申請紀錄",
              "childRoleFunc": []
            }
          ]
        },
        {
          "funcId": 9,
          "funcCode": "3PL_TOTES_SERVICE",
          "funcNameEn": "Totes Service",
          "funcNameZh": "儲存箱服務",
          "childRoleFunc": []
        },
        {
          "funcId": 10,
          "funcCode": "3PL_REPORT",
          "funcNameEn": "Report",
          "funcNameZh": "報表",
          "childRoleFunc": [
            {
              "funcId": 16,
              "funcCode": "3PL_REPORT_STOCK_TAKE",
              "funcNameEn": "盤點報表",
              "funcNameZh": "盤點報表",
              "childRoleFunc": []
            },
            {
              "funcId": 17,
              "funcCode": "3PL_REPORT_INVENTORY_OVERSOLD",
              "funcNameEn": "Inventory & Oversold Report",
              "funcNameZh": "庫存 & 超賣報表",
              "childRoleFunc": []
            },
            {
              "funcId": 18,
              "funcCode": "3PL_REPORT_TEMPORARY_STORAGE",
              "funcNameEn": "On-demand Storage Usage Report",
              "funcNameZh": "臨時倉儲日報表",
              "childRoleFunc": []
            },
            {
              "funcId": 19,
              "funcCode": "3PL_REPORT_LOSS_DAMAGE",
              "funcNameEn": "SKU Loss & Damage",
              "funcNameZh": "SKU遺失 & 損壞",
              "childRoleFunc": []
            },
            {
              "funcId": 24,
              "funcCode": "3PL_REPORT_SKU_ENTERING",
              "funcNameEn": "SKU Stock-in Report",
              "funcNameZh": "SKU入倉報表",
              "childRoleFunc": []
            },
            {
              "funcId": 25,
              "funcCode": "3PL_REPORT_PROMOTION",
              "funcNameEn": "Promotion Record",
              "funcNameZh": "優惠活動紀錄",
              "childRoleFunc": []
            }
          ]
        },
        {
          "funcId": 11,
          "funcCode": "3PL_FEE_SETTINGS",
          "funcNameEn": "Fee Setting",
          "funcNameZh": "費用設定",
          "childRoleFunc": [
            {
              "funcId": 131,
              "funcCode": "3PL_SUBSCRIPTION_SETTING",
              "funcNameEn": "Subscription Setting",
              "funcNameZh": "訂閱方案設定",
              "childRoleFunc": []
            },
            {
              "funcId": 132,
              "funcCode": "3PL_PROMOTION_SETTING",
              "funcNameEn": "Promotion Setting",
              "funcNameZh": "優惠活動設定",
              "childRoleFunc": []
            },
            {
              "funcId": 133,
              "funcCode": "3PL_PENALTY_SETTING",
              "funcNameEn": "Penalty Setting",
              "funcNameZh": "罰款設定",
              "childRoleFunc": []
            }
          ]
        },
        {
          "funcId": 134,
          "funcCode": "3PL_RISK_SETTING_ADMIN",
          "funcNameEn": "Risk Management",
          "funcNameZh": "風控管理",
          "childRoleFunc": [
            {
              "funcId": 139,
              "funcCode": "3PL_RISK_MANAGEMENT_RISK_SETTING",
              "funcNameEn": "Risk Management Record",
              "funcNameZh": "風控管理名單",
              "childRoleFunc": []
            },
            {
              "funcId": 140,
              "funcCode": "3PL_RISK_MANAGEMENT_REVISED_RECORD",
              "funcNameEn": "Revised Record",
              "funcNameZh": "調整名單",
              "childRoleFunc": []
            }
          ]
        },
        {
          "funcId": 135,
          "funcCode": "3PL_SOLUTION_APPLICATION_ADMIN",
          "funcNameEn": "Subscription Review",
          "funcNameZh": "訂閱記錄審核",
          "childRoleFunc": []
        },
        {
          "funcId": 20,
          "funcCode": "3PL_INVENTORY_OVERSOLD_ADMIN",
          "funcNameEn": "Inventory & Oversell",
          "funcNameZh": "庫存與超賣",
          "childRoleFunc": [
            {
              "funcId": 21,
              "funcCode": "3PL_INVENTORY_OVERSOLD_MERCHANT_LIST",
              "funcNameEn": "Inventory & Oversell Report",
              "funcNameZh": "庫存與超賣報表",
              "childRoleFunc": []
            },
            {
              "funcId": 22,
              "funcCode": "3PL_INVENTORY_OVERSOLD_APPLICATION",
              "funcNameEn": "Oversell Application Report",
              "funcNameZh": "超賣申請報表",
              "childRoleFunc": []
            },
            {
              "funcId": 23,
              "funcCode": "3PL_INVENTORY_OVERSOLD_STOCK_IN_REVERSAL",
              "funcNameEn": "Oversell Stock-in Reversal Report",
              "funcNameZh": "超賣入庫沖帳報表",
              "childRoleFunc": []
            }
          ]
        }
      ]
    },
    {
      "funcId": 26,
      "funcCode": "SYSTEM",
      "funcNameEn": "System",
      "funcNameZh": "系統",
      "childRoleFunc": [
        {
          "funcId": 141,
          "funcCode": "ROLE_FUNC_MANAGEMENT",
          "funcNameEn": "Role Menu Management",
          "funcNameZh": "角色選單管理",
          "childRoleFunc": []
        },
        {
          "funcId": 27,
          "funcCode": "USER_ACCOUNT",
          "funcNameEn": "User Account",
          "funcNameZh": "用戶帳號",
          "childRoleFunc": []
        },
        {
          "funcId": 28,
          "funcCode": "BUSINESS_UNIT",
          "funcNameEn": "Business Unit",
          "funcNameZh": "業務種類",
          "childRoleFunc": []
        },
        {
          "funcId": 29,
          "funcCode": "MENU_FUNCTION",
          "funcNameEn": "Menu and Function",
          "funcNameZh": "選單列設置",
          "childRoleFunc": []
        },
        {
          "funcId": 30,
          "funcCode": "SYSTEM_PARAMETER",
          "funcNameEn": "System Paramter",
          "funcNameZh": "系統參數",
          "childRoleFunc": []
        },
        {
          "funcId": 31,
          "funcCode": "WORKFLOW_MAINTENANCE",
          "funcNameEn": "Workflow",
          "funcNameZh": "工作流程",
          "childRoleFunc": []
        },
        {
          "funcId": 32,
          "funcCode": "MAINTAIN_QUESTIONNAIRE_STR",
          "funcNameEn": "Questionnaire Setup",
          "funcNameZh": "問卷設置",
          "childRoleFunc": []
        },
        {
          "funcId": 33,
          "funcCode": "MAIL_TEMPLATE",
          "funcNameEn": "Email Template",
          "funcNameZh": "電郵範本",
          "childRoleFunc": []
        },
        {
          "funcId": 34,
          "funcCode": "SYSTEM_SLA",
          "funcNameEn": "SLA",
          "funcNameZh": "服務水平協議 (SLA)",
          "childRoleFunc": []
        },
        {
          "funcId": 35,
          "funcCode": "CRON_JOB",
          "funcNameEn": "Cron Job",
          "funcNameZh": "Cron Job",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 36,
      "funcCode": "MERCHANT",
      "funcNameEn": "Merchant Master",
      "funcNameZh": "商戶列表",
      "childRoleFunc": [
        {
          "funcId": 37,
          "funcCode": "REGISTRATION_FORM",
          "funcNameEn": "New Registration",
          "funcNameZh": "新註冊商戶",
          "childRoleFunc": []
        },
        {
          "funcId": 38,
          "funcCode": "MERCHANT_PROFILE",
          "funcNameEn": "Setting/Contract Basic Terms",
          "funcNameZh": "商戶/合約條款設置",
          "childRoleFunc": []
        },
        {
          "funcId": 39,
          "funcCode": "LATEST_NEWS",
          "funcNameEn": "News",
          "funcNameZh": "最新消息",
          "childRoleFunc": []
        },
        {
          "funcId": 40,
          "funcCode": "RM_TEAM",
          "funcNameEn": "RM Team",
          "funcNameZh": "RM團隊",
          "childRoleFunc": []
        },
        {
          "funcId": 41,
          "funcCode": "MERCHANT_LIST",
          "funcNameEn": "Merchant List",
          "funcNameZh": "商戶清單",
          "childRoleFunc": []
        },
        {
          "funcId": 42,
          "funcCode": "MERCHANT_GROUP",
          "funcNameEn": "Group",
          "funcNameZh": "商戶組別",
          "childRoleFunc": []
        },
        {
          "funcId": 43,
          "funcCode": "RE_ASSIGNMENT",
          "funcNameEn": "RM Re-assignment",
          "funcNameZh": "授權 RM",
          "childRoleFunc": []
        },
        {
          "funcId": 44,
          "funcCode": "MERCHANT_VIRTUAL_STORE",
          "funcNameEn": "Merchant Store Status",
          "funcNameZh": "商戶狀態",
          "childRoleFunc": []
        },
        {
          "funcId": 45,
          "funcCode": "BATCH_CREATE_STORE_USER",
          "funcNameEn": "Batch Create Store/User",
          "funcNameZh": "批量創建商店/用戶",
          "childRoleFunc": []
        },
        {
          "funcId": 46,
          "funcCode": "SUPPLIER_UPLOAD",
          "funcNameEn": "Supplier related upload",
          "funcNameZh": "Supplier相關上傳",
          "childRoleFunc": []
        },
        {
          "funcId": 47,
          "funcCode": "HKTVFOOD_NEW_REG",
          "funcNameEn": "HKTVtakway New Registration",
          "funcNameZh": "外賣新註冊",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 48,
      "funcCode": "CONTRACT",
      "funcNameEn": "Contract",
      "funcNameZh": "合約",
      "childRoleFunc": [
        {
          "funcId": 49,
          "funcCode": "OPPORTUNITY",
          "funcNameEn": "New Contract Application",
          "funcNameZh": "申請新合約",
          "childRoleFunc": []
        },
        {
          "funcId": 50,
          "funcCode": "MASTER_CONTRACT",
          "funcNameEn": "Contract Status",
          "funcNameZh": "合約狀態",
          "childRoleFunc": []
        },
        {
          "funcId": 51,
          "funcCode": "FILL_QUESTIONNAIRE",
          "funcNameEn": "Questionnaire",
          "funcNameZh": "問卷",
          "childRoleFunc": []
        },
        {
          "funcId": 52,
          "funcCode": "BATCHUPLOADPROMOTION",
          "funcNameEn": "Batch Upload Promotion",
          "funcNameZh": "批量上傳促銷合約",
          "childRoleFunc": []
        },
        {
          "funcId": 53,
          "funcCode": "CONTRACT_TYPE",
          "funcNameEn": "Contract Type",
          "funcNameZh": "合約種類",
          "childRoleFunc": []
        },
        {
          "funcId": 54,
          "funcCode": "RENEW_CONTRACT",
          "funcNameEn": "Renew Contract",
          "funcNameZh": "合約更新",
          "childRoleFunc": []
        },
        {
          "funcId": 55,
          "funcCode": "CONTRACT_DEFAULT_TERM",
          "funcNameEn": "Contract Default Term",
          "funcNameZh": "合約商品設定",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 56,
      "funcCode": "PRODUCT",
      "funcNameEn": "Product",
      "funcNameZh": "產品",
      "childRoleFunc": [
        {
          "funcId": 57,
          "funcCode": "MANAGE_PRODUCT",
          "funcNameEn": "Add/Edit Product",
          "funcNameZh": "新增／修改產品",
          "childRoleFunc": []
        },
        {
          "funcId": 58,
          "funcCode": "BATCH_MANAGE_PRODUCT",
          "funcNameEn": "Batch Add/Edit Product",
          "funcNameZh": "批量上傳新增／修改產品",
          "childRoleFunc": []
        },
        {
          "funcId": 59,
          "funcCode": "BATCH_UPLOAD",
          "funcNameEn": "Batch Upload",
          "funcNameZh": "產品批量上傳",
          "childRoleFunc": []
        },
        {
          "funcId": 60,
          "funcCode": "PENDING_SUBMIT",
          "funcNameEn": "Pending to Submit",
          "funcNameZh": "待提交產品",
          "childRoleFunc": []
        },
        {
          "funcId": 61,
          "funcCode": "BRAND",
          "funcNameEn": "Brand",
          "funcNameZh": "品牌",
          "childRoleFunc": []
        },
        {
          "funcId": 63,
          "funcCode": "PRODUCT_CATEGORY",
          "funcNameEn": "Product Category",
          "funcNameZh": "產品類別",
          "childRoleFunc": []
        },
        {
          "funcId": 64,
          "funcCode": "APPROVE_DEAL",
          "funcNameEn": "Approve Deal",
          "funcNameZh": "批准的交易",
          "childRoleFunc": []
        },
        {
          "funcId": 65,
          "funcCode": "CATEGORY_REVAMP",
          "funcNameEn": "Category Revamp",
          "funcNameZh": "Category Revamp",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 66,
      "funcCode": "PROMOTION",
      "funcNameEn": "Promotion",
      "funcNameZh": "推廣",
      "childRoleFunc": [
        {
          "funcId": 67,
          "funcCode": "CREATE PROMOTION",
          "funcNameEn": "Create Promotion",
          "funcNameZh": "新增推廣",
          "childRoleFunc": []
        },
        {
          "funcId": 68,
          "funcCode": "PROMOTION STATUS",
          "funcNameEn": "Promotion Status",
          "funcNameZh": "推廣狀態",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 74,
      "funcCode": "PAYMENT",
      "funcNameEn": "Payment Center",
      "funcNameZh": "帳務中心",
      "childRoleFunc": [
        {
          "funcId": 75,
          "funcCode": "CONTRACT_BANK",
          "funcNameEn": "Merchant Bank",
          "funcNameZh": "商戶銀行",
          "childRoleFunc": []
        },
        {
          "funcId": 76,
          "funcCode": "ANNUAL_FEE",
          "funcNameEn": "Annual Fee",
          "funcNameZh": "年費",
          "childRoleFunc": []
        },
        {
          "funcId": 77,
          "funcCode": "PCR_MAINTERNANCE",
          "funcNameEn": "Payment Cycle Report (PCR), ",
          "funcNameZh": "支付週期報告（PCR）",
          "childRoleFunc": []
        },
        {
          "funcId": 78,
          "funcCode": "PCR_MAINTERNANCE_MMS",
          "funcNameEn": "Payment Cycle Report (PCR), ",
          "funcNameZh": "支付週期報告（PCR）",
          "childRoleFunc": []
        },
        {
          "funcId": 79,
          "funcCode": "GEN_ADJUSTMENT",
          "funcNameEn": "General Adjustment",
          "funcNameZh": "一般調整",
          "childRoleFunc": []
        },
        {
          "funcId": 80,
          "funcCode": "PCR_SUMMARY_REPORT",
          "funcNameEn": "PCR Summary Report",
          "funcNameZh": "支付週期總結報告",
          "childRoleFunc": []
        },
        {
          "funcId": 81,
          "funcCode": "ORD_ADJUSTMENT",
          "funcNameEn": "Order Adjustment",
          "funcNameZh": "訂單調整",
          "childRoleFunc": []
        },
        {
          "funcId": 82,
          "funcCode": "E_WALLET",
          "funcNameEn": "Fee Record",
          "funcNameZh": "电子钱包",
          "childRoleFunc": []
        },
        {
          "funcId": 83,
          "funcCode": "PAYMENT_FEE_RECORD",
          "funcNameEn": "Fee Record ",
          "funcNameZh": "費用紀錄",
          "childRoleFunc": []
        },
        {
          "funcId": 127,
          "funcCode": "PAYMENT_INVOICES",
          "funcNameEn": "Invoice ",
          "funcNameZh": "付款紀錄",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 84,
      "funcCode": "REPORT",
      "funcNameEn": "Report",
      "funcNameZh": "報告",
      "childRoleFunc": [
        {
          "funcId": 85,
          "funcCode": "STORE_CREATION_RPT",
          "funcNameEn": "Store Creation Report",
          "funcNameZh": "商店開立報告",
          "childRoleFunc": []
        },
        {
          "funcId": 86,
          "funcCode": "COMMI_RATE_REPORT",
          "funcNameEn": "Commission Rate Report",
          "funcNameZh": "佣金率報告",
          "childRoleFunc": []
        },
        {
          "funcId": 87,
          "funcCode": "DAILY_N_AP_CONTRACT",
          "funcNameEn": "Daily New Approved Contract Report",
          "funcNameZh": "日常新批准合約報告",
          "childRoleFunc": []
        },
        {
          "funcId": 88,
          "funcCode": "DAILY_N_IN_CONTRACT",
          "funcNameEn": "Daily New Input Contract",
          "funcNameZh": "日常新申請合約報告",
          "childRoleFunc": []
        },
        {
          "funcId": 89,
          "funcCode": "ORDER_STATUS_REPORT",
          "funcNameEn": "Order Status Report",
          "funcNameZh": "訂單狀態報告",
          "childRoleFunc": []
        },
        {
          "funcId": 90,
          "funcCode": "PAYMENT_REG_REPORT",
          "funcNameEn": "Payment Register Report",
          "funcNameZh": "付款登記報告",
          "childRoleFunc": []
        },
        {
          "funcId": 91,
          "funcCode": "PRODUCE_PRICE_REPORT",
          "funcNameEn": "Product Price Report",
          "funcNameZh": "產品價錢報告",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 92,
      "funcCode": "HKTV_OPEN_DATA_BANK",
      "funcNameEn": "HKTVmall Open DataBank",
      "funcNameZh": "HKTVmall 數據共享庫",
      "childRoleFunc": [
        {
          "funcId": 93,
          "funcCode": "ACCESS_DATA_BANK",
          "funcNameEn": "Access Data Bank",
          "funcNameZh": "進入HKTVmall 數據共享庫",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 94,
      "funcCode": "BOOKING",
      "funcNameEn": "Advertising Booking",
      "funcNameZh": "廣告預訂",
      "childRoleFunc": [
        {
          "funcId": 95,
          "funcCode": "MERCHANT_ADVERTISING",
          "funcNameEn": "Advertising Booking",
          "funcNameZh": "廣告預訂",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 96,
      "funcCode": "ADDITIONAL_OFFER",
      "funcNameEn": "Additional Offer",
      "funcNameZh": "加單優惠",
      "childRoleFunc": [
        {
          "funcId": 97,
          "funcCode": "OFFER_SEARCH",
          "funcNameEn": "Additional Offer Serach",
          "funcNameZh": "搜尋加單優惠",
          "childRoleFunc": []
        },
        {
          "funcId": 98,
          "funcCode": "OFFER_BATCH_UPLOAD",
          "funcNameEn": "Additional Offer Batch Upload",
          "funcNameZh": "大量上傳加單優惠",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 99,
      "funcCode": "EXCHANGE",
      "funcNameEn": "Exchange",
      "funcNameZh": "Exchange",
      "childRoleFunc": [
        {
          "funcId": 100,
          "funcCode": "ACCESS_EXCHANGE",
          "funcNameEn": "Access Exchange",
          "funcNameZh": "進入Exchange",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 101,
      "funcCode": "GLOBAL_SETTING",
      "funcNameEn": "Global Settings",
      "funcNameZh": "共享设置",
      "childRoleFunc": [
        {
          "funcId": 102,
          "funcCode": "BANK",
          "funcNameEn": "Bank",
          "funcNameZh": "銀行",
          "childRoleFunc": []
        },
        {
          "funcId": 103,
          "funcCode": "COUNTRY_OF_ORIGIN",
          "funcNameEn": "Country of Origin",
          "funcNameZh": "原產地",
          "childRoleFunc": []
        },
        {
          "funcId": 104,
          "funcCode": "PAYMENT_GROUP",
          "funcNameEn": "Payment Group",
          "funcNameZh": "款項處理類別",
          "childRoleFunc": []
        },
        {
          "funcId": 105,
          "funcCode": "PAYMENT_TERM",
          "funcNameEn": "Payment term",
          "funcNameZh": "付款類別",
          "childRoleFunc": []
        },
        {
          "funcId": 106,
          "funcCode": "ROLE",
          "funcNameEn": "Role",
          "funcNameZh": "角色",
          "childRoleFunc": []
        },
        {
          "funcId": 107,
          "funcCode": "SHARED_SYSTEM_PARAMETER",
          "funcNameEn": "System Parameter",
          "funcNameZh": "系統參數",
          "childRoleFunc": []
        },
        {
          "funcId": 108,
          "funcCode": "STORE_USER_SETTING",
          "funcNameEn": "Store & User Setting",
          "funcNameZh": "商店/用戶設定",
          "childRoleFunc": []
        },
        {
          "funcId": 110,
          "funcCode": "UPLOAD_PRODUCT_INVENTORY",
          "funcNameEn": "Batch Edit Product Inventory",
          "funcNameZh": "產品庫存上傳",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 111,
      "funcCode": "APPLY_NEW_BUSINESS",
      "funcNameEn": "Apply New Business",
      "funcNameZh": "新業務申請",
      "childRoleFunc": [
        {
          "funcId": 112,
          "funcCode": "NEW_BUSINESS_APPLICATION",
          "funcNameEn": "New Business Application",
          "funcNameZh": "申請新業務",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 113,
      "funcCode": "MY-ACCOUNT",
      "funcNameEn": "My Account",
      "funcNameZh": "我的帳戶",
      "childRoleFunc": [
        {
          "funcId": 114,
          "funcCode": "PROFILE",
          "funcNameEn": "Account Profile",
          "funcNameZh": "帳號資訊",
          "childRoleFunc": []
        },
        {
          "funcId": 115,
          "funcCode": "CHANGE-PASSWORD",
          "funcNameEn": "Change Password",
          "funcNameZh": "更改密碼",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 116,
      "funcCode": "SHOP_IN_SHOP",
      "funcNameEn": "SHOP IN SHOP",
      "funcNameZh": "SHOP IN SHOP",
      "childRoleFunc": [
        {
          "funcId": 117,
          "funcCode": "ACCESS_SHOP_IN_SHOP",
          "funcNameEn": "Access shopInShop",
          "funcNameZh": "進入 SHOP IN SHOP",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 118,
      "funcCode": "OFFER_SUBMISSION",
      "funcNameEn": "Offer submission",
      "funcNameZh": "參加推廣活動",
      "childRoleFunc": [
        {
          "funcId": 119,
          "funcCode": "CAMPAIGN_VIEW",
          "funcNameEn": "Campaign Overview Page",
          "funcNameZh": "推廣活動總覽",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 144,
      "funcCode": "func144",
      "funcNameEn": "func144",
      "funcNameZh": "func144",
      "childRoleFunc": [
        {
          "funcId": 142,
          "funcCode": "string",
          "funcNameEn": "func142",
          "funcNameZh": "func142",
          "childRoleFunc": [
            {
              "funcId": 145,
              "funcCode": "func145",
              "funcNameEn": "func145",
              "funcNameZh": "func145",
              "childRoleFunc": []
            },
            {
              "funcId": 143,
              "funcCode": "func143",
              "funcNameEn": "func143",
              "funcNameZh": "func143",
              "childRoleFunc": []
            }
          ]
        }
      ]
    },
    {
      "funcId": 5,
      "funcCode": "3PL",
      "funcNameEn": "3PL",
      "funcNameZh": "3PL",
      "childRoleFunc": []
    },
    {
      "funcId": 73,
      "funcCode": "ORDER_MANAGEMENT",
      "funcNameEn": "Order Management",
      "funcNameZh": "訂單管理",
      "childRoleFunc": [
        {
          "funcId": 70,
          "funcCode": "ORDERS",
          "funcNameEn": "Order Overview",
          "funcNameZh": "訂單總覽",
          "childRoleFunc": [
            {
              "funcId": 71,
              "funcCode": "VIEW_ORDER",
              "funcNameEn": "View Order",
              "funcNameZh": "查看訂單記錄",
              "childRoleFunc": []
            },
            {
              "funcId": 72,
              "funcCode": "BATCH_UPLOAD_REDEEM_VOUCHER",
              "funcNameEn": "Voucher Redeemed Upload",
              "funcNameZh": "上傳優惠券",
              "childRoleFunc": []
            }
          ]
        },
        {
          "funcId": 128,
          "funcCode": "ORDER_FULFILLMENT",
          "funcNameEn": "Fulfillment",
          "funcNameZh": "訂單處理及物流安排",
          "childRoleFunc": []
        },
        {
          "funcId": 129,
          "funcCode": "ORDER_REPORT",
          "funcNameEn": "Order Report",
          "funcNameZh": "訂單報表",
          "childRoleFunc": []
        },
        {
          "funcId": 130,
          "funcCode": "ORDER_E_COUPON",
          "funcNameEn": "e-Coupon Management ",
          "funcNameZh": "電子優惠券管理",
          "childRoleFunc": []
        }
      ]
    },
    {
      "funcId": 69,
      "funcCode": "PROMOTION_MANAGEMENT",
      "funcNameEn": "Promotion Management",
      "funcNameZh": "優惠活動管理",
      "childRoleFunc": []
    },
    {
      "funcId": 62,
      "funcCode": "PRODUCT_MANAGEMENT",
      "funcNameEn": "Product Management",
      "funcNameZh": "產品管理",
      "childRoleFunc": [
        {
          "funcId": 109,
          "funcCode": "PRODUCT_INVENTORY",
          "funcNameEn": "Product & Inventory",
          "funcNameZh": "產品&庫存",
          "childRoleFunc": []
        }
      ]
    }
  ]
}
```