diff --git a/server/molly-service/src/test/java/com/xaaef/molly/MollyApplicationTests.java b/server/molly-service/src/test/java/com/xaaef/molly/MollyApplicationTests.java index 5630f91..d7f9c94 100644 --- a/server/molly-service/src/test/java/com/xaaef/molly/MollyApplicationTests.java +++ b/server/molly-service/src/test/java/com/xaaef/molly/MollyApplicationTests.java @@ -10,6 +10,7 @@ import com.xaaef.molly.common.enums.StatusEnum; import com.xaaef.molly.common.enums.UserType; import com.xaaef.molly.common.util.JsonUtils; import com.xaaef.molly.common.util.TenantUtils; +import com.xaaef.molly.corems.service.CmsProjectService; import com.xaaef.molly.system.entity.SysTemplate; import com.xaaef.molly.system.po.CreateTenantPO; import com.xaaef.molly.system.service.SysConfigService; @@ -37,6 +38,9 @@ public class MollyApplicationTests { @Autowired private SysConfigService configService; + @Autowired + private CmsProjectService projectService; + static { var userDetails = new JwtLoginUser() .setAdminFlag(AdminFlag.YES) @@ -102,9 +106,28 @@ public class MollyApplicationTests { */ @Test public void test2() throws Exception { + TenantUtils.setTenantId("master"); var valueByKey = configService.getValueByKey(ConfigName.USER_DEFAULT_PASSWORD); System.out.println(valueByKey); } + /** + * 获取项目 + * + * @author WangChenChen + * @version 2.0 + * @date 2023/10/26 9:24 + */ + @Test + public void test3() throws Exception { + TenantUtils.setTenantId("master"); + projectService.list() + .forEach(System.out::println); + TenantUtils.setTenantId("google"); + projectService.list() + .forEach(System.out::println); + } + + } diff --git a/server/pom.xml b/server/pom.xml index 437edbe..6034ef1 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -52,8 +52,8 @@ 4.3.0 3.5.4.1 - - 3.1.5 + + 3.1.6