Search in sources :

Example 1 with OfflinePosModel

use of build.dream.catering.models.pos.OfflinePosModel in project erp-catering by liuyandong33.

the class PosController method offlinePos.

/**
 * 下线POS
 *
 * @return
 */
@RequestMapping(value = "/offlinePos")
@ResponseBody
public String offlinePos() {
    ApiRest apiRest = null;
    Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
    try {
        OfflinePosModel offlinePosModel = ApplicationHandler.instantiateObject(OfflinePosModel.class, requestParameters);
        offlinePosModel.validateAndThrow();
        apiRest = posService.offlinePos(offlinePosModel);
    } catch (Exception e) {
        LogUtils.error("下线POS", controllerSimpleName, "offlinePos", e, requestParameters);
        apiRest = new ApiRest(e);
    }
    return GsonUtils.toJson(apiRest);
}
Also used : ApiRest(build.dream.common.api.ApiRest) OfflinePosModel(build.dream.catering.models.pos.OfflinePosModel) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

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