Selaa lähdekoodia

fix 将若依框架数据源切换为Sqlserver

elis 11 kuukautta sitten
vanhempi
commit
191ec534b8
21 muutettua tiedostoa jossa 213 lisäystä ja 117 poistoa
  1. 5 0
      RuoYi-Vue-v3.8.7/ruoyi-admin/pom.xml
  2. 13 6
      RuoYi-Vue-v3.8.7/ruoyi-admin/src/main/resources/application-druid.yml
  3. 2 2
      RuoYi-Vue-v3.8.7/ruoyi-admin/src/main/resources/application.yml
  4. 1 1
      RuoYi-Vue-v3.8.7/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java
  5. 70 5
      RuoYi-Vue-v3.8.7/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml
  6. 39 20
      RuoYi-Vue-v3.8.7/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml
  7. 5 5
      RuoYi-Vue-v3.8.7/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml
  8. 4 4
      RuoYi-Vue-v3.8.7/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml
  9. 7 7
      RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml
  10. 7 7
      RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
  11. 3 3
      RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml
  12. 7 7
      RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
  13. 3 3
      RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml
  14. 9 9
      RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
  15. 4 4
      RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
  16. 4 4
      RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
  17. 6 6
      RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml
  18. 8 8
      RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
  19. 14 14
      RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
  20. 1 1
      RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/TGoodsMapper.xml
  21. 1 1
      RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/TKufangMapper.xml

+ 5 - 0
RuoYi-Vue-v3.8.7/ruoyi-admin/pom.xml

@@ -42,6 +42,11 @@
             <groupId>mysql</groupId>
             <artifactId>mysql-connector-java</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.microsoft.sqlserver</groupId>
+            <artifactId>mssql-jdbc</artifactId>
+            <version>6.1.0.jre8</version>
+        </dependency>
 
         <!-- 核心模块-->
         <dependency>

+ 13 - 6
RuoYi-Vue-v3.8.7/ruoyi-admin/src/main/resources/application-druid.yml

@@ -2,17 +2,24 @@
 spring:
     datasource:
         type: com.alibaba.druid.pool.DruidDataSource
-        driverClassName: com.mysql.cj.jdbc.Driver
+#        driverClassName: com.mysql.cj.jdbc.Driver
+#        druid:
+#            # 主库数据源
+#            master:
+#                url: jdbc:mysql://localhost:3306/wzxt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+#                username: wzxt
+#                password: cqjd2024
+        driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://localhost:3306/wzxt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                username: wzxt
-                password: cqjd2024
+                url: jdbc:sqlserver://192.168.1.250:1433;DatabaseName=asset
+                username: sa
+                password: 123456
             # 从库数据源
             slave:
                 # 从数据源开关/默认关闭
-                enabled: false
+                enabled: true
                 url: 
                 username: 
                 password: 
@@ -35,7 +42,7 @@ spring:
             # 配置一个连接在池中最大生存的时间,单位是毫秒
             maxEvictableIdleTimeMillis: 900000
             # 配置检测连接是否有效
-            validationQuery: SELECT 1 FROM DUAL
+            validationQuery: select 'x'
             testWhileIdle: true
             testOnBorrow: false
             testOnReturn: false

+ 2 - 2
RuoYi-Vue-v3.8.7/ruoyi-admin/src/main/resources/application.yml

@@ -74,7 +74,7 @@ spring:
     # 数据库索引
     database: 2
     # 密码
-    password: cqf2024!
+#    password: cqf2024!
     # 连接超时时间
     timeout: 10s
     lettuce:
@@ -108,7 +108,7 @@ mybatis:
 
 # PageHelper分页插件
 pagehelper:
-  helperDialect: mysql
+  helperDialect: sqlserver
   supportMethodsArguments: true
   params: count=countSql
 

+ 1 - 1
RuoYi-Vue-v3.8.7/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java

@@ -124,7 +124,7 @@ public class DataScopeAspect
             else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope))
             {
                 sqlString.append(StringUtils.format(
-                        " OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )",
+                        " OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or charindex (',' + CONVERT (VARCHAR, {}), ',' + ancestors) > 0 )",
                         deptAlias, user.getDeptId(), user.getDeptId()));
             }
             else if (DATA_SCOPE_SELF.equals(dataScope))

+ 70 - 5
RuoYi-Vue-v3.8.7/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml

@@ -40,9 +40,74 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectDbTableColumnsByName" parameterType="String" resultMap="GenTableColumnResult">
-		select column_name, (case when (is_nullable = 'no' <![CDATA[ && ]]> column_key != 'PRI') then '1' else '0' end) as is_required, (case when column_key = 'PRI' then '1' else '0' end) as is_pk, ordinal_position as sort, column_comment, (case when extra = 'auto_increment' then '1' else '0' end) as is_increment, column_type
-		from information_schema.columns where table_schema = (select database()) and table_name = (#{tableName})
-		order by ordinal_position
+        SELECT a.name AS column_name,
+               (
+                   CASE
+                       WHEN a.isnullable = 1 THEN
+                           0
+                       ELSE
+                           1
+                       END
+                   )  AS is_required,
+               (
+                   CASE
+                       WHEN (
+                                SELECT COUNT(*)
+                                FROM sysobjects
+                                WHERE (
+                                    name IN (
+                                        SELECT name
+                                        FROM sysindexes
+                                        WHERE (id = a.id)
+                                          AND (
+                                            indid IN (
+                                                SELECT indid
+                                                FROM sysindexkeys
+                                                WHERE (id = a.id)
+                                                  AND (
+                                                    colid IN (
+                                                        SELECT colid
+                                                        FROM syscolumns
+                                                        WHERE (id = a.id)
+                                                          AND (name = a.name)
+                                                    )
+                                                    )
+                                            )
+                                            )
+                                    )
+                                    )
+                                  AND (xtype = 'PK')
+                            ) > 0 THEN
+                           1
+                       ELSE
+                           0
+                       END
+                   )  AS is_pk,
+               a.colorder  AS sort,
+               isnull(g.[value], ' ') AS column_comment,
+               (
+                   CASE
+                       WHEN COLUMNPROPERTY(a.id, a.name, 'IsIdentity') = 1 THEN
+                           1
+                       ELSE
+                           0
+                       END
+                   ) AS is_increment,
+               b.name  AS column_type
+        FROM syscolumns a
+                 LEFT JOIN systypes b ON a.xtype = b.xusertype
+                 INNER JOIN sysobjects d ON a.id = d.id
+            AND d.xtype = 'U'
+            AND d.name  <![CDATA[ <> ]]> 'dtproperties'
+                 LEFT JOIN syscomments e ON a.cdefault = e.id
+                 LEFT JOIN sys.extended_properties g ON a.id = g.major_id
+            AND a.colid = g.minor_id
+                 LEFT JOIN sys.extended_properties f ON d.id = f.class
+            AND f.minor_id = 0
+                 LEFT JOIN sys.objects h ON a.id = h.object_id
+                 LEFT JOIN sys.schemas i ON h.schema_id = i.schema_id
+        WHERE d.name = #{tableName}
+        ORDER BY a.colorder
 	</select>
 
     <insert id="insertGenTableColumn" parameterType="GenTableColumn" useGeneratedKeys="true" keyProperty="columnId">
@@ -85,7 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="dictType != null and dictType != ''">#{dictType},</if>
 			<if test="sort != null">#{sort},</if>
 			<if test="createBy != null and createBy != ''">#{createBy},</if>
-			sysdate()
+			getdate()
          )
     </insert>
 
@@ -105,7 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="dictType != null">dict_type = #{dictType},</if>
             <if test="sort != null">sort = #{sort},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
-            update_time = sysdate()
+            update_time = getdate()
         </set>
         where column_id = #{columnId}
     </update>

+ 39 - 20
RuoYi-Vue-v3.8.7/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml

@@ -62,47 +62,66 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<include refid="selectGenTableVo"/>
 		<where>
 			<if test="tableName != null and tableName != ''">
-				AND lower(table_name) like lower(concat('%', #{tableName}, '%'))
+				AND lower(table_name) like lower( '%'+#{tableName}+'%')
 			</if>
 			<if test="tableComment != null and tableComment != ''">
-				AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
+				AND lower(table_comment) like lower('%'+#{tableComment}+'%')
 			</if>
 			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-				AND date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+				AND DATEDIFF(day, create_time , #{params.endTime}) &gt;= 0
 			</if>
 			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-				AND date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+				AND DATEDIFF(day, create_time , #{params.endTime}) &lt;= 0
 			</if>
 		</where>
 	</select>
 
 	<select id="selectDbTableList" parameterType="GenTable" resultMap="GenTableResult">
-		select table_name, table_comment, create_time, update_time from information_schema.tables
-		where table_schema = (select database())
-		AND table_name NOT LIKE 'qrtz_%' AND table_name NOT LIKE 'gen_%'
-		AND table_name NOT IN (select table_name from gen_table)
+		SELECT
+		so.name table_name,
+		sep.value table_comment,
+		so.create_date create_time,
+		so.modify_date update_time
+		FROM
+		sys.objects AS so
+		LEFT JOIN sys.extended_properties AS sep ON so.object_id = sep.major_id
+		WHERE
+		so.type = 'U'
+		AND sep.minor_id = 0
+		AND so.name NOT LIKE 'qrtz_%' AND so.name NOT LIKE 'gen_%'
+		AND so.name NOT IN (select table_name from gen_table)
 		<if test="tableName != null and tableName != ''">
-			AND lower(table_name) like lower(concat('%', #{tableName}, '%'))
+			AND lower(table_name) like lower('%'+#{tableName}+'%')
 		</if>
 		<if test="tableComment != null and tableComment != ''">
-			AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
+			AND lower(table_comment) like lower('%'+ #{tableComment}+'%')
 		</if>
 		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-			AND date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+			AND DATEDIFF(day, create_time , #{params.endTime}) &gt;= 0
 		</if>
 		<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-			AND date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+			AND DATEDIFF(day, create_time , #{params.endTime}) &lt;= 0
 		</if>
         order by create_time desc
 	</select>
 	
 	<select id="selectDbTableListByNames" resultMap="GenTableResult">
-		select table_name, table_comment, create_time, update_time from information_schema.tables
-		where table_name NOT LIKE 'qrtz_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database())
-		and table_name in
-	    <foreach collection="array" item="name" open="(" separator="," close=")">
- 			#{name}
-        </foreach> 
+		SELECT
+		SO.name table_name,
+		SEP.VALUE table_comment,
+		SO.create_date create_time,
+		SO.modify_date update_time
+		FROM
+		sys.objects AS SO
+		LEFT JOIN sys.extended_properties AS SEP ON SO.object_id = SEP.major_id
+		WHERE
+		SO.type = 'U'
+		AND SEP.minor_id = 0
+		and SO.name NOT LIKE 'qrtz_%' and SO.name NOT LIKE 'gen_%'
+		and SO.name in
+		<foreach collection="array" item="name" open="(" separator="," close=")">
+			#{name}
+		</foreach>
 	</select>
 	
 	<select id="selectTableByName" parameterType="String" resultMap="GenTableResult">
@@ -167,7 +186,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="genPath != null and genPath != ''">#{genPath},</if>
 			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
-			sysdate()
+			getdate()
          )
     </insert>
     
@@ -191,7 +210,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="options != null and options != ''">options = #{options},</if>
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
             <if test="remark != null">remark = #{remark},</if>
-            update_time = sysdate()
+            update_time = getdate()
         </set>
         where table_id = #{tableId}
     </update>

+ 5 - 5
RuoYi-Vue-v3.8.7/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml

@@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<include refid="selectJobLogVo"/>
 		<where>
 			<if test="jobName != null and jobName != ''">
-				AND job_name like concat('%', #{jobName}, '%')
+				AND job_name like '%'+ #{jobName} +'%'
 			</if>
 			<if test="jobGroup != null and jobGroup != ''">
 				AND job_group = #{jobGroup}
@@ -33,13 +33,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 				AND status = #{status}
 			</if>
 			<if test="invokeTarget != null and invokeTarget != ''">
-				AND invoke_target like concat('%', #{invokeTarget}, '%')
+				AND invoke_target like  '%'+#{invokeTarget}+'%'
 			</if>
 			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-				and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+				and DATEDIFF(day, create_time , #{params.endTime}) &gt;= 0
 			</if>
 			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-				and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+				and DATEDIFF(day, create_time , #{params.endTime}) &lt;= 0
 			</if>
 		</where>
 	</select>
@@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="jobMessage != null and jobMessage != ''">#{jobMessage},</if>
  			<if test="status != null and status != ''">#{status},</if>
  			<if test="exceptionInfo != null and exceptionInfo != ''">#{exceptionInfo},</if>
- 			sysdate()
+ 			getdate()
  		)
 	</insert>
 

+ 4 - 4
RuoYi-Vue-v3.8.7/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml

@@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<include refid="selectJobVo"/>
 		<where>
 			<if test="jobName != null and jobName != ''">
-				AND job_name like concat('%', #{jobName}, '%')
+				AND job_name like '%'+#{jobName}+'%'
 			</if>
 			<if test="jobGroup != null and jobGroup != ''">
 				AND job_group = #{jobGroup}
@@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 				AND status = #{status}
 			</if>
 			<if test="invokeTarget != null and invokeTarget != ''">
-				AND invoke_target like concat('%', #{invokeTarget}, '%')
+				AND invoke_target like '%'+#{invokeTarget}+'%'
 			</if>
 		</where>
 	</select>
@@ -75,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status !=null">status = #{status},</if>
  			<if test="remark != null and remark != ''">remark = #{remark},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
+ 			update_time = getdate()
  		</set>
  		where job_id = #{jobId}
 	</update>
@@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null and status != ''">#{status},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			getdate()
  		)
 	</insert>
 

+ 7 - 7
RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml

@@ -42,19 +42,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectConfigVo"/>
         <where>
 			<if test="configName != null and configName != ''">
-				AND config_name like concat('%', #{configName}, '%')
+				AND config_name like '%'+#{configName}+'%'
 			</if>
 			<if test="configType != null and configType != ''">
 				AND config_type = #{configType}
 			</if>
 			<if test="configKey != null and configKey != ''">
-				AND config_key like concat('%', #{configKey}, '%')
+				AND config_key like '%'+#{configKey}+'%'
 			</if>
 			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-				and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+				and DATEDIFF(day, r.create_time , #{params.endTime}) &gt;= 0
 			</if>
 			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-				and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+				and DATEDIFF(day, r.create_time , #{params.endTime}) &lt;= 0
 			</if>
 		</where>
     </select>
@@ -66,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
     <select id="checkConfigKeyUnique" parameterType="String" resultMap="SysConfigResult">
         <include refid="selectConfigVo"/>
-        where config_key = #{configKey} limit 1
+        where config_key = #{configKey} top(1)
     </select>
     
     <insert id="insertConfig" parameterType="SysConfig">
@@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="configType != null and configType != ''">#{configType},</if>
 			<if test="createBy != null and createBy != ''">#{createBy},</if>
 			<if test="remark != null and remark != ''">#{remark},</if>
- 			sysdate()
+ 			getdate()
 		)
     </insert>
 	 
@@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="configType != null and configType != ''">config_type = #{configType},</if>
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
             <if test="remark != null">remark = #{remark},</if>
- 			update_time = sysdate()
+ 			update_time = getdate()
         </set>
         where config_id = #{configId}
     </update>

+ 7 - 7
RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			AND parent_id = #{parentId}
 		</if>
 		<if test="deptName != null and deptName != ''">
-			AND dept_name like concat('%', #{deptName}, '%')
+			AND dept_name like '%'+#{deptName}+'%'
 		</if>
 		<if test="status != null and status != ''">
 			AND status = #{status}
@@ -71,20 +71,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
 	<select id="hasChildByDeptId" parameterType="Long" resultType="int">
 		select count(1) from sys_dept
-		where del_flag = '0' and parent_id = #{deptId} limit 1
+		where del_flag = '0' and parent_id = #{deptId} top(1)
 	</select>
 	
 	<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
-		select * from sys_dept where find_in_set(#{deptId}, ancestors)
+		select * from sys_dept where charindex (',' + CONVERT (VARCHAR, #{deptId}), ',' + ancestors) > 0
 	</select>
 	
 	<select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
-		select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors)
+		select count(*) from sys_dept where status = 0 and del_flag = '0' and charindex (',' + CONVERT (VARCHAR, #{deptId}), ',' + ancestors) > 0
 	</select>
 	
 	<select id="checkDeptNameUnique" resultMap="SysDeptResult">
 	    <include refid="selectDeptVo"/>
-		where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
+		where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' top(1)
 	</select>
     
     <insert id="insertDept" parameterType="SysDept">
@@ -111,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="email != null and email != ''">#{email},</if>
  			<if test="status != null">#{status},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			getdate()
  		)
 	</insert>
 	
@@ -127,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="email != null">email = #{email},</if>
  			<if test="status != null and status != ''">status = #{status},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
+ 			update_time = getdate()
  		</set>
  		where dept_id = #{deptId}
 	</update>

+ 3 - 3
RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml

@@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 				AND dict_type = #{dictType}
 			</if>
 			<if test="dictLabel != null and dictLabel != ''">
-				AND dict_label like concat('%', #{dictLabel}, '%')
+				AND dict_label like '%'+#{dictLabel}+'%'
 			</if>
 			<if test="status != null and status != ''">
 				AND status = #{status}
@@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null">status = #{status},</if>
  			<if test="remark != null">remark = #{remark},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
+ 			update_time = getdate()
  		</set>
  		where dict_code = #{dictCode}
 	</update>
@@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null">#{status},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			getdate()
  		)
 	</insert>
 	

+ 7 - 7
RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml

@@ -24,19 +24,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	    <include refid="selectDictTypeVo"/>
 		<where>
 		    <if test="dictName != null and dictName != ''">
-				AND dict_name like concat('%', #{dictName}, '%')
+				AND dict_name like '%'+#{dictName}+'%'
 			</if>
 			<if test="status != null and status != ''">
 				AND status = #{status}
 			</if>
 			<if test="dictType != null and dictType != ''">
-				AND dict_type like concat('%', #{dictType}, '%')
+				AND dict_type like '%'+#{dictType}+'%'
 			</if>
 			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-				and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+				and DATEDIFF(day, create_time , #{params.endTime}) &gt;= 0
 			</if>
 			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-				and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+				and DATEDIFF(day, create_time , #{params.endTime}) &lt;= 0
 			</if>
 	    </where>
 	</select>
@@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
 	<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
 		<include refid="selectDictTypeVo"/>
-		where dict_type = #{dictType} limit 1
+		where dict_type = #{dictType} top(1)
 	</select>
 	
 	<delete id="deleteDictTypeById" parameterType="Long">
@@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null">status = #{status},</if>
  			<if test="remark != null">remark = #{remark},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
+ 			update_time = getdate()
  		</set>
  		where dict_id = #{dictId}
 	</update>
@@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null">#{status},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			getdate()
  		)
 	</insert>
 	

+ 3 - 3
RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml

@@ -18,20 +18,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 	<insert id="insertLogininfor" parameterType="SysLogininfor">
 		insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time)
-		values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
+		values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, getdate())
 	</insert>
 	
 	<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
 		select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor
 		<where>
 			<if test="ipaddr != null and ipaddr != ''">
-				AND ipaddr like concat('%', #{ipaddr}, '%')
+				AND ipaddr like '%'+#{ipaddr}+'%'
 			</if>
 			<if test="status != null and status != ''">
 				AND status = #{status}
 			</if>
 			<if test="userName != null and userName != ''">
-				AND user_name like concat('%', #{userName}, '%')
+				AND user_name like '%'+#{userName}+'%'
 			</if>
 			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
 				AND login_time &gt;= #{params.beginTime}

+ 9 - 9
RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml

@@ -28,7 +28,7 @@
 	</resultMap>
 
 	<sql id="selectMenuVo">
-        select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time 
+        select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, isnull(perms,'') as perms, icon, create_time
 		from sys_menu
     </sql>
     
@@ -36,7 +36,7 @@
 		<include refid="selectMenuVo"/>
 		<where>
 			<if test="menuName != null and menuName != ''">
-				AND menu_name like concat('%', #{menuName}, '%')
+				AND menu_name like '%'+#{menuName}+'%'
 			</if>
 			<if test="visible != null and visible != ''">
 				AND visible = #{visible}
@@ -49,20 +49,20 @@
 	</select>
 	
 	<select id="selectMenuTreeAll" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
+		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, isnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
 		from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
 		order by m.parent_id, m.order_num
 	</select>
 	
 	<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
+		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, isnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
 		from sys_menu m
 		left join sys_role_menu rm on m.menu_id = rm.menu_id
 		left join sys_user_role ur on rm.role_id = ur.role_id
 		left join sys_role ro on ur.role_id = ro.role_id
 		where ur.user_id = #{params.userId}
 		<if test="menuName != null and menuName != ''">
-            AND m.menu_name like concat('%', #{menuName}, '%')
+            AND m.menu_name like '%'+#{menuName}+'%'
 		</if>
 		<if test="visible != null and visible != ''">
             AND m.visible = #{visible}
@@ -74,7 +74,7 @@
 	</select>
     
     <select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
+		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, isnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
 		from sys_menu m
 			 left join sys_role_menu rm on m.menu_id = rm.menu_id
 			 left join sys_user_role ur on rm.role_id = ur.role_id
@@ -129,7 +129,7 @@
 	
 	<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
 		<include refid="selectMenuVo"/>
-		where menu_name=#{menuName} and parent_id = #{parentId} limit 1
+		where menu_name=#{menuName} and parent_id = #{parentId} top(1)
 	</select>
 	
 	<update id="updateMenu" parameterType="SysMenu">
@@ -150,7 +150,7 @@
 			<if test="icon !=null and icon != ''">icon = #{icon},</if>
 			<if test="remark != null and remark != ''">remark = #{remark},</if>
 			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
-			update_time = sysdate()
+			update_time = getdate()
 		</set>
 		where menu_id = #{menuId}
 	</update>
@@ -191,7 +191,7 @@
 		<if test="icon != null and icon != ''">#{icon},</if>
 		<if test="remark != null and remark != ''">#{remark},</if>
 		<if test="createBy != null and createBy != ''">#{createBy},</if>
-		sysdate()
+		getdate()
 		)
 	</insert>
 	

+ 4 - 4
RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml

@@ -31,13 +31,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectNoticeVo"/>
         <where>
 			<if test="noticeTitle != null and noticeTitle != ''">
-				AND notice_title like concat('%', #{noticeTitle}, '%')
+				AND notice_title like '%'+#{noticeTitle}+'%'
 			</if>
 			<if test="noticeType != null and noticeType != ''">
 				AND notice_type = #{noticeType}
 			</if>
 			<if test="createBy != null and createBy != ''">
-				AND create_by like concat('%', #{createBy}, '%')
+				AND create_by like '%'+#{createBy}+'%'
 			</if>
 		</where>
     </select>
@@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="status != null and status != ''">#{status}, </if>
 			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			getdate()
 		)
     </insert>
 	 
@@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="noticeContent != null">notice_content = #{noticeContent}, </if>
             <if test="status != null and status != ''">status = #{status}, </if>
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
+ 			update_time = getdate()
         </set>
         where notice_id = #{noticeId}
     </update>

+ 4 - 4
RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml

@@ -31,17 +31,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
 	<insert id="insertOperlog" parameterType="SysOperLog">
 		insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time)
-        values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate())
+        values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, getdate())
 	</insert>
 	
 	<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
 		<include refid="selectOperLogVo"/>
 		<where>
 			<if test="operIp != null and operIp != ''">
-				AND oper_ip like concat('%', #{operIp}, '%')
+				AND oper_ip like '%'+#{operIp}+'%'
 			</if>
 			<if test="title != null and title != ''">
-				AND title like concat('%', #{title}, '%')
+				AND title like '%'+#{title}+'%'
 			</if>
 			<if test="businessType != null">
 				AND business_type = #{businessType}
@@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 				AND status = #{status}
 			</if>
 			<if test="operName != null and operName != ''">
-				AND oper_name like concat('%', #{operName}, '%')
+				AND oper_name like '%'+#{operName}+'%'
 			</if>
 			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
 				AND oper_time &gt;= #{params.beginTime}

+ 6 - 6
RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml

@@ -26,13 +26,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	    <include refid="selectPostVo"/>
 		<where>
 			<if test="postCode != null and postCode != ''">
-				AND post_code like concat('%', #{postCode}, '%')
+				AND post_code like '%'+#{postCode}+'%'
 			</if>
 			<if test="status != null and status != ''">
 				AND status = #{status}
 			</if>
 			<if test="postName != null and postName != ''">
-				AND post_name like concat('%', #{postName}, '%')
+				AND post_name like  '%'+#{postName}+'%'
 			</if>
 		</where>
 	</select>
@@ -64,12 +64,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
 	<select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult">
 		<include refid="selectPostVo"/>
-		 where post_name=#{postName} limit 1
+		 where post_name=#{postName} top(1)
 	</select>
 	
 	<select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult">
 		<include refid="selectPostVo"/>
-		 where post_code=#{postCode} limit 1
+		 where post_code=#{postCode} top(1)
 	</select>
 	
 	<update id="updatePost" parameterType="SysPost">
@@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null and status != ''">status = #{status},</if>
  			<if test="remark != null">remark = #{remark},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
+ 			update_time = getdate()
  		</set>
  		where post_id = #{postId}
 	</update>
@@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null and status != ''">#{status},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			getdate()
  		)
 	</insert>
 	

+ 8 - 8
RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml

@@ -37,19 +37,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			AND r.role_id = #{roleId}
 		</if>
 		<if test="roleName != null and roleName != ''">
-			AND r.role_name like concat('%', #{roleName}, '%')
+			AND r.role_name like '%'+ #{roleName} +'%'
 		</if>
 		<if test="status != null and status != ''">
 			AND r.status = #{status}
 		</if>
 		<if test="roleKey != null and roleKey != ''">
-			AND r.role_key like concat('%', #{roleKey}, '%')
+			AND r.role_key like '%'+ #{roleKey} +'%'
 		</if>
 		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-			and date_format(r.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+			and DATEDIFF(day, r.create_time , #{params.endTime}) &gt;= 0
 		</if>
 		<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-			and date_format(r.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+			and DATEDIFF(day, r.create_time , #{params.endTime}) &lt;= 0
 		</if>
 		<!-- 数据范围过滤 -->
 		${params.dataScope}
@@ -85,12 +85,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
 	<select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult">
 		<include refid="selectRoleVo"/>
-		 where r.role_name=#{roleName} and r.del_flag = '0' limit 1
+		 where r.role_name=#{roleName} and r.del_flag = '0' top(1)
 	</select>
 	
 	<select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult">
 		<include refid="selectRoleVo"/>
-		 where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
+		 where r.role_key=#{roleKey} and r.del_flag = '0' top(1)
 	</select>
 	
  	<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
@@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null and status != ''">#{status},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			getdate()
  		)
 	</insert>
 	
@@ -133,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null and status != ''">status = #{status},</if>
  			<if test="remark != null">remark = #{remark},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
+ 			update_time = getdate()
  		</set>
  		where role_id = #{roleId}
 	</update>

+ 14 - 14
RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -64,22 +64,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			AND u.user_id = #{userId}
 		</if>
 		<if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
+			AND u.user_name like '%'+#{userName}+'%'
 		</if>
 		<if test="status != null and status != ''">
 			AND u.status = #{status}
 		</if>
 		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
+			AND u.phonenumber like '%'+#{phonenumber}+'%'
 		</if>
 		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-			AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+			AND DATEDIFF(day, u.create_time , #{params.endTime}) &gt;= 0
 		</if>
 		<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-			AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+			AND DATEDIFF(day, u.create_time , #{params.endTime}) &lt;= 0
 		</if>
 		<if test="deptId != null and deptId != 0">
-			AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
+			AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE  charindex (',' + CONVERT (VARCHAR, #{deptId}), ',' + ancestors) > 0 ))
 		</if>
 		<!-- 数据范围过滤 -->
 		${params.dataScope}
@@ -93,10 +93,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			 left join sys_role r on r.role_id = ur.role_id
 	    where u.del_flag = '0' and r.role_id = #{roleId}
 	    <if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
+			AND u.user_name like '%'+#{userName}+'%'
 		</if>
 		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
+			AND u.phonenumber like '%'+#{phonenumber}+'%'
 		</if>
 		<!-- 数据范围过滤 -->
 		${params.dataScope}
@@ -111,10 +111,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	    where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
 	    and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
 	    <if test="userName != null and userName != ''">
-			AND u.user_name like concat('%', #{userName}, '%')
+			AND u.user_name like '%'+#{userName}+'%'
 		</if>
 		<if test="phonenumber != null and phonenumber != ''">
-			AND u.phonenumber like concat('%', #{phonenumber}, '%')
+			AND u.phonenumber like '%'+#{phonenumber}+'%'
 		</if>
 		<!-- 数据范围过滤 -->
 		${params.dataScope}
@@ -131,15 +131,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</select>
 	
 	<select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult">
-		select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1
+		select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' top(1)
 	</select>
 	
 	<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
-		select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1
+		select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' top(1)
 	</select>
 	
 	<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
-		select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
+		select user_id, email from sys_user where email = #{email} and del_flag = '0' top(1)
 	</select>
 	
 	<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
@@ -170,7 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null and status != ''">#{status},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
- 			sysdate()
+ 			getdate()
  		)
 	</insert>
 	
@@ -190,7 +190,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="loginDate != null">login_date = #{loginDate},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  			<if test="remark != null">remark = #{remark},</if>
- 			update_time = sysdate()
+ 			update_time = getdate()
  		</set>
  		where user_id = #{userId}
 	</update>

+ 1 - 1
RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/TGoodsMapper.xml

@@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 left join t_kufang tk on tg.kufang_id = tk.id
             </if>
             <where>
-                <if test="goodsName != null  and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
+                <if test="goodsName != null  and goodsName != ''"> and goods_name like '%'+#{goodsName}+'%' </if>
                 <if test="goodsType != null  and goodsType != ''"> and goods_type = #{goodsType}</if>
                 <if test="goodsUnit != null  and goodsUnit != ''"> and goods_unit = #{goodsUnit}</if>
                 <if test="goodsNum != null "> and goods_num = #{goodsNum}</if>

+ 1 - 1
RuoYi-Vue-v3.8.7/ruoyi-system/src/main/resources/mapper/system/TKufangMapper.xml

@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectTKufangList" parameterType="TKufang" resultMap="TKufangResult">
         <include refid="selectTKufangVo"/>
         <where>  
-            <if test="kfName != null  and kfName != ''"> and kf_name like concat('%', #{kfName}, '%')</if>
+            <if test="kfName != null  and kfName != ''"> and kf_name like '%'+#{kfName}+'%'</if>
             <if test="kfAddress != null  and kfAddress != ''"> and kf_address = #{kfAddress}</if>
             <if test="kfAdmin != null "> and kf_admin = #{kfAdmin}</if>
         </where>