Skip to content

Commit

Permalink
cleanup and created packages
Browse files Browse the repository at this point in the history
  • Loading branch information
peeyar committed Jul 21, 2019
1 parent 5a441ed commit 796ea00
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 38 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
# food-truck-service
SFO food truck data service

## How to clone this

1. git clone https://github.com/peeyar/food-truck-service.git

## How to build this project

Go to project directory

1. cd food-truck-service
2. mvn clean install
3. java -jar food-truck-service
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<artifactId>food-truck-service</artifactId>
<name>food truck service</name>
<description>Food truck service</description>
<packaging>war</packaging>
<packaging>jar</packaging>

<parent>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.redfin.interview;

import com.redfin.interview.com.redfin.interview.entity.FoodTruckRepository;
import com.redfin.interview.service.FoodTruckRepository;
import com.redfin.interview.service.FoodTruckService;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Value;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.redfin.interview.controller;


import com.redfin.interview.com.redfin.interview.entity.FoodTruck;
import com.redfin.interview.entity.FoodTruck;
import com.redfin.interview.service.FoodTruckService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.redfin.interview.com.redfin.interview.entity;
package com.redfin.interview.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.redfin.interview.com.redfin.interview.entity;
package com.redfin.interview.service;

import java.util.List;

import com.redfin.interview.entity.FoodTruck;
import com.redfin.interview.sfo.data.loader.service.SanFransiscoFoodTruckInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.redfin.interview.service;


import com.redfin.interview.com.redfin.interview.entity.FoodTruck;
import com.redfin.interview.com.redfin.interview.entity.FoodTruckRepository;
import com.redfin.interview.entity.FoodTruck;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.redfin.interview.service;
package com.redfin.interview.sfo.data.loader.service;

import com.redfin.interview.entity.FoodTruck;
import com.redfin.interview.service.FoodTruckRepository;

import com.redfin.interview.com.redfin.interview.entity.FoodTruck;
import com.redfin.interview.com.redfin.interview.entity.FoodTruckRepository;
import com.redfin.interview.com.redfin.interview.entity.SanFransiscoFoodTruckInfo;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
Expand All @@ -15,9 +15,7 @@
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.client.RestTemplate;

/**
* Created by VijaySidhu on 7/21/2019.
*/

@Configuration
@EnableScheduling
public class SanFransciscoFoodTruckDataLoaderService implements InitializingBean {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.redfin.interview.com.redfin.interview.entity;
package com.redfin.interview.sfo.data.loader.service;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
Expand Down Expand Up @@ -79,9 +80,6 @@ public boolean isOpen() {
}
if (startAfter >= 0 && endBefore >= 0 && getCurrentDay().equalsIgnoreCase(dayOfWeek)) {
this.isOpen = true;
System.out.println(
"This Location ID is open " + locationId + " Truck Name " + truckName + "Address "
+ address);
}
return isOpen;
}
Expand Down

0 comments on commit 796ea00

Please sign in to comment.