|
@@ -11,27 +11,28 @@ use think\Model;
|
|
|
*/
|
|
|
class OrderMsg extends Model
|
|
|
{
|
|
|
- public function addmsg($msg){
|
|
|
+ public static function addmsg($msg){
|
|
|
$conf=Config::get("order");
|
|
|
$order_type = $conf['order_type'];
|
|
|
- $order_status = $conf['order_status'];
|
|
|
- $content = $order_type[$msg['order_type']].':'.$msg['order_code']."状态由".$msg['name']."修改为"
|
|
|
- .$order_status[$msg['status']];
|
|
|
- $mguid =ProcessOrder::Where(["order_type"=>$msg['order_type'],['order_code'=>$msg['order_code']]])->column('action_uid,action_name');
|
|
|
+ $order_status = $conf['order_status'][$msg['order_type']];
|
|
|
+ $content = $order_type[$msg['order_type']].':'.$msg['order_code']."状态由".$msg['action_name']."修改为"
|
|
|
+ .$order_status[$msg['order_status']];
|
|
|
+ $mguid =ProcessOrder::Where(["order_type"=>$msg['order_type'],'order_code'=>$msg['order_code']])->column('action_uid,action_name');
|
|
|
if(!empty($mguid)){
|
|
|
$data=[];
|
|
|
- foreach ($mguid as $value){
|
|
|
- $temp=[];
|
|
|
- $temp['content']=$content;
|
|
|
- $temp['orderCode']=$msg['order_code'];
|
|
|
- $temp['order_type']=$msg['order_type'];
|
|
|
- $temp['uid']=$value['action_uid'];
|
|
|
- $temp['uname']=$value['action_uname'];
|
|
|
- $temp['is_read']=0;
|
|
|
- $temp['addtime']=date("Y-m-d H:i:s");
|
|
|
- $data[]=$temp;
|
|
|
- }
|
|
|
- $this->insertAll($data);
|
|
|
+ foreach ($mguid as $value){
|
|
|
+ $temp=[];
|
|
|
+ $temp['content']=$content;
|
|
|
+ $temp['orderCode']=$msg['order_code'];
|
|
|
+ $temp['order_type']=$msg['order_type'];
|
|
|
+ $temp['uid']=$value['action_uid'];
|
|
|
+ $temp['uname']=$value['action_name'];
|
|
|
+ $temp['is_read']=0;
|
|
|
+ $temp['addtime']=date("Y-m-d H:i:s");
|
|
|
+ $temp['updatetime']=date("Y-m-d H:i:s");
|
|
|
+ $data[]=$temp;
|
|
|
+ }
|
|
|
+ self::insertAll($data);
|
|
|
}
|
|
|
}
|
|
|
}
|