| | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ard.common.constant.DeviceConstants; |
| | | import com.ard.data.tile.domain.ArdTile; |
| | | import com.ard.data.tile.service.IArdTileService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | @Log(title = "tile管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdTile ardTile) { |
| | | if (DeviceConstants.NOT_UNIQUE.equals(ardTileService.checkArdTileNameUnique(ardTile))) { |
| | | return error("新增tile'" + ardTile.getTilesName() + "'失败,已存在"); |
| | | } |
| | | return toAjax(ardTileService.insertArdTile(ardTile)); |
| | | } |
| | | |
| | |
| | | @Log(title = "tile管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdTile ardTile) { |
| | | if (DeviceConstants.NOT_UNIQUE.equals(ardTileService.checkArdTileNameUnique(ardTile))) { |
| | | return error("修改tile'" + ardTile.getTilesName() + "'失败,已存在"); |
| | | } |
| | | return toAjax(ardTileService.updateArdTile(ardTile)); |
| | | } |
| | | |