Kneshi Chen
    • Create new note
    • Create a note from template
      • 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
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me 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
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
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
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me 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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # URI-D-02 Offer to sell 詳細頁 API ###### tags: `CP頁` `API` > [name=Tony Fan, Kenshi Chen] ## 內容 ### 網址 - https://trading-post.taiwantrade.com/tradingPost/1342010.html ### 程式 - com/hyweb/tt/cms/front/rest/TradingPostResource.java - #71 - com/hyweb/tt/cms/cm/webservice/BusinessPostWebService.java - #542 ### Input JSON Path #### 規格 - path : `${TT-API網址}/trade-posts/detail/{did}/{id}` - method : GET - query : 無 - body : 無 #### 輸入參數說明 - did: 網別代碼 - id : 商機 ID #### 範例 ```=json https://tt-api.taiwantrade.com/trade-posts/detail/701/1290151 ``` * 參考 [URI-D-02 測試案例](https://docs.google.com/spreadsheets/d/1T0l9XRiffJqCnPEeUSNXEBTyYVXQbUWneF3mCKQkGpQ/edit#gid=1093005017) ### Output JSON Path #### 規格 ```=json { "code" : <code>, "errorMsg" : <errorMsg>, "data": { "aid": <aid>, "companyName": <companyName>, "contact": <contact>, "userEmail": <userEmail>, "tel": <tel>, "companyWebsite": <companyWebsite>, "offerType": <offerType>, "subject": <subject>, "country": <country>, "validDate": <validDate>, "companyId": <companyId>, "userTitleName": <userTitleName>, "productDetails": <productDetails>, "catalogId": <catalogId>, "catalogNamePath": <catalogNamePath>, "attach": [ { "aid": <aid>, "seq": <seq>, "attachUrl": <attachUrl>, "attachName": <attachName> }, ... ] } } ``` #### 輸出參數說明 TradePost輸出欄位 | 欄位名稱 | 欄位說明 | 型態 | 是否可為空值 | | -------- | -------- | -------- | -------- | | code | 代碼 | int | 0表示ok | | errorMsg | 錯誤訊息 | String | | | aid | 商機 ID | int | N | | subject | 商機標題 | String | N | | contact | 發送者 | String | | | userTitleName | 發送者稱謂 | String | | | userEmail | 發送者Email | String | | | tel | 發送者電話(由後臺串接,國碼+電話+分機) | String | | | companyId | 發送者公司CID | int | N | | companyName | 發送者公司 | String | | | ~~address~~ | ~~發送者地址~~ | ~~String~~ | | | companyWebsite | 發送者公司網站 | String | | | ~~auditDate~~ | ~~商機張貼日期~~ | ~~String~~ ~~int(日期)~~ | | | validDate | 商機有效日期 | ~~String~~ int(日期) | | | ~~offerTypeId~~ | ~~商機類型代碼~~ | ~~int~~ | ~~N~~ | |~~offerType~~ | ~~商機類型名稱~~ | ~~String~~ | ~~N~~ | | country | 發送者公司註冊國家 | String | | | productDetails | 產品描述 | String | | | catalogId | 商機分類 ID (標準taitra) | int | N | | catalogNamePath | 商機分類麵包屑 (標準taitra,由後臺串接,參考TradingPostResource.java #151) | String | | | attach | 附件(參考getBusinessPostAttach) | [`附件欄位(Array Object)`](#附件欄位) | | * offerType: 當值為Sell時顯示詳細內容 * 參考 src/main/webapp/site/tteng/xsl/page/tradingPost/offerView.xsl #237 * code * 代碼為-999則表示找不到資料,找不到資料情況有四。 * 1.ID不匹配 * 2.審核沒有通過 * 3.有效日期過期 * 4.開始時間尚未到 ##### 附件欄位 | 欄位名稱 | 欄位說明 | 型態 | 是否可為空值 | | -------- | -------- | -------- |-------- | | aid | 附件 ID | int | N | | seq | 附件順序 | int | N | | attachUrl | 附件 URL | String | | | attachName | 附件名稱 | String | | #### Output範例 ```=json { "code": 0, "errorMsg": null, "intervalTime": null, "data": { "aid": 640038, "companyName": "HYWEB TECHNOLOGY CO., LTD.", "contact": "LiuccHywebSU", "userEmail": "liucc@hyweb.com.tw", "tel": "+886-23956966#2501", "companyWebsite": "http://www.hyweb.com.tw", "subject": "10.1 Android Tablet", "country": "Taiwan", "validDate": 1640880000000, "companyId": 2, "userTitleName": "Mr.", "productDetails": "No deaths have been reported, but officials in the state of Tamil Nadu, of which Chennai is the capital, have issued warnings to evacuate people from low-lying areas.\r\n\r\nLocal media footage showed uprooted trees and cars submerged as water quickly rose to block roads.\r\n\r\nThis is the heaviest rainfall in the city since 2015.\r\n\r\nAlthough the city is frequently hit with heavy rains this time of the year, experts say unchecked development and bad urban planning leads to the destruction and chaos. Climate change caused by global warming has also contributed to the problem, making extreme rainfall more likely and more frequent.", "catalogId": 1911, "catalogNamePath": "Consumer Electronics>Mobile Phone & Tablet PC>Tablet PC", "attach": [ { "aid": 33104324, "seq": 1, "attachUrl": "//file01.ttstaging.com.tw/eb646319-b5a8-40f1-9085-7d3460ef6aec/Sample.pdf", "attachName": "Sample.pdf" }, { "aid": 33104325, "seq": 2, "attachUrl": "//file01.ttstaging.com.tw/e6393197-20b2-4c46-a39b-5e5a3f0b7905/hyweb_newlogo2_%282%29.png", "attachName": "hyweb_newlogo2 (2).png" }, { "aid": 33104326, "seq": 3, "attachUrl": "//file01.ttstaging.com.tw/916009d2-09b2-4abf-b527-439039fc5153/hyweb_newlogo2.png", "attachName": "hyweb_newlogo2.png" } ] } } ``` #### SQL ```=sql --單筆商機 SELECT id, subject, user_name, user_title_code, cm.name user_title_name, user_email, Office_Tel_Country, Office_Tel, Office_Tel_Ext, b.company_id, company_name, business_nation_code, cm3.name country, product_description, b.catalog_id, mccc.name catalog, buy_or_sell, company_website_url, audit_date, valid_date, (CASE WHEN mc.name IS NOT NULL THEN mc.name|| '>'|| mcc.name|| '>'||mccc.name WHEN mcc.name IS NOT NULL THEN mcc.name|| '>'||mccc.name ELSE mccc.name END )AS catalog_name_path FROM BUSINESS_POST b JOIN domain d ON d.did = 701 -- domain id LEFT JOIN CODE_META_LANG cm ON cm.cid = b.user_title_code AND cm.lang_id = d.language_id LEFT JOIN CODE_META_LANG cm3 ON cm3.cid = b.business_nation_code AND cm3.lang_id = cm.lang_id LEFT JOIN catalog_standard ccc ON ccc.cid = b.catalog_id LEFT JOIN multi_catalog_standard mccc ON mccc.cid = ccc.cid AND mccc.language_id = d.language_id LEFT JOIN catalog_standard cc ON cc.cid = ccc.parent_cid LEFT JOIN multi_catalog_standard mcc ON mcc.cid = cc.cid AND mcc.language_id = mccc.language_id LEFT JOIN catalog_standard c ON c.cid = cc.parent_cid LEFT JOIN multi_catalog_standard mc ON mc.cid = c.cid AND mc.language_id = mcc.language_id WHERE id = 630136 --商機ID ; -- 商機附件 SELECT a.aid, a.original_file_url, a.attach_name, rownum AS attach_seq FROM BUSINESS_POST_TO_ATTACH b JOIN ATTACH a ON a.aid = b.attach_id WHERE business_post_id = 630136 ORDER BY aid--商機ID ; ```

    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