调整活动商品限购
This commit is contained in:
parent
fe119cf1a1
commit
4c09bdee16
@ -143,6 +143,10 @@ class StoreActivityDao extends BaseDao
|
|||||||
{
|
{
|
||||||
$orderProductIds = array_column($order->orderProduct->toArray(), 'product_id');
|
$orderProductIds = array_column($order->orderProduct->toArray(), 'product_id');
|
||||||
$productIds = CloudProduct::whereIn('product_id', $orderProductIds)->where('activity_id', $activityId)->column('product_id');
|
$productIds = CloudProduct::whereIn('product_id', $orderProductIds)->where('activity_id', $activityId)->column('product_id');
|
||||||
|
$find = StoreActivityOrderProduct::where('user_id', $order['uid'])->where('status', 1)->find();
|
||||||
|
if ($find && $activityId == 2) {
|
||||||
|
throw new ValidateException('活动商品限购1个');
|
||||||
|
}
|
||||||
foreach ($productIds as $productId) {
|
foreach ($productIds as $productId) {
|
||||||
$model = new StoreActivityOrderProduct();
|
$model = new StoreActivityOrderProduct();
|
||||||
$model->user_id = $order['uid'];
|
$model->user_id = $order['uid'];
|
||||||
|
@ -20,10 +20,10 @@ class Open extends BaseController
|
|||||||
{
|
{
|
||||||
$timestamp = $this->request->post('timestamp');
|
$timestamp = $this->request->post('timestamp');
|
||||||
$data = $this->request->post('data');
|
$data = $this->request->post('data');
|
||||||
Log::error('供销平台佣金回调:' . $data);
|
|
||||||
$aes = new \AES();
|
$aes = new \AES();
|
||||||
$iv = !empty($timestamp) ? $aes->buildIv($timestamp) : '';
|
$iv = !empty($timestamp) ? $aes->buildIv($timestamp) : '';
|
||||||
$decrypted = $aes->decrypt($data, $iv);
|
$decrypted = $aes->decrypt($data, $iv);
|
||||||
|
Log::error('供销平台佣金回调:' . var_export($decrypted, true));
|
||||||
if (!empty($decrypted)) {
|
if (!empty($decrypted)) {
|
||||||
$storeConsumptionUserDao = new CommissionDao();
|
$storeConsumptionUserDao = new CommissionDao();
|
||||||
// "惠农供销,谱写数字新篇章"活动首单分润
|
// "惠农供销,谱写数字新篇章"活动首单分润
|
||||||
|
Loading…
x
Reference in New Issue
Block a user