1
This commit is contained in:
parent
4d054b561b
commit
7ad3a54f6c
@ -171,6 +171,7 @@ class ComputingPowerController extends BaseAuthedController
|
||||
break;
|
||||
case ComputingPower::CRYSTAL4 : {
|
||||
$recordDb = CrystalRecord::getNewestRecordOne($itemId);
|
||||
error_log('exchangeCrystal:'.json_encode($recordDb));
|
||||
if ($recordDb && myself()->_getNowDaySeconds() == myself()->_getDaySeconds($recordDb['createtime'])){
|
||||
$this->_rspErr(1, 'There are no available crystals');
|
||||
return ;
|
||||
|
@ -55,7 +55,7 @@ class CrystalRecord extends BaseModel
|
||||
}
|
||||
|
||||
public static function getNewestRecordOne($itemId){
|
||||
$sql = "select * from t_crystal_exchange_record where `account_id` = :account_id and item_id = :item_id order by createtime desc limit 1";
|
||||
$sql = "select * from t_crystal_exchange_record where `account_id` = :account_id and item_id = :item_id order by idx desc limit 1";
|
||||
$rows = myself()->_getMysql('')->execQuery($sql,array(
|
||||
'account_id' =>myself()->_getAccountId(),
|
||||
'item_id' =>$itemId,
|
||||
|
Loading…
x
Reference in New Issue
Block a user