use of build.dream.common.api.ApiRest in project erp-catering by liuyandong33.
the class AnubisController method orderCarrier.
/**
* 订单骑手位置查询
*
* @return
*/
@RequestMapping(value = "/orderCarrier")
@ResponseBody
public String orderCarrier() {
ApiRest apiRest = null;
Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
try {
OrderCarrierModel orderCarrierModel = ApplicationHandler.instantiateObject(OrderCarrierModel.class, requestParameters);
orderCarrierModel.validateAndThrow();
apiRest = anubisService.orderCarrier(orderCarrierModel);
} catch (Exception e) {
LogUtils.error("订单骑手位置查询失败", controllerSimpleName, "orderCarrier", 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 BranchController method listBranches.
@RequestMapping(value = "/listBranches")
@ResponseBody
public String listBranches() {
ApiRest apiRest = null;
Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
try {
ListBranchesModel listBranchesModel = ApplicationHandler.instantiateObject(ListBranchesModel.class, requestParameters);
listBranchesModel.validateAndThrow();
apiRest = branchService.listBranches(listBranchesModel);
} catch (Exception e) {
LogUtils.error("查询门店列表失败", controllerSimpleName, "listBranches", 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 BranchController method deleteBranch.
/**
* 删除门店
*
* @return
*/
@RequestMapping(value = "/deleteBranch")
@ResponseBody
public String deleteBranch() {
ApiRest apiRest = null;
Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
try {
DeleteBranchModel deleteBranchModel = ApplicationHandler.instantiateObject(DeleteBranchModel.class, requestParameters);
deleteBranchModel.validateAndThrow();
apiRest = branchService.deleteBranch(deleteBranchModel);
} catch (Exception e) {
LogUtils.error("删除门店信息失败", controllerSimpleName, "deleteBranch", 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 BranchController method pullBranchInfos.
/**
* 拉取门店信息
*
* @return
*/
@RequestMapping(value = "/pullBranchInfos")
@ResponseBody
public String pullBranchInfos() {
ApiRest apiRest = null;
Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
try {
PullBranchInfosModel pullBranchInfosModel = ApplicationHandler.instantiateObject(PullBranchInfosModel.class, requestParameters);
pullBranchInfosModel.validateAndThrow();
apiRest = branchService.pullBranchInfos(pullBranchInfosModel);
} catch (Exception e) {
LogUtils.error("拉取门店信息失败", controllerSimpleName, "pullBranchInfos", 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 BranchController method initializeBranch.
@RequestMapping(value = "/initializeBranch")
@ResponseBody
public String initializeBranch() {
ApiRest apiRest = null;
Map<String, String> requestParameters = ApplicationHandler.getRequestParameters();
try {
InitializeBranchModel initializeBranchModel = ApplicationHandler.instantiateObject(InitializeBranchModel.class, requestParameters);
initializeBranchModel.validateAndThrow();
apiRest = branchService.initializeBranch(initializeBranchModel);
} catch (Exception e) {
LogUtils.error("初始化门店失败", controllerSimpleName, "initializeBranch", e, requestParameters);
apiRest = new ApiRest(e);
}
return GsonUtils.toJson(apiRest);
}
Aggregations