1
This commit is contained in:
parent
ebc2855a61
commit
0c4c0a789d
@ -1361,6 +1361,7 @@ CREATE TABLE `t_outapp_order` (
|
|||||||
`address` varchar(60) DEFAULT NULL COMMENT '申请时账号绑定的钱包',
|
`address` varchar(60) DEFAULT NULL COMMENT '申请时账号绑定的钱包',
|
||||||
`goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '物品id',
|
`goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '物品id',
|
||||||
`price` double NOT NULL DEFAULT '0' COMMENT '价格',
|
`price` double NOT NULL DEFAULT '0' COMMENT '价格',
|
||||||
|
`params` mediumblob COMMENT 'params',
|
||||||
`status` int(11) NOT NULL DEFAULT '0' COMMENT 'status',
|
`status` int(11) NOT NULL DEFAULT '0' COMMENT 'status',
|
||||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||||
|
@ -227,6 +227,13 @@ class ShopController extends BaseAuthedController {
|
|||||||
$orderId,
|
$orderId,
|
||||||
$nowTime
|
$nowTime
|
||||||
);
|
);
|
||||||
|
OutAppOrder::add(
|
||||||
|
$orderId,
|
||||||
|
$platform,
|
||||||
|
$goodsId,
|
||||||
|
$price,
|
||||||
|
json_encode($params)
|
||||||
|
);
|
||||||
/*
|
/*
|
||||||
签名方式:将所有的参数用&连接起来做md5加secret_key
|
签名方式:将所有的参数用&连接起来做md5加secret_key
|
||||||
*/
|
*/
|
||||||
|
@ -14,7 +14,7 @@ class OutAppOrder extends BaseModel {
|
|||||||
public static function find($orderId)
|
public static function find($orderId)
|
||||||
{
|
{
|
||||||
$row = SqlHelper::ormSelectOne(
|
$row = SqlHelper::ormSelectOne(
|
||||||
myself()->_get(),
|
myself()->_getMysql(''),
|
||||||
't_outapp_order',
|
't_outapp_order',
|
||||||
array(
|
array(
|
||||||
'order_id' => $orderId,
|
'order_id' => $orderId,
|
||||||
@ -23,6 +23,24 @@ class OutAppOrder extends BaseModel {
|
|||||||
return $row;
|
return $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function add($orderId, $platform, $goodsId, $price, $paramsJson)
|
||||||
|
{
|
||||||
|
SqlHelper::insert(
|
||||||
|
myself()->_getMysql(''),
|
||||||
|
't_outapp_order',
|
||||||
|
array(
|
||||||
|
'order_id' => $orderId,
|
||||||
|
'account_id' => myself()->_getAccountId(),
|
||||||
|
'platform' => $platform,
|
||||||
|
'goods_id' => $goodsId,
|
||||||
|
'price' => $price,
|
||||||
|
'params' => $paramsJson,
|
||||||
|
'createtime' => myself()->_getNowTime(),
|
||||||
|
'modifytime' => myself()->_getNowTime(),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public static function markFinished($orderId)
|
public static function markFinished($orderId)
|
||||||
{
|
{
|
||||||
SqlHelper::update(
|
SqlHelper::update(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user