Commit bae1c94b authored by jianghaiming's avatar jianghaiming

update:修改

parent f56a963d
......@@ -42,6 +42,7 @@ use App\Exception\custom\InterfaceException;
class GoodsService
{
const CHARGEFEE = 0.006;
const CLEARPRICEMAX = 2000;
/**
* 通过发号器拿 id (非雪花)
* number,获取店铺shop_id用生活号id后两位,商品相关的这里是shop_id的后两位
......@@ -916,7 +917,7 @@ class GoodsService
*/
private static function checkClearPrice($goodsSkuId, $skuParams)
{
$clearPrice = $skuParams["clear_price"];
$clearPrice = !empty($skuParams["clear_price"]) ? $skuParams["clear_price"] + self::CLEARPRICEMAX : 0;
$price = $skuParams["price"];
$chargeFee = !empty($price) ? (float)bcmul($price , self::CHARGEFEE,2) : 0; //手续费 (分)
if ($chargeFee<1) {
......
......@@ -30,6 +30,7 @@ class MarketingService
const ONLINE_LIFE_ACCOUNT_ID = "19019625839230981";
const ONLINE_LIFE_ACCOUNT_ID_TEST = "17963416161910792";
const CHARGEFEE = 0.006;
const CLEARPRICEMAX = 2000; //
/**
* 写死的自营生活号
* @return string
......@@ -550,7 +551,7 @@ class MarketingService
$goodCount = !empty($goodsSkuId) ? count($goodsSkuId) : 0;
$goodsSkuList = GoodsSku::select('*', ['goods_sku_id' => $goodsSkuId]);
foreach ($goodsSkuList as $key => $value) {
$clearPrice = !empty($value["clear_price"]) ? $value["clear_price"] : 0;
$clearPrice = !empty($value["clear_price"]) ? $value["clear_price"]+self::CLEARPRICEMAX : 0;
$price = !empty($value["price"]) ? $value["price"] : 0;
$chargeFee = !empty($price) ? (float)bcmul($price , self::CHARGEFEE,2) : 0; //手续费 (分)
if ($chargeFee < 1) {
......
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