| Line 124... |
Line 124... |
| 124 |
long sku;
|
124 |
long sku;
|
| 125 |
String subOrderId;
|
125 |
String subOrderId;
|
| 126 |
for(Order order:orders.getOrder()){
|
126 |
for(Order order:orders.getOrder()){
|
| 127 |
subOrderId = order.getSuborderId();
|
127 |
subOrderId = order.getSuborderId();
|
| 128 |
Client transaction_client = null;
|
128 |
Client transaction_client = null;
|
| 129 |
new_orders++;
|
- |
|
| 130 |
boolean flag = false;
|
129 |
boolean flag = false;
|
| 131 |
try {
|
130 |
try {
|
| 132 |
transaction_client = new TransactionClient().getClient();
|
131 |
transaction_client = new TransactionClient().getClient();
|
| 133 |
} catch (TTransportException e2) {
|
132 |
} catch (TTransportException e2) {
|
| 134 |
try {
|
133 |
try {
|
| Line 159... |
Line 158... |
| 159 |
if(flag) {
|
158 |
if(flag) {
|
| 160 |
logger.error("Snapdeal suborder id exists " + subOrderId);
|
159 |
logger.error("Snapdeal suborder id exists " + subOrderId);
|
| 161 |
duplicate_orders++;
|
160 |
duplicate_orders++;
|
| 162 |
continue;
|
161 |
continue;
|
| 163 |
}
|
162 |
}
|
| 164 |
|
- |
|
| - |
|
163 |
new_orders++;
|
| 165 |
Transaction txn = new Transaction();
|
164 |
Transaction txn = new Transaction();
|
| 166 |
txn.setShoppingCartid(user.getActiveCartId());
|
165 |
txn.setShoppingCartid(user.getActiveCartId());
|
| 167 |
txn.setCustomer_id(user.getUserId());
|
166 |
txn.setCustomer_id(user.getUserId());
|
| 168 |
System.out.println("User Id is " + user.getUserId());
|
167 |
System.out.println("User Id is " + user.getUserId());
|
| 169 |
txn.setCreatedOn(new Date().getTime());
|
168 |
txn.setCreatedOn(new Date().getTime());
|
| Line 507... |
Line 506... |
| 507 |
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
|
506 |
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
|
| 508 |
Calendar cal=GregorianCalendar.getInstance();
|
507 |
Calendar cal=GregorianCalendar.getInstance();
|
| 509 |
String emailFromAddress = "build@shop2020.in";
|
508 |
String emailFromAddress = "build@shop2020.in";
|
| 510 |
String password = "cafe@nes";
|
509 |
String password = "cafe@nes";
|
| 511 |
GmailUtils mailer = new GmailUtils();
|
510 |
GmailUtils mailer = new GmailUtils();
|
| 512 |
//String sendTo[] = new String[]{"vikram.raghav@shop2020.in"};
|
511 |
String sendTo[] = new String[]{"vikram.raghav@shop2020.in"};
|
| 513 |
String sendTo[] = new String[]{ "sandeep.sachdeva@shop2020.in", "vikram.raghav@shop2020.in", "rajneesh.arora@shop2020.in",
|
512 |
/*String sendTo[] = new String[]{ "sandeep.sachdeva@shop2020.in", "vikram.raghav@shop2020.in", "rajneesh.arora@shop2020.in",
|
| 514 |
"khushal.bhatia@shop2020.in","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com",
|
513 |
"khushal.bhatia@shop2020.in","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com",
|
| 515 |
"yukti.jain@shop2020.in","manisha.sharma@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in"};
|
514 |
"yukti.jain@shop2020.in","manisha.sharma@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in"};
|
| 516 |
|
515 |
*/
|
| 517 |
try {
|
516 |
try {
|
| 518 |
if(new_orders==processed_orders && new_orders > 0){
|
517 |
if(new_orders==processed_orders && new_orders > 0){
|
| 519 |
String emailSubjectTxt = "Snapdeal Orders Created Successfully "+sdf.format(cal.getTime());
|
518 |
String emailSubjectTxt = "Snapdeal Orders Created Successfully "+sdf.format(cal.getTime());
|
| 520 |
String text = "Total Orders Received : " + ( new_orders + duplicate_orders ) + "\n" +
|
519 |
String text = "Total Orders Received : " + ( new_orders + duplicate_orders ) + "\n" +
|
| 521 |
"Orders Already Existing : " + duplicate_orders + "\n" +
|
520 |
"Orders Already Existing : " + duplicate_orders + "\n" +
|