Search in sources :

Example 1 with ObtainDietOrderInfoModel

use of build.dream.catering.models.dietorder.ObtainDietOrderInfoModel 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);
}
Also used : ApiRest(build.dream.common.api.ApiRest) ObtainDietOrderInfoModel(build.dream.catering.models.dietorder.ObtainDietOrderInfoModel) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

ObtainDietOrderInfoModel (build.dream.catering.models.dietorder.ObtainDietOrderInfoModel)1 ApiRest (build.dream.common.api.ApiRest)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1