Browse Source

去掉mq和cartnum

master
weigang 5 years ago
parent
commit
3efbcc50f3
  1. 6
      app/Amqp/Consumer/DevicOrderConsumer.php
  2. 6
      app/Amqp/Consumer/couponRebateConsumer.php
  3. 5
      app/Model/v3/Goods.php
  4. 5
      app/Model/v3/GoodsActivity.php

6
app/Amqp/Consumer/DevicOrderConsumer.php

@ -14,9 +14,9 @@ use Hyperf\DbConnection\Db;
use PhpAmqpLib\Message\AMQPMessage; use PhpAmqpLib\Message\AMQPMessage;
use Hyperf\Di\Annotation\Inject; use Hyperf\Di\Annotation\Inject;
/**
* @Consumer(exchange="devicOrder", routingKey="devicOrder", queue="devicOrder", nums=4)
*/
// /**
// * @Consumer(exchange="devicOrder", routingKey="devicOrder", queue="devicOrder", nums=4)
// */
class DevicOrderConsumer extends ConsumerMessage class DevicOrderConsumer extends ConsumerMessage
{ {
/** /**

6
app/Amqp/Consumer/couponRebateConsumer.php

@ -15,9 +15,9 @@ use App\Service\CouponRebateServiceInterface;
use Hyperf\Di\Annotation\Inject; use Hyperf\Di\Annotation\Inject;
/**
* @Consumer(exchange="deviceCouponRebate", routingKey="deviceCouponRebate", queue="deviceCouponRebate", name ="couponRebateConsumer", nums=1)
*/
// /**
// * @Consumer(exchange="deviceCouponRebate", routingKey="deviceCouponRebate", queue="deviceCouponRebate", name ="couponRebateConsumer", nums=1)
// */
class couponRebateConsumer extends ConsumerMessage class couponRebateConsumer extends ConsumerMessage
{ {
/** /**

5
app/Model/v3/Goods.php

@ -101,8 +101,9 @@ class Goods extends Model
public function getCartNumAttribute() public function getCartNumAttribute()
{ {
$userId = $this->request->user->id ?? 0;
return $userId ? (integer)$this->shopCartService->check($userId, $this->id,1) : 0;
return 0;
// $userId = $this->request->user->id ?? 0;
// return $userId ? (integer)$this->shopCartService->check($userId, $this->id,1) : 0;
} }
public function getIsEffectiveAttribute() public function getIsEffectiveAttribute()

5
app/Model/v3/GoodsActivity.php

@ -69,8 +69,9 @@ class GoodsActivity extends Model
public function getCartNumAttribute() public function getCartNumAttribute()
{ {
$userId = $this->request->user->id ?? 0;
return $userId ? (integer)$this->shopCartService->check($userId, $this->id,1) : 0;
return 0;
// $userId = $this->request->user->id ?? 0;
// return $userId ? (integer)$this->shopCartService->check($userId, $this->id,1) : 0;
} }
public function getIsEffectiveAttribute() public function getIsEffectiveAttribute()

Loading…
Cancel
Save