|
@@ -302,6 +302,12 @@ class MyController extends Controller
|
|
})->orderBy('id','desc')->get()->toArray();
|
|
})->orderBy('id','desc')->get()->toArray();
|
|
|
|
|
|
$data = array_merge($new_data1,$new_data2,$new_data3,$data456);
|
|
$data = array_merge($new_data1,$new_data2,$new_data3,$data456);
|
|
|
|
+ if (!empty($data)) {
|
|
|
|
+ foreach ($data as $key => $row) {
|
|
|
|
+ $volume[$key] = $row['id'];
|
|
|
|
+ }
|
|
|
|
+ array_multisort($volume, SORT_DESC, $data);
|
|
|
|
+ }
|
|
SystemInfoModel::where('to_user_id',$user->id)->where('type_id',1)->update(['is_read' => 1]);
|
|
SystemInfoModel::where('to_user_id',$user->id)->where('type_id',1)->update(['is_read' => 1]);
|
|
return $this->api($data);
|
|
return $this->api($data);
|
|
// foreach ($data as $item){ //访问接口 标记已读
|
|
// foreach ($data as $item){ //访问接口 标记已读
|
|
@@ -351,6 +357,7 @@ class MyController extends Controller
|
|
}
|
|
}
|
|
if (!empty($message)) {
|
|
if (!empty($message)) {
|
|
$new_data8[] = [
|
|
$new_data8[] = [
|
|
|
|
+ 'id'=>1000000, //排首
|
|
'dream_id'=>$dream_id,
|
|
'dream_id'=>$dream_id,
|
|
'interaction_id'=>$interaction_id,
|
|
'interaction_id'=>$interaction_id,
|
|
'message'=>$message,
|
|
'message'=>$message,
|
|
@@ -367,6 +374,12 @@ class MyController extends Controller
|
|
}
|
|
}
|
|
$data9 = SystemInfoModel::with('user')->where('to_user_id',$user->id)->where('type_id',2)->where('attr_id','!=',8)->orderBy('id','desc')->get()->toArray();
|
|
$data9 = SystemInfoModel::with('user')->where('to_user_id',$user->id)->where('type_id',2)->where('attr_id','!=',8)->orderBy('id','desc')->get()->toArray();
|
|
$data = array_merge($new_data8,$data9);
|
|
$data = array_merge($new_data8,$data9);
|
|
|
|
+ if (!empty($data)) {
|
|
|
|
+ foreach ($data as $key => $row) {
|
|
|
|
+ $volume[$key] = $row['id'];
|
|
|
|
+ }
|
|
|
|
+ array_multisort($volume, SORT_DESC, $data);
|
|
|
|
+ }
|
|
SystemInfoModel::where('to_user_id',$user->id)->where('type_id',2)->update(['is_read' => 1]);
|
|
SystemInfoModel::where('to_user_id',$user->id)->where('type_id',2)->update(['is_read' => 1]);
|
|
return $this->api($data);
|
|
return $this->api($data);
|
|
}
|
|
}
|
|
@@ -583,6 +596,7 @@ class MyController extends Controller
|
|
// $info['to_name'] = $data['account']; //账号
|
|
// $info['to_name'] = $data['account']; //账号
|
|
// $info['note'] = $data['type'].$data['name'];
|
|
// $info['note'] = $data['type'].$data['name'];
|
|
// $ok = AccountLog::create($info);
|
|
// $ok = AccountLog::create($info);
|
|
|
|
+ if($data['cash']>$user->coin) return $this->error(ErrorCode::COIN_NOT_ENOUGH);
|
|
$transaction_id = date('YmdHis') . mt_rand(1000, 9999);
|
|
$transaction_id = date('YmdHis') . mt_rand(1000, 9999);
|
|
$data['user_id'] = $user->id;
|
|
$data['user_id'] = $user->id;
|
|
$data['status'] = 1;
|
|
$data['status'] = 1;
|
|
@@ -753,7 +767,11 @@ class MyController extends Controller
|
|
$dreams = DreamInfoModel::where('user_id',$user->id)->orderBy('created_at','desc')->with('img')->paginate();
|
|
$dreams = DreamInfoModel::where('user_id',$user->id)->orderBy('created_at','desc')->with('img')->paginate();
|
|
foreach ($dreams as $dream) {
|
|
foreach ($dreams as $dream) {
|
|
if (strtotime($dream->end_time) > time()) {
|
|
if (strtotime($dream->end_time) > time()) {
|
|
- $dream->type_name = '进行中';
|
|
|
|
|
|
+ if ($dream->status==2) {
|
|
|
|
+ $dream->type_name = '暂停';
|
|
|
|
+ }else{
|
|
|
|
+ $dream->type_name = '进行中';
|
|
|
|
+ }
|
|
}else{
|
|
}else{
|
|
if ($dream->get_coin >=$dream->coin) {
|
|
if ($dream->get_coin >=$dream->coin) {
|
|
$dream->type_name = '已完成';
|
|
$dream->type_name = '已完成';
|
|
@@ -877,7 +895,11 @@ class MyController extends Controller
|
|
$item->img;
|
|
$item->img;
|
|
$item->user;
|
|
$item->user;
|
|
if (strtotime($item->end_time) > time()) {
|
|
if (strtotime($item->end_time) > time()) {
|
|
- $item->type_name = '进行中';
|
|
|
|
|
|
+ if ($item->status==2) {
|
|
|
|
+ $item->type_name = '暂停';
|
|
|
|
+ }else{
|
|
|
|
+ $item->type_name = '进行中';
|
|
|
|
+ }
|
|
}else{
|
|
}else{
|
|
if ($item->get_coin >=$item->coin) {
|
|
if ($item->get_coin >=$item->coin) {
|
|
$item->type_name = '已完成';
|
|
$item->type_name = '已完成';
|