use of build.dream.common.api.ApiRest in project erp-catering by liuyandong33.
the class ElemeController method getOrder.
@RequestMapping(value = "/getOrder")
@ResponseBody
public String getOrder() {
ApiRest apiRest = null;
Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
try {
GetOrderModel getOrderModel = ApplicationHandler.instantiateObject(GetOrderModel.class, requestParameters);
getOrderModel.validateAndThrow();
apiRest = elemeService.getOrder(getOrderModel);
} catch (Exception e) {
LogUtils.error("获取订单失败", controllerSimpleName, "getOrder", 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 setBookingStatus.
/**
* 设置是否支持预定单及预定天数
*
* @return
*/
@RequestMapping(value = "/setBookingStatus")
@ResponseBody
public String setBookingStatus() {
ApiRest apiRest = null;
Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
try {
SetBookingStatusModel setBookingStatusModel = ApplicationHandler.instantiateObject(SetBookingStatusModel.class, requestParameters);
setBookingStatusModel.validateAndThrow();
apiRest = elemeService.setBookingStatus(setBookingStatusModel);
} catch (Exception e) {
LogUtils.error("设置是否支持预定单及预定天数失败", controllerSimpleName, "setBookingStatus", 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 tenantAuthorize.
@RequestMapping(value = "/tenantAuthorize")
@ResponseBody
public String tenantAuthorize() {
ApiRest apiRest = null;
Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
try {
TenantAuthorizeModel tenantAuthorizeModel = ApplicationHandler.instantiateObject(TenantAuthorizeModel.class, requestParameters);
tenantAuthorizeModel.validateAndThrow();
apiRest = elemeService.tenantAuthorize(tenantAuthorizeModel);
} catch (Exception e) {
LogUtils.error("生成授权链接失败", controllerSimpleName, "tenantAuthorize", 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 agreeRefundLite.
/**
* 同意退单/同意取消单(推荐)
*
* @return
*/
@RequestMapping(value = "/agreeRefundLite")
@ResponseBody
public String agreeRefundLite() {
ApiRest apiRest = null;
Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
try {
AgreeRefundLiteModel agreeRefundLiteModel = ApplicationHandler.instantiateObject(AgreeRefundLiteModel.class, requestParameters);
agreeRefundLiteModel.validateAndThrow();
apiRest = elemeService.agreeRefundLite(agreeRefundLiteModel);
} catch (Exception e) {
LogUtils.error("同意退单/同意取消单失败", controllerSimpleName, "agreeRefundLite", 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 evaluateRider.
/**
* 评价骑手
*
* @return
*/
@RequestMapping(value = "evaluateRider")
@ResponseBody
public String evaluateRider() {
ApiRest apiRest = null;
Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
try {
EvaluateRiderModel evaluateRiderModel = ApplicationHandler.instantiateObject(EvaluateRiderModel.class, requestParameters);
evaluateRiderModel.validateAndThrow();
apiRest = elemeService.evaluateRider(evaluateRiderModel);
} catch (Exception e) {
LogUtils.error("评价骑手失败", controllerSimpleName, "evaluateRider", e, requestParameters);
apiRest = new ApiRest(e);
}
return GsonUtils.toJson(apiRest);
}
Aggregations