|
|
@@ -16,6 +16,7 @@
|
|
|
*/
|
|
|
package org.springblade.client.serial.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
@@ -104,7 +105,13 @@ public class TableMessageController extends BladeController {
|
|
|
@ApiOperationSupport(order = 5)
|
|
|
@ApiOperation(value = "修改", notes = "传入tableMessage")
|
|
|
public R update(@Valid @RequestBody TableMessage tableMessage) {
|
|
|
- return R.status(tableMessageService.updateById(tableMessage));
|
|
|
+ TableMessage fileName = tableMessageService.getOne(new QueryWrapper<TableMessage>().eq("file_name", tableMessage.getFileName())
|
|
|
+ .eq("tenant_id",SecureUtil.getTenantId()).eq("is_deleted",0));
|
|
|
+ if (fileName == null){
|
|
|
+ return R.success("未找到要删除的数据");
|
|
|
+ }
|
|
|
+ tableMessage.setId(fileName.getId());
|
|
|
+ return R.data(tableMessageService.removeById(tableMessage));
|
|
|
}
|
|
|
|
|
|
/**
|