Commit f6282651 authored by jiaorz's avatar jiaorz

交还车备注问题和IM是否显示筛选条件

parent ed7b8c66
...@@ -77,7 +77,7 @@ public class MsgBiz { ...@@ -77,7 +77,7 @@ public class MsgBiz {
Query query = null; Query query = null;
List<Msg> msgList = null; List<Msg> msgList = null;
if (type != null) { if (type != null) {
query = new Query(Criteria.where("body.type").is(type)); query = new Query(Criteria.where("body.type").is(type).and("visible").is(1));
int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size(); int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size();
query.with(pageable); query.with(pageable);
query.with(new Sort(Sort.Direction.DESC, "time")); query.with(new Sort(Sort.Direction.DESC, "time"));
...@@ -89,7 +89,7 @@ public class MsgBiz { ...@@ -89,7 +89,7 @@ public class MsgBiz {
List<Integer> ids = new ArrayList<>(); List<Integer> ids = new ArrayList<>();
ids.add(2); ids.add(2);
ids.add(4); ids.add(4);
query = new Query(Criteria.where("body.type").in(ids)); query = new Query(Criteria.where("body.type").in(ids).and("visible").is(1));
int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size(); int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size();
query.with(pageable); query.with(pageable);
query.with(new Sort(Sort.Direction.DESC, "time")); query.with(new Sort(Sort.Direction.DESC, "time"));
...@@ -114,7 +114,7 @@ public class MsgBiz { ...@@ -114,7 +114,7 @@ public class MsgBiz {
List<Integer> ids = new ArrayList<>(); List<Integer> ids = new ArrayList<>();
ids.add(2); ids.add(2);
ids.add(4); ids.add(4);
Query query = new Query(Criteria.where("body.type").in(ids).and("count.praise").gt(getNumber())); Query query = new Query(Criteria.where("body.type").in(ids).and("count.praise").gt(getNumber()).and("visible").is(1));
int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size(); int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size();
query.with(pageable); query.with(pageable);
query.with(new Sort(Sort.Direction.DESC, "count.praise")); query.with(new Sort(Sort.Direction.DESC, "count.praise"));
...@@ -134,7 +134,7 @@ public class MsgBiz { ...@@ -134,7 +134,7 @@ public class MsgBiz {
if (id == null) { if (id == null) {
return ObjectRestResponse.paramIsEmpty(); return ObjectRestResponse.paramIsEmpty();
} }
Query query = new Query(Criteria.where("id").is(new ObjectId(id))); Query query = new Query(Criteria.where("id").is(new ObjectId(id)).and("visible").is(1));
List<Msg> msgList = fetchAndAttach(mongoTemplate.find(query, Msg.class, "s_msg"), userId); List<Msg> msgList = fetchAndAttach(mongoTemplate.find(query, Msg.class, "s_msg"), userId);
List<MsgVo> msgVoList = replaceMsgResult(msgList); List<MsgVo> msgVoList = replaceMsgResult(msgList);
if (msgVoList.size() > 0) { if (msgVoList.size() > 0) {
......
...@@ -257,7 +257,7 @@ public class VehicleActiveService { ...@@ -257,7 +257,7 @@ public class VehicleActiveService {
bookVehicleVo.setBookEndDate(null); bookVehicleVo.setBookEndDate(null);
bookVehicleVo.setUnbookStartDate(actualArrivalDate.toString(DATE_TIME_FORMATTER)); bookVehicleVo.setUnbookStartDate(actualArrivalDate.toString(DATE_TIME_FORMATTER));
bookVehicleVo.setUnbookEndDate(arrivalDate.toString(DATE_TIME_FORMATTER)); bookVehicleVo.setUnbookEndDate(arrivalDate.toString(DATE_TIME_FORMATTER));
bookVehicleVo.setRemark(bookVehicleVo.getRemark() + " 用户提前还车,取消剩余天数, 初始预定结束时间是," + new DateTime(vehicleBookRecord.getBookEndDate()).toString(DATE_TIME_FORMATTER)); bookVehicleVo.setRemark(bookVehicleVo.getRemark()==null?"": bookVehicleVo.getRemark()+ " 用户提前还车,取消剩余天数, 初始预定结束时间是," + new DateTime(vehicleBookRecord.getBookEndDate()).toString(DATE_TIME_FORMATTER));
vehicleBookRecord.setRemark(bookVehicleVo.getRemark()); vehicleBookRecord.setRemark(bookVehicleVo.getRemark());
try { try {
Boolean hasSuc = vehicleBiz.unbookVehicle(bookVehicleVo); Boolean hasSuc = vehicleBiz.unbookVehicle(bookVehicleVo);
...@@ -269,7 +269,7 @@ public class VehicleActiveService { ...@@ -269,7 +269,7 @@ public class VehicleActiveService {
e.printStackTrace(); e.printStackTrace();
} }
} else if (actualArrivalDate.compareTo(arrivalDate) > 0) {//实际还车时间大于预计还车时间 } else if (actualArrivalDate.compareTo(arrivalDate) > 0) {//实际还车时间大于预计还车时间
vehicleBookRecord.setRemark(vehicleBookRecord.getRemark() + " 用户延期还车,实际占用日期"); vehicleBookRecord.setRemark(vehicleBookRecord.getRemark()==null?"": vehicleBookRecord.getRemark() + " 用户延期还车,实际占用日期");
} }
updateBookRecordStatus(vehicleBookRecord, 2); updateBookRecordStatus(vehicleBookRecord, 2);
departureLog.setMileageEnd(arrivalVo.getMileage()); departureLog.setMileageEnd(arrivalVo.getMileage());
......
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