PairModel.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788
  1. <?php
  2. namespace App\Models\Fpdx;
  3. use Illuminate\Database\Eloquent\Builder;
  4. use Illuminate\Database\Eloquent\Collection;
  5. use App\Exceptions\AlertException;
  6. use App\Models\User\UserModel;
  7. use Illuminate\Database\Eloquent\Model;
  8. use Illuminate\Support\Facades\DB;
  9. use Illuminate\Support\Facades\Redis;
  10. class PairModel extends Model
  11. {
  12. protected $table = 'kdgx_partner_charge_pair';
  13. protected $dateFormat = 'U';
  14. public const CREATED_AT = 'create_time';
  15. protected $fillable = [
  16. 'uid',
  17. 'stage_id',
  18. 'activity_type',
  19. 'assoc_id',
  20. 'partner',
  21. 'pair_type',
  22. 'state',
  23. 'order_id',
  24. 'media_id',
  25. 'sex',
  26. 'sxo',
  27. 'min_age',
  28. 'max_age',
  29. 'height',
  30. 'birthday',
  31. 'device',
  32. 'km',
  33. 'lng',
  34. 'lat',
  35. 'location',
  36. 'data',
  37. 'score',
  38. 'pay',
  39. 'add_score',
  40. 'allow_photo',
  41. 'confirm',
  42. 'repair',
  43. 'last_assoc',
  44. 'rematch',
  45. 'keep',
  46. 'hidden_at'
  47. ];
  48. /**
  49. * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
  50. */
  51. public function activity()
  52. {
  53. return $this->belongsTo(ActivityModel::class, 'stage_id', 'stage_id');
  54. }
  55. /**
  56. * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
  57. */
  58. public function user()
  59. {
  60. return $this->belongsTo(\App\Models\User\UserModel::class, 'uid', 'uid')
  61. ->select(
  62. 'nickname',
  63. 'headimgurl',
  64. 'sex',
  65. 'sxo',
  66. 'height',
  67. 'age',
  68. 'home',
  69. 'address',
  70. 'school',
  71. 'qq',
  72. 'weixin',
  73. 'pair_min_age',
  74. 'pair_max_age',
  75. 'wxkf'
  76. );
  77. }
  78. /**
  79. * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
  80. */
  81. public function media()
  82. {
  83. return $this->belongsTo(MediaModel::class, 'media_id', 'media_id');
  84. }
  85. /**
  86. * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
  87. */
  88. public function room()
  89. {
  90. return $this->belongsTo(RoomModel::class, 'room_id', 'room_id');
  91. }
  92. /**
  93. * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
  94. */
  95. public function group()
  96. {
  97. return $this->belongsTo(GroupModel::class, 'group_id', 'id');
  98. }
  99. /**
  100. * 没有隐藏的列表
  101. * @param $query
  102. * @return mixed
  103. */
  104. public function scopeHidden(/** @var Builder $query */$query)
  105. {
  106. return $query->where('hidden_at', 0);
  107. }
  108. /**
  109. * 获取匹配范围内的用户
  110. * @return array
  111. */
  112. public function getMatchRadiusUids(): array
  113. {
  114. $lbsCacheKey = "pair:{$this->stageId}:lsb";
  115. $uids = Redis::geoRadius($lbsCacheKey, $this->lng, $this->lat, $this->match_raduis, 'km');
  116. return $uids;
  117. }
  118. /**
  119. * 获取报名信息
  120. * @param $stage_id
  121. * @param $uid
  122. * @return mixed
  123. * @throws AlertException
  124. */
  125. public function getPairByStageUid($stage_id, $uid)
  126. {
  127. $where = [
  128. ['stage_id', '=', $stage_id],
  129. ['uid', '=', $uid]
  130. ];
  131. $pair = $this->where($where)->first();
  132. if (collect($pair)->isEmpty()) {
  133. throw new AlertException("未能找到报名记录");
  134. } else {
  135. return $pair;
  136. }
  137. }
  138. /**
  139. * 获取「某期」待匹配的队列
  140. * @param int $stage_id 期数
  141. * @param string $activity_type
  142. * @param string|null $city
  143. * @return Collection
  144. */
  145. public function getPairQuery(int $stage_id, string $activity_type = "72h", string $city = null)
  146. {
  147. $pairs = $this->where([['stage_id', $stage_id], ['activity_type', $activity_type]])
  148. ->whereNull('assoc_id')
  149. ->whereBetween('state', [100, 299])
  150. ->get(['uid']);
  151. /** @var Collection $users */
  152. $users = UserModel::whereIn('uid', $pairs->pluck('uid'))
  153. ->when(!is_null($city), function (/** @var Builder $query */ $query) use ($city) {
  154. return $query->where('address', $city);
  155. })->get([
  156. 'uid',
  157. 'sex',
  158. 'sxo',
  159. 'height',
  160. 'age',
  161. 'home',
  162. 'address',
  163. 'school',
  164. 'fpdx_like',
  165. 'pair_min_age',
  166. 'pair_max_age',
  167. 'pair_province',
  168. 'pair_all'
  169. ]);
  170. foreach ($users as &$user) {
  171. $pair = $this->where([['stage_id', $stage_id], ['uid', $user->uid]])->first(['id', 'score']);
  172. if (!collect($pair)->isEmpty()) {
  173. $user->pair_id = $pair->id;
  174. $user->score = $pair->score;
  175. $pairs = Redis::smembers("fpdx_pairs_{$user->uid}");
  176. if (empty($pairs)) {
  177. $pairs = array();
  178. }
  179. $user->pairs = $pairs;
  180. }
  181. }
  182. $users = $users->sortByDesc("score");
  183. return $users;
  184. }
  185. /**
  186. * 重新匹配列表
  187. * @param int $stage_id
  188. * @param string $activity_type
  189. * @param string|null $city
  190. * @return Collection
  191. */
  192. public function getRematchPair(int $stage_id, string $activity_type = "72h", string $city = null)
  193. {
  194. $pairs = $this->where([
  195. ['stage_id', $stage_id],
  196. ['rematch', 1],
  197. ['activity_type', $activity_type]
  198. ])->whereNull('assoc_id')->get(['uid']);
  199. /** @var Collection $users */
  200. $users = UserModel::whereIn('uid', $pairs->pluck('uid'))
  201. ->when(!is_null($city), function (/** @var Builder $query */ $query) use ($city) {
  202. return $query->where('address', $city);
  203. })->get([
  204. 'uid',
  205. 'sex',
  206. 'sxo',
  207. 'height',
  208. 'age',
  209. 'home',
  210. 'address',
  211. 'school',
  212. 'fpdx_like',
  213. 'pair_min_age',
  214. 'pair_max_age',
  215. 'pair_province',
  216. 'pair_all'
  217. ]);
  218. foreach ($users as &$user) {
  219. $pair = $this->where([['stage_id', $stage_id], ['uid', $user->uid]])->first(['id', 'score']);
  220. if (!collect($pair)->isEmpty()) {
  221. $user->pair_id = $pair->id;
  222. $user->score = $pair->score;
  223. $pairs = Redis::smembers("fpdx_pairs_{$user->uid}");
  224. if (empty($pairs)) {
  225. $pairs = array();
  226. }
  227. $user->pairs = $pairs;
  228. }
  229. }
  230. $users = $users->sortByDesc("score");
  231. return $users;
  232. }
  233. /**
  234. * 获取某期匹配对象的回复情况
  235. * @param int stage_id 期数
  236. * @return object data
  237. * [
  238. * {
  239. * id: 匹配id
  240. * uid: 用户id
  241. * stage_id: 报名期数
  242. * media_id: 报名公众号id
  243. * assoc_id: 匹配对象匹配id
  244. * receive: 是否回复过 [true | false]
  245. * pair: {
  246. * id: 匹配id
  247. * uid: 用户id
  248. * stage_id: 报名期数
  249. * media_id: 报名公众号id
  250. * assoc_id: 匹配对象匹配id
  251. * receive: 是否回复过 [true | false]
  252. * }
  253. * }
  254. * ]
  255. */
  256. public function getAllReceiveState(int $stage_id)
  257. {
  258. $where = array(
  259. ['stage_id', $stage_id],
  260. ['sex', 2],
  261. ['assoc_id', '!=', null]
  262. );
  263. $girls = self::where($where)->get();
  264. $where = array(
  265. ['stage_id', $stage_id],
  266. ['sex', 1],
  267. ['assoc_id', '!=', null]
  268. );
  269. $boys = self::where($where)->get();
  270. $boys = $boys->keyBy('id');
  271. foreach ($girls as &$girl) {
  272. if (isset($girl->receives) && $girl->receives > 0) {
  273. $girl->receive = true;
  274. } else {
  275. $girl->receive = false;
  276. }
  277. $pair = $boys->get($girl->assoc_id);
  278. if (isset($pair->receives) && $pair->receives > 0) {
  279. $pair->receive = true;
  280. } else {
  281. $pair->receive = false;
  282. }
  283. $girl->pair = $pair;
  284. }
  285. return $girls;
  286. }
  287. /**
  288. * 获取某期某人及其对象回复情况
  289. * @param int $stage_id
  290. * @param int $uid
  291. * @return object data
  292. * {
  293. * id: 匹配id
  294. * uid: 用户id
  295. * stage_id: 报名期数
  296. * media_id: 报名公众号id
  297. * assoc_id: 匹配对象匹配id
  298. * receive: 是否回复过 [true | false]
  299. * pair: {
  300. * id: 匹配id
  301. * uid: 用户id
  302. * stage_id: 报名期数
  303. * media_id: 报名公众号id
  304. * assoc_id: 匹配对象匹配id
  305. * receive: 是否回复过 [true | false]
  306. * }
  307. * }
  308. * @throws AlertException
  309. */
  310. public function getReceiveState(int $stage_id, int $uid)
  311. {
  312. $where = array(
  313. ['stage_id', $stage_id],
  314. ['uid', $uid],
  315. ['assoc_id', '!=', null]
  316. );
  317. $data = self::where($where)->first();
  318. if (collect($data)->isEmpty()) {
  319. throw new AlertException("未找到报名纪录");
  320. }
  321. if (isset($data->receives) && $data->receives > 0) {
  322. $data->receive = true;
  323. } else {
  324. $data->receive = false;
  325. }
  326. $pair = self::find($data->assoc_id);
  327. if (isset($pair->receives) && $pair->receives > 0) {
  328. $pair->receive = true;
  329. } else {
  330. $pair->receive = false;
  331. }
  332. $data->pair = $pair;
  333. return $data;
  334. }
  335. /**
  336. * 维护发送信息条数
  337. * @param int uid 发送消息的用户uid
  338. * @param int room_id 房间号
  339. * @param int message_id 消息id
  340. * @return void
  341. */
  342. public static function receiveMsg(int $uid, int $room_id, int $message_id)
  343. {
  344. $room = RoomModel::find($room_id);
  345. if (collect($room)->isEmpty()) {
  346. return;
  347. } else {
  348. $msg = MessageModel::find($message_id);
  349. if (isset($msg->msg_type) && $msg->msg_type == -1) {
  350. self::where('stage_id', $room->stage_id)->where('uid', $uid)->increment('receives', 1);
  351. }
  352. return;
  353. }
  354. }
  355. /**
  356. * 获取某期不满意的报名集合
  357. * @param int stage_id 期数
  358. * @return array result [1,2,3,8,...]
  359. */
  360. public static function getNotSatisfactions(int $stage_id)
  361. {
  362. $result = array();
  363. $where = array(
  364. ['stage_id', $stage_id],
  365. ['sex', 2],
  366. ['assoc_id', '!=', null]
  367. );
  368. $girls = self::where($where)->get();
  369. $where = array(
  370. ['stage_id', $stage_id],
  371. ['sex', 1],
  372. ['assoc_id', '!=', null]
  373. );
  374. $boys = self::where($where)->get();
  375. $boys = $boys->keyBy('id');
  376. foreach ($girls as &$girl) {
  377. try {
  378. $pair = $boys->get($girl->assoc_id);
  379. if ($girl->receives > 0 && 0 == $pair->receives) {
  380. array_push($result, $girl->id);
  381. }
  382. if ($pair->receives > 0 && 0 == $girl->receives) {
  383. array_push($result, $pair->id);
  384. }
  385. } catch (\Exception $e) {
  386. continue;
  387. }
  388. }
  389. return $result;
  390. }
  391. /**
  392. * 获取某期匹配成功的对象的信息
  393. * @param int stage_id 期数
  394. * @return Collection
  395. * {
  396. * [
  397. * "id": 报名纪录id,
  398. * "uid": 用户id,
  399. * "stage_id": 期数,
  400. * "room": {
  401. * "room_id": 房间id,
  402. * "room_name": 房间名称,
  403. * "stage_id": 期数,
  404. * "uid": 用户id,
  405. * "pair_uid": 匹配对象uid,
  406. * "create_time": unix时间戳
  407. * }
  408. * ]
  409. * }
  410. */
  411. public function getStageNumber($stage_id)
  412. {
  413. $pairs = $this->where('stage_id', $stage_id)->whereBetween('state', [400, 499])->get(['id', 'uid', 'stage_id']);
  414. $roomModel = new RoomModel();
  415. foreach ($pairs as $key => &$value) {
  416. try {
  417. $value->room = $roomModel->getRoom($value->room_id, $value->uid);
  418. } catch (\ApiException $e) {
  419. $pairs->forget($key);
  420. continue;
  421. }
  422. }
  423. return json_decode($pairs->toJson());
  424. }
  425. /**
  426. * 获取分配对象收益明细
  427. * @param string media_id 公众号id
  428. * @param int $stage_id 期数
  429. * @return object 明细信息
  430. */
  431. public function fxIncome(string $media_id, int $stage_id = 0)
  432. {
  433. $data = $this->with([
  434. 'user' => function (/** @var Builder $query */ $query) {
  435. $query->select(['uid', 'nickname']);
  436. }
  437. ])->where(array(
  438. ['media_id', $media_id],
  439. ['stage_id', '>', 26]
  440. ))->whereBetween('state', [100, 899])->when(
  441. $stage_id,
  442. function (/** @var Builder $query */ $query) use ($stage_id) {
  443. return $query->where('stage_id', $stage_id);
  444. }
  445. )->orderBy('create_time', 'desc')->get([
  446. 'uid',
  447. 'stage_id',
  448. 'sex',
  449. 'create_time',
  450. 'state',
  451. 'fx_money',
  452. 'completed_at'
  453. ]);
  454. return $data;
  455. }
  456. /**
  457. * 分销排行
  458. * @param int stage_id 期数
  459. * @return array [
  460. * {
  461. * 'count': 数量,
  462. * 'fx_money': 收益,
  463. * 'media_id': 公众号id,
  464. * 'public_name': '公众号名称‘,
  465. * 'expect_money': '期望收益'
  466. * }
  467. * ]
  468. */
  469. public function fxrank(int $stage_id = 0)
  470. {
  471. $hides = Redis::lrange("{pair_hides}", 0, -1);
  472. $hidesql = "";
  473. foreach ($hides as $value) {
  474. $hidesql .= "'{$value}',";
  475. }
  476. if ($stage_id != 0) {
  477. $sql = "select count(*) as count, p.media_id, public_name from kdgx_partner_charge_pair as p join kdgx_partner_charge_media as m on p.media_id=m.media_id where `stage_id`= ? and `state` between 100 and 899 and m.`type` = 0 and p.`media_id` not in ({$hidesql}'+') GROUP BY p.`media_id`";
  478. $result = DB::select($sql, [$stage_id]);
  479. foreach ($result as &$data) {
  480. $media_id = $data->media_id;
  481. $data->expect_money = DB::table('kdgx_partner_charge_pair')->where(array(
  482. ['stage_id', $stage_id],
  483. ['media_id', $media_id],
  484. ['sex', 1]
  485. ))->whereBetween('state', [100, 199])->count() * 2.5;
  486. $data->expect_money += DB::table('kdgx_partner_charge_pair')->where(array(
  487. ['stage_id', $stage_id],
  488. ['media_id', $media_id],
  489. ['sex', 2]
  490. ))->whereBetween('state', [100, 199])->count() * 3.5;
  491. $data->expect_money += DB::table('kdgx_partner_charge_pair')->where(array(
  492. ['stage_id', $stage_id],
  493. ['media_id', $media_id]
  494. ))->whereBetween('state', [300, 399])->count() * 0.5;
  495. $data->expect_money += DB::table('kdgx_partner_charge_pair')->where(array(
  496. ['stage_id', $stage_id],
  497. ['media_id', $media_id],
  498. ['sex', 1]
  499. ))->whereBetween('state', [400, 499])->count() * 2.5;
  500. $data->expect_money += DB::table('kdgx_partner_charge_pair')->where(array(
  501. ['stage_id', $stage_id],
  502. ['media_id', $media_id],
  503. ['sex', 2]
  504. ))->whereBetween('state', [400, 499])->count() * 3.5;
  505. $data->expect_money += DB::table('kdgx_partner_charge_pair')->where(array(
  506. ['stage_id', $stage_id],
  507. ['media_id', $media_id],
  508. ))->whereBetween('state', [500, 599])->count() * 0.5;
  509. $data->expect_money += DB::table('kdgx_partner_charge_pair')->where(array(
  510. ['stage_id', $stage_id],
  511. ['media_id', $media_id],
  512. ))->whereBetween('state', [600, 699])->count() * 0.5;
  513. $data->expect_money += \DB::table('kdgx_partner_charge_pair')->where(array(
  514. ['stage_id', $stage_id],
  515. ['media_id', $media_id],
  516. ))->whereBetween('state', [700, 799])->count() * 0.5;
  517. $data->expect_money += \DB::table('kdgx_partner_charge_pair')->where(array(
  518. ['stage_id', $stage_id],
  519. ['media_id', $media_id],
  520. ['sex', 1]
  521. ))->whereBetween('state', [800, 899])->count() * 2.5;
  522. $data->expect_money += \DB::table('kdgx_partner_charge_pair')->where(array(
  523. ['stage_id', $stage_id],
  524. ['media_id', $media_id],
  525. ['sex', 2]
  526. ))->whereBetween('state', [800, 899])->count() * 3.5;
  527. }
  528. } else {
  529. $sql = "select count(*) as count, media_id from kdgx_partner_charge_pair where `state` between 100 and 899 and `media_id` not in ({$hidesql}'+') GROUP BY `media_id` ORDER BY count desc";
  530. $result = \DB::select($sql);
  531. }
  532. usort($result, function ($x, $y) {
  533. if ($x->count > $y->count) {
  534. return false;
  535. } else {
  536. return true;
  537. }
  538. });
  539. return $result;
  540. }
  541. /**
  542. * 当前的进度
  543. * @return int
  544. */
  545. public function progress()
  546. {
  547. if (empty($this->id)) {
  548. return self::NOT_ENROLL;
  549. }
  550. $activity = ActivityModel::find($this->stage_id);
  551. // dump($activity->getProgress());
  552. // 报名中
  553. if ($activity->getProgress() == ActivityModel::ENROLLING) {
  554. return self::ENROLLING;
  555. }
  556. // 匹配中
  557. if ($activity->getProgress() == ActivityModel::MATCHING) {
  558. return self::MATCHING;
  559. }
  560. if ($this->state >= 0 && $this->state < 100) {
  561. return self::INVALID;
  562. }
  563. if ($this->state >= 300 && $this->state < 400) {
  564. return self::MATCH_FAIL;
  565. }
  566. if ($this->state >= 500 && $this->state < 600) {
  567. return self::DISSATISFIED;
  568. }
  569. if ($this->state >= 600 && $this->state < 700) {
  570. return self::REFUND;
  571. }
  572. if ($this->state >= 700 && $this->state < 800) {
  573. return self::NEXT_ISSUE;
  574. }
  575. if ($this->state >= 900 && $this->state < 1000) {
  576. return self::INVALID;
  577. }
  578. if ($this->state >= 1000 && $this->state < 1100) {
  579. return self::NEXT_ISSUE;
  580. }
  581. // 40x or 80x
  582. if (
  583. ($this->state >= 400 && $this->state < 500)
  584. or
  585. ($this->state >= 800 && $this->state < 900)
  586. ) {
  587. // 确认期间
  588. if ($activity->getProgress() == ActivityModel::CONFIRMING) {
  589. // 另一半
  590. $other = PairModel::find($this->assoc_id);
  591. if ($this->confirm == 0) {
  592. return self::MATCH_SUCCESS;
  593. }
  594. if ($this->confirm < 0) {
  595. return self::REMATCHING;
  596. }
  597. if ($this->confirm > 0 && $other->confirm == 0) {
  598. return self::MATCH_SUCCESS;
  599. }
  600. if ($this->confirm > 0 && $other->confirm < 0) {
  601. return self::REMATCHING;
  602. }
  603. if ($this->confirm > 0 && $other->confirm > 0) {
  604. return self::CHATTING;
  605. }
  606. }
  607. # 重匹期间
  608. if ($activity->getProgress() == ActivityModel::REMATCHING) {
  609. # 我操作重匹 (一定是重匹中)
  610. if ($this->confirm < 0) {
  611. return self::REMATCHING;
  612. }
  613. // 重匹期间有last_accoc(一定是重匹中)
  614. if ($this->last_assoc) {
  615. return self::REMATCHING;
  616. }
  617. # 我操作确认
  618. if ($this->confirm > 0) {
  619. $other = PairModel::find($this->assoc_id);
  620. if ($other->confirm > 0) {
  621. return self::CHATTING;
  622. } else {
  623. return self::REMATCHING;
  624. }
  625. }
  626. # 我未操作时
  627. if ($this->confirm == 0) {
  628. if (!$this->assoc_id) {
  629. return self::MISS;
  630. }
  631. $other = PairModel::find($this->assoc_id);
  632. // 判断对方是否操作
  633. if ($other->confirm == 0) {
  634. return self::STALEMATE;
  635. } else {
  636. return self::MISS;
  637. }
  638. }
  639. }
  640. // 活动期间
  641. if ($activity->getProgress() == ActivityModel::CHATTING) {
  642. if ($this->assoc_id) {
  643. return self::CHATTING;
  644. } else {
  645. # 我未操作时
  646. if ($this->confirm == 0) {
  647. return self::MISS;
  648. } else {
  649. return self::REMATCH_FAIL;
  650. }
  651. }
  652. }
  653. // 活动结束后
  654. if ($activity->getProgress() == ActivityModel::END) {
  655. if ($this->assoc_id) {
  656. return self::END;
  657. } else {
  658. # 我未操作时
  659. if ($this->confirm == 0) {
  660. return self::MISS;
  661. } else {
  662. return self::REMATCH_FAIL;
  663. }
  664. }
  665. }
  666. }
  667. }
  668. /**
  669. * 未报名
  670. */
  671. public const NOT_ENROLL = 0;
  672. /**
  673. * 报名中
  674. */
  675. public const ENROLLING = 1;
  676. /**
  677. * 匹配中
  678. */
  679. public const MATCHING = 2;
  680. /**
  681. * 匹配失败
  682. */
  683. public const MATCH_FAIL = 3;
  684. /**
  685. * 匹配成功&待确认
  686. */
  687. public const MATCH_SUCCESS = 4;
  688. /**
  689. * 不满意
  690. */
  691. public const DISSATISFIED = 5;
  692. /**
  693. * 已退款
  694. */
  695. public const REFUND = 6;
  696. /**
  697. * 报名下一期
  698. */
  699. public const NEXT_ISSUE = 7;
  700. /**
  701. * 活动已完成
  702. */
  703. public const END = 8;
  704. /**
  705. * 报名失效
  706. */
  707. public const INVALID = 9;
  708. /**
  709. * 重匹中
  710. */
  711. public const REMATCHING = 10;
  712. /**
  713. * 重匹失败
  714. */
  715. public const REMATCH_FAIL = 11;
  716. /**
  717. * 匹配成功&活动中
  718. */
  719. public const CHATTING = 12;
  720. /**
  721. * 错过时间
  722. */
  723. public const MISS = 13;
  724. /**
  725. * 双方未操作
  726. */
  727. public const STALEMATE = 14;
  728. }