...
This commit is contained in:
parent
d8637ee6ca
commit
33875275ec
@ -20,4 +20,6 @@ CREATE TABLE `t_bc_order` (
|
||||
|
||||
insert into version (version) values(2023061901);
|
||||
|
||||
alter table t_shop_buy_order change `account_id` `address` VARCHAR(60) NOT NULL COMMENT '账户地址';
|
||||
alter table t_first_topup change `account_id` `address` VARCHAR(60) NOT NULL COMMENT '账户地址';
|
||||
commit;
|
||||
|
@ -20,6 +20,12 @@ class FirstTopupController extends BaseAuthedController
|
||||
{
|
||||
$complete = false;
|
||||
|
||||
$address = myself()->_getAddress();
|
||||
if (!$address) {
|
||||
$this->_rspErr(1, 'you have not a web3 address');
|
||||
return;
|
||||
}
|
||||
|
||||
$conn = myself()->_getMysql('');
|
||||
|
||||
$status = $this->getStatusFromDB($conn);
|
||||
@ -43,11 +49,17 @@ class FirstTopupController extends BaseAuthedController
|
||||
{
|
||||
$conn = myself()->_getMysql('');
|
||||
|
||||
$address = myself()->_getAddress();
|
||||
if (!$address) {
|
||||
$this->_rspErr(1, 'you have not a web3 address');
|
||||
return;
|
||||
}
|
||||
|
||||
$exist = SqlHelper::selectOne(
|
||||
$conn,
|
||||
't_first_topup',
|
||||
array('account_id'),
|
||||
array('account_id' => myself()->_getAccountId())
|
||||
array('address'),
|
||||
array('address' => myself()->_getAddress())
|
||||
);
|
||||
if ($exist) {
|
||||
$this->_rspErr(1, '首充奖励活动已经开启');
|
||||
@ -59,7 +71,7 @@ class FirstTopupController extends BaseAuthedController
|
||||
$conn,
|
||||
't_first_topup',
|
||||
array(
|
||||
'account_id' => myself()->_getAccountId(),
|
||||
'address' => myself()->_getAddress(),
|
||||
'createtime' => myself()->_getNowTime(),
|
||||
'status1' => 0,
|
||||
'status2' => 0,
|
||||
@ -80,6 +92,12 @@ class FirstTopupController extends BaseAuthedController
|
||||
|
||||
$conn = myself()->_getMysql('');
|
||||
|
||||
$address = myself()->_getAddress();
|
||||
if (!$address) {
|
||||
$this->_rspErr(1, 'you have not a web3 address');
|
||||
return;
|
||||
}
|
||||
|
||||
$status = $this->getStatusFromDB($conn);
|
||||
|
||||
$test = $status[$group - 1];
|
||||
@ -90,7 +108,7 @@ class FirstTopupController extends BaseAuthedController
|
||||
$conn,
|
||||
't_first_topup',
|
||||
array(
|
||||
'account_id' => myself()->_getAccountId(),
|
||||
'address' => myself()->_getAddress(),
|
||||
),
|
||||
array(
|
||||
'status' . $group => 2,
|
||||
@ -122,10 +140,9 @@ class FirstTopupController extends BaseAuthedController
|
||||
)
|
||||
);
|
||||
} else if ($test >= 2) {
|
||||
$this->_rspErr(2, "already received the reward");
|
||||
$this->_rspErr(2, "already received the reward, group: $group");
|
||||
} else if ($test < 1) {
|
||||
// 未到领取时间 英文 怎么说
|
||||
$this->_rspErr(1, "not yet to receive the reward");
|
||||
$this->_rspErr(1, "not yet to receive the reward, group: $group");
|
||||
}
|
||||
}
|
||||
|
||||
@ -149,7 +166,7 @@ class FirstTopupController extends BaseAuthedController
|
||||
$conn,
|
||||
't_first_topup',
|
||||
array('createtime', 'status1', 'status2', 'status3'),
|
||||
array('account_id' => myself()->_getAccountId())
|
||||
array('address' => myself()->_getAddress())
|
||||
);
|
||||
|
||||
$status = [0, 0, 0];
|
||||
|
@ -418,6 +418,8 @@ class ShopController extends BaseAuthedController
|
||||
'order_id' => $lastId,
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->_rspErr(1, "insert error, id: {$id}, token_type: {$token_type}, goods_num: {$goods_num}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -442,11 +444,7 @@ class ShopController extends BaseAuthedController
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->_rspData(
|
||||
array(
|
||||
'status' => 0,
|
||||
)
|
||||
);
|
||||
$this->_rspErr(1, "order_id not found, order_id: {$order_id}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -767,7 +765,7 @@ class ShopController extends BaseAuthedController
|
||||
$chk = $this->refreshDailySelectionWithMode($account, 0);
|
||||
$chk = $this->getTodayLastDailySelection($account);
|
||||
}
|
||||
|
||||
|
||||
$selection = $chk[0];
|
||||
$goodsList = array();
|
||||
for ($i = 1; $i <= 6; $i++) {
|
||||
@ -789,7 +787,8 @@ class ShopController extends BaseAuthedController
|
||||
);
|
||||
}
|
||||
|
||||
public function buyGoodsDS() {
|
||||
public function buyGoodsDS()
|
||||
{
|
||||
$account = $this->_getAccountId();
|
||||
$idx = getReqVal('idx', 0);
|
||||
$grid = getReqVal('grid', 0);
|
||||
@ -842,7 +841,8 @@ class ShopController extends BaseAuthedController
|
||||
return $chk;
|
||||
}
|
||||
|
||||
private function clearBeforeTodayDailySelections() {
|
||||
private function clearBeforeTodayDailySelections()
|
||||
{
|
||||
$self = myself();
|
||||
if (!$self) return;
|
||||
|
||||
@ -1210,8 +1210,8 @@ class ShopController extends BaseAuthedController
|
||||
$exist = SqlHelper::selectOne(
|
||||
$conn,
|
||||
't_first_topup',
|
||||
array('account_id'),
|
||||
array('account_id' => myself()->_getAccountId())
|
||||
array('address'),
|
||||
array('address' => myself()->_getAddress())
|
||||
);
|
||||
if ($exist) {
|
||||
return;
|
||||
@ -1222,7 +1222,7 @@ class ShopController extends BaseAuthedController
|
||||
$conn,
|
||||
't_first_topup',
|
||||
array(
|
||||
'account_id' => myself()->_getAccountId(),
|
||||
'address' => myself()->_getAddress(),
|
||||
'createtime' => myself()->_getNowTime(),
|
||||
'status1' => 0,
|
||||
'status2' => 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user