|
|
@@ -176,7 +176,9 @@ public class ItemPrice extends BaseClass {
|
|
|
|
|
|
public BigDecimal getPromotionPrice(long sa_promotionid) throws YosException {
|
|
|
|
|
|
- Rows rows = dbConnect.runSqlQuery("SELECT price from sa_promotion_itemprice WHERE sa_promotionid = " + sa_promotionid + " and siteid='" + controller.siteid + "' and itemid='" + itemid + "'");
|
|
|
+
|
|
|
+
|
|
|
+ Rows rows = dbConnect.runSqlQuery("SELECT price FROM sa_promotion_itemprice t1 INNER JOIN sys_enterprise t2 ON t1.pricegrade=t2.grade AND t1.siteid=t2.siteid WHERE t1.sa_promotionid = " + sa_promotionid + " and t1.siteid='" + controller.siteid + "' and t1.itemid='" + itemid + "' and t2.sys_enterpriseid="+sys_enterpriseid);
|
|
|
if (rows.isNotEmpty()) {
|
|
|
return rows.get(0).getBigDecimal("price");
|
|
|
}
|