|
@@ -153,7 +153,7 @@ public class XiaoJuService {
|
|
|
|
|
|
XiaoJuStore byStoreId = xiaoJuStoreDao.findByStoreId(storeId);
|
|
XiaoJuStore byStoreId = xiaoJuStoreDao.findByStoreId(storeId);
|
|
List<StoreDetailItemInfo> itemInfoList = queryStoreDetailResponse.getItemInfoList();
|
|
List<StoreDetailItemInfo> itemInfoList = queryStoreDetailResponse.getItemInfoList();
|
|
- if (ObjectUtil.isEmpty(byStoreId)){
|
|
|
|
|
|
+ if (ObjectUtil.isEmpty(byStoreId)) {
|
|
XiaoJuStore xiaoJuStore = new XiaoJuStore();
|
|
XiaoJuStore xiaoJuStore = new XiaoJuStore();
|
|
BeanUtils.copyProperties(queryStoreDetailResponse, xiaoJuStore);
|
|
BeanUtils.copyProperties(queryStoreDetailResponse, xiaoJuStore);
|
|
xiaoJuStore.setLogo(queryStoreDetailResponse.getStoreLogo());
|
|
xiaoJuStore.setLogo(queryStoreDetailResponse.getStoreLogo());
|
|
@@ -161,8 +161,6 @@ public class XiaoJuService {
|
|
xiaoJuStore.setPicList(queryStoreDetailResponse.getStorePicList());
|
|
xiaoJuStore.setPicList(queryStoreDetailResponse.getStorePicList());
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
List<ItemPriceInfoForCallback> itemInfoList1 = new ArrayList<>();
|
|
List<ItemPriceInfoForCallback> itemInfoList1 = new ArrayList<>();
|
|
for (StoreDetailItemInfo storeDetailItemInfo : itemInfoList) {
|
|
for (StoreDetailItemInfo storeDetailItemInfo : itemInfoList) {
|
|
ItemPriceInfoForCallback itemPriceInfoForCallback = new ItemPriceInfoForCallback();
|
|
ItemPriceInfoForCallback itemPriceInfoForCallback = new ItemPriceInfoForCallback();
|
|
@@ -172,7 +170,7 @@ public class XiaoJuService {
|
|
}
|
|
}
|
|
xiaoJuStore.setItemInfoList(itemInfoList1);
|
|
xiaoJuStore.setItemInfoList(itemInfoList1);
|
|
xiaoJuStoreDao.save(xiaoJuStore);
|
|
xiaoJuStoreDao.save(xiaoJuStore);
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
|
|
|
|
BeanUtils.copyProperties(queryStoreDetailResponse, byStoreId, "id", "updateTime");
|
|
BeanUtils.copyProperties(queryStoreDetailResponse, byStoreId, "id", "updateTime");
|
|
byStoreId.setLocation(new double[]{queryStoreDetailResponse.getLon(), queryStoreDetailResponse.getLat()});
|
|
byStoreId.setLocation(new double[]{queryStoreDetailResponse.getLon(), queryStoreDetailResponse.getLat()});
|
|
@@ -379,6 +377,34 @@ public class XiaoJuService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+ // 同步订单状态
|
|
|
|
+ public void syncOrderStatus(SynOrderStatusRequest synOrderStatusRequest) {
|
|
|
|
+
|
|
|
|
+ QueryClient queryClient = QueryClientFactory.create(oilConfig);
|
|
|
|
+
|
|
|
|
+ queryClient.api().syncOrderStatus(synOrderStatusRequest);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 查询订单列表
|
|
|
|
+ public QueryApiOrderListResponse queryOrderList(QueryApiOrderListRequest queryApiOrderListRequest) {
|
|
|
|
+ String userId = authHelper.getCurrentUser().getUserId();
|
|
|
|
+
|
|
|
|
+ queryApiOrderListRequest.setMobile(authHelper.getCurrentUser().getPhone());
|
|
|
|
+ queryApiOrderListRequest.setOutUserId(userId);
|
|
|
|
+
|
|
|
|
+ QueryClient queryClient = QueryClientFactory.create(oilConfig);
|
|
|
|
+
|
|
|
|
+ QueryApiOrderListResponse queryApiOrderListResponse = queryClient.api().queryOrderList(queryApiOrderListRequest);
|
|
|
|
+
|
|
|
|
+ return queryApiOrderListResponse;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
// 下单前查询最优可用券
|
|
// 下单前查询最优可用券
|
|
public ResultContent<List<AllowancePromotionInfo>> queryOrderPromotionList(XiaoJuQueryOrderPromotionListModel xiaoJuQueryOrderPromotionListModel) {
|
|
public ResultContent<List<AllowancePromotionInfo>> queryOrderPromotionList(XiaoJuQueryOrderPromotionListModel xiaoJuQueryOrderPromotionListModel) {
|
|
String userId = authHelper.getCurrentUser().getUserId();
|
|
String userId = authHelper.getCurrentUser().getUserId();
|
|
@@ -399,7 +425,7 @@ public class XiaoJuService {
|
|
List<AllowancePromotionInfo> response = queryClient.promotion().queryOrderPromotionList(request);
|
|
List<AllowancePromotionInfo> response = queryClient.promotion().queryOrderPromotionList(request);
|
|
apiLog.setResponse(JSONUtil.toJsonStr(response));
|
|
apiLog.setResponse(JSONUtil.toJsonStr(response));
|
|
apiLogDao.save(apiLog);
|
|
apiLogDao.save(apiLog);
|
|
- return ResultContent.build(ResultState.Success,response);
|
|
|
|
|
|
+ return ResultContent.build(ResultState.Success, response);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
apiLog.setResponse(e.getCause().getMessage());
|
|
apiLog.setResponse(e.getCause().getMessage());
|
|
@@ -429,7 +455,7 @@ public class XiaoJuService {
|
|
List<AllowancePromotionInfo> response = queryClient.promotion().queryStorePromotionList(request);
|
|
List<AllowancePromotionInfo> response = queryClient.promotion().queryStorePromotionList(request);
|
|
apiLog.setResponse(JSONUtil.toJsonStr(response));
|
|
apiLog.setResponse(JSONUtil.toJsonStr(response));
|
|
apiLogDao.save(apiLog);
|
|
apiLogDao.save(apiLog);
|
|
- return ResultContent.build(ResultState.Success,response);
|
|
|
|
|
|
+ return ResultContent.build(ResultState.Success, response);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
apiLog.setResponse(e.getCause().getMessage());
|
|
apiLog.setResponse(e.getCause().getMessage());
|
|
apiLogDao.save(apiLog);
|
|
apiLogDao.save(apiLog);
|
|
@@ -459,7 +485,7 @@ public class XiaoJuService {
|
|
QueryUserPromotionListResponse response = queryClient.promotion().queryUserPromotionList(request);
|
|
QueryUserPromotionListResponse response = queryClient.promotion().queryUserPromotionList(request);
|
|
apiLog.setResponse(JSONUtil.toJsonStr(response));
|
|
apiLog.setResponse(JSONUtil.toJsonStr(response));
|
|
apiLogDao.save(apiLog);
|
|
apiLogDao.save(apiLog);
|
|
- return ResultContent.build(ResultState.Success,response);
|
|
|
|
|
|
+ return ResultContent.build(ResultState.Success, response);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|