Project

General

Profile

Specification » History » Version 13

Soh Keong, 10/26/2020 09:36 AM

1 5 Soh Keong
{{toc}}
2
3 1 Soh Keong
h1. Specification
4
5 4 Soh Keong
h2. Programming Guide
6 1 Soh Keong
7
h3. Jar version 
8
9 11 Soh Keong
|_. version |_. Description        |
10
| 2.8       | Init                 |
11
| 2.8.1     | Fixed shipping error | 
12 1 Soh Keong
13
h3. Jar File Download
14
15 11 Soh Keong
"Jar":/redmine/attachments/download/488/BVService-2.8.1.jar
16 1 Soh Keong
"Lib":/redmine/attachments/download/484/lib.rar
17
"Properties":/redmine/attachments/download/485/service.properties
18
19
h3. properties file
20
21
* *service.properties*
22
23
# *json.url.mom*            - Provided by POS
24
# *json.key*                - Provided by POS
25
# *aes.key*                 - Provided by POS
26
# *connection.timeout*      - Set connection timeout
27
# *connection.read.timeout* - Set connection red timeout
28 2 Soh Keong
29 7 Soh Keong
h2. flow chart
30
31
!cancelFlow.jpg!
32
33 2 Soh Keong
h2. Methods
34
35
h3. Common Instance
36
37
<pre>
38
com.bv.ws.service.MomService service = new com.bv.ws.service.MomService();
39
</pre>
40
41 10 Soh Keong
h3. getMomBeanByOrderId / getCancelMomByOrderId / getRegistrationBeanByOrderId / getCancelRegistrationBeanByOrderId / getRenewalBeanByOrderId / getCancelRenewalBeanByOrderId
42 3 Soh Keong
43
<pre>
44 1 Soh Keong
com.bv.ws.model.MomBean momBean = service.getMomBeanByOrderId(Connection connStore, String orderId);
45 10 Soh Keong
com.bv.ws.model.MomBean momBean = service.getCancelMomByOrderId(Connection connUsa, Connection connStore, String orderId);
46
com.bv.ws.model.MomBean momBean = service.getRegistrationBeanByOrderId(Connection conn, String orderId)
47
com.bv.ws.model.MomBean momBean = service.getCancelRegistrationBeanByOrderId(Connection conn, String orderId)
48
com.bv.ws.model.MomBean momBean = service.getRenewalBeanByOrderId (Connection conn, String orderId)
49
com.bv.ws.model.MomBean momBean = service.getCancelRenewalBeanByOrderId(Connection conn, String orderId)
50 8 Soh Keong
</pre>
51
52
"com.bv.ws.model.MomBean":/redmine/projects/aces/wiki/Specification#Common-Bean-MomBean
53
54 12 Soh Keong
h3. addOrder
55 8 Soh Keong
56 12 Soh Keong
<pre>
57
com.bv.ws.model.ResultBean addOrder(MomBean bean)
58
</pre>
59 4 Soh Keong
60 12 Soh Keong
"com.bv.ws.model.MomBean":/redmine/projects/aces/wiki/Specification#Common-Bean-MomBean
61
62
* *com.bv.ws.model.ResultBean*
63
> * *errCode*          - String
64
> * *errMessage*       - String
65
66
67 4 Soh Keong
h3. checkShippingStatus
68
69 1 Soh Keong
<pre>
70 12 Soh Keong
com.bv.ws.model.QueryResultBean resutlBean = service.checkShippingStatus(QueryOrderBean bean)
71 4 Soh Keong
</pre>
72
73
* *com.bv.ws.model.QueryOrderBean *
74 1 Soh Keong
> * *orderId*        - String
75
> * *countryCode*    - String
76
77
* *com.bv.ws.model.QueryResultBean*
78
> * *errCode*          - String
79
> * *errMessage*       - String
80 5 Soh Keong
> * *invoiceStatus*    - String ("return" = good had return : empty = yet return)
81 4 Soh Keong
> * *shipped*          - boolean
82
83 6 Soh Keong
h3. updateCancelRequestBeforeApproval / cancelCancelRequest
84 4 Soh Keong
85 5 Soh Keong
<pre>
86 1 Soh Keong
com.bv.ws.model.ResultBean resultBean = service.updateCancelRequestBeforeApproval(UpdateOrderBean bean)
87 6 Soh Keong
com.bv.ws.model.ResultBean resultBean = service.cancelCancelRequest(UpdateOrderBean bean)
88
com.bv.ws.model.ResultBean resultBean = service.updateCancelRequestAfterApproval(UpdateOrderBean bean)
89 7 Soh Keong
com.bv.ws.model.ResultBean resultBean = service.updateCancelStatus(UpdateOrderBean bean)
90 5 Soh Keong
</pre>
91
92
* *com.bv.ws.model.UpdateOrderBean*
93
> * *orderId*          - String
94
> * *countryCode*      - String
95 13 Soh Keong
> * *stockistCode*     - com.bv.ws.constant.CommonConstant.STOCKIST_CODE_ONLINE
96 1 Soh Keong
> * *orderList*        - String
97 5 Soh Keong
>> * *orderId*         - String
98 6 Soh Keong
>> * *cancelRequest*   - String (NO NEED to set value, auto fixed by calling difference method) 
99
NOTE: R=Before Approval; Y=After Approval; 
100 8 Soh Keong
>> * *orderStatus*     -String (default to 'cancel') 
101 1 Soh Keong
102 6 Soh Keong
* *com.bv.ws.model.ResultBean*
103
> * *errCode*          - String
104
> * *errMessage*       - String
105 5 Soh Keong
106 6 Soh Keong
107 4 Soh Keong
h3. getShippingCountryByOrderId
108
109 1 Soh Keong
<pre>
110
String shippingCountry = service.getShippingCountryByOrderId(Connection connStore, String orderId);
111
</pre>
112 6 Soh Keong
113
114 9 Soh Keong
h3. Common Bean - MomBean
115 4 Soh Keong
116 3 Soh Keong
* *com.bv.ws.model.MomBean*
117
> * *orderId*          - String
118
> * *countryCode*      - String
119
> * *deliveryAddress*  - String
120
> * *memberIc*         - String
121
> * *telNo*            - String
122
> * *receiverName*     - String
123
> * *stockistCode*     - String
124
> * *orderDate*        - Date
125
> * *memberId*         - String
126
> * *invoiceAmount*    - double
127
> * *processDate*      - Date
128
> * *collectorName*    - String
129
> * *collectorIc*      - String
130
> * *collectorContact* - String
131
> * *deliveryType*     - String
132
> * *pickupStore*      - String
133
> * *approvalCode*     - String
134
> * *freightCharges*   - double
135
> * *purchaserName*    - String
136
> * *ewalletAdminFee*  - double
137
> * *currency*         - String
138
> * *originalOrdNo*    - String
139
> * *onlineMall*       - String
140
> * *warehouse*        - String
141
> * *lossFee*          - double
142
> * *productList*       
143
>> * *setId*           - String
144
>> * *productId*       - String
145
>> * *productType*     - String
146
>> * *quantity*        - int
147
>> * *setSold*         - int
148
>> * *productPrice*    - double
149
>> * *deductStock*     - String
150
>> * *childPrice*      - double
151
>> * *childTotalPrice* - double