Browse Source

Merge branch 'feature-refactor' of ssh://10.10.100.21/source/platform-bi-server into feature-refactor

zhuth 6 years ago
parent
commit
571ba6dc7f

+ 4 - 3
bi-server/src/main/java/com/usoftchina/bi/server/dao/user/UserMapper.java

@@ -45,18 +45,19 @@ public interface UserMapper {
      * @param userList
      */
     @Insert("<script>"
-            + "INSERT INTO BI_USERS(BU_ID, BU_NAME, BU_POST,BU_ROLE, USER_NAME, PASS_WORD, BU_DEPARTMENT, CREATE_DATE) "
+            + "INSERT INTO BI_USERS(BU_ID, BU_NAME, BU_POST,BU_ROLE, USER_NAME, PASS_WORD, BU_DEPARTMENT, CREATE_DATE,BU_PHONE) "
             + "SELECT M.* FROM ("
             +   "<foreach collection=\"list\" item=\"item\" index=\"index\" separator=\"UNION ALL\">"
             +       "SELECT "
             +           "#{item.id, jdbcType=INTEGER},"
             +           "#{item.name, jdbcType=VARCHAR},"
             +           "#{item.post, jdbcType=VARCHAR},"
-            +           "#{item.role, jdbcType=VARCHAR},"
+            +           "case when #{item.role, jdbcType=VARCHAR} = 'admin' then 'superAdmin' else #{item.role, jdbcType=VARCHAR} end,"
             +           "#{item.userName, jdbcType=VARCHAR},"
             +           "#{item.passWord, jdbcType=VARCHAR},"
             +           "#{item.department, jdbcType=VARCHAR},"
-            +           "SYSDATE "
+            +           "SYSDATE, "
+            +           "#{item.phone, jdbcType=VARCHAR} "
             +       "FROM DUAL"
             +   "</foreach>"
             + ")M"