Skip to content

Commit

Permalink
Merge pull request #135 from EAT-SSU/130-feat-문의하기
Browse files Browse the repository at this point in the history
[Feat] 문의하기 & BaseResponse 작업
  • Loading branch information
HI-JIN2 authored Feb 26, 2024
2 parents 6a47cf0 + 7e0502e commit f715786
Show file tree
Hide file tree
Showing 50 changed files with 537 additions and 216 deletions.
24 changes: 6 additions & 18 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
android:usesCleartextTraffic="true"
tools:replace="android:usesCleartextTraffic"
tools:targetApi="31">
<activity
android:name=".ui.mypage.Inquire.InquireActivity"
android:exported="false" />
<activity
android:name=".ui.review.write.ReviewWriteRateActivity"
android:exported="true">
Expand All @@ -60,35 +63,33 @@
android:name="android.app.lib_name"
android:value="" />
</activity>


<activity
android:name=".ui.common.AndroidMessageDialogActivity"
android:exported="true">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>

<activity
android:name=".ui.common.ForceUpdateDialogActivity"
android:exported="true">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>

<activity
android:name="com.kakao.sdk.auth.AuthCodeHandlerActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="oauth"
android:scheme="kakao${KAKAO_NATIVE_APP_KEY}" /> </intent-filter>
android:scheme="kakao${KAKAO_NATIVE_APP_KEY}" />
</intent-filter>
</activity>
<activity
android:name=".base.BaseActivity"
Expand All @@ -97,12 +98,10 @@
android:name="android.app.lib_name"
android:value="" />
</activity>

<activity
android:name=".ui.mypage.usernamechange.UserNameChangeActivity"
android:exported="true"
android:windowSoftInputMode="adjustResize">

<meta-data
android:name="android.app.lib_name"
android:value="" />
Expand All @@ -117,7 +116,6 @@
<activity
android:name=".ui.review.list.ReviewActivity"
android:exported="true">

<meta-data
android:name="android.app.lib_name"
android:value="" />
Expand All @@ -129,7 +127,6 @@
android:name="android.app.lib_name"
android:value="" />
</activity>

<activity
android:name=".ui.info.InfoActivity"
android:exported="true"
Expand All @@ -138,11 +135,9 @@
android:name="android.app.lib_name"
android:value="" />
</activity>

<activity
android:name=".ui.main.MainActivity"
android:exported="true">

<meta-data
android:name="android.app.lib_name"
android:value="" />
Expand All @@ -151,7 +146,6 @@
android:name=".ui.review.etc.OthersReviewDialogActivity"
android:exported="true"
android:theme="@style/Theme.MyDialog">

<meta-data
android:name="android.app.lib_name"
android:value="" />
Expand All @@ -160,30 +154,24 @@
android:name=".ui.review.etc.MyReviewDialogActivity"
android:exported="true"
android:theme="@style/Theme.MyDialog">

<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".ui.review.etc.ReportActivity"
android:exported="true">

<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".ui.review.etc.FixedReviewActivity"
android:exported="true">

<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>



</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.eatssu.android.data.dto.request

data class ChangeNicknameRequest(
val nickname: String,
)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.eatssu.android.data.dto.request

data class ChangePwRequest(
val pwd: String,
)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.eatssu.android.data.model.request

data class InquiriesRequest(
val content: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package com.eatssu.android.data.dto.request

import com.google.gson.annotations.SerializedName

data class LoginWithKakaoRequestDto (
data class LoginWithKakaoRequest(
@SerializedName("email")
val email: String,

@SerializedName("providerId")
val providerId: String
val providerId: String,
)
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.eatssu.android.data.dto.request

data class ModifyMenuRequestDto(
val addTodayMenuList: List<AddTodayMenu>
){
data class ModifyMenuRequest(
val addTodayMenuList: List<AddTodayMenu>,
) {
data class AddTodayMenu(
val name: String,
val price: Int
val price: Int,
)
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.eatssu.android.data.dto.request

data class ModifyReviewRequestDto(
data class ModifyReviewRequest(
val content: String,
val grade: Int,
val reviewTags: List<String>
val reviewTags: List<String>,
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package com.eatssu.android.data.dto.request

import com.google.gson.annotations.SerializedName

data class ReportRequestDto(
data class ReportRequest(
@SerializedName("reviewId")
val reviewId: Long,

@SerializedName("reportType")
val reportType: String,

@SerializedName("content")
val content: String
val content: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.eatssu.android.data.dto.response

import com.google.gson.annotations.SerializedName

data class GetMyInfoResponseDto(
data class GetMyInfoResponse(

@SerializedName("nickname") var nickname: String? = null,
@SerializedName("provider") var provider: String? = null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package com.eatssu.android.data.dto.response

data class GetMyReviewResponseDto(
data class GetMyReviewResponse(
val dataList: List<Data>,
val hasNext: Boolean,
val numberOfElements: Int
){
val numberOfElements: Int,
) {
data class Data(
val content: String,
val reviewId : Int,
val reviewId: Int,
val mainGrade: Int,
val amountGrade: Int,
val tasteGrade : Int,
val tasteGrade: Int,
val imgUrlList: List<String>,
val writeDate: String,
val menuName: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package com.eatssu.android.data.dto.response

import com.google.gson.annotations.SerializedName

data class GetReportTypeResponseDto(
data class GetReportTypeResponse(
@SerializedName("reportType")
val reportType: String,

@SerializedName("typeDescription")
val typeDescription: String
val typeDescription: String,
)
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package com.eatssu.android.data.dto.response

data class GetReviewInfoResponseDto(
data class GetReviewInfoResponse(
val menuName: List<String>,
val totalReviewCount: Int,
val mainGrade: Double,
val amountGrade: Double,
val tasteGrade: Double,
val reviewGradeCnt: ReviewGradeCnt,
){
) {
data class ReviewGradeCnt(
val fiveCnt: Int,
val fourCnt: Int,
val oneCnt: Int,
val threeCnt: Int,
val twoCnt: Int
val twoCnt: Int,
)
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package com.eatssu.android.data.dto.response

import com.google.gson.annotations.SerializedName

data class TokenResponseDto(
data class TokenResponse(
@SerializedName("accessToken")
val accessToken: String,

@SerializedName("refreshToken")
val refreshToken: String
val refreshToken: String,
)
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.eatssu.android.data.model

data class FirebaseInfoItem(
data class RestaurantInfo(
val name: String,
val location: String,
val time: String,
val etc: String
val etc: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.eatssu.android.data.repository
import android.util.Log
import com.eatssu.android.R
import com.eatssu.android.data.model.AndroidMessage
import com.eatssu.android.data.model.FirebaseInfoItem
import com.eatssu.android.data.model.RestaurantInfo
import com.google.firebase.remoteconfig.FirebaseRemoteConfig
import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings
import com.google.gson.Gson
Expand Down Expand Up @@ -53,13 +53,13 @@ class FirebaseRemoteConfigRepository {
return instance.getString("app_version")
}

fun getCafeteriaInfo(): ArrayList<FirebaseInfoItem> {
fun getCafeteriaInfo(): ArrayList<RestaurantInfo> {
return parsingJson(instance.getString("cafeteria_info"))
}

private fun parsingJson(json: String): ArrayList<FirebaseInfoItem> {
private fun parsingJson(json: String): ArrayList<RestaurantInfo> {
val jsonArray = JSONArray(json)
val list = ArrayList<FirebaseInfoItem>()
val list = ArrayList<RestaurantInfo>()

for (index in 0 until jsonArray.length()) {
val jsonObject = jsonArray.getJSONObject(index)
Expand All @@ -69,9 +69,9 @@ class FirebaseRemoteConfigRepository {
val time = jsonObject.optString("time", "")
val etc = jsonObject.optString("etc", "")

val firebaseInfoItem = FirebaseInfoItem(name, location, time, etc)
Log.d("FirebaseRemoteConfigRepository", firebaseInfoItem.toString())
list.add(firebaseInfoItem)
val restaurantInfo = RestaurantInfo(name, location, time, etc)
Log.d("FirebaseRemoteConfigRepository", restaurantInfo.toString())
list.add(restaurantInfo)
}
return list
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.eatssu.android.data.service

import com.eatssu.android.base.BaseResponse
import com.eatssu.android.data.model.request.InquiriesRequest
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.POST

interface InquiresService {
@POST("inquiries/") // 문의 작성
fun inquireContent(
@Body request: InquiriesRequest,
): Call<BaseResponse<InquiriesRequest>>

}
Loading

0 comments on commit f715786

Please sign in to comment.