Commit 3a12a297 authored by luhongguang's avatar luhongguang

Merge branch 'test'

parents 1b9dd0d7 4fad3f94
...@@ -42,5 +42,7 @@ class GoodsException extends BaseException ...@@ -42,5 +42,7 @@ class GoodsException extends BaseException
28 => '上架状态不能编辑,需先下架,再做编辑操作', 28 => '上架状态不能编辑,需先下架,再做编辑操作',
29 => '发布商品的生活号不存在', 29 => '发布商品的生活号不存在',
30 => '当前商品已过期', 30 => '当前商品已过期',
31 => '当前商品锁定库存不足',
32 => '当前商品已下单数量不足',
]; ];
} }
\ No newline at end of file
...@@ -233,7 +233,7 @@ class ElasticGoodService ...@@ -233,7 +233,7 @@ class ElasticGoodService
]; ];
//gte 是大于等于; gt是大于; lte是小于等于; lt是小于 //gte 是大于等于; gt是大于; lte是小于等于; lt是小于
$data["query"]["bool"]["filter"][]["range"] = ["inventory_rest" => [["gt" => 0]]]; $data["query"]["bool"]["filter"][]["range"] = ["inventory_rest" => [["gt" => 0]]];
$data["query"]["bool"]["filter"][]["range"] = ["price" => [["gt" => 0]]];
if (!empty($searchContent) || (!empty($subjectName) && $subjectName != "本周上新")) { if (!empty($searchContent) || (!empty($subjectName) && $subjectName != "本周上新")) {
$multiMatch = [["multi_match" => [ $multiMatch = [["multi_match" => [
"query" => $searchContent.$subjectName, "query" => $searchContent.$subjectName,
......
...@@ -108,6 +108,10 @@ class DistributorService ...@@ -108,6 +108,10 @@ class DistributorService
$userId = $shareUserId; $userId = $shareUserId;
} }
if (!empty($userId)) {
throw new DistributorException(['cus'=>14]);
}
if (!empty($info)) { if (!empty($info)) {
throw new DistributorException(['cus'=>2]); throw new DistributorException(['cus'=>2]);
} }
......
...@@ -109,6 +109,8 @@ class MarketingGoodsService ...@@ -109,6 +109,8 @@ class MarketingGoodsService
}else{ }else{
$list[$i]['is_self_publish'] = 1; $list[$i]['is_self_publish'] = 1;
} }
//允许自己买自己的
$list[$i]['is_self_publish'] = 1;
$life_account_id = !empty($list[$i]['life_account_id']) ? $list[$i]['life_account_id'] : ''; $life_account_id = !empty($list[$i]['life_account_id']) ? $list[$i]['life_account_id'] : '';
...@@ -135,12 +137,12 @@ class MarketingGoodsService ...@@ -135,12 +137,12 @@ class MarketingGoodsService
//比例 //比例
if (!empty($secondCommission) && $commissionMode == 1) { if (!empty($secondCommission) && $commissionMode == 1) {
$price = !empty($list[$i]['price']) ? $list[$i]['price'] : 0; $price = !empty($list[$i]['price']) ? $list[$i]['price'] : 0;
$list[$i]['share_price'] = sprintf("%.2f",$secondCommission*$price/100); $list[$i]['share_price'] = substr(sprintf("%.4f",$secondCommission*$price/100),0,-2);
} }
//固定 //固定
if (!empty($commissionMode) && $commissionMode == 2) { if (!empty($commissionMode) && $commissionMode == 2) {
$list[$i]['share_price'] = sprintf("%.2f",$secondCommission/100); $list[$i]['share_price'] = substr(sprintf("%.4f",$secondCommission/100),0,-2);
} }
$content = $userId .'_' .$value['marketing_id']; $content = $userId .'_' .$value['marketing_id'];
......
This diff is collapsed.
...@@ -28,4 +28,23 @@ class Goods implements DaemonServiceInterface ...@@ -28,4 +28,23 @@ class Goods implements DaemonServiceInterface
GoodsSku::save($colums, $where); GoodsSku::save($colums, $where);
} }
} }
public function stock()
{
$orderData = [
'inventory_rest' => 0,
'LIMIT' => 100,
];
$goodsList = GoodsSku::getRecords($orderData);
DaemonLog::info('DaemonServiceInterface_goods', json_encode($goodsList));
foreach ($goodsList as $key => $value) {
$where = [];
$where['goods_sku_id'] = !empty($value['goods_sku_id']) ? $value['goods_sku_id'] : '';
$colums = [
'online_status' => 2,
];
GoodsSku::save($colums, $where);
}
}
} }
\ No newline at end of file
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