Actions
Wiki » History » Revision 7
« Previous |
Revision 7/28
(diff)
| Next »
Soh Keong, 11/11/2021 03:07 PM
- Table of contents
- Specification
- Chart
- Programming Guide
Specification¶
Chart
¶
Programming Guide¶
Jar version¶
version | Description |
---|---|
1.0 | Init |
Jar File Download¶
Test Link¶
https://202.129.164.38:9093/TestPage/page/keyword/addKeyword
Database Table¶
CREATE TABLE KEYWORD_PRODUCT ( KEYWORD_REF_NO INTEGER NOT NULL, KEYWORD VARCHAR(50) NOT NULL, STATUS VARCHAR(2) DEFAULT 'A', CREATE_DATETIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, MODIFY_DATETIME TIMESTAMP, PRIMARY KEY (KEYWORD_REF_NO)) CREATE UNIQUE INDEX UI_PROD_KEYWORD ON KEYWORD_PRODUCT(KEYWORD)
CREATE TABLE KEYWORD_PRODUCT_PATTERN ( PRODUCT_REF_NO INTEGER NOT NULL, KEYWORD_REF_NO INTEGER NOT NULL, PRIORITY INTEGER, STATUS VARCHAR(2) DEFAULT 'A', CREATE_DATETIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, MODIFY_DATETIME TIMESTAMP, PRIMARY KEY (PRODUCT_REF_NO,KEYWORD_REF_NO)) CREATE INDEX IX_KEYWORD_PRODUCT_PATTERN_PRIO ON KEYWORD_PRODUCT_PATTERN(PRIORITY) CREATE INDEX IX_KEYWORD_PRODUCT_PATTERN_STATUS ON KEYWORD_PRODUCT_PATTERN(STATUS)
CREATE TABLE KEYWORD_SEARCH_PRODUCT ( PRODUCT_REF_NO INTEGER NOT NULL, SHOPPER_REF_NO INTEGER NOT NULL, SEARCH_TYPE VARCHAR(5) NOT NULL, CREATE_DATETIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, MODIFY_DATETIME TIMESTAMP, PRIMARY KEY (PRODUCT_REF_NO,SHOPPER_REF_NO,SEARCH_TYPE)) CREATE INDEX IX_KEYWORD_SEARCH_PRODUCT_MODI ON KEYWORD_SEARCH_PRODUCT(MODIFY_DATETIME)
CREATE TABLE KEYWORD_SEARCH_PATTERN ( SHOPPER_REF_NO INTEGER NOT NULL, KEYWORD_REF_NO INTEGER NOT NULL, PRIORITY INTEGER NOT NULL, CREATE_DATETIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, MODIFY_DATETIME TIMESTAMP, PRIMARY KEY (SHOPPER_REF_NO, KEYWORD_REF_NO, PRIORITY)) CREATE INDEX IX_KEYWORD_SEARCH_PATTERN_MODIFY ON KEYWORD_SEARCH_PATTERN(MODIFY_DATETIME)
Methods¶
Keyword¶
com.cosway.keyword.service.KeywordService service = new com.cosway.keyword.service.KeywordService();
boolean added = service.addKeyword(Connection conn, String keyword) boolean updated = service.updateKeywordStatus(Connection conn, int keywordRefNo, String status) Map<Integer, String> KeywordMap = service.getKeywordAInActiveMap(Connection conn) Map<Integer, String> KeywordMap = service.getKeywordAllMap(Connection conn) Map<Integer, String> KeywordMap = service.getKeywordPrefixMap(Connection conn, String search) Map<Integer, String> KeywordMap = service.getKeywordwildcardMap(Connection conn, String search)
Product¶
com.cosway.keyword.service.ProductService service = new com.cosway.keyword.service.ProductService();
boolean added = service.addProductKeyword(Connection conn, KeywordBean keyword) boolean updated = service.updateProductStatus(Connection conn, int productRefNo, String status) Map<Integer, Set<KeywordBean>> productMap = service.getProductKeywordMap(Connection conn) Set<KeywordBean> productSet = service.getProductKeywordSetByProductRefNo(Connection conn, int productRefNo) Set<Integer> productSet = service.getProductSetByStatus(Connection conn, String status)
- productRefNo -
- keywordRefNo -
- priority -
Add product Keyword¶
com.cosway.keyword.service.PurchaseService service = new com.cosway.keyword.service.PurchaseService();
boolean added = service.addProductPattern(Connection conn, PurchaseBean bean)
- productRefNo -
- searchType - com.cosway.keyword.constant.SearchType
- shopperRefNo -
Search¶
com.cosway.keyword.service.SearchService service = new com.cosway.keyword.service.SearchService();
Set<Integer> productSet = service.getProductListByType(Connection conn, SearchBean searchBean) Map<Integer, Integer> productMap = service.getProductRefNoByLevel(Connection conn, SearchBean searchBean)
- productRefNo -
- noOfRecords -
- searchType - com.cosway.keyword.constant.SearchType (By Type)
- level - (By Level)
Updated by Soh Keong about 3 years ago · 7 revisions