更新
This commit is contained in:
parent
18bac6ba1b
commit
29360e5153
@ -313,13 +313,13 @@ class ProductRepository extends BaseRepository
|
||||
$res = $this->dao->get($id);
|
||||
$data['svip_price_type'] = $res['svip_price_type'];
|
||||
$settleParams = $this->setAttrValue($data, $id, 0, 1,$merId);
|
||||
$settleParams['cate'] = $this->setMerCate($data['mer_cate_id'], $id, $merId);
|
||||
// $settleParams['cate'] = $this->setMerCate($data['mer_cate_id'], $id, $merId);
|
||||
// $settleParams['attr'] = $this->setAttr($data['attr'], $id);
|
||||
$data['price'] = $settleParams['data']['price'];
|
||||
unset($data['attrValue'],$data['attr'],$data['mer_cate_id']);
|
||||
$ret = Spu::getInstance()->where('product_id', $id)->whereIn('product_type',[0, 98, 99])->find();
|
||||
Db::transaction(function () use ($id, $data, $settleParams,$ret) {
|
||||
$this->save($id, $settleParams, null, [], 0);
|
||||
$this->save($id, $settleParams, null, [], 0,false);
|
||||
app()->make(SpuRepository::class)->update($ret->spu_id,['price' => $data['price']]);
|
||||
Queue(SendSmsJob::class, ['tempId' => 'PRODUCT_INCREASE', 'id' => $id]);
|
||||
});
|
||||
@ -349,11 +349,13 @@ class ProductRepository extends BaseRepository
|
||||
* @param $content
|
||||
* @return int
|
||||
*/
|
||||
public function save($id, $settleParams, $content, $data = [], $productType = 0)
|
||||
public function save($id, $settleParams, $content, $data = [], $productType = 0,$is_phone=true)
|
||||
{
|
||||
(app()->make(ProductAttrRepository::class))->clearAttr($id);
|
||||
(app()->make(ProductAttrValueRepository::class))->clearAttr($id);
|
||||
(app()->make(ProductCateRepository::class))->clearAttr($id);
|
||||
if($is_phone==true){
|
||||
(app()->make(ProductAttrRepository::class))->clearAttr($id);
|
||||
(app()->make(ProductAttrValueRepository::class))->clearAttr($id);
|
||||
(app()->make(ProductCateRepository::class))->clearAttr($id);
|
||||
}
|
||||
if (isset($settleParams['cate'])) (app()->make(ProductCateRepository::class)->insert($settleParams['cate']));
|
||||
if (isset($settleParams['attr'])) (app()->make(ProductAttrRepository::class))->insert($settleParams['attr']);
|
||||
|
||||
@ -378,7 +380,7 @@ class ProductRepository extends BaseRepository
|
||||
$res = $this->dao->update($id, $data);
|
||||
|
||||
if(isset($data['status']) && $data['status'] !== 1 ){
|
||||
$message = '您有1个新的'. ($productType ? '秒杀商品' : ($data['is_gift_bag'] ? '礼包商品' :'商品')) . '待审核';
|
||||
$message = '您有1个新的'. $productType .'商品待审核';//? '秒杀商品' : ($data['is_gift_bag'] ? '礼包商品' :'商品')) .
|
||||
$type = $productType ? 'new_seckill' : ($data['is_gift_bag'] ? 'new_bag' :'new_product');
|
||||
SwooleTaskService::admin('notice', [
|
||||
'type' => $type,
|
||||
|
@ -93,7 +93,7 @@ class MerchantIntention extends BaseController
|
||||
'street' => $data['street_id'] ?? '',
|
||||
'address' => $data['address'] ?? '',
|
||||
'mer_intention_id' => $intention->mer_intention_id,
|
||||
'type_id'=>$data['mer_type_id']
|
||||
'type_id'=>$data['mer_type_id']??''
|
||||
];
|
||||
$postUrl = env('TASK_WORKER_HOST_URL') . '/adminapi/company/createShopMerchant';
|
||||
$res = $this->sendMerIntentionApply($sendData, $postUrl);
|
||||
|
Loading…
x
Reference in New Issue
Block a user