Explorar el Código

提交5.7转8.0的sql识别报错问题

hxl13994548489 hace 2 años
padre
commit
937d88c1e7

+ 7 - 7
src/main/resources/mapper/modules/admin/SysUserLinkPtlAgreementMapper.xml

@@ -5,8 +5,8 @@
 <mapper namespace="com.ydtech.modules.admin.dao.SysUserLinkPtlAgreementMapper">
     <sql id="Base_Column_List">
         link.id as id,
-            user.id as "sysUser.id",
-            user.name as "sysUser.name",
+            u.id as "sysUser.id",
+            u.name as "sysUser.name",
             t2.id AS "sysUser.deptId",
             t2.`name` AS "sysUser.deptName",
             agree.id as  "ptlAgreement.id",
@@ -41,8 +41,8 @@
           <include refid="Base_Column_List"/>
         FROM
         sys_user_link_pl_agreement link
-        LEFT JOIN sys_user USER ON link.user_id = USER.id
-        LEFT JOIN sys_dept t2 ON USER.dept_id = t2.id
+        LEFT JOIN sys_user u ON link.user_id = u.id
+        LEFT JOIN sys_dept t2 ON u.dept_id = t2.id
         LEFT JOIN sys_dept sd2 ON sd2.id = t2.parent_id
         LEFT JOIN ptl_agreement agree ON link.ptl_agreement_id = agree.id
         left join esm_ins_company com on com.id = agree.partner_companies_id
@@ -51,7 +51,7 @@
                 and  link.user_id =  #{vo.userId}
             </if>
             <if test="vo.userName != null and vo.userName != ''">
-                and  USER.name  like CONCAT('%', #{vo.userName}, '%')
+                and  u.name  like CONCAT('%', #{vo.userName}, '%')
             </if>
             <if test="ids != null and ids.size>0">
                 and  agree.partner_companies_id in
@@ -73,8 +73,8 @@
              <include refid="Base_Column_List"/>
         FROM
         sys_user_link_pl_agreement link
-        LEFT JOIN sys_user USER ON link.user_id = USER.id
-        LEFT JOIN sys_dept t2 ON USER.dept_id = t2.id
+        LEFT JOIN sys_user u ON link.user_id = u.id
+        LEFT JOIN sys_dept t2 ON u.dept_id = t2.id
         LEFT JOIN sys_dept sd2 ON sd2.id = t2.parent_id
         LEFT JOIN ptl_agreement agree ON link.ptl_agreement_id = agree.id
         left join esm_ins_company com on link.id = agree.partner_companies_id