
功能
Liao倩
这个作者很懒,什么都没留下…
展开
-
emoji表情的处理和保存
将emoji表情装码保存到数据库中function emoji2str($str){ $strEncode = ''; $length = mb_strlen($str,'utf-8'); for ($i=0; $i < $length; $i++) { $_tmpStr = mb_substr($str,$i,1,'utf-8'); if(strlen($_tmpSt.原创 2020-12-12 16:52:52 · 943 阅读 · 0 评论 -
thinkphp5事物锁
针对thinkphp5事物锁写法<?phpDb::startTrans(); 开启事物try{ $map['id'] = ['=',1];//要修改的商品库存id $map['count'] =['>=',$query];//请求的商品数量 $result=Db::table('goods') ->where($map) ->update(['count' => Db::raw('count-".$query."')]);原创 2020-08-04 09:26:26 · 452 阅读 · 0 评论 -
swoole完成订单取消
1创建订单是将订单id传到开启定时器的方法中如图:$authcontroller = new AuthController();authcontroller−>srartSwooleTimer(authcontroller->srartSwooleTimer(authcontroller−>srartSwooleTimer(sn);1在公共统控制器中开启...原创 2019-07-11 17:43:14 · 258 阅读 · 0 评论