|
@@ -120,13 +120,13 @@ class Pledge extends Api
|
|
|
*/
|
|
*/
|
|
|
public function collect(PledgeLogic $pledgeLogic)
|
|
public function collect(PledgeLogic $pledgeLogic)
|
|
|
{
|
|
{
|
|
|
- //if(cache('collect_'.$this->auth->id)) $this->error(__("正在挖矿中,请稍后再试"));
|
|
|
|
|
|
|
+ if(cache('collect_'.$this->auth->id)) $this->error(__("正在挖矿中,请稍后再试"));
|
|
|
Db::startTrans();
|
|
Db::startTrans();
|
|
|
try {
|
|
try {
|
|
|
// 质抵押订单
|
|
// 质抵押订单
|
|
|
$res = $pledgeLogic::getPledgeCollect($this->auth->id);
|
|
$res = $pledgeLogic::getPledgeCollect($this->auth->id);
|
|
|
//请求限制
|
|
//请求限制
|
|
|
- // cache('collect_'.$this->auth->id, time(), 300);
|
|
|
|
|
|
|
+ cache('collect_'.$this->auth->id, time(), 300);
|
|
|
// 提交事务
|
|
// 提交事务
|
|
|
Db::commit();
|
|
Db::commit();
|
|
|
} catch (Exception $e) {
|
|
} catch (Exception $e) {
|