Commit 4530fae1 by 水库浪子

修改编辑时jar包冲突bug

1 parent ba355860
......@@ -39,12 +39,6 @@
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 自定义验证注解 -->
......@@ -260,6 +254,12 @@
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.68</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.github.jsqlparser</groupId>-->
<!-- <artifactId>jsqlparser</artifactId>-->
<!-- </dependency>-->
</dependencies>
</project>
\ No newline at end of file
package com.linkwechat.framework.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
......@@ -35,14 +34,62 @@ public class MyBatisPlusConfig
//
// @Bean
// public MybatisPlusInterceptor mybatisPlusInterceptor() {
// MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
// // 如果用了分页插件注意先 add TenantLineInnerInterceptor 再 add PaginationInnerInterceptor
// // 用了分页插件必须设置 MybatisConfiguration#useDeprecatedExecutor = false
// // interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
//
// interceptor.addInnerInterceptor(new TenantLineInnerInterceptor(
// new TenantLineHandler() {
// // 获取租户 ID 值表达式,只支持单个 ID 值
// @Override
// public Expression getTenantId() {
//
// WeCorpAccount weCorpAccount
// = SecurityUtils.getLoginUser().getUser().getWeCorpAccount();
// if(null != weCorpAccount){
// return new StringValue(weCorpAccount.getCorpId());
// }
//
// return null;
// }
// // 这是 default 方法,默认返回 false 表示所有表都需要拼多租户条件,
// // 这里设置 role表不需要该条件
// @Override
// public boolean ignoreTable(String tableName) {
//
// if (Arrays.asList(weComeConfig.getNeedTenant())
// .contains(tableName)){
// return false;
// }
// return true;
// }
//
// @Override
// public String getTenantIdColumn() {
// return "corp_id";
// }
// }));
// interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
// return interceptor;
// }
// @Bean
// public ConfigurationCustomizer configurationCustomizer() {
// return configuration -> configuration.setUseDeprecatedExecutor(false);
// }
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
public Interceptor[] plugins() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
// 如果用了分页插件注意先 add TenantLineInnerInterceptor 再 add PaginationInnerInterceptor
// 用了分页插件必须设置 MybatisConfiguration#useDeprecatedExecutor = false
// interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
interceptor.addInnerInterceptor(new TenantLineInnerInterceptor(
new TenantLineHandler() {
// 获取租户 ID 值表达式,只支持单个 ID 值
......@@ -74,17 +121,9 @@ public class MyBatisPlusConfig
return "corp_id";
}
}));
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
@Bean
public ConfigurationCustomizer configurationCustomizer() {
return configuration -> configuration.setUseDeprecatedExecutor(false);
}
@Bean
public Interceptor[] plugins() {
return new Interceptor[]{new PageInterceptor()};
//
return new Interceptor[]{interceptor,new PageInterceptor()
};
}
}
\ No newline at end of file
package com.linkwechat.wecom.mapper;
import java.util.List;
import com.baomidou.mybatisplus.annotation.SqlParser;
import com.linkwechat.common.core.domain.entity.WeCorpAccount;
import org.apache.ibatis.annotations.Param;
......@@ -18,6 +20,7 @@ public interface WeCorpAccountMapper
* @param id 企业id相关配置ID
* @return 企业id相关配置
*/
@SqlParser(filter = true)
public WeCorpAccount selectWeCorpAccountById(Long id);
/**
......@@ -26,6 +29,7 @@ public interface WeCorpAccountMapper
* @param wxCorpAccount 企业id相关配置
* @return 企业id相关配置集合
*/
@SqlParser(filter = true)
public List<WeCorpAccount> selectWeCorpAccountList(WeCorpAccount wxCorpAccount);
/**
......@@ -34,6 +38,7 @@ public interface WeCorpAccountMapper
* @param wxCorpAccount 企业id相关配置
* @return 结果
*/
@SqlParser(filter = true)
public int insertWeCorpAccount(WeCorpAccount wxCorpAccount);
/**
......@@ -42,6 +47,7 @@ public interface WeCorpAccountMapper
* @param wxCorpAccount 企业id相关配置
* @return 结果
*/
@SqlParser(filter = true)
public int updateWeCorpAccount(WeCorpAccount wxCorpAccount);
......@@ -50,6 +56,7 @@ public interface WeCorpAccountMapper
* 获取有效cropid
* @return
*/
@SqlParser(filter = true)
public WeCorpAccount findValidWeCorpAccount();
......@@ -58,6 +65,7 @@ public interface WeCorpAccountMapper
* @param corpId
* @return
*/
@SqlParser(filter = true)
public int startVailWeCorpAccount(@Param("corpId") String corpId);
......@@ -66,5 +74,6 @@ public interface WeCorpAccountMapper
* @param corpAccount
* @return
*/
@SqlParser(filter = true)
WeCorpAccount findWeCorpByAccount(@Param("corpAccount") String corpAccount);
}
......@@ -22,10 +22,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="providerSecret" column="provider_secret" />
<result property="customerChurnNoticeSwitch" column="customer_churn_notice_switch" />
<result property="wxQrLoginRedirectUri" column="wx_qr_login_redirect_uri"/>
<result property="cropAccount" column="corp_account"/>
</resultMap>
<sql id="selectWeCorpAccountVo">
select id,chat_secret,provider_secret,company_name, corp_id, corp_secret,agent_id, agent_secret, status, del_flag, create_by, create_time, update_by, update_time,contact_secret, customer_churn_notice_switch,wx_qr_login_redirect_uri from we_corp_account
select id,chat_secret,corp_account,provider_secret,company_name, corp_id, corp_secret,agent_id, agent_secret, status, del_flag, create_by, create_time, update_by, update_time,contact_secret, customer_churn_notice_switch,wx_qr_login_redirect_uri from we_corp_account
</sql>
<select id="selectWeCorpAccountList" parameterType="WeCorpAccount" resultMap="WeCorpAccountResult">
......@@ -62,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerChurnNoticeSwitch != null ">customer_churn_notice_switch,</if>
<if test="providerSecret != null ">provider_secret,</if>
<if test="wxQrLoginRedirectUri != null ">wx_qr_login_redirect_uri,</if>
<if test="cropAccount != null">corp_account,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="companyName != null">#{companyName},</if>
......@@ -80,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerChurnNoticeSwitch != null ">#{customerChurnNoticeSwitch},</if>
<if test="providerSecret != null ">#{providerSecret},</if>
<if test="wxQrLoginRedirectUri != null ">#{wxQrLoginRedirectUri},</if>
<if test="cropAccount != null">#{cropAccount},</if>
</trim>
</insert>
......@@ -100,11 +103,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="agentId != null ">agent_id = #{agentId},</if>
<if test="agentSecret != null ">agent_secret =#{agentSecret},</if>
<if test="customerChurnNoticeSwitch != null ">customer_churn_notice_switch = #{customerChurnNoticeSwitch},</if>
<if test="providerSecret != null ">provider_secret = #{providerSecret},</if>
<if test="wxQrLoginRedirectUri != null ">wx_qr_login_redirect_uri = #{wxQrLoginRedirectUri},</if>
<if test="cropAccount != null">corp_account = #{cropAccount},</if>
</trim>
where id = #{id}
</update>
......
......@@ -77,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWeCustomerList" parameterType="WeCustomer" resultMap="WeCustomerResult">
SELECT
DISTINCT wc.external_userid,
DISTINCT wc.external_userid,
wc.`name`,
wc.avatar,
wc.type,
......
......@@ -84,9 +84,13 @@
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper.boot.version}</version>
<exclusions>
<!-- <exclusion>-->
<!-- <groupId>com.github.jsqlparser</groupId>-->
<!-- <artifactId>jsqlparser</artifactId>-->
<!-- </exclusion>-->
<exclusion>
<groupId>com.github.jsqlparser</groupId>
<artifactId>jsqlparser</artifactId>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
</exclusion>
</exclusions>
</dependency>
......@@ -251,6 +255,12 @@
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>${mybatis-plus.version}</version>
<exclusions>
<exclusion>
<groupId>com.github.jsqlparser</groupId>
<artifactId>jsqlparser</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
......@@ -277,6 +287,9 @@
<version>${nacos.version}</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!