...
|
...
|
@@ -114,6 +114,8 @@ class OrderController extends HomeBaseController{ |
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getPriceDRN($users_id,$start_time,$end_time){
|
|
|
$cost=Db::name('cost')->where('id',1)->find();
|
|
|
$interval = Db::name('interval')->where('id',1)->find();
|
...
|
...
|
@@ -553,6 +555,38 @@ class OrderController extends HomeBaseController{ |
|
|
}
|
|
|
|
|
|
}
|
|
|
/**
|
|
|
* @title 充值生成订单
|
|
|
* @description
|
|
|
* @author sgj
|
|
|
* @url /portal/order/chargeOrder
|
|
|
* @method GET
|
|
|
*
|
|
|
* @param name:price type:String require:1 default:无 other: desc:金额
|
|
|
* @param name:user_id type:String require:1 default:无 other: desc:用户id
|
|
|
*
|
|
|
* @return order:订单号
|
|
|
*/
|
|
|
public function chargeOrder(){
|
|
|
$fee=input('fee');
|
|
|
$user_id=input('user_id');
|
|
|
if (empty($fee)||empty($user_id)){
|
|
|
$this->error('信息错误!');
|
|
|
}
|
|
|
$insert['order_no']='CH-'.date('YmdHis').rand(1000,9999);
|
|
|
$insert['eq_name']='';
|
|
|
$insert['start_time']=time();
|
|
|
$insert['price']=$fee;
|
|
|
$insert['state']=1;
|
|
|
$insert['type']=2;
|
|
|
$result=\db('order')->insert($insert);
|
|
|
if ($result==1){
|
|
|
$reutrn['order_no']=$insert['order_no'];
|
|
|
$this->success('',$insert);
|
|
|
}else{
|
|
|
$this->error('');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
//支付回调接口
|
...
|
...
|
@@ -684,4 +718,6 @@ class OrderController extends HomeBaseController{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|