浏览代码

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

eganwu 1 年之前
父节点
当前提交
14b21136a9
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      src/custom/restcontroller/webmanage/saletool/fad/FadGoods.java

+ 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();
     }