| | |
| | | import java.util.List; |
| | | import java.lang.Long; |
| | | import java.util.Date; |
| | | |
| | | import org.yeshi.utils.mongo.MongodbBaseDao; |
| | | import com.yeshi.location.app.entity.sos.SOSTargetInfo; |
| | | |
| | | import java.lang.String; |
| | | import java.lang.Integer; |
| | | import java.util.ArrayList; |
| | |
| | | if(bean.getStatusDesc() != null) { |
| | | update.set("statusDesc", bean.getStatusDesc()); |
| | | } |
| | | |
| | | if (bean.getReadTime() != null) { |
| | | update.set("readTime", bean.getReadTime()); |
| | | } |
| | | |
| | | if(bean.getCreateTime() != null) { |
| | | update.set("createTime", bean.getCreateTime()); |
| | | } |
| | |
| | | public long count(DaoQuery daoQuery){ |
| | | Query query=getQuery(daoQuery); |
| | | return count(query); |
| | | } |
| | | |
| | | public List<SOSTargetInfo> listBySOSIds(List<String> sosIds) { |
| | | List<Criteria> orList = new ArrayList<>(); |
| | | for (String sosId : sosIds) { |
| | | orList.add(Criteria.where("sosId").is(sosId)); |
| | | } |
| | | Criteria[] ors = new Criteria[orList.size()]; |
| | | orList.toArray(ors); |
| | | Query query = new Query(); |
| | | query.addCriteria(new Criteria().orOperator(ors)); |
| | | return findList(query); |
| | | } |
| | | |
| | | private Query getQuery(DaoQuery daoQuery){ |
| | |
| | | return query; |
| | | } |
| | | |
| | | |
| | | public static class DaoQuery{ |
| | | public String sosId; |
| | | public Long uid; |