|
@@ -64,7 +64,7 @@ public class SysPostController {
|
|
|
*/
|
|
|
@OperationLog(type = SysOperationLogType.UPDATE)
|
|
|
@PostMapping("/update")
|
|
|
- public ResponseResult<Void> update(@MyRequestBody SysPostDto sysPostDto) {
|
|
|
+ public ResponseResult<Void> update(@RequestBody SysPostDto sysPostDto) {
|
|
|
String errorMessage = MyCommonUtil.getModelValidationError(sysPostDto, Default.class, UpdateGroup.class);
|
|
|
if (errorMessage != null) {
|
|
|
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
|
@@ -113,21 +113,16 @@ public class SysPostController {
|
|
|
* 列出符合过滤条件的岗位管理列表。
|
|
|
*
|
|
|
* @param sysPostDtoFilter 过滤对象。
|
|
|
- * @param orderParam 排序参数。
|
|
|
- * @param pageParam 分页参数。
|
|
|
* @return 应答结果对象,包含查询结果集。
|
|
|
*/
|
|
|
@PostMapping("/list")
|
|
|
public ResponseResult<MyPageData<SysPostVo>> list(
|
|
|
- @MyRequestBody SysPostDto sysPostDtoFilter,
|
|
|
- @MyRequestBody MyOrderParam orderParam,
|
|
|
- @MyRequestBody MyPageParam pageParam) {
|
|
|
- if (pageParam != null) {
|
|
|
- PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
|
|
+ @RequestBody SysPostDto sysPostDtoFilter) {
|
|
|
+ if (sysPostDtoFilter.getPageNum() != null) {
|
|
|
+ PageMethod.startPage(sysPostDtoFilter.getPageNum(), sysPostDtoFilter.getPageSize());
|
|
|
}
|
|
|
SysPost sysPostFilter = MyModelUtil.copyTo(sysPostDtoFilter, SysPost.class);
|
|
|
- String orderBy = MyOrderParam.buildOrderBy(orderParam, SysPost.class);
|
|
|
- List<SysPost> sysPostList = sysPostService.getSysPostListWithRelation(sysPostFilter, orderBy);
|
|
|
+ List<SysPost> sysPostList = sysPostService.getSysPostListWithRelation(sysPostFilter);
|
|
|
return ResponseResult.success(MyPageUtil.makeResponseData(sysPostList, SysPost.INSTANCE));
|
|
|
}
|
|
|
|
|
@@ -170,7 +165,7 @@ public class SysPostController {
|
|
|
* @return 应答结果对象,包含字典形式的数据集合。
|
|
|
*/
|
|
|
@PostMapping("/listDictByIds")
|
|
|
- public ResponseResult<List<Map<String, Object>>> listDictByIds(@MyRequestBody List<Long> postIds) {
|
|
|
+ public ResponseResult<List<Map<String, Object>>> listDictByIds(@RequestBody List<Long> postIds) {
|
|
|
List<SysPost> resultList = sysPostService.getInList(new HashSet<>(postIds));
|
|
|
return ResponseResult.success(BeanQuery.select("postId as id", "postName as name").executeFrom(resultList));
|
|
|
}
|