Subversion Repositories SmartDukaan

Rev

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

Rev 31860 Rev 33872
Line 10... Line 10...
10
		@NamedQuery(name = "CustomerOffer.getOfferItemsByBrand", query = "select new com.spice.profitmandi.service.pricecircular.PriceCircularItemModel("
10
		@NamedQuery(name = "CustomerOffer.getOfferItemsByBrand", query = "select new com.spice.profitmandi.service.pricecircular.PriceCircularItemModel("
11
				+ " i.id, i.catalogItemId, cast(sum(coi.schemePayout - coi.dealerPayout) as long))"
11
				+ " i.id, i.catalogItemId, cast(sum(coi.schemePayout - coi.dealerPayout) as long))"
12
				+ " from CustomerOfferItem coi join Item i on coi.catalogId = i.catalogItemId"
12
				+ " from CustomerOfferItem coi join Item i on coi.catalogId = i.catalogItemId"
13
				+ " join CustomerOffer co on co.id=coi.customerOfferId where "
13
				+ " join CustomerOffer co on co.id=coi.customerOfferId where "
14
				+ " :date between coi.startDate and coi.endDate and "
14
				+ " :date between coi.startDate and coi.endDate and "
15
				+ " :dateTime between co.startDate and co.endDate" + " and i.brand in :brands  group by i.id"),})
15
				+ " :dateTime between co.startDate and co.endDate" + " and i.brand in :brands  group by i.id"),
-
 
16
 
-
 
17
		@NamedQuery(name = "CustomerOffer.getMaxOfferItemsByBrand", query = "select new com.spice.profitmandi.service.pricecircular.PriceCircularItemModel("
-
 
18
				+ " i.id, i.catalogItemId, cast(max(coi.schemePayout) as long))"
-
 
19
				+ " from CustomerOfferItem coi join Item i on coi.catalogId = i.catalogItemId"
-
 
20
				+ " join CustomerOffer co on co.id=coi.customerOfferId where "
-
 
21
				+ " :date between coi.startDate and coi.endDate and "
-
 
22
				+ " :dateTime between co.startDate and co.endDate" + " and i.brand in :brands  group by i.id"),
-
 
23
})
16
public class CustomerOffer {
24
public class CustomerOffer {
17
 
25
 
18
	@Id
26
	@Id
19
	@GeneratedValue(strategy = GenerationType.IDENTITY)
27
	@GeneratedValue(strategy = GenerationType.IDENTITY)
20
	private int id;
28
	private int id;