|
|
|
@ -19,7 +19,7 @@ class PurchaseLimitService implements PurchaseLimitServiceInterface |
|
|
|
{ |
|
|
|
//获取ssdb购买记录
|
|
|
|
$ssdb = ApplicationContext::getContainer()->get(SSDBTask::class); |
|
|
|
$record_exists = $ssdb->exec('hexists',SsdbKeysPrefix::PURCHASE_LIMIT. date('Ymd') .'_'.$params['user_id'], $params['good_id']); |
|
|
|
$record_exists = $ssdb->exec('hexists',SsdbKeysPrefix::PURCHASE_RECORD. date('Ymd') .'_'.$params['user_id'], $params['good_id']); |
|
|
|
if($record_exists) |
|
|
|
{ |
|
|
|
$error = [ |
|
|
|
@ -209,6 +209,12 @@ class PurchaseLimitService implements PurchaseLimitServiceInterface |
|
|
|
|
|
|
|
public function test($params) |
|
|
|
{ |
|
|
|
return $params; |
|
|
|
$ssdb = ApplicationContext::getContainer()->get(SSDBTask::class); |
|
|
|
//添加领取记录到ssdb
|
|
|
|
$data = [ |
|
|
|
'620',1561, |
|
|
|
]; |
|
|
|
$test = $ssdb->exec('multi_hset', SsdbKeysPrefix::PURCHASE_RECORD. date('Ymd') .'_620', $data); |
|
|
|
return $test; |
|
|
|
} |
|
|
|
} |