diff --git a/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/AuthenticationUtils.java b/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/AuthenticationUtils.java index 75c15168..149605de 100644 --- a/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/AuthenticationUtils.java +++ b/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/AuthenticationUtils.java @@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil; import cn.hutool.crypto.asymmetric.KeyType; import cn.hutool.crypto.asymmetric.RSA; import cn.hutool.http.HttpUtil; +import com.alibaba.fastjson.JSONObject; import com.jero.common.exception.JeroBootException; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @@ -23,9 +24,9 @@ public class AuthenticationUtils { @Resource private RedisUtil redisUtil; - private static String URL; + public static String URL; - private static String APPLICATION_TOKEN; + public static String APPLICATION_TOKEN; @Value("${standards.url}") public void setURL(String url) { @@ -88,4 +89,15 @@ public class AuthenticationUtils { return map; } + /** + * 校验返回值判断是否同步成功 + * @param response + */ + public static void checkResult(String response) { + JSONObject jsonObject = JSONObject.parseObject(response); + String code = jsonObject.getString("code"); + if (!"200".equals(code)){ + throw new JeroBootException("数据同步失败!"); + } + } } diff --git a/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/SpringContextUtil.java b/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/SpringContextUtil.java new file mode 100644 index 00000000..cb176626 --- /dev/null +++ b/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/SpringContextUtil.java @@ -0,0 +1,43 @@ +package com.jero.common.util; + +import org.jetbrains.annotations.NotNull; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.stereotype.Component; + +/** + * Spring 上下文工具类 + * @author liJiaRao + * @date 2021-09-16 15:05 + */ +@Component +public class SpringContextUtil implements ApplicationContextAware { + private static ApplicationContext applicationContext; + + @Override + public void setApplicationContext(@NotNull ApplicationContext applicationContext) throws BeansException { + SpringContextUtil.applicationContext = applicationContext; + } + + /** + * 获取上下文 + */ + public static ApplicationContext getApplicationContext() { + return applicationContext; + } + + /** + * 通过 bena 名称获取上下文中的 bean + */ + public static Object getBean(String name) { + return applicationContext.getBean(name); + } + + /** + * 通过类型获取上下文中的bean + */ + public static Object getBean(Class requiredType) { + return applicationContext.getBean(requiredType); + } +} diff --git a/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/shiro/ShiroConfig.java b/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/shiro/ShiroConfig.java index 89338d0a..cc3fc4dc 100644 --- a/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/shiro/ShiroConfig.java +++ b/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/shiro/ShiroConfig.java @@ -96,6 +96,7 @@ public class ShiroConfig { filterChainDefinitionMap.put("/meeting/payMeeting/addStandards","anon");//会员系统推送会议 filterChainDefinitionMap.put("/meeting/payMeeting/addStandardsFile","anon");//会员系统推送文件 filterChainDefinitionMap.put("/meeting/payMeetingSituation/page2","anon");//查询参会人 + filterChainDefinitionMap.put("/sys/user/payUserList","anon");//查询负责人 filterChainDefinitionMap.put("/", "anon"); filterChainDefinitionMap.put("/doc.html", "anon"); diff --git a/jero-boot-base/jero-boot-base-tools/src/main/java/com/jero/common/constant/GlobalConstants.java b/jero-boot-base/jero-boot-base-tools/src/main/java/com/jero/common/constant/GlobalConstants.java index b3a38066..f4866253 100644 --- a/jero-boot-base/jero-boot-base-tools/src/main/java/com/jero/common/constant/GlobalConstants.java +++ b/jero-boot-base/jero-boot-base-tools/src/main/java/com/jero/common/constant/GlobalConstants.java @@ -11,4 +11,31 @@ public class GlobalConstants { * redis消息通道名称 */ public static final String REDIS_TOPIC_NAME="jero_redis_topic"; + + /** + * 1 + */ + public static final Integer ONE=1; + + + /** + * 2 + */ + public static final Integer TWO=2; + + + /** + * 3 + */ + public static final Integer THERE=3; + + /** + * 4 + */ + public static final Integer FORE=4; + + /** + * 5 + */ + public static final Integer FIVE=5; } diff --git a/jero-boot-incoming-payment/src/main/java/com/jero/common/mapper/xml/ProjectDetailMapper.xml b/jero-boot-incoming-payment/src/main/java/com/jero/common/mapper/xml/ProjectDetailMapper.xml index c7905971..39f44d71 100644 --- a/jero-boot-incoming-payment/src/main/java/com/jero/common/mapper/xml/ProjectDetailMapper.xml +++ b/jero-boot-incoming-payment/src/main/java/com/jero/common/mapper/xml/ProjectDetailMapper.xml @@ -4,7 +4,7 @@