Commit 4da4048d authored by jianghaiming's avatar jianghaiming

Merge branch 'jielong' of https://gitlab.yidian-inc.com/bp/goods into jielong

parents f8c087c7 be0999e0
...@@ -17,4 +17,12 @@ class Ota extends MysqlBase ...@@ -17,4 +17,12 @@ class Ota extends MysqlBase
const STATUS_NORMAL = 0; // 正常 const STATUS_NORMAL = 0; // 正常
const STATUS_DELETE = 1; // 删除 const STATUS_DELETE = 1; // 删除
public static function getRecord($where, $columns = [])
{
if (empty($columns)) {
$columns = '*';
}
return self::get($columns, $where);
}
} }
...@@ -88,6 +88,13 @@ class MarketingPindanGoodsService ...@@ -88,6 +88,13 @@ class MarketingPindanGoodsService
$ksyun = GoodsService::getUrlList($sku["desc_pic_url"]); $ksyun = GoodsService::getUrlList($sku["desc_pic_url"]);
$data["goods_info"]["desc_pic_url_list"] = $ksyun; $data["goods_info"]["desc_pic_url_list"] = $ksyun;
} }
$data["goods_info"]["ota_name"] = "";
if (!empty($sku["ota_id"])) {
$ota = Ota::getRecord(["ota_id" => $sku["ota_id"]], ["ota_name"]);
if (!empty($ota)) {
$data["goods_info"]["ota_name"] = $ota["ota_name"];
}
}
} }
return $data; return $data;
} }
...@@ -392,7 +399,7 @@ class MarketingPindanGoodsService ...@@ -392,7 +399,7 @@ class MarketingPindanGoodsService
$count = PindanGoodsSku::count("*", $where); $count = PindanGoodsSku::count("*", $where);
if (!empty($list)) { if (!empty($list)) {
foreach ($list as $key => $item) { foreach ($list as $key => $item) {
$list[$key]["original_price"] = $item["original_price"] / 100; $list[$key]["original_price"] = (int)$item["original_price"] / 100;
$list[$key]["price"] = $item["price"] / 100; $list[$key]["price"] = $item["price"] / 100;
if (!empty($otaData) && !empty($otaData[$item["ota_id"]])) { if (!empty($otaData) && !empty($otaData[$item["ota_id"]])) {
$list[$key]["ota_name"] = $otaData[$item["ota_id"]]["ota_name"]; $list[$key]["ota_name"] = $otaData[$item["ota_id"]]["ota_name"];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment