Project

General

Profile

Specification » History » Version 14

Soh Keong, 10/26/2020 10:31 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 14 Soh Keong
h3. getDeliveryAddressByOrderId
108
109
<pre>
110
com.bv.ws.model.MomShippingAddressBean addressBean = service.getDeliveryAddressByOrderId(Connection conn, String orderId) 
111
</pre>
112
113
"com.bv.ws.model.MomShippingAddressBean ":/redmine/projects/aces/wiki/Specification#Common-Bean-MomShippingAddressBean
114
115
116
h3. updateDeliveryAddress
117
118
<pre>
119
com.bv.ws.model.ResultBean resultBean =  service.updateDeliveryAddress(MomShippingAddressBean bean)
120
</pre>
121
122
"com.bv.ws.model.MomShippingAddressBean ":/redmine/projects/aces/wiki/Specification#Common-Bean-MomShippingAddressBean
123
124
* *com.bv.ws.model.ResultBean*
125
> * *errCode*          - String
126
> * *errMessage*       - String
127
128
129 4 Soh Keong
h3. getShippingCountryByOrderId
130
131 1 Soh Keong
<pre>
132
String shippingCountry = service.getShippingCountryByOrderId(Connection connStore, String orderId);
133
</pre>
134 6 Soh Keong
135
136 9 Soh Keong
h3. Common Bean - MomBean
137 4 Soh Keong
138 3 Soh Keong
* *com.bv.ws.model.MomBean*
139
> * *orderId*          - String
140
> * *countryCode*      - String
141
> * *deliveryAddress*  - String
142
> * *memberIc*         - String
143
> * *telNo*            - String
144
> * *receiverName*     - String
145
> * *stockistCode*     - String
146
> * *orderDate*        - Date
147
> * *memberId*         - String
148
> * *invoiceAmount*    - double
149
> * *processDate*      - Date
150
> * *collectorName*    - String
151
> * *collectorIc*      - String
152
> * *collectorContact* - String
153
> * *deliveryType*     - String
154
> * *pickupStore*      - String
155
> * *approvalCode*     - String
156
> * *freightCharges*   - double
157
> * *purchaserName*    - String
158
> * *ewalletAdminFee*  - double
159
> * *currency*         - String
160
> * *originalOrdNo*    - String
161
> * *onlineMall*       - String
162
> * *warehouse*        - String
163
> * *lossFee*          - double
164
> * *productList*       
165
>> * *setId*           - String
166
>> * *productId*       - String
167
>> * *productType*     - String
168
>> * *quantity*        - int
169
>> * *setSold*         - int
170
>> * *productPrice*    - double
171
>> * *deductStock*     - String
172
>> * *childPrice*      - double
173
>> * *childTotalPrice* - double
174 14 Soh Keong
175
176
h3. Common Bean - MomShippingAddressBean
177
178
* *com.bv.ws.model.MomShippingAddressBean*
179
> * *orderId*          - String
180
> * *countryCode*      - String
181
> * *deliveryAddress*  - String
182
> * *memberIc*         - String
183
> * *telNo*            - String
184
> * *receiverName*     - String