Search in sources :

Example 1 with Warehouse

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);
}
Also used : Warehouse(com.whoiszxl.entity.Warehouse) SaCheckLogin(cn.dev33.satoken.annotation.SaCheckLogin) ApiOperation(io.swagger.annotations.ApiOperation)

Example 2 with Warehouse

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);
}
Also used : Warehouse(com.whoiszxl.entity.Warehouse) SaCheckLogin(cn.dev33.satoken.annotation.SaCheckLogin) ApiOperation(io.swagger.annotations.ApiOperation)

Aggregations

SaCheckLogin (cn.dev33.satoken.annotation.SaCheckLogin)2 Warehouse (com.whoiszxl.entity.Warehouse)2 ApiOperation (io.swagger.annotations.ApiOperation)2