commit:权限模块新增分配详情功能

This commit is contained in:
Jerry
2020-11-21 11:33:37 +08:00
parent 5cdf9b7115
commit 512b9be702
401 changed files with 5651 additions and 1328 deletions

View File

@@ -81,7 +81,7 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
@PostMapping("/listWithGroup")
public ResponseResult<MyPageData<CourseTransStatsDto>> listWithGroup(
@MyRequestBody("courseTransStatsFilter") CourseTransStatsDto courseTransStatsDtoFilter,
@MyRequestBody MyGroupParam groupParam,
@MyRequestBody(required = true) MyGroupParam groupParam,
@MyRequestBody MyOrderParam orderParam,
@MyRequestBody MyPageParam pageParam) {
String orderBy = MyOrderParam.buildOrderBy(orderParam, CourseTransStats.class);
@@ -173,6 +173,18 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
return super.baseExistId(statsId);
}
/**
* 删除符合过滤条件的数据。
*
* @param filter 过滤对象。
* @return 删除数量。
*/
@ApiOperation(hidden = true, value = "deleteBy")
@PostMapping("/deleteBy")
public ResponseResult<Integer> deleteBy(@RequestBody CourseTransStatsDto filter) throws Exception {
return super.baseDeleteBy(filter, CourseTransStats.INSTANCE);
}
/**
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
*

View File

@@ -81,7 +81,7 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
@PostMapping("/listWithGroup")
public ResponseResult<MyPageData<StudentActionStatsDto>> listWithGroup(
@MyRequestBody("studentActionStatsFilter") StudentActionStatsDto studentActionStatsDtoFilter,
@MyRequestBody MyGroupParam groupParam,
@MyRequestBody(required = true) MyGroupParam groupParam,
@MyRequestBody MyOrderParam orderParam,
@MyRequestBody MyPageParam pageParam) {
String orderBy = MyOrderParam.buildOrderBy(orderParam, StudentActionStats.class);
@@ -173,6 +173,18 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
return super.baseExistId(statsId);
}
/**
* 删除符合过滤条件的数据。
*
* @param filter 过滤对象。
* @return 删除数量。
*/
@ApiOperation(hidden = true, value = "deleteBy")
@PostMapping("/deleteBy")
public ResponseResult<Integer> deleteBy(@RequestBody StudentActionStatsDto filter) throws Exception {
return super.baseDeleteBy(filter, StudentActionStats.INSTANCE);
}
/**
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
*

View File

@@ -56,14 +56,14 @@ public class StudentActionTransController extends BaseController<StudentActionTr
public ResponseResult<Long> add(@MyRequestBody("studentActionTrans") StudentActionTransDto studentActionTransDto) {
String errorMessage = MyCommonUtil.getModelValidationError(studentActionTransDto);
if (errorMessage != null) {
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
}
StudentActionTrans studentActionTrans = StudentActionTrans.INSTANCE.toModel(studentActionTransDto);
// 验证远程服务关联Id的数据合法性
CallResult remoteCallResult = studentActionTransService.verifyRemoteRelatedData(studentActionTrans, null);
if (!remoteCallResult.isSuccess()) {
errorMessage = remoteCallResult.getErrorMessage();
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
}
studentActionTrans = studentActionTransService.saveNew(studentActionTrans);
return ResponseResult.success(studentActionTrans.getTransId());
@@ -82,7 +82,7 @@ public class StudentActionTransController extends BaseController<StudentActionTr
public ResponseResult<Void> update(@MyRequestBody("studentActionTrans") StudentActionTransDto studentActionTransDto) {
String errorMessage = MyCommonUtil.getModelValidationError(studentActionTransDto, Default.class, UpdateGroup.class);
if (errorMessage != null) {
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
}
StudentActionTrans studentActionTrans = StudentActionTrans.INSTANCE.toModel(studentActionTransDto);
StudentActionTrans originalStudentActionTrans = studentActionTransService.getById(studentActionTrans.getTransId());
@@ -95,7 +95,7 @@ public class StudentActionTransController extends BaseController<StudentActionTr
CallResult remoteCallResult = studentActionTransService.verifyRemoteRelatedData(studentActionTrans, originalStudentActionTrans);
if (!remoteCallResult.isSuccess()) {
errorMessage = remoteCallResult.getErrorMessage();
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATAED_FAILED, errorMessage);
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
}
if (!studentActionTransService.update(studentActionTrans, originalStudentActionTrans)) {
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
@@ -118,7 +118,7 @@ public class StudentActionTransController extends BaseController<StudentActionTr
// 验证关联Id的数据合法性
StudentActionTrans originalStudentActionTrans = studentActionTransService.getById(transId);
if (originalStudentActionTrans == null) {
//NOTE: 修改下面方括号中的话述
// NOTE: 修改下面方括号中的话述
errorMessage = "数据验证失败,当前 [对象] 并不存在,请刷新后重试!";
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST, errorMessage);
}
@@ -231,6 +231,18 @@ public class StudentActionTransController extends BaseController<StudentActionTr
return super.baseExistId(transId);
}
/**
* 删除符合过滤条件的数据。
*
* @param filter 过滤对象。
* @return 删除数量。
*/
@ApiOperation(hidden = true, value = "deleteBy")
@PostMapping("/deleteBy")
public ResponseResult<Integer> deleteBy(@RequestBody StudentActionTransDto filter) throws Exception {
return super.baseDeleteBy(filter, StudentActionTrans.INSTANCE);
}
/**
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
*

View File

@@ -16,7 +16,6 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" generated="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />