调整包路径
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.gzzn.omms.msgexchangeapi.service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -23,4 +25,28 @@ public class CminmsgServiceImpl implements ICminmsgService {
|
||||
Cminmsg rt = cminmsgDao.save(cminmsg);
|
||||
return rt;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Cminmsg> getNewMsgsAfterDate(Date afterdate) {
|
||||
List<Cminmsg> lsCminmsgs = cminmsgDao.findByCminmsgsDateReceivedAfterOrderByCminmsgsDateReceived(afterdate);
|
||||
if(null == lsCminmsgs)
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
return lsCminmsgs;
|
||||
} //end function
|
||||
|
||||
|
||||
@Override
|
||||
public List<Cminmsg> getNewMsgsAfterId(Long id) {
|
||||
List<Cminmsg> lsCminmsgs = cminmsgDao.findByCminmsgsIdGreaterThanOrderByCminmsgsDateReceived(id);
|
||||
if(null == lsCminmsgs)
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
return lsCminmsgs;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.gzzn.omms.msgexchangeapi.service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.gzzn.omms.msgexchangeapi.domain.primary.entity.Cminmsg;
|
||||
|
||||
|
||||
public interface ICminmsgService {
|
||||
|
||||
/**
|
||||
@@ -9,4 +13,17 @@ public interface ICminmsgService {
|
||||
* @param xmlMsg
|
||||
*/
|
||||
public Cminmsg sendXmlMsg(String xmlMsg);
|
||||
|
||||
/**
|
||||
* 获取指定时间后的新消息
|
||||
* @return
|
||||
*/
|
||||
public List<Cminmsg> getNewMsgsAfterDate(Date afterdate);
|
||||
|
||||
/**
|
||||
* 获取指定id后的消息,消息id有序
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public List<Cminmsg> getNewMsgsAfterId(Long id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user