mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-08-01 08:52:11 +08:00
离创建连接
This commit is contained in:
@ -12,11 +12,12 @@ import ai.chat2db.server.tools.base.wrapper.result.DataResult;
|
||||
import ai.chat2db.server.tools.base.wrapper.result.PageResult;
|
||||
import ai.chat2db.server.tools.base.wrapper.result.web.WebPageResult;
|
||||
import ai.chat2db.server.web.api.controller.operation.saved.converter.OperationWebConverter;
|
||||
import ai.chat2db.server.web.api.controller.operation.saved.request.BatchTabCloseRequest;
|
||||
import ai.chat2db.server.web.api.controller.operation.saved.request.OperationCreateRequest;
|
||||
import ai.chat2db.server.web.api.controller.operation.saved.request.OperationQueryRequest;
|
||||
import ai.chat2db.server.web.api.controller.operation.saved.request.OperationUpdateRequest;
|
||||
import ai.chat2db.server.web.api.controller.operation.saved.vo.OperationVO;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -95,6 +96,26 @@ public class OperationSavedController {
|
||||
return operationService.update(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量关闭标签
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/batch_tab_close", method = {RequestMethod.POST, RequestMethod.PUT})
|
||||
public ActionResult batchTabClose(@RequestBody BatchTabCloseRequest request) {
|
||||
if (CollectionUtils.isEmpty(request.getIdList())) {
|
||||
return ActionResult.isSuccess();
|
||||
}
|
||||
request.getIdList().forEach(id -> {
|
||||
OperationUpdateParam param = new OperationUpdateParam();
|
||||
param.setId(id);
|
||||
param.setTabOpened("n");
|
||||
operationService.update(param);
|
||||
});
|
||||
return ActionResult.isSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除我的保存
|
||||
*
|
||||
|
@ -0,0 +1,21 @@
|
||||
package ai.chat2db.server.web.api.controller.operation.saved.request;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* close tab
|
||||
* @author Jiaju Zhuang
|
||||
*/
|
||||
@Data
|
||||
public class BatchTabCloseRequest {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull
|
||||
private List<Long> idList;
|
||||
|
||||
}
|
@ -107,7 +107,7 @@ public class RdbDmlExportController {
|
||||
} else {
|
||||
doExportInsert(sql, response, fileName, dbType, tableName);
|
||||
}
|
||||
String SS= ConfigUtils.APP_PATH;
|
||||
String SS = ConfigUtils.APP_PATH;
|
||||
}
|
||||
|
||||
private void doExportCsv(String sql, HttpServletResponse response, String fileName)
|
||||
@ -130,7 +130,7 @@ public class RdbDmlExportController {
|
||||
List<List<String>> writeDataList = Lists.newArrayList();
|
||||
writeDataList.add(dataList);
|
||||
excelWrapper.getExcelWriter().write(writeDataList, excelWrapper.getWriteSheet());
|
||||
});
|
||||
}, false);
|
||||
} finally {
|
||||
if (excelWrapper.getExcelWriter() != null) {
|
||||
excelWrapper.getExcelWriter().finish();
|
||||
@ -161,7 +161,7 @@ public class RdbDmlExportController {
|
||||
sqlInsertStatement.setValues(valuesClause);
|
||||
|
||||
printWriter.println(SQLUtils.toSQLString(sqlInsertStatement, dbType, INSERT_FORMAT_OPTION) + ";");
|
||||
});
|
||||
}, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user