$msg_obj = new messageModel(); //message处理对象 $rm_obj = new ReplyMessageModel(); //处理发送的model $infor = unserialize($row['parameter']); // 反序列化其他扩展信息 /*----- 根据账号来加载账号信息 -----*/ $ebayaccount = $row['account']; //所属账号 $token_file = WEB_PATH . "lib/ebaylibrary/keys/keys_" . $ebayaccount . ".php"; if (!file_exists($token_file)) { echo formatetime() . '---' . $token_file . " does not exists!!! at code line--" . __LINE__ . "\n"; // 密码文件不存在 $remsgque_obj->delAQueueRecords($row['id']); //数据不对直接删除 $msg_obj->updateMessageStatus(array($row['messageid']), 0); //重置message为0的状态 commitQuery(); continue; // 跳出当前循环 } include '' . $token_file; /*----- 根据账号来加载账号信息 -----*/ $msgid = $row['messageid']; //对应的message表的主键id if ($row['replytype'] == 1) { //带有回复内容的message回复 $content = $row['retext']; //回复内容 $copytosender = $infor['iscopy']; // 是否抄送 改值只能为0、1
public function view_markLocalStatus() { $ids = isset($_GET['msgids']) ? trim($_GET['msgids']) : ''; $status = isset($_GET['status']) ? intval($_GET['status']) : 0; if (empty($ids)) { //没有传入id值 $msgdata = array('errCode' => 10020, 'errMsg' => '请指定message!'); echo json_encode($msgdata); exit; } if ($status == 0) { $msgdata = array('errCode' => 10021, 'errMsg' => '请指定状态!'); echo json_encode($msgdata); exit; } if ($status == 1) { //标记为已经回复 $status = 2; } else { if ($status == 2) { //标记为未回复 $status = 0; } else { $msgdata = array('errCode' => 10024, 'errMsg' => '请指定正确的状态!'); echo json_encode($msgdata); exit; } } $ids = clearData($ids); $msg_obj = new messageModel(); $result = $msg_obj->updateMessageStatus($ids, $status, $_SESSION['globaluserid'], time()); //$result = $msg_obj->updateMessageStatus($ids, $status);//debug if ($result) { $msgdata = array('errCode' => 10023, 'errMsg' => '操作成功! '); echo json_encode($msgdata); exit; } else { $msgdata = array('errCode' => 10022, 'errMsg' => '操作失败!'); echo json_encode($msgdata); exit; } }