/**
*
* 添加订单 1年之前我写的
* @param String $sno
* @param String $name 订单名称
* @param int $uid
* @param String $realname
* @param String $shr
* @param String $address
* @param String $mobile
* @param String $num
* @param decimal $coupons
* @param decimal $money
* @param String $remark
*/
public function addOrder($sno, $name, $uid, $realname, $shr, $address, $mobile, $num, $coupons, $money, $remark, $status) {
$params = array ('uid' => $uid, 'name' => $name, 'orderno' => $sno, 'shr' => $shr, 'address' => $address, 'mobile' => $mobile, 'addtime' => time (), 'remark' => $remark, 'num' => $num, 'money' => $money, 'coupons' => $coupons, 'status' => $status );
return OrderModel::instance ()->addOrder ( $params );
}
/**
* 增加订单接口 改进后
*
* @param int $uid
* @param Array $order name|orderno|count|coupons|status
* @param String $remark
*/
public function addOrderAPI($uid, $order, $remark) {
$params = array ('uid' => $uid,
'name' => $order['name'],
'orderno' => $order['orderno'],
'addtime' => time (), 'remark' => $remark,
'num' => $order['count'],
'coupons' => $order['coupons'],
'status' => $order['status'] );
return OrderModel::instance ()->addOrder ( $params );
}