This commit is contained in:
aozhiwei 2023-08-03 17:52:39 +08:00
parent 874a893c9c
commit 54421391fb
3 changed files with 9 additions and 2 deletions

View File

@ -30,6 +30,12 @@ class BaseController {
return $this->nowtime;
}
public function _getTodayLeadStr()
{
$leadStr = strftime('%y%m%d', $this->_getNowTime());
return $leadStr;
}
public function _getNowDaySeconds()
{
return $this->_getDaySeconds($this->nowtime);

View File

@ -281,7 +281,8 @@ class DailySelectionController extends BaseAuthedController {
private function getRedisKey()
{
$key = DAILY_SELECTION_KEY . myself()->_getAccountId();
$key = DAILY_SELECTION_KEY .
myself()->_getTodayLeadStr() . ':' . myself()->_getAccountId();
return $key;
}

View File

@ -21,7 +21,7 @@ class OrderId {
)
);
$lastIdx = SqlHelper::getLastInsertId(myself()->_getSelfMysql());
$orderId = strftime('%Y%m%d%H%M%S', myself()->_getNowTime()) . phpcommon\pad($lastIdx % 100000, 5);
$orderId = strftime('%y%m%d%H%M%S', myself()->_getNowTime()) . phpcommon\pad($lastIdx % 100000, 5);
return $orderId;
}