增加支付接口相关逻辑
This commit is contained in:
@@ -4,11 +4,14 @@ import com.sw.dualscreen.GlobalData
|
||||
import com.sw.dualscreen.model.request.UserNutritionParam
|
||||
import com.sw.dualscreen.model.response.ApiResponse
|
||||
import com.sw.dualscreen.model.response.DinnerType
|
||||
import com.sw.dualscreen.model.response.FaceData
|
||||
import com.sw.dualscreen.model.response.FoodInfo
|
||||
import com.sw.dualscreen.model.response.FoodSearchReq
|
||||
import com.sw.dualscreen.model.response.FoodOrder
|
||||
import com.sw.dualscreen.model.response.MemberInfo
|
||||
import com.sw.dualscreen.model.response.PayResult
|
||||
import com.sw.dualscreen.model.response.UserFaceModel
|
||||
import com.sw.dualscreen.model.response.UserNutrition
|
||||
import com.sw.dualscreen.model.response.UserNutritionData
|
||||
import com.sw.dualscreen.objbox.CollectedFoodInfo
|
||||
import okhttp3.MultipartBody
|
||||
@@ -67,6 +70,13 @@ interface ApiService {
|
||||
// @Query("pageSize") pageSize: Int
|
||||
): ApiResponse<List<UserFaceModel>>
|
||||
|
||||
@GET
|
||||
suspend fun getUserFaceCache2(
|
||||
@Url url: String = "http://192.168.1.230:2223/userface/swUserFaceimgSub/list",
|
||||
@Query("pageNum") pageNum: Int,
|
||||
@Query("pageSize") pageSize: Int
|
||||
): ApiResponse<FaceData>
|
||||
|
||||
/**
|
||||
* 获取已采集数据列表
|
||||
*/
|
||||
@@ -92,17 +102,37 @@ interface ApiService {
|
||||
// @Query("foodName") foodName: String,
|
||||
): ApiResponse<List<FoodInfo>>
|
||||
|
||||
// /**
|
||||
// * 通过用户信息获取就餐数据
|
||||
// */
|
||||
// @GET
|
||||
// suspend fun getUserNutritionData(
|
||||
// @Url url: String = "${GlobalData.appBaseUrl}/zhstapi/zhst/getUserNutritionData/face",
|
||||
// @Query("appVersion") appVersion: String = GlobalData.appVersion,
|
||||
// @Query("restId") restId: String,
|
||||
// @Query("userId") userId: String,
|
||||
// @Query("foodId") foodId: String,
|
||||
// ): ApiResponse<UserNutritionData>
|
||||
|
||||
/**
|
||||
* 通过用户信息获取就餐数据
|
||||
*/
|
||||
@GET
|
||||
suspend fun getUserNutritionData(
|
||||
@Url url: String = "${GlobalData.appBaseUrl}/zhstapi/zhst/getUserNutritionData/face",
|
||||
@Query("appVersion") appVersion: String = GlobalData.appVersion,
|
||||
@Query("restId") restId: String,
|
||||
@Query("userId") userId: String,
|
||||
@Query("foodId") foodId: String,
|
||||
): ApiResponse<UserNutritionData>
|
||||
@Url url: String = "${GlobalData.appBaseUrl}/terminal/neglect/boothMachine/app/getUserCurrentFoodDetails",
|
||||
@Query("id") userId: String
|
||||
): ApiResponse<UserNutrition>
|
||||
|
||||
/**
|
||||
* 获取支付二维码
|
||||
*/
|
||||
@GET
|
||||
suspend fun getQrCodeImg(
|
||||
@Url url: String = "${GlobalData.appBaseUrl}/pay/yx-check-out-pay/getQrCodeImg",
|
||||
@Query("orderNo") orderNo: String,
|
||||
@Query("memberId") memberId: String?,
|
||||
@Query("totalFee") totalFee: String?
|
||||
): ApiResponse<String?>
|
||||
|
||||
/**
|
||||
* 获取当前餐点类型
|
||||
@@ -136,6 +166,33 @@ interface ApiService {
|
||||
@Body req: FoodSearchReq
|
||||
): ApiResponse<List<FoodInfo>>
|
||||
|
||||
/**
|
||||
* 查询支付结果
|
||||
*/
|
||||
@POST
|
||||
suspend fun queryOrderState(
|
||||
@Url url: String = "${GlobalData.appBaseUrl}/pay/yx-check-out-pay/turnOrderInfo",
|
||||
@Body param: HashMap<String, String>
|
||||
): ApiResponse<PayResult?>
|
||||
|
||||
/**
|
||||
* 现金支付
|
||||
*/
|
||||
@POST
|
||||
suspend fun cashPay(
|
||||
@Url url: String = "${GlobalData.appBaseUrl}/pay/yx-check-out-pay/cashPayment",
|
||||
@Body param: HashMap<String, String>
|
||||
): ApiResponse<Boolean?>
|
||||
|
||||
/**
|
||||
* 会员支付
|
||||
*/
|
||||
@POST
|
||||
suspend fun memberPay(
|
||||
@Url url: String = "${GlobalData.appBaseUrl}/pay/yx-check-out-pay/memberPay",
|
||||
@Body param: HashMap<String, String>
|
||||
): ApiResponse<Any?>
|
||||
|
||||
/**
|
||||
* 开餐-生成订单
|
||||
*/
|
||||
|
||||
@@ -20,6 +20,7 @@ class RequestInterceptor : Interceptor {
|
||||
.header("Accept", "application/json")
|
||||
// .header("Authorization", "Bearer ${getToken()}")
|
||||
// .header("X-Access-Token", getToken(originalRequest))
|
||||
.header("X-Access-Token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjYW50ZWVuSWQiOiJiZTE1NDgzMS0zNDY2LTNiYTItYTJlYS01NzY1MmM5MTlmZWQiLCJ0eXBlIjoiNCIsInVzZXJJZCI6IjAwMDAwMDAwMDAwMDAwMDAwMDEifQ.sN40cOC-O5WQFrF4IDUs8fFlkNdUKLbJt_rHyTsgYYM")
|
||||
// .header("X-DEVICE-CODE", "bcf396ed-78f6-3864-9837-7c37c5b2ec41")
|
||||
.header("X-DEVICE-CODE", GlobalData.deviceId)
|
||||
.header("authorization", "57ee87183f2a4fa59683ec9ef41c8f5d")
|
||||
|
||||
Reference in New Issue
Block a user