|
|
|
@ -3,6 +3,7 @@ |
|
|
|
namespace app\controller; |
|
|
|
|
|
|
|
use app\BaseController; |
|
|
|
use app\model\ConsumptionRecords; |
|
|
|
use app\model\Zone as ZoneModel; |
|
|
|
use app\model\ZoneGoods; |
|
|
|
use app\logic\Zone as ZoneLogic; |
|
|
|
@ -82,6 +83,28 @@ class Zone extends BaseController |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 查看中奖结果 |
|
|
|
* @return array |
|
|
|
* @throws \think\db\exception\DataNotFoundException |
|
|
|
* @throws \think\db\exception\DbException |
|
|
|
* @throws \think\db\exception\ModelNotFoundException |
|
|
|
*/ |
|
|
|
public function queryAwardsResult() |
|
|
|
{ |
|
|
|
$param = Request::param(); |
|
|
|
$c_r_id = $param['c_r_id']; |
|
|
|
$userData = Session::get('login_user_data'); |
|
|
|
|
|
|
|
$queryWhere = ['status' => 1, 'user_id' => $userData['id'], 'id' => $c_r_id]; |
|
|
|
$ConsumptionRecords = new ConsumptionRecords(); |
|
|
|
$query = $ConsumptionRecords->where($queryWhere)->field('text_data,zone_goods_id')->find(); |
|
|
|
if (!$query['text_data']) return $this->renderError('中奖结果数据不存在'); |
|
|
|
$returnData = ZoneLogic::handleTextData(unserialize($query['text_data'])); |
|
|
|
|
|
|
|
return $this->renderSuccess('数据返回成功', ['list' => $returnData]); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |