use of com.whoiszxl.entity.Warehouse in project shopzz by whoiszxl.
the class WarehouseController method save.
@SaCheckLogin
@PostMapping
@ApiOperation(value = "新增仓库", notes = "新增仓库", response = ResponseResult.class)
public ResponseResult<Boolean> save(@RequestBody WarehouseSaveCommand warehouseSaveCommand) {
Warehouse warehouse = dozerUtils.map(warehouseSaveCommand, Warehouse.class);
boolean saveFlag = warehouseService.save(warehouse);
return ResponseResult.buildByFlag(saveFlag);
}
use of com.whoiszxl.entity.Warehouse in project shopzz by whoiszxl.
the class WarehouseController method update.
@SaCheckLogin
@PutMapping
@ApiOperation(value = "更新仓库", notes = "更新仓库", response = ResponseResult.class)
public ResponseResult<Boolean> update(@RequestBody WarehouseUpdateCommand warehouseSaveCommand) {
Warehouse warehouse = dozerUtils.map(warehouseSaveCommand, Warehouse.class);
boolean updateFlag = warehouseService.updateById(warehouse);
return ResponseResult.buildByFlag(updateFlag);
}
Aggregations