|
@@ -343,13 +343,14 @@ public class XiaoJuService {
|
|
|
|
|
|
|
|
|
|
// 下单前查询最优可用券
|
|
// 下单前查询最优可用券
|
|
- public ResultContent<List<AllowancePromotionInfo>> queryOrderPromotionList(QueryCalPriceModel queryCalPriceModel) {
|
|
|
|
|
|
+ public ResultContent<List<AllowancePromotionInfo>> queryOrderPromotionList(XiaoJuQueryOrderPromotionListModel xiaoJuQueryOrderPromotionListModel) {
|
|
String userId = authHelper.getCurrentUser().getUserId();
|
|
String userId = authHelper.getCurrentUser().getUserId();
|
|
QueryOrderPromotionListRequest request = new QueryOrderPromotionListRequest();
|
|
QueryOrderPromotionListRequest request = new QueryOrderPromotionListRequest();
|
|
request.setOutUserId(userId);
|
|
request.setOutUserId(userId);
|
|
- request.setStoreId(queryCalPriceModel.getStoreId());
|
|
|
|
|
|
+ request.setStoreId(xiaoJuQueryOrderPromotionListModel.getStoreId());
|
|
request.setAllowanceType(2);
|
|
request.setAllowanceType(2);
|
|
- request.setOrderAmount(queryCalPriceModel.getAmount());
|
|
|
|
|
|
+ request.setMobile(authHelper.getCurrentUser().getPhone());
|
|
|
|
+ request.setOrderAmount(xiaoJuQueryOrderPromotionListModel.getOrderAmount());
|
|
|
|
|
|
QueryClient queryClient = QueryClientFactory.create(oilConfig);
|
|
QueryClient queryClient = QueryClientFactory.create(oilConfig);
|
|
|
|
|
|
@@ -361,7 +362,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.buildContent(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());
|
|
@@ -391,7 +392,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.buildContent(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);
|
|
@@ -421,7 +422,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.buildContent(response);
|
|
|
|
|
|
+ return ResultContent.build(ResultState.Success,response);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|