您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

One-day-学习笔记-商品成交时发送短信

2024/6/21 17:36:08发布28次查看
个人学习笔记(one)根据需求:商品成交时发送短信
html代码省略.....
model代码省略.....
1/* 2 * ------------------------------------------------- 3 * 修改状态 public 4 * author: lzp time:2016-05-27 5 * ------------------------------------------------- 6*/ 7 8publicfunction changestateaction() { 9$id = $_request['id'];10$result = $this->changeconfirmstate($id);11if ($result) {12$this->success(修改成功);13 } else {14$this->error(修改失败);15 }16 }1718privatefunction changeconfirmstate($id) {19$reg = $this->pricemodel->selectprice(['id'=>['eq', $id]]);20$rel = $this->demandmodel->selectdemand(['id'=>['eq',$reg[0]['demand_id']]]);21$demand_id = $reg[0]['demand_id'];22$reg['demand'] = $this->pricemodel->selectprice(['demand_id'=>['eq',$demand_id]]);23foreach ($reg['demand'] as$key => $value){24if($value['phone'] == $reg[0]['phone']){25unset($reg['demand'][$key]);26 }else{27$new[] = $value['phone'];28 }29 }31$new = ['0'=>'136********'];32if((time()-strtotime($rel[0]['create_time']))> 86400){33echo ;34die;35 }elseif(strtotime($rel[0]['finish_time'])>0){36echo ;37die;38 }else{39$data_demand = [ 'is_available' => 2, 'finish_time' => date(y-m-d h:i:s) ];40$result['price'] = $this->pricemodel->saveprice( ['id'=>['eq',$id]], ['state'=>2] );41$result['demadn'] = $this->demandmodel->savedemand(['id'=>['eq',$reg[0]['demand_id']]] , $data_demand);42$mobile = implode(,, $new);43$content = 此条需求已成交,下次再来哟!;44 smsapp($mobile,$content); //发短信45return$result;46 }47 }
以上就介绍了one-day-学习笔记-商品成交时发送短信,包括了发送短信,one方面的内容,希望对php教程有兴趣的朋友有所帮助。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product