mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-10 19:00:53 +08:00
chore: continew-starter 2.7.2 => 2.7.3
1.CrudApi GET => DETAIL(支持详情权限) 2.适配 CharConstants 3.适配 EnumValue 校验器
This commit is contained in:
@@ -48,6 +48,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import top.continew.admin.common.config.properties.CaptchaProperties;
|
||||
import top.continew.admin.common.constant.CacheConstants;
|
||||
import top.continew.admin.auth.model.resp.CaptchaResp;
|
||||
import top.continew.admin.system.enums.OptionCategoryEnum;
|
||||
import top.continew.admin.system.service.OptionService;
|
||||
import top.continew.starter.cache.redisson.util.RedisUtils;
|
||||
import top.continew.starter.captcha.graphic.core.GraphicCaptchaService;
|
||||
@@ -151,7 +152,7 @@ public class CaptchaController {
|
||||
String captcha = RandomUtil.randomNumbers(captchaMail.getLength());
|
||||
// 发送验证码
|
||||
Long expirationInMinutes = captchaMail.getExpirationInMinutes();
|
||||
Map<String, String> siteConfig = optionService.getByCategory("SITE");
|
||||
Map<String, String> siteConfig = optionService.getByCategory(OptionCategoryEnum.SITE);
|
||||
String content = TemplateUtils.render(captchaMail.getTemplatePath(), Dict.create()
|
||||
.set("siteUrl", projectProperties.getUrl())
|
||||
.set("siteTitle", siteConfig.get("SITE_TITLE"))
|
||||
|
@@ -109,7 +109,7 @@ public class CommonController {
|
||||
@Cached(key = "'SITE'", name = CacheConstants.OPTION_KEY_PREFIX)
|
||||
public List<LabelValueResp<String>> listSiteOptionDict() {
|
||||
OptionQuery optionQuery = new OptionQuery();
|
||||
optionQuery.setCategory(OptionCategoryEnum.SITE);
|
||||
optionQuery.setCategory(OptionCategoryEnum.SITE.name());
|
||||
return optionService.list(optionQuery)
|
||||
.stream()
|
||||
.map(option -> new LabelValueResp<>(option.getCode(), StrUtil.nullToDefault(option.getValue(), option
|
||||
|
@@ -46,7 +46,7 @@ import top.continew.starter.extension.crud.model.resp.BaseIdResp;
|
||||
@Tag(name = "应用管理 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@CrudRequestMapping(value = "/open/app", api = {Api.PAGE, Api.GET, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT})
|
||||
@CrudRequestMapping(value = "/open/app", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT})
|
||||
public class AppController extends BaseController<AppService, AppResp, AppDetailResp, AppQuery, AppReq> {
|
||||
|
||||
private final AppService appService;
|
||||
|
@@ -34,6 +34,6 @@ import top.continew.starter.extension.crud.enums.Api;
|
||||
*/
|
||||
@Tag(name = "部门管理 API")
|
||||
@RestController
|
||||
@CrudRequestMapping(value = "/system/dept", api = {Api.TREE, Api.GET, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT})
|
||||
@CrudRequestMapping(value = "/system/dept", api = {Api.TREE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE, Api.EXPORT})
|
||||
public class DeptController extends BaseController<DeptService, DeptResp, DeptResp, DeptQuery, DeptReq> {
|
||||
}
|
||||
|
@@ -34,6 +34,6 @@ import top.continew.starter.extension.crud.enums.Api;
|
||||
*/
|
||||
@Tag(name = "字典管理 API")
|
||||
@RestController
|
||||
@CrudRequestMapping(value = "/system/dict", api = {Api.LIST, Api.GET, Api.ADD, Api.UPDATE, Api.DELETE})
|
||||
@CrudRequestMapping(value = "/system/dict", api = {Api.LIST, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE})
|
||||
public class DictController extends BaseController<DictService, DictResp, DictResp, DictQuery, DictReq> {
|
||||
}
|
@@ -36,6 +36,6 @@ import top.continew.starter.log.core.annotation.Log;
|
||||
@Log(module = "字典管理")
|
||||
@Tag(name = "字典项管理 API")
|
||||
@RestController
|
||||
@CrudRequestMapping(value = "/system/dict/item", api = {Api.PAGE, Api.GET, Api.ADD, Api.UPDATE, Api.DELETE})
|
||||
@CrudRequestMapping(value = "/system/dict/item", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE})
|
||||
public class DictItemController extends BaseController<DictItemService, DictItemResp, DictItemResp, DictItemQuery, DictItemReq> {
|
||||
}
|
@@ -44,7 +44,7 @@ import top.continew.starter.extension.crud.util.ValidateGroup;
|
||||
*/
|
||||
@Tag(name = "菜单管理 API")
|
||||
@RestController
|
||||
@CrudRequestMapping(value = "/system/menu", api = {Api.TREE, Api.GET, Api.ADD, Api.UPDATE, Api.DELETE})
|
||||
@CrudRequestMapping(value = "/system/menu", api = {Api.TREE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE})
|
||||
public class MenuController extends BaseController<MenuService, MenuResp, MenuResp, MenuQuery, MenuReq> {
|
||||
|
||||
@Override
|
||||
|
@@ -44,7 +44,7 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
@Tag(name = "公告管理 API")
|
||||
@RestController
|
||||
@CrudRequestMapping(value = "/system/notice", api = {Api.PAGE, Api.GET, Api.ADD, Api.UPDATE, Api.DELETE})
|
||||
@CrudRequestMapping(value = "/system/notice", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE})
|
||||
public class NoticeController extends BaseController<NoticeService, NoticeResp, NoticeDetailResp, NoticeQuery, NoticeReq> {
|
||||
|
||||
@Override
|
||||
|
@@ -49,7 +49,7 @@ import java.util.List;
|
||||
@Validated
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@CrudRequestMapping(value = "/system/role", api = {Api.PAGE, Api.GET, Api.ADD, Api.UPDATE, Api.DELETE})
|
||||
@CrudRequestMapping(value = "/system/role", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE})
|
||||
public class RoleController extends BaseController<RoleService, RoleResp, RoleDetailResp, RoleQuery, RoleReq> {
|
||||
|
||||
private final UserRoleService userRoleService;
|
||||
|
@@ -34,6 +34,6 @@ import top.continew.starter.extension.crud.enums.Api;
|
||||
*/
|
||||
@Tag(name = "存储管理 API")
|
||||
@RestController
|
||||
@CrudRequestMapping(value = "/system/storage", api = {Api.PAGE, Api.GET, Api.ADD, Api.UPDATE, Api.DELETE})
|
||||
@CrudRequestMapping(value = "/system/storage", api = {Api.PAGE, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE})
|
||||
public class StorageController extends BaseController<StorageService, StorageResp, StorageResp, StorageQuery, StorageReq> {
|
||||
}
|
@@ -61,7 +61,7 @@ import java.io.IOException;
|
||||
@Validated
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@CrudRequestMapping(value = "/system/user", api = {Api.PAGE, Api.LIST, Api.GET, Api.ADD, Api.UPDATE, Api.DELETE,
|
||||
@CrudRequestMapping(value = "/system/user", api = {Api.PAGE, Api.LIST, Api.DETAIL, Api.ADD, Api.UPDATE, Api.DELETE,
|
||||
Api.EXPORT})
|
||||
public class UserController extends BaseController<UserService, UserResp, UserDetailResp, UserQuery, UserReq> {
|
||||
|
||||
|
@@ -5,5 +5,5 @@
|
||||
\____|\___/ |_| |_| \__||_||_| \_| \___| \_/\_/ /_/ \_\\__,_||_| |_| |_||_||_| |_|
|
||||
|
||||
:: ${project.name} :: v${project.version}
|
||||
:: ContiNew Starter :: v2.7.2
|
||||
:: ContiNew Starter :: v2.7.3
|
||||
:: Spring Boot :: v${spring-boot.version}
|
||||
|
Reference in New Issue
Block a user