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