Search in sources :

Example 1 with ObtainMeiTuanOrderModel

use of build.dream.catering.models.meituan.ObtainMeiTuanOrderModel in project erp-catering by liuyandong33.

the class MeiTuanController method obtainMeiTuanOrder.

/**
 * 拉取美团订单
 *
 * @return
 */
@RequestMapping(value = "/obtainMeiTuanOrder")
@ResponseBody
public String obtainMeiTuanOrder() {
    ApiRest apiRest = null;
    Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
    try {
        ObtainMeiTuanOrderModel obtainMeiTuanOrderModel = ApplicationHandler.instantiateObject(ObtainMeiTuanOrderModel.class, requestParameters);
        obtainMeiTuanOrderModel.validateAndThrow();
        apiRest = meiTuanService.obtainMeiTuanOrder(obtainMeiTuanOrderModel);
    } catch (Exception e) {
        LogUtils.error("拉取美团订单失败!", controllerSimpleName, "pullMeiTuanOrder", e, requestParameters);
        apiRest = new ApiRest(e);
    }
    return GsonUtils.toJson(apiRest);
}
Also used : ApiRest(build.dream.common.api.ApiRest) ObtainMeiTuanOrderModel(build.dream.catering.models.meituan.ObtainMeiTuanOrderModel) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

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