| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.dao.entity.catalog;
|
1 |
package com.spice.profitmandi.dao.entity.catalog;
|
| 2 |
|
2 |
|
| 3 |
import java.io.Serializable;
|
- |
|
| 4 |
|
- |
|
| 5 |
import javax.persistence.Column;
|
- |
|
| 6 |
import javax.persistence.Entity;
|
- |
|
| 7 |
import javax.persistence.EnumType;
|
- |
|
| 8 |
import javax.persistence.Enumerated;
|
- |
|
| 9 |
import javax.persistence.GeneratedValue;
|
- |
|
| 10 |
import javax.persistence.GenerationType;
|
- |
|
| 11 |
import javax.persistence.Id;
|
- |
|
| 12 |
import javax.persistence.NamedQueries;
|
- |
|
| 13 |
import javax.persistence.NamedQuery;
|
- |
|
| 14 |
import javax.persistence.Table;
|
- |
|
| 15 |
|
- |
|
| 16 |
import com.spice.profitmandi.common.enumuration.ItemType;
|
3 |
import com.spice.profitmandi.common.enumuration.ItemType;
|
| 17 |
|
- |
|
| 18 |
import in.shop2020.model.v1.catalog.status;
|
4 |
import in.shop2020.model.v1.catalog.status;
|
| 19 |
|
5 |
|
| - |
|
6 |
import javax.persistence.*;
|
| - |
|
7 |
import java.io.Serializable;
|
| - |
|
8 |
|
| 20 |
/**
|
9 |
/**
|
| 21 |
* This class basically contains item details
|
10 |
* This class basically contains item details
|
| 22 |
*
|
- |
|
| 23 |
* @author ashikali
|
- |
|
| 24 |
*
|
11 |
*
|
| - |
|
12 |
* @author ashikali
|
| 25 |
*/
|
13 |
*/
|
| 26 |
|
14 |
|
| 27 |
@NamedQueries({
|
15 |
@NamedQueries({
|
| 28 |
@NamedQuery(name = "Item.selectItemByLikes", query = "select new com.spice.profitmandi.common.model.CustomItemModel("
|
16 |
@NamedQuery(name = "Item.selectItemByLikes", query = "select new com.spice.profitmandi.common.model.CustomItemModel("
|
| 29 |
+ " i.id, i.brand, i.modelName, i.modelNumber, i.color"
|
17 |
+ " i.id, i.brand, i.modelName, i.modelNumber, i.color"
|
| 30 |
+ " ) from Item i join CurrentInventorySnapshot cis on i.id = cis.itemId "
|
18 |
+ " ) from Item i join CurrentInventorySnapshot cis on i.id = cis.itemId "
|
| 31 |
+ " where cis.fofoId = :fofoId and cis.availability > 0 and REPLACE(CONCAT(i.brand,' ', ifnull(i.modelName, ' '), ' ', ifnull(i.modelNumber, ' ')), ' ', ' ') like CONCAT('%',:query,'%')") })
|
19 |
+ " where cis.fofoId = :fofoId and cis.availability > 0 and REPLACE(CONCAT(i.brand,' ', ifnull(i.modelName, ' '), ' ', ifnull(i.modelNumber, ' ')), ' ', ' ') like CONCAT('%',:query,'%')"),
|
| - |
|
20 |
|
| - |
|
21 |
@NamedQuery(name = "Item.selectCatalogIdByMopRange", query = "select i.catalogItemId"
|
| - |
|
22 |
+ " from Item i join TagListing tl on tl.itemId = i.id "
|
| - |
|
23 |
+ " where tl.mop between :startPrice and :endPrice and i.categoryId=10006 group by i.catalogItemId"),
|
| - |
|
24 |
})
|
| 32 |
@Entity
|
25 |
@Entity
|
| 33 |
@Table(name = "catalog.item", schema = "catalog")
|
26 |
@Table(name = "catalog.item", schema = "catalog")
|
| 34 |
public class Item implements Serializable {
|
27 |
public class Item implements Serializable {
|
| 35 |
|
28 |
|
| 36 |
private static final long serialVersionUID = 1L;
|
29 |
private static final long serialVersionUID = 1L;
|