Commit 96923ecf authored by jianghaiming's avatar jianghaiming

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

parents 2451479b 57af3f71
......@@ -41,5 +41,6 @@ class GoodsException extends BaseException
27 => 'TCC调用失败',
28 => '上架状态不能编辑,需先下架,再做编辑操作',
29 => '发布商品的生活号不存在',
30 => '当前商品已过期',
];
}
\ No newline at end of file
......@@ -355,6 +355,9 @@ class GoodsService
if ($sku["audit_status"] == GoodsSku::STATUS_PASS || $sku["audit_status"] == GoodsSku::STATUS_REJECT) {
throw new GoodsException(["cus" => 10]);
}
if ($status == GoodsSku::STATUS_PASS && $sku["expiration_time"] < date("Y-m-d H:i:s")) {
throw new GoodsException(["cus" => 30]);
}
$goodsSkuId = $sku["goods_sku_id"];
$rejectedReason = strlen(trim($params["rejected_reason"])) == 0 ? "" : $params["rejected_reason"];
......@@ -1354,20 +1357,18 @@ class GoodsService
$strList = explode(",", $picUrlStr);
foreach ($strList as $key => $str) {
$arr = explode("/", $str);
if (count($arr) == 1) {
if (preg_match("/^http[s]{0,1}:\/\/([\w.]+\/?)\S*/", $str)) {
$data[] = $str;
if (preg_match("/^http[s]{0,1}:\/\/([\w.]+\/?)\S*/", $str)) {
$data[] = $str;
} else if (count($arr) == 1) {
if (!empty($widthSize) && !empty($highSize)) {
$urlRes = Ks3Api::picEncryptUrl($str, $widthSize, $highSize);
} else {
if (!empty($widthSize) && !empty($highSize)) {
$urlRes = Ks3Api::picEncryptUrl($str, $widthSize, $highSize);
} else {
$urlRes = Ks3Api::picEncryptUrl($str);
}
if (!empty($urlRes["response"]["data"]["url"]) && $urlRes["response"]["data"]["url"]) {
$data[] = $urlRes["response"]["data"]["url"];
} else {
continue;
}
$urlRes = Ks3Api::picEncryptUrl($str);
}
if (!empty($urlRes["response"]["data"]["url"]) && $urlRes["response"]["data"]["url"]) {
$data[] = $urlRes["response"]["data"]["url"];
} else {
continue;
}
} else {
$bucket = $arr[0];
......
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