Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
*.properties
.env
.github/keys/
.DS_Store
src/main/resources/credentials/
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2010-2023 the original author or authors.
# Copyright 2010-2025 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@
<artifactId>hsqldb</artifactId>
<version>${hsqldb.version}</version>
</dependency>
<dependency>
<groupId>com.theokanning.openai-gpt3-java</groupId>
<artifactId>service</artifactId>
<version>0.18.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.15.2</version>
</dependency>

<!-- Test dependencies -->
<dependency>
Expand Down Expand Up @@ -227,6 +237,11 @@
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.15.2</version>
</dependency>
</dependencies>

<repositories>
Expand Down
59 changes: 58 additions & 1 deletion src/main/java/org/mybatis/jpetstore/domain/Account.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 the original author or authors.
* Copyright 2010-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,6 +47,14 @@ public class Account implements Serializable {
private boolean bannerOption;
private String bannerName;

// New survey-related fields
private String residenceEnv;
private String carePeriod;
private String petColorPref;
private String petSizePref;
private String activityTime;
private String dietManagement;

public String getUsername() {
return username;
}
Expand Down Expand Up @@ -193,4 +201,53 @@ public void setBannerName(String bannerName) {
this.bannerName = bannerName;
}

// New survey-related getters and setters
public String getResidenceEnv() {
return residenceEnv;
}

public void setResidenceEnv(String residenceEnv) {
this.residenceEnv = residenceEnv;
}

public String getCarePeriod() {
return carePeriod;
}

public void setCarePeriod(String carePeriod) {
this.carePeriod = carePeriod;
}

public String getPetColorPref() {
return petColorPref;
}

public void setPetColorPref(String petColorPref) {
this.petColorPref = petColorPref;
}

public String getPetSizePref() {
return petSizePref;
}

public void setPetSizePref(String petSizePref) {
this.petSizePref = petSizePref;
}

public String getActivityTime() {
return activityTime;
}

public void setActivityTime(String activityTime) {
this.activityTime = activityTime;
}

public String getDietManagement() {
return dietManagement;
}

public void setDietManagement(String dietManagement) {
this.dietManagement = dietManagement;
}

}
4 changes: 3 additions & 1 deletion src/main/java/org/mybatis/jpetstore/domain/Item.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 the original author or authors.
* Copyright 2010-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -143,3 +143,5 @@ public String toString() {
}

}

// test
104 changes: 104 additions & 0 deletions src/main/java/org/mybatis/jpetstore/domain/SurveyRecommendation.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/*
* Copyright 2010-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mybatis.jpetstore.domain;

import java.io.Serializable;

public class SurveyRecommendation implements Serializable {

private static final long serialVersionUID = 1L;

private int surveyRecommendationId;
private String residenceEnv;
private String carePeriod;
private String petColorPref;
private String petSizePref;
private String activityTime;
private String dietManagement;
private String recommendedJsonData;

public int getSurveyRecommendationId() {
return surveyRecommendationId;
}

public void setSurveyRecommendationId(int surveyRecommendationId) {
this.surveyRecommendationId = surveyRecommendationId;
}

public String getResidenceEnv() {
return residenceEnv;
}

public void setResidenceEnv(String residenceEnv) {
this.residenceEnv = residenceEnv;
}

public String getCarePeriod() {
return carePeriod;
}

public void setCarePeriod(String carePeriod) {
this.carePeriod = carePeriod;
}

public String getPetColorPref() {
return petColorPref;
}

public void setPetColorPref(String petColorPref) {
this.petColorPref = petColorPref;
}

public String getPetSizePref() {
return petSizePref;
}

public void setPetSizePref(String petSizePref) {
this.petSizePref = petSizePref;
}

public String getActivityTime() {
return activityTime;
}

public void setActivityTime(String activityTime) {
this.activityTime = activityTime;
}

public String getDietManagement() {
return dietManagement;
}

public void setDietManagement(String dietManagement) {
this.dietManagement = dietManagement;
}

public String getRecommendedJsonData() {
return recommendedJsonData;
}

public void setRecommendedJsonData(String recommendedJsonData) {
this.recommendedJsonData = recommendedJsonData;
}

@Override
public String toString() {
return "SurveyRecommendation{" + "surveyRecommendationId=" + surveyRecommendationId + ", residenceEnv='"
+ residenceEnv + "'" + ", carePeriod='" + carePeriod + "'" + ", petColorPref='" + petColorPref + "'"
+ ", petSizePref='" + petSizePref + "'" + ", activityTime='" + activityTime + "'" + ", dietManagement='"
+ dietManagement + "'" + ", recommendedJsonData='" + recommendedJsonData + "'" + '}';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright 2010-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mybatis.jpetstore.mapper;

import java.util.List;

import org.mybatis.jpetstore.domain.SurveyRecommendation;

public interface SurveyRecommendationMapper {

List<SurveyRecommendation> getSurveyRecommendations();

SurveyRecommendation getSurveyRecommendationById(int surveyRecommendationId);

void insertSurveyRecommendation(SurveyRecommendation surveyRecommendation);

void updateSurveyRecommendation(SurveyRecommendation surveyRecommendation);

void deleteSurveyRecommendation(int surveyRecommendationId);

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2023 the original author or authors.
* Copyright 2010-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -88,3 +88,5 @@ public boolean isItemInStock(String itemId) {
return itemMapper.getInventoryQuantity(itemId) > 0;
}
}

// test11
Loading