【DictTypeController】统一方法名称并删除多余

pull/3/head
chenjinlong 2021-02-25 17:41:12 +08:00
parent 5a5a8a9979
commit 15ef9bdee4
1 changed files with 14 additions and 29 deletions

View File

@ -37,8 +37,8 @@ public class DictTypeController {
* @author fengshuonan * @author fengshuonan
* @date 2018/7/25 12:36 * @date 2018/7/25 12:36
*/ */
@PostResource(name = "添加字典类型", path = "/dictType/addDictType", requiredPermission = false) @PostResource(name = "添加字典类型", path = "/dictType/add", requiredPermission = false)
public ResponseData addDictType(@RequestBody @Validated(DictTypeRequest.add.class) DictTypeRequest dictTypeRequest) { public ResponseData add(@RequestBody @Validated(DictTypeRequest.add.class) DictTypeRequest dictTypeRequest) {
this.dictTypeService.add(dictTypeRequest); this.dictTypeService.add(dictTypeRequest);
return new SuccessResponseData(); return new SuccessResponseData();
} }
@ -49,8 +49,8 @@ public class DictTypeController {
* @author fengshuonan * @author fengshuonan
* @date 2018/7/25 12:36 * @date 2018/7/25 12:36
*/ */
@PostResource(name = "删除字典类型", path = "/dictType/deleteDictType", requiredPermission = false) @PostResource(name = "删除字典类型", path = "/dictType/delete", requiredPermission = false)
public ResponseData deleteDictType(@RequestBody @Validated(DictTypeRequest.delete.class) DictTypeRequest dictTypeRequest) { public ResponseData delete(@RequestBody @Validated(DictTypeRequest.delete.class) DictTypeRequest dictTypeRequest) {
this.dictTypeService.del(dictTypeRequest); this.dictTypeService.del(dictTypeRequest);
return new SuccessResponseData(); return new SuccessResponseData();
} }
@ -61,8 +61,8 @@ public class DictTypeController {
* @author fengshuonan * @author fengshuonan
* @date 2018/7/25 12:36 * @date 2018/7/25 12:36
*/ */
@PostResource(name = "修改字典类型", path = "/dictType/updateDictType", requiredPermission = false) @PostResource(name = "修改字典类型", path = "/dictType/edit", requiredPermission = false)
public ResponseData updateDictType(@RequestBody @Validated(DictTypeRequest.edit.class) DictTypeRequest dictTypeRequest) { public ResponseData edit(@RequestBody @Validated(DictTypeRequest.edit.class) DictTypeRequest dictTypeRequest) {
this.dictTypeService.edit(dictTypeRequest); this.dictTypeService.edit(dictTypeRequest);
return new SuccessResponseData(); return new SuccessResponseData();
} }
@ -85,8 +85,8 @@ public class DictTypeController {
* @author fengshuonan * @author fengshuonan
* @date 2021/1/13 11:25 * @date 2021/1/13 11:25
*/ */
@GetResource(name = "获取字典类型详情", path = "/dictType/getDictDetail", requiredPermission = false) @GetResource(name = "获取字典类型详情", path = "/dictType/detail", requiredPermission = false)
public ResponseData getDictDetail(@RequestBody @Validated(BaseRequest.detail.class) DictTypeRequest dictTypeRequest) { public ResponseData detail(@Validated(BaseRequest.detail.class) DictTypeRequest dictTypeRequest) {
SysDictType detail = this.dictTypeService.detail(dictTypeRequest); SysDictType detail = this.dictTypeService.detail(dictTypeRequest);
return new SuccessResponseData(detail); return new SuccessResponseData(detail);
} }
@ -97,10 +97,9 @@ public class DictTypeController {
* @author fengshuonan * @author fengshuonan
* @date 2020/10/30 21:46 * @date 2020/10/30 21:46
*/ */
@GetResource(name = "获取字典类型列表", path = "/dictType/getDictTypeList", requiredPermission = false) @GetResource(name = "获取字典类型列表", path = "/dictType/list", requiredPermission = false)
public ResponseData getDictTypeList(DictTypeRequest dictTypeRequest) { public ResponseData list(DictTypeRequest dictTypeRequest) {
List<SysDictType> sysDictTypeList = dictTypeService.findList(dictTypeRequest); return new SuccessResponseData(dictTypeService.findList(dictTypeRequest));
return new SuccessResponseData(sysDictTypeList);
} }
/** /**
@ -109,25 +108,11 @@ public class DictTypeController {
* @author fengshuonan * @author fengshuonan
* @date 2020/10/30 21:46 * @date 2020/10/30 21:46
*/ */
@GetResource(name = "获取字典类型列表(分页)", path = "/dictType/getDictTypePageList", requiredPermission = false) @GetResource(name = "获取字典类型列表(分页)", path = "/dictType/page", requiredPermission = false)
public ResponseData getDictTypePageList(DictTypeRequest dictTypeRequest) { public ResponseData page(DictTypeRequest dictTypeRequest) {
PageResult<SysDictType> dictTypePageList = dictTypeService.findPage(dictTypeRequest); return new SuccessResponseData(dictTypeService.findPage(dictTypeRequest));
return new SuccessResponseData(dictTypePageList);
} }
/**
* code
*
* @author fengshuonan
* @date 2020/10/30 21:53
*/
@GetResource(name = "code校验", path = "/dictType/validateCodeAvailable", requiredPermission = false)
public ResponseData validateCodeAvailable(@Validated(DictTypeRequest.validateCode.class) DictTypeRequest dictTypeRequest) {
boolean flag = this.dictTypeService.validateCodeAvailable(dictTypeRequest);
return new SuccessResponseData(flag);
}
/** /**
* *
* *