Subversion Repositories SmartDukaan

Rev

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

Rev 34334 Rev 34431
Line 17... Line 17...
17
		@NamedQuery(name = "CustomerOffer.getMaxOfferItemsByBrand", query = "select new com.spice.profitmandi.service.pricecircular.PriceCircularItemModel("
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),coi.offerType)"
18
				+ " i.id, i.catalogItemId, cast(max(coi.schemePayout) as long),coi.offerType)"
19
				+ " from CustomerOfferItem coi join Item i on coi.catalogId = i.catalogItemId"
19
				+ " from CustomerOfferItem coi join Item i on coi.catalogId = i.catalogItemId"
20
				+ " join CustomerOffer co on co.id=coi.customerOfferId where "
20
				+ " join CustomerOffer co on co.id=coi.customerOfferId where "
21
				+ " :date between coi.startDate and coi.endDate and "
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"),
22
				+ " :dateTime between co.startDate and co.endDate" + " and i.brand in :brands  group by i.catalogItemId,coi.offerType"),
23
})
23
})
24
public class CustomerOffer {
24
public class CustomerOffer {
25
 
25
 
26
	@Id
26
	@Id
27
	@GeneratedValue(strategy = GenerationType.IDENTITY)
27
	@GeneratedValue(strategy = GenerationType.IDENTITY)