Commit ec29aba1 authored by wwccw0591's avatar wwccw0591

pc

parent c644aa8f
...@@ -52,34 +52,35 @@ class IndexController extends \Our\Controller_Abstract { ...@@ -52,34 +52,35 @@ class IndexController extends \Our\Controller_Abstract {
} }
public function indexAction() { public function indexAction() {
echo 1;exit; //// echo 1;exit;
$orderDao = \DAO\Order\OrderModel::getInstance(); //// $orderDao = \DAO\Order\OrderModel::getInstance();
////
$res=$orderDao->getList(array('buyer_id'=>1),'*',0,10); //// $res=$orderDao->getList(array('buyer_id'=>1),'*',0,10);
echo json_encode($res);exit; //// echo json_encode($res);exit;
//$list = \Our\RedisHelper::cachedFunction(\Redis\Db4\GoodsBrowserRedisModel::getInstance(),array(&$browseDAO, 'getDistinctDate'),array($memberId,$startTime,$endTime,$order),\Our\ApiConst::twoMinSecond,array($memberId)); //// //$list = \Our\RedisHelper::cachedFunction(\Redis\Db4\GoodsBrowserRedisModel::getInstance(),array(&$browseDAO, 'getDistinctDate'),array($memberId,$startTime,$endTime,$order),\Our\ApiConst::twoMinSecond,array($memberId));
// $clientPush=\JPush\ClientPush::getInstance(); // $clientPush=\JPush\ClientPush::getInstance();
// $clientPush->pushAll(); // $clientPush->pushAll();
$mongoDb= new \Mongo\MongoDbModel(); // exit;
$res= $mongoDb->insert('message_history',array('id'=>1,'name'=>'chenchuanwen')); // $mongoDb= new \Mongo\MongoDbModel();
echo json_encode($res); // $res= $mongoDb->insert('message_history',array('id'=>1,'name'=>'chenchuanwen'));
exit; // echo json_encode($res);
\Our\Log::getInstance()->write('testLog|||||testLog'); // exit;
var_dump($_SERVER);exit; // \Our\Log::getInstance()->write('testLog|||||testLog');
// echo $_SERVER['USER']);exit; // var_dump($_SERVER);exit;
$elasticConfig=\Our\Common::getConfig('elastic.master'); // // echo $_SERVER['USER']);exit;
$configArray=array( // $elasticConfig=\Our\Common::getConfig('elastic.master');
$elasticConfig->host.':'.$elasticConfig->port, // $configArray=array(
); // $elasticConfig->host.':'.$elasticConfig->port,
$client=\Elasticsearch\ClientBuilder::create()->setHosts($configArray)->build(); // );
$res=array( // $client=\Elasticsearch\ClientBuilder::create()->setHosts($configArray)->build();
'id'=>'nignx-log*', // $res=array(
'index'=>'.kibana', // 'id'=>'nignx-log*',
'type'=>'index-pattern' // 'index'=>'.kibana',
); // 'type'=>'index-pattern'
$res=$client->getSource($res); // );
echo json_encode($res); // $res=$client->getSource($res);
exit; // echo json_encode($res);
// exit;
} }
public function check(){ public function check(){
......
...@@ -58,6 +58,20 @@ class MessageController extends \Our\Controller_AbstractApi { ...@@ -58,6 +58,20 @@ class MessageController extends \Our\Controller_AbstractApi {
\Error\ErrorModel::throwException(\Error\CodeConfigModel::removeMessage); \Error\ErrorModel::throwException(\Error\CodeConfigModel::removeMessage);
} }
} }
/**
* 更新webim消息
*
* @ccw
*/
public function removeAllAction(){
$messageService = \Business\Message\MessageServiceModel::getInstance();
$res=$messageService->update($this->memberId,$this->req['data']['fromType'],$this->req['data']['toId'],$this->req['data']['toType']);
if($res!==false){
$this->success($res,'删除成功');
}else{
\Error\ErrorModel::throwException(\Error\CodeConfigModel::removeMessage);
}
}
/** /**
* 更新webim消息 * 更新webim消息
* *
......
...@@ -296,7 +296,25 @@ class MessageServiceModel extends \Business\AbstractModel ...@@ -296,7 +296,25 @@ class MessageServiceModel extends \Business\AbstractModel
} }
return $isSuccess; return $isSuccess;
} }
/**
* 删除用户消息
*
* @ccw
*/
public function removeAll($memberId, $fromType,$toId,$toType)
{
$memageHistoryDao = \DAO\MessageHistoryModel::getInstance();
$where=Common::format(" (fromId={0} and fromType={1} and toId={2} and toType={3} and isDel={4}) or (fromId={2} and fromType={3} and toId={0} and toType={1} and idDel={5})",$memberId,$fromType,$toId,$toType,ApiConst::sendRemove);
$data['isDel']=ApiConst::remove;
$memageHistoryDao->updateByWhere($where,$data);
$where=Common::format(" fromId={0} and fromType={1} and toId={2} and toType={3} and isDel={4}",$memberId,$fromType,$toId,$toType,ApiConst::zero);
$data['isDel']=ApiConst::sendRemove;
$memageHistoryDao->updateByWhere($where,$data);
$where=Common::format(" fromId={2} and fromType={3} and toId={0} and toType={1} and isDel={4}",$memberId,$fromType,$toId,$toType,ApiConst::zero);
$data['isDel']=ApiConst::recieveRemove;
$memageHistoryDao->updateByWhere($where,$data);
return true;
}
/** /**
* 获得消息按钮 * 获得消息按钮
* *
......
Send POST https://api.jpush.cn/v3/push, body:{"platform":"all","audience":"all","notification":{"alert":"Hi, JPush"},"options":{"sendno":1913510038,"apns_production":false}}, times:1 Send POST https://api.jpush.cn/v3/push, body:{"platform":"all","audience":"all","notification":{"alert":"Hi, JPush"},"options":{"sendno":1913510038,"apns_production":false}}, times:1
Send POST https://api.jpush.cn/v3/push, body:{"platform":"all","audience":"all","notification":{"alert":"Hi, JPush"},"options":{"sendno":93988000,"apns_production":false}}, times:1 Send POST https://api.jpush.cn/v3/push, body:{"platform":"all","audience":"all","notification":{"alert":"Hi, JPush"},"options":{"sendno":93988000,"apns_production":false}}, times:1
Send POST https://api.jpush.cn/v3/push, body:{"platform":"all","audience":"all","notification":{"alert":"Hi, JPush"},"options":{"sendno":54209,"apns_production":false}}, times:1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment