控制层返回值增加泛型

pull/25/MERGE
xixiaowei 2022-01-17 11:12:57 +08:00
parent d352f325bf
commit 6c3ef7c315
30 changed files with 402 additions and 356 deletions

View File

@ -24,9 +24,12 @@
*/
package cn.stylefeng.roses.kernel.config.modular.controller;
import cn.stylefeng.roses.kernel.config.api.pojo.ConfigInitItem;
import cn.stylefeng.roses.kernel.config.api.pojo.ConfigInitRequest;
import cn.stylefeng.roses.kernel.config.modular.entity.SysConfig;
import cn.stylefeng.roses.kernel.config.modular.param.SysConfigParam;
import cn.stylefeng.roses.kernel.config.modular.service.SysConfigService;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
@ -37,7 +40,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
*
@ -59,9 +62,9 @@ public class SysConfigController {
* @date 2020/4/14 11:11
*/
@PostResource(name = "添加系统参数配置", path = "/sysConfig/add")
public ResponseData add(@RequestBody @Validated(SysConfigParam.add.class) SysConfigParam sysConfigParam) {
public ResponseData<?> add(@RequestBody @Validated(SysConfigParam.add.class) SysConfigParam sysConfigParam) {
sysConfigService.add(sysConfigParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -71,9 +74,9 @@ public class SysConfigController {
* @date 2020/4/14 11:11
*/
@PostResource(name = "删除系统参数配置", path = "/sysConfig/delete")
public ResponseData delete(@RequestBody @Validated(SysConfigParam.delete.class) SysConfigParam sysConfigParam) {
public ResponseData<?> delete(@RequestBody @Validated(SysConfigParam.delete.class) SysConfigParam sysConfigParam) {
sysConfigService.del(sysConfigParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -83,9 +86,9 @@ public class SysConfigController {
* @date 2020/4/14 11:11
*/
@PostResource(name = "编辑系统参数配置", path = "/sysConfig/edit")
public ResponseData edit(@RequestBody @Validated(SysConfigParam.edit.class) SysConfigParam sysConfigParam) {
public ResponseData<?> edit(@RequestBody @Validated(SysConfigParam.edit.class) SysConfigParam sysConfigParam) {
sysConfigService.edit(sysConfigParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -95,8 +98,8 @@ public class SysConfigController {
* @date 2020/4/14 11:12
*/
@GetResource(name = "查看系统参数配置", path = "/sysConfig/detail")
public ResponseData detail(@Validated(SysConfigParam.detail.class) SysConfigParam sysConfigParam) {
return new SuccessResponseData(sysConfigService.detail(sysConfigParam));
public ResponseData<SysConfig> detail(@Validated(SysConfigParam.detail.class) SysConfigParam sysConfigParam) {
return new SuccessResponseData<>(sysConfigService.detail(sysConfigParam));
}
@ -107,8 +110,8 @@ public class SysConfigController {
* @date 2020/4/14 11:10
*/
@GetResource(name = "分页查询配置列表", path = "/sysConfig/page")
public ResponseData page(SysConfigParam sysConfigParam) {
return new SuccessResponseData(sysConfigService.findPage(sysConfigParam));
public ResponseData<PageResult<SysConfig>> page(SysConfigParam sysConfigParam) {
return new SuccessResponseData<>(sysConfigService.findPage(sysConfigParam));
}
/**
@ -118,8 +121,8 @@ public class SysConfigController {
* @date 2020/4/14 11:10
*/
@GetResource(name = "系统参数配置列表", path = "/sysConfig/list")
public ResponseData list(SysConfigParam sysConfigParam) {
return new SuccessResponseData(sysConfigService.findList(sysConfigParam));
public ResponseData<List<SysConfig>> list(SysConfigParam sysConfigParam) {
return new SuccessResponseData<>(sysConfigService.findList(sysConfigParam));
}
/**
@ -129,8 +132,8 @@ public class SysConfigController {
* @date 2021/7/8 17:20
*/
@GetResource(name = "获取系统配置是否初始化的标志", path = "/sysConfig/getInitConfigFlag", requiredPermission = false)
public ResponseData getInitConfigFlag() {
return new SuccessResponseData(sysConfigService.getInitConfigFlag());
public ResponseData<Boolean> getInitConfigFlag() {
return new SuccessResponseData<>(sysConfigService.getInitConfigFlag());
}
/**
@ -140,9 +143,9 @@ public class SysConfigController {
* @date 2021/7/8 16:36
*/
@PostResource(name = "初始化系统配置参数,用在系统第一次登录时", path = "/sysConfig/initConfig", requiredPermission = false)
public ResponseData initConfig(@RequestBody ConfigInitRequest configInitRequest) {
public ResponseData<?> initConfig(@RequestBody ConfigInitRequest configInitRequest) {
sysConfigService.initConfig(configInitRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -152,8 +155,8 @@ public class SysConfigController {
* @date 2021/7/8 16:36
*/
@GetResource(name = "获取需要初始化的配置列表", path = "/sysConfig/getInitConfigList")
public ResponseData getInitConfigList() {
return new SuccessResponseData(sysConfigService.getInitConfigs());
public ResponseData<List<ConfigInitItem>> getInitConfigList() {
return new SuccessResponseData<>(sysConfigService.getInitConfigs());
}
}

View File

@ -62,9 +62,9 @@ public class DatabaseInfoController {
* @date 2020/11/1 22:16
*/
@PostResource(name = "新增数据源", path = "/databaseInfo/add")
public ResponseData add(@RequestBody @Validated(BaseRequest.add.class) DatabaseInfoRequest databaseInfoRequest) {
public ResponseData<?> add(@RequestBody @Validated(BaseRequest.add.class) DatabaseInfoRequest databaseInfoRequest) {
databaseInfoService.add(databaseInfoRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -74,9 +74,9 @@ public class DatabaseInfoController {
* @date 2020/11/1 22:18
*/
@PostResource(name = "删除数据源", path = "/databaseInfo/delete")
public ResponseData del(@RequestBody @Validated(DatabaseInfoRequest.delete.class) DatabaseInfoRequest databaseInfoRequest) {
public ResponseData<?> del(@RequestBody @Validated(DatabaseInfoRequest.delete.class) DatabaseInfoRequest databaseInfoRequest) {
databaseInfoService.del(databaseInfoRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -86,9 +86,9 @@ public class DatabaseInfoController {
* @date 2020/11/1 22:16
*/
@PostResource(name = "编辑数据源", path = "/databaseInfo/edit")
public ResponseData edit(@RequestBody @Validated(DatabaseInfoRequest.edit.class) DatabaseInfoRequest databaseInfoRequest) {
public ResponseData<?> edit(@RequestBody @Validated(DatabaseInfoRequest.edit.class) DatabaseInfoRequest databaseInfoRequest) {
databaseInfoService.edit(databaseInfoRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -98,9 +98,9 @@ public class DatabaseInfoController {
* @date 2020/11/1 22:18
*/
@GetResource(name = "查询数据源列表(带分页)", path = "/databaseInfo/page")
public ResponseData findPage(DatabaseInfoRequest databaseInfoRequest) {
public ResponseData<PageResult<DatabaseInfo>> findPage(DatabaseInfoRequest databaseInfoRequest) {
PageResult<DatabaseInfo> pageResult = databaseInfoService.findPage(databaseInfoRequest);
return new SuccessResponseData(pageResult);
return new SuccessResponseData<>(pageResult);
}
/**
@ -110,9 +110,9 @@ public class DatabaseInfoController {
* @date 2020/11/1 22:18
*/
@GetResource(name = "查询所有数据源列表", path = "/databaseInfo/list")
public ResponseData findList(DatabaseInfoRequest databaseInfoRequest) {
public ResponseData<List<DatabaseInfo>> findList(DatabaseInfoRequest databaseInfoRequest) {
List<DatabaseInfo> databaseInfos = databaseInfoService.findList(databaseInfoRequest);
return new SuccessResponseData(databaseInfos);
return new SuccessResponseData<>(databaseInfos);
}
/**
@ -122,9 +122,9 @@ public class DatabaseInfoController {
* @date 2021/1/23 20:29
*/
@GetResource(name = "查询数据源详情", path = "/databaseInfo/detail")
public ResponseData detail(@Validated(BaseRequest.detail.class) DatabaseInfoRequest databaseInfoRequest) {
public ResponseData<DatabaseInfo> detail(@Validated(BaseRequest.detail.class) DatabaseInfoRequest databaseInfoRequest) {
DatabaseInfo databaseInfo = databaseInfoService.detail(databaseInfoRequest);
return new SuccessResponseData(databaseInfo);
return new SuccessResponseData<>(databaseInfo);
}
}

View File

@ -24,9 +24,12 @@
*/
package cn.stylefeng.roses.kernel.file.modular.controller;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.file.api.constants.FileConstants;
import cn.stylefeng.roses.kernel.file.api.pojo.request.SysFileInfoRequest;
import cn.stylefeng.roses.kernel.file.api.pojo.response.SysFileInfoListResponse;
import cn.stylefeng.roses.kernel.file.api.pojo.response.SysFileInfoResponse;
import cn.stylefeng.roses.kernel.file.modular.entity.SysFileInfo;
import cn.stylefeng.roses.kernel.file.modular.service.SysFileInfoService;
import cn.stylefeng.roses.kernel.rule.enums.YesOrNotEnum;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
@ -81,9 +84,9 @@ public class SysFileInfoController {
* @date 2020/12/27 13:17
*/
@PostResource(name = "上传文件", path = "/sysFileInfo/upload", requiredPermission = false)
public ResponseData upload(@RequestPart("file") MultipartFile file, @Validated(SysFileInfoRequest.add.class) SysFileInfoRequest sysFileInfoRequest) {
public ResponseData<SysFileInfoResponse> upload(@RequestPart("file") MultipartFile file, @Validated(SysFileInfoRequest.add.class) SysFileInfoRequest sysFileInfoRequest) {
SysFileInfoResponse fileUploadInfoResult = this.sysFileInfoService.uploadFile(file, sysFileInfoRequest);
return new SuccessResponseData(fileUploadInfoResult);
return new SuccessResponseData<>(fileUploadInfoResult);
}
/**
@ -177,9 +180,9 @@ public class SysFileInfoController {
* @date 2020/12/16 15:34
*/
@PostResource(name = "替换文件", path = "/sysFileInfo/update", requiredPermission = false)
public ResponseData update(@RequestPart("file") MultipartFile file, @Validated(SysFileInfoRequest.edit.class) SysFileInfoRequest sysFileInfoRequest) {
public ResponseData<SysFileInfoResponse> update(@RequestPart("file") MultipartFile file, @Validated(SysFileInfoRequest.edit.class) SysFileInfoRequest sysFileInfoRequest) {
SysFileInfoResponse fileUploadInfoResult = this.sysFileInfoService.updateFile(file, sysFileInfoRequest);
return new SuccessResponseData(fileUploadInfoResult);
return new SuccessResponseData<>(fileUploadInfoResult);
}
/**
@ -189,9 +192,9 @@ public class SysFileInfoController {
* @date 2020/12/16 15:34
*/
@PostResource(name = "替换文件", path = "/sysFileInfo/versionBack", requiredPermission = false)
public ResponseData versionBack(@Validated(SysFileInfoRequest.versionBack.class) SysFileInfoRequest sysFileInfoRequest) {
public ResponseData<SysFileInfoResponse> versionBack(@Validated(SysFileInfoRequest.versionBack.class) SysFileInfoRequest sysFileInfoRequest) {
SysFileInfoResponse fileUploadInfoResult = this.sysFileInfoService.versionBack(sysFileInfoRequest);
return new SuccessResponseData(fileUploadInfoResult);
return new SuccessResponseData<>(fileUploadInfoResult);
}
/**
@ -203,9 +206,9 @@ public class SysFileInfoController {
* @date 2020/12/27 13:17
*/
@GetResource(name = "根据附件IDS查询附件信息", path = "/sysFileInfo/getFileInfoListByFileIds", requiredPermission = false)
public ResponseData getFileInfoListByFileIds(@RequestParam(value = "fileIds") String fileIds) {
public ResponseData<List<SysFileInfoResponse>> getFileInfoListByFileIds(@RequestParam(value = "fileIds") String fileIds) {
List<SysFileInfoResponse> list = this.sysFileInfoService.getFileInfoListByFileIds(fileIds);
return new SuccessResponseData(list);
return new SuccessResponseData<>(list);
}
/**
@ -239,9 +242,9 @@ public class SysFileInfoController {
* @date 2020/11/29 11:19
*/
@PostResource(name = "删除文件信息(真删除文件信息)", path = "/sysFileInfo/deleteReally", requiredPermission = false)
public ResponseData deleteReally(@RequestBody @Validated(SysFileInfoRequest.delete.class) SysFileInfoRequest sysFileInfoRequest) {
public ResponseData<?> deleteReally(@RequestBody @Validated(SysFileInfoRequest.delete.class) SysFileInfoRequest sysFileInfoRequest) {
this.sysFileInfoService.deleteReally(sysFileInfoRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -251,8 +254,8 @@ public class SysFileInfoController {
* @date 2020/11/29 11:29
*/
@GetResource(name = "分页查询文件信息表", path = "/sysFileInfo/fileInfoListPage", requiredPermission = false)
public ResponseData fileInfoListPage(SysFileInfoRequest sysFileInfoRequest) {
return new SuccessResponseData(this.sysFileInfoService.fileInfoListPage(sysFileInfoRequest));
public ResponseData<PageResult<SysFileInfoListResponse>> fileInfoListPage(SysFileInfoRequest sysFileInfoRequest) {
return new SuccessResponseData<>(this.sysFileInfoService.fileInfoListPage(sysFileInfoRequest));
}
/**
@ -262,8 +265,8 @@ public class SysFileInfoController {
* @date 2020/11/29 11:29
*/
@GetResource(name = "查看详情文件信息表", path = "/sysFileInfo/detail", requiredPermission = false)
public ResponseData detail(@Validated(SysFileInfoRequest.detail.class) SysFileInfoRequest sysFileInfoRequest) {
return new SuccessResponseData(sysFileInfoService.detail(sysFileInfoRequest));
public ResponseData<SysFileInfo> detail(@Validated(SysFileInfoRequest.detail.class) SysFileInfoRequest sysFileInfoRequest) {
return new SuccessResponseData<>(sysFileInfoService.detail(sysFileInfoRequest));
}
}

View File

@ -60,9 +60,9 @@ public class TranslationController {
* @date 2021/1/24 19:17
*/
@PostResource(name = "新增多语言配置", path = "/i18n/add")
public ResponseData add(@RequestBody @Validated(TranslationRequest.add.class) TranslationRequest translationRequest) {
public ResponseData<?> add(@RequestBody @Validated(TranslationRequest.add.class) TranslationRequest translationRequest) {
this.translationService.add(translationRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -72,9 +72,9 @@ public class TranslationController {
* @date 2021/1/24 19:17
*/
@PostResource(name = "新增多语言配置", path = "/i18n/edit")
public ResponseData edit(@RequestBody @Validated(BaseRequest.edit.class) TranslationRequest translationRequest) {
public ResponseData<?> edit(@RequestBody @Validated(BaseRequest.edit.class) TranslationRequest translationRequest) {
this.translationService.edit(translationRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -84,9 +84,9 @@ public class TranslationController {
* @date 2021/1/24 19:20
*/
@PostResource(name = "新增多语言配置", path = "/i18n/delete")
public ResponseData delete(@RequestBody @Validated(BaseRequest.delete.class) TranslationRequest translationRequest) {
public ResponseData<?> delete(@RequestBody @Validated(BaseRequest.delete.class) TranslationRequest translationRequest) {
this.translationService.del(translationRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -96,9 +96,9 @@ public class TranslationController {
* @date 2021/1/24 19:20
*/
@PostResource(name = "删除某个语种", path = "/i18n/deleteTranLanguage")
public ResponseData deleteTranLanguage(@RequestBody @Validated(TranslationRequest.deleteTranLanguage.class) TranslationRequest translationRequest) {
public ResponseData<?> deleteTranLanguage(@RequestBody @Validated(TranslationRequest.deleteTranLanguage.class) TranslationRequest translationRequest) {
this.translationService.deleteTranLanguage(translationRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -108,9 +108,9 @@ public class TranslationController {
* @date 2021/1/24 19:20
*/
@GetResource(name = "新增多语言配置", path = "/i18n/detail")
public ResponseData detail(@Validated(BaseRequest.detail.class) TranslationRequest translationRequest) {
public ResponseData<Translation> detail(@Validated(BaseRequest.detail.class) TranslationRequest translationRequest) {
Translation detail = this.translationService.detail(translationRequest);
return new SuccessResponseData(detail);
return new SuccessResponseData<>(detail);
}
/**
@ -120,9 +120,9 @@ public class TranslationController {
* @date 2021/1/24 19:20
*/
@GetResource(name = "新增多语言配置", path = "/i18n/page")
public ResponseData page(TranslationRequest translationRequest) {
public ResponseData<PageResult<Translation>> page(TranslationRequest translationRequest) {
PageResult<Translation> page = this.translationService.findPage(translationRequest);
return new SuccessResponseData(page);
return new SuccessResponseData<>(page);
}
}

View File

@ -68,9 +68,9 @@ public class UserTranslationController {
* @date 2021/1/24 19:20
*/
@GetResource(name = "获取所有的多语言类型编码", path = "/i18n/getAllLanguages", requiredPermission = false)
public ResponseData getAllLanguages() {
public ResponseData<List<SimpleDict>> getAllLanguages() {
List<SimpleDict> dictDetailsByDictTypeCode = dictApi.getDictDetailsByDictTypeCode(DictConstants.LANGUAGES_DICT_TYPE_CODE);
return new SuccessResponseData(dictDetailsByDictTypeCode);
return new SuccessResponseData<>(dictDetailsByDictTypeCode);
}
/**
@ -80,10 +80,10 @@ public class UserTranslationController {
* @date 2021/1/27 22:00
*/
@GetResource(name = "获取当前用户的多语言字典", path = "/i18n/getUserTranslation", requiredPermission = false)
public ResponseData getUserTranslation() {
public ResponseData<Map<String, String>> getUserTranslation() {
String tranLanguageCode = LoginContext.me().getLoginUser().getTranLanguageCode();
Map<String, String> translationDictByLanguage = TranslationContext.me().getTranslationDictByLanguage(tranLanguageCode);
return new SuccessResponseData(translationDictByLanguage);
return new SuccessResponseData<>(translationDictByLanguage);
}
/**
@ -93,7 +93,7 @@ public class UserTranslationController {
* @date 2021/1/27 22:04
*/
@PostResource(name = "修改当前用户的多语言配置", path = "/i18n/changeUserTranslation", requiredPermission = false)
public ResponseData changeUserTranslation(@RequestBody @Validated(TranslationRequest.changeUserLanguage.class) TranslationRequest translationRequest) {
public ResponseData<?> changeUserTranslation(@RequestBody @Validated(TranslationRequest.changeUserLanguage.class) TranslationRequest translationRequest) {
String token = LoginContext.me().getToken();
LoginUser loginUser = LoginContext.me().getLoginUser();
@ -102,7 +102,7 @@ public class UserTranslationController {
loginUser.setTranLanguageCode(translationRequest.getTranLanguageCode());
sessionManagerApi.updateSession(token, loginUser);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
}

View File

@ -24,11 +24,14 @@
*/
package cn.stylefeng.roses.kernel.system.modular.loginlog.controller;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.log.api.pojo.loginlog.SysLoginLogDto;
import cn.stylefeng.roses.kernel.log.api.pojo.loginlog.SysLoginLogRequest;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import cn.stylefeng.roses.kernel.system.modular.loginlog.entity.SysLoginLog;
import cn.stylefeng.roses.kernel.system.modular.loginlog.service.SysLoginLogService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;
@ -55,9 +58,9 @@ public class SysLoginLogController {
* @date 2021/1/13 17:51
*/
@GetResource(name = "清空登录日志", path = "/loginLog/deleteAll")
public ResponseData deleteAll() {
public ResponseData<?> deleteAll() {
sysLoginLogService.delAll();
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -67,8 +70,8 @@ public class SysLoginLogController {
* @date 2021/1/13 17:51
*/
@GetResource(name = "查看详情登录日志", path = "/loginLog/detail")
public ResponseData detail(@Validated(SysLoginLogRequest.detail.class) SysLoginLogRequest sysLoginLogRequest) {
return new SuccessResponseData(sysLoginLogService.detail(sysLoginLogRequest));
public ResponseData<SysLoginLog> detail(@Validated(SysLoginLogRequest.detail.class) SysLoginLogRequest sysLoginLogRequest) {
return new SuccessResponseData<>(sysLoginLogService.detail(sysLoginLogRequest));
}
/**
@ -78,8 +81,8 @@ public class SysLoginLogController {
* @date 2021/1/13 17:51
*/
@GetResource(name = "分页查询登录日志", path = "/loginLog/page")
public ResponseData page(SysLoginLogRequest sysLoginLogRequest) {
return new SuccessResponseData(sysLoginLogService.findPage(sysLoginLogRequest));
public ResponseData<PageResult<SysLoginLogDto>> page(SysLoginLogRequest sysLoginLogRequest) {
return new SuccessResponseData<>(sysLoginLogService.findPage(sysLoginLogRequest));
}
}

View File

@ -24,6 +24,7 @@
*/
package cn.stylefeng.roses.kernel.mongodb.integration.controller;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.mongodb.api.MongoFileApi;
import cn.stylefeng.roses.kernel.mongodb.file.entity.MongoFileEntity;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
@ -64,8 +65,8 @@ public class MongoFileController {
* @date 2021/03/31 17:28
*/
@PostResource(name = "Mongodb文件新增", path = "/view/mongodb/file/add")
public ResponseData mongodbFileAdd(@RequestPart("file") MultipartFile file) {
return new SuccessResponseData(mongoFileApi.saveFile(file));
public ResponseData<?> mongodbFileAdd(@RequestPart("file") MultipartFile file) {
return new SuccessResponseData<>(mongoFileApi.saveFile(file));
}
/**
@ -75,9 +76,9 @@ public class MongoFileController {
* @date 2021/03/31 17:28
*/
@PostResource(name = "Mongodb文件删除", path = "/view/mongodb/file/del")
public ResponseData mongodbFileDel(@RequestParam String id) {
public ResponseData<?> mongodbFileDel(@RequestParam String id) {
mongoFileApi.removeFile(id);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -87,8 +88,8 @@ public class MongoFileController {
* @date 2021/03/31 17:28
*/
@GetResource(name = "Mongodb文件列表", path = "/view/mongodb/file/list")
public ResponseData mongodbFileList(MongoFileEntity mongoFileEntity) {
return new SuccessResponseData(mongoFileApi.getFilesByPage(mongoFileEntity));
public ResponseData<PageResult<?>> mongodbFileList(MongoFileEntity mongoFileEntity) {
return new SuccessResponseData<>(mongoFileApi.getFilesByPage(mongoFileEntity));
}
/**
@ -98,7 +99,7 @@ public class MongoFileController {
* @date 2021/03/31 17:28
*/
@GetResource(name = "Mongodb文件下载", path = "/view/mongodb/file/down")
public ResponseEntity mongodbFileDown(@RequestParam String id) throws UnsupportedEncodingException {
public ResponseEntity<?> mongodbFileDown(@RequestParam String id) throws UnsupportedEncodingException {
Optional<MongoFileEntity> file = mongoFileApi.getFileById(id);
if (file.isPresent()) {
return ResponseEntity.ok()

View File

@ -27,11 +27,13 @@ package cn.stylefeng.roses.kernel.sms.modular.controller;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.RandomUtil;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
import cn.stylefeng.roses.kernel.sms.modular.entity.SysSms;
import cn.stylefeng.roses.kernel.sms.modular.param.SysSmsInfoParam;
import cn.stylefeng.roses.kernel.sms.modular.param.SysSmsSendParam;
import cn.stylefeng.roses.kernel.sms.modular.param.SysSmsVerifyParam;
@ -63,8 +65,8 @@ public class SmsSenderController {
* @date 2020/10/26 18:34
*/
@GetResource(name = "发送记录查询", path = "/sms/page")
public ResponseData page(SysSmsInfoParam sysSmsInfoParam) {
return new SuccessResponseData(sysSmsInfoService.page(sysSmsInfoParam));
public ResponseData<PageResult<SysSms>> page(SysSmsInfoParam sysSmsInfoParam) {
return new SuccessResponseData<>(sysSmsInfoService.page(sysSmsInfoParam));
}
/**
@ -74,7 +76,7 @@ public class SmsSenderController {
* @date 2020/10/26 18:34
*/
@PostResource(name = "发送验证码短信", path = "/sms/sendLoginMessage", requiredLogin = false, requiredPermission = false)
public ResponseData sendMessage(@RequestBody @Validated SysSmsSendParam sysSmsSendParam) {
public ResponseData<Boolean> sendMessage(@RequestBody @Validated SysSmsSendParam sysSmsSendParam) {
// 清空params参数
sysSmsSendParam.setParams(null);
@ -84,7 +86,7 @@ public class SmsSenderController {
paramMap.put("code", RandomUtil.randomNumbers(6));
sysSmsSendParam.setParams(paramMap);
return new SuccessResponseData(sysSmsInfoService.sendShortMessage(sysSmsSendParam));
return new SuccessResponseData<>(sysSmsInfoService.sendShortMessage(sysSmsSendParam));
}
/**
@ -94,9 +96,9 @@ public class SmsSenderController {
* @date 2020/10/26 18:35
*/
@PostResource(name = "验证短信验证码", path = "/sms/validateMessage", requiredLogin = false, requiredPermission = false)
public ResponseData validateMessage(@RequestBody @Validated SysSmsVerifyParam sysSmsVerifyParam) {
public ResponseData<?> validateMessage(@RequestBody @Validated SysSmsVerifyParam sysSmsVerifyParam) {
sysSmsInfoService.validateSmsInfo(sysSmsVerifyParam);
return new SuccessResponseData("短信验证成功");
return new SuccessResponseData<>("短信验证成功");
}
}

View File

@ -24,11 +24,13 @@
*/
package cn.stylefeng.roses.kernel.timer.modular.controller;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
import cn.stylefeng.roses.kernel.timer.modular.entity.SysTimers;
import cn.stylefeng.roses.kernel.timer.modular.param.SysTimersParam;
import cn.stylefeng.roses.kernel.timer.modular.service.SysTimersService;
import cn.stylefeng.roses.kernel.timer.modular.wrapper.TimerWrapper;
@ -60,9 +62,9 @@ public class SysTimersController {
* @date 2020/6/30 18:26
*/
@PostResource(name = "添加定时任务", path = "/sysTimers/add")
public ResponseData add(@RequestBody @Validated(SysTimersParam.add.class) SysTimersParam sysTimersParam) {
public ResponseData<?> add(@RequestBody @Validated(SysTimersParam.add.class) SysTimersParam sysTimersParam) {
sysTimersService.add(sysTimersParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -72,9 +74,9 @@ public class SysTimersController {
* @date 2020/6/30 18:26
*/
@PostResource(name = "删除定时任务", path = "/sysTimers/delete")
public ResponseData del(@RequestBody @Validated(SysTimersParam.delete.class) SysTimersParam sysTimersParam) {
public ResponseData<?> del(@RequestBody @Validated(SysTimersParam.delete.class) SysTimersParam sysTimersParam) {
sysTimersService.del(sysTimersParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -84,9 +86,9 @@ public class SysTimersController {
* @date 2020/6/30 18:26
*/
@PostResource(name = "编辑定时任务", path = "/sysTimers/edit")
public ResponseData edit(@RequestBody @Validated(SysTimersParam.edit.class) SysTimersParam sysTimersParam) {
public ResponseData<?> edit(@RequestBody @Validated(SysTimersParam.edit.class) SysTimersParam sysTimersParam) {
sysTimersService.edit(sysTimersParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -96,9 +98,9 @@ public class SysTimersController {
* @date 2020/7/1 14:34
*/
@PostResource(name = "启动定时任务", path = "/sysTimers/start")
public ResponseData start(@RequestBody @Validated(SysTimersParam.startTimer.class) SysTimersParam sysTimersParam) {
public ResponseData<?> start(@RequestBody @Validated(SysTimersParam.startTimer.class) SysTimersParam sysTimersParam) {
sysTimersService.start(sysTimersParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -108,9 +110,9 @@ public class SysTimersController {
* @date 2020/7/1 14:34
*/
@PostResource(name = "停止定时任务", path = "/sysTimers/stop")
public ResponseData stop(@RequestBody @Validated(SysTimersParam.stopTimer.class) SysTimersParam sysTimersParam) {
public ResponseData<?> stop(@RequestBody @Validated(SysTimersParam.stopTimer.class) SysTimersParam sysTimersParam) {
sysTimersService.stop(sysTimersParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -120,8 +122,8 @@ public class SysTimersController {
* @date 2020/6/30 18:26
*/
@GetResource(name = "查看详情定时任务", path = "/sysTimers/detail")
public ResponseData detail(@Validated(SysTimersParam.detail.class) SysTimersParam sysTimersParam) {
return new SuccessResponseData(sysTimersService.detail(sysTimersParam));
public ResponseData<SysTimers> detail(@Validated(SysTimersParam.detail.class) SysTimersParam sysTimersParam) {
return new SuccessResponseData<>(sysTimersService.detail(sysTimersParam));
}
/**
@ -132,8 +134,8 @@ public class SysTimersController {
*/
@GetResource(name = "分页查询定时任务", path = "/sysTimers/page")
@Wrapper(TimerWrapper.class)
public ResponseData page(SysTimersParam sysTimersParam) {
return new SuccessResponseData(sysTimersService.findPage(sysTimersParam));
public ResponseData<PageResult<SysTimers>> page(SysTimersParam sysTimersParam) {
return new SuccessResponseData<>(sysTimersService.findPage(sysTimersParam));
}
/**
@ -143,8 +145,8 @@ public class SysTimersController {
* @date 2020/6/30 18:26
*/
@GetResource(name = "获取全部定时任务", path = "/sysTimers/list")
public ResponseData list(SysTimersParam sysTimersParam) {
return new SuccessResponseData(sysTimersService.findList(sysTimersParam));
public ResponseData<List<SysTimers>> list(SysTimersParam sysTimersParam) {
return new SuccessResponseData<>(sysTimersService.findList(sysTimersParam));
}
/**
@ -154,9 +156,9 @@ public class SysTimersController {
* @date 2020/7/1 14:34
*/
@PostResource(name = "获取系统的所有任务列表", path = "/sysTimers/getActionClasses")
public ResponseData getActionClasses() {
public ResponseData<List<String>> getActionClasses() {
List<String> actionClasses = sysTimersService.getActionClasses();
return new SuccessResponseData(actionClasses);
return new SuccessResponseData<>(actionClasses);
}
}

View File

@ -54,9 +54,9 @@ public class MonitorStatusController {
* @date 2020/6/29 16:49
*/
@GetResource(name = "获取系统信息", path = "/getSystemInfo")
public ResponseData getSystemInfo() {
public ResponseData<SystemHardwareCalculator> getSystemInfo() {
SystemHardwareCalculator systemHardwareInfo = systemHardwareInfoHolder.getSystemHardwareInfo();
return new SuccessResponseData(systemHardwareInfo);
return new SuccessResponseData<>(systemHardwareInfo);
}
}

View File

@ -35,9 +35,9 @@ public class CustomerController {
* @date 2021/06/07 11:40
*/
@PostResource(name = "注册", path = "/customer/reg", requiredPermission = false, requiredLogin = false)
public ResponseData reg(@RequestBody @Validated(CustomerRequest.reg.class) CustomerRequest customerRequest) {
public ResponseData<?> reg(@RequestBody @Validated(CustomerRequest.reg.class) CustomerRequest customerRequest) {
customerService.reg(customerRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -47,9 +47,9 @@ public class CustomerController {
* @date 2021/6/7 16:03
*/
@GetResource(name = "激活用户", path = "/customer/active", requiredPermission = false, requiredLogin = false)
public ResponseData active(@Validated(CustomerRequest.active.class) CustomerRequest customerRequest) {
public ResponseData<?> active(@Validated(CustomerRequest.active.class) CustomerRequest customerRequest) {
customerService.active(customerRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -59,9 +59,9 @@ public class CustomerController {
* @date 2021/06/07 11:40
*/
@PostResource(name = "登录", path = "/customer/login", requiredPermission = false, requiredLogin = false)
public ResponseData login(@RequestBody @Validated LoginRequest loginRequest) {
public ResponseData<LoginResponse> login(@RequestBody @Validated LoginRequest loginRequest) {
LoginResponse loginResponse = customerService.login(loginRequest);
return new SuccessResponseData(loginResponse);
return new SuccessResponseData<>(loginResponse);
}
/**
@ -71,9 +71,9 @@ public class CustomerController {
* @date 2021/06/07 11:40
*/
@PostResource(name = "找回密码-发送邮件", path = "/customer/sendResetPwdEmail", requiredPermission = false, requiredLogin = false)
public ResponseData sendResetPwdEmail(@RequestBody @Validated(CustomerRequest.sendResetPwdEmail.class) CustomerRequest customerRequest) {
public ResponseData<?> sendResetPwdEmail(@RequestBody @Validated(CustomerRequest.sendResetPwdEmail.class) CustomerRequest customerRequest) {
customerService.sendResetPwdEmail(customerRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -83,9 +83,9 @@ public class CustomerController {
* @date 2021/06/07 11:40
*/
@PostResource(name = "重置密码", path = "/customer/resetPassword", requiredPermission = false, requiredLogin = false)
public ResponseData resetPassword(@RequestBody @Validated(CustomerRequest.resetPassword.class) CustomerRequest customerRequest) {
public ResponseData<?> resetPassword(@RequestBody @Validated(CustomerRequest.resetPassword.class) CustomerRequest customerRequest) {
customerService.resetPassword(customerRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
}

View File

@ -35,9 +35,9 @@ public class CustomerInfoController {
* @date 2021/6/18 16:29
*/
@GetResource(name = "获取个人信息", path = "/customerInfo/getPersonInfo", requiredPermission = false)
public ResponseData getPersonInfo(@Validated(CustomerInfoRequest.detail.class) CustomerRequest customerRequest) {
public ResponseData<CustomerInfo> getPersonInfo(@Validated(CustomerInfoRequest.detail.class) CustomerRequest customerRequest) {
CustomerInfo customerInfo = customerService.getCustomerInfoById(customerRequest.getCustomerId());
return new SuccessResponseData(customerInfo);
return new SuccessResponseData<>(customerInfo);
}
/**
@ -47,9 +47,9 @@ public class CustomerInfoController {
* @date 2021/6/18 16:29
*/
@PostResource(name = "修改个人密码", path = "/customerInfo/updatePassword", requiredPermission = false)
public ResponseData updatePassword(@RequestBody @Validated(CustomerInfoRequest.changePassword.class) CustomerInfoRequest customerInfoRequest) {
public ResponseData<?> updatePassword(@RequestBody @Validated(CustomerInfoRequest.changePassword.class) CustomerInfoRequest customerInfoRequest) {
this.customerService.updatePassword(customerInfoRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -59,9 +59,9 @@ public class CustomerInfoController {
* @date 2021/6/18 16:29
*/
@PostResource(name = "修改个人头像", path = "/customerInfo/updateAvatar", requiredPermission = false)
public ResponseData updateAvatar(@RequestBody @Validated(CustomerInfoRequest.changeAvatar.class) CustomerInfoRequest customerInfoRequest) {
public ResponseData<?> updateAvatar(@RequestBody @Validated(CustomerInfoRequest.changeAvatar.class) CustomerInfoRequest customerInfoRequest) {
this.customerService.updateAvatar(customerInfoRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -71,9 +71,9 @@ public class CustomerInfoController {
* @date 2021/7/20 10:44
*/
@PostResource(name = "重置个人秘钥", path = "/customerInfo/resetPersonalSecret", requiredPermission = false)
public ResponseData resetPersonalSecret() {
public ResponseData<String> resetPersonalSecret() {
String secret = customerService.updateSecret();
return new SuccessResponseData(secret);
return new SuccessResponseData<>(secret);
}
}

View File

@ -1,7 +1,9 @@
package cn.stylefeng.roses.kernel.customer.modular.controller;
import cn.stylefeng.roses.kernel.customer.modular.entity.Customer;
import cn.stylefeng.roses.kernel.customer.modular.request.CustomerRequest;
import cn.stylefeng.roses.kernel.customer.modular.service.CustomerService;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
@ -12,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* C
@ -33,9 +36,9 @@ public class CustomerManageController {
* @date 2021/06/07 11:40
*/
@PostResource(name = "添加", path = "/customer/add")
public ResponseData add(@RequestBody @Validated(CustomerRequest.add.class) CustomerRequest customerRequest) {
public ResponseData<?> add(@RequestBody @Validated(CustomerRequest.add.class) CustomerRequest customerRequest) {
customerService.add(customerRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -45,9 +48,9 @@ public class CustomerManageController {
* @date 2021/06/07 11:40
*/
@PostResource(name = "删除", path = "/customer/delete")
public ResponseData delete(@RequestBody @Validated(CustomerRequest.delete.class) CustomerRequest customerRequest) {
public ResponseData<?> delete(@RequestBody @Validated(CustomerRequest.delete.class) CustomerRequest customerRequest) {
customerService.del(customerRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -57,9 +60,9 @@ public class CustomerManageController {
* @date 2021/06/07 11:40
*/
@PostResource(name = "编辑", path = "/customer/edit")
public ResponseData edit(@RequestBody @Validated(CustomerRequest.edit.class) CustomerRequest customerRequest) {
public ResponseData<?> edit(@RequestBody @Validated(CustomerRequest.edit.class) CustomerRequest customerRequest) {
customerService.edit(customerRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -69,8 +72,8 @@ public class CustomerManageController {
* @date 2021/06/07 11:40
*/
@GetResource(name = "查看详情", path = "/customer/detail")
public ResponseData detail(@Validated(CustomerRequest.detail.class) CustomerRequest customerRequest) {
return new SuccessResponseData(customerService.detail(customerRequest));
public ResponseData<Customer> detail(@Validated(CustomerRequest.detail.class) CustomerRequest customerRequest) {
return new SuccessResponseData<>(customerService.detail(customerRequest));
}
/**
@ -80,8 +83,8 @@ public class CustomerManageController {
* @date 2021/06/07 11:40
*/
@GetResource(name = "获取列表", path = "/customer/list")
public ResponseData list(CustomerRequest customerRequest) {
return new SuccessResponseData(customerService.findList(customerRequest));
public ResponseData<List<Customer>> list(CustomerRequest customerRequest) {
return new SuccessResponseData<>(customerService.findList(customerRequest));
}
/**
@ -91,8 +94,8 @@ public class CustomerManageController {
* @date 2021/06/07 11:40
*/
@GetResource(name = "分页查询", path = "/customer/page")
public ResponseData page(CustomerRequest customerRequest) {
return new SuccessResponseData(customerService.findPage(customerRequest));
public ResponseData<PageResult<Customer>> page(CustomerRequest customerRequest) {
return new SuccessResponseData<>(customerService.findPage(customerRequest));
}
}

View File

@ -63,9 +63,9 @@ public class DictController {
* @date 2020/10/29 16:35
*/
@PostResource(name = "添加字典", path = "/dict/add", requiredPermission = false)
public ResponseData add(@RequestBody @Validated(DictRequest.add.class) DictRequest dictRequest) {
public ResponseData<?> add(@RequestBody @Validated(DictRequest.add.class) DictRequest dictRequest) {
this.dictService.add(dictRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -75,9 +75,9 @@ public class DictController {
* @date 2020/10/29 16:35
*/
@PostResource(name = "删除字典", path = "/dict/delete", requiredPermission = false)
public ResponseData delete(@RequestBody @Validated(DictRequest.delete.class) DictRequest dictRequest) {
public ResponseData<?> delete(@RequestBody @Validated(DictRequest.delete.class) DictRequest dictRequest) {
this.dictService.del(dictRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -87,9 +87,9 @@ public class DictController {
* @date 2020/10/29 16:35
*/
@PostResource(name = "修改字典", path = "/dict/edit", requiredPermission = false)
public ResponseData edit(@RequestBody @Validated(DictRequest.edit.class) DictRequest dictRequest) {
public ResponseData<?> edit(@RequestBody @Validated(DictRequest.edit.class) DictRequest dictRequest) {
this.dictService.edit(dictRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -99,9 +99,9 @@ public class DictController {
* @date 2020/10/29 16:35
*/
@GetResource(name = "获取字典详情", path = "/dict/detail", requiredPermission = false)
public ResponseData detail(@Validated(BaseRequest.detail.class) DictRequest dictRequest) {
public ResponseData<SysDict> detail(@Validated(BaseRequest.detail.class) DictRequest dictRequest) {
SysDict detail = this.dictService.detail(dictRequest);
return new SuccessResponseData(detail);
return new SuccessResponseData<>(detail);
}
/**
@ -111,8 +111,8 @@ public class DictController {
* @date 2020/10/29 16:35
*/
@GetResource(name = "获取字典列表", path = "/dict/list", requiredPermission = false)
public ResponseData list(DictRequest dictRequest) {
return new SuccessResponseData(this.dictService.findList(dictRequest));
public ResponseData<List<SysDict>> list(DictRequest dictRequest) {
return new SuccessResponseData<>(this.dictService.findList(dictRequest));
}
/**
@ -122,8 +122,8 @@ public class DictController {
* @date 2020/10/29 16:35
*/
@GetResource(name = "获取字典列表", path = "/dict/page", requiredPermission = false)
public ResponseData page(DictRequest dictRequest) {
return new SuccessResponseData(this.dictService.findPage(dictRequest));
public ResponseData<PageResult<SysDict>> page(DictRequest dictRequest) {
return new SuccessResponseData<>(this.dictService.findPage(dictRequest));
}
@ -134,9 +134,9 @@ public class DictController {
* @date 2020/10/29 16:36
*/
@GetResource(name = "获取树形字典列表", path = "/dict/getDictTreeList", requiredPermission = false)
public ResponseData getDictTreeList(@Validated(DictRequest.treeList.class) DictRequest dictRequest) {
public ResponseData<List<TreeDictInfo>> getDictTreeList(@Validated(DictRequest.treeList.class) DictRequest dictRequest) {
List<TreeDictInfo> treeDictList = this.dictService.getTreeDictList(dictRequest);
return new SuccessResponseData(treeDictList);
return new SuccessResponseData<>(treeDictList);
}
/**
@ -146,10 +146,10 @@ public class DictController {
* @date 2021/1/25 11:47
*/
@GetResource(name = "获取系统配置分组字典列表", path = "/dict/getConfigGroupPage", requiredPermission = false)
public ResponseData getConfigGroupPage(DictRequest dictRequest) {
public ResponseData<PageResult<SysDict>> getConfigGroupPage(DictRequest dictRequest) {
dictRequest.setDictTypeCode(DictConstants.CONFIG_GROUP_DICT_TYPE_CODE);
PageResult<SysDict> page = this.dictService.findPage(dictRequest);
return new SuccessResponseData(page);
return new SuccessResponseData<>(page);
}
/**
@ -159,10 +159,10 @@ public class DictController {
* @date 2021/1/25 11:47
*/
@GetResource(name = "获取多语言字典列表", path = "/dict/getLanguagesPage", requiredPermission = false)
public ResponseData getLanguagesPage(DictRequest dictRequest) {
public ResponseData<PageResult<SysDict>> getLanguagesPage(DictRequest dictRequest) {
dictRequest.setDictTypeCode(DictConstants.LANGUAGES_DICT_TYPE_CODE);
PageResult<SysDict> page = this.dictService.findPage(dictRequest);
return new SuccessResponseData(page);
return new SuccessResponseData<>(page);
}
}

View File

@ -24,6 +24,7 @@
*/
package cn.stylefeng.roses.kernel.dict.modular.controller;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.dict.api.constants.DictConstants;
import cn.stylefeng.roses.kernel.dict.modular.entity.SysDictType;
import cn.stylefeng.roses.kernel.dict.modular.pojo.request.DictTypeRequest;
@ -39,6 +40,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
*
@ -60,9 +62,9 @@ public class DictTypeController {
* @date 2018/7/25 12:36
*/
@PostResource(name = "添加字典类型", path = "/dictType/add", requiredPermission = false)
public ResponseData add(@RequestBody @Validated(DictTypeRequest.add.class) DictTypeRequest dictTypeRequest) {
public ResponseData<?> add(@RequestBody @Validated(DictTypeRequest.add.class) DictTypeRequest dictTypeRequest) {
this.dictTypeService.add(dictTypeRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -72,9 +74,9 @@ public class DictTypeController {
* @date 2018/7/25 12:36
*/
@PostResource(name = "删除字典类型", path = "/dictType/delete", requiredPermission = false)
public ResponseData delete(@RequestBody @Validated(DictTypeRequest.delete.class) DictTypeRequest dictTypeRequest) {
public ResponseData<?> delete(@RequestBody @Validated(DictTypeRequest.delete.class) DictTypeRequest dictTypeRequest) {
this.dictTypeService.del(dictTypeRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -84,9 +86,9 @@ public class DictTypeController {
* @date 2018/7/25 12:36
*/
@PostResource(name = "修改字典类型", path = "/dictType/edit", requiredPermission = false)
public ResponseData edit(@RequestBody @Validated(DictTypeRequest.edit.class) DictTypeRequest dictTypeRequest) {
public ResponseData<?> edit(@RequestBody @Validated(DictTypeRequest.edit.class) DictTypeRequest dictTypeRequest) {
this.dictTypeService.edit(dictTypeRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -96,9 +98,9 @@ public class DictTypeController {
* @date 2018/7/25 12:36
*/
@PostResource(name = "修改字典类型状态", path = "/dictType/updateStatus", requiredPermission = false)
public ResponseData updateStatus(@RequestBody @Validated(BaseRequest.updateStatus.class) DictTypeRequest dictTypeRequest) {
public ResponseData<?> updateStatus(@RequestBody @Validated(BaseRequest.updateStatus.class) DictTypeRequest dictTypeRequest) {
this.dictTypeService.editStatus(dictTypeRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -108,9 +110,9 @@ public class DictTypeController {
* @date 2021/1/13 11:25
*/
@GetResource(name = "获取字典类型详情", path = "/dictType/detail", requiredPermission = false)
public ResponseData detail(@Validated(BaseRequest.detail.class) DictTypeRequest dictTypeRequest) {
public ResponseData<SysDictType> detail(@Validated(BaseRequest.detail.class) DictTypeRequest dictTypeRequest) {
SysDictType detail = this.dictTypeService.detail(dictTypeRequest);
return new SuccessResponseData(detail);
return new SuccessResponseData<>(detail);
}
/**
@ -120,8 +122,8 @@ public class DictTypeController {
* @date 2020/10/30 21:46
*/
@GetResource(name = "获取字典类型列表", path = "/dictType/list", requiredPermission = false)
public ResponseData list(DictTypeRequest dictTypeRequest) {
return new SuccessResponseData(dictTypeService.findList(dictTypeRequest));
public ResponseData<List<SysDictType>> list(DictTypeRequest dictTypeRequest) {
return new SuccessResponseData<>(dictTypeService.findList(dictTypeRequest));
}
/**
@ -131,8 +133,8 @@ public class DictTypeController {
* @date 2020/10/30 21:46
*/
@GetResource(name = "获取字典类型列表(分页)", path = "/dictType/page", requiredPermission = false)
public ResponseData page(DictTypeRequest dictTypeRequest) {
return new SuccessResponseData(dictTypeService.findPage(dictTypeRequest));
public ResponseData<PageResult<SysDictType>> page(DictTypeRequest dictTypeRequest) {
return new SuccessResponseData<>(dictTypeService.findPage(dictTypeRequest));
}
/**
@ -142,10 +144,10 @@ public class DictTypeController {
* @date 2021/1/13 11:25
*/
@GetResource(name = "获取系统配置字典类型详情", path = "/dictType/getConfigDictTypeDetail", requiredPermission = false)
public ResponseData getConfigDictTypeDetail(DictTypeRequest dictTypeRequest) {
public ResponseData<SysDictType> getConfigDictTypeDetail(DictTypeRequest dictTypeRequest) {
dictTypeRequest.setDictTypeCode(DictConstants.CONFIG_GROUP_DICT_TYPE_CODE);
SysDictType detail = this.dictTypeService.detail(dictTypeRequest);
return new SuccessResponseData(detail);
return new SuccessResponseData<>(detail);
}
/**
@ -155,10 +157,10 @@ public class DictTypeController {
* @date 2021/1/13 11:25
*/
@GetResource(name = "获取语种字典类型型详情", path = "/dictType/getTranslationDetail", requiredPermission = false)
public ResponseData getTranslationDetail(DictTypeRequest dictTypeRequest) {
public ResponseData<SysDictType> getTranslationDetail(DictTypeRequest dictTypeRequest) {
dictTypeRequest.setDictTypeCode(DictConstants.LANGUAGES_DICT_TYPE_CODE);
SysDictType detail = this.dictTypeService.detail(dictTypeRequest);
return new SuccessResponseData(detail);
return new SuccessResponseData<>(detail);
}
}

View File

@ -25,6 +25,7 @@
package cn.stylefeng.roses.kernel.message.modular.controller;
import cn.hutool.core.util.StrUtil;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.message.api.MessageApi;
import cn.stylefeng.roses.kernel.message.api.enums.MessageReadFlagEnum;
import cn.stylefeng.roses.kernel.message.api.pojo.request.MessageRequest;
@ -68,10 +69,10 @@ public class SysMessageController {
* @date 2021/1/8 13:50
*/
@PostResource(name = "发送系统消息", path = "/sysMessage/sendMessage")
public ResponseData sendMessage(@RequestBody @Validated(MessageSendRequest.add.class) MessageSendRequest messageSendRequest) {
public ResponseData<?> sendMessage(@RequestBody @Validated(MessageSendRequest.add.class) MessageSendRequest messageSendRequest) {
messageSendRequest.setMessageSendTime(new Date());
messageApi.sendMessage(messageSendRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -81,10 +82,10 @@ public class SysMessageController {
* @date 2021/1/8 13:50
*/
@PostResource(name = "批量更新系统消息状态", path = "/sysMessage/batchUpdateReadFlag")
public ResponseData batchUpdateReadFlag(@RequestBody @Validated(MessageRequest.updateReadFlag.class) MessageRequest messageRequest) {
public ResponseData<?> batchUpdateReadFlag(@RequestBody @Validated(MessageRequest.updateReadFlag.class) MessageRequest messageRequest) {
List<Long> messageIdList = messageRequest.getMessageIdList();
messageApi.batchReadFlagByMessageIds(StrUtil.join(",", messageIdList), MessageReadFlagEnum.READ);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -94,9 +95,9 @@ public class SysMessageController {
* @date 2021/1/8 13:50
*/
@GetResource(name = "系统消息全部修改已读", path = "/sysMessage/allMessageReadFlag")
public ResponseData allMessageReadFlag() {
public ResponseData<?> allMessageReadFlag() {
messageApi.allMessageReadFlag();
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -106,9 +107,9 @@ public class SysMessageController {
* @date 2021/1/8 13:50
*/
@PostResource(name = "删除系统消息", path = "/sysMessage/delete")
public ResponseData delete(@RequestBody @Validated(MessageRequest.delete.class) MessageRequest messageRequest) {
public ResponseData<?> delete(@RequestBody @Validated(MessageRequest.delete.class) MessageRequest messageRequest) {
messageApi.deleteByMessageId(messageRequest.getMessageId());
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -118,8 +119,8 @@ public class SysMessageController {
* @date 2021/1/8 13:50
*/
@GetResource(name = "查看系统消息", path = "/sysMessage/detail")
public ResponseData detail(@Validated(MessageRequest.detail.class) MessageRequest messageRequest) {
return new SuccessResponseData(messageApi.messageDetail(messageRequest));
public ResponseData<MessageResponse> detail(@Validated(MessageRequest.detail.class) MessageRequest messageRequest) {
return new SuccessResponseData<>(messageApi.messageDetail(messageRequest));
}
/**
@ -130,8 +131,8 @@ public class SysMessageController {
*/
@GetResource(name = "分页查询系统消息列表", path = "/sysMessage/page")
@Wrapper(MessageWrapper.class)
public ResponseData page(MessageRequest messageRequest) {
return new SuccessResponseData(messageApi.queryPageCurrentUser(messageRequest));
public ResponseData<PageResult<MessageResponse>> page(MessageRequest messageRequest) {
return new SuccessResponseData<>(messageApi.queryPageCurrentUser(messageRequest));
}
/**
@ -141,8 +142,8 @@ public class SysMessageController {
* @date 2021/1/8 13:50
*/
@GetResource(name = "系统消息列表", path = "/sysMessage/list")
public ResponseData list(MessageRequest messageRequest) {
return new SuccessResponseData(messageApi.queryListCurrentUser(messageRequest));
public ResponseData<List<MessageResponse>> list(MessageRequest messageRequest) {
return new SuccessResponseData<>(messageApi.queryListCurrentUser(messageRequest));
}
/**
@ -152,10 +153,10 @@ public class SysMessageController {
* @date 2021/6/12 17:42
*/
@GetResource(name = "查询所有未读系统消息列表", path = "/sysMessage/unReadMessageList", requiredPermission = false)
public ResponseData unReadMessageList(MessageRequest messageRequest) {
public ResponseData<List<MessageResponse>> unReadMessageList(MessageRequest messageRequest) {
messageRequest.setReadFlag(MessageReadFlagEnum.UNREAD.getCode());
List<MessageResponse> messageResponses = messageApi.queryListCurrentUser(messageRequest);
return new SuccessResponseData(messageResponses);
return new SuccessResponseData<>(messageResponses);
}
}

View File

@ -40,9 +40,9 @@ public class MigrationController {
* @date 2021/7/6 17:37
**/
@GetResource(name = "获取所有可备份数据列表", path = "/dataMigration/getAllMigrationList")
public ResponseData getAllMigrationList() {
public ResponseData<List<MigrationRequest>> getAllMigrationList() {
List<MigrationRequest> migrationRequestList = migrationService.getAllMigrationList();
return new SuccessResponseData(migrationRequestList);
return new SuccessResponseData<>(migrationRequestList);
}
/**
@ -53,7 +53,7 @@ public class MigrationController {
* @date 2021/7/7 11:11
**/
@GetResource(name = "备份指定数据列表", path = "/dataMigration/migrationSelectData")
public ResponseData migrationSelectData(@Validated(MigrationAggregationPOJO.export.class) MigrationAggregationPOJO migrationAggregationPOJO) {
public ResponseData<String> migrationSelectData(@Validated(MigrationAggregationPOJO.export.class) MigrationAggregationPOJO migrationAggregationPOJO) {
List<String> res = new ArrayList<>();
for (String s : migrationAggregationPOJO.getAppAndModuleNameList()) {
try {
@ -65,7 +65,7 @@ public class MigrationController {
}
migrationAggregationPOJO.setAppAndModuleNameList(res);
String migrationSelectDataStr = migrationService.migrationSelectData(migrationAggregationPOJO);
return new SuccessResponseData(migrationSelectDataStr);
return new SuccessResponseData<>(migrationSelectDataStr);
}
/**
@ -76,8 +76,8 @@ public class MigrationController {
* @date 2021/7/7 11:11
**/
@PostResource(name = "恢复备份数据", path = "/dataMigration/restoreData")
public ResponseData restoreData(@RequestPart("file") MultipartFile file,String type) {
public ResponseData<?> restoreData(@RequestPart("file") MultipartFile file,String type) {
migrationService.restoreData(file,type);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
}

View File

@ -60,9 +60,9 @@ public class SysMenuButtonController {
* @date 2021/1/9 11:28
*/
@PostResource(name = "添加系统菜单按钮", path = "/sysMenuButton/add")
public ResponseData add(@RequestBody @Validated(SysMenuButtonRequest.add.class) SysMenuButtonRequest sysMenuButtonRequest) {
public ResponseData<?> add(@RequestBody @Validated(SysMenuButtonRequest.add.class) SysMenuButtonRequest sysMenuButtonRequest) {
sysMenuButtonService.add(sysMenuButtonRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -72,9 +72,9 @@ public class SysMenuButtonController {
* @date 2021/1/9 11:28
*/
@PostResource(name = "添加系统默认菜单按钮", path = "/sysMenuButton/addSystemDefaultButton")
public ResponseData addSystemDefaultButton(@RequestBody @Validated(SysMenuButtonRequest.def.class) SysMenuButtonRequest sysMenuButtonRequest) {
public ResponseData<?> addSystemDefaultButton(@RequestBody @Validated(SysMenuButtonRequest.def.class) SysMenuButtonRequest sysMenuButtonRequest) {
sysMenuButtonService.addDefaultButtons(sysMenuButtonRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -85,9 +85,9 @@ public class SysMenuButtonController {
* @date 2021/1/9 12:14
*/
@PostResource(name = "删除单个系统菜单按钮", path = "/sysMenuButton/delete")
public ResponseData delete(@RequestBody @Validated(SysMenuButtonRequest.delete.class) SysMenuButtonRequest sysMenuButtonRequest) {
public ResponseData<?> delete(@RequestBody @Validated(SysMenuButtonRequest.delete.class) SysMenuButtonRequest sysMenuButtonRequest) {
sysMenuButtonService.del(sysMenuButtonRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -98,9 +98,9 @@ public class SysMenuButtonController {
* @date 2021/1/9 12:27
*/
@PostResource(name = "批量删除多个系统菜单按钮", path = "/sysMenuButton/batchDelete")
public ResponseData batchDelete(@RequestBody @Validated(SysMenuButtonRequest.batchDelete.class) SysMenuButtonRequest sysMenuButtonRequest) {
public ResponseData<?> batchDelete(@RequestBody @Validated(SysMenuButtonRequest.batchDelete.class) SysMenuButtonRequest sysMenuButtonRequest) {
sysMenuButtonService.delBatch(sysMenuButtonRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -111,9 +111,9 @@ public class SysMenuButtonController {
* @date 2021/1/9 12:00
*/
@PostResource(name = "编辑系统菜单按钮", path = "/sysMenuButton/edit")
public ResponseData edit(@RequestBody @Validated(SysMenuButtonRequest.edit.class) SysMenuButtonRequest sysMenuButtonRequest) {
public ResponseData<?> edit(@RequestBody @Validated(SysMenuButtonRequest.edit.class) SysMenuButtonRequest sysMenuButtonRequest) {
sysMenuButtonService.edit(sysMenuButtonRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -124,9 +124,9 @@ public class SysMenuButtonController {
* @date 2021/1/9 11:53
*/
@GetResource(name = "获取菜单按钮详情", path = "/sysMenuButton/detail")
public ResponseData detail(@Validated(SysMenuButtonRequest.detail.class) SysMenuButtonRequest sysMenuButtonRequest) {
public ResponseData<SysMenuButton> detail(@Validated(SysMenuButtonRequest.detail.class) SysMenuButtonRequest sysMenuButtonRequest) {
SysMenuButton detail = sysMenuButtonService.detail(sysMenuButtonRequest);
return new SuccessResponseData(detail);
return new SuccessResponseData<>(detail);
}
/**
@ -137,9 +137,9 @@ public class SysMenuButtonController {
* @date 2021/1/9 12:33
*/
@GetResource(name = "获取菜单按钮列表", path = "/sysMenuButton/pageList")
public ResponseData pageList(@Validated(SysMenuButtonRequest.list.class) SysMenuButtonRequest sysMenuButtonRequest) {
public ResponseData<PageResult<SysMenuButton>> pageList(@Validated(SysMenuButtonRequest.list.class) SysMenuButtonRequest sysMenuButtonRequest) {
PageResult<SysMenuButton> pageResult = sysMenuButtonService.findPage(sysMenuButtonRequest);
return new SuccessResponseData(pageResult);
return new SuccessResponseData<>(pageResult);
}
}

View File

@ -32,9 +32,11 @@ import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
import cn.stylefeng.roses.kernel.system.api.pojo.menu.MenuAndButtonTreeResponse;
import cn.stylefeng.roses.kernel.system.api.pojo.menu.SysMenuRequest;
import cn.stylefeng.roses.kernel.system.api.pojo.menu.antd.AntdMenuSelectTreeNode;
import cn.stylefeng.roses.kernel.system.api.pojo.menu.antd.AntdSysMenuDTO;
import cn.stylefeng.roses.kernel.system.api.pojo.menu.layui.LayuiMenuAndButtonTreeResponse;
import cn.stylefeng.roses.kernel.system.api.pojo.role.request.SysRoleRequest;
import cn.stylefeng.roses.kernel.system.modular.menu.entity.SysMenu;
import cn.stylefeng.roses.kernel.system.modular.menu.service.SysMenuService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
@ -63,9 +65,9 @@ public class SysMenuController {
* @date 2020/3/27 8:57
*/
@PostResource(name = "添加系统菜单", path = "/sysMenu/add")
public ResponseData add(@RequestBody @Validated(SysMenuRequest.add.class) SysMenuRequest sysMenuRequest) {
public ResponseData<?> add(@RequestBody @Validated(SysMenuRequest.add.class) SysMenuRequest sysMenuRequest) {
sysMenuService.add(sysMenuRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -75,9 +77,9 @@ public class SysMenuController {
* @date 2020/3/27 8:58
*/
@PostResource(name = "删除系统菜单", path = "/sysMenu/delete")
public ResponseData delete(@RequestBody @Validated(SysMenuRequest.delete.class) SysMenuRequest sysMenuRequest) {
public ResponseData<?> delete(@RequestBody @Validated(SysMenuRequest.delete.class) SysMenuRequest sysMenuRequest) {
sysMenuService.del(sysMenuRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -87,9 +89,9 @@ public class SysMenuController {
* @date 2020/3/27 8:59
*/
@PostResource(name = "编辑系统菜单", path = "/sysMenu/edit")
public ResponseData edit(@RequestBody @Validated(SysMenuRequest.edit.class) SysMenuRequest sysMenuRequest) {
public ResponseData<?> edit(@RequestBody @Validated(SysMenuRequest.edit.class) SysMenuRequest sysMenuRequest) {
sysMenuService.edit(sysMenuRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -99,8 +101,8 @@ public class SysMenuController {
* @date 2020/3/27 9:01
*/
@GetResource(name = "查看系统菜单", path = "/sysMenu/detail")
public ResponseData detail(@Validated(SysMenuRequest.detail.class) SysMenuRequest sysMenuRequest) {
return new SuccessResponseData(sysMenuService.detail(sysMenuRequest));
public ResponseData<SysMenu> detail(@Validated(SysMenuRequest.detail.class) SysMenuRequest sysMenuRequest) {
return new SuccessResponseData<>(sysMenuService.detail(sysMenuRequest));
}
/**
@ -110,8 +112,8 @@ public class SysMenuController {
* @date 2021/1/6 17:09
*/
@GetResource(name = "获取菜单列表layui版本", path = "/sysMenu/layuiList")
public ResponseData layuiList(SysMenuRequest sysMenuRequest) {
return new SuccessResponseData(sysMenuService.findList(sysMenuRequest));
public ResponseData<List<SysMenu>> layuiList(SysMenuRequest sysMenuRequest) {
return new SuccessResponseData<>(sysMenuService.findList(sysMenuRequest));
}
/**
@ -143,9 +145,9 @@ public class SysMenuController {
* @date 2021/1/7 15:17
*/
@GetResource(name = "获取系统所有菜单适用于登录后获取左侧菜单适配antd vue版本", path = "/sysMenu/getLeftMenusAntdv", requiredPermission = false)
public ResponseData getLeftMenusAntdv(SysMenuRequest sysMenuRequest) {
public ResponseData<List<AntdSysMenuDTO>> getLeftMenusAntdv(SysMenuRequest sysMenuRequest) {
List<AntdSysMenuDTO> sysMenuResponses = sysMenuService.getLeftMenusAntdv(sysMenuRequest);
return new SuccessResponseData(sysMenuResponses);
return new SuccessResponseData<>(sysMenuResponses);
}
/**
@ -155,8 +157,8 @@ public class SysMenuController {
* @date 2020/3/20 21:23
*/
@GetResource(name = "系统菜单列表(树)", path = "/sysMenu/list")
public ResponseData list(SysMenuRequest sysMenuRequest) {
return new SuccessResponseData(sysMenuService.findListWithTreeStructure(sysMenuRequest));
public ResponseData<List<SysMenu>> list(SysMenuRequest sysMenuRequest) {
return new SuccessResponseData<>(sysMenuService.findListWithTreeStructure(sysMenuRequest));
}
/**
@ -166,8 +168,8 @@ public class SysMenuController {
* @date 2020/3/27 15:55
*/
@GetResource(name = "获取系统菜单树,用于新增,编辑时选择上级节点", path = "/sysMenu/tree")
public ResponseData tree(SysMenuRequest sysMenuRequest) {
return new SuccessResponseData(sysMenuService.tree(sysMenuRequest));
public ResponseData<List<AntdMenuSelectTreeNode>> tree(SysMenuRequest sysMenuRequest) {
return new SuccessResponseData<>(sysMenuService.tree(sysMenuRequest));
}
/**
@ -177,9 +179,9 @@ public class SysMenuController {
* @date 2021/1/9 17:10
*/
@GetResource(name = "获取系统菜单和按钮的树用于角色分配菜单按钮antd vue版本使用", path = "/sysMenu/menuAndButtonTreeChildren")
public ResponseData menuAndButtonTreeChildren(SysRoleRequest sysRoleRequest) {
public ResponseData<List<LayuiMenuAndButtonTreeResponse>> menuAndButtonTreeChildren(SysRoleRequest sysRoleRequest) {
List<LayuiMenuAndButtonTreeResponse> treeResponseList = sysMenuService.getMenuAndButtonTree(sysRoleRequest, false);
return new SuccessResponseData(treeResponseList);
return new SuccessResponseData<>(treeResponseList);
}
/**
@ -189,9 +191,9 @@ public class SysMenuController {
* @date 2021/8/10 22:21
*/
@GetResource(name = "新版角色分配菜单和按钮界面使用的接口v2", path = "/sysMenu/menuAndButtonTreeChildrenV2")
public ResponseData menuAndButtonTreeChildrenV2(SysRoleRequest sysRoleRequest) {
public ResponseData<List<MenuAndButtonTreeResponse>> menuAndButtonTreeChildrenV2(SysRoleRequest sysRoleRequest) {
List<MenuAndButtonTreeResponse> treeResponseList = sysMenuService.getRoleMenuAndButtons(sysRoleRequest);
return new SuccessResponseData(treeResponseList);
return new SuccessResponseData<>(treeResponseList);
}
}

View File

@ -59,9 +59,9 @@ public class SysMenuResourceController {
* @date 2021/8/8 22:38
*/
@GetResource(name = "获取菜单的资源分配列表", path = "/sysMenuResource/getMenuResourceList")
public ResponseData getMenuResourceList(@Validated(value = SysMenuResourceRequest.list.class) SysMenuResourceRequest sysMenuResourceRequest) {
public ResponseData<List<ResourceTreeNode>> getMenuResourceList(@Validated(value = SysMenuResourceRequest.list.class) SysMenuResourceRequest sysMenuResourceRequest) {
List<ResourceTreeNode> menuResourceTree = sysMenuResourceService.getMenuResourceTree(sysMenuResourceRequest.getBusinessId());
return new SuccessResponseData(menuResourceTree);
return new SuccessResponseData<>(menuResourceTree);
}
/**
@ -71,9 +71,9 @@ public class SysMenuResourceController {
* @date 2021/8/10 11:55
*/
@PostResource(name = "设置菜单资源绑定", path = "/sysMenuResource/addMenuResourceBind")
public ResponseData addMenuResourceBind(@RequestBody @Validated(value = SysMenuResourceRequest.add.class) SysMenuResourceRequest sysMenuResourceRequest) {
public ResponseData<?> addMenuResourceBind(@RequestBody @Validated(value = SysMenuResourceRequest.add.class) SysMenuResourceRequest sysMenuResourceRequest) {
sysMenuResourceService.addMenuResourceBind(sysMenuResourceRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
}

View File

@ -24,12 +24,14 @@
*/
package cn.stylefeng.roses.kernel.system.modular.notice.controller;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
import cn.stylefeng.roses.kernel.system.api.pojo.notice.SysNoticeRequest;
import cn.stylefeng.roses.kernel.system.modular.notice.entity.SysNotice;
import cn.stylefeng.roses.kernel.system.modular.notice.service.SysNoticeService;
import cn.stylefeng.roses.kernel.system.modular.notice.wrapper.NoticeWrapper;
import cn.stylefeng.roses.kernel.wrapper.api.annotation.Wrapper;
@ -38,6 +40,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
*
@ -59,9 +62,9 @@ public class SysNoticeController {
* @date 2021/1/9 14:44
*/
@PostResource(name = "添加通知管理", path = "/sysNotice/add")
public ResponseData add(@RequestBody @Validated(SysNoticeRequest.add.class) SysNoticeRequest sysNoticeParam) {
public ResponseData<?> add(@RequestBody @Validated(SysNoticeRequest.add.class) SysNoticeRequest sysNoticeParam) {
sysNoticeService.add(sysNoticeParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -71,9 +74,9 @@ public class SysNoticeController {
* @date 2021/1/9 14:54
*/
@PostResource(name = "编辑通知管理", path = "/sysNotice/edit")
public ResponseData edit(@RequestBody @Validated(SysNoticeRequest.edit.class) SysNoticeRequest sysNoticeParam) {
public ResponseData<?> edit(@RequestBody @Validated(SysNoticeRequest.edit.class) SysNoticeRequest sysNoticeParam) {
sysNoticeService.edit(sysNoticeParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -83,9 +86,9 @@ public class SysNoticeController {
* @date 2021/1/9 14:54
*/
@PostResource(name = "删除通知管理", path = "/sysNotice/delete")
public ResponseData delete(@RequestBody @Validated(SysNoticeRequest.delete.class) SysNoticeRequest sysNoticeParam) {
public ResponseData<?> delete(@RequestBody @Validated(SysNoticeRequest.delete.class) SysNoticeRequest sysNoticeParam) {
sysNoticeService.del(sysNoticeParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -95,8 +98,8 @@ public class SysNoticeController {
* @date 2021/1/9 9:49
*/
@GetResource(name = "查看通知管理", path = "/sysNotice/detail")
public ResponseData detail(@Validated(SysNoticeRequest.detail.class) SysNoticeRequest sysNoticeParam) {
return new SuccessResponseData(sysNoticeService.detail(sysNoticeParam));
public ResponseData<SysNotice> detail(@Validated(SysNoticeRequest.detail.class) SysNoticeRequest sysNoticeParam) {
return new SuccessResponseData<>(sysNoticeService.detail(sysNoticeParam));
}
/**
@ -107,8 +110,8 @@ public class SysNoticeController {
*/
@GetResource(name = "查询通知管理", path = "/sysNotice/page")
@Wrapper(NoticeWrapper.class)
public ResponseData page(SysNoticeRequest sysNoticeParam) {
return new SuccessResponseData(sysNoticeService.findPage(sysNoticeParam));
public ResponseData<PageResult<SysNotice>> page(SysNoticeRequest sysNoticeParam) {
return new SuccessResponseData<>(sysNoticeService.findPage(sysNoticeParam));
}
/**
@ -118,8 +121,8 @@ public class SysNoticeController {
* @date 2021/1/9 14:55
*/
@GetResource(name = "通知管理列表", path = "/sysNotice/list")
public ResponseData list(SysNoticeRequest sysNoticeParam) {
return new SuccessResponseData(sysNoticeService.findList(sysNoticeParam));
public ResponseData<List<SysNotice>> list(SysNoticeRequest sysNoticeParam) {
return new SuccessResponseData<>(sysNoticeService.findList(sysNoticeParam));
}
}

View File

@ -24,6 +24,7 @@
*/
package cn.stylefeng.roses.kernel.system.modular.organization.controller;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.rule.tree.ztree.ZTreeNode;
@ -31,6 +32,8 @@ import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
import cn.stylefeng.roses.kernel.system.api.pojo.organization.HrOrganizationRequest;
import cn.stylefeng.roses.kernel.system.api.pojo.organization.OrganizationTreeNode;
import cn.stylefeng.roses.kernel.system.modular.organization.entity.HrOrganization;
import cn.stylefeng.roses.kernel.system.modular.organization.service.HrOrganizationService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
@ -59,9 +62,9 @@ public class HrOrganizationController {
* @date 2020/11/04 11:05
*/
@PostResource(name = "添加系统组织机构", path = "/hrOrganization/add")
public ResponseData add(@RequestBody @Validated(HrOrganizationRequest.add.class) HrOrganizationRequest hrOrganizationRequest) {
public ResponseData<?> add(@RequestBody @Validated(HrOrganizationRequest.add.class) HrOrganizationRequest hrOrganizationRequest) {
hrOrganizationService.add(hrOrganizationRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -71,9 +74,9 @@ public class HrOrganizationController {
* @date 2020/11/04 11:05
*/
@PostResource(name = "删除系统组织机构", path = "/hrOrganization/delete")
public ResponseData delete(@RequestBody @Validated(HrOrganizationRequest.delete.class) HrOrganizationRequest hrOrganizationRequest) {
public ResponseData<?> delete(@RequestBody @Validated(HrOrganizationRequest.delete.class) HrOrganizationRequest hrOrganizationRequest) {
hrOrganizationService.del(hrOrganizationRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -83,9 +86,9 @@ public class HrOrganizationController {
* @date 2020/11/04 11:05
*/
@PostResource(name = "编辑系统组织机构", path = "/hrOrganization/edit")
public ResponseData edit(@RequestBody @Validated(HrOrganizationRequest.edit.class) HrOrganizationRequest hrOrganizationRequest) {
public ResponseData<?> edit(@RequestBody @Validated(HrOrganizationRequest.edit.class) HrOrganizationRequest hrOrganizationRequest) {
hrOrganizationService.edit(hrOrganizationRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -95,9 +98,9 @@ public class HrOrganizationController {
* @date 2020/11/04 11:05
*/
@PostResource(name = "修改组织机构状态", path = "/hrOrganization/updateStatus")
public ResponseData updateStatus(@RequestBody @Validated(HrOrganizationRequest.updateStatus.class) HrOrganizationRequest hrOrganizationRequest) {
public ResponseData<?> updateStatus(@RequestBody @Validated(HrOrganizationRequest.updateStatus.class) HrOrganizationRequest hrOrganizationRequest) {
hrOrganizationService.updateStatus(hrOrganizationRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -107,8 +110,8 @@ public class HrOrganizationController {
* @date 2020/11/04 11:05
*/
@GetResource(name = "查看详情系统组织机构", path = "/hrOrganization/detail")
public ResponseData detail(@Validated(HrOrganizationRequest.detail.class) HrOrganizationRequest hrOrganizationRequest) {
return new SuccessResponseData(hrOrganizationService.detail(hrOrganizationRequest));
public ResponseData<HrOrganization> detail(@Validated(HrOrganizationRequest.detail.class) HrOrganizationRequest hrOrganizationRequest) {
return new SuccessResponseData<>(hrOrganizationService.detail(hrOrganizationRequest));
}
/**
@ -118,8 +121,8 @@ public class HrOrganizationController {
* @date 2020/11/04 11:05
*/
@GetResource(name = "分页查询系统组织机构", path = "/hrOrganization/page")
public ResponseData page(HrOrganizationRequest hrOrganizationRequest) {
return new SuccessResponseData(hrOrganizationService.findPage(hrOrganizationRequest));
public ResponseData<PageResult<HrOrganization>> page(HrOrganizationRequest hrOrganizationRequest) {
return new SuccessResponseData<>(hrOrganizationService.findPage(hrOrganizationRequest));
}
/**
@ -129,8 +132,8 @@ public class HrOrganizationController {
* @date 2020/11/04 11:05
*/
@GetResource(name = "获取全部系统组织机构", path = "/hrOrganization/list")
public ResponseData list(HrOrganizationRequest hrOrganizationRequest) {
return new SuccessResponseData(hrOrganizationService.findList(hrOrganizationRequest));
public ResponseData<List<HrOrganization>> list(HrOrganizationRequest hrOrganizationRequest) {
return new SuccessResponseData<>(hrOrganizationService.findList(hrOrganizationRequest));
}
/**
@ -140,8 +143,8 @@ public class HrOrganizationController {
* @date 2021/01/05 15:55
*/
@GetResource(name = "获取全部系统组织机构树", path = "/hrOrganization/tree")
public ResponseData organizationTree(HrOrganizationRequest hrOrganizationRequest) {
return new SuccessResponseData(hrOrganizationService.organizationTree(hrOrganizationRequest));
public ResponseData<List<OrganizationTreeNode>> organizationTree(HrOrganizationRequest hrOrganizationRequest) {
return new SuccessResponseData<>(hrOrganizationService.organizationTree(hrOrganizationRequest));
}
/**
@ -151,8 +154,8 @@ public class HrOrganizationController {
* @date 2021/3/19 22:20
*/
@GetResource(name = "获取组织机构树(用于用户绑定数据范围)", path = "/hrOrganization/userBindOrgScope")
public ResponseData userBindOrgScope(@Validated(HrOrganizationRequest.userBindOrgScope.class) HrOrganizationRequest hrOrganizationRequest) {
return new SuccessResponseData(hrOrganizationService.organizationTree(hrOrganizationRequest));
public ResponseData<List<OrganizationTreeNode>> userBindOrgScope(@Validated(HrOrganizationRequest.userBindOrgScope.class) HrOrganizationRequest hrOrganizationRequest) {
return new SuccessResponseData<>(hrOrganizationService.organizationTree(hrOrganizationRequest));
}
/**
@ -173,9 +176,9 @@ public class HrOrganizationController {
* @date 2021/1/9 18:37
*/
@GetResource(name = "AntdVue版本--获取组织机构树(用于角色配置数据范围类型,并且数据范围类型是指定组织机构时)", path = "/hrOrganization/roleBindOrgScopeAntdv")
public ResponseData roleBindOrgScopeAntdv(@Validated(HrOrganizationRequest.roleBindOrgScope.class) HrOrganizationRequest hrOrganizationRequest) {
public ResponseData<List<ZTreeNode>> roleBindOrgScopeAntdv(@Validated(HrOrganizationRequest.roleBindOrgScope.class) HrOrganizationRequest hrOrganizationRequest) {
List<ZTreeNode> zTreeNodes = hrOrganizationService.orgZTree(hrOrganizationRequest, true);
return new SuccessResponseData(zTreeNodes);
return new SuccessResponseData<>(zTreeNodes);
}
}

View File

@ -24,6 +24,7 @@
*/
package cn.stylefeng.roses.kernel.system.modular.organization.controller;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.rule.pojo.request.BaseRequest;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
@ -31,12 +32,14 @@ import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
import cn.stylefeng.roses.kernel.system.api.pojo.organization.HrPositionRequest;
import cn.stylefeng.roses.kernel.system.modular.organization.entity.HrPosition;
import cn.stylefeng.roses.kernel.system.modular.organization.service.HrPositionService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
*
@ -58,9 +61,9 @@ public class HrPositionController {
* @date 2020/11/04 11:07
*/
@PostResource(name = "添加系统职位", path = "/hrPosition/add")
public ResponseData add(@RequestBody @Validated(HrPositionRequest.add.class) HrPositionRequest hrPositionRequest) {
public ResponseData<?> add(@RequestBody @Validated(HrPositionRequest.add.class) HrPositionRequest hrPositionRequest) {
hrPositionService.add(hrPositionRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -70,9 +73,9 @@ public class HrPositionController {
* @date 2020/11/04 11:07
*/
@PostResource(name = "删除系统职位", path = "/hrPosition/delete")
public ResponseData delete(@RequestBody @Validated(HrPositionRequest.delete.class) HrPositionRequest hrPositionRequest) {
public ResponseData<?> delete(@RequestBody @Validated(HrPositionRequest.delete.class) HrPositionRequest hrPositionRequest) {
hrPositionService.del(hrPositionRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -82,9 +85,9 @@ public class HrPositionController {
* @date 2021/4/8 13:50
*/
@PostResource(name = "批量删除系统职位", path = "/hrPosition/batchDelete")
public ResponseData batchDelete(@RequestBody @Validated(HrPositionRequest.batchDelete.class) HrPositionRequest hrPositionRequest) {
public ResponseData<?> batchDelete(@RequestBody @Validated(HrPositionRequest.batchDelete.class) HrPositionRequest hrPositionRequest) {
hrPositionService.batchDel(hrPositionRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -94,9 +97,9 @@ public class HrPositionController {
* @date 2020/11/04 11:07
*/
@PostResource(name = "编辑系统职位", path = "/hrPosition/edit")
public ResponseData edit(@RequestBody @Validated(HrPositionRequest.edit.class) HrPositionRequest hrPositionRequest) {
public ResponseData<?> edit(@RequestBody @Validated(HrPositionRequest.edit.class) HrPositionRequest hrPositionRequest) {
hrPositionService.edit(hrPositionRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -106,9 +109,9 @@ public class HrPositionController {
* @date 2020/11/04 11:07
*/
@PostResource(name = "更新职位状态", path = "/hrPosition/updateStatus")
public ResponseData updateStatus(@RequestBody @Validated(BaseRequest.updateStatus.class) HrPositionRequest hrPositionRequest) {
public ResponseData<?> updateStatus(@RequestBody @Validated(BaseRequest.updateStatus.class) HrPositionRequest hrPositionRequest) {
hrPositionService.changeStatus(hrPositionRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -118,8 +121,8 @@ public class HrPositionController {
* @date 2020/11/04 11:07
*/
@GetResource(name = "查看详情系统职位", path = "/hrPosition/detail")
public ResponseData detail(@Validated(HrPositionRequest.detail.class) HrPositionRequest hrPositionRequest) {
return new SuccessResponseData(hrPositionService.detail(hrPositionRequest));
public ResponseData<HrPosition> detail(@Validated(HrPositionRequest.detail.class) HrPositionRequest hrPositionRequest) {
return new SuccessResponseData<>(hrPositionService.detail(hrPositionRequest));
}
/**
@ -129,8 +132,8 @@ public class HrPositionController {
* @date 2020/11/04 11:07
*/
@GetResource(name = "分页查询系统职位", path = "/hrPosition/page")
public ResponseData page(HrPositionRequest hrPositionRequest) {
return new SuccessResponseData(hrPositionService.findPage(hrPositionRequest));
public ResponseData<PageResult<HrPosition>> page(HrPositionRequest hrPositionRequest) {
return new SuccessResponseData<>(hrPositionService.findPage(hrPositionRequest));
}
/**
@ -140,8 +143,8 @@ public class HrPositionController {
* @date 2020/11/04 11:07
*/
@GetResource(name = "获取全部系统职位", path = "/hrPosition/list")
public ResponseData list(HrPositionRequest hrPositionRequest) {
return new SuccessResponseData(hrPositionService.findList(hrPositionRequest));
public ResponseData<List<HrPosition>> list(HrPositionRequest hrPositionRequest) {
return new SuccessResponseData<>(hrPositionService.findList(hrPositionRequest));
}
}

View File

@ -59,9 +59,9 @@ public class ResourceController {
* @date 2020/11/24 19:47
*/
@GetResource(name = "获取资源列表", path = "/resource/pageList")
public ResponseData pageList(ResourceRequest resourceRequest) {
public ResponseData<PageResult<SysResource>> pageList(ResourceRequest resourceRequest) {
PageResult<SysResource> result = this.sysResourceService.findPage(resourceRequest);
return new SuccessResponseData(result);
return new SuccessResponseData<>(result);
}
/**
@ -71,9 +71,9 @@ public class ResourceController {
* @date 2020/11/24 19:51
*/
@GetResource(name = "获取资源下拉列表", path = "/resource/getMenuResourceList")
public ResponseData getMenuResourceList(ResourceRequest resourceRequest) {
public ResponseData<List<SysResource>> getMenuResourceList(ResourceRequest resourceRequest) {
List<SysResource> menuResourceList = this.sysResourceService.findList(resourceRequest);
return new SuccessResponseData(menuResourceList);
return new SuccessResponseData<>(menuResourceList);
}
/**
@ -94,8 +94,8 @@ public class ResourceController {
* @date 2021/1/9 15:07
*/
@GetResource(name = "AntdVue版本--获取资源树列表,用于角色分配接口权限", path = "/resource/getRoleResourceTreeAntdv")
public ResponseData getLateralTreeChildren(SysRoleRequest sysRoleRequest) {
public ResponseData<List<ResourceTreeNode>> getLateralTreeChildren(SysRoleRequest sysRoleRequest) {
List<ResourceTreeNode> resourceLateralTree = sysResourceService.getRoleResourceTree(sysRoleRequest.getRoleId(), true);
return new SuccessResponseData(resourceLateralTree);
return new SuccessResponseData<>(resourceLateralTree);
}
}

View File

@ -25,12 +25,16 @@
package cn.stylefeng.roses.kernel.system.modular.role.controller;
import cn.hutool.core.collection.ListUtil;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.rule.pojo.dict.SimpleDict;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
import cn.stylefeng.roses.kernel.system.api.pojo.role.dto.SysRoleDTO;
import cn.stylefeng.roses.kernel.system.api.pojo.role.request.SysRoleRequest;
import cn.stylefeng.roses.kernel.system.modular.role.entity.SysRole;
import cn.stylefeng.roses.kernel.system.modular.role.service.SysRoleResourceService;
import cn.stylefeng.roses.kernel.system.modular.role.service.SysRoleService;
import org.springframework.validation.annotation.Validated;
@ -38,6 +42,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
*
@ -62,9 +67,9 @@ public class SysRoleController {
* @date 2020/11/5 10:38
*/
@PostResource(name = "添加角色", path = "/sysRole/add")
public ResponseData add(@RequestBody @Validated(SysRoleRequest.add.class) SysRoleRequest sysRoleRequest) {
public ResponseData<?> add(@RequestBody @Validated(SysRoleRequest.add.class) SysRoleRequest sysRoleRequest) {
sysRoleService.add(sysRoleRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -74,9 +79,9 @@ public class SysRoleController {
* @date 2020/11/5 10:48
*/
@PostResource(name = "角色删除", path = "/sysRole/delete")
public ResponseData delete(@RequestBody @Validated(SysRoleRequest.delete.class) SysRoleRequest sysRoleRequest) {
public ResponseData<?> delete(@RequestBody @Validated(SysRoleRequest.delete.class) SysRoleRequest sysRoleRequest) {
sysRoleService.del(sysRoleRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -86,9 +91,9 @@ public class SysRoleController {
* @date 2020/11/5 10:49
*/
@PostResource(name = "角色编辑", path = "/sysRole/edit")
public ResponseData edit(@RequestBody @Validated(SysRoleRequest.edit.class) SysRoleRequest sysRoleRequest) {
public ResponseData<?> edit(@RequestBody @Validated(SysRoleRequest.edit.class) SysRoleRequest sysRoleRequest) {
sysRoleService.edit(sysRoleRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -98,8 +103,8 @@ public class SysRoleController {
* @date 2020/11/5 10:50
*/
@GetResource(name = "角色查看", path = "/sysRole/detail")
public ResponseData detail(@Validated(SysRoleRequest.detail.class) SysRoleRequest sysRoleRequest) {
return new SuccessResponseData(sysRoleService.detail(sysRoleRequest));
public ResponseData<SysRoleDTO> detail(@Validated(SysRoleRequest.detail.class) SysRoleRequest sysRoleRequest) {
return new SuccessResponseData<>(sysRoleService.detail(sysRoleRequest));
}
/**
@ -109,8 +114,8 @@ public class SysRoleController {
* @date 2020/11/5 10:19
*/
@GetResource(name = "查询角色", path = "/sysRole/page")
public ResponseData page(SysRoleRequest sysRoleRequest) {
return new SuccessResponseData(sysRoleService.findPage(sysRoleRequest));
public ResponseData<PageResult<SysRole>> page(SysRoleRequest sysRoleRequest) {
return new SuccessResponseData<>(sysRoleService.findPage(sysRoleRequest));
}
/**
@ -120,9 +125,9 @@ public class SysRoleController {
* @date 2020/11/22 19:51
*/
@PostResource(name = "角色授权资源", path = "/sysRole/grantResource")
public ResponseData grantResource(@RequestBody @Validated(SysRoleRequest.grantResource.class) SysRoleRequest sysRoleParam) {
public ResponseData<?> grantResource(@RequestBody @Validated(SysRoleRequest.grantResource.class) SysRoleRequest sysRoleParam) {
sysRoleResourceService.grantResource(sysRoleParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -132,9 +137,9 @@ public class SysRoleController {
* @date 2021/8/10 18:23
*/
@PostResource(name = "角色绑定接口数据V2", path = "/sysRole/grantResourceV2")
public ResponseData grantResourceV2(@RequestBody @Validated(SysRoleRequest.grantResourceV2.class) SysRoleRequest sysRoleRequest) {
public ResponseData<?> grantResourceV2(@RequestBody @Validated(SysRoleRequest.grantResourceV2.class) SysRoleRequest sysRoleRequest) {
sysRoleResourceService.grantResourceV2(sysRoleRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -144,9 +149,9 @@ public class SysRoleController {
* @date 2021/1/9 18:04
*/
@PostResource(name = "角色授权菜单和按钮", path = "/sysRole/grantMenuAndButton")
public ResponseData grantMenuAndButton(@RequestBody @Validated(SysRoleRequest.grantMenuButton.class) SysRoleRequest sysRoleRequest) {
public ResponseData<?> grantMenuAndButton(@RequestBody @Validated(SysRoleRequest.grantMenuButton.class) SysRoleRequest sysRoleRequest) {
sysRoleService.grantMenuAndButton(sysRoleRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -156,9 +161,9 @@ public class SysRoleController {
* @date 2021/8/11 9:58
*/
@PostResource(name = "角色授权菜单", path = "/sysRole/grantMenu")
public ResponseData grantMenu(@RequestBody @Validated(SysRoleRequest.grantMenu.class) SysRoleRequest sysRoleRequest) {
public ResponseData<?> grantMenu(@RequestBody @Validated(SysRoleRequest.grantMenu.class) SysRoleRequest sysRoleRequest) {
sysRoleService.grantMenu(sysRoleRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -168,9 +173,9 @@ public class SysRoleController {
* @date 2021/8/11 9:58
*/
@PostResource(name = "角色授权按钮", path = "/sysRole/grantButton")
public ResponseData grantButton(@RequestBody @Validated(SysRoleRequest.grantButton.class) SysRoleRequest sysRoleRequest) {
public ResponseData<?> grantButton(@RequestBody @Validated(SysRoleRequest.grantButton.class) SysRoleRequest sysRoleRequest) {
sysRoleService.grantButton(sysRoleRequest);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -180,9 +185,9 @@ public class SysRoleController {
* @date 2020/3/28 16:05
*/
@PostResource(name = "设置角色绑定的数据范围类型和数据范围", path = "/sysRole/grantDataScope")
public ResponseData grantData(@RequestBody @Validated(SysRoleRequest.grantDataScope.class) SysRoleRequest sysRoleParam) {
public ResponseData<?> grantData(@RequestBody @Validated(SysRoleRequest.grantDataScope.class) SysRoleRequest sysRoleParam) {
sysRoleService.grantDataScope(sysRoleParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -192,8 +197,8 @@ public class SysRoleController {
* @date 2020/11/6 13:49
*/
@GetResource(name = "角色下拉", path = "/sysRole/dropDown")
public ResponseData dropDown() {
return new SuccessResponseData(sysRoleService.dropDown());
public ResponseData<List<SimpleDict>> dropDown() {
return new SuccessResponseData<>(sysRoleService.dropDown());
}
/**
@ -203,9 +208,9 @@ public class SysRoleController {
* @date 2020/11/5 10:58
*/
@GetResource(name = "角色拥有菜单", path = "/sysRole/getRoleMenus")
public ResponseData getRoleMenus(@Validated(SysRoleRequest.detail.class) SysRoleRequest sysRoleRequest) {
public ResponseData<List<Long>> getRoleMenus(@Validated(SysRoleRequest.detail.class) SysRoleRequest sysRoleRequest) {
Long roleId = sysRoleRequest.getRoleId();
return new SuccessResponseData(sysRoleService.getMenuIdsByRoleIds(ListUtil.toList(roleId)));
return new SuccessResponseData<>(sysRoleService.getMenuIdsByRoleIds(ListUtil.toList(roleId)));
}
/**
@ -215,8 +220,8 @@ public class SysRoleController {
* @date 2020/11/5 10:59
*/
@GetResource(name = "角色拥有数据", path = "/sysRole/getRoleDataScope")
public ResponseData getRoleDataScope(@Validated(SysRoleRequest.detail.class) SysRoleRequest sysRoleRequest) {
return new SuccessResponseData(sysRoleService.getRoleDataScope(sysRoleRequest));
public ResponseData<List<Long>> getRoleDataScope(@Validated(SysRoleRequest.detail.class) SysRoleRequest sysRoleRequest) {
return new SuccessResponseData<>(sysRoleService.getRoleDataScope(sysRoleRequest));
}
}

View File

@ -31,9 +31,9 @@ public class SysThemeApiController {
* @date 2022/1/10 18:29
*/
@GetResource(name = "获取当前Guns管理系统的主题数据", path = "/theme/currentThemeInfo", requiredPermission = false, requiredLogin = false)
public ResponseData currentThemeInfo(SysThemeRequest sysThemeParam) {
public ResponseData<DefaultTheme> currentThemeInfo(SysThemeRequest sysThemeParam) {
DefaultTheme defaultTheme = sysThemeService.currentThemeInfo(sysThemeParam);
return new SuccessResponseData(defaultTheme);
return new SuccessResponseData<>(defaultTheme);
}

View File

@ -1,11 +1,14 @@
package cn.stylefeng.roses.kernel.system.modular.theme.controller;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
import cn.stylefeng.roses.kernel.system.api.pojo.theme.SysThemeDTO;
import cn.stylefeng.roses.kernel.system.api.pojo.theme.SysThemeRequest;
import cn.stylefeng.roses.kernel.system.modular.theme.entity.SysTheme;
import cn.stylefeng.roses.kernel.system.modular.theme.service.SysThemeService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
@ -33,9 +36,9 @@ public class SysThemeController {
* @date 2021/12/17 16:43
*/
@PostResource(name = "增加系统主题", path = "/sysTheme/add")
public ResponseData add(@RequestBody @Validated(SysThemeRequest.add.class) SysThemeRequest sysThemeParam) {
public ResponseData<?> add(@RequestBody @Validated(SysThemeRequest.add.class) SysThemeRequest sysThemeParam) {
sysThemeService.add(sysThemeParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -45,9 +48,9 @@ public class SysThemeController {
* @date 2021/12/17 16:45
*/
@PostResource(name = "删除系统主题", path = "/sysTheme/del")
public ResponseData del(@RequestBody @Validated(SysThemeRequest.delete.class) SysThemeRequest sysThemeParam) {
public ResponseData<?> del(@RequestBody @Validated(SysThemeRequest.delete.class) SysThemeRequest sysThemeParam) {
sysThemeService.del(sysThemeParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -57,9 +60,9 @@ public class SysThemeController {
* @date 2021/12/17 16:50
*/
@PostResource(name = "修改系统主题", path = "/sysTheme/edit")
public ResponseData edit(@RequestBody @Validated(SysThemeRequest.edit.class) SysThemeRequest sysThemeParam) {
public ResponseData<?> edit(@RequestBody @Validated(SysThemeRequest.edit.class) SysThemeRequest sysThemeParam) {
sysThemeService.edit(sysThemeParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -69,8 +72,8 @@ public class SysThemeController {
* @date 2021/12/17 16:58
*/
@GetResource(name = "查询系统主题", path = "/sysTheme/findPage")
public ResponseData findPage(SysThemeRequest sysThemeParam) {
return new SuccessResponseData(sysThemeService.findPage(sysThemeParam));
public ResponseData<PageResult<SysThemeDTO>> findPage(SysThemeRequest sysThemeParam) {
return new SuccessResponseData<>(sysThemeService.findPage(sysThemeParam));
}
/**
@ -80,8 +83,8 @@ public class SysThemeController {
* @date 2021/12/17 17:04
*/
@GetResource(name = "查询系统主题详情", path = "/sysTheme/detail")
public ResponseData detail(@Validated(SysThemeRequest.updateStatus.class) SysThemeRequest sysThemeParam) {
return new SuccessResponseData(sysThemeService.detail(sysThemeParam));
public ResponseData<SysTheme> detail(@Validated(SysThemeRequest.updateStatus.class) SysThemeRequest sysThemeParam) {
return new SuccessResponseData<>(sysThemeService.detail(sysThemeParam));
}
/**
@ -91,8 +94,8 @@ public class SysThemeController {
* @date 2021/12/17 17:32
*/
@PostResource(name = "修改系统主题启用状态", path = "/sysTheme/updateStatus")
public ResponseData updateThemeStatus(@RequestBody @Validated(SysThemeRequest.updateStatus.class) SysThemeRequest sysThemeParam) {
public ResponseData<?> updateThemeStatus(@RequestBody @Validated(SysThemeRequest.updateStatus.class) SysThemeRequest sysThemeParam) {
sysThemeService.updateThemeStatus(sysThemeParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
}

View File

@ -1,17 +1,21 @@
package cn.stylefeng.roses.kernel.system.modular.theme.controller;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
import cn.stylefeng.roses.kernel.system.api.pojo.theme.SysThemeTemplateDataDTO;
import cn.stylefeng.roses.kernel.system.api.pojo.theme.SysThemeTemplateRequest;
import cn.stylefeng.roses.kernel.system.modular.theme.entity.SysThemeTemplate;
import cn.stylefeng.roses.kernel.system.modular.theme.service.SysThemeTemplateService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
*
@ -33,9 +37,9 @@ public class SysThemeTemplateController {
* @date 2021/12/17 14:16
*/
@PostResource(name = "增加系统主题模板", path = "/sysThemeTemplate/add")
public ResponseData add(@RequestBody @Validated(SysThemeTemplateRequest.add.class) SysThemeTemplateRequest sysThemeTemplateParam) {
public ResponseData<?> add(@RequestBody @Validated(SysThemeTemplateRequest.add.class) SysThemeTemplateRequest sysThemeTemplateParam) {
sysThemeTemplateService.add(sysThemeTemplateParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -45,9 +49,9 @@ public class SysThemeTemplateController {
* @date 2021/12/17 14:36
*/
@PostResource(name = "编辑系统主题模板", path = "/sysThemeTemplate/edit")
public ResponseData edit(@RequestBody @Validated(SysThemeTemplateRequest.edit.class) SysThemeTemplateRequest sysThemeTemplateParam) {
public ResponseData<?> edit(@RequestBody @Validated(SysThemeTemplateRequest.edit.class) SysThemeTemplateRequest sysThemeTemplateParam) {
sysThemeTemplateService.edit(sysThemeTemplateParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -57,9 +61,9 @@ public class SysThemeTemplateController {
* @date 2021/12/17 14:47
*/
@PostResource(name = "删除系统主题模板", path = "/sysThemeTemplate/del")
public ResponseData del(@RequestBody @Validated(SysThemeTemplateRequest.delete.class) SysThemeTemplateRequest sysThemeTemplateParam) {
public ResponseData<?> del(@RequestBody @Validated(SysThemeTemplateRequest.delete.class) SysThemeTemplateRequest sysThemeTemplateParam) {
sysThemeTemplateService.del(sysThemeTemplateParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -69,8 +73,8 @@ public class SysThemeTemplateController {
* @date 2021/12/17 15:00
*/
@GetResource(name = "查询系统主题模板", path = "/sysThemeTemplate/findPage")
public ResponseData findPage(SysThemeTemplateRequest sysThemeTemplateParam) {
return new SuccessResponseData(sysThemeTemplateService.findPage(sysThemeTemplateParam));
public ResponseData<PageResult<SysThemeTemplate>> findPage(SysThemeTemplateRequest sysThemeTemplateParam) {
return new SuccessResponseData<>(sysThemeTemplateService.findPage(sysThemeTemplateParam));
}
/**
@ -80,8 +84,8 @@ public class SysThemeTemplateController {
* @date 2021/12/29 9:12
*/
@GetResource(name = "查询系统主题模板列表", path = "/sysThemeTemplate/findList")
public ResponseData findList(SysThemeTemplateRequest sysThemeTemplateParam) {
return new SuccessResponseData(sysThemeTemplateService.findList(sysThemeTemplateParam));
public ResponseData<List<SysThemeTemplate>> findList(SysThemeTemplateRequest sysThemeTemplateParam) {
return new SuccessResponseData<>(sysThemeTemplateService.findList(sysThemeTemplateParam));
}
/**
@ -91,9 +95,9 @@ public class SysThemeTemplateController {
* @date 2021/12/17 15:09
*/
@PostResource(name = "修改系统主题模板状态", path = "/sysThemeTemplate/updateStatus")
public ResponseData updateTemplateStatus(@RequestBody @Validated(SysThemeTemplateRequest.updateStatus.class) SysThemeTemplateRequest sysThemeTemplateParam) {
public ResponseData<?> updateTemplateStatus(@RequestBody @Validated(SysThemeTemplateRequest.updateStatus.class) SysThemeTemplateRequest sysThemeTemplateParam) {
sysThemeTemplateService.updateTemplateStatus(sysThemeTemplateParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -103,7 +107,7 @@ public class SysThemeTemplateController {
* @date 2021/12/17 16:09
*/
@GetResource(name = "查询系统主题模板详情", path = "/sysThemeTemplate/detail")
public ResponseData detail(SysThemeTemplateRequest sysThemeTemplateParam) {
return new SuccessResponseData(sysThemeTemplateService.detail(sysThemeTemplateParam));
public ResponseData<List<SysThemeTemplateDataDTO>> detail(SysThemeTemplateRequest sysThemeTemplateParam) {
return new SuccessResponseData<>(sysThemeTemplateService.detail(sysThemeTemplateParam));
}
}

View File

@ -1,17 +1,20 @@
package cn.stylefeng.roses.kernel.system.modular.theme.controller;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
import cn.stylefeng.roses.kernel.system.api.pojo.theme.SysThemeTemplateFieldRequest;
import cn.stylefeng.roses.kernel.system.modular.theme.entity.SysThemeTemplateField;
import cn.stylefeng.roses.kernel.system.modular.theme.service.SysThemeTemplateFieldService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
*
@ -33,9 +36,9 @@ public class SysThemeTemplateFieldController {
* @date 2021/12/17 11:22
*/
@PostResource(name = "增加系统主题模板属性", path = "/sysThemeTemplateField/add")
public ResponseData add(@RequestBody @Validated(SysThemeTemplateFieldRequest.add.class) SysThemeTemplateFieldRequest sysThemeTemplateFieldParam) {
public ResponseData<?> add(@RequestBody @Validated(SysThemeTemplateFieldRequest.add.class) SysThemeTemplateFieldRequest sysThemeTemplateFieldParam) {
sysThemeTemplateFieldService.add(sysThemeTemplateFieldParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -45,9 +48,9 @@ public class SysThemeTemplateFieldController {
* @date 2021/12/17 11:25
*/
@PostResource(name = "删除系统主题模板属性", path = "/sysThemeTemplateField/del")
public ResponseData del(@RequestBody @Validated(SysThemeTemplateFieldRequest.delete.class) SysThemeTemplateFieldRequest sysThemeTemplateFieldParam) {
public ResponseData<?> del(@RequestBody @Validated(SysThemeTemplateFieldRequest.delete.class) SysThemeTemplateFieldRequest sysThemeTemplateFieldParam) {
sysThemeTemplateFieldService.del(sysThemeTemplateFieldParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -57,9 +60,9 @@ public class SysThemeTemplateFieldController {
* @date 2021/12/17 11:38
*/
@PostResource(name = "修改系统模板属性", path = "/sysThemeTemplateField/edit")
public ResponseData edit(@RequestBody @Validated(SysThemeTemplateFieldRequest.edit.class) SysThemeTemplateFieldRequest sysThemeTemplateFieldParam) {
public ResponseData<?> edit(@RequestBody @Validated(SysThemeTemplateFieldRequest.edit.class) SysThemeTemplateFieldRequest sysThemeTemplateFieldParam) {
sysThemeTemplateFieldService.edit(sysThemeTemplateFieldParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -69,8 +72,8 @@ public class SysThemeTemplateFieldController {
* @date 2021/12/17 11:49
*/
@GetResource(name = "查询系统主题模板属性详情", path = "/sysThemeTemplateField/detail")
public ResponseData detail(@Validated(SysThemeTemplateFieldRequest.detail.class) SysThemeTemplateFieldRequest sysThemeTemplateFieldParam) {
return new SuccessResponseData(sysThemeTemplateFieldService.detail(sysThemeTemplateFieldParam));
public ResponseData<SysThemeTemplateField> detail(@Validated(SysThemeTemplateFieldRequest.detail.class) SysThemeTemplateFieldRequest sysThemeTemplateFieldParam) {
return new SuccessResponseData<>(sysThemeTemplateFieldService.detail(sysThemeTemplateFieldParam));
}
/**
@ -80,8 +83,8 @@ public class SysThemeTemplateFieldController {
* @date 2021/12/24 9:47
*/
@GetResource(name = "查询系统主题模板属性列表", path = "/sysThemeTemplateField/findPage")
public ResponseData findPage(SysThemeTemplateFieldRequest sysThemeTemplateFieldParam) {
return new SuccessResponseData(sysThemeTemplateFieldService.findPage(sysThemeTemplateFieldParam));
public ResponseData<PageResult<SysThemeTemplateField>> findPage(SysThemeTemplateFieldRequest sysThemeTemplateFieldParam) {
return new SuccessResponseData<>(sysThemeTemplateFieldService.findPage(sysThemeTemplateFieldParam));
}
/**
@ -91,8 +94,8 @@ public class SysThemeTemplateFieldController {
* @date 2021/12/24 14:42
*/
@GetResource(name = "查询系统主题模板属性已有关系列表", path = "/sysThemeTemplateField/findRelList")
public ResponseData findRelPage(SysThemeTemplateFieldRequest sysThemeTemplateFieldParam) {
return new SuccessResponseData(sysThemeTemplateFieldService.findRelList(sysThemeTemplateFieldParam));
public ResponseData<List<SysThemeTemplateField>> findRelPage(SysThemeTemplateFieldRequest sysThemeTemplateFieldParam) {
return new SuccessResponseData<>(sysThemeTemplateFieldService.findRelList(sysThemeTemplateFieldParam));
}
/**
@ -102,7 +105,7 @@ public class SysThemeTemplateFieldController {
* @date 2021/12/24 14:44
*/
@GetResource(name = "查询系统主题模板属性未有关系列表", path = "/sysThemeTemplateField/findNotRelList")
public ResponseData findNotRelPage(SysThemeTemplateFieldRequest sysThemeTemplateFieldParam) {
return new SuccessResponseData(sysThemeTemplateFieldService.findNotRelList(sysThemeTemplateFieldParam));
public ResponseData<List<SysThemeTemplateField>> findNotRelPage(SysThemeTemplateFieldRequest sysThemeTemplateFieldParam) {
return new SuccessResponseData<>(sysThemeTemplateFieldService.findNotRelList(sysThemeTemplateFieldParam));
}
}

View File

@ -32,9 +32,9 @@ public class SysThemeTemplateRelController {
* @date 2021/12/24 11:17
*/
@PostResource(name = "增加系统主题模板属性关系", path = "/sysThemeTemplateRel/add")
public ResponseData add(@RequestBody @Validated(SysThemeTemplateRelRequest.add.class) SysThemeTemplateRelRequest sysThemeTemplateParam) {
public ResponseData<?> add(@RequestBody @Validated(SysThemeTemplateRelRequest.add.class) SysThemeTemplateRelRequest sysThemeTemplateParam) {
sysThemeTemplateRelService.add(sysThemeTemplateParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
/**
@ -44,8 +44,8 @@ public class SysThemeTemplateRelController {
* @date 2021/12/24 11:23
*/
@PostResource(name = "删除系统主题模板属性关系", path = "/sysThemeTemplateRel/del")
public ResponseData del(@RequestBody SysThemeTemplateRelRequest sysThemeTemplateRelParam) {
public ResponseData<?> del(@RequestBody SysThemeTemplateRelRequest sysThemeTemplateRelParam) {
sysThemeTemplateRelService.del(sysThemeTemplateRelParam);
return new SuccessResponseData();
return new SuccessResponseData<>();
}
}