Project

General

Profile

Specification » History » Version 21

Soh Keong, 04/01/2021 12:18 PM

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 20 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 17 Soh Keong
h3. Taiwan
32
33 18 Soh Keong
!cancelFlow_TW.jpg!
34 1 Soh Keong
35 18 Soh Keong
h3. Hong Kong
36 1 Soh Keong
37 18 Soh Keong
!cancelFlow_HK.jpg!
38 7 Soh Keong
39 2 Soh Keong
h2. Methods
40
41
h3. Common Instance
42
43
<pre>
44
com.bv.ws.service.MomService service = new com.bv.ws.service.MomService();
45
</pre>
46
47 10 Soh Keong
h3. getMomBeanByOrderId / getCancelMomByOrderId / getRegistrationBeanByOrderId / getCancelRegistrationBeanByOrderId / getRenewalBeanByOrderId / getCancelRenewalBeanByOrderId
48 3 Soh Keong
49
<pre>
50 1 Soh Keong
com.bv.ws.model.MomBean momBean = service.getMomBeanByOrderId(Connection connStore, String orderId);
51 10 Soh Keong
com.bv.ws.model.MomBean momBean = service.getCancelMomByOrderId(Connection connUsa, Connection connStore, String orderId);
52
com.bv.ws.model.MomBean momBean = service.getRegistrationBeanByOrderId(Connection conn, String orderId)
53
com.bv.ws.model.MomBean momBean = service.getCancelRegistrationBeanByOrderId(Connection conn, String orderId)
54
com.bv.ws.model.MomBean momBean = service.getRenewalBeanByOrderId (Connection conn, String orderId)
55
com.bv.ws.model.MomBean momBean = service.getCancelRenewalBeanByOrderId(Connection conn, String orderId)
56 8 Soh Keong
</pre>
57
58
"com.bv.ws.model.MomBean":/redmine/projects/aces/wiki/Specification#Common-Bean-MomBean
59
60 21 Soh Keong
h3. addOrder (UpdateOrder)
61 8 Soh Keong
62 12 Soh Keong
<pre>
63 16 Soh Keong
com.bv.ws.model.ResultBean resultBean = service.addOrder(MomBean bean)
64 12 Soh Keong
</pre>
65 4 Soh Keong
66 12 Soh Keong
"com.bv.ws.model.MomBean":/redmine/projects/aces/wiki/Specification#Common-Bean-MomBean
67 15 Soh Keong
"com.bv.ws.model.ResultBean":/redmine/projects/aces/wiki/Specification#Common-Bean-ResultBean
68 12 Soh Keong
69
70 21 Soh Keong
h3. checkShippingStatus (QueryOrderbyNo)
71 4 Soh Keong
72 1 Soh Keong
<pre>
73 12 Soh Keong
com.bv.ws.model.QueryResultBean resutlBean = service.checkShippingStatus(QueryOrderBean bean)
74 4 Soh Keong
</pre>
75
76
* *com.bv.ws.model.QueryOrderBean *
77 1 Soh Keong
> * *orderId*        - String
78
> * *countryCode*    - String
79
80
* *com.bv.ws.model.QueryResultBean*
81
> * *errCode*          - String
82
> * *errMessage*       - String
83 5 Soh Keong
> * *invoiceStatus*    - String ("return" = good had return : empty = yet return)
84 4 Soh Keong
> * *shipped*          - boolean
85
86 21 Soh Keong
h3. updateCancelRequestBeforeApproval / cancelCancelRequest / updateCancelRequestAfterApproval / updateCancelStatus (ProcessOrder)
87 4 Soh Keong
88 5 Soh Keong
<pre>
89 1 Soh Keong
com.bv.ws.model.ResultBean resultBean = service.updateCancelRequestBeforeApproval(UpdateOrderBean bean)
90 6 Soh Keong
com.bv.ws.model.ResultBean resultBean = service.cancelCancelRequest(UpdateOrderBean bean)
91
com.bv.ws.model.ResultBean resultBean = service.updateCancelRequestAfterApproval(UpdateOrderBean bean)
92 7 Soh Keong
com.bv.ws.model.ResultBean resultBean = service.updateCancelStatus(UpdateOrderBean bean)
93 5 Soh Keong
</pre>
94
95
* *com.bv.ws.model.UpdateOrderBean*
96
> * *orderId*          - String
97
> * *countryCode*      - String
98 13 Soh Keong
> * *stockistCode*     - com.bv.ws.constant.CommonConstant.STOCKIST_CODE_ONLINE
99 1 Soh Keong
> * *orderList*        - String
100 5 Soh Keong
>> * *orderId*         - String
101 1 Soh Keong
>> * *cancelRequest*   - String (NO NEED to set value, auto fixed by calling difference method) 
102 6 Soh Keong
NOTE: R=Before Approval; Y=After Approval; 
103
>> * *orderStatus*     -String (default to 'cancel') 
104
105 15 Soh Keong
"com.bv.ws.model.ResultBean":/redmine/projects/aces/wiki/Specification#Common-Bean-ResultBean
106 5 Soh Keong
107 6 Soh Keong
108 14 Soh Keong
h3. getDeliveryAddressByOrderId
109
110
<pre>
111
com.bv.ws.model.MomShippingAddressBean addressBean = service.getDeliveryAddressByOrderId(Connection conn, String orderId) 
112
</pre>
113
114
"com.bv.ws.model.MomShippingAddressBean ":/redmine/projects/aces/wiki/Specification#Common-Bean-MomShippingAddressBean
115
116
117 21 Soh Keong
h3. updateDeliveryAddress (ModifyOrder)
118 14 Soh Keong
119
<pre>
120
com.bv.ws.model.ResultBean resultBean =  service.updateDeliveryAddress(MomShippingAddressBean bean)
121
</pre>
122
123
"com.bv.ws.model.MomShippingAddressBean ":/redmine/projects/aces/wiki/Specification#Common-Bean-MomShippingAddressBean
124 15 Soh Keong
"com.bv.ws.model.ResultBean":/redmine/projects/aces/wiki/Specification#Common-Bean-ResultBean
125 14 Soh Keong
126
127 4 Soh Keong
h3. getShippingCountryByOrderId
128
129 1 Soh Keong
<pre>
130
String shippingCountry = service.getShippingCountryByOrderId(Connection connStore, String orderId);
131
</pre>
132 6 Soh Keong
133
134 9 Soh Keong
h3. Common Bean - MomBean
135 4 Soh Keong
136 3 Soh Keong
* *com.bv.ws.model.MomBean*
137
> * *orderId*          - String
138
> * *countryCode*      - String
139
> * *deliveryAddress*  - String
140
> * *memberIc*         - String
141
> * *telNo*            - String
142
> * *receiverName*     - String
143
> * *stockistCode*     - String
144
> * *orderDate*        - Date
145
> * *memberId*         - String
146
> * *invoiceAmount*    - double
147
> * *processDate*      - Date
148
> * *collectorName*    - String
149
> * *collectorIc*      - String
150
> * *collectorContact* - String
151
> * *deliveryType*     - String
152
> * *pickupStore*      - String
153
> * *approvalCode*     - String
154
> * *freightCharges*   - double
155
> * *purchaserName*    - String
156
> * *ewalletAdminFee*  - double
157
> * *currency*         - String
158
> * *originalOrdNo*    - String
159
> * *onlineMall*       - String
160
> * *warehouse*        - String
161
> * *lossFee*          - double
162
> * *productList*       
163
>> * *setId*           - String
164
>> * *productId*       - String
165
>> * *productType*     - String
166
>> * *quantity*        - int
167
>> * *setSold*         - int
168
>> * *productPrice*    - double
169
>> * *deductStock*     - String
170
>> * *childPrice*      - double
171
>> * *childTotalPrice* - double
172 1 Soh Keong
173
174
h3. Common Bean - MomShippingAddressBean
175
176
* *com.bv.ws.model.MomShippingAddressBean*
177
> * *orderId*          - String
178
> * *countryCode*      - String
179 14 Soh Keong
> * *deliveryAddress*  - String
180
> * *memberIc*         - String
181
> * *telNo*            - String
182
> * *receiverName*     - String
183 15 Soh Keong
184
185
h3. Common Bean - ResultBean
186
187
* *com.bv.ws.model.ResultBean*
188
> * *errCode*          - String
189
> * *errMessage*       - String