1
This commit is contained in:
parent
15ba2b0107
commit
3dc1db46e2
@ -53,14 +53,14 @@ class HashRateShopBuyRecord extends BaseModel
|
|||||||
return $buyRecordHash;
|
return $buyRecordHash;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function add($goodsId, $goodsNum)
|
public static function add($goodsId, $goodsNum, $itemId)
|
||||||
{
|
{
|
||||||
SqlHelper::upsert(
|
SqlHelper::upsert(
|
||||||
myself()->_getSelfMysql(),
|
myself()->_getSelfMysql(),
|
||||||
't_hashrate_shop_buy_record',
|
't_hashrate_shop_buy_record',
|
||||||
array(
|
array(
|
||||||
'account_id' => myself()->_getAccountId(),
|
'account_id' => myself()->_getAccountId(),
|
||||||
'item_id' => $itemId,
|
'goods_id' => $goodsId,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'this_day_buy_times' => function () {
|
'this_day_buy_times' => function () {
|
||||||
@ -81,10 +81,11 @@ class HashRateShopBuyRecord extends BaseModel
|
|||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'account_id' => myself()->_getAccountId(),
|
'account_id' => myself()->_getAccountId(),
|
||||||
|
'goods_id' => $goodsId,
|
||||||
'item_id' => $itemId,
|
'item_id' => $itemId,
|
||||||
'this_day_buy_times' => 1,
|
'this_day_buy_times' => $goodsNum,
|
||||||
'this_week_buy_times' => 1,
|
'this_week_buy_times' => $goodsNum,
|
||||||
'total_buy_times' => 1,
|
'total_buy_times' => $goodsNum,
|
||||||
'last_buy_time' => myself()->_getNowTime(),
|
'last_buy_time' => myself()->_getNowTime(),
|
||||||
'createtime' => myself()->_getNowTime(),
|
'createtime' => myself()->_getNowTime(),
|
||||||
'modifytime' => myself()->_getNowTime(),
|
'modifytime' => myself()->_getNowTime(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user