Browse Source

Merge branch 'master' of http://git.dayaedu.com/yonge/edu-saas

zouxuan 5 years ago
parent
commit
5b7875237a

+ 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;
 
 /**
  * 系统配置控制层

+ 1 - 1
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamOrganizationRelationMapper.xml

@@ -199,7 +199,7 @@
 				AND ear.is_allow_arrange_exam_ = #{isAllowArrangeExam}
 			</if>
 			<if test="search!=null">
-				AND (ear.organ_id_=#{search} OR a.name_ LIKE CONCAT(#{search}, '%'))
+				AND (ear.organ_id_=#{search} OR a.name_ LIKE CONCAT('%', #{search}, '%'))
 			</if>
 		</where>
 	</sql>

+ 1 - 1
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamReviewMapper.xml

@@ -138,7 +138,7 @@
 				AND DATE_FORMAT( ero.exam_start_time_, '%Y-%m-%d' ) BETWEEN  #{examStartTime} AND #{examEndTime}
 			</if>
 			<if test="search!=null and search!=''">
-				AND su.real_name_ LIKE CONCAT(#{search}, '%')
+				AND su.real_name_ LIKE CONCAT('%', #{search}, '%')
 			</if>
 		</where>
 	</sql>

+ 2 - 2
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamSongMapper.xml

@@ -89,10 +89,10 @@
 				AND type_=#{type, typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler}
 			</if>
 			<if test="songName!=null">
-				AND es.song_name_ LIKE CONCAT(#{songName}, '%')
+				AND es.song_name_ LIKE CONCAT('%', #{songName}, '%')
 			</if>
 			<if test="search!=null">
-				AND (es.id_=#{search} OR es.song_name_ LIKE CONCAT(#{search}, '%') OR es.song_author_ LIKE CONCAT(#{search}, '%'))
+				AND (es.id_=#{search} OR es.song_name_ LIKE CONCAT('%', #{search}, '%') OR es.song_author_ LIKE CONCAT('%', #{search}, '%'))
 			</if>
 		</where>
 	</sql>

+ 1 - 1
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamSubjectSongMapper.xml

@@ -108,7 +108,7 @@
 				AND ess.level_=#{level}
 			</if>
 			<if test="search!=null">
-				AND (ess.exam_subject_id_=#{search} OR s.name_ LIKE CONCAT(#{search}, '%'))
+				AND (ess.exam_subject_id_=#{search} OR s.name_ LIKE CONCAT('%', #{search}, '%'))
 			</if>
 		</where>
 	</sql>

+ 1 - 1
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamTeacherSalaryMapper.xml

@@ -163,7 +163,7 @@
 				AND ets.settlement_type_ = #{settlementType,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler}
 			</if>
 			<if test="search!=null">
-				AND (ets.teacher_id_=#{search} OR su.real_name_ LIKE CONCAT(#{search}, '%'))
+				AND (ets.teacher_id_=#{search} OR su.real_name_ LIKE CONCAT('%', #{search}, '%'))
 			</if>
 		</where>
 	</sql>

+ 2 - 2
edu-user/edu-user-server/src/main/resources/config/mybatis/ExaminationBasicMapper.xml

@@ -193,7 +193,7 @@
 				AND status_=#{examStatus}
 			</if>
 			<if test="search!=null">
-				AND (id_=#{search} OR name_ LIKE CONCAT(#{search}, '%'))
+				AND (id_=#{search} OR name_ LIKE CONCAT('%', #{search}, '%'))
 			</if>
 		</where>
 	</sql>
@@ -220,7 +220,7 @@
 				AND eb.status_=#{examStatus}
 			</if>
 			<if test="search!=null">
-				AND (eb.id_=#{search} OR eb.name_ LIKE CONCAT(#{search}, '%'))
+				AND (eb.id_=#{search} OR eb.name_ LIKE CONCAT('%', #{search}, '%'))
 			</if>
 		</where>
 	</sql>

+ 2 - 2
edu-user/edu-user-server/src/main/resources/config/mybatis/OrganizationMapper.xml

@@ -140,11 +140,11 @@
 	</select>
 
 	<select id="getChildOrganIds" resultType="int">
-		SELECT id_ FROM organization WHERE parent_organ_id_tag_ LIKE CONCAT(#{parentOrganIdTag}, '%');
+		SELECT id_ FROM organization WHERE parent_organ_id_tag_ LIKE CONCAT('%', #{parentOrganIdTag}, '%');
 	</select>
 
 	<select id="getChildOrgans" resultMap="Organization">
-		SELECT <include refid="organizationColumn"/> FROM organization o WHERE parent_organ_id_tag_ LIKE CONCAT(#{parentOrganIdTag}, '%');
+		SELECT <include refid="organizationColumn"/> FROM organization o WHERE parent_organ_id_tag_ LIKE CONCAT('%', #{parentOrganIdTag}, '%');
 	</select>
 
 	<select id="getNextLevelOrganIds" resultType="int">

+ 2 - 2
edu-user/edu-user-server/src/main/resources/config/mybatis/StudentExamResultMapper.xml

@@ -133,13 +133,13 @@
 				AND er.card_no_ = #{cardNo}
 			</if>
 			<if test="studentName!=null and studentName!=''">
-				AND su.real_name_ LIKE CONCAT(#{studentName}, '%')
+				AND su.real_name_ LIKE CONCAT('%', #{studentName}, '%')
 			</if>
 			<if test="studentId != null">
 				AND su.id_ = #{studentId}
 			</if>
 			<if test="examName!=null and examName!=''">
-				AND eb.name_ LIKE CONCAT(#{examName}, '%')
+				AND eb.name_ LIKE CONCAT('%', #{examName}, '%')
 			</if>
 			<if test="subjectId!=null">
 				AND er.subject_id_=#{subjectId}

+ 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>
 

+ 1 - 1
edu-user/edu-user-server/src/main/resources/config/mybatis/TenantInfoMapper.xml

@@ -79,7 +79,7 @@
 	<sql id="queryPageCondition">
 		<where>
 			<if test="search!=null">
-				AND (ti.id_=#{search} OR ti.name_	LIKE CONCAT(#{search}, '%'))
+				AND (ti.id_=#{search} OR ti.name_	LIKE CONCAT('%', #{search}, '%'))
 			</if>
 		</where>
 	</sql>