|
|
@ -6,6 +6,7 @@ use app\BaseController; |
|
|
use app\model\Zone as ZoneModel; |
|
|
use app\model\Zone as ZoneModel; |
|
|
use app\model\ZoneGoods; |
|
|
use app\model\ZoneGoods; |
|
|
use app\logic\Zone as ZoneLogic; |
|
|
use app\logic\Zone as ZoneLogic; |
|
|
|
|
|
use think\facade\Request; |
|
|
use think\facade\Session; |
|
|
use think\facade\Session; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ -27,9 +28,10 @@ class Zone extends BaseController |
|
|
* @param $zone_id |
|
|
* @param $zone_id |
|
|
* @return array |
|
|
* @return array |
|
|
*/ |
|
|
*/ |
|
|
public function zoneGoodsList($zoneId) |
|
|
public function zoneGoodsList() |
|
|
{ |
|
|
{ |
|
|
return $this->renderSuccess('数据返回成功',ZoneGoods::getList($zoneId)); |
|
|
$param = Request::param(); |
|
|
|
|
|
return $this->renderSuccess('数据返回成功',ZoneGoods::getList($param['zone_id'])); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ -40,8 +42,10 @@ class Zone extends BaseController |
|
|
* @throws \think\db\exception\DbException |
|
|
* @throws \think\db\exception\DbException |
|
|
* @throws \think\db\exception\ModelNotFoundException |
|
|
* @throws \think\db\exception\ModelNotFoundException |
|
|
*/ |
|
|
*/ |
|
|
public function beginLottery($zoneGoodsId) |
|
|
public function beginLottery() |
|
|
{ |
|
|
{ |
|
|
|
|
|
$param = Request::param(); |
|
|
|
|
|
$zoneGoodsId = $param['zone_goods_id']; |
|
|
$userData = Session::get('login_user_data'); |
|
|
$userData = Session::get('login_user_data'); |
|
|
|
|
|
|
|
|
# 判断余额够不够 |
|
|
# 判断余额够不够 |
|
|
@ -63,8 +67,10 @@ class Zone extends BaseController |
|
|
* @throws \think\db\exception\DbException |
|
|
* @throws \think\db\exception\DbException |
|
|
* @throws \think\db\exception\ModelNotFoundException |
|
|
* @throws \think\db\exception\ModelNotFoundException |
|
|
*/ |
|
|
*/ |
|
|
public function endLottery($c_r_id) |
|
|
public function endLottery() |
|
|
{ |
|
|
{ |
|
|
|
|
|
$param = Request::param(); |
|
|
|
|
|
$c_r_id = $param['c_r_id']; |
|
|
$userData = Session::get('login_user_data'); |
|
|
$userData = Session::get('login_user_data'); |
|
|
|
|
|
|
|
|
$res = ZoneLogic::endOrder($userData['id'],$c_r_id); |
|
|
$res = ZoneLogic::endOrder($userData['id'],$c_r_id); |
|
|
|