mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-07-30 03:03:13 +08:00
Complete operation addition, deletion, modification, and check
This commit is contained in:
@ -79,4 +79,9 @@ public class Operation {
|
||||
* operation type
|
||||
*/
|
||||
private String operationType;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ai.chat2db.server.domain.api.param;
|
||||
package ai.chat2db.server.domain.api.param.operation;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ai.chat2db.server.domain.api.param;
|
||||
package ai.chat2db.server.domain.api.param.operation;
|
||||
|
||||
import ai.chat2db.server.tools.base.wrapper.param.PageQueryParam;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ai.chat2db.server.domain.api.param;
|
||||
package ai.chat2db.server.domain.api.param.operation;
|
||||
|
||||
import ai.chat2db.server.tools.base.wrapper.param.PageQueryParam;
|
||||
|
@ -0,0 +1,27 @@
|
||||
package ai.chat2db.server.domain.api.param.operation;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.NonNull;
|
||||
|
||||
/**
|
||||
* query
|
||||
*
|
||||
* @author Jiaju Zhuang
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class OperationQueryParam {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NonNull
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@NonNull
|
||||
private Long userId;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package ai.chat2db.server.domain.api.param;
|
||||
package ai.chat2db.server.domain.api.param.operation;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ai.chat2db.server.domain.api.param;
|
||||
package ai.chat2db.server.domain.api.param.operation;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
@ -1,8 +1,8 @@
|
||||
package ai.chat2db.server.domain.api.service;
|
||||
|
||||
import ai.chat2db.server.domain.api.param.OperationLogPageQueryParam;
|
||||
import ai.chat2db.server.domain.api.param.operation.OperationLogPageQueryParam;
|
||||
import ai.chat2db.server.domain.api.model.OperationLog;
|
||||
import ai.chat2db.server.domain.api.param.OperationLogCreateParam;
|
||||
import ai.chat2db.server.domain.api.param.operation.OperationLogCreateParam;
|
||||
import ai.chat2db.server.tools.base.wrapper.result.DataResult;
|
||||
import ai.chat2db.server.tools.base.wrapper.result.PageResult;
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
package ai.chat2db.server.domain.api.service;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import ai.chat2db.server.domain.api.model.Operation;
|
||||
import ai.chat2db.server.domain.api.param.OperationPageQueryParam;
|
||||
import ai.chat2db.server.domain.api.param.OperationSavedParam;
|
||||
import ai.chat2db.server.domain.api.param.OperationUpdateParam;
|
||||
import ai.chat2db.server.domain.api.param.operation.OperationPageQueryParam;
|
||||
import ai.chat2db.server.domain.api.param.operation.OperationQueryParam;
|
||||
import ai.chat2db.server.domain.api.param.operation.OperationSavedParam;
|
||||
import ai.chat2db.server.domain.api.param.operation.OperationUpdateParam;
|
||||
import ai.chat2db.server.tools.base.wrapper.result.ActionResult;
|
||||
import ai.chat2db.server.tools.base.wrapper.result.DataResult;
|
||||
import ai.chat2db.server.tools.base.wrapper.result.PageResult;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 用户保存ddl
|
||||
@ -25,7 +25,7 @@ public interface OperationService {
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
DataResult<Long> create(OperationSavedParam param);
|
||||
DataResult<Long> createWithPermission(OperationSavedParam param);
|
||||
|
||||
/**
|
||||
* 更新用户的ddl
|
||||
@ -33,7 +33,7 @@ public interface OperationService {
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
ActionResult update(OperationUpdateParam param);
|
||||
ActionResult updateWithPermission(OperationUpdateParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
@ -43,13 +43,27 @@ public interface OperationService {
|
||||
*/
|
||||
DataResult<Operation> find(@NotNull Long id);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
DataResult<Operation> queryExistent(@NotNull Long id);
|
||||
/**
|
||||
* 查询一条数据
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
DataResult<Operation> queryExistent(@NotNull OperationQueryParam param);
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ActionResult delete(@NotNull Long id);
|
||||
ActionResult deleteWithPermission(@NotNull Long id);
|
||||
|
||||
/**
|
||||
* 查询用户执行的ddl记录
|
||||
|
Reference in New Issue
Block a user