<?php

namespace Api\Model;
use Think\Model;

/**
 * 订单_格子模型
 */
class OrderBoxModel extends Model{
	
	//打开箱门
	public function openDoor($box){
		$map['out_trade_no'] = $out_trade_no;
		$data['box'] = $box;
		$res = $this->where($map)->save($data);
	
		if($res){
			$where['mac_id'] = $mac_id;
			$where['num'] = array('in',$box);
			M('MachineBox')->where($where)->save(array('is_used'=>1));
			return true;
	
		}else{
			return false;
		}
	}

    

}
