|
@@ -183,7 +183,7 @@ public class promotion extends Controller {
|
|
|
return getSucReturnObject().toString();
|
|
|
}
|
|
|
|
|
|
- @API(title = "查询所有 促销方案商品列表", apiversion = R.ID2024052710185203.v1.class)
|
|
|
+ @API(title = "查询所有促销方案商品列表", apiversion = R.ID2024052710185203.v1.class)
|
|
|
@CACHEING
|
|
|
public String queryItemList() throws YosException {
|
|
|
StringBuffer where = new StringBuffer(" 1=1 ");
|
|
@@ -253,14 +253,11 @@ public class promotion extends Controller {
|
|
|
|
|
|
}
|
|
|
|
|
|
- QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sa_promotion_items");
|
|
|
- querySQL.addJoinTable(BaseClass.JOINTYPE.inner, "plm_item", "t1", "t1.itemid=t2.itemid and t1.siteid=t2.siteid ",
|
|
|
- "sys_datafunctionid");
|
|
|
- querySQL.addJoinTable(BaseClass.JOINTYPE.inner, "sa_promotion", "t3", "t2.sa_promotionid=t3.sa_promotionid and t2.siteid=t3.siteid ",
|
|
|
- "promnum");
|
|
|
+ QuerySQL querySQL = SQLFactory.createQuerySQL(this, "plm_item");
|
|
|
+ querySQL.addJoinTable(BaseClass.JOINTYPE.inner, "(select DISTINCT t1.itemid,t1.siteid from sa_promotion_items t1 inner join sa_promotion t2 on t1.sa_promotionid=t2.sa_promotionid and t1.siteid=t2.siteid)", "t2", "t1.itemid=t2.itemid and t1.siteid=t2.siteid ");
|
|
|
querySQL.setWhere(where);
|
|
|
querySQL.setWhere("t1.siteid", siteid);
|
|
|
- querySQL.setTableAlias("t2");
|
|
|
+ querySQL.setTableAlias("t1");
|
|
|
querySQL.setPage(pageSize, pageNumber);
|
|
|
Rows rows = querySQL.query();
|
|
|
return getSucReturnObject().setData(rows).toString();
|