Hibernate中用left join(左外連線)查詢對映中沒有關聯關係的兩個表記錄問題
阿新 • • 發佈:2019-01-06
public class SplitSummary extends PubBean { // 結算賬單開始日期 private String startDate = ""; // 結算賬單結束日期 private String endDate = ""; // 店鋪編號 private String storeId = ""; // 訂單總金額 private double orderTotalPrice = 0.00; // 商品總價 private double productTotalPrice = 0.00; // 店鋪分賬金額 private double storeFzPrice = 0.00; // 平臺分賬金額 private double shopFzPrice = 0.00; // 狀態 private String status = ""; // 建立時間 private String createDate = ""; // 備註 private String note = ""; /** * nativeSQL查詢時返回欄位的型別 * @return */ public static Map<String, Type> getTypeMap() { Map<String, Type> map = new LinkedHashMap<String, Type>(); map.put("uuid", Hibernate.STRING); map.put("store_id", Hibernate.STRING); map.put("store_name", Hibernate.STRING); map.put("SHOP_FZ_PRICE", Hibernate.DOUBLE); map.put("STORE_FZ_PRICE", Hibernate.DOUBLE); map.put("ORDER_TOTAL_PRICE", Hibernate.DOUBLE); map.put("PRODUCT_TOTAL_PRICE", Hibernate.DOUBLE); map.put("status", Hibernate.STRING); map.put("STAR_TDATE", Hibernate.STRING); map.put("END_DATE", Hibernate.STRING); map.put("note", Hibernate.STRING); return map; } public String getStartDate() { return startDate; } public void setStartDate(String startDate) { this.startDate = startDate; } public String getEndDate() { return endDate; } public void setEndDate(String endDate) { this.endDate = endDate; } public String getStoreId() { return storeId; } public void setStoreId(String storeId) { this.storeId = storeId; } public double getOrderTotalPrice() { return orderTotalPrice; } public void setOrderTotalPrice(double orderTotalPrice) { this.orderTotalPrice = orderTotalPrice; } public double getProductTotalPrice() { return productTotalPrice; } public void setProductTotalPrice(double productTotalPrice) { this.productTotalPrice = productTotalPrice; } public double getStoreFzPrice() { return storeFzPrice; } public void setStoreFzPrice(double storeFzPrice) { this.storeFzPrice = storeFzPrice; } public double getShopFzPrice() { return shopFzPrice; } public void setShopFzPrice(double shopFzPrice) { this.shopFzPrice = shopFzPrice; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getCreateDate() { return createDate; } public void setCreateDate(String createDate) { this.createDate = createDate; } public String getNote() { return note; } public void setNote(String note) { this.note = note; } }