|
|
@@ -32,10 +32,11 @@ class GroupActivityLogic extends BaseLogic
|
|
|
public static function detail($id,$userId){
|
|
|
$detail = GroupActivity::with('goods')->where(['id'=>$id])->visible([
|
|
|
'id','title','image','start_time','end_time','type','equity_id',
|
|
|
- 'participant_num','origin_price','price','form_time_limit'
|
|
|
+ 'participant_num','origin_price','price','form_time_limit','area'
|
|
|
])->findOrEmpty()->toArray();
|
|
|
|
|
|
if(!empty($detail)){
|
|
|
+ $detail['area'] = explode(",",$detail['area']);
|
|
|
$detail['price'] = explode(",",$detail['price']);
|
|
|
$detail['participant_num'] = explode(",",$detail['participant_num']);
|
|
|
$detail['timestamp'] = time();
|
|
|
@@ -60,8 +61,11 @@ class GroupActivityLogic extends BaseLogic
|
|
|
if(!empty($detail)){
|
|
|
$detail['activity'] = GroupActivity::with('goods')->where(['id'=>$detail['group_activity_id']])->visible([
|
|
|
'id','title','image','start_time','end_time','type','equity_id',
|
|
|
- 'participant_num','origin_price','price','form_time_limit'
|
|
|
+ 'participant_num','origin_price','price','form_time_limit','area'
|
|
|
])->findOrEmpty()->toArray();
|
|
|
+
|
|
|
+ $detail['activity']['area'] = explode(",",$detail['activity']['area']);
|
|
|
+
|
|
|
$detail['users'] = GroupUserOrder::alias('a')
|
|
|
->leftJoin('user b','a.user_id=b.id')
|
|
|
->where(['a.sn'=>$sn,'a.status'=>1])
|
|
|
@@ -108,7 +112,7 @@ class GroupActivityLogic extends BaseLogic
|
|
|
* @notes 用户订单详情
|
|
|
*/
|
|
|
public static function userOrderDetail($sn,$userId){
|
|
|
- $detail = GroupUserOrder::with('groupOrder')->where(['sn'=>$sn, 'user_id' => $userId])->field('id,status,pay_way,pay_time,pay_status,refund_status,remark,create_time,group_order_id,user_equity_id')->findOrEmpty()->toArray();
|
|
|
+ $detail = GroupUserOrder::with('groupOrder')->where(['sn'=>$sn, 'user_id' => $userId])->field('id,status,pay_way,pay_time,pay_status,refund_status,remark,create_time,group_order_id,user_equity_id,area,address')->findOrEmpty()->toArray();
|
|
|
if ($detail) {
|
|
|
$detail['is_refund'] = 0;
|
|
|
if ($detail['pay_status'] == 1 && $detail['refund_status'] == 0) {
|