1
This commit is contained in:
parent
f50a8d16f4
commit
91aeddeb70
@ -1421,7 +1421,9 @@ CREATE TABLE `t_market` (
|
||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||
PRIMARY KEY (`idx`),
|
||||
UNIQUE KEY `order_id` (`order_id`)
|
||||
UNIQUE KEY `order_id` (`order_id`),
|
||||
KEY `owner_activated` (`owner`, `activated`),
|
||||
KEY `activated` (`activated`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
@ -21,29 +21,7 @@ class Market extends BaseModel {
|
||||
return $row;
|
||||
}
|
||||
|
||||
public static function add($OrderId, $fieldsKv){
|
||||
SqlHelper::upsert
|
||||
(myself()->_getMysql(''),
|
||||
't_market',
|
||||
array(
|
||||
'order_id' => $OrderId
|
||||
),
|
||||
array(
|
||||
),
|
||||
array(
|
||||
'order_id' => $OrderId,
|
||||
'order_type' => getXVal($fieldsKv,'order_type',0),
|
||||
'account_id' => myself()->_getAccountId(),
|
||||
'address' => myself()->_getAddress(),
|
||||
'status' => 0,
|
||||
'item_id' => $fieldsKv['item_id'],
|
||||
'item_num' => $fieldsKv['item_num'],
|
||||
'ext_data' => getXVal($fieldsKv,'ext_data',''),
|
||||
'createtime' => myself()->_getNowTime(),
|
||||
'modifytime' => myself()->_getNowTime(),
|
||||
'price' => $fieldsKv['price'],
|
||||
)
|
||||
);
|
||||
public static function add($orderId, $fieldsKv) {
|
||||
}
|
||||
|
||||
public static function updatePrice($orderId, $currency, $price) {
|
||||
@ -58,12 +36,24 @@ class Market extends BaseModel {
|
||||
|
||||
}
|
||||
|
||||
private static function update($OrderId, $fieldsKv){
|
||||
private static function internalUpdate($orderId, $fieldsKv){
|
||||
SqlHelper::upsert
|
||||
(myself()->_getMysql(''),
|
||||
't_market',
|
||||
array(
|
||||
'order_id' => $OrderId
|
||||
'order_id' => $orderId
|
||||
),
|
||||
array(
|
||||
),
|
||||
array(
|
||||
'order_id' => $orderId,
|
||||
)
|
||||
);
|
||||
SqlHelper::update
|
||||
(myself()->_getMysql(''),
|
||||
't_market',
|
||||
array(
|
||||
'order_id' => $orderId
|
||||
),
|
||||
$fieldsKv
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user