Commit 3b0b7d92 by zhiheng.zhang

益禾堂添加排队号

parent f1d7ccef
......@@ -3295,4 +3295,15 @@ public class OrderSdkAdapter {
return couponLockRequest;
}
public QueryLineUpResponse convent2QueryLineUpResponse(BaseResponse baseResponse) {
QueryLineUpResponse response = new QueryLineUpResponse();
response.setErrcode(Integer.parseInt(baseResponse.getCode()));
response.setErrmsg(baseResponse.getMessage());
if (baseResponse.getResult() == null) {
return response;
}
response.setOrderCodes((List<String>) baseResponse.getResult());
return response;
}
}
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @Title: QueryOrderResponse
* @Package cn.freemud.entities.dto
* @Description: 订单列表
* @author: liming.guo
* @date: 2018/5/24 17:37
* @version V1.0
* @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
package com.freemud.sdk.api.assortment.order.response.order;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@NoArgsConstructor
@Data
public class QueryLineUpResponse {
/**
* errcode : 100
* errmsg : 查询订单成功
*/
private List<String> orderCodes;
private int errcode;
private String errmsg;
}
\ No newline at end of file
......@@ -355,6 +355,6 @@ public interface OrderCenterSdkService {
/**
* 获取历史订单
*/
BaseOrderResponse queryLineUpOrder(QueryLineUpOrderReq queryLineUpOrderReq);
QueryLineUpResponse queryLineUpOrder(QueryLineUpOrderReq queryLineUpOrderReq);
}
......@@ -1960,8 +1960,8 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
}
@Override
public BaseOrderResponse queryLineUpOrder(QueryLineUpOrderReq queryLineUpOrderReq) {
public QueryLineUpResponse queryLineUpOrder(QueryLineUpOrderReq queryLineUpOrderReq) {
com.freemud.application.sdk.api.ordercenter.response.BaseResponse<List<String>> response = orderSdkService.queryLineUpOrder(queryLineUpOrderReq, LogThreadLocal.getTrackingNo());
return orderSdkAdapter.convent2BaseOrderResponse(response);
return orderSdkAdapter.convent2QueryLineUpResponse(response);
}
}
......@@ -933,14 +933,13 @@ public class OrderServiceImpl implements Orderservice {
queryLineUpOrderReq.setStartTime(DateUtil.addHours(new Date(orderBean.getGmtCreate()),-24).getTime());
queryLineUpOrderReq.setEndTime(orderBean.getGmtCreate());
// 取餐排队人数查询代码去除
BaseOrderResponse response = orderCenterSdkService.queryLineUpOrder(queryLineUpOrderReq);
List<String> strings = new ArrayList<>();
QueryLineUpResponse response = orderCenterSdkService.queryLineUpOrder(queryLineUpOrderReq);
if (RESPONSE_SUCCESS_CODE.equals(response.getErrcode())) {
if (StringUtils.isEmpty(response.getData())) {
if (null == response.getOrderCodes()) {
progress = "100";
returnWords = "";
} else {
List<String> orderCodeList = JSONObject.parseObject(JSONObject.toJSON(strings).toString(), List.class);
List<String> orderCodeList = response.getOrderCodes();
//开启制作时间 1 :是 , 2 :否"
JSONObject jsonObject = JSONObject.parseObject(storeResponseDto.getConfiguration());
StoreResponse.Configuration configuration = jsonObject.toJavaObject(StoreResponse.Configuration.class);
......
......@@ -904,7 +904,7 @@ public class OrderSdkService {
* 查询历史订单
*/
public BaseResponse<List<String>> queryLineUpOrder(QueryLineUpOrderReq queryLineUpOrderReq, String trackingNo) {
OrderBaseResp<List<String>> responseDTO = RequestThirdPartyUtils.httpGetReqComplex(restTemplate, QUERY_LINEUP_ORDER,
OrderBaseResp<List<String>> responseDTO = RequestThirdPartyUtils.httpJsonReqComplexNew(restTemplate, QUERY_LINEUP_ORDER,
createBaseRequest(queryLineUpOrderReq, trackingNo), new ParameterizedTypeReference<OrderBaseResp<List<String>>>() {
});
return responseHandle(responseDTO);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment