mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 20:28:44 +08:00 
			
		
		
		
	统一 boot 和 cloud 代码
This commit is contained in:
		
							
								
								
									
										12
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								pom.xml
									
									
									
									
									
								
							@@ -15,12 +15,12 @@
 | 
				
			|||||||
        <!-- 各种 module 拓展 -->
 | 
					        <!-- 各种 module 拓展 -->
 | 
				
			||||||
        <module>yudao-module-system</module>
 | 
					        <module>yudao-module-system</module>
 | 
				
			||||||
        <module>yudao-module-infra</module>
 | 
					        <module>yudao-module-infra</module>
 | 
				
			||||||
<!--        <module>yudao-module-member</module>-->
 | 
					        <module>yudao-module-member</module>
 | 
				
			||||||
        <!--        <module>yudao-module-bpm</module>-->
 | 
					        <module>yudao-module-bpm</module>
 | 
				
			||||||
<!--        <module>yudao-module-report</module>-->
 | 
					        <module>yudao-module-report</module>
 | 
				
			||||||
<!--        <module>yudao-module-mp</module>-->
 | 
					        <module>yudao-module-mp</module>
 | 
				
			||||||
<!--        <module>yudao-module-pay</module>-->
 | 
					        <module>yudao-module-pay</module>
 | 
				
			||||||
<!--        <module>yudao-module-mall</module>-->
 | 
					        <module>yudao-module-mall</module>
 | 
				
			||||||
        <!-- 示例项目 -->
 | 
					        <!-- 示例项目 -->
 | 
				
			||||||
<!--        <module>yudao-example</module>-->
 | 
					<!--        <module>yudao-example</module>-->
 | 
				
			||||||
    </modules>
 | 
					    </modules>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,7 +21,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
 | 
				
			|||||||
@ConditionalOnProperty(prefix = "yudao.error-code", value = "enable", matchIfMissing = true) // 允许使用 yudao.error-code.enable=false 禁用访问日志
 | 
					@ConditionalOnProperty(prefix = "yudao.error-code", value = "enable", matchIfMissing = true) // 允许使用 yudao.error-code.enable=false 禁用访问日志
 | 
				
			||||||
@EnableConfigurationProperties(ErrorCodeProperties.class)
 | 
					@EnableConfigurationProperties(ErrorCodeProperties.class)
 | 
				
			||||||
@EnableScheduling // 开启调度任务的功能,因为 ErrorCodeRemoteLoader 通过定时刷新错误码
 | 
					@EnableScheduling // 开启调度任务的功能,因为 ErrorCodeRemoteLoader 通过定时刷新错误码
 | 
				
			||||||
public class YudaoErrorCodeConfiguration {
 | 
					public class YudaoErrorCodeAutoConfiguration {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Bean
 | 
					    @Bean
 | 
				
			||||||
    public ErrorCodeAutoGenerator errorCodeAutoGenerator(@Value("${spring.application.name}") String applicationName,
 | 
					    public ErrorCodeAutoGenerator errorCodeAutoGenerator(@Value("${spring.application.name}") String applicationName,
 | 
				
			||||||
@@ -1 +1 @@
 | 
				
			|||||||
cn.iocoder.yudao.framework.errorcode.config.YudaoErrorCodeConfiguration
 | 
					cn.iocoder.yudao.framework.errorcode.config.YudaoErrorCodeAutoConfiguration
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,28 +0,0 @@
 | 
				
			|||||||
package cn.iocoder.yudao.framework.tenant.core.job;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import cn.hutool.core.collection.CollUtil;
 | 
					 | 
				
			||||||
import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
 | 
					 | 
				
			||||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
 | 
					 | 
				
			||||||
import org.springframework.stereotype.Component;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import java.util.List;
 | 
					 | 
				
			||||||
import java.util.concurrent.CopyOnWriteArrayList;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@Component
 | 
					 | 
				
			||||||
public class TestJob implements JobHandler {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private final List<Long> tenantIds = new CopyOnWriteArrayList<>();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    @TenantJob // 标记多租户
 | 
					 | 
				
			||||||
    public String execute(String param) throws Exception {
 | 
					 | 
				
			||||||
        tenantIds.add(TenantContextHolder.getTenantId());
 | 
					 | 
				
			||||||
        return "success";
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public List<Long> getTenantIds() {
 | 
					 | 
				
			||||||
        CollUtil.sort(tenantIds, Long::compareTo);
 | 
					 | 
				
			||||||
        return tenantIds;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -29,8 +29,6 @@ public class SecurityConfiguration {
 | 
				
			|||||||
                        .antMatchers("/swagger-resources/**").anonymous()
 | 
					                        .antMatchers("/swagger-resources/**").anonymous()
 | 
				
			||||||
                        .antMatchers("/webjars/**").anonymous()
 | 
					                        .antMatchers("/webjars/**").anonymous()
 | 
				
			||||||
                        .antMatchers("/*/api-docs").anonymous();
 | 
					                        .antMatchers("/*/api-docs").anonymous();
 | 
				
			||||||
                // 积木报表
 | 
					 | 
				
			||||||
                registry.antMatchers("/jmreport/**").permitAll();
 | 
					 | 
				
			||||||
                // Spring Boot Actuator 的安全配置
 | 
					                // Spring Boot Actuator 的安全配置
 | 
				
			||||||
                registry.antMatchers("/actuator").anonymous()
 | 
					                registry.antMatchers("/actuator").anonymous()
 | 
				
			||||||
                        .antMatchers("/actuator/**").anonymous();
 | 
					                        .antMatchers("/actuator/**").anonymous();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,7 +24,7 @@ import static org.junit.jupiter.api.Assertions.assertNull;
 | 
				
			|||||||
 * @author 芋道源码
 | 
					 * @author 芋道源码
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@Import(AddressServiceImpl.class)
 | 
					@Import(AddressServiceImpl.class)
 | 
				
			||||||
public class AddressServiceImplTest extends BaseDbUnitTest {
 | 
					public class MemberAddressServiceImplTest extends BaseDbUnitTest {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Resource
 | 
					    @Resource
 | 
				
			||||||
    private AddressServiceImpl addressService;
 | 
					    private AddressServiceImpl addressService;
 | 
				
			||||||
@@ -31,5 +31,4 @@ public interface DictDataConvert {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    List<AppDictDataRespVO> convertList03(List<DictDataDO> list);
 | 
					    List<AppDictDataRespVO> convertList03(List<DictDataDO> list);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    List<DictDataRespDTO> convertList04(List<DictDataDO> list);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,59 +37,59 @@
 | 
				
			|||||||
        </dependency>
 | 
					        </dependency>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <!-- 会员中心。默认注释,保证编译速度 -->
 | 
					        <!-- 会员中心。默认注释,保证编译速度 -->
 | 
				
			||||||
<!--        <dependency>-->
 | 
					        <dependency>
 | 
				
			||||||
<!--            <groupId>cn.iocoder.boot</groupId>-->
 | 
					            <groupId>cn.iocoder.boot</groupId>
 | 
				
			||||||
<!--            <artifactId>yudao-module-member-biz</artifactId>-->
 | 
					            <artifactId>yudao-module-member-biz</artifactId>
 | 
				
			||||||
<!--            <version>${revision}</version>-->
 | 
					            <version>${revision}</version>
 | 
				
			||||||
<!--        </dependency>-->
 | 
					        </dependency>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <!-- 数据报表。默认注释,保证编译速度 -->
 | 
					        <!-- 数据报表。默认注释,保证编译速度 -->
 | 
				
			||||||
<!--        <dependency>-->
 | 
					        <dependency>
 | 
				
			||||||
<!--            <groupId>cn.iocoder.boot</groupId>-->
 | 
					            <groupId>cn.iocoder.boot</groupId>
 | 
				
			||||||
<!--            <artifactId>yudao-module-report-biz</artifactId>-->
 | 
					            <artifactId>yudao-module-report-biz</artifactId>
 | 
				
			||||||
<!--            <version>${revision}</version>-->
 | 
					            <version>${revision}</version>
 | 
				
			||||||
<!--        </dependency>-->
 | 
					        </dependency>
 | 
				
			||||||
        <!-- 工作流。默认注释,保证编译速度 -->
 | 
					        <!-- 工作流。默认注释,保证编译速度 -->
 | 
				
			||||||
<!--        <dependency>-->
 | 
					        <dependency>
 | 
				
			||||||
<!--            <groupId>cn.iocoder.boot</groupId>-->
 | 
					            <groupId>cn.iocoder.boot</groupId>
 | 
				
			||||||
<!--            <artifactId>yudao-module-bpm-biz</artifactId>-->
 | 
					            <artifactId>yudao-module-bpm-biz</artifactId>
 | 
				
			||||||
<!--            <version>${revision}</version>-->
 | 
					            <version>${revision}</version>
 | 
				
			||||||
<!--        </dependency>-->
 | 
					        </dependency>
 | 
				
			||||||
        <!-- 支付服务。默认注释,保证编译速度 -->
 | 
					        <!-- 支付服务。默认注释,保证编译速度 -->
 | 
				
			||||||
<!--        <dependency>-->
 | 
					        <dependency>
 | 
				
			||||||
<!--            <groupId>cn.iocoder.boot</groupId>-->
 | 
					            <groupId>cn.iocoder.boot</groupId>
 | 
				
			||||||
<!--            <artifactId>yudao-module-pay-biz</artifactId>-->
 | 
					            <artifactId>yudao-module-pay-biz</artifactId>
 | 
				
			||||||
<!--            <version>${revision}</version>-->
 | 
					            <version>${revision}</version>
 | 
				
			||||||
<!--        </dependency>-->
 | 
					        </dependency>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <!-- 微信公众号模块。默认注释,保证编译速度 -->
 | 
					        <!-- 微信公众号模块。默认注释,保证编译速度 -->
 | 
				
			||||||
<!--        <dependency>-->
 | 
					        <dependency>
 | 
				
			||||||
<!--            <groupId>cn.iocoder.boot</groupId>-->
 | 
					            <groupId>cn.iocoder.boot</groupId>
 | 
				
			||||||
<!--            <artifactId>yudao-module-mp-biz</artifactId>-->
 | 
					            <artifactId>yudao-module-mp-biz</artifactId>
 | 
				
			||||||
<!--            <version>${revision}</version>-->
 | 
					            <version>${revision}</version>
 | 
				
			||||||
<!--        </dependency>-->
 | 
					        </dependency>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!--         商城相关模块。默认注释,保证编译速度-->
 | 
					<!--         商城相关模块。默认注释,保证编译速度-->
 | 
				
			||||||
<!--        <dependency>-->
 | 
					        <dependency>
 | 
				
			||||||
<!--            <groupId>cn.iocoder.boot</groupId>-->
 | 
					            <groupId>cn.iocoder.boot</groupId>
 | 
				
			||||||
<!--            <artifactId>yudao-module-promotion-biz</artifactId>-->
 | 
					            <artifactId>yudao-module-promotion-biz</artifactId>
 | 
				
			||||||
<!--            <version>${revision}</version>-->
 | 
					            <version>${revision}</version>
 | 
				
			||||||
<!--        </dependency>-->
 | 
					        </dependency>
 | 
				
			||||||
<!--        <dependency>-->
 | 
					        <dependency>
 | 
				
			||||||
<!--            <groupId>cn.iocoder.boot</groupId>-->
 | 
					            <groupId>cn.iocoder.boot</groupId>
 | 
				
			||||||
<!--            <artifactId>yudao-module-product-biz</artifactId>-->
 | 
					            <artifactId>yudao-module-product-biz</artifactId>
 | 
				
			||||||
<!--            <version>${revision}</version>-->
 | 
					            <version>${revision}</version>
 | 
				
			||||||
<!--        </dependency>-->
 | 
					        </dependency>
 | 
				
			||||||
<!--        <dependency>-->
 | 
					        <dependency>
 | 
				
			||||||
<!--            <groupId>cn.iocoder.boot</groupId>-->
 | 
					            <groupId>cn.iocoder.boot</groupId>
 | 
				
			||||||
<!--            <artifactId>yudao-module-trade-biz</artifactId>-->
 | 
					            <artifactId>yudao-module-trade-biz</artifactId>
 | 
				
			||||||
<!--            <version>${revision}</version>-->
 | 
					            <version>${revision}</version>
 | 
				
			||||||
<!--        </dependency>-->
 | 
					        </dependency>
 | 
				
			||||||
<!--        <dependency>-->
 | 
					        <dependency>
 | 
				
			||||||
<!--            <groupId>cn.iocoder.boot</groupId>-->
 | 
					            <groupId>cn.iocoder.boot</groupId>
 | 
				
			||||||
<!--            <artifactId>yudao-module-statistics-biz</artifactId>-->
 | 
					            <artifactId>yudao-module-statistics-biz</artifactId>
 | 
				
			||||||
<!--            <version>${revision}</version>-->
 | 
					            <version>${revision}</version>
 | 
				
			||||||
<!--        </dependency>-->
 | 
					        </dependency>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <!-- spring boot 配置所需依赖 -->
 | 
					        <!-- spring boot 配置所需依赖 -->
 | 
				
			||||||
        <dependency>
 | 
					        <dependency>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user