| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.tourguide.modules.user.entity.GuideRealtimeStatus; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | @Mapper |
| | | public interface GuideRealtimeStatusMapper extends BaseMapper<GuideRealtimeStatus> { |
| | | @Update("UPDATE guide_realtime_status SET available_status = 0, updated_at = NOW() WHERE guide_id = #{guideId} AND deleted = 0") |
| | | int disableReceiving(Long guideId); |
| | | |
| | | @Update("UPDATE guide_realtime_status SET available_status = 1, updated_at = NOW() " + |
| | | "WHERE guide_id = #{guideId} AND deleted = 0 AND online_status = 1") |
| | | int enableReceiving(Long guideId); |
| | | |
| | | @Update("UPDATE guide_realtime_status SET online_status = 0, available_status = 0, updated_at = NOW() " + |
| | | "WHERE guide_id = #{guideId} AND deleted = 0") |
| | | int stopGuide(Long guideId); |
| | | } |