Commit 7c3a89cd authored by liuyuzhen's avatar liuyuzhen

Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into lyz

parents 70780078 6a64cb4a
...@@ -54,7 +54,9 @@ class IndexController extends \Our\Controller_Abstract { ...@@ -54,7 +54,9 @@ class IndexController extends \Our\Controller_Abstract {
public function indexAction() { public function indexAction() {
// $clientPush=\JPush\ClientPush::getInstance(); // $clientPush=\JPush\ClientPush::getInstance();
// $clientPush->pushAll(); // $clientPush->pushAll();
echo 'success'; $mongoDb= new \Mongo\MongoDbModel();
$res= $mongoDb->insert('message_history',array('id'=>1,'name'=>'chenchuanwen'));
echo json_encode($res);
exit; exit;
\Our\Log::getInstance()->write('testLog|||||testLog'); \Our\Log::getInstance()->write('testLog|||||testLog');
var_dump($_SERVER);exit; var_dump($_SERVER);exit;
......
...@@ -36,7 +36,7 @@ abstract class Controller_Abstract extends \Yaf\Controller_Abstract { ...@@ -36,7 +36,7 @@ abstract class Controller_Abstract extends \Yaf\Controller_Abstract {
$data['responseContent']=$returnMessage['responseContent']; $data['responseContent']=$returnMessage['responseContent'];
$data['data']=array(); $data['data']=array();
$data['data'] =$this->req[NameConst::data]; $data['data'] =$this->req[NameConst::data];
if(APP_ENV=='test'){ if(APP_ENV=='test' || APP_ENV=='pre'){
$log = \Our\Log::getInstance(); $log = \Our\Log::getInstance();
$log->write(json_encode($data)); $log->write(json_encode($data));
} }
......
...@@ -825,10 +825,18 @@ class GoodsCommonServiceModel extends \Business\AbstractModel ...@@ -825,10 +825,18 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
} }
$storeId && $where['han_goods_attribute.store_id'] = $storeId; $storeId && $where['han_goods_attribute.store_id'] = $storeId;
$storeId || $where['source'] = 1; //来源:平台 $storeId || $where['source'] = 1; //来源:平台
$firstClassId && $where['gc_id_1'] = $firstClassId; if($keyword !== '') {
$secondClassId && $where['gc_id_2'] = $secondClassId; $firstClassId && $where['han_goods_attribute.gc_id_1'] = $firstClassId;
$thirdClassId && $where['gc_id_3'] = $thirdClassId; $secondClassId && $where['han_goods_attribute.gc_id_2'] = $secondClassId;
$storeThirdClassId && $where['goods_class_t_id'] = $storeThirdClassId; $thirdClassId && $where['han_goods_attribute.gc_id_3'] = $thirdClassId;
$storeThirdClassId && $where['han_goods_attribute.goods_class_t_id'] = $storeThirdClassId;
}else{
$firstClassId && $where['gc_id_1'] = $firstClassId;
$secondClassId && $where['gc_id_2'] = $secondClassId;
$thirdClassId && $where['gc_id_3'] = $thirdClassId;
$storeThirdClassId && $where['goods_class_t_id'] = $storeThirdClassId;
}
$where['is_filter'] = 1; $where['is_filter'] = 1;
$productData = []; $productData = [];
$attributeRedis = \Redis\Db4\GoodsAttributeRedisModel::getInstance(); $attributeRedis = \Redis\Db4\GoodsAttributeRedisModel::getInstance();
......
...@@ -443,6 +443,7 @@ class MessageServiceModel extends \Business\AbstractModel ...@@ -443,6 +443,7 @@ class MessageServiceModel extends \Business\AbstractModel
$message['gmtCreate'] = TIMESTAMP; $message['gmtCreate'] = TIMESTAMP;
$message['isRead'] = ApiConst::unread; $message['isRead'] = ApiConst::unread;
$message['type'] = (int)$message['type']; $message['type'] = (int)$message['type'];
$message['content'] = base64_encode($message['content']);
$serializeMessage = serialize($message); $serializeMessage = serialize($message);
//将消息添加到表messageHistory //将消息添加到表messageHistory
$mesageHistory['fromId'] = $fromId; $mesageHistory['fromId'] = $fromId;
...@@ -480,6 +481,11 @@ class MessageServiceModel extends \Business\AbstractModel ...@@ -480,6 +481,11 @@ class MessageServiceModel extends \Business\AbstractModel
register_shutdown_function(array($messageHistoryDao, "sendMessage"), $mesageHistory, $toId); register_shutdown_function(array($messageHistoryDao, "sendMessage"), $mesageHistory, $toId);
//$messageHistoryDao->sendMessage($mesageHistory,$toId); //$messageHistoryDao->sendMessage($mesageHistory,$toId);
if ($res1 && $res2) { if ($res1 && $res2) {
$clientPush=\JPush\ClientPush::getInstance();
$mesageHistory['id']=$res1;
$addData['message'] = unserialize($mesageHistory['message']);
$addData['message']['content']=base64_decode($addData['message']['content']);
$clientPush->push($addData);
return $res1; return $res1;
} else { } else {
return false; return false;
......
This diff is collapsed.
...@@ -49,6 +49,8 @@ push.clientHost="wss://api.shenbd.com/wss" ...@@ -49,6 +49,8 @@ push.clientHost="wss://api.shenbd.com/wss"
push.host="172.16.142.15" push.host="172.16.142.15"
push.port="9503" push.port="9503"
push.open=1 push.open=1
push.user.service.id=293
push.user.service.type=7
; ;
elastic.master.host="172.16.142.15" elastic.master.host="172.16.142.15"
elastic.master.port="9200" elastic.master.port="9200"
......
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
<?php <?php
echo 1;exit; echo 14;exit;
$redis =new Redis(); $redis =new Redis();
$redis->connect('127.0.0.1','6379'); $redis->connect('127.0.0.1','6379');
$redis->rPush('test',0); $redis->rPush('test',0);
$res=$redis->lPop('test'); $res=$redis->lPop('test');
var_dump($res); var_dump($res);
?> ?>
\ No newline at end of file
...@@ -48,7 +48,7 @@ class cliOrderClose extends basecli ...@@ -48,7 +48,7 @@ class cliOrderClose extends basecli
$redis->auth($conf['password']); $redis->auth($conf['password']);
} }
$clientPush=\JPush\ClientPush::getInstance(); $clientPush=\JPush\ClientPush::getInstance();
$messageService=\DAO\MessageHistoryModel::getInstance(); //$messageService=\DAO\MessageHistoryModel::getInstance();
while($pushData=$redis->lPop('push_center')){ while($pushData=$redis->lPop('push_center')){
$addData = unserialize($pushData); $addData = unserialize($pushData);
$addData['message'] = unserialize($addData['message']); $addData['message'] = unserialize($addData['message']);
......
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