Order.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  1. <?php
  2. namespace App\Modes;
  3. use App\Service\UpgradeService;
  4. use Illuminate\Database\Eloquent\Model;
  5. use PhpParser\Error;
  6. /**
  7. * App\Modes\Order
  8. *
  9. * @property int $id
  10. * @property int|null $type 订单类型 1-升级支付 2-购买广告支付 2-点币购买
  11. * @property int|null $uid 会员ID
  12. * @property string|null $order_no 订单号
  13. * @property float|null $price 金额
  14. * @property int|null $is_pay 订单支付状态(0.未支付,1.已支付)
  15. * @property string|null $pay_type 支付方式 (wechat微信支付, alipay支付宝支付)
  16. * @property string|null $pay_no 商户交易号
  17. * @property string|null $pay_at 支付时间
  18. * @property string|null $desc 订单描述
  19. * @property int|null $status 订单状态(0.无效,1.新订单,2.待支付,3.有效)
  20. * @property int|null $is_deleted 删除状态(1删除,0未删除)
  21. * @property string|null $create_at 创建时间
  22. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order newModelQuery()
  23. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order newQuery()
  24. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order query()
  25. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order whereCreateAt($value)
  26. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order whereDesc($value)
  27. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order whereId($value)
  28. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order whereIsDeleted($value)
  29. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order whereIsPay($value)
  30. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order whereOrderNo($value)
  31. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order wherePayAt($value)
  32. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order wherePayNo($value)
  33. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order wherePayType($value)
  34. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order wherePrice($value)
  35. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order whereStatus($value)
  36. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order whereType($value)
  37. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order whereUid($value)
  38. * @mixin \Eloquent
  39. * @property \Illuminate\Support\Carbon $updated_at
  40. * @method static \Illuminate\Database\Eloquent\Builder|\App\Modes\Order whereUpdatedAt($value)
  41. */
  42. class Order extends Model
  43. {
  44. protected $table = 'order';
  45. /**
  46. * 生成订单号
  47. * @author lyh
  48. * @date 2019/3/22
  49. * @description
  50. */
  51. public static function makeOrderNo()
  52. {
  53. list($msec, $sec) = explode(' ', microtime());
  54. $msectime = (int)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000) . rand(100, 999);
  55. return $msectime;
  56. }
  57. /**
  58. * 添加订单
  59. * @author lyh
  60. * @date 2019/3/22
  61. * @param array $orderData
  62. * @return int
  63. * @description
  64. */
  65. public static function insertData(array $orderData)
  66. {
  67. return Order::insertGetId($orderData);
  68. }
  69. /*
  70. * 计算当月或者当年的业绩
  71. * addby wsl 20190626
  72. *
  73. *
  74. public static function getMonthOrYearStat($uid,$childarr,$stype='month'){
  75. $startime=$stype=='month'?date('Y-m-01 00:00:00'):date('Y-01-01 00:00:00');
  76. $curdate=date('Y-m-d H:i:s');
  77. if(!empty($childarr)){
  78. $sumprice=Order::where(function ($query) use ($childarr,$uid){
  79. $query->where('uid','=',$uid)
  80. ->orWhere(function ($query) use ($childarr){
  81. $query->whereIn('uid',$childarr)
  82. ->where('type','=',2);
  83. });
  84. })->where('is_pay','=',1)
  85. ->whereBetween('create_at',[$startime,$curdate])->sum('price');
  86. }else{
  87. $sumprice=Order::where('uid','=',$uid)
  88. ->where('is_pay','=',1)
  89. ->whereBetween('create_at',[$startime,$curdate])->sum('price');
  90. }
  91. return $sumprice;
  92. }*/
  93. /*
  94. * 计算当月或者当年的业绩
  95. * addby wsl 20190626
  96. *
  97. * */
  98. public static function getMonthOrYearStat($uid,$childarr,$stype='month'){
  99. $startime=$stype=='month'?date('Y-m-01 00:00:00'):date('Y-01-01 00:00:00');
  100. $curdate=date('Y-m-d H:i:s');
  101. $childarr[]=$uid;
  102. //自己和下级升级代理等级的费用
  103. $upgrade=Upgrade::whereUid($uid)->whereIn('status',[3,9])
  104. ->whereBetween('created_at',[$startime,$curdate]);
  105. //自己和下级发布广告的费用
  106. $adver=Advertising::whereIn('status',[3,4,9])->whereIn('uid',$childarr)
  107. ->whereBetween('created_at',[$startime,$curdate]);
  108. //自己申请地区代理的费用
  109. $proxy=\DB::table('proxy_area as pa')
  110. ->join('order as o','o.id','=','pa.order_id')
  111. ->where('pa.uid','=',$uid)->where('pa.status','=',3)
  112. ->whereBetween('pa.created_at',[$startime,$curdate]);
  113. // 2021/8/2
  114. $coin = Order::whereUid($uid)->whereIn('status',[3])->whereIn('type',[3])->whereBetween('created_at',[$startime,$curdate]);
  115. //冻结时间内的收益不算
  116. $frozentimelist=Frozen::getUserFrozentimeList($uid,$startime,$curdate);
  117. if(!empty($frozentimelist)){
  118. foreach($frozentimelist as $item){
  119. $upgrade->whereBetween('created_at',[$item['startime'],$item['endtime']],'and',true);
  120. $adver->whereBetween('created_at',[$item['startime'],$item['endtime']],'and',true);
  121. $proxy->whereBetween('pa.created_at',[$item['startime'],$item['endtime']],'and',true);
  122. $coin->whereBetween('created_at',[$item['startime'],$item['endtime']],'and',true);
  123. }
  124. }
  125. //计算审核并且已支付的订单
  126. $upgradesum=$upgrade->sum('money');
  127. $proxyareasum=$proxy->sum('o.price');
  128. $adversum=$adver->sum('total_price');
  129. $coinsum=$coin->sum('price');
  130. $sum=round($adversum+$proxyareasum+$upgradesum+$coinsum,3);
  131. return $sum;
  132. }
  133. /**
  134. * 验证订单支付结果
  135. * @author lyh
  136. * @date 2019/3/22
  137. * @param $out_trade_no
  138. * @param $price
  139. * @param $status
  140. * @param int $payType 支付方式 0-未支付 1-现金 2-支付宝 3-微信 4-银行转账 5-桃牛支付
  141. * @description
  142. * $order->type : 订单类型 1-升级支付 2-购买广告支付 2-点币购买
  143. */
  144. public static function verifyOrder($out_trade_no, $price, $payType,$trade_no=null)
  145. {
  146. // 更新订单状态
  147. $order = Order::whereOrderNo($out_trade_no)->first();
  148. if (empty($order)) {
  149. ErrorLog::saveMsg('订单号[' . $out_trade_no . ']不存在');
  150. }
  151. if($order->is_pay==1){
  152. exit;
  153. }
  154. $updateOrder = Order::whereOrderNo($out_trade_no)->update(['is_pay' => 1, 'status' => 1,'pay_no'=>$trade_no]);
  155. if (empty($updateOrder)) {
  156. ErrorLog::saveMsg('更新订单[' . $out_trade_no . ']状态失败');
  157. }
  158. // 保存账号流水
  159. // AccountLog::insert([
  160. // 'uid' => $order->uid,
  161. // 'type' => 10,
  162. // 'status' => 1,
  163. // 'money_type' => 2,
  164. // 'money' => $price,
  165. // 'current_money' => self::getCurentMoney($order->type, $order->uid),
  166. // 'remark' => self::getRemark($uid = $order->uid, $type = $order->type, $price = $order->price)
  167. // ]);
  168. //自动升级 addbywsl 201900626 start
  169. //找出自己的所有直属下级
  170. $uid=$order->uid;
  171. $childarr=User::where('invitor','=',$uid)->get(['id']);
  172. if(!empty($childarr)){
  173. $childarr=$childarr->toArray();
  174. $arr=[];
  175. if(!empty($childarr)){
  176. foreach ($childarr as $ke=>$ve){
  177. $arr[]=$ve['id'];
  178. }
  179. }
  180. $montstat=Order::getMonthOrYearStat($uid,$arr,'month');
  181. $yearstat=Order::getMonthOrYearStat($uid,$arr,'year');
  182. //找到对应订单并且统计
  183. $userinfo=User::where('id','=',$uid)->first()->toArray();
  184. //根据用户等级找到相关配置
  185. $setting=Proxy::getSettingByAreaAndLevel($userinfo['level']+1,$userinfo['province'],$userinfo['city'],$userinfo['district']);
  186. if(!empty($setting)){
  187. if((!empty($setting['upgrade_business_month'])&&$setting['upgrade_business_month']!='0.000'&&$montstat>=$setting['upgrade_business_month']&&!empty($setting['upgrade_business_month']))
  188. ||(!empty($setting['upgrade_business_year'])&&$setting['upgrade_business_year']!='0.000'&&$yearstat>=$setting['upgrade_business_year']&&!empty($setting['upgrade_business_year']))
  189. ){
  190. //进行升级
  191. $levelarr=['A','B','C','D','E','F','G','H'];
  192. $upGradeData = [
  193. 'uid' => \Auth::id(),
  194. 'user_level' => \Auth::user()->level,
  195. 'apply_level' => $userinfo['level']+1,
  196. 'money' => 0,
  197. 'remark' => sprintf("用户推荐量达标,由[%s]级升级到等级[%s]级",$levelarr[$userinfo['level']-1], $levelarr[$userinfo['level']]),
  198. 'status' => 3,
  199. 'upgrade_way' => 4,
  200. 'province'=>$userinfo['province'],
  201. 'city'=>$userinfo['city'],
  202. 'district'=>$userinfo['district'],
  203. ];
  204. Upgrade::insertGetId($upGradeData);
  205. User::whereId($uid)->update(['level' => $userinfo['level']+1]);
  206. }
  207. }
  208. }
  209. if ($order->type == 2) {
  210. // todo 广告位
  211. Advertising::updateAdver($out_trade_no);
  212. } else if ($order->type == 1) {
  213. // todo 升级支付
  214. Upgrade::updateByPay($out_trade_no);
  215. } else if ($order->type == 3) {
  216. //点币购买
  217. UserCoin::updateCoin($order->id);
  218. // 保存账号流水
  219. /*AccountLog::insert([
  220. 'uid' => $order->uid,
  221. 'type' => 32,
  222. 'status' => 1,
  223. 'money_type' => 1,
  224. 'money' => $order->price,
  225. 'current_money' => \Auth::user()->coin,
  226. 'remark' => self::getRemark($uid = $order->uid, 32, $price = $order->price)
  227. ]);*/
  228. } else if ($order->type == 4) {
  229. ProxyArea::updateByVarify($order->id);
  230. } else {
  231. ErrorLog::saveMsg('订单类型不存在');
  232. }
  233. }
  234. /**
  235. * 分佣算法 add by wsl 20190626
  236. * $fymoney 用户支付的钱
  237. * $uid 当前支付的用户id
  238. * $paytype 类型,与order表的type对应
  239. * */
  240. public static function UserFenYong($fymoney,$uid,$paytype)
  241. {
  242. $fymoney=floatval($fymoney);
  243. if(empty($fymoney)){
  244. return;
  245. }
  246. $userinfo = User::whereId($uid)->first()->toArray();
  247. $proxy_type = $paytype == 2 ? 2 : 1;
  248. //全局分佣,用户冻结的情况下不分佣ok
  249. Order::getAreaFenyong($userinfo, $fymoney, $proxy_type);
  250. //1.获取直推信息
  251. if (!empty($userinfo['invitor'])) {
  252. $parentinfo = User::whereId($userinfo['invitor'])->first();
  253. }
  254. if (!empty($parentinfo->id)) {
  255. $parentinfo = $parentinfo->toArray();
  256. //获取直属上级的配置,冻结的不参与分佣ok
  257. $parentsetting = Proxy::getSettingByAreaAndLevel($parentinfo['level'], $parentinfo['province'], $parentinfo['city'], $parentinfo['district']);
  258. if (!empty($parentsetting) && $parentinfo['status'] == 1) {
  259. //算分佣
  260. if ($paytype == 2) {
  261. $parentpersent = $parentsetting['adver_invite'];
  262. $rmarkstr = '广告费';
  263. $ztlogtype=10;
  264. $j1logtype=11;
  265. $j2logtype=12;
  266. } else {
  267. $parentpersent = $parentsetting['proxy_invite'];
  268. $rmarkstr = '代理费';
  269. $ztlogtype=20;
  270. $j1logtype=21;
  271. $j2logtype=22;
  272. }
  273. //比例不为0才算分佣
  274. if (!empty($parentpersent) && $parentpersent > 0) {
  275. $parentmoney = $parentpersent / 100 * $fymoney;
  276. $remark = '用户【id:' . $uid . '】,支付' . $rmarkstr . ',' . $fymoney . '元,得到直推佣金【' . $parentmoney . '】';
  277. //给直推上级添加余额并生成记录
  278. Order::updateUserAndinsertLog($parentinfo, $parentmoney, $remark, $uid,$ztlogtype);
  279. // zch 新增累加用户账户统计信息
  280. if ($rmarkstr=='广告费') {
  281. UpgradeService::incUserAccount($parentinfo['id'],'adver_commission',$parentmoney);
  282. }elseif($rmarkstr=='代理费'){
  283. UpgradeService::incUserAccount($parentinfo['id'],'proxy_commission',$parentmoney);
  284. }
  285. Order::sendFenyongMsg('直推'.$rmarkstr.'分佣',$parentmoney,$parentinfo['id']);
  286. }
  287. }
  288. //间分佣算法 start冻结的不参与分佣ok
  289. if (!empty($parentinfo['invitor'])) {
  290. $jian1info = User::whereId($parentinfo['invitor'])->first();
  291. if (!empty($jian1info->id) && $jian1info->status == 1) {
  292. $jian1info = $jian1info->toArray();
  293. //间1分佣
  294. $jian1money = Order::jianFenYong($jian1info, $fymoney, 1, $proxy_type);
  295. if (!empty($jian1money)) {
  296. $remark = '用户【id:' . $uid . '】,支付' . $rmarkstr . ',' . $fymoney . '元,得到间1佣金【' . $jian1money . '】';
  297. //生成记录
  298. Order::updateUserAndinsertLog($jian1info, $jian1money, $remark, $uid,$j1logtype);
  299. // zch 新增累加用户账户统计信息
  300. if ($rmarkstr=='广告费') {
  301. UpgradeService::incUserAccount($jian1info['id'],'adver_commission',$jian1money);
  302. }elseif($rmarkstr=='代理费'){
  303. UpgradeService::incUserAccount($jian1info['id'],'proxy_commission',$jian1money);
  304. }
  305. Order::sendFenyongMsg("间1".$rmarkstr.'分佣',$jian1money,$jian1info['id']);
  306. }
  307. }
  308. //间2的分佣 冻结的不参与分佣ok
  309. if (!empty($jian1info['invitor'])) {
  310. $jiantwoinfo = User::whereId($jian1info['invitor'])->first();
  311. if (!empty($jiantwoinfo->id) && $jiantwoinfo->status == 1) {
  312. $jiantwoinfo = $jiantwoinfo->toArray();
  313. $jiantwomoney = Order::jianFenYong($jiantwoinfo, $fymoney, 2, $proxy_type);
  314. if (!empty($jiantwomoney)) {
  315. $remark = '用户【id:' . $uid . '】,支付' . $rmarkstr . ',' . $fymoney . '元,得到间2佣金【' . $jiantwomoney . '】';
  316. //生成记录
  317. Order::updateUserAndinsertLog($jiantwoinfo, $jiantwomoney, $remark, $uid,$j2logtype);
  318. // zch 新增累加用户账户统计信息
  319. if ($rmarkstr=='广告费') {
  320. UpgradeService::incUserAccount($jiantwoinfo['id'],'adver_commission',$jiantwomoney);
  321. }elseif($rmarkstr=='代理费'){
  322. UpgradeService::incUserAccount($jiantwoinfo['id'],'proxy_commission',$jiantwomoney);
  323. }
  324. Order::sendFenyongMsg('间2'.$rmarkstr.'分佣',$jiantwomoney,$jiantwoinfo['id']);
  325. }
  326. }
  327. }
  328. }
  329. //间分佣算法 end
  330. }
  331. }
  332. public static function sendFenyongMsg($profittype,$money,$uid){
  333. $msg_content=MsgTemplate::getTemplateContent(11,['profittype'=>$profittype,'money'=>$money]);
  334. $msgarr = ['uid'=>$uid,'title' => '佣金到账通知', 'type' => 5, 'content' => $msg_content];
  335. UserMsg::SendGetui($msgarr);
  336. }
  337. /*
  338. * wsl
  339. * 获取区域代理的分佣
  340. * $userinfo 当前所发生交易的用户
  341. * */
  342. public static function getAreaFenyong($userinfo,$fymoney,$proxy_type){
  343. $money=0;
  344. //找到该区的所有区域代理
  345. /*$proxyarea=ProxyArea::whereProvince($userinfo['province'])
  346. ->whereCity($userinfo['city'])->OrwhereDistrict($userinfo['district'])
  347. ->whereStatus(3)->distinct()->get();*/
  348. $proxyarea=ProxyArea::whereStatus(3)
  349. ->where(function($query) use ($userinfo){
  350. $query->orWhere(function($q)use($userinfo){
  351. $q->where('province','=',$userinfo['province'])
  352. ->where('city','=',$userinfo['city'])
  353. ->where('district','=',$userinfo['district']);
  354. })->orWhere(function($q2)use ($userinfo){
  355. $q2->where('province','=',$userinfo['province'])
  356. ->where('city','=',$userinfo['city']);
  357. });
  358. })->distinct()->get();
  359. if(!empty($proxyarea)){
  360. //循环
  361. foreach($proxyarea as $key=>$item){
  362. //查找每个用户的配置信息冻结账户不参与分佣
  363. $areauinfo=User::whereId($item->uid)->whereStatus(1)->first();
  364. if(!empty($areauinfo->id)){
  365. $areauinfo=$areauinfo->toArray();
  366. $setting=Proxy::getSettingByAreaAndLevel($areauinfo['level'],$areauinfo['province'],$areauinfo['city'],$areauinfo['district']);
  367. //根据配置算出分佣,并添加进记录和余额
  368. if($proxy_type==2){
  369. $money=$setting['adver_invite_global']*$fymoney/100;
  370. $re='广告费';
  371. $logtype=13;
  372. }else{
  373. $money=$setting['proxy_invite_global']*$fymoney/100;
  374. $re='代理费';
  375. $logtype=23;
  376. }
  377. $remark='用户【id:'.$userinfo['id'].'】,支付'.$re.','.$fymoney.'元,得到全局分佣佣金【'.$money.'】';
  378. //修改记录
  379. Order::updateUserAndinsertLog($areauinfo,$money,$remark,$userinfo['id'],$logtype);
  380. // zch 新增累加用户账户统计信息
  381. if ($re=='广告费') {
  382. UpgradeService::incUserAccount($areauinfo['id'],'adver_commission',$money);
  383. } elseif ($re=='代理费') {
  384. UpgradeService::incUserAccount($areauinfo['id'],'proxy_commission',$money);
  385. }
  386. Order::sendFenyongMsg('全局'.$re.'分佣',$money,$areauinfo['id']);
  387. }
  388. }
  389. }
  390. return $money;
  391. }
  392. /**
  393. * 更新user表的月并且生成记录 add by wsl 20190626
  394. * $userinfo 要更新的用户信息 array
  395. * $money 变动金额
  396. * $remark 备注
  397. * $source_id 来源id 13全局广告费分佣 23全局代理费分佣 10直推广告费分佣 20直推代理费分佣 11间1广告分佣 21间1代理费分佣 12间2广告费分佣 22间2代理费分佣
  398. * */
  399. public static function updateUserAndinsertLog($userinfo,$money,$remark,$source_id,$type=5){
  400. \DB::beginTransaction();
  401. try {
  402. User::whereId($userinfo['id'])->update(['balance' => $userinfo['balance']+$money]);
  403. AccountLog::saveDataByPost($userinfo['id'],$type,$money,$userinfo['balance'],2,1,$remark,$source_id);
  404. \DB::commit();
  405. } catch (Exception $exception) {
  406. \DB::rollBack();
  407. }
  408. }
  409. /**
  410. * 计算间1间2分佣得到的金钱 add by wsl 20190626
  411. * $userinfo 上一级用户信息 array
  412. * $fymoney 当前用户支付的金钱
  413. * $jiantype 间1还是间2
  414. * $proxy_type 广告还是代理
  415. * */
  416. public static function jianFenYong($userinfo,$fymoney,$jiantype=1,$proxy_type){
  417. //获取间1的配置
  418. $setting=Proxy::getJian1OrJian2Setting($userinfo['level'],$userinfo['province'],$userinfo['city'],$userinfo['district'],$jiantype,$proxy_type);
  419. $jianmoney=0;
  420. if(!empty($setting)&& $userinfo['level']>1) {
  421. //计算间的直推下级
  422. $childcount = User::where('invitor', '=', $userinfo['id'])->count();
  423. //找到判定区间分配佣金//由于第一个设置不要,不需要判定第一个
  424. if ($childcount > $setting[1]['max'] && $childcount < $setting[2]['max'] && $setting[1]['max']>0 && $setting[2]['max']>0) {
  425. $jianmoney = $fymoney * $setting[1]['pct'] / 100;
  426. } elseif($childcount>$setting[2]['max']&&$setting[2]['max']>0) {
  427. $jianmoney = $fymoney * $setting[2]['pct'] / 100;
  428. }else{
  429. $jianmoney = $fymoney * $setting[0]['pct'] / 100;
  430. }
  431. }
  432. return $jianmoney;
  433. }
  434. /**
  435. * @author lyh
  436. * @date 2019/3/25
  437. * @param int $pay_type 支付方式 0-未支付 1-现金 2-支付宝 3-微信 4-银行转账 5-桃牛支付
  438. * @description
  439. */
  440. public static function getPayType($pay_type)
  441. {
  442. $value = ['未支付', '现金', '支付宝', '微信', '银行转账', '桃牛支付'];
  443. $value[21] = '支付宝';
  444. $value[31] = '微信';
  445. return $value[$pay_type];
  446. }
  447. private static function getCurentMoney($type, $uid)
  448. {
  449. $user = User::find($uid);
  450. if ($type = 1) {
  451. return $user->coin;
  452. } else {
  453. return $user->balance;
  454. }
  455. }
  456. private static function getRemark(int $uid, int $type, float $price)
  457. {
  458. $typeMsg = AccountLog::getTypeMsg($type);
  459. return "用户【id:{$uid}】,用途-{$typeMsg},金额【{$price}】";
  460. }
  461. }