Project

General

Profile

Specification » History » Version 17

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