Match.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. use think\Db;
  5. /**
  6. * 匹配 与 匹配的收费
  7. */
  8. class Match extends Api
  9. {
  10. protected $noNeedLogin = ['*'];
  11. protected $noNeedRight = ['*'];
  12. //视频通话每分钟调用一次
  13. public function video_onemin(){
  14. if ($this->auth->gender == 0) { //女生不花钱
  15. $this->error('您的网络开小差啦~');
  16. }
  17. //检测用户
  18. $to_user_id = input_post('to_user_id');
  19. $to_user_info = Db::name('user')->field('id,intro_uid,gender,match_video_price')->where('id',$to_user_id)->find();
  20. if(!$to_user_info){
  21. $this->error('不存在的用户');
  22. }
  23. if ($to_user_info['gender'] != 0) {
  24. $this->error('同性不能聊天~');
  25. }
  26. //正常价格
  27. $price = $to_user_info['match_video_price']; //扣费金币
  28. $gift_plat_scale = config('site.pipei_plat_scale'); //抽成比例
  29. $money = bcdiv(bcmul($money,100 - $gift_plat_scale,2),100,2); //抽成后收益
  30. //发起用户的分数,被发起用户的分数。按性别给分
  31. $auth_level = 0;
  32. $tous_level = 0;
  33. //打分
  34. if($this->auth->gender == 0){
  35. $auth_level = 30;
  36. }
  37. if($this->auth->gender == 1){
  38. $auth_level = 10;//男性最低
  39. }
  40. if($to_user_info['gender'] == 0 && $to_user_info['real_status'] == 1){
  41. $tous_level = 30;
  42. }
  43. if($to_user_info['gender'] == 0 && $to_user_info['real_status'] != 1){
  44. $tous_level = 20;
  45. }
  46. if($to_user_info['gender'] == 1){
  47. $tous_level = 10;
  48. }
  49. //同性不收钱
  50. //都是男的,不扣钱
  51. //都是实名认证的女性,不扣钱
  52. //都是未实名认证的女性,不扣钱
  53. if($auth_level == $tous_level){
  54. $price = 0;$money = 0;
  55. }
  56. Db::startTrans();
  57. //记录日志
  58. $data = [
  59. 'user_id' => $this->auth->id,
  60. 'price' => $price,
  61. 'createtime' => time(),
  62. 'to_user_id' => $to_user_id,
  63. 'money' => $money,
  64. ];
  65. $log_id = Db::name('user_match_video_log')->insertGetId($data);
  66. if(!$log_id){
  67. Db::rollback();
  68. $this->error('扣费失败');
  69. }
  70. //同性别,提前结束
  71. if($auth_level == $tous_level){
  72. Db::commit();
  73. $this->success('success');
  74. }
  75. //扣钱uid,收钱uid,收钱free_video
  76. //分数少扣钱,分数多收益
  77. if($auth_level < $tous_level){
  78. $kou_user = $this->auth->id;
  79. $get_user = $to_user_info['id'];
  80. $get_user_free = $to_user_info['free_video'];
  81. }else{
  82. $kou_user = $to_user_info['id'];
  83. $get_user = $this->auth->id;
  84. $get_user_free = $this->auth->free_video;
  85. }
  86. //需要扣别人的钱,判断钱是否购
  87. if($price > 0 && $kou_user != $this->auth->id){
  88. $gold = model('wallet')->getWallet($kou_user,'gold');
  89. if(bccomp($price,$gold) == 1){
  90. Db::rollback();
  91. $this->error('对方金币不足');
  92. }
  93. }
  94. //有性别差,扣费
  95. if($price > 0){
  96. $rs = model('wallet')->lockChangeAccountRemain($kou_user,'gold',-$price,11,'','user_match_video_log',$log_id);
  97. if($rs['status'] === false){
  98. Db::rollback();
  99. $this->error($rs['msg']);
  100. }
  101. }
  102. //另一方加钱,0收费
  103. if($money > 0 && $get_user_free == 0){
  104. $rs = model('wallet')->lockChangeAccountRemain($get_user,'money',$money,21,'','user_match_video_log',$log_id);
  105. if($rs['status'] === false){
  106. Db::rollback();
  107. $this->error($rs['msg']);
  108. }
  109. }
  110. Db::commit();
  111. $this->success('success');
  112. }
  113. //语音通话每分钟调用一次
  114. public function audio_onemin(){
  115. //检测用户
  116. $to_user_id = input_post('to_user_id');
  117. $to_user_info = Db::name('user')->field('id,real_status,gender,free_video,free_audio,free_typing')->where('id',$to_user_id)->find();
  118. if(!$to_user_info){
  119. $this->error('不存在的用户');
  120. }
  121. //正常价格
  122. $price = config('site.audio_min_price'); //扣费金币
  123. $bili = config('site.money_to_gold'); //兑换比例
  124. $gift_plat_scale = config('site.gift_plat_scale'); //抽成比例
  125. $money = bcdiv($price,$bili,2); //对应人民币
  126. $money = bcdiv(bcmul($money,100 - $gift_plat_scale,2),100,2); //抽成后收益
  127. //发起用户的分数,被发起用户的分数。按性别给分
  128. $auth_level = 0;
  129. $tous_level = 0;
  130. //打分
  131. if($this->auth->gender == 0 && $this->auth->real_status == 1){
  132. $auth_level = 30;//实名女最高
  133. }
  134. if($this->auth->gender == 0 && $this->auth->real_status != 1){
  135. $auth_level = 20;//未实名女次之
  136. }
  137. if($this->auth->gender == 1){
  138. $auth_level = 10;//男性最低
  139. }
  140. if($to_user_info['gender'] == 0 && $to_user_info['real_status'] == 1){
  141. $tous_level = 30;
  142. }
  143. if($to_user_info['gender'] == 0 && $to_user_info['real_status'] != 1){
  144. $tous_level = 20;
  145. }
  146. if($to_user_info['gender'] == 1){
  147. $tous_level = 10;
  148. }
  149. //同性不收钱
  150. //都是男的,不扣钱
  151. //都是实名认证的女性,不扣钱
  152. //都是未实名认证的女性,不扣钱
  153. if($auth_level == $tous_level){
  154. $price = 0;$money = 0;
  155. }
  156. Db::startTrans();
  157. //记录日志
  158. $data = [
  159. 'user_id' => $this->auth->id,
  160. 'price' => $price,
  161. 'createtime' => time(),
  162. 'to_user_id' => $to_user_id,
  163. 'money' => $money,
  164. ];
  165. $log_id = Db::name('user_match_audio_log')->insertGetId($data);
  166. if(!$log_id){
  167. Db::rollback();
  168. $this->error('扣费失败');
  169. }
  170. //同性别,提前结束
  171. if($auth_level == $tous_level){
  172. Db::commit();
  173. $this->success('success');
  174. }
  175. //扣钱uid,收钱uid,收钱free_video
  176. //分数少扣钱,分数多收益
  177. if($auth_level < $tous_level){
  178. $kou_user = $this->auth->id;
  179. $get_user = $to_user_info['id'];
  180. $get_user_free = $to_user_info['free_audio'];
  181. }else{
  182. $kou_user = $to_user_info['id'];
  183. $get_user = $this->auth->id;
  184. $get_user_free = $this->auth->free_audio;
  185. }
  186. //需要扣别人的钱,判断钱是否购
  187. if($price > 0 && $kou_user != $this->auth->id){
  188. $gold = model('wallet')->getWallet($kou_user,'gold');
  189. if(bccomp($price,$gold) == 1){
  190. Db::rollback();
  191. $this->error('对方金币不足');
  192. }
  193. }
  194. //有性别差,扣费
  195. if($price > 0){
  196. $rs = model('wallet')->lockChangeAccountRemain($kou_user,'gold',-$price,12,'','user_match_audio_log',$log_id);
  197. if($rs['status'] === false){
  198. Db::rollback();
  199. $this->error($rs['msg']);
  200. }
  201. }
  202. //另一方加钱,0收费
  203. if($money > 0 && $get_user_free == 0){
  204. $rs = model('wallet')->lockChangeAccountRemain($get_user,'money',$money,22,'','user_match_audio_log',$log_id);
  205. if($rs['status'] === false){
  206. Db::rollback();
  207. $this->error($rs['msg']);
  208. }
  209. }
  210. Db::commit();
  211. $this->success('success');
  212. }
  213. //打字聊天每句话调用一次
  214. public function typing_once(){
  215. //检测用户
  216. $to_user_id = input_post('to_user_id');
  217. $to_user_info = Db::name('user')->field('id,real_status,gender,free_video,free_audio,free_typing')->where('id',$to_user_id)->find();
  218. if(!$to_user_info){
  219. $this->error('不存在的用户');
  220. }
  221. //正常价格
  222. $price = config('site.typing_min_price'); //扣费金币
  223. $bili = config('site.money_to_gold'); //兑换比例
  224. $gift_plat_scale = config('site.gift_plat_scale'); //抽成比例
  225. $money = bcdiv($price,$bili,2); //对应人民币
  226. $money = bcdiv(bcmul($money,100 - $gift_plat_scale,2),100,2); //抽成后收益
  227. //发起用户的分数,被发起用户的分数。按性别给分
  228. $auth_level = 0;
  229. $tous_level = 0;
  230. //打分
  231. if($this->auth->gender == 0 && $this->auth->real_status == 1){
  232. $auth_level = 30;//实名女最高
  233. }
  234. if($this->auth->gender == 0 && $this->auth->real_status != 1){
  235. $auth_level = 20;//未实名女次之
  236. }
  237. if($this->auth->gender == 1){
  238. $auth_level = 10;//男性最低
  239. }
  240. if($to_user_info['gender'] == 0 && $to_user_info['real_status'] == 1){
  241. $tous_level = 30;
  242. }
  243. if($to_user_info['gender'] == 0 && $to_user_info['real_status'] != 1){
  244. $tous_level = 20;
  245. }
  246. if($to_user_info['gender'] == 1){
  247. $tous_level = 10;
  248. }
  249. //同性不收钱
  250. //都是男的,不扣钱
  251. //都是实名认证的女性,不扣钱
  252. //都是未实名认证的女性,不扣钱
  253. if($auth_level == $tous_level){
  254. $price = 0;$money = 0;
  255. }
  256. //性别优势的人发起,免费
  257. if($auth_level > $tous_level){
  258. $price = 0;$money = 0;
  259. }
  260. Db::startTrans();
  261. //记录日志
  262. $data = [
  263. 'user_id' => $this->auth->id,
  264. 'price' => $price,
  265. 'createtime' => time(),
  266. 'to_user_id' => $to_user_id,
  267. 'money' => $money,
  268. ];
  269. $log_id = Db::name('user_match_typing_log')->insertGetId($data);
  270. if(!$log_id){
  271. Db::rollback();
  272. $this->error('扣费失败');
  273. }
  274. //同性别,提前结束
  275. if($auth_level == $tous_level){
  276. Db::commit();
  277. $this->success('success');
  278. }
  279. //零消费,零收益消费,提前结束,其实这条没必要,下面金钱操作还会过滤一次
  280. if($price == 0 && $money == 0){
  281. Db::commit();
  282. $this->success('success');
  283. }
  284. //扣钱uid,收钱uid,收钱free_video
  285. //分数少扣钱,分数多收益
  286. if($auth_level < $tous_level){
  287. $kou_user = $this->auth->id;
  288. $get_user = $to_user_info['id'];
  289. $get_user_free = $to_user_info['free_typing'];
  290. }else{
  291. //这种已经没有了
  292. $kou_user = $to_user_info['id'];
  293. $get_user = $this->auth->id;
  294. $get_user_free = $this->auth->free_typing;
  295. }
  296. //有性别差,扣费
  297. if($price > 0){
  298. $rs = model('wallet')->lockChangeAccountRemain($kou_user,'gold',-$price,13,'','user_match_typing_log',$log_id);
  299. if($rs['status'] === false){
  300. Db::rollback();
  301. $this->error($rs['msg']);
  302. }
  303. }
  304. //另一方加钱,0收费
  305. if($money > 0 && $get_user_free == 0){
  306. $rs = model('wallet')->lockChangeAccountRemain($get_user,'money',$money,23,'','user_match_typing_log',$log_id);
  307. if($rs['status'] === false){
  308. Db::rollback();
  309. $this->error($rs['msg']);
  310. }
  311. }
  312. //tag任务赠送金币
  313. //搭讪奖励
  314. $task_rs = \app\common\model\TaskLog::tofinish($this->auth->id,15);
  315. if($task_rs === false){
  316. Db::rollback();
  317. $this->error('完成任务赠送奖励失败');
  318. }
  319. Db::commit();
  320. $this->success('success');
  321. }
  322. //语音匹配
  323. public function getaudiouser(){
  324. //给出备选用户
  325. $map = [
  326. 'user.status' =>1, //未封禁用户
  327. 'user.gender' => $this->auth->gender == 1 ? 0 : 1, //异性
  328. 'user.is_active' => 1, //在线的
  329. 'user.open_match_audio' => 1, //打开语聊开关
  330. ];
  331. if($this->auth->gender == 0){
  332. //或者未首充用户,且还有免费分钟数
  333. $map2['user.is_shouchong'] = 0;
  334. $map2['uw.audio_sec'] = ['gt',0];
  335. //男性要有最少一分钟的钱
  336. $map3['uw.gold'] = ['egt',$this->auth->match_audio_price];
  337. }else{
  338. $my_gold = Db::name('user_wallet')->where('user_id',$this->auth->id)->value('gold');
  339. $map2['user.match_audio_price'] = ['elt',$my_gold];
  340. }
  341. $lists = Db::name('user')->alias('user')->field('user.id,user.gender,user.birthday,user.avatar,user.nickname,user.match_audio_price')
  342. ->join('user_wallet uw','user.id = uw.user_id','LEFT')
  343. ->where($map)->where($map2)->order('user.logintime desc')->page($this->page,100)->select();
  344. if(empty($lists) && $this->auth->gender == 0){
  345. $lists = Db::name('user')->alias('user')->field('user.id,user.gender,user.birthday,user.avatar,user.nickname,user.match_audio_price')
  346. ->join('user_wallet uw','user.id = uw.user_id','LEFT')
  347. ->where($map)->where($map3)->order('user.logintime desc')->page($this->page,100)->select();
  348. }
  349. if(!empty($lists)){
  350. foreach($lists as $key => &$val){
  351. $val = info_domain_image($val,['avatar']);
  352. $val['age'] = birthtime_to_age($val['birthday']);
  353. unset($val['birthday']);
  354. $val['match_audio_price'] = $this->auth->gender == 0 ? $this->auth->match_audio_price : $val['match_audio_price'];
  355. }
  356. }
  357. $this->success('success',$lists);
  358. }
  359. //视频匹配
  360. public function getvideouser(){
  361. //给出备选用户
  362. $map = [
  363. 'user.status' =>1, //未封禁用户
  364. 'user.gender' => $this->auth->gender == 1 ? 0 : 1, //异性
  365. 'user.is_active' => 1, //在线的
  366. 'user.open_match_video' => 1, //打开语聊开关
  367. ];
  368. if($this->auth->gender == 0){
  369. //或者未首充用户,且还有免费分钟数
  370. $map2['user.is_shouchong'] = 0;
  371. $map2['uw.video_sec'] = ['gt',0];
  372. //男性要有最少一分钟的钱
  373. $map3['uw.gold'] = ['egt',$this->auth->match_video_price];
  374. }else{
  375. $my_gold = Db::name('user_wallet')->where('user_id',$this->auth->id)->value('gold');
  376. $map2['user.match_video_price'] = ['elt',$my_gold];
  377. }
  378. $lists = Db::name('user')->alias('user')->field('user.id,user.gender,user.birthday,user.avatar,user.nickname,user.match_audio_price')
  379. ->join('user_wallet uw','user.id = uw.user_id','LEFT')
  380. ->where($map)->where($map2)->order('user.logintime desc')->page($this->page,100)->select();
  381. if(empty($lists) && $this->auth->gender == 0){
  382. $lists = Db::name('user')->alias('user')->field('user.id,user.gender,user.birthday,user.avatar,user.nickname,user.match_audio_price')
  383. ->join('user_wallet uw','user.id = uw.user_id','LEFT')
  384. ->where($map)->where($map3)->order('user.logintime desc')->page($this->page,100)->select();
  385. }
  386. if(!empty($lists)){
  387. foreach($lists as $key => &$val){
  388. $val = info_domain_image($val,['avatar']);
  389. $val['age'] = birthtime_to_age($val['birthday']);
  390. unset($val['birthday']);
  391. $val['match_audio_price'] = $this->auth->gender == 0 ? $this->auth->match_audio_price : $val['match_audio_price'];
  392. }
  393. }
  394. $this->success('success',$lists);
  395. }
  396. //聊天匹配
  397. public function gettypinguser(){
  398. //给出备选用户
  399. $map = [
  400. 'user.status' =>1, //未封禁用户
  401. 'user.gender' => $this->auth->gender == 1 ? 0 : 1, //异性
  402. ];
  403. if($this->auth->gender == 0){
  404. //或者未首充用户,且还有免费分钟数
  405. $map2['user.is_shouchong'] = 0;
  406. $map2['uw.typing_times'] = ['gt',0];
  407. //男性要有最少一分钟的钱
  408. $map3['uw.gold'] = ['egt',$this->auth->match_typing_price];
  409. }else{
  410. $my_gold = Db::name('user_wallet')->where('user_id',$this->auth->id)->value('gold');
  411. $map2['user.match_typing_price'] = ['elt',$my_gold];
  412. }
  413. $lists = Db::name('user')->alias('user')->field('user.id')
  414. ->join('user_wallet uw','user.id = uw.user_id','LEFT')
  415. ->where($map)->where($map2)->order('user.logintime desc')->page($this->page,100)->select();
  416. if(empty($lists) && $this->auth->gender == 0){
  417. $lists = Db::name('user')->alias('user')->field('user.id')
  418. ->join('user_wallet uw','user.id = uw.user_id','LEFT')
  419. ->where($map)->where($map3)->order('user.logintime desc')->page($this->page,100)->select();
  420. }
  421. $this->success('success',$lists);
  422. }
  423. //过滤规则
  424. private function fliter_user($lists){
  425. if(empty($lists)){
  426. return $lists;
  427. }
  428. //过滤掉通话中的
  429. foreach($lists as $key => $val){
  430. if(redis_matching_get($val['id']) == 1){
  431. unset($lists[$key]);
  432. }
  433. }
  434. return $lists;
  435. }
  436. //亲密度等级信息
  437. public function intimacylevel() {
  438. $user_id = input('user_id', 0, 'intval'); //对方id
  439. if (!$user_id) {
  440. $this->error('参数缺失');
  441. }
  442. if ($this->auth->gender == 0) { //女用户
  443. $where['uid'] = $user_id;
  444. $where['other_uid'] = $this->auth->id;
  445. } else { //男用户
  446. $where['uid'] = $this->auth->id;
  447. $where['other_uid'] = $user_id;
  448. }
  449. $level = 0; //当前等级
  450. $level_name = ''; //当前等级名称
  451. $qinmi_sum = 0; //当前亲密度
  452. $next_level_diff = 0; //距下一等级亲密度差值
  453. $next_level_name = 0; //下一等级名称
  454. $next_level_value = 0;//下一等级亲密度值
  455. //亲密度等级列表
  456. $list = Db::name('intimacy_level')->field('name,level,value')->order('value')->select();
  457. //当前亲密度信息
  458. $user_intimacy_info = Db::name('user_intimacy')->where($where)->find();
  459. if ($user_intimacy_info) {
  460. //当前亲密度
  461. $qinmi_sum = $user_intimacy_info['value'];
  462. if ($list) {
  463. //当前等级信息
  464. $level_info = Db::name('intimacy_level')->where(['value' => ['elt', $user_intimacy_info['value']]])->order('level desc')->find();
  465. if ($level_info) {
  466. $level = $level_info['level'];
  467. $level_name = $level_info['name'];
  468. }
  469. //下一等级信息
  470. $next_level_info = Db::name('intimacy_level')->where(['value' => ['gt', $user_intimacy_info['value']]])->order('value')->find();
  471. if ($next_level_info) {
  472. $next_level_name = $next_level_info['name'];
  473. $next_level_value = $next_level_info['value'];
  474. $next_level_diff = $next_level_info['value'] - $user_intimacy_info['value'];
  475. }
  476. }
  477. } else {
  478. $next_level = Db::name('intimacy_level')->order('value')->find();
  479. $next_level_diff = $next_level['value'];
  480. $next_level_name = $next_level['name'];
  481. $next_level_value = $next_level['value'];
  482. }
  483. if ($list) {
  484. foreach ($list as &$v) {
  485. if ($v['level'] < $level) {
  486. $v['is_unlock'] = 1; //当前等级是否解锁: 1已解锁 2当前等级 3未解锁
  487. } elseif ($v['level'] == $level) {
  488. $v['is_unlock'] = 2;
  489. } else {
  490. $v['is_unlock'] = 3;
  491. }
  492. }
  493. }
  494. $data['level'] = $level; //当前等级
  495. $data['level_name'] = $level_name; //当前等级名称
  496. $data['qinmi_sum'] = $qinmi_sum; //当前亲密度
  497. $data['next_level_diff'] = $next_level_diff; //距下一等级亲密度差值
  498. $data['next_level_name'] = $next_level_name; //下一等级名称
  499. $data['next_level_value'] = $next_level_value; //下一等级亲密度值
  500. $data['level_list'] = $list; //等级列表
  501. $this->success('亲密度等级信息', $data);
  502. }
  503. public function test(){
  504. $this->addintimacy(1,3,20);
  505. }
  506. //增加亲密度,顺带升级
  507. public function addintimacy($uid = 0, $other_uid = 0, $value = 0) {
  508. //增加亲密度
  509. $level_remark = ''; //亲密度等级是否变动: 0未变动 >0是亲密度等级
  510. $user_intimacy_info = Db::name('user_intimacy')->where(['uid' => $uid, 'other_uid' => $other_uid])->find();
  511. if ($user_intimacy_info) {
  512. $user_intimacy_data['value'] = $user_intimacy_info['value'] + $value;
  513. $level = Db::name('intimacy_level')->where(['value' => ['elt', $user_intimacy_data['value']]])->order('level desc')->find();
  514. if ($level) {
  515. $user_intimacy_data['level'] = $level['level'];
  516. if ($level['level'] != $user_intimacy_info['level']) {
  517. $level_remark = "恭喜你们亲密度达到".$level['level']."级,获得称号'".$level['name']."'";
  518. }
  519. }
  520. $user_intimacy_rs = Db::name('user_intimacy')->where(['uid' => $uid, 'other_uid' => $other_uid])->setField($user_intimacy_data);
  521. } else {
  522. $user_intimacy_data['uid'] = $uid;
  523. $user_intimacy_data['other_uid'] = $other_uid;
  524. $user_intimacy_data['value'] = $value;
  525. $level = Db::name('intimacy_level')->where(['value' => ['elt', $value]])->order('level desc')->find();
  526. if ($level) {
  527. $user_intimacy_data['level'] = $level['level'];
  528. $level_remark = "恭喜你们亲密度达到".$level['level']."级,获得称号'".$level['name']."'";
  529. }
  530. $user_intimacy_rs = Db::name('user_intimacy')->insertGetId($user_intimacy_data);
  531. }
  532. return ['status' => $user_intimacy_rs, 'level_remark' => $level_remark];
  533. }
  534. }