Browse Source

上车提醒和下次提醒

fllmoyu 4 years ago
parent
commit
10ad9b0076

+ 2 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/dao/StationRemindDAO.java

@@ -19,4 +19,6 @@ public interface StationRemindDAO {
 	List<StationRemind>  findByOpenIdAndVehicleShiftId(String openId, String vehicleShiftId);
 	List<StationRemind>  findByOpenIdAndVehicleShiftId(String openId, String vehicleShiftId);
 
 
 	List<StationRemind> findByOpenId(String openId);
 	List<StationRemind> findByOpenId(String openId);
+
+	List<StationRemind> findByOpenIdAndRouteId(String openId, String routeId);
 }
 }

+ 2 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/service/StationRemindService.java

@@ -18,4 +18,6 @@ public interface StationRemindService {
     List<StationRemind> findByOpenIdAndVehicleShiftId(String openId, String vehicleShiftId);
     List<StationRemind> findByOpenIdAndVehicleShiftId(String openId, String vehicleShiftId);
 
 
     List<StationRemind> findByOpenId(String openId);
     List<StationRemind> findByOpenId(String openId);
+
+	List<StationRemind> findByOpenIdAndRouteId(String openId, String routeId);
 }
 }

+ 5 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/service/impl/StationRemindServiceImpl.java

@@ -82,4 +82,9 @@ public class StationRemindServiceImpl implements StationRemindService {
 	public List<StationRemind> findByOpenId(String openId) {
 	public List<StationRemind> findByOpenId(String openId) {
 		return stationRemindDAO.findByOpenId(openId);
 		return stationRemindDAO.findByOpenId(openId);
 	}
 	}
+
+	@Override
+	public List<StationRemind> findByOpenIdAndRouteId(String openId, String routeId) {
+		return stationRemindDAO.findByOpenIdAndRouteId(openId,routeId);
+	}
 }
 }

+ 9 - 0
common/src/main/resources/mapper/bus/StationRemind.xml

@@ -149,4 +149,13 @@
         order by a.create_time desc
         order by a.create_time desc
         ]]>
         ]]>
     </select>
     </select>
+    <select id="findByOpenIdAndRouteId" resultMap="StationRemindMap">
+        <![CDATA[
+        select * from bus_station_remind
+        where del_flag = 0
+        and open_id = #{openId}
+        and route_id = #{routeId}
+        order by create_time asc
+        ]]>
+    </select>
 </mapper>
 </mapper>

+ 3 - 3
web/src/main/java/com/jpsoft/bus/modules/mobile/controller/PassengerApiController.java

@@ -1729,15 +1729,15 @@ public class PassengerApiController {
     @PostMapping("passengerShiftRemindList")
     @PostMapping("passengerShiftRemindList")
     @ApiOperation(value = "乘客当前班次提醒列表")
     @ApiOperation(value = "乘客当前班次提醒列表")
     @ApiImplicitParams({
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "shiftId", value = "班次id", paramType = "form"),
+            @ApiImplicitParam(name = "routeId", value = "线路id", paramType = "form"),
             @ApiImplicitParam(name = "openId", value = "openId", paramType = "form")
             @ApiImplicitParam(name = "openId", value = "openId", paramType = "form")
     })
     })
-    public MessageResult<List<StationRemind>> passengerShiftRemindList(String shiftId, String openId) {
+    public MessageResult<List<StationRemind>> passengerShiftRemindList(String routeId, String openId) {
         MessageResult<List<StationRemind>> messageResult = new MessageResult<>();
         MessageResult<List<StationRemind>> messageResult = new MessageResult<>();
 
 
         try {
         try {
 
 
-            List<StationRemind> stationRemindList = stationRemindService.findByOpenIdAndVehicleShiftId(openId, shiftId);
+            List<StationRemind> stationRemindList = stationRemindService.findByOpenIdAndRouteId(openId, routeId);
 
 
             messageResult.setData(stationRemindList);
             messageResult.setData(stationRemindList);
             messageResult.setResult(true);
             messageResult.setResult(true);