yonge %!s(int64=5) %!d(string=hai) anos
pai
achega
72764fe726

+ 9 - 9
edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/SysConfigController.java

@@ -1,13 +1,13 @@
 package com.keao.edu.user.controller;
 
 
-import com.keao.edu.common.controller.BaseController;
-import com.keao.edu.common.entity.SysConfig;
-import com.keao.edu.common.page.QueryInfo;
-import com.keao.edu.common.tenant.TenantContextHolder;
-import com.keao.edu.user.service.SysConfigService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -16,10 +16,10 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import com.keao.edu.common.controller.BaseController;
+import com.keao.edu.common.entity.SysConfig;
+import com.keao.edu.common.tenant.TenantContextHolder;
+import com.keao.edu.user.service.SysConfigService;
 
 /**
  * 系统配置控制层

+ 9 - 4
edu-user/edu-user-server/src/main/resources/config/mybatis/SysConfigMapper.xml

@@ -22,10 +22,15 @@
 
 	<!-- 全查询 -->
 	<select id="findAll" resultMap="SysConfig">
-		SELECT * FROM sys_config where tenant_id_ = #{tenantId}
-		<if test="group != null">
-			and group_ = #{group}
-		</if>
+		SELECT * FROM sys_config
+		<where>
+			<if test="group != null">
+				and group_ = #{group}
+			</if>
+			<if test="tenantId != null">
+				and tenant_id_ = #{tenantId}
+			</if>
+		</where>
 		ORDER BY id_
 	</select>