Subversion Repositories SmartDukaan

Rev

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

Rev 22013 Rev 22420
Line 36... Line 36...
36
	@NamedQuery(name = "Transaction.selectIdsByRetailerId", query = "select t.id from Transaction t where t.retailerId = :retailerId and t.status != 0 order by t.id desc"),
36
	@NamedQuery(name = "Transaction.selectIdsByRetailerId", query = "select t.id from Transaction t where t.retailerId = :retailerId and t.status != 0 order by t.id desc"),
37
	@NamedQuery(
37
	@NamedQuery(
38
			name = "Transaction.selectByIds", 
38
			name = "Transaction.selectByIds", 
39
			query = "select t.id, t.createTimestamp, o.retailerAddress1, o.retailerAddress2, o.retailerCity, "
39
			query = "select t.id, t.createTimestamp, o.retailerAddress1, o.retailerAddress2, o.retailerCity, "
40
					+ "o.retailerPinCode, o.retailerState, o.shippingCost, o.statusDescription, o.invoiceNumber, o.airwayBillNumber, o.totalAmount, li.brand, li.modelName, "
40
					+ "o.retailerPinCode, o.retailerState, o.shippingCost, o.statusDescription, o.invoiceNumber, o.airwayBillNumber, o.totalAmount, li.brand, li.modelName, "
41
					+ "li.modelNumber, li.color, li.quantity, li.unitPrice, p.id, p.name, o.shippingTimestamp, o.status, o.promisedDeliveryTime, o.retailerName, t.status  from Transaction t join Order o on o.transactionId = t.id "
41
					+ "li.modelNumber, li.color, li.quantity, li.unitPrice, p.id, p.name, o.shippingTimestamp, o.status, o.promisedDeliveryTime, o.retailerName, t.status, i.catalogItemId  from Transaction t join Order o on o.transactionId = t.id "
42
					+ "join LineItem li on li.orderId = o.id left join Provider p on p.id = o.logisticsProviderId where t.id in :ids order by t.id desc")
42
					+ "join LineItem li on li.orderId = o.id left join Provider p on p.id = o.logisticsProviderId join Item i on i.id = li.itemId where t.id in :ids order by t.id desc")
43
	})
43
	})
44
 
44
 
45
public class Transaction implements Serializable{
45
public class Transaction implements Serializable{
46
	
46
	
47
	private static final long serialVersionUID = 1L;
47
	private static final long serialVersionUID = 1L;