Subversion Repositories SmartDukaan

Rev

Rev 4160 | Rev 4377 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4160 Rev 4277
Line 7... Line 7...
7
import in.shop2020.crm.TicketCategory;
7
import in.shop2020.crm.TicketCategory;
8
import in.shop2020.crm.TicketPriority;
8
import in.shop2020.crm.TicketPriority;
9
import in.shop2020.crm.TicketStatus;
9
import in.shop2020.crm.TicketStatus;
10
import in.shop2020.model.v1.order.LineItem;
10
import in.shop2020.model.v1.order.LineItem;
11
import in.shop2020.model.v1.order.Order;
11
import in.shop2020.model.v1.order.Order;
-
 
12
import in.shop2020.model.v1.order.TransactionServiceException;
12
import in.shop2020.model.v1.user.User;
13
import in.shop2020.model.v1.user.User;
13
import in.shop2020.model.v1.user.UserCommunicationException;
14
import in.shop2020.model.v1.user.UserCommunicationException;
14
import in.shop2020.model.v1.user.UserCommunicationType;
15
import in.shop2020.model.v1.user.UserCommunicationType;
15
import in.shop2020.model.v1.user.UserContextException;
16
import in.shop2020.model.v1.user.UserContextException;
16
import in.shop2020.model.v1.user.UserContextService;
17
import in.shop2020.model.v1.user.UserContextService;
Line 133... Line 134...
133
 
134
 
134
            if (userClient.saveUserCommunication(userId, email,
135
            if (userClient.saveUserCommunication(userId, email,
135
                    communicationType, orderId, awb, product, subject, message)) {
136
                    communicationType, orderId, awb, product, subject, message)) {
136
                log.info("User Communication saved successfully!");
137
                log.info("User Communication saved successfully!");
137
            }
138
            }
-
 
139
            
-
 
140
            /*
-
 
141
             * We need to change status for the given order to
-
 
142
             * CANCELLATION_REQUEST_RECIEVED
-
 
143
             */
-
 
144
            if(communicationType == 2) {
-
 
145
            in.shop2020.model.v1.order.TransactionService.Client transactionClient = 
-
 
146
                                                    (new TransactionClient()).getClient();
-
 
147
            transactionClient.markOrderCancellationRequestReceived(orderId);
-
 
148
            }
138
 
149
            
139
            // We need to have tickets for all data communication!
150
            // We need to have tickets for all data communication!
140
            log.info("Creating ticket!");
151
            log.info("Creating ticket!");
141
            Client crmServiceClient = new CRMClient().getClient();
152
            Client crmServiceClient = new CRMClient().getClient();
142
            Ticket ticket = new Ticket();
153
            Ticket ticket = new Ticket();
143
            ticket.setAirwayBillNo(awb);
154
            ticket.setAirwayBillNo(awb);
Line 188... Line 199...
188
            log.error("Unable to get communication type or order id: ", e);
199
            log.error("Unable to get communication type or order id: ", e);
189
        } catch (TException e) {
200
        } catch (TException e) {
190
            log.error("Thrift exception: ", e);
201
            log.error("Thrift exception: ", e);
191
        } catch (UserContextException e) {
202
        } catch (UserContextException e) {
192
            log.error("Thrift exception: ", e);
203
            log.error("Thrift exception: ", e);
-
 
204
        } catch (TransactionServiceException e) {
-
 
205
            log.error("Unable to mark cancellation request recieved", e);
193
        }
206
        }
194
        return "success";
207
        return "success";
195
    }
208
    }
196
 
209
 
197
    public String getId() {
210
    public String getId() {