use of build.dream.common.api.ApiRest in project erp-catering by liuyandong33.
the class DietOrderController method obtainDietOrderInfo.
/**
* 获取订单明细
*
* @return
*/
@RequestMapping(value = "/obtainDietOrderInfo")
@ResponseBody
public String obtainDietOrderInfo() {
ApiRest apiRest = null;
Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
try {
ObtainDietOrderInfoModel obtainDietOrderInfoModel = ApplicationHandler.instantiateObject(ObtainDietOrderInfoModel.class, requestParameters);
obtainDietOrderInfoModel.validateAndThrow();
apiRest = dietOrderService.obtainDietOrderInfo(obtainDietOrderInfoModel);
} catch (Exception e) {
LogUtils.error("获取订单信息失败", controllerSimpleName, "obtainDietOrderInfo", e, requestParameters);
apiRest = new ApiRest(e);
}
return GsonUtils.toJson(apiRest);
}
use of build.dream.common.api.ApiRest in project erp-catering by liuyandong33.
the class ElemeController method queryCompensationOrders.
/**
* 批量查询索赔结果
*
* @return
*/
@RequestMapping(value = "queryCompensationOrders")
@ResponseBody
public String queryCompensationOrders() {
ApiRest apiRest = null;
Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
try {
QueryCompensationOrdersModel queryCompensationOrdersModel = ApplicationHandler.instantiateObject(QueryCompensationOrdersModel.class, requestParameters);
queryCompensationOrdersModel.validateAndThrow();
apiRest = elemeService.queryCompensationOrders(queryCompensationOrdersModel);
} catch (Exception e) {
LogUtils.error("批量查询索赔结果失败", controllerSimpleName, "queryCompensationOrders", e, requestParameters);
apiRest = new ApiRest(e);
}
return GsonUtils.toJson(apiRest);
}
use of build.dream.common.api.ApiRest in project erp-catering by liuyandong33.
the class ElemeController method batchApplyCompensations.
/**
* 批量查询订单是否支持索赔
*
* @return
*/
@RequestMapping(value = "batchApplyCompensations")
@ResponseBody
public String batchApplyCompensations() {
ApiRest apiRest = null;
Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
try {
BatchApplyCompensationsModel batchApplyCompensationsModel = ApplicationHandler.instantiateObject(BatchApplyCompensationsModel.class, requestParameters);
batchApplyCompensationsModel.setRequests(requestParameters.get("requests"));
batchApplyCompensationsModel.validateAndThrow();
apiRest = elemeService.batchApplyCompensations(batchApplyCompensationsModel);
} catch (Exception e) {
LogUtils.error("批量申请索赔失败", controllerSimpleName, "batchApplyCompensations", e, requestParameters);
apiRest = new ApiRest(e);
}
return GsonUtils.toJson(apiRest);
}
use of build.dream.common.api.ApiRest in project erp-catering by liuyandong33.
the class ElemeController method getRefundOrders.
/**
* 查询店铺未处理的退单
*
* @return
*/
@RequestMapping(value = "getRefundOrders")
@ResponseBody
public String getRefundOrders() {
ApiRest apiRest = null;
Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
try {
GetRefundOrdersModel getRefundOrdersModel = ApplicationHandler.instantiateObject(GetRefundOrdersModel.class, requestParameters);
getRefundOrdersModel.validateAndThrow();
apiRest = elemeService.getRefundOrders(getRefundOrdersModel);
} catch (Exception e) {
LogUtils.error("查询店铺未处理的退单失败", controllerSimpleName, "getRefundOrders", e, requestParameters);
apiRest = new ApiRest(e);
}
return GsonUtils.toJson(apiRest);
}
use of build.dream.common.api.ApiRest in project erp-catering by liuyandong33.
the class ElemeController method cancelOrderLite.
/**
* 取消订单
*
* @return
*/
@RequestMapping(value = "/cancelOrderLite")
@ResponseBody
public String cancelOrderLite() {
ApiRest apiRest = null;
Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
try {
CancelOrderLiteModel cancelOrderLiteModel = ApplicationHandler.instantiateObject(CancelOrderLiteModel.class, requestParameters);
cancelOrderLiteModel.validateAndThrow();
apiRest = elemeService.cancelOrderLite(cancelOrderLiteModel);
} catch (Exception e) {
LogUtils.error("取消订单失败", controllerSimpleName, "cancelOrderLite", e, requestParameters);
apiRest = new ApiRest(e);
}
return GsonUtils.toJson(apiRest);
}
Aggregations