2021-Front
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # URI-J-04~06 Supplier Alert > [name=JasonWu, Hans] ###### tags: `電子報訂閱` ## 網址 - https://{domain}/taiwantradeAlert/subscribeCompany/ - ex: https://www.taiwantrade.com/taiwantradeAlert/subscribeCompany/ ## 原版程式 - com.hyweb.tt.cms.front.rest.SubscribeResource.java ## 頁面功能說明 - 首先輸入 email,檢查相關訂閱資訊;如果已經登入,省略此動作,直接進入編輯畫面 - 成功之後,提供使用者輸入訂閱的相關資訊 - 輸入 keyword,找出符合 keyword 的公司 - 選擇後分類,找出符合的公司 - 最多可以選擇 100 項 - 需要有 google 的機器人驗證 - 送出後,記錄相關資料 ## 相關 api 分析 - 預計應提供四隻 api - subscribe catalog2 list api > 找出目前可用的二碼 taitra code - subscribe keyword and catalog2 search api > 輸入查詢詞或是二碼 taitra code 找出符合的公司 - supplier alert save api > 點選送出後,儲存相關資料 - supplier alert remove api > 點選送出後,刪除相關資料 ## subscribe catalog2 list api - https://www.taiwantrade.com/dataws/searchComponent/getCatalogStandardRootList ### 規格 - path : ${TT-API網址}/subscriptions/catalog-list - method : POST ### API 邏輯 - 找出目前可用的二碼 taitra code ### Input ```=json {"did" : {{number}}} ``` ### Output - json 內容如下: ```=json [ { "id" : {{ number }} , // 二碼 taitra code "name" : {{ string }} // 二碼 taitra code name } ] ``` #### 輸出參數說明 | 欄位名稱 | 欄位說明 | 型態 | | -------- | -------- | -------- | | <span id="resultId">id</span> | 產業別ID(2碼) | int | | name | 產業別名稱 | String | ### 實際範例 <details> <summary> Input(Click to Show/Hide Output) ```=json { "did": 2 } ``` </summary> Output ```=json { "code": 0, "errorMsg": "", "data": [ { "id": 1, "name": "Agricultural & Foods" }, { "id": 2, "name": "Mineral & Metallurgy" }, { "id": 3, "name": "Chemicals" }, { "id": 4, "name": "Beauty & Personal Care" }, { "id": 5, "name": "Textile & Leather" }, { "id": 6, "name": "Apparel & Accessories" }, { "id": 7, "name": "Luggage, Bags & Cases" }, { "id": 8, "name": "Timepiece, Jewelry & Eyewear" }, { "id": 9, "name": "Hardware" }, { "id": 10, "name": "Tools999" }, { "id": 11, "name": "Machinery" }, { "id": 12, "name": "Mechanical Parts" }, { "id": 13, "name": "Electrical & Electronics" }, { "id": 14, "name": "Consumer Electronics" }, { "id": 15, "name": "Home Appliances" }, { "id": 16, "name": "Lights & Lighting" }, { "id": 17, "name": "Computer" }, { "id": 18, "name": "Telecom Products" }, { "id": 19, "name": "Automobiles & Motorcycles" }, { "id": 20, "name": "Bicycles" }, { "id": 21, "name": "Aerospace" }, { "id": 22, "name": "Ships & Boats" }, { "id": 23, "name": "Security & Protection" }, { "id": 24, "name": "Medical & Health" }, { "id": 25, "name": "Measurement & Analysis Instrument" }, { "id": 26, "name": "Construction" }, { "id": 27, "name": "Furniture" }, { "id": 28, "name": "Houseware" }, { "id": 29, "name": "Toys, Baby & Pet Products" }, { "id": 30, "name": "Sports" }, { "id": 31, "name": "Musical Instruments" }, { "id": 32, "name": "Office & School Supplies" }, { "id": 33, "name": "Gifts & Crafts" }, { "id": 34, "name": "Packaging, Printing & Advertising" }, { "id": 35, "name": "Services" } ] } ``` </details> ## subscribe keyword search api - https://www.taiwantrade.com/taiwantradeAlert/queryCompaniesByCatalogAndKeyword?page=1&rows=10&keyword=&catalog=&did=2&languageId=42 ### 規格 - path : ${TT-API網址}/subscriptions/company-list - method : POST - query : ### API 邏輯 - 依照查詢條件,找出公司列表 ### Input ```=json { "did" : {{ number}}, "keyword" : {{ string }}, "catalog" : {{ number }}, "page" : {{ number }}, "row" : {{ number }} } ``` Column | Type | Require | Desc -----------------|----------|---------|--------- did | number | Y | domain id keyword | String | N | 查詢詞 catalog | number | N | [查詢 catalog id](#resultId) <br> `subscribe catalog2 list api` page | number | Y | 第幾頁`(default 1)` row | number | Y | 每頁幾筆`(default 10)` ### Output - json 內容如下: ```=json { "code" : {{ number }} , // 代碼,0:ok、 < 0: error 使用 "errorMsg" : {{ string }}, // 錯誤訊息 "data" : { "total" : {{ number }} , // 符合條件總筆數 "content" : [ // 內容 { "companyName" : {{ string }} , // 公司名稱 "cid" : {{ number }} // 公司 id }, ], "pageable" : { // 頁碼區塊 "page" : {{ number }} , // 第幾頁 "size" : {{ number }} // 每頁幾筆 } } } ``` #### 輸出參數說明 | 欄位名稱 | 欄位說明 | 型態 | | -------- | -------- | -------- | | total | 符合條件總筆數 | int | | content | 內容 | [`內容(Array<Object>)`](#content) | | pageable | 頁碼區塊 | [`頁碼區塊(Object)`](#pageable) | <span id="content">`content`</span> | 欄位名稱 | 欄位說明 | 型態 | | -------- | -------- | -------- | | companyName | 公司名稱 | String | | cid | 公司 id | int | <span id="pageable">`pageable`</span> | 欄位名稱 | 欄位說明 | 型態 | | -------- | -------- | -------- | | page | 第幾頁 | int | | size | 每頁幾筆 | int | ### 實際範例 <details> <summary> Search by Catalog - Input(Click to Show/Hide Output) ```=json { "catalog": 3, "did": 2, "keyword": "", "page": 1, "row": 10 } ``` </summary> Search by Catalog - Output ```=json { "code": 0, "errorMsg": "", "data": { "total": 3222, "content": [ { "companyName": "MEXA CO., LTD.", "cid": 10 }, { "companyName": "NIEH CHUANG INDUSTRIAL CO., LTD.", "cid": 127 }, { "companyName": "COIN CHEMICAL INDUSTRIAL CO., LTD.", "cid": 157 }, { "companyName": "STANDARD HANGERS INDUSTRIAL CO.", "cid": 177 }, { "companyName": "SUNSHINY ENTERPRISE CO., LTD.", "cid": 189 }, { "companyName": "WORLDWIDE CHEMICAL CO., LTD.", "cid": 205 }, { "companyName": "TAIWAN BASIN INDUSTRIAL CORPORATION", "cid": 214 }, { "companyName": "CHUNG TAI RUBBER GOODS. MFG. CO., LTD.", "cid": 252 }, { "companyName": "HING LUNG TRADING CO., LTD.", "cid": 267 }, { "companyName": "KAUNG JENN CO., LTD.", "cid": 271 } ], "pageable": { "page": 1, "size": 10 } } } ``` </details> <details> <summary> Search by Keyword - Input(Click to Show/Hide Output) ```=json { "catalog": null, "did": 2, "keyword": "Robot", "page": 1, "row": 10 } ``` </summary> Search by Keyword - Output ```=json { "code": 0, "errorMsg": "", "data": { "total": 10, "content": [ { "companyName": "HI-MORE ROBOT CO., LTD.", "cid": 6516 }, { "companyName": "ROBOTEC MACHINERY COMPANY", "cid": 98007 }, { "companyName": "KUKA ROBOT AUTOMATION TAIWAN CO., LTD.", "cid": 137396 }, { "companyName": "PLAYROBOT INC.", "cid": 157956 }, { "companyName": "ROBOTECH ENT ENTERPRISE CO., LTD.", "cid": 162652 }, { "companyName": "YEN DAI ROBOT CO., LTD.", "cid": 172420 }, { "companyName": "ATE-ROBOT", "cid": 320599 }, { "companyName": "EMEME ROBOT CO., LTD.", "cid": 338795 }, { "companyName": "TECHMAN ROBOT INC.", "cid": 664632 }, { "companyName": "ROBOTELF TECHNOLOGIES CO., LTD.", "cid": 666966 } ], "pageable": { "page": 1, "size": 10 } } } ``` </details> ## supplier alert save api -https://www.taiwantrade.com/taiwantradeAlert/subscribeByCompanies?email=user@hyweb.com.tw&companies=68,4&did=2&languageId=42 ### 規格 - path : ${TT-API網址}/subscriptions/company-save - method : POST - query : ### API 邏輯 - 儲存公司訂閱條件 ### Input ```=json { "email" : {{ string}}, "companies" : {{ string }}, "did" : {{ number }}, "method" : {{ string }} } ``` Column | Type | Require | Desc -----------------|----------|---------|--------- email | string | Y | 訂閱 email companies | string | Y | 訂閱那些公司,以逗號分隔 did | number | Y | domain id method | string | Y | 儲存方式<br> `ADD` 依照參數逐筆新增 <br> `EDIT` 依照參數直接替換 ### Output - json 內容如下: ```=json { "code" : {{ number }} , // 代碼,0:ok、 < 0: error 使用 "errorMsg" : {{ string }}, // 錯誤訊息 "data" : null } ``` ### 實際範例 <details> <summary> Input(Click to Show/Hide Output) ```=json { "companies": "172420,162652", "did": 2, "email": "hans.hsu@hyweb.com.tw", "method": "EDIT" } ``` </summary> Output ```=json { "code": 0, "errorMsg": "", "data": null } ``` </details>

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully