Commit 855dd9c6 authored by wwccw0591's avatar wwccw0591

pc

parent 15f891d7
...@@ -38,7 +38,7 @@ class MessageHistoryModel extends \DAO\AbstractModel { ...@@ -38,7 +38,7 @@ class MessageHistoryModel extends \DAO\AbstractModel {
* *
*/ */
public function getListByMemberIdAndToIdAndToType($memberId,$selfType,$toId,$toType,$field='*',$pageIndex=0,$pageSize=20){ public function getListByMemberIdAndToIdAndToType($memberId,$selfType,$toId,$toType,$field='*',$pageIndex=0,$pageSize=20){
$where=Common::format(" ((fromId={0} and toId={1} and toType={2} and fromType={3} and isDel not in(-1,2)) or (fromId={4} and toId={5} and fromType={6} and toType={7} and isDel not in(-1,2)))",$memberId,$toId,$toType,$selfType,$toId,$memberId,$toType,$selfType); $where=Common::format(" ((fromId={0} and toId={1} and toType={2} and fromType={3} and isDel not in(-1,2)) or (fromId={4} and toId={5} and fromType={6} and toType={7} and isDel not in(-1,3)))",$memberId,$toId,$toType,$selfType,$toId,$memberId,$toType,$selfType);
parent::setDb(); parent::setDb();
$messages=$this->lists($where,array('gmtCreate'=>'desc'),$field,$pageIndex,$pageSize); $messages=$this->lists($where,array('gmtCreate'=>'desc'),$field,$pageIndex,$pageSize);
return $messages; return $messages;
......
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