Ver Fonte

商品详情接口数据新增官方指导信息

eganwu há 1 ano atrás
pai
commit
14b21136a9

+ 11 - 0
src/custom/restcontroller/webmanage/saletool/fad/FadGoods.java

@@ -171,6 +171,17 @@ public class FadGoods extends Controller {
         detailRow.putIfAbsent("tag", StringUtils.join(tags, ","));
         detailRow.putIfAbsent("classnames", StringUtils.join(detailRow.getJSONArray("class"), ","));
 
+        //查询官方信息:价格。。。
+        Long parentid = detailRow.getLong("parentid");
+        if (parentid == 0) {
+            parentid = sa_fadid;
+        }
+        Rows officalrows = dbConnect.runSqlQuery("SELECT sa_fadid,price,price_store,price_rebate,price_deposit,price_original from sa_fad WHERE siteid='" + siteid + "' and sa_fadid=" + parentid);
+        Row officalrow = officalrows.isNotEmpty() ? officalrows.get(0) : new Row();
+        ArrayList<String> officaltags = DataTag.queryTag(this, "sa_fad", parentid, true);
+        officalrow.putIfAbsent("tag", StringUtils.join(officaltags, ","));
+        detailRow.put("officialinfo", officalrow);
+
 
         return getSucReturnObject().setData(detailRow).toString();
     }