| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.common.util;
|
1 |
package com.spice.profitmandi.common.util;
|
| 2 |
|
2 |
|
| 3 |
import com.google.gson.Gson;
|
3 |
import com.google.gson.Gson;
|
| 4 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
4 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 5 |
import com.spice.profitmandi.common.web.client.RestClient;
|
5 |
import com.spice.profitmandi.common.web.client.RestClient;
|
| 6 |
import com.spice.profitmandi.thrift.clients.CatalogClient;
|
- |
|
| 7 |
import com.spice.profitmandi.thrift.clients.InventoryClient;
|
6 |
import com.spice.profitmandi.thrift.clients.InventoryClient;
|
| 8 |
import com.spice.profitmandi.thrift.clients.TransactionClient;
|
- |
|
| 9 |
import com.spice.profitmandi.thrift.clients.WarehouseClient;
|
7 |
import com.spice.profitmandi.thrift.clients.WarehouseClient;
|
| 10 |
import in.shop2020.model.v1.catalog.CatalogService;
|
- |
|
| 11 |
import in.shop2020.model.v1.inventory.InventoryService;
|
8 |
import in.shop2020.model.v1.inventory.InventoryService;
|
| 12 |
import in.shop2020.model.v1.inventory.StateInfo;
|
9 |
import in.shop2020.model.v1.inventory.StateInfo;
|
| 13 |
import in.shop2020.model.v1.inventory.Warehouse;
|
10 |
import in.shop2020.model.v1.inventory.Warehouse;
|
| 14 |
import in.shop2020.model.v1.order.OrderStatusGroups;
|
11 |
import in.shop2020.model.v1.order.OrderStatusGroups;
|
| 15 |
import in.shop2020.model.v1.order.RechargeOrderStatus;
|
12 |
import in.shop2020.model.v1.order.RechargeOrderStatus;
|
| 16 |
import in.shop2020.model.v1.order.RechargePlan;
|
13 |
import in.shop2020.model.v1.order.RechargePlan;
|
| 17 |
import in.shop2020.model.v1.order.WarehouseAddress;
|
- |
|
| 18 |
import in.shop2020.warehouse.InventoryItem;
|
14 |
import in.shop2020.warehouse.InventoryItem;
|
| 19 |
import in.shop2020.warehouse.WarehouseService;
|
15 |
import in.shop2020.warehouse.WarehouseService;
|
| 20 |
import org.apache.commons.io.FileUtils;
|
16 |
import org.apache.commons.io.FileUtils;
|
| 21 |
import org.apache.commons.lang3.StringEscapeUtils;
|
17 |
import org.apache.commons.lang3.StringEscapeUtils;
|
| 22 |
import org.apache.logging.log4j.LogManager;
|
18 |
import org.apache.logging.log4j.LogManager;
|
| Line 310... |
Line 306... |
| 310 |
|
306 |
|
| 311 |
public static String getIconUrl(int entityId, String host, int port, String webapp) {
|
307 |
public static String getIconUrl(int entityId, String host, int port, String webapp) {
|
| 312 |
return "";
|
308 |
return "";
|
| 313 |
}
|
309 |
}
|
| 314 |
|
310 |
|
| 315 |
private static CatalogService.Client getCatalogClient() throws Exception {
|
- |
|
| 316 |
try {
|
- |
|
| 317 |
CatalogClient client = new CatalogClient();
|
- |
|
| 318 |
CatalogService.Client catalogClient = client.getClient();
|
- |
|
| 319 |
return catalogClient;
|
- |
|
| 320 |
} catch (Exception e) {
|
- |
|
| 321 |
throw e;
|
- |
|
| 322 |
}
|
- |
|
| 323 |
}
|
- |
|
| 324 |
|
311 |
|
| 325 |
private static WarehouseService.Client getWarehouseClient() throws Exception {
|
312 |
private static WarehouseService.Client getWarehouseClient() throws Exception {
|
| 326 |
try {
|
313 |
try {
|
| 327 |
WarehouseClient client = new WarehouseClient();
|
314 |
WarehouseClient client = new WarehouseClient();
|
| 328 |
WarehouseService.Client warehouseClient = client.getClient();
|
315 |
WarehouseService.Client warehouseClient = client.getClient();
|
| Line 409... |
Line 396... |
| 409 |
|
396 |
|
| 410 |
public static void main(String[] args) throws Exception {
|
397 |
public static void main(String[] args) throws Exception {
|
| 411 |
Utils.sendSms("Hello", "9990381569");
|
398 |
Utils.sendSms("Hello", "9990381569");
|
| 412 |
}
|
399 |
}
|
| 413 |
|
400 |
|
| 414 |
public static WarehouseAddress getWarehouseByWarehouseId(int warehouseAddressId) throws Exception {
|
- |
|
| 415 |
TransactionClient tcl = new TransactionClient();
|
- |
|
| 416 |
return tcl.getClient().getWarehouseAddress((long) warehouseAddressId);
|
- |
|
| 417 |
}
|
- |
|
| 418 |
|
- |
|
| 419 |
public static void sendEmbeddedHtmlMail(JavaMailSender mailSender, String[] emailTo, String[] cc, String subject,
|
401 |
public static void sendEmbeddedHtmlMail(JavaMailSender mailSender, String[] emailTo, String[] cc, String subject,
|
| 420 |
String body, Map<? extends Serializable, File> map) throws Exception {
|
402 |
String body, Map<? extends Serializable, File> map) throws Exception {
|
| 421 |
MimeMessage message = mailSender.createMimeMessage();
|
403 |
MimeMessage message = mailSender.createMimeMessage();
|
| 422 |
MimeMessageHelper helper = new MimeMessageHelper(message, true);
|
404 |
MimeMessageHelper helper = new MimeMessageHelper(message, true);
|
| 423 |
helper.setSubject(subject);
|
405 |
helper.setSubject(subject);
|