diff --git a/common/common-generator/src/main/java/cn/bunny/common/generator/generator/WebGeneratorCode.java b/common/common-generator/src/main/java/cn/bunny/common/generator/generator/WebGeneratorCode.java index 851bbbc..f438bfd 100644 --- a/common/common-generator/src/main/java/cn/bunny/common/generator/generator/WebGeneratorCode.java +++ b/common/common-generator/src/main/java/cn/bunny/common/generator/generator/WebGeneratorCode.java @@ -3,11 +3,11 @@ package cn.bunny.common.generator.generator; import cn.bunny.common.generator.entity.BaseField; import cn.bunny.common.generator.entity.BaseResultMap; import cn.bunny.common.generator.utils.GeneratorCodeUtils; -import cn.bunny.dao.dto.schedulers.SchedulersGroupAddDto; -import cn.bunny.dao.dto.schedulers.SchedulersGroupDto; -import cn.bunny.dao.dto.schedulers.SchedulersGroupUpdateDto; -import cn.bunny.dao.entity.schedulers.SchedulersGroup; -import cn.bunny.dao.vo.schedulers.SchedulersGroupVo; +import cn.bunny.dao.dto.quartz.SchedulersGroupAddDto; +import cn.bunny.dao.dto.quartz.SchedulersGroupDto; +import cn.bunny.dao.dto.quartz.SchedulersGroupUpdateDto; +import cn.bunny.dao.entity.quartz.SchedulersGroup; +import cn.bunny.dao.vo.quartz.SchedulersGroupVo; import com.baomidou.mybatisplus.annotation.TableName; import com.google.common.base.CaseFormat; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/common/service-utils/src/main/java/cn/bunny/common/service/config/RedisConfiguration.java b/common/service-utils/src/main/java/cn/bunny/common/service/config/RedisConfiguration.java index 0c67fee..be3f46b 100644 --- a/common/service-utils/src/main/java/cn/bunny/common/service/config/RedisConfiguration.java +++ b/common/service-utils/src/main/java/cn/bunny/common/service/config/RedisConfiguration.java @@ -57,7 +57,8 @@ public class RedisConfiguration { } /** - * * 配置Redis过期时间30天 + * * 配置Redis过期时间 + * 一个月 * 解决cache(@Cacheable)把数据缓存到redis中的value是乱码问题 */ @Bean @@ -74,19 +75,20 @@ public class RedisConfiguration { } /** - * * 配置redis过期时间3分钟 + * * 配置redis过期时间 + * 半个月 * * @param factory * @return */ @Bean @SuppressWarnings("all") - public CacheManager cacheManagerWithMinutes(RedisConnectionFactory factory) { + public CacheManager cacheManagerWithHalfOfMouth(RedisConnectionFactory factory) { // 配置序列化 RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig() .serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(new StringRedisSerializer())) .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(jsonRedisSerializer())) - .entryTtl(Duration.ofMinutes(3)); + .entryTtl(Duration.ofDays(15)); return RedisCacheManager.builder(factory).cacheDefaults(config).build(); } @@ -113,18 +115,23 @@ public class RedisConfiguration { * 指定的日期模式 */ public Jackson2JsonRedisSerializer jsonRedisSerializer() { - ObjectMapper mapper = new ObjectMapper(); - // 设置ObjectMapper访问权限 - mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); - // 记录序列化之后的数据类型,方便反序列化 - mapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.NON_FINAL); // LocalDatetime序列化,默认不兼容jdk8日期序列化 JavaTimeModule timeModule = new JavaTimeModule(); timeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); timeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); - timeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); timeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); + + // 对象序列化 + ObjectMapper mapper = new ObjectMapper(); + + // 设置ObjectMapper访问权限 + mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); + + // 记录序列化之后的数据类型,方便反序列化 + // mapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.NON_FINAL); + mapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.EVERYTHING); + // 关闭默认的日期格式化方式,默认UTC日期格式 yyyy-MM-dd’T’HH:mm:ss.SSS mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.registerModule(timeModule); diff --git a/dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersAddDto.java b/dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersAddDto.java similarity index 97% rename from dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersAddDto.java rename to dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersAddDto.java index b603013..cebc4c7 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersAddDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersAddDto.java @@ -1,4 +1,4 @@ -package cn.bunny.dao.dto.schedulers; +package cn.bunny.dao.dto.quartz; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersDto.java b/dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersDto.java similarity index 96% rename from dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersDto.java rename to dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersDto.java index 9cf1439..b49cfcd 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersDto.java @@ -1,4 +1,4 @@ -package cn.bunny.dao.dto.schedulers; +package cn.bunny.dao.dto.quartz; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; diff --git a/dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersGroupAddDto.java b/dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersGroupAddDto.java similarity index 95% rename from dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersGroupAddDto.java rename to dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersGroupAddDto.java index f035be4..218f971 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersGroupAddDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersGroupAddDto.java @@ -1,4 +1,4 @@ -package cn.bunny.dao.dto.schedulers; +package cn.bunny.dao.dto.quartz; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersGroupDto.java b/dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersGroupDto.java similarity index 93% rename from dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersGroupDto.java rename to dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersGroupDto.java index 2d8ef04..fd1e00a 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersGroupDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersGroupDto.java @@ -1,4 +1,4 @@ -package cn.bunny.dao.dto.schedulers; +package cn.bunny.dao.dto.quartz; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersGroupUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersGroupUpdateDto.java similarity index 95% rename from dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersGroupUpdateDto.java rename to dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersGroupUpdateDto.java index b0b5894..f858d12 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersGroupUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersGroupUpdateDto.java @@ -1,4 +1,4 @@ -package cn.bunny.dao.dto.schedulers; +package cn.bunny.dao.dto.quartz; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersOperationDto.java b/dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersOperationDto.java similarity index 95% rename from dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersOperationDto.java rename to dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersOperationDto.java index 94a05b9..9801d7b 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersOperationDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersOperationDto.java @@ -1,4 +1,4 @@ -package cn.bunny.dao.dto.schedulers; +package cn.bunny.dao.dto.quartz; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersUpdateDto.java b/dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersUpdateDto.java similarity index 97% rename from dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersUpdateDto.java rename to dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersUpdateDto.java index e369652..fdcb211 100644 --- a/dao/src/main/java/cn/bunny/dao/dto/schedulers/SchedulersUpdateDto.java +++ b/dao/src/main/java/cn/bunny/dao/dto/quartz/SchedulersUpdateDto.java @@ -1,4 +1,4 @@ -package cn.bunny.dao.dto.schedulers; +package cn.bunny.dao.dto.quartz; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; diff --git a/dao/src/main/java/cn/bunny/dao/entity/schedulers/Schedulers.java b/dao/src/main/java/cn/bunny/dao/entity/quartz/Schedulers.java similarity index 93% rename from dao/src/main/java/cn/bunny/dao/entity/schedulers/Schedulers.java rename to dao/src/main/java/cn/bunny/dao/entity/quartz/Schedulers.java index ae02755..994d4e2 100644 --- a/dao/src/main/java/cn/bunny/dao/entity/schedulers/Schedulers.java +++ b/dao/src/main/java/cn/bunny/dao/entity/quartz/Schedulers.java @@ -1,4 +1,4 @@ -package cn.bunny.dao.entity.schedulers; +package cn.bunny.dao.entity.quartz; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.v3.oas.annotations.media.Schema; @@ -19,7 +19,7 @@ import java.io.Serializable; @Getter @Setter @Accessors(chain = true) -@TableName("qrtz_view_schedulers") +@TableName("view_qrtz_schedulers") @Schema(name = "Schedulers对象", title = "Schedulers视图", description = "Schedulers视图") public class Schedulers implements Serializable { diff --git a/dao/src/main/java/cn/bunny/dao/entity/schedulers/SchedulersGroup.java b/dao/src/main/java/cn/bunny/dao/entity/quartz/SchedulersGroup.java similarity index 90% rename from dao/src/main/java/cn/bunny/dao/entity/schedulers/SchedulersGroup.java rename to dao/src/main/java/cn/bunny/dao/entity/quartz/SchedulersGroup.java index b8e5eeb..49fb7e8 100644 --- a/dao/src/main/java/cn/bunny/dao/entity/schedulers/SchedulersGroup.java +++ b/dao/src/main/java/cn/bunny/dao/entity/quartz/SchedulersGroup.java @@ -1,4 +1,4 @@ -package cn.bunny.dao.entity.schedulers; +package cn.bunny.dao.entity.quartz; import cn.bunny.dao.entity.BaseEntity; import com.baomidou.mybatisplus.annotation.TableName; @@ -18,7 +18,7 @@ import lombok.experimental.Accessors; @Getter @Setter @Accessors(chain = true) -@TableName("sys_schedulers_group") +@TableName("qrtz_schedulers_group") @Schema(name = "SchedulersGroup对象", title = "任务调度分组", description = "任务调度分组") public class SchedulersGroup extends BaseEntity { diff --git a/dao/src/main/java/cn/bunny/dao/vo/schedulers/SchedulersGroupVo.java b/dao/src/main/java/cn/bunny/dao/vo/quartz/SchedulersGroupVo.java similarity index 93% rename from dao/src/main/java/cn/bunny/dao/vo/schedulers/SchedulersGroupVo.java rename to dao/src/main/java/cn/bunny/dao/vo/quartz/SchedulersGroupVo.java index 8572b7d..abd74a7 100644 --- a/dao/src/main/java/cn/bunny/dao/vo/schedulers/SchedulersGroupVo.java +++ b/dao/src/main/java/cn/bunny/dao/vo/quartz/SchedulersGroupVo.java @@ -1,4 +1,4 @@ -package cn.bunny.dao.vo.schedulers; +package cn.bunny.dao.vo.quartz; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; diff --git a/dao/src/main/java/cn/bunny/dao/vo/schedulers/SchedulersVo.java b/dao/src/main/java/cn/bunny/dao/vo/quartz/SchedulersVo.java similarity index 96% rename from dao/src/main/java/cn/bunny/dao/vo/schedulers/SchedulersVo.java rename to dao/src/main/java/cn/bunny/dao/vo/quartz/SchedulersVo.java index 27364f4..6110b36 100644 --- a/dao/src/main/java/cn/bunny/dao/vo/schedulers/SchedulersVo.java +++ b/dao/src/main/java/cn/bunny/dao/vo/quartz/SchedulersVo.java @@ -1,4 +1,4 @@ -package cn.bunny.dao.vo.schedulers; +package cn.bunny.dao.vo.quartz; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; diff --git a/service/src/main/java/cn/bunny/services/controller/RoleController.java b/service/src/main/java/cn/bunny/services/controller/RoleController.java index 2ad3123..4a8ac2c 100644 --- a/service/src/main/java/cn/bunny/services/controller/RoleController.java +++ b/service/src/main/java/cn/bunny/services/controller/RoleController.java @@ -49,6 +49,13 @@ public class RoleController { return Mono.just(Result.success(pageResult)); } + @Operation(summary = "获取所有角色", description = "获取所有角色") + @GetMapping("getAllRoles") + public Mono>> getAllRoles() { + List roleVoList = roleService.getAllRoles(); + return Mono.just(Result.success(roleVoList)); + } + @Operation(summary = "添加角色", description = "添加角色") @PostMapping("addRole") public Mono> addRole(@Valid @RequestBody RoleAddDto dto) { @@ -69,11 +76,4 @@ public class RoleController { roleService.deleteRole(ids); return Mono.just(Result.success(ResultCodeEnum.DELETE_SUCCESS)); } - - @Operation(summary = "获取所有角色", description = "获取所有角色") - @GetMapping("getAllRoles") - public Mono>> getAllRoles() { - List roleVoList = roleService.getAllRoles(); - return Mono.just(Result.success(roleVoList)); - } } diff --git a/service/src/main/java/cn/bunny/services/controller/SchedulersController.java b/service/src/main/java/cn/bunny/services/controller/SchedulersController.java index f08bcfa..a9fc1cb 100644 --- a/service/src/main/java/cn/bunny/services/controller/SchedulersController.java +++ b/service/src/main/java/cn/bunny/services/controller/SchedulersController.java @@ -1,13 +1,13 @@ package cn.bunny.services.controller; -import cn.bunny.dao.dto.schedulers.SchedulersAddDto; -import cn.bunny.dao.dto.schedulers.SchedulersDto; -import cn.bunny.dao.dto.schedulers.SchedulersOperationDto; -import cn.bunny.dao.entity.schedulers.Schedulers; +import cn.bunny.dao.dto.quartz.SchedulersAddDto; +import cn.bunny.dao.dto.quartz.SchedulersDto; +import cn.bunny.dao.dto.quartz.SchedulersOperationDto; +import cn.bunny.dao.entity.quartz.Schedulers; import cn.bunny.dao.pojo.result.PageResult; import cn.bunny.dao.pojo.result.Result; import cn.bunny.dao.pojo.result.ResultCodeEnum; -import cn.bunny.dao.vo.schedulers.SchedulersVo; +import cn.bunny.dao.vo.quartz.SchedulersVo; import cn.bunny.services.service.SchedulersService; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.v3.oas.annotations.Operation; diff --git a/service/src/main/java/cn/bunny/services/controller/SchedulersGroupController.java b/service/src/main/java/cn/bunny/services/controller/SchedulersGroupController.java index 74080f1..774372b 100644 --- a/service/src/main/java/cn/bunny/services/controller/SchedulersGroupController.java +++ b/service/src/main/java/cn/bunny/services/controller/SchedulersGroupController.java @@ -1,13 +1,13 @@ package cn.bunny.services.controller; -import cn.bunny.dao.dto.schedulers.SchedulersGroupAddDto; -import cn.bunny.dao.dto.schedulers.SchedulersGroupDto; -import cn.bunny.dao.dto.schedulers.SchedulersGroupUpdateDto; -import cn.bunny.dao.entity.schedulers.SchedulersGroup; +import cn.bunny.dao.dto.quartz.SchedulersGroupAddDto; +import cn.bunny.dao.dto.quartz.SchedulersGroupDto; +import cn.bunny.dao.dto.quartz.SchedulersGroupUpdateDto; +import cn.bunny.dao.entity.quartz.SchedulersGroup; import cn.bunny.dao.pojo.result.PageResult; import cn.bunny.dao.pojo.result.Result; import cn.bunny.dao.pojo.result.ResultCodeEnum; -import cn.bunny.dao.vo.schedulers.SchedulersGroupVo; +import cn.bunny.dao.vo.quartz.SchedulersGroupVo; import cn.bunny.services.service.SchedulersGroupService; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.v3.oas.annotations.Operation; diff --git a/service/src/main/java/cn/bunny/services/mapper/SchedulersGroupMapper.java b/service/src/main/java/cn/bunny/services/mapper/SchedulersGroupMapper.java index 5b414d4..cadfbb2 100644 --- a/service/src/main/java/cn/bunny/services/mapper/SchedulersGroupMapper.java +++ b/service/src/main/java/cn/bunny/services/mapper/SchedulersGroupMapper.java @@ -1,7 +1,7 @@ package cn.bunny.services.mapper; -import cn.bunny.dao.dto.schedulers.SchedulersGroupDto; -import cn.bunny.dao.entity.schedulers.SchedulersGroup; +import cn.bunny.dao.dto.quartz.SchedulersGroupDto; +import cn.bunny.dao.entity.quartz.SchedulersGroup; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; diff --git a/service/src/main/java/cn/bunny/services/mapper/SchedulersMapper.java b/service/src/main/java/cn/bunny/services/mapper/SchedulersMapper.java index 664b5e7..b637679 100644 --- a/service/src/main/java/cn/bunny/services/mapper/SchedulersMapper.java +++ b/service/src/main/java/cn/bunny/services/mapper/SchedulersMapper.java @@ -1,7 +1,7 @@ package cn.bunny.services.mapper; -import cn.bunny.dao.dto.schedulers.SchedulersDto; -import cn.bunny.dao.entity.schedulers.Schedulers; +import cn.bunny.dao.dto.quartz.SchedulersDto; +import cn.bunny.dao.entity.quartz.Schedulers; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; diff --git a/service/src/main/java/cn/bunny/services/service/SchedulersGroupService.java b/service/src/main/java/cn/bunny/services/service/SchedulersGroupService.java index 40eb209..380a05f 100644 --- a/service/src/main/java/cn/bunny/services/service/SchedulersGroupService.java +++ b/service/src/main/java/cn/bunny/services/service/SchedulersGroupService.java @@ -1,11 +1,11 @@ package cn.bunny.services.service; -import cn.bunny.dao.dto.schedulers.SchedulersGroupAddDto; -import cn.bunny.dao.dto.schedulers.SchedulersGroupDto; -import cn.bunny.dao.dto.schedulers.SchedulersGroupUpdateDto; -import cn.bunny.dao.entity.schedulers.SchedulersGroup; +import cn.bunny.dao.dto.quartz.SchedulersGroupAddDto; +import cn.bunny.dao.dto.quartz.SchedulersGroupDto; +import cn.bunny.dao.dto.quartz.SchedulersGroupUpdateDto; +import cn.bunny.dao.entity.quartz.SchedulersGroup; import cn.bunny.dao.pojo.result.PageResult; -import cn.bunny.dao.vo.schedulers.SchedulersGroupVo; +import cn.bunny.dao.vo.quartz.SchedulersGroupVo; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import jakarta.validation.Valid; diff --git a/service/src/main/java/cn/bunny/services/service/SchedulersService.java b/service/src/main/java/cn/bunny/services/service/SchedulersService.java index 0a6cde5..c90ffb9 100644 --- a/service/src/main/java/cn/bunny/services/service/SchedulersService.java +++ b/service/src/main/java/cn/bunny/services/service/SchedulersService.java @@ -1,11 +1,11 @@ package cn.bunny.services.service; -import cn.bunny.dao.dto.schedulers.SchedulersAddDto; -import cn.bunny.dao.dto.schedulers.SchedulersDto; -import cn.bunny.dao.dto.schedulers.SchedulersOperationDto; -import cn.bunny.dao.entity.schedulers.Schedulers; +import cn.bunny.dao.dto.quartz.SchedulersAddDto; +import cn.bunny.dao.dto.quartz.SchedulersDto; +import cn.bunny.dao.dto.quartz.SchedulersOperationDto; +import cn.bunny.dao.entity.quartz.Schedulers; import cn.bunny.dao.pojo.result.PageResult; -import cn.bunny.dao.vo.schedulers.SchedulersVo; +import cn.bunny.dao.vo.quartz.SchedulersVo; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import jakarta.validation.Valid; diff --git a/service/src/main/java/cn/bunny/services/service/impl/DeptServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/DeptServiceImpl.java index a580bb2..b2283d9 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/DeptServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/DeptServiceImpl.java @@ -16,6 +16,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -68,12 +70,28 @@ public class DeptServiceImpl extends ServiceImpl implements De .build(); } + /** + * * 获取所有部门 + * + * @return 所有部门列表 + */ + @Override + @Cacheable(cacheNames = "dept", key = "'allDept'", cacheManager = "cacheManagerWithMouth") + public List getAllDeptList() { + return list().stream().map(dept -> { + DeptVo deptVo = new DeptVo(); + BeanUtils.copyProperties(dept, deptVo); + return deptVo; + }).toList(); + } + /** * 添加部门 * * @param dto 部门添加 */ @Override + @CacheEvict(cacheNames = "dept", key = "'allDept'", beforeInvocation = true) public void addDept(DeptAddDto dto) { // 整理管理者人员 String mangerList = dto.getManager().stream().map(String::trim).collect(Collectors.joining(",")); @@ -92,6 +110,7 @@ public class DeptServiceImpl extends ServiceImpl implements De * @param dto 部门更新 */ @Override + @CacheEvict(cacheNames = "dept", key = "'allDept'", beforeInvocation = true) public void updateDept(DeptUpdateDto dto) { // 判断所更新的部门是否存在 String mangerList = dto.getManager().stream().map(String::trim).collect(Collectors.joining(",")); @@ -111,6 +130,7 @@ public class DeptServiceImpl extends ServiceImpl implements De * @param ids 删除id列表 */ @Override + @CacheEvict(cacheNames = "dept", key = "'allDept'", beforeInvocation = true) public void deleteDept(List ids) { // 判断数据请求是否为空 if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); @@ -122,17 +142,4 @@ public class DeptServiceImpl extends ServiceImpl implements De userDeptMapper.deleteBatchIdsByDeptIdWithPhysics(ids); } - /** - * * 获取所有部门 - * - * @return 所有部门列表 - */ - @Override - public List getAllDeptList() { - return list().stream().map(dept -> { - DeptVo deptVo = new DeptVo(); - BeanUtils.copyProperties(dept, deptVo); - return deptVo; - }).toList(); - } } diff --git a/service/src/main/java/cn/bunny/services/service/impl/I18nServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/I18nServiceImpl.java index d34eaf8..6595187 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/I18nServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/I18nServiceImpl.java @@ -19,6 +19,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import jakarta.validation.Valid; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -49,6 +51,7 @@ public class I18nServiceImpl extends ServiceImpl implements I1 * @return 多语言返回内容 */ @Override + @Cacheable(cacheNames = "i18n", key = "'i18n'", cacheManager = "cacheManagerWithMouth") public HashMap getI18n() { // 查找默认语言内容 I18nType i18nType = i18nTypeMapper.selectOne(Wrappers.lambdaQuery().eq(I18nType::getIsDefault, true)); @@ -94,6 +97,7 @@ public class I18nServiceImpl extends ServiceImpl implements I1 * @param dto 添加表单 */ @Override + @CacheEvict(cacheNames = "i18n", key = "'i18n'", beforeInvocation = true) public void addI18n(@Valid I18nAddDto dto) { String keyName = dto.getKeyName(); String typeName = dto.getTypeName(); @@ -114,6 +118,7 @@ public class I18nServiceImpl extends ServiceImpl implements I1 * @param dto 更新表单 */ @Override + @CacheEvict(cacheNames = "i18n", key = "'i18n'", beforeInvocation = true) public void updateI18n(@Valid I18nUpdateDto dto) { Long id = dto.getId(); @@ -133,10 +138,11 @@ public class I18nServiceImpl extends ServiceImpl implements I1 * @param ids 删除id列表 */ @Override + @CacheEvict(cacheNames = "i18n", key = "'i18n'", beforeInvocation = true) public void deleteI18n(List ids) { // 判断数据请求是否为空 if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); - + baseMapper.deleteBatchIdsWithPhysics(ids); } } diff --git a/service/src/main/java/cn/bunny/services/service/impl/I18nTypeServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/I18nTypeServiceImpl.java index cb94e0c..42d850b 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/I18nTypeServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/I18nTypeServiceImpl.java @@ -11,6 +11,8 @@ import cn.bunny.services.service.I18nTypeService; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.BeanUtils; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -34,6 +36,7 @@ public class I18nTypeServiceImpl extends ServiceImpl i * @return 多语言类型列表 */ @Override + @Cacheable(cacheNames = "i18n", key = "'i18nType'", cacheManager = "cacheManagerWithMouth") public List getI18nTypeList() { return list().stream().map(i18nType -> { I18nTypeVo i18nTypeVo = new I18nTypeVo(); @@ -48,6 +51,7 @@ public class I18nTypeServiceImpl extends ServiceImpl i * @param dto 多语言类型添加 */ @Override + @CacheEvict(cacheNames = "i18n", key = "'i18nType'", beforeInvocation = true) public void addI18nType(I18nTypeAddDto dto) { String typeName = dto.getTypeName(); Boolean isDefault = dto.getIsDefault(); @@ -75,6 +79,7 @@ public class I18nTypeServiceImpl extends ServiceImpl i * @param dto 多语言类型更新 */ @Override + @CacheEvict(cacheNames = "i18n", key = "'i18nType'", beforeInvocation = true) public void updateI18nType(I18nTypeUpdateDto dto) { Long id = dto.getId(); Boolean isDefault = dto.getIsDefault(); @@ -102,6 +107,7 @@ public class I18nTypeServiceImpl extends ServiceImpl i * @param ids 删除id列表 */ @Override + @CacheEvict(cacheNames = "i18n", key = "'i18nType'", beforeInvocation = true) public void deleteI18nType(List ids) { // 判断数据请求是否为空 if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); diff --git a/service/src/main/java/cn/bunny/services/service/impl/MenuIconServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/MenuIconServiceImpl.java index ddd4a3f..4a0d699 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/MenuIconServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/MenuIconServiceImpl.java @@ -16,6 +16,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import jakarta.validation.Valid; import org.springframework.beans.BeanUtils; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import java.util.ArrayList; @@ -59,45 +61,6 @@ public class MenuIconServiceImpl extends ServiceImpl i .build(); } - /** - * 添加系统菜单图标 - * - * @param dto 系统菜单图标添加 - */ - @Override - public void addMenuIcon(MenuIconAddDto dto) { - // 保存数据 - MenuIcon menuIcon = new MenuIcon(); - BeanUtils.copyProperties(dto, menuIcon); - save(menuIcon); - } - - /** - * 更新系统菜单图标 - * - * @param dto 系统菜单图标更新 - */ - @Override - public void updateMenuIcon(@Valid MenuIconUpdateDto dto) { - // 更新内容 - MenuIcon menuIcon = new MenuIcon(); - BeanUtils.copyProperties(dto, menuIcon); - updateById(menuIcon); - } - - /** - * 删除|批量删除系统菜单图标 - * - * @param ids 删除id列表 - */ - @Override - public void deleteMenuIcon(List ids) { - // 判断数据请求是否为空 - if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); - - baseMapper.deleteBatchIdsWithPhysics(ids); - } - /** * * 获取查询图标名称列表 * @@ -105,6 +68,7 @@ public class MenuIconServiceImpl extends ServiceImpl i * @return 图标返回列表 */ @Override + @Cacheable(cacheNames = "menuIcon", key = "'menuIconList'", cacheManager = "cacheManagerWithMouth") public List getIconNameList(String iconName) { return list(Wrappers.lambdaQuery().like(MenuIcon::getIconName, iconName)) .stream().map(menuIcon -> { @@ -120,4 +84,46 @@ public class MenuIconServiceImpl extends ServiceImpl i map -> new ArrayList<>(map.values()) )); } + + /** + * 添加系统菜单图标 + * + * @param dto 系统菜单图标添加 + */ + @Override + @CacheEvict(cacheNames = "menuIcon", key = "'menuIconList'", beforeInvocation = true) + public void addMenuIcon(MenuIconAddDto dto) { + // 保存数据 + MenuIcon menuIcon = new MenuIcon(); + BeanUtils.copyProperties(dto, menuIcon); + save(menuIcon); + } + + /** + * 更新系统菜单图标 + * + * @param dto 系统菜单图标更新 + */ + @Override + @CacheEvict(cacheNames = "menuIcon", key = "'menuIconList'", beforeInvocation = true) + public void updateMenuIcon(@Valid MenuIconUpdateDto dto) { + // 更新内容 + MenuIcon menuIcon = new MenuIcon(); + BeanUtils.copyProperties(dto, menuIcon); + updateById(menuIcon); + } + + /** + * 删除|批量删除系统菜单图标 + * + * @param ids 删除id列表 + */ + @Override + @CacheEvict(cacheNames = "menuIcon", key = "'menuIconList'", beforeInvocation = true) + public void deleteMenuIcon(List ids) { + // 判断数据请求是否为空 + if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); + + baseMapper.deleteBatchIdsWithPhysics(ids); + } } diff --git a/service/src/main/java/cn/bunny/services/service/impl/PowerServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/PowerServiceImpl.java index 30e521b..032a936 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/PowerServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/PowerServiceImpl.java @@ -20,6 +20,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import jakarta.validation.Valid; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -66,12 +68,29 @@ public class PowerServiceImpl extends ServiceImpl implements .build(); } + /** + * * 获取所有权限 + * + * @return 所有权限列表 + */ + @Override + @Cacheable(cacheNames = "power", key = "'allPower'", cacheManager = "cacheManagerWithMouth") + public List getAllPowers() { + List powerList = list(); + return powerList.stream().map(power -> { + PowerVo powerVo = new PowerVo(); + BeanUtils.copyProperties(power, powerVo); + return powerVo; + }).toList(); + } + /** * 添加权限 * * @param dto 权限添加 */ @Override + @CacheEvict(cacheNames = "power", key = "'allPower'", beforeInvocation = true) public void addPower(@Valid PowerAddDto dto) { // 添加权限时确保权限码和请求地址是唯一的 LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); @@ -95,6 +114,7 @@ public class PowerServiceImpl extends ServiceImpl implements * @param dto 权限更新 */ @Override + @CacheEvict(cacheNames = "power", key = "'allPower'", beforeInvocation = true) public void updatePower(@Valid PowerUpdateDto dto) { Long id = dto.getId(); List powerList = list(Wrappers.lambdaQuery().eq(Power::getId, id)); @@ -113,6 +133,7 @@ public class PowerServiceImpl extends ServiceImpl implements * @param ids 删除id列表 */ @Override + @CacheEvict(cacheNames = "power", key = "'allPower'", beforeInvocation = true) public void deletePower(List ids) { // 判断数据请求是否为空 if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); @@ -124,27 +145,13 @@ public class PowerServiceImpl extends ServiceImpl implements rolePowerMapper.deleteBatchPowerIdsWithPhysics(ids); } - /** - * * 获取所有权限 - * - * @return 所有权限列表 - */ - @Override - public List getAllPowers() { - List powerList = list(); - return powerList.stream().map(power -> { - PowerVo powerVo = new PowerVo(); - BeanUtils.copyProperties(power, powerVo); - return powerVo; - }).toList(); - } - /** * * 批量修改权限父级 * * @param dto 批量修改权限表单 */ @Override + @CacheEvict(cacheNames = "power", key = "'allPower'", beforeInvocation = true) public void updateBatchByPowerWithParentId(PowerUpdateBatchByParentIdDto dto) { List powerList = dto.getIds().stream().map(id -> { Power power = new Power(); diff --git a/service/src/main/java/cn/bunny/services/service/impl/RoleServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/RoleServiceImpl.java index c1a0d00..53d19b3 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/RoleServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/RoleServiceImpl.java @@ -20,6 +20,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import jakarta.validation.Valid; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import java.util.List; @@ -71,12 +73,28 @@ public class RoleServiceImpl extends ServiceImpl implements Ro .build(); } + /** + * * 获取所有角色 + * + * @return 所有角色列表 + */ + @Override + @Cacheable(cacheNames = "role", key = "'allRole'", cacheManager = "cacheManagerWithMouth") + public List getAllRoles() { + return list().stream().map(role -> { + RoleVo roleVo = new RoleVo(); + BeanUtils.copyProperties(role, roleVo); + return roleVo; + }).toList(); + } + /** * 添加角色 * * @param dto 角色添加 */ @Override + @CacheEvict(cacheNames = "role", key = "'allRole'", beforeInvocation = true) public void addRole(@Valid RoleAddDto dto) { // 判断角色码是否被添加过 List roleList = list(Wrappers.lambdaQuery().eq(Role::getRoleCode, dto.getRoleCode())); @@ -94,6 +112,7 @@ public class RoleServiceImpl extends ServiceImpl implements Ro * @param dto 角色更新 */ @Override + @CacheEvict(cacheNames = "role", key = "'allRole'", beforeInvocation = true) public void updateRole(@Valid RoleUpdateDto dto) { // 查询更新的角色是否存在 List roleList = list(Wrappers.lambdaQuery().eq(Role::getId, dto.getId())); @@ -111,6 +130,7 @@ public class RoleServiceImpl extends ServiceImpl implements Ro * @param ids 删除id列表 */ @Override + @CacheEvict(cacheNames = "role", key = "'allRole'", beforeInvocation = true) public void deleteRole(List ids) { // 判断数据请求是否为空 if (ids.isEmpty()) throw new BunnyException(ResultCodeEnum.REQUEST_IS_EMPTY); @@ -128,18 +148,4 @@ public class RoleServiceImpl extends ServiceImpl implements Ro routerRoleMapper.deleteBatchIdsByRoleIdsWithPhysics(ids); } - - /** - * * 获取所有角色 - * - * @return 所有角色列表 - */ - @Override - public List getAllRoles() { - return list().stream().map(role -> { - RoleVo roleVo = new RoleVo(); - BeanUtils.copyProperties(role, roleVo); - return roleVo; - }).toList(); - } } diff --git a/service/src/main/java/cn/bunny/services/service/impl/SchedulersGroupServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/SchedulersGroupServiceImpl.java index 1e3e525..b4a1116 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/SchedulersGroupServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/SchedulersGroupServiceImpl.java @@ -1,11 +1,11 @@ package cn.bunny.services.service.impl; -import cn.bunny.dao.dto.schedulers.SchedulersGroupAddDto; -import cn.bunny.dao.dto.schedulers.SchedulersGroupDto; -import cn.bunny.dao.dto.schedulers.SchedulersGroupUpdateDto; -import cn.bunny.dao.entity.schedulers.SchedulersGroup; +import cn.bunny.dao.dto.quartz.SchedulersGroupAddDto; +import cn.bunny.dao.dto.quartz.SchedulersGroupDto; +import cn.bunny.dao.dto.quartz.SchedulersGroupUpdateDto; +import cn.bunny.dao.entity.quartz.SchedulersGroup; import cn.bunny.dao.pojo.result.PageResult; -import cn.bunny.dao.vo.schedulers.SchedulersGroupVo; +import cn.bunny.dao.vo.quartz.SchedulersGroupVo; import cn.bunny.services.mapper.SchedulersGroupMapper; import cn.bunny.services.service.SchedulersGroupService; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -13,6 +13,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import jakarta.validation.Valid; import org.springframework.beans.BeanUtils; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import java.util.List; @@ -54,12 +56,28 @@ public class SchedulersGroupServiceImpl extends ServiceImpl getAllSchedulersGroup() { + return list().stream().map(schedulersGroup -> { + SchedulersGroupVo schedulersGroupVo = new SchedulersGroupVo(); + BeanUtils.copyProperties(schedulersGroup, schedulersGroupVo); + return schedulersGroupVo; + }).toList(); + } + /** * 添加任务调度分组 * * @param dto 任务调度分组添加 */ @Override + @CacheEvict(cacheNames = "schedulers", key = "'allSchedulersGroup'", beforeInvocation = true) public void addSchedulersGroup(@Valid SchedulersGroupAddDto dto) { // 保存数据 SchedulersGroup schedulersGroup = new SchedulersGroup(); @@ -73,6 +91,7 @@ public class SchedulersGroupServiceImpl extends ServiceImpl ids) { baseMapper.deleteBatchIdsWithPhysics(ids); } - - /** - * * 获取所有任务调度分组 - * - * @return 获取所有任务分组 - */ - @Override - public List getAllSchedulersGroup() { - return list().stream().map(schedulersGroup -> { - SchedulersGroupVo schedulersGroupVo = new SchedulersGroupVo(); - BeanUtils.copyProperties(schedulersGroup, schedulersGroupVo); - return schedulersGroupVo; - }).toList(); - } } diff --git a/service/src/main/java/cn/bunny/services/service/impl/SchedulersServiceImpl.java b/service/src/main/java/cn/bunny/services/service/impl/SchedulersServiceImpl.java index 12c3082..c84ba28 100644 --- a/service/src/main/java/cn/bunny/services/service/impl/SchedulersServiceImpl.java +++ b/service/src/main/java/cn/bunny/services/service/impl/SchedulersServiceImpl.java @@ -1,12 +1,12 @@ package cn.bunny.services.service.impl; import cn.bunny.common.service.exception.BunnyException; -import cn.bunny.dao.dto.schedulers.SchedulersAddDto; -import cn.bunny.dao.dto.schedulers.SchedulersDto; -import cn.bunny.dao.dto.schedulers.SchedulersOperationDto; -import cn.bunny.dao.entity.schedulers.Schedulers; +import cn.bunny.dao.dto.quartz.SchedulersAddDto; +import cn.bunny.dao.dto.quartz.SchedulersDto; +import cn.bunny.dao.dto.quartz.SchedulersOperationDto; +import cn.bunny.dao.entity.quartz.Schedulers; import cn.bunny.dao.pojo.result.PageResult; -import cn.bunny.dao.vo.schedulers.SchedulersVo; +import cn.bunny.dao.vo.quartz.SchedulersVo; import cn.bunny.services.aop.AnnotationScanner; import cn.bunny.services.aop.annotation.QuartzSchedulers; import cn.bunny.services.mapper.SchedulersMapper; @@ -18,6 +18,8 @@ import jakarta.validation.Valid; import org.quartz.*; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import java.util.HashMap; @@ -68,6 +70,29 @@ public class SchedulersServiceImpl extends ServiceImpl> getAllScheduleJobList() { + Set> classesWithAnnotation = annotationScanner.getClassesWithAnnotation(QuartzSchedulers.class); + return classesWithAnnotation.stream().map(cls -> { + Map hashMap = new HashMap<>(); + + // 调度器引用路径 + String classReference = cls.getName(); + // 调度器详情 + String description = cls.getAnnotation(QuartzSchedulers.class).description(); + + hashMap.put("value", classReference); + hashMap.put("label", description); + return hashMap; + }).toList(); + } + /** * 添加Schedulers视图 * @@ -75,6 +100,7 @@ public class SchedulersServiceImpl extends ServiceImpl> getAllScheduleJobList() { - Set> classesWithAnnotation = annotationScanner.getClassesWithAnnotation(QuartzSchedulers.class); - return classesWithAnnotation.stream().map(cls -> { - Map hashMap = new HashMap<>(); - - // 调度器引用路径 - String classReference = cls.getName(); - // 调度器详情 - String description = cls.getAnnotation(QuartzSchedulers.class).description(); - - hashMap.put("value", classReference); - hashMap.put("label", description); - return hashMap; - }).toList(); - } } diff --git a/service/src/main/resources/mapper/SchedulersGroupMapper.xml b/service/src/main/resources/mapper/SchedulersGroupMapper.xml index 21e7857..5146389 100644 --- a/service/src/main/resources/mapper/SchedulersGroupMapper.xml +++ b/service/src/main/resources/mapper/SchedulersGroupMapper.xml @@ -3,15 +3,15 @@ - - - - - - - - - + + + + + + + + + @@ -20,17 +20,17 @@ - select - from sys_schedulers_group + from qrtz_schedulers_group - - and group_name like CONCAT('%',#{dto.groupName},'%') - - - and description like CONCAT('%',#{dto.description},'%') - + + and group_name like CONCAT('%',#{dto.groupName},'%') + + + and description like CONCAT('%',#{dto.description},'%') + order by update_time desc diff --git a/service/src/main/resources/mapper/SchedulersMapper.xml b/service/src/main/resources/mapper/SchedulersMapper.xml index 517a8af..7b54a97 100644 --- a/service/src/main/resources/mapper/SchedulersMapper.xml +++ b/service/src/main/resources/mapper/SchedulersMapper.xml @@ -3,7 +3,7 @@ - + @@ -19,10 +19,10 @@ - select - from qrtz_view_schedulers + from view_qrtz_schedulers and job_name like CONCAT('%',#{dto.jobName},'%')