Subversion Repositories SmartDukaan

Rev

Rev 31860 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31860 Rev 33873
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;
3
import java.io.Serializable;
4
import java.time.LocalDateTime;
4
import java.time.LocalDateTime;
5
 
5
 
6
import javax.persistence.Column;
-
 
7
import javax.persistence.Entity;
-
 
8
import javax.persistence.GeneratedValue;
-
 
9
import javax.persistence.GenerationType;
-
 
10
import javax.persistence.Id;
6
import javax.persistence.*;
11
import javax.persistence.Table;
-
 
12
 
7
 
13
@Entity
8
@Entity
14
@Table(name = "catalog.focused_model")
9
@Table(name = "catalog.focused_model")
-
 
10
@NamedQueries({@NamedQuery(name = "Focused.soldFocusItemByPartner",
-
 
11
		  query = "select new com.spice.profitmandi.dao.model.SoldFocusedItemPartnerWiseModel" +
-
 
12
				"(foi.itemId, fm.catalogId, fm.obsRecommendedQty, fm.regionId, odr.createTimestamp) " +
-
 
13
				" FROM FofoOrder odr " +
-
 
14
				" JOIN FofoOrderItem foi on foi.orderId = odr.id " +
-
 
15
				" JOIN Item ci on ci.id = foi.itemId " +
-
 
16
				" JOIN FocusedModel fm on fm.catalogId = ci.catalogItemId " +
-
 
17
			    " JOIN PartnerRegion ptr on ptr.fofoId = (:fofoId) " +
-
 
18
				" WHERE odr.fofoId = (:fofoId) and odr.createTimestamp > (:orderDate) " +
-
 
19
				" and (fm.regionId = 5 OR fm.regionId = ptr.regionId) " +
-
 
20
				" and fm.obsRecommendedQty > 0")
-
 
21
 
-
 
22
})
15
public class FocusedModel implements Serializable {
23
public class FocusedModel implements Serializable {
16
 
24
 
17
	private static final long serialVersionUID = 1L;
25
	private static final long serialVersionUID = 1L;
18
 
26
 
19
	@Id
27
	@Id