Merge remote-tracking branch 'origin/beetlsql3-dev' into beetlsql3-dev

beetlsql3-dev
姚丹ab 2 years ago
commit 5474fe6d7d

@ -16,12 +16,16 @@ import com.ibeetl.admin.core.util.PlatformException;
import org.apache.commons.collections4.CollectionUtils;
import org.beetl.sql.core.engine.PageQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import static com.ibeetl.admin.core.service.CorePlatformService.USER_FUNCTION_TREE_CACHE;
/**
* @author TLT
*
@ -120,6 +124,7 @@ public class FunctionConsoleService extends CoreBaseService<CoreFunction> {
* @param userId
* @return
*/
@Cacheable(value=USER_FUNCTION_TREE_CACHE, key="userId")
public String getFunctionIdByUser(Long userId){
return this.roleFunctionConsoleDao.getFunctionIdByUser(userId);
}

@ -1,9 +1,5 @@
package com.ibeetl.admin.core.conf;
import java.io.UnsupportedEncodingException;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cache.Cache;
@ -23,6 +19,10 @@ import org.springframework.data.redis.listener.adapter.MessageListenerAdapter;
import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer;
import org.springframework.data.redis.serializer.RedisSerializationContext.SerializationPair;
import java.io.UnsupportedEncodingException;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
/**
* 使.
*
@ -30,8 +30,8 @@ import org.springframework.data.redis.serializer.RedisSerializationContext.Seria
*
*/
//@Configuration
//@ConditionalOnProperty(name="springext.cache.enabled", havingValue="true" ,matchIfMissing=false)
@Configuration
@ConditionalOnProperty(name="springext.cache.enabled", havingValue="true" ,matchIfMissing=false)
public class CacheConfig {
// 定义一个redis 的频道默认叫cache用于pub/sub

@ -42,7 +42,7 @@ public class CoreDictService extends CoreBaseService<CoreDict> {
* @param type
* @return List
*/
@Cacheable(value = CorePlatformService.DICT_CACHE_TYPE)
@Cacheable(value = CorePlatformService.DICT_CACHE_TYPE, unless="#result == null || #result.size() == 0")
public List<CoreDict> findAllByType(String type) {
return dictDao.findAllList(type);
}

@ -41,6 +41,7 @@ public class CorePlatformService {
public static final String MENU_TREE_CACHE = "cache:core:menuTree";
public static final String ORG_TREE_CACHE = "cache:core:orgTree";
public static final String FUNCTION_TREE_CACHE = "cache:core:functionTree";
public static final String USER_FUNCTION_TREE_CACHE = "cache:core:userFunction";
//字典列表
public static final String DICT_CACHE_TYPE = "cache:core:dictType";
public static final String DICT_CACHE_VALUE = "cache:core:dictValue";
@ -173,10 +174,6 @@ public class CorePlatformService {
}
public MenuItem getMenuItem(long userId, long orgId) {
System.out.println(userId);
// System.out.println(coreUserDao);
// CoreUserDao coreUserDao1 = SpringUtil.getBean("coreUserDao");
// System.out.println(coreUserDao1);
CoreUser user = coreUserDao.unique(userId);
if (this.isSupperAdmin(user)) {
return self.buildMenu();

@ -1,6 +1,9 @@
#\u73AF\u5883\u6807\u8BC6
admin.isOnline=false
# \u9006\u5929\u7F13\u5B58\u5F00\u542F
springext.cache.enabled=true
logging.level.root=INFO
#logging.level.root=DEBUG
logging.level.org.springframework.web=DEBUG

@ -1,6 +1,9 @@
#\u73AF\u5883\u6807\u8BC6
admin.isOnline=false
# \u9006\u5929\u7F13\u5B58\u5F00\u542F
springext.cache.enabled=true
logging.level.root=INFO
#logging.level.root=DEBUG
logging.level.org.springframework.web=DEBUG

@ -1,6 +1,9 @@
#\u73AF\u5883\u6807\u8BC6
admin.isOnline=true
# \u9006\u5929\u7F13\u5B58\u5F00\u542F
springext.cache.enabled=true
logging.level.root=ERROR
#logging.level.root=DEBUG
logging.level.org.springframework.web=DEBUG

@ -63,7 +63,7 @@ queryByCondition
@if(!isEmpty(teacherOpenCourseMergeAuthCode)){
and ta.teacher_open_course_merge_teacher_auth_code =#teacherOpenCourseMergeAuthCode#
@}
order by ta.teacher_merge_application_order_index desc
order by ta.teacher_open_course_merge_teacher_order_index desc
queryByConditionQuery
@ -129,7 +129,7 @@ queryByConditionQuery
@if(!isEmpty(teacherOpenCourseMergeAuthCode)){
and ta.teacher_open_course_merge_teacher_auth_code =#teacherOpenCourseMergeAuthCode#
@}
order by ta.teacher_merge_application_order_index desc
order by ta.teacher_open_course_merge_teacher_order_index desc
deleteTeacherOpenCourseByIds
===

Loading…
Cancel
Save