Project

General

Profile

Specification » History » Version 15

Soh Keong, 10/26/2020 10:35 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 15 Soh Keong
"com.bv.ws.model.ResultBean":/redmine/projects/aces/wiki/Specification#Common-Bean-ResultBean
62 12 Soh Keong
63
64 4 Soh Keong
h3. checkShippingStatus
65
66 1 Soh Keong
<pre>
67 12 Soh Keong
com.bv.ws.model.QueryResultBean resutlBean = service.checkShippingStatus(QueryOrderBean bean)
68 4 Soh Keong
</pre>
69
70
* *com.bv.ws.model.QueryOrderBean *
71 1 Soh Keong
> * *orderId*        - String
72
> * *countryCode*    - String
73
74
* *com.bv.ws.model.QueryResultBean*
75
> * *errCode*          - String
76
> * *errMessage*       - String
77 5 Soh Keong
> * *invoiceStatus*    - String ("return" = good had return : empty = yet return)
78 4 Soh Keong
> * *shipped*          - boolean
79
80 6 Soh Keong
h3. updateCancelRequestBeforeApproval / cancelCancelRequest
81 4 Soh Keong
82 5 Soh Keong
<pre>
83 1 Soh Keong
com.bv.ws.model.ResultBean resultBean = service.updateCancelRequestBeforeApproval(UpdateOrderBean bean)
84 6 Soh Keong
com.bv.ws.model.ResultBean resultBean = service.cancelCancelRequest(UpdateOrderBean bean)
85
com.bv.ws.model.ResultBean resultBean = service.updateCancelRequestAfterApproval(UpdateOrderBean bean)
86 7 Soh Keong
com.bv.ws.model.ResultBean resultBean = service.updateCancelStatus(UpdateOrderBean bean)
87 5 Soh Keong
</pre>
88
89
* *com.bv.ws.model.UpdateOrderBean*
90
> * *orderId*          - String
91
> * *countryCode*      - String
92 13 Soh Keong
> * *stockistCode*     - com.bv.ws.constant.CommonConstant.STOCKIST_CODE_ONLINE
93 1 Soh Keong
> * *orderList*        - String
94 5 Soh Keong
>> * *orderId*         - String
95 1 Soh Keong
>> * *cancelRequest*   - String (NO NEED to set value, auto fixed by calling difference method) 
96 6 Soh Keong
NOTE: R=Before Approval; Y=After Approval; 
97
>> * *orderStatus*     -String (default to 'cancel') 
98
99 15 Soh Keong
"com.bv.ws.model.ResultBean":/redmine/projects/aces/wiki/Specification#Common-Bean-ResultBean
100 5 Soh Keong
101 6 Soh Keong
102 14 Soh Keong
h3. getDeliveryAddressByOrderId
103
104
<pre>
105
com.bv.ws.model.MomShippingAddressBean addressBean = service.getDeliveryAddressByOrderId(Connection conn, String orderId) 
106
</pre>
107
108
"com.bv.ws.model.MomShippingAddressBean ":/redmine/projects/aces/wiki/Specification#Common-Bean-MomShippingAddressBean
109
110
111 1 Soh Keong
h3. updateDeliveryAddress
112 14 Soh Keong
113
<pre>
114
com.bv.ws.model.ResultBean resultBean =  service.updateDeliveryAddress(MomShippingAddressBean bean)
115
</pre>
116
117
"com.bv.ws.model.MomShippingAddressBean ":/redmine/projects/aces/wiki/Specification#Common-Bean-MomShippingAddressBean
118 15 Soh Keong
"com.bv.ws.model.ResultBean":/redmine/projects/aces/wiki/Specification#Common-Bean-ResultBean
119 14 Soh Keong
120
121 4 Soh Keong
h3. getShippingCountryByOrderId
122
123 1 Soh Keong
<pre>
124
String shippingCountry = service.getShippingCountryByOrderId(Connection connStore, String orderId);
125
</pre>
126 6 Soh Keong
127
128 9 Soh Keong
h3. Common Bean - MomBean
129 4 Soh Keong
130 3 Soh Keong
* *com.bv.ws.model.MomBean*
131
> * *orderId*          - String
132
> * *countryCode*      - String
133
> * *deliveryAddress*  - String
134
> * *memberIc*         - String
135
> * *telNo*            - String
136
> * *receiverName*     - String
137
> * *stockistCode*     - String
138
> * *orderDate*        - Date
139
> * *memberId*         - String
140
> * *invoiceAmount*    - double
141
> * *processDate*      - Date
142
> * *collectorName*    - String
143
> * *collectorIc*      - String
144
> * *collectorContact* - String
145
> * *deliveryType*     - String
146
> * *pickupStore*      - String
147
> * *approvalCode*     - String
148
> * *freightCharges*   - double
149
> * *purchaserName*    - String
150
> * *ewalletAdminFee*  - double
151
> * *currency*         - String
152
> * *originalOrdNo*    - String
153
> * *onlineMall*       - String
154
> * *warehouse*        - String
155
> * *lossFee*          - double
156
> * *productList*       
157
>> * *setId*           - String
158
>> * *productId*       - String
159
>> * *productType*     - String
160
>> * *quantity*        - int
161
>> * *setSold*         - int
162
>> * *productPrice*    - double
163
>> * *deductStock*     - String
164
>> * *childPrice*      - double
165
>> * *childTotalPrice* - double
166 1 Soh Keong
167
168
h3. Common Bean - MomShippingAddressBean
169
170
* *com.bv.ws.model.MomShippingAddressBean*
171
> * *orderId*          - String
172
> * *countryCode*      - String
173 14 Soh Keong
> * *deliveryAddress*  - String
174
> * *memberIc*         - String
175
> * *telNo*            - String
176
> * *receiverName*     - String
177 15 Soh Keong
178
179
h3. Common Bean - ResultBean
180
181
* *com.bv.ws.model.ResultBean*
182
> * *errCode*          - String
183
> * *errMessage*       - String