admin
2025-02-10 110d303eb11f26382ebaf00aff060a97e5f779c8
-数据库修改为sqlserver
已修改20个文件
1420 ■■■■ 文件已修改
billion-admin/pom.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-admin/src/main/resources/application-druid.yml 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-admin/src/main/resources/application.yml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-generator/src/main/java/com/billion/generator/controller/GenController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-generator/src/main/resources/mapper/generator/GenTableMapper.xml 285 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-system/src/main/resources/mapper/system/SysConfigMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-system/src/main/resources/mapper/system/SysDeptMapper.xml 185 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-system/src/main/resources/mapper/system/SysDictDataMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-system/src/main/resources/mapper/system/SysDictTypeMapper.xml 119 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-system/src/main/resources/mapper/system/SysLogininforMapper.xml 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-system/src/main/resources/mapper/system/SysMenuMapper.xml 95 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-system/src/main/resources/mapper/system/SysNoticeMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-system/src/main/resources/mapper/system/SysOperLogMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-system/src/main/resources/mapper/system/SysPostMapper.xml 128 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-system/src/main/resources/mapper/system/SysRoleMapper.xml 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-system/src/main/resources/mapper/system/SysUserMapper.xml 300 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-ui/src/plugins/download.js 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-ui/src/utils/ruoyi.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
billion-admin/pom.xml
@@ -43,6 +43,12 @@
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <!--sqlserver数据库配置-->
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
        </dependency>
        <!-- 核心模块-->
        <dependency>
            <groupId>com.billion</groupId>
billion-admin/src/main/resources/application-druid.yml
@@ -2,30 +2,20 @@
spring:
    datasource:
        type: com.alibaba.druid.pool.DruidDataSource
        driverClassName: com.mysql.cj.jdbc.Driver
        druid:
            # 主库数据源
            master:
                url: jdbc:mysql://127.0.0.1:3306/billion-db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                username: root
                password: 123456
#            master:
#                url: jdbc:mysql://127.0.0.1:3306/billion-db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
#                username: root
#                password: 123456
            # 从库数据源
#            slave:
#                # 从数据源开关/默认关闭
#                enabled: false
#                url: jdbc:mysql://127.0.0.1:3306/billion-db-self?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
#                username: root
#                password: root
                driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
                url: jdbc:sqlserver://183.134.244.158:1433;DatabaseName=billion-db
                username: sa
                password: JCDM@2023
#                password: admin@123
            # 初始连接数
            initialSize: 5
            initialSize: 10
            # 最小连接池数量
            minIdle: 10
            minIdle: 20
            # 最大连接池数量
            maxActive: 20
            maxActive: 200
            # 配置获取连接等待超时的时间
            maxWait: 60000
            # 配置连接超时时间
@@ -39,11 +29,15 @@
            # 配置一个连接在池中最大生存的时间,单位是毫秒
            maxEvictableIdleTimeMillis: 900000
            # 配置检测连接是否有效
            validationQuery: SELECT 1 FROM DUAL
            validationQuery: SELECT 1
            testWhileIdle: true
            testOnBorrow: false
            testOnBorrow: true
            testOnReturn: false
            webStatFilter:
            # 缓存游标,默认false
            poolPreparedStatements: true
            # 缓存游标最大数量,默认-1(不缓存)
            max-open-prepared-statements: 50
            webStatFilter:
                enabled: true
            statViewServlet:
                enabled: true
@@ -58,8 +52,16 @@
                    enabled: true
                    # 慢SQL记录
                    log-slow-sql: true
                    slow-sql-millis: 1000
                    slow-sql-millis: 2000
                    merge-sql: true
                wall:
                    config:
                        multi-statement-allow: true
                        multi-statement-allow: true
            #连接出错后再尝试连接三次
            connection-error-retry-attempts: 3
            #超过时间限制是否回收
            remove-abandoned: true
            #超时时间;单位为秒。180秒=3分钟
            remove-abandoned-timeout: 20
            #关闭abanded连接时输出错误日志
            log-abandoned: false
billion-admin/src/main/resources/application.yml
@@ -150,9 +150,10 @@
# PageHelper分页插件
pagehelper:
  helperDialect: mysql
  #  helperDialect: mysql
  supportMethodsArguments: true
  params: count=countSql
  autoRuntimeDialect: true
# Swagger配置
swagger:
billion-generator/src/main/java/com/billion/generator/controller/GenController.java
@@ -254,7 +254,7 @@
        response.reset();
        response.addHeader("Access-Control-Allow-Origin", "*");
        response.addHeader("Access-Control-Expose-Headers", "Content-Disposition");
        response.setHeader("Content-Disposition", "attachment; filename=\"ruoyi.zip\"");
        response.setHeader("Content-Disposition", "attachment; filename=\"billion.zip\"");
        response.addHeader("Content-Length", "" + data.length);
        response.setContentType("application/octet-stream; charset=UTF-8");
        IOUtils.write(data, response.getOutputStream());
billion-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.billion.generator.mapper.GenTableColumnMapper">
    <resultMap type="GenTableColumn" id="GenTableColumnResult">
@@ -29,7 +29,7 @@
        <result property="updateTime"     column="update_time"    />
    </resultMap>
    <sql id="selectGenTableColumnVo">
    <sql id="selectGenTableColumnVo">
        select column_id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type, html_type, dict_type, sort, create_by, create_time, update_by, update_time from gen_table_column
    </sql>
@@ -40,72 +40,98 @@
    </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>
        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 as 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">
        insert into gen_table_column (
            <if test="tableId != null and tableId != ''">table_id,</if>
            <if test="columnName != null and columnName != ''">column_name,</if>
            <if test="columnComment != null and columnComment != ''">column_comment,</if>
            <if test="columnType != null and columnType != ''">column_type,</if>
            <if test="javaType != null and javaType != ''">java_type,</if>
            <if test="javaField != null  and javaField != ''">java_field,</if>
            <if test="isPk != null and isPk != ''">is_pk,</if>
            <if test="isIncrement != null and isIncrement != ''">is_increment,</if>
            <if test="isRequired != null and isRequired != ''">is_required,</if>
            <if test="isInsert != null and isInsert != ''">is_insert,</if>
            <if test="isEdit != null and isEdit != ''">is_edit,</if>
            <if test="isList != null and isList != ''">is_list,</if>
            <if test="isQuery != null and isQuery != ''">is_query,</if>
            <if test="queryType != null and queryType != ''">query_type,</if>
            <if test="htmlType != null and htmlType != ''">html_type,</if>
            <if test="dictType != null and dictType != ''">dict_type,</if>
            <if test="sort != null">sort,</if>
            <if test="createBy != null and createBy != ''">create_by,</if>
            create_time
         )values(
            <if test="tableId != null and tableId != ''">#{tableId},</if>
            <if test="columnName != null and columnName != ''">#{columnName},</if>
            <if test="columnComment != null and columnComment != ''">#{columnComment},</if>
            <if test="columnType != null and columnType != ''">#{columnType},</if>
            <if test="javaType != null and javaType != ''">#{javaType},</if>
            <if test="javaField != null and javaField != ''">#{javaField},</if>
            <if test="isPk != null and isPk != ''">#{isPk},</if>
            <if test="isIncrement != null and isIncrement != ''">#{isIncrement},</if>
            <if test="isRequired != null and isRequired != ''">#{isRequired},</if>
            <if test="isInsert != null and isInsert != ''">#{isInsert},</if>
            <if test="isEdit != null and isEdit != ''">#{isEdit},</if>
            <if test="isList != null and isList != ''">#{isList},</if>
            <if test="isQuery != null and isQuery != ''">#{isQuery},</if>
            <if test="queryType != null and queryType != ''">#{queryType},</if>
            <if test="htmlType != null and htmlType != ''">#{htmlType},</if>
            <if test="dictType != null and dictType != ''">#{dictType},</if>
            <if test="sort != null">#{sort},</if>
            <if test="createBy != null and createBy != ''">#{createBy},</if>
            sysdate()
         )
        <if test="tableId != null and tableId != ''">table_id,</if>
        <if test="columnName != null and columnName != ''">column_name,</if>
        <if test="columnComment != null and columnComment != ''">column_comment,</if>
        <if test="columnType != null and columnType != ''">column_type,</if>
        <if test="javaType != null and javaType != ''">java_type,</if>
        <if test="javaField != null  and javaField != ''">java_field,</if>
        <if test="isPk != null and isPk != ''">is_pk,</if>
        <if test="isIncrement != null and isIncrement != ''">is_increment,</if>
        <if test="isRequired != null and isRequired != ''">is_required,</if>
        <if test="isInsert != null and isInsert != ''">is_insert,</if>
        <if test="isEdit != null and isEdit != ''">is_edit,</if>
        <if test="isList != null and isList != ''">is_list,</if>
        <if test="isQuery != null and isQuery != ''">is_query,</if>
        <if test="queryType != null and queryType != ''">query_type,</if>
        <if test="htmlType != null and htmlType != ''">html_type,</if>
        <if test="dictType != null and dictType != ''">dict_type,</if>
        <if test="sort != null">sort,</if>
        <if test="createBy != null and createBy != ''">create_by,</if>
        create_time
        )values(
        <if test="tableId != null and tableId != ''">#{tableId},</if>
        <if test="columnName != null and columnName != ''">#{columnName},</if>
        <if test="columnComment != null and columnComment != ''">#{columnComment},</if>
        <if test="columnType != null and columnType != ''">#{columnType},</if>
        <if test="javaType != null and javaType != ''">#{javaType},</if>
        <if test="javaField != null and javaField != ''">#{javaField},</if>
        <if test="isPk != null and isPk != ''">#{isPk},</if>
        <if test="isIncrement != null and isIncrement != ''">#{isIncrement},</if>
        <if test="isRequired != null and isRequired != ''">#{isRequired},</if>
        <if test="isInsert != null and isInsert != ''">#{isInsert},</if>
        <if test="isEdit != null and isEdit != ''">#{isEdit},</if>
        <if test="isList != null and isList != ''">#{isList},</if>
        <if test="isQuery != null and isQuery != ''">#{isQuery},</if>
        <if test="queryType != null and queryType != ''">#{queryType},</if>
        <if test="htmlType != null and htmlType != ''">#{htmlType},</if>
        <if test="dictType != null and dictType != ''">#{dictType},</if>
        <if test="sort != null">#{sort},</if>
        <if test="createBy != null and createBy != ''">#{createBy},</if>
        getdate()
        )
    </insert>
    <update id="updateGenTableColumn" parameterType="GenTableColumn">
        update gen_table_column
        <set>
            is_insert = #{isInsert},
            is_edit = #{isEdit},
            is_list = #{isList},
            is_query = #{isQuery},
            is_required = #{isRequired},
            <if test="columnComment != null">column_comment = #{columnComment},</if>
            <if test="javaType != null">java_type = #{javaType},</if>
            <if test="javaField != null">java_field = #{javaField},</if>
            <if test="isInsert != null">is_insert = #{isInsert},</if>
            <if test="isEdit != null">is_edit = #{isEdit},</if>
            <if test="isList != null">is_list = #{isList},</if>
            <if test="isQuery != null">is_query = #{isQuery},</if>
            <if test="isRequired != null">is_required = #{isRequired},</if>
            <if test="queryType != null">query_type = #{queryType},</if>
            <if test="htmlType != null">html_type = #{htmlType},</if>
            <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>
billion-generator/src/main/resources/mapper/generator/GenTableMapper.xml
@@ -1,18 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.billion.generator.mapper.GenTableMapper">
    <resultMap type="GenTable" id="GenTableResult">
        <id     property="tableId"        column="table_id"          />
        <id     property="tableId"        column="table_id"          />
        <result property="tableName"      column="table_name"        />
        <result property="tableComment"   column="table_comment"     />
        <result property="subTableName"   column="sub_table_name"    />
        <result property="subTableFkName" column="sub_table_fk_name" />
        <result property="className"      column="class_name"        />
        <result property="tplCategory"    column="tpl_category"      />
        <result property="tplWebType"     column="tpl_web_type"      />
        <result property="packageName"    column="package_name"      />
        <result property="moduleName"     column="module_name"       />
        <result property="businessName"   column="business_name"     />
@@ -26,39 +25,39 @@
        <result property="updateBy"       column="update_by"         />
        <result property="updateTime"     column="update_time"       />
        <result property="remark"         column="remark"            />
        <collection  property="columns"   javaType="java.util.List"  resultMap="GenTableColumnResult" />
        <collection  property="columns"  javaType="java.util.List"  resultMap="GenTableColumnResult" />
    </resultMap>
    <resultMap type="GenTableColumn" id="GenTableColumnResult">
        <id     property="columnId"       column="column_id"      />
        <result property="tableId"        column="table_id"       />
        <result property="columnName"     column="column_name"    />
        <result property="columnComment"  column="column_comment" />
        <result property="columnType"     column="column_type"    />
        <result property="javaType"       column="java_type"      />
        <result property="javaField"      column="java_field"     />
        <result property="isPk"           column="is_pk"          />
        <result property="isIncrement"    column="is_increment"   />
        <result property="isRequired"     column="is_required"    />
        <result property="isInsert"       column="is_insert"      />
        <result property="isEdit"         column="is_edit"        />
        <result property="isList"         column="is_list"        />
        <result property="isQuery"        column="is_query"       />
        <result property="queryType"      column="query_type"     />
        <result property="htmlType"       column="html_type"      />
        <result property="dictType"       column="dict_type"      />
        <result property="sort"           column="sort"           />
        <result property="createBy"       column="create_by"      />
        <result property="createTime"     column="create_time"    />
        <result property="updateBy"       column="update_by"      />
        <result property="updateTime"     column="update_time"    />
    </resultMap>
        <id     property="columnId"       column="column_id"      />
        <result property="tableId"        column="table_id"       />
        <result property="columnName"     column="column_name"    />
        <result property="columnComment"  column="column_comment" />
        <result property="columnType"     column="column_type"    />
        <result property="javaType"       column="java_type"      />
        <result property="javaField"      column="java_field"     />
        <result property="isPk"           column="is_pk"          />
        <result property="isIncrement"    column="is_increment"   />
        <result property="isRequired"     column="is_required"    />
        <result property="isInsert"       column="is_insert"      />
        <result property="isEdit"         column="is_edit"        />
        <result property="isList"         column="is_list"        />
        <result property="isQuery"        column="is_query"       />
        <result property="queryType"      column="query_type"     />
        <result property="htmlType"       column="html_type"      />
        <result property="dictType"       column="dict_type"      />
        <result property="sort"           column="sort"           />
        <result property="createBy"       column="create_by"      />
        <result property="createTime"     column="create_time"    />
        <result property="updateBy"       column="update_by"      />
        <result property="updateTime"     column="update_time"    />
    </resultMap>
    <sql id="selectGenTableVo">
        select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, tpl_web_type, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table
    </sql>
    <select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult">
        select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table
    </sql>
    <select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult">
        <include refid="selectGenTableVo"/>
        <where>
            <if test="tableName != null and tableName != ''">
@@ -68,143 +67,161 @@
                AND lower(table_comment) like lower(concat('%', #{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 <![CDATA[ create_time >= convert(datetime, #{params.beginTime}, 20)]]>-->
                and datediff(d, create_time, #{params.beginTime}) <![CDATA[<=]]> 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 <![CDATA[ create_time <= convert(datetime, #{params.endTime}, 20)]]>-->
                and datediff(d, create_time, #{params.endTime}) <![CDATA[>=]]> 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 as table_name,
        sep.value as table_comment,
        so.create_date as create_time,
        so.modify_date as 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 LIKE 'act_%'  AND so.name NOT LIKE 'flw_%'
        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(so.name) like lower(concat('%', #{tableName}, '%'))
        </if>
        <if test="tableComment != null and tableComment != ''">
            AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
            AND lower(cast(sep.value as nvarchar)) like lower(concat('%', #{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 <![CDATA[ create_time >= convert(datetime, #{params.beginTime}, 20)]]>-->
            and datediff(d, so.create_date, #{params.beginTime}) <![CDATA[<=]]> 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 <![CDATA[ create_time <= convert(datetime, #{params.endTime}, 20)]]>-->
            and datediff(d, so.create_date, #{params.endTime}) <![CDATA[>=]]> 0
        </if>
        order by create_time desc
        order by so.create_date 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 NOT LIKE 'act_%'  AND so.name NOT LIKE 'flw_%'
        and SO.name in
        <foreach collection="array" item="name" open="(" separator="," close=")">
            #{name}
        </foreach>
    </select>
    <select id="selectTableByName" parameterType="String" resultMap="GenTableResult">
        select table_name, table_comment, create_time, update_time from information_schema.tables
        where table_comment <![CDATA[ <> ]]> '' and table_schema = (select database())
        and table_name = #{tableName}
          and table_name = #{tableName}
    </select>
    <select id="selectGenTableById" parameterType="Long" resultMap="GenTableResult">
        SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,
        SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,
               c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
        FROM gen_table t
             LEFT JOIN gen_table_column c ON t.table_id = c.table_id
                 LEFT JOIN gen_table_column c ON t.table_id = c.table_id
        where t.table_id = #{tableId} order by c.sort
    </select>
    <select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult">
        SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,
        SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark,
               c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
        FROM gen_table t
             LEFT JOIN gen_table_column c ON t.table_id = c.table_id
                 LEFT JOIN gen_table_column c ON t.table_id = c.table_id
        where t.table_name = #{tableName} order by c.sort
    </select>
    <select id="selectGenTableAll" parameterType="String" resultMap="GenTableResult">
        SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.options, t.remark,
        SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.options, t.remark,
               c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort
        FROM gen_table t
             LEFT JOIN gen_table_column c ON t.table_id = c.table_id
                 LEFT JOIN gen_table_column c ON t.table_id = c.table_id
        order by c.sort
    </select>
    <insert id="insertGenTable" parameterType="GenTable" useGeneratedKeys="true" keyProperty="tableId">
        insert into gen_table (
            <if test="tableName != null">table_name,</if>
            <if test="tableComment != null and tableComment != ''">table_comment,</if>
            <if test="className != null and className != ''">class_name,</if>
            <if test="tplCategory != null and tplCategory != ''">tpl_category,</if>
            <if test="tplWebType != null and tplWebType != ''">tpl_web_type,</if>
            <if test="packageName != null and packageName != ''">package_name,</if>
            <if test="moduleName != null and moduleName != ''">module_name,</if>
            <if test="businessName != null and businessName != ''">business_name,</if>
            <if test="functionName != null and functionName != ''">function_name,</if>
            <if test="functionAuthor != null and functionAuthor != ''">function_author,</if>
            <if test="genType != null and genType != ''">gen_type,</if>
            <if test="genPath != null and genPath != ''">gen_path,</if>
            <if test="remark != null and remark != ''">remark,</if>
             <if test="createBy != null and createBy != ''">create_by,</if>
            create_time
         )values(
            <if test="tableName != null">#{tableName},</if>
            <if test="tableComment != null and tableComment != ''">#{tableComment},</if>
            <if test="className != null and className != ''">#{className},</if>
            <if test="tplCategory != null and tplCategory != ''">#{tplCategory},</if>
            <if test="tplWebType != null and tplWebType != ''">#{tplWebType},</if>
            <if test="packageName != null and packageName != ''">#{packageName},</if>
            <if test="moduleName != null and moduleName != ''">#{moduleName},</if>
            <if test="businessName != null and businessName != ''">#{businessName},</if>
            <if test="functionName != null and functionName != ''">#{functionName},</if>
            <if test="functionAuthor != null and functionAuthor != ''">#{functionAuthor},</if>
            <if test="genType != null and genType != ''">#{genType},</if>
            <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()
         )
    </insert>
    <update id="createTable">
        ${sql}
    </update>
    <update id="updateGenTable" parameterType="GenTable">
        update gen_table
        <set>
            <if test="tableName != null">table_name = #{tableName},</if>
            <if test="tableComment != null and tableComment != ''">table_comment = #{tableComment},</if>
            <if test="subTableName != null">sub_table_name = #{subTableName},</if>
            <if test="subTableFkName != null">sub_table_fk_name = #{subTableFkName},</if>
            <if test="className != null and className != ''">class_name = #{className},</if>
            <if test="functionAuthor != null and functionAuthor != ''">function_author = #{functionAuthor},</if>
            <if test="genType != null and genType != ''">gen_type = #{genType},</if>
            <if test="genPath != null and genPath != ''">gen_path = #{genPath},</if>
            <if test="tplCategory != null and tplCategory != ''">tpl_category = #{tplCategory},</if>
            <if test="tplWebType != null and tplWebType != ''">tpl_web_type = #{tplWebType},</if>
            <if test="packageName != null and packageName != ''">package_name = #{packageName},</if>
            <if test="moduleName != null and moduleName != ''">module_name = #{moduleName},</if>
            <if test="businessName != null and businessName != ''">business_name = #{businessName},</if>
            <if test="functionName != null and functionName != ''">function_name = #{functionName},</if>
            <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()
        </set>
        where table_id = #{tableId}
    </update>
    <delete id="deleteGenTableByIds" parameterType="Long">
        delete from gen_table where table_id in
        <foreach collection="array" item="tableId" open="(" separator="," close=")">
            #{tableId}
        </foreach>
    </delete>
        insert into gen_table (
        <if test="tableName != null">table_name,</if>
        <if test="tableComment != null and tableComment != ''">table_comment,</if>
        <if test="className != null and className != ''">class_name,</if>
        <if test="tplCategory != null and tplCategory != ''">tpl_category,</if>
        <if test="packageName != null and packageName != ''">package_name,</if>
        <if test="moduleName != null and moduleName != ''">module_name,</if>
        <if test="businessName != null and businessName != ''">business_name,</if>
        <if test="functionName != null and functionName != ''">function_name,</if>
        <if test="functionAuthor != null and functionAuthor != ''">function_author,</if>
        <if test="genType != null and genType != ''">gen_type,</if>
        <if test="genPath != null and genPath != ''">gen_path,</if>
        <if test="remark != null and remark != ''">remark,</if>
        <if test="createBy != null and createBy != ''">create_by,</if>
        create_time
        )values(
        <if test="tableName != null">#{tableName},</if>
        <if test="tableComment != null and tableComment != ''">#{tableComment},</if>
        <if test="className != null and className != ''">#{className},</if>
        <if test="tplCategory != null and tplCategory != ''">#{tplCategory},</if>
        <if test="packageName != null and packageName != ''">#{packageName},</if>
        <if test="moduleName != null and moduleName != ''">#{moduleName},</if>
        <if test="businessName != null and businessName != ''">#{businessName},</if>
        <if test="functionName != null and functionName != ''">#{functionName},</if>
        <if test="functionAuthor != null and functionAuthor != ''">#{functionAuthor},</if>
        <if test="genType != null and genType != ''">#{genType},</if>
        <if test="genPath != null and genPath != ''">#{genPath},</if>
        <if test="remark != null and remark != ''">#{remark},</if>
        <if test="createBy != null and createBy != ''">#{createBy},</if>
        getdate()
        )
    </insert>
    <update id="updateGenTable" parameterType="GenTable">
        update gen_table
        <set>
            <if test="tableName != null">table_name = #{tableName},</if>
            <if test="tableComment != null and tableComment != ''">table_comment = #{tableComment},</if>
            <if test="subTableName != null">sub_table_name = #{subTableName},</if>
            <if test="subTableFkName != null">sub_table_fk_name = #{subTableFkName},</if>
            <if test="className != null and className != ''">class_name = #{className},</if>
            <if test="functionAuthor != null and functionAuthor != ''">function_author = #{functionAuthor},</if>
            <if test="genType != null and genType != ''">gen_type = #{genType},</if>
            <if test="genPath != null and genPath != ''">gen_path = #{genPath},</if>
            <if test="tplCategory != null and tplCategory != ''">tpl_category = #{tplCategory},</if>
            <if test="packageName != null and packageName != ''">package_name = #{packageName},</if>
            <if test="moduleName != null and moduleName != ''">module_name = #{moduleName},</if>
            <if test="businessName != null and businessName != ''">business_name = #{businessName},</if>
            <if test="functionName != null and functionName != ''">function_name = #{functionName},</if>
            <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 = getdate()
        </set>
        where table_id = #{tableId}
    </update>
    <delete id="deleteGenTableByIds" parameterType="Long">
        delete from gen_table where table_id in
        <foreach collection="array" item="tableId" open="(" separator="," close=")">
            #{tableId}
        </foreach>
    </delete>
</mapper>
billion-system/src/main/resources/mapper/system/SysConfigMapper.xml
@@ -51,10 +51,10 @@
                AND config_key like concat('%', #{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 date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
            </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 date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
            </if>
        </where>
    </select>
@@ -85,7 +85,7 @@
            <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 @@
            <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>
billion-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.billion.system.mapper.SysDeptMapper">
    <resultMap type="SysDept" id="SysDeptResult">
@@ -21,19 +21,19 @@
        <result property="updateBy"   column="update_by"   />
        <result property="updateTime" column="update_time" />
    </resultMap>
    <sql id="selectDeptVo">
        select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
        from sys_dept d
    </sql>
        select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
        from sys_dept d
    </sql>
    <select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
        <include refid="selectDeptVo"/>
        where d.del_flag = '0'
        <include refid="selectDeptVo"/>
        where d.del_flag = '0'
        <if test="deptId != null and deptId != 0">
            AND dept_id = #{deptId}
        </if>
        <if test="parentId != null and parentId != 0">
        <if test="parentId != null and parentId != 0">
            AND parent_id = #{parentId}
        </if>
        <if test="deptName != null and deptName != ''">
@@ -45,113 +45,114 @@
        <!-- 数据范围过滤 -->
        ${params.dataScope}
        order by d.parent_id, d.order_num
    </select>
    <select id="selectDeptListByRoleId" resultType="Long">
    </select>
    <select id="selectDeptListByRoleId" resultType="Long">
        select d.dept_id
        from sys_dept d
            left join sys_role_dept rd on d.dept_id = rd.dept_id
        where rd.role_id = #{roleId}
            <if test="deptCheckStrictly">
              and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
            </if>
        left join sys_role_dept rd on d.dept_id = rd.dept_id
        where rd.role_id = #{roleId}
        <if test="deptCheckStrictly">
            and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
        </if>
        order by d.parent_id, d.order_num
    </select>
    <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
    <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
        select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,
            (select dept_name from sys_dept where dept_id = d.parent_id) parent_name
               (select dept_name from sys_dept where dept_id = d.parent_id) parent_name
        from sys_dept d
        where d.dept_id = #{deptId}
    </select>
    <select id="checkDeptExistUser" parameterType="Long" resultType="int">
    <select id="checkDeptExistUser" parameterType="Long" resultType="int">
        select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'
    </select>
    <select id="hasChildByDeptId" parameterType="Long" resultType="int">
        select count(1) from sys_dept
        where del_flag = '0' and parent_id = #{deptId} limit 1
        select top(1) count(1) from sys_dept
        where del_flag = '0' and parent_id = #{deptId}
    </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(nvarchar, #{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(nvarchar, #{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
        select top(1) d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
        from sys_dept d
        where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0'
    </select>
    <insert id="insertDept" parameterType="SysDept">
         insert into sys_dept(
             <if test="deptId != null and deptId != 0">dept_id,</if>
             <if test="parentId != null and parentId != 0">parent_id,</if>
             <if test="deptName != null and deptName != ''">dept_name,</if>
             <if test="ancestors != null and ancestors != ''">ancestors,</if>
             <if test="orderNum != null">order_num,</if>
             <if test="leader != null and leader != ''">leader,</if>
             <if test="phone != null and phone != ''">phone,</if>
             <if test="email != null and email != ''">email,</if>
             <if test="status != null">status,</if>
             <if test="createBy != null and createBy != ''">create_by,</if>
             create_time
         )values(
             <if test="deptId != null and deptId != 0">#{deptId},</if>
             <if test="parentId != null and parentId != 0">#{parentId},</if>
             <if test="deptName != null and deptName != ''">#{deptName},</if>
             <if test="ancestors != null and ancestors != ''">#{ancestors},</if>
             <if test="orderNum != null">#{orderNum},</if>
             <if test="leader != null and leader != ''">#{leader},</if>
             <if test="phone != null and phone != ''">#{phone},</if>
             <if test="email != null and email != ''">#{email},</if>
             <if test="status != null">#{status},</if>
             <if test="createBy != null and createBy != ''">#{createBy},</if>
             sysdate()
         )
    <insert id="insertDept" parameterType="SysDept">
        insert into sys_dept(
        <if test="deptId != null and deptId != 0">dept_id,</if>
        <if test="parentId != null and parentId != 0">parent_id,</if>
        <if test="deptName != null and deptName != ''">dept_name,</if>
        <if test="ancestors != null and ancestors != ''">ancestors,</if>
        <if test="orderNum != null">order_num,</if>
        <if test="leader != null and leader != ''">leader,</if>
        <if test="phone != null and phone != ''">phone,</if>
        <if test="email != null and email != ''">email,</if>
        <if test="status != null">status,</if>
        <if test="createBy != null and createBy != ''">create_by,</if>
        create_time
        )values(
        <if test="deptId != null and deptId != 0">#{deptId},</if>
        <if test="parentId != null and parentId != 0">#{parentId},</if>
        <if test="deptName != null and deptName != ''">#{deptName},</if>
        <if test="ancestors != null and ancestors != ''">#{ancestors},</if>
        <if test="orderNum != null">#{orderNum},</if>
        <if test="leader != null and leader != ''">#{leader},</if>
        <if test="phone != null and phone != ''">#{phone},</if>
        <if test="email != null and email != ''">#{email},</if>
        <if test="status != null">#{status},</if>
        <if test="createBy != null and createBy != ''">#{createBy},</if>
        getdate()
        )
    </insert>
    <update id="updateDept" parameterType="SysDept">
         update sys_dept
         <set>
             <if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
             <if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
             <if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
             <if test="orderNum != null">order_num = #{orderNum},</if>
             <if test="leader != null">leader = #{leader},</if>
             <if test="phone != null">phone = #{phone},</if>
             <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()
         </set>
         where dept_id = #{deptId}
        update sys_dept
        <set>
            <if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
            <if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
            <if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
            <if test="orderNum != null">order_num = #{orderNum},</if>
            <if test="leader != null">leader = #{leader},</if>
            <if test="phone != null">phone = #{phone},</if>
            <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 = getdate()
        </set>
        where dept_id = #{deptId}
    </update>
    <update id="updateDeptChildren" parameterType="java.util.List">
        update sys_dept set ancestors =
        <foreach collection="depts" item="item" index="index"
            separator=" " open="case dept_id" close="end">
            when #{item.deptId} then #{item.ancestors}
        </foreach>
        where dept_id in
        <foreach collection="depts" item="item" index="index"
            separator="," open="(" close=")">
            #{item.deptId}
        </foreach>
        update sys_dept set ancestors =
        <foreach collection="depts" item="item" index="index"
                 separator=" " open="case dept_id" close="end">
            when #{item.deptId} then #{item.ancestors}
        </foreach>
        where dept_id in
        <foreach collection="depts" item="item" index="index"
                 separator="," open="(" close=")">
            #{item.deptId}
        </foreach>
    </update>
    <update id="updateDeptStatusNormal" parameterType="Long">
         update sys_dept set status = '0' where dept_id in
         <foreach collection="array" item="deptId" open="(" separator="," close=")">
            #{deptId}
        </foreach>
        update sys_dept set status = '0' where dept_id in
        <foreach collection="array" item="deptId" open="(" separator="," close=")">
            #{deptId}
        </foreach>
    </update>
    <delete id="deleteDeptById" parameterType="Long">
        update sys_dept set del_flag = '2' where dept_id = #{deptId}
    </delete>
billion-system/src/main/resources/mapper/system/SysDictDataMapper.xml
@@ -41,7 +41,7 @@
        order by dict_sort asc
    </select>
    
    <select id="selectDictDataByType" parameterType="String" resultMap="SysDictDataResult">
    <select id="selectDictDataByType" parameterType="SysDictData" resultMap="SysDictDataResult">
        <include refid="selectDictDataVo"/>
        where status = '0' and dict_type = #{dictType} order by dict_sort asc
    </select>
@@ -84,7 +84,7 @@
             <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 @@
             <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>
    
billion-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.billion.system.mapper.SysDictTypeMapper">
    <resultMap type="SysDictType" id="SysDictTypeResult">
@@ -14,16 +14,16 @@
        <result property="updateBy"   column="update_by"   />
        <result property="updateTime" column="update_time" />
    </resultMap>
    <sql id="selectDictTypeVo">
        select dict_id, dict_name, dict_type, status, create_by, create_time, remark
        select dict_id, dict_name, dict_type, status, create_by, create_time, remark
        from sys_dict_type
    </sql>
    </sql>
    <select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
        <include refid="selectDictTypeVo"/>
        <include refid="selectDictTypeVo"/>
        <where>
            <if test="dictName != null and dictName != ''">
            <if test="dictName != null and dictName != ''">
                AND dict_name like concat('%', #{dictName}, '%')
            </if>
            <if test="status != null and status != ''">
@@ -33,73 +33,76 @@
                AND dict_type like concat('%', #{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 <![CDATA[ create_time >= convert(datetime, #{params.beginTime}, 20)]]>-->
                and datediff(d, create_time, #{params.beginTime}) <![CDATA[<=]]> 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 <![CDATA[ create_time <= convert(datetime, #{params.endTime}, 20)]]>-->
                and datediff(d, create_time, #{params.endTime}) <![CDATA[>=]]> 0
            </if>
        </where>
        </where>
    </select>
    <select id="selectDictTypeAll" resultMap="SysDictTypeResult">
        <include refid="selectDictTypeVo"/>
    </select>
    <select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult">
        <include refid="selectDictTypeVo"/>
        where dict_id = #{dictId}
    </select>
    <select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult">
        <include refid="selectDictTypeVo"/>
        where dict_type = #{dictType}
    </select>
    <select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
        <include refid="selectDictTypeVo"/>
        where dict_type = #{dictType} limit 1
    </select>
    <delete id="deleteDictTypeById" parameterType="Long">
         delete from sys_dict_type where dict_id = #{dictId}
     </delete>
     <delete id="deleteDictTypeByIds" parameterType="Long">
         delete from sys_dict_type where dict_id in
         <foreach collection="array" item="dictId" open="(" separator="," close=")">
             #{dictId}
        </foreach>
     </delete>
     <update id="updateDictType" parameterType="SysDictType">
         update sys_dict_type
         <set>
             <if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
             <if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
             <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()
         </set>
         where dict_id = #{dictId}
    <select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
        select top(1) dict_id, dict_name, dict_type, status, create_by, create_time, remark
        from sys_dict_type
        where dict_type = #{dictType}
    </select>
    <delete id="deleteDictTypeById" parameterType="Long">
        delete from sys_dict_type where dict_id = #{dictId}
    </delete>
    <delete id="deleteDictTypeByIds" parameterType="Long">
        delete from sys_dict_type where dict_id in
        <foreach collection="array" item="dictId" open="(" separator="," close=")">
            #{dictId}
        </foreach>
    </delete>
    <update id="updateDictType" parameterType="SysDictType">
        update sys_dict_type
        <set>
            <if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
            <if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
            <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 = getdate()
        </set>
        where dict_id = #{dictId}
    </update>
     <insert id="insertDictType" parameterType="SysDictType">
         insert into sys_dict_type(
             <if test="dictName != null and dictName != ''">dict_name,</if>
             <if test="dictType != null and dictType != ''">dict_type,</if>
             <if test="status != null">status,</if>
             <if test="remark != null and remark != ''">remark,</if>
             <if test="createBy != null and createBy != ''">create_by,</if>
             create_time
         )values(
             <if test="dictName != null and dictName != ''">#{dictName},</if>
             <if test="dictType != null and dictType != ''">#{dictType},</if>
             <if test="status != null">#{status},</if>
             <if test="remark != null and remark != ''">#{remark},</if>
             <if test="createBy != null and createBy != ''">#{createBy},</if>
             sysdate()
         )
    <insert id="insertDictType" parameterType="SysDictType">
        insert into sys_dict_type(
        <if test="dictName != null and dictName != ''">dict_name,</if>
        <if test="dictType != null and dictType != ''">dict_type,</if>
        <if test="status != null">status,</if>
        <if test="remark != null and remark != ''">remark,</if>
        <if test="createBy != null and createBy != ''">create_by,</if>
        create_time
        )values(
        <if test="dictName != null and dictName != ''">#{dictName},</if>
        <if test="dictType != null and dictType != ''">#{dictType},</if>
        <if test="status != null">#{status},</if>
        <if test="remark != null and remark != ''">#{remark},</if>
        <if test="createBy != null and createBy != ''">#{createBy},</if>
        getdate()
        )
    </insert>
</mapper> 
billion-system/src/main/resources/mapper/system/SysLogininforMapper.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.billion.system.mapper.SysLogininforMapper">
    <resultMap type="SysLogininfor" id="SysLogininforResult">
@@ -18,9 +18,9 @@
    <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>
@@ -34,24 +34,26 @@
                AND user_name like concat('%', #{userName}, '%')
            </if>
            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
                AND login_time &gt;= #{params.beginTime}
                <!--                and <![CDATA[ login_time >= convert(datetime, #{params.beginTime}, 20)]]>-->
                and datediff(d, login_time, #{params.beginTime}) <![CDATA[<=]]> 0
            </if>
            <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
                AND login_time &lt;= #{params.endTime}
                <!--                and <![CDATA[ login_time <= convert(datetime, #{params.endTime}, 20)]]>-->
                and datediff(d, login_time, #{params.endTime}) <![CDATA[>=]]> 0
            </if>
        </where>
        order by info_id desc
    </select>
    <delete id="deleteLogininforByIds" parameterType="Long">
         delete from sys_logininfor where info_id in
         <foreach collection="array" item="infoId" open="(" separator="," close=")">
             #{infoId}
        </foreach>
     </delete>
    <update id="cleanLogininfor">
        truncate table sys_logininfor
    </update>
        delete from sys_logininfor where info_id in
        <foreach collection="array" item="infoId" open="(" separator="," close=")">
            #{infoId}
        </foreach>
    </delete>
    <update id="cleanLogininfor">
        truncate table sys_logininfor
    </update>
</mapper> 
billion-system/src/main/resources/mapper/system/SysMenuMapper.xml
@@ -13,7 +13,6 @@
        <result property="path"           column="path"           />
        <result property="component"      column="component"      />
        <result property="query"          column="query"          />
        <result property="routeName"      column="route_name"     />
        <result property="isFrame"        column="is_frame"       />
        <result property="isCache"        column="is_cache"       />
        <result property="menuType"       column="menu_type"      />
@@ -29,11 +28,11 @@
    </resultMap>
    <sql id="selectMenuVo">
        select menu_id, menu_name, parent_id, order_num, path, component, `query`, route_name, 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>
    <select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
    </sql>
    <select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
        <include refid="selectMenuVo"/>
        <where>
            <if test="menuName != null and menuName != ''">
@@ -48,91 +47,92 @@
        </where>
        order by parent_id, order_num
    </select>
    <select id="selectMenuTreeAll" resultMap="SysMenuResult">
        select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, 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.route_name, 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 concat('%', #{menuName}, '%')
        </if>
        <if test="visible != null and visible != ''">
            AND m.visible = #{visible}
            AND m.visible = #{visible}
        </if>
        <if test="status != null and status != ''">
            AND m.status = #{status}
            AND m.status = #{status}
        </if>
        order by m.parent_id, m.order_num
    </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.route_name, 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 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, 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
             left join sys_user u on ur.user_id = u.user_id
                 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
                 left join sys_user u on ur.user_id = u.user_id
        where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0  AND ro.status = 0
        order by m.parent_id, m.order_num
    </select>
    <select id="selectMenuListByRoleId" resultType="Long">
        select m.menu_id
        from sys_menu m
            left join sys_role_menu rm on m.menu_id = rm.menu_id
        where rm.role_id = #{roleId}
            <if test="menuCheckStrictly">
              and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId})
            </if>
        left join sys_role_menu rm on m.menu_id = rm.menu_id
        where rm.role_id = #{roleId}
        <if test="menuCheckStrictly">
            and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId})
        </if>
        order by m.parent_id, m.order_num
    </select>
    <select id="selectMenuPerms" resultType="String">
        select distinct m.perms
        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_menu rm on m.menu_id = rm.menu_id
                 left join sys_user_role ur on rm.role_id = ur.role_id
    </select>
    <select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
        select distinct m.perms
        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 r on r.role_id = ur.role_id
                 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 r on r.role_id = ur.role_id
        where m.status = '0' and r.status = '0' and ur.user_id = #{userId}
    </select>
    <select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String">
        select distinct m.perms
        from sys_menu m
             left join sys_role_menu rm on m.menu_id = rm.menu_id
                 left join sys_role_menu rm on m.menu_id = rm.menu_id
        where m.status = '0' and rm.role_id = #{roleId}
    </select>
    <select id="selectMenuById" parameterType="Long" resultMap="SysMenuResult">
        <include refid="selectMenuVo"/>
        where menu_id = #{menuId}
    </select>
    <select id="hasChildByMenuId" resultType="Integer">
        select count(1) from sys_menu where parent_id = #{menuId}
        select count(1) from sys_menu where parent_id = #{menuId}
    </select>
    <select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
        <include refid="selectMenuVo"/>
        where menu_name=#{menuName} and parent_id = #{parentId} limit 1
        select top(1) 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
        where menu_name=#{menuName} and parent_id = #{parentId}
    </select>
    <update id="updateMenu" parameterType="SysMenu">
        update sys_menu
        <set>
@@ -141,8 +141,7 @@
            <if test="orderNum != null">order_num = #{orderNum},</if>
            <if test="path != null and path != ''">path = #{path},</if>
            <if test="component != null">component = #{component},</if>
            <if test="query != null">`query` = #{query},</if>
            <if test="routeName != null">route_name = #{routeName},</if>
            <if test="query != null"> query = #{query},</if>
            <if test="isFrame != null and isFrame != ''">is_frame = #{isFrame},</if>
            <if test="isCache != null and isCache != ''">is_cache = #{isCache},</if>
            <if test="menuType != null and menuType != ''">menu_type = #{menuType},</if>
@@ -152,7 +151,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>
@@ -165,8 +164,7 @@
        <if test="orderNum != null">order_num,</if>
        <if test="path != null and path != ''">path,</if>
        <if test="component != null and component != ''">component,</if>
        <if test="query != null and query != ''">`query`,</if>
        <if test="routeName != null">route_name,</if>
        <if test="query != null and query != ''">query,</if>
        <if test="isFrame != null and isFrame != ''">is_frame,</if>
        <if test="isCache != null and isCache != ''">is_cache,</if>
        <if test="menuType != null and menuType != ''">menu_type,</if>
@@ -185,7 +183,6 @@
        <if test="path != null and path != ''">#{path},</if>
        <if test="component != null and component != ''">#{component},</if>
        <if test="query != null and query != ''">#{query},</if>
        <if test="routeName != null">#{routeName},</if>
        <if test="isFrame != null and isFrame != ''">#{isFrame},</if>
        <if test="isCache != null and isCache != ''">#{isCache},</if>
        <if test="menuType != null and menuType != ''">#{menuType},</if>
@@ -195,12 +192,12 @@
        <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>
    <delete id="deleteMenuById" parameterType="Long">
        delete from sys_menu where menu_id = #{menuId}
        delete from sys_menu where menu_id = #{menuId}
    </delete>
</mapper> 
billion-system/src/main/resources/mapper/system/SysNoticeMapper.xml
@@ -58,7 +58,7 @@
            <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 @@
            <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>
billion-system/src/main/resources/mapper/system/SysOperLogMapper.xml
@@ -31,7 +31,7 @@
    
    <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">
billion-system/src/main/resources/mapper/system/SysPostMapper.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.billion.system.mapper.SysPostMapper">
    <resultMap type="SysPost" id="SysPostResult">
@@ -16,14 +16,14 @@
        <result property="updateTime"    column="update_time"   />
        <result property="remark"        column="remark"        />
    </resultMap>
    <sql id="selectPostVo">
        select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
        select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
        from sys_post
    </sql>
    </sql>
    <select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
        <include refid="selectPostVo"/>
        <include refid="selectPostVo"/>
        <where>
            <if test="postCode != null and postCode != ''">
                AND post_code like concat('%', #{postCode}, '%')
@@ -36,87 +36,89 @@
            </if>
        </where>
    </select>
    <select id="selectPostAll" resultMap="SysPostResult">
        <include refid="selectPostVo"/>
    </select>
    <select id="selectPostById" parameterType="Long" resultMap="SysPostResult">
        <include refid="selectPostVo"/>
        where post_id = #{postId}
    </select>
    <select id="selectPostListByUserId" parameterType="Long" resultType="Long">
        select p.post_id
        from sys_post p
            left join sys_user_post up on up.post_id = p.post_id
            left join sys_user u on u.user_id = up.user_id
        where u.user_id = #{userId}
        from sys_post p
                 left join sys_user_post up on up.post_id = p.post_id
                 left join sys_user u on u.user_id = up.user_id
        where u.user_id = #{userId}
    </select>
    <select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult">
        select p.post_id, p.post_name, p.post_code
        from sys_post p
             left join sys_user_post up on up.post_id = p.post_id
             left join sys_user u on u.user_id = up.user_id
                 left join sys_user_post up on up.post_id = p.post_id
                 left join sys_user u on u.user_id = up.user_id
        where u.user_name = #{userName}
    </select>
    <select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult">
        <include refid="selectPostVo"/>
         where post_name=#{postName} limit 1
        select top(1) post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
        from sys_post
        where post_name=#{postName}
    </select>
    <select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult">
        <include refid="selectPostVo"/>
         where post_code=#{postCode} limit 1
        select top(1) post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
        from sys_post
        where post_code=#{postCode}
    </select>
    <update id="updatePost" parameterType="SysPost">
         update sys_post
         <set>
             <if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
             <if test="postName != null and postName != ''">post_name = #{postName},</if>
             <if test="postSort != null">post_sort = #{postSort},</if>
             <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()
         </set>
         where post_id = #{postId}
        update sys_post
        <set>
            <if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
            <if test="postName != null and postName != ''">post_name = #{postName},</if>
            <if test="postSort != null">post_sort = #{postSort},</if>
            <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 = getdate()
        </set>
        where post_id = #{postId}
    </update>
     <insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
         insert into sys_post(
             <if test="postId != null and postId != 0">post_id,</if>
             <if test="postCode != null and postCode != ''">post_code,</if>
             <if test="postName != null and postName != ''">post_name,</if>
             <if test="postSort != null">post_sort,</if>
             <if test="status != null and status != ''">status,</if>
             <if test="remark != null and remark != ''">remark,</if>
             <if test="createBy != null and createBy != ''">create_by,</if>
             create_time
         )values(
             <if test="postId != null and postId != 0">#{postId},</if>
             <if test="postCode != null and postCode != ''">#{postCode},</if>
             <if test="postName != null and postName != ''">#{postName},</if>
             <if test="postSort != null">#{postSort},</if>
             <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()
         )
    <insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
        insert into sys_post(
        <if test="postId != null and postId != 0">post_id,</if>
        <if test="postCode != null and postCode != ''">post_code,</if>
        <if test="postName != null and postName != ''">post_name,</if>
        <if test="postSort != null">post_sort,</if>
        <if test="status != null and status != ''">status,</if>
        <if test="remark != null and remark != ''">remark,</if>
        <if test="createBy != null and createBy != ''">create_by,</if>
        create_time
        )values(
        <if test="postId != null and postId != 0">#{postId},</if>
        <if test="postCode != null and postCode != ''">#{postCode},</if>
        <if test="postName != null and postName != ''">#{postName},</if>
        <if test="postSort != null">#{postSort},</if>
        <if test="status != null and status != ''">#{status},</if>
        <if test="remark != null and remark != ''">#{remark},</if>
        <if test="createBy != null and createBy != ''">#{createBy},</if>
        getdate()
        )
    </insert>
    <delete id="deletePostById" parameterType="Long">
        delete from sys_post where post_id = #{postId}
    </delete>
    <delete id="deletePostByIds" parameterType="Long">
         delete from sys_post where post_id in
         <foreach collection="array" item="postId" open="(" separator="," close=")">
             #{postId}
        </foreach>
     </delete>
        delete from sys_post where post_id in
        <foreach collection="array" item="postId" open="(" separator="," close=")">
            #{postId}
        </foreach>
    </delete>
</mapper> 
billion-system/src/main/resources/mapper/system/SysRoleMapper.xml
@@ -46,10 +46,10 @@
            AND r.role_key like concat('%', #{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 date_format(r.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
        </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 date_format(r.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
        </if>
        <!-- 数据范围过滤 -->
        ${params.dataScope}
@@ -84,13 +84,27 @@
    </select>
    
    <select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult">
        <include refid="selectRoleVo"/>
         where r.role_name=#{roleName} and r.del_flag = '0' limit 1
<!--        <include refid="selectRoleVo"/>-->
<!--         where r.role_name=#{roleName} and r.del_flag = '0' limit 1-->
        select distinct top(1) r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
        r.status, r.del_flag, r.create_time, r.remark
        from sys_role r
        left join sys_user_role ur on ur.role_id = r.role_id
        left join sys_user u on u.user_id = ur.user_id
        left join sys_dept d on u.dept_id = d.dept_id
        where r.role_name=#{roleName} and r.del_flag = '0'
    </select>
    
    <select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult">
        <include refid="selectRoleVo"/>
         where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
<!--        <include refid="selectRoleVo"/>-->
<!--         where r.role_key=#{roleKey} and r.del_flag = '0' limit 1-->
        select distinct top(1) r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
        r.status, r.del_flag, r.create_time, r.remark
        from sys_role r
        left join sys_user_role ur on ur.role_id = r.role_id
        left join sys_user u on u.user_id = ur.user_id
        left join sys_dept d on u.dept_id = d.dept_id
        where r.role_key=#{roleKey} and r.del_flag = '0'
    </select>
    
     <insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
@@ -117,7 +131,7 @@
             <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 +147,7 @@
             <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>
billion-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -1,62 +1,62 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.billion.system.mapper.SysUserMapper">
    <resultMap type="SysUser" id="SysUserResult">
        <id     property="userId"       column="user_id"      />
        <result property="deptId"       column="dept_id"      />
        <result property="userName"     column="user_name"    />
        <result property="nickName"     column="nick_name"    />
        <result property="email"        column="email"        />
        <result property="phonenumber"  column="phonenumber"  />
        <result property="sex"          column="sex"          />
        <result property="avatar"       column="avatar"       />
        <result property="password"     column="password"     />
        <result property="status"       column="status"       />
        <result property="delFlag"      column="del_flag"     />
        <result property="loginIp"      column="login_ip"     />
        <result property="loginDate"    column="login_date"   />
        <result property="createBy"     column="create_by"    />
        <result property="createTime"   column="create_time"  />
        <result property="updateBy"     column="update_by"    />
        <result property="updateTime"   column="update_time"  />
        <result property="remark"       column="remark"       />
        <association property="dept"    javaType="SysDept"         resultMap="deptResult" />
        <collection  property="roles"   javaType="java.util.List"  resultMap="RoleResult" />
    </resultMap>
    <resultMap id="deptResult" type="SysDept">
        <id     property="deptId"    column="dept_id"     />
        <result property="parentId"  column="parent_id"   />
        <result property="deptName"  column="dept_name"   />
        <result property="ancestors" column="ancestors"   />
        <result property="orderNum"  column="order_num"   />
        <result property="leader"    column="leader"      />
        <result property="status"    column="dept_status" />
    </resultMap>
    <resultMap id="RoleResult" type="SysRole">
        <id     property="roleId"       column="role_id"        />
        <result property="roleName"     column="role_name"      />
        <result property="roleKey"      column="role_key"       />
        <result property="roleSort"     column="role_sort"      />
        <result property="dataScope"    column="data_scope"     />
        <result property="status"       column="role_status"    />
    </resultMap>
    <resultMap type="SysUser" id="SysUserResult">
        <id     property="userId"       column="user_id"      />
        <result property="deptId"       column="dept_id"      />
        <result property="userName"     column="user_name"    />
        <result property="nickName"     column="nick_name"    />
        <result property="email"        column="email"        />
        <result property="phonenumber"  column="phonenumber"  />
        <result property="sex"          column="sex"          />
        <result property="avatar"       column="avatar"       />
        <result property="password"     column="password"     />
        <result property="status"       column="status"       />
        <result property="delFlag"      column="del_flag"     />
        <result property="loginIp"      column="login_ip"     />
        <result property="loginDate"    column="login_date"   />
        <result property="createBy"     column="create_by"    />
        <result property="createTime"   column="create_time"  />
        <result property="updateBy"     column="update_by"    />
        <result property="updateTime"   column="update_time"  />
        <result property="remark"       column="remark"       />
        <association property="dept"    javaType="SysDept"         resultMap="deptResult" />
        <collection  property="roles"   javaType="java.util.List"  resultMap="RoleResult" />
    </resultMap>
    <resultMap id="deptResult" type="SysDept">
        <id     property="deptId"    column="dept_id"     />
        <result property="parentId"  column="parent_id"   />
        <result property="deptName"  column="dept_name"   />
        <result property="ancestors" column="ancestors"   />
        <result property="orderNum"  column="order_num"   />
        <result property="leader"    column="leader"      />
        <result property="status"    column="dept_status" />
    </resultMap>
    <resultMap id="RoleResult" type="SysRole">
        <id     property="roleId"       column="role_id"        />
        <result property="roleName"     column="role_name"      />
        <result property="roleKey"      column="role_key"       />
        <result property="roleSort"     column="role_sort"      />
        <result property="dataScope"    column="data_scope"     />
        <result property="status"       column="role_status"    />
    </resultMap>
    <sql id="selectUserVo">
        select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
        d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
        r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
        from sys_user u
            left join sys_dept d on u.dept_id = d.dept_id
            left join sys_user_role ur on u.user_id = ur.user_id
            left join sys_role r on r.role_id = ur.role_id
    </sql>
    <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
        select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
               d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
               r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
        from sys_user u
                 left join sys_dept d on u.dept_id = d.dept_id
                 left join sys_user_role ur on u.user_id = ur.user_id
                 left join sys_role r on r.role_id = ur.role_id
    </sql>
    <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
        select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
        left join sys_dept d on u.dept_id = d.dept_id
        where u.del_flag = '0'
@@ -73,26 +73,28 @@
            AND u.phonenumber like concat('%', #{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 <![CDATA[ u.create_time >= convert(datetime, #{params.beginTime}, 20)]]>-->
            and datediff(d, u.create_time, #{params.beginTime}) <![CDATA[<=]]> 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 <![CDATA[ u.create_time <= convert(datetime, #{params.endTime}, 20)]]>-->
            and datediff(d, u.create_time, #{params.endTime}) <![CDATA[>=]]> 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 (nvarchar, #{deptId}), ',' + ancestors) > 0 ))
        </if>
        <!-- 数据范围过滤 -->
        ${params.dataScope}
    </select>
    <select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
        select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
        from sys_user u
             left join sys_dept d on u.dept_id = d.dept_id
             left join sys_user_role ur on u.user_id = ur.user_id
             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 != ''">
        select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
        from sys_user u
        left join sys_dept d on u.dept_id = d.dept_id
        left join sys_user_role ur on u.user_id = ur.user_id
        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}, '%')
        </if>
        <if test="phonenumber != null and phonenumber != ''">
@@ -101,16 +103,16 @@
        <!-- 数据范围过滤 -->
        ${params.dataScope}
    </select>
    <select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
        select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
        from sys_user u
             left join sys_dept d on u.dept_id = d.dept_id
             left join sys_user_role ur on u.user_id = ur.user_id
             left join sys_role r on r.role_id = ur.role_id
        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 != ''">
        select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
        from sys_user u
        left join sys_dept d on u.dept_id = d.dept_id
        left join sys_user_role ur on u.user_id = ur.user_id
        left join sys_role r on r.role_id = ur.role_id
        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}, '%')
        </if>
        <if test="phonenumber != null and phonenumber != ''">
@@ -119,103 +121,103 @@
        <!-- 数据范围过滤 -->
        ${params.dataScope}
    </select>
    <select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
        <include refid="selectUserVo"/>
        <include refid="selectUserVo"/>
        where u.user_name = #{userName} and u.del_flag = '0'
    </select>
    <select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
        <include refid="selectUserVo"/>
        where u.user_id = #{userId}
    </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 top(1) user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0'
    </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 top(1) user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0'
    </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 top(1) user_id, email from sys_user where email = #{email} and del_flag = '0'
    </select>
    <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
         insert into sys_user(
             <if test="userId != null and userId != 0">user_id,</if>
             <if test="deptId != null and deptId != 0">dept_id,</if>
             <if test="userName != null and userName != ''">user_name,</if>
             <if test="nickName != null and nickName != ''">nick_name,</if>
             <if test="email != null and email != ''">email,</if>
             <if test="avatar != null and avatar != ''">avatar,</if>
             <if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
             <if test="sex != null and sex != ''">sex,</if>
             <if test="password != null and password != ''">password,</if>
             <if test="status != null and status != ''">status,</if>
             <if test="createBy != null and createBy != ''">create_by,</if>
             <if test="remark != null and remark != ''">remark,</if>
             create_time
         )values(
             <if test="userId != null and userId != ''">#{userId},</if>
             <if test="deptId != null and deptId != ''">#{deptId},</if>
             <if test="userName != null and userName != ''">#{userName},</if>
             <if test="nickName != null and nickName != ''">#{nickName},</if>
             <if test="email != null and email != ''">#{email},</if>
             <if test="avatar != null and avatar != ''">#{avatar},</if>
             <if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
             <if test="sex != null and sex != ''">#{sex},</if>
             <if test="password != null and password != ''">#{password},</if>
             <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()
         )
        insert into sys_user(
        <if test="userId != null and userId != 0">user_id,</if>
        <if test="deptId != null and deptId != 0">dept_id,</if>
        <if test="userName != null and userName != ''">user_name,</if>
        <if test="nickName != null and nickName != ''">nick_name,</if>
        <if test="email != null and email != ''">email,</if>
        <if test="avatar != null and avatar != ''">avatar,</if>
        <if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
        <if test="sex != null and sex != ''">sex,</if>
        <if test="password != null and password != ''">password,</if>
        <if test="status != null and status != ''">status,</if>
        <if test="createBy != null and createBy != ''">create_by,</if>
        <if test="remark != null and remark != ''">remark,</if>
        create_time
        )values(
        <if test="userId != null and userId != ''">#{userId},</if>
        <if test="deptId != null and deptId != ''">#{deptId},</if>
        <if test="userName != null and userName != ''">#{userName},</if>
        <if test="nickName != null and nickName != ''">#{nickName},</if>
        <if test="email != null and email != ''">#{email},</if>
        <if test="avatar != null and avatar != ''">#{avatar},</if>
        <if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
        <if test="sex != null and sex != ''">#{sex},</if>
        <if test="password != null and password != ''">#{password},</if>
        <if test="status != null and status != ''">#{status},</if>
        <if test="createBy != null and createBy != ''">#{createBy},</if>
        <if test="remark != null and remark != ''">#{remark},</if>
        getdate()
        )
    </insert>
    <update id="updateUser" parameterType="SysUser">
         update sys_user
         <set>
             <if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
             <if test="userName != null and userName != ''">user_name = #{userName},</if>
             <if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
             <if test="email != null ">email = #{email},</if>
             <if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
             <if test="sex != null and sex != ''">sex = #{sex},</if>
             <if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
             <if test="password != null and password != ''">password = #{password},</if>
             <if test="status != null and status != ''">status = #{status},</if>
             <if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
             <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()
         </set>
         where user_id = #{userId}
        update sys_user
        <set>
            <if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
            <if test="userName != null and userName != ''">user_name = #{userName},</if>
            <if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
            <if test="email != null ">email = #{email},</if>
            <if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
            <if test="sex != null and sex != ''">sex = #{sex},</if>
            <if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
            <if test="password != null and password != ''">password = #{password},</if>
            <if test="status != null and status != ''">status = #{status},</if>
            <if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
            <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 = getdate()
        </set>
        where user_id = #{userId}
    </update>
    <update id="updateUserStatus" parameterType="SysUser">
         update sys_user set status = #{status} where user_id = #{userId}
        update sys_user set status = #{status} where user_id = #{userId}
    </update>
    <update id="updateUserAvatar" parameterType="SysUser">
         update sys_user set avatar = #{avatar} where user_name = #{userName}
        update sys_user set avatar = #{avatar} where user_name = #{userName}
    </update>
    <update id="resetUserPwd" parameterType="SysUser">
         update sys_user set password = #{password} where user_name = #{userName}
        update sys_user set password = #{password} where user_name = #{userName}
    </update>
    <delete id="deleteUserById" parameterType="Long">
         update sys_user set del_flag = '2' where user_id = #{userId}
     </delete>
     <delete id="deleteUserByIds" parameterType="Long">
         update sys_user set del_flag = '2' where user_id in
         <foreach collection="array" item="userId" open="(" separator="," close=")">
             #{userId}
        </foreach>
     </delete>
        update sys_user set del_flag = '2' where user_id = #{userId}
    </delete>
    <delete id="deleteUserByIds" parameterType="Long">
        update sys_user set del_flag = '2' where user_id in
        <foreach collection="array" item="userId" open="(" separator="," close=")">
            #{userId}
        </foreach>
    </delete>
</mapper> 
billion-ui/src/plugins/download.js
@@ -17,12 +17,12 @@
      responseType: 'blob',
      headers: { 'Authorization': 'Bearer ' + getToken() }
    }).then((res) => {
      const isBlob = blobValidate(res.index);
      const isBlob = blobValidate(res.data);
      if (isBlob) {
        const blob = new Blob([res.index])
        const blob = new Blob([res.data])
        this.saveAs(blob, decodeURIComponent(res.headers['download-filename']))
      } else {
        this.printErrMsg(res.index);
        this.printErrMsg(res.data);
      }
    })
  },
@@ -34,12 +34,12 @@
      responseType: 'blob',
      headers: { 'Authorization': 'Bearer ' + getToken() }
    }).then((res) => {
      const isBlob = blobValidate(res.index);
      const isBlob = blobValidate(res.data);
      if (isBlob) {
        const blob = new Blob([res.index])
        const blob = new Blob([res.data])
        this.saveAs(blob, decodeURIComponent(res.headers['download-filename']))
      } else {
        this.printErrMsg(res.index);
        this.printErrMsg(res.data);
      }
    })
  },
@@ -52,12 +52,12 @@
      responseType: 'blob',
      headers: { 'Authorization': 'Bearer ' + getToken() }
    }).then((res) => {
      const isBlob = blobValidate(res.index);
      const isBlob = blobValidate(res.data);
      if (isBlob) {
        const blob = new Blob([res.index], { type: 'application/zip' })
        const blob = new Blob([res.data], { type: 'application/zip' })
        this.saveAs(blob, name)
      } else {
        this.printErrMsg(res.index);
        this.printErrMsg(res.data);
      }
      downloadLoadingInstance.close();
    }).catch((r) => {
billion-ui/src/utils/ruoyi.js
@@ -2,7 +2,6 @@
/**
 * 通用js方法封装处理
 * Copyright (c) 2019 ruoyi
 */
// 日期格式化
@@ -202,9 +201,9 @@
}
/**
* 参数处理
* @param {*} params  参数
*/
 * 参数处理
 * @param {*} params  参数
 */
export function tansParams(params) {
  let result = ''
  for (const propName of Object.keys(params)) {
pom.xml
@@ -225,6 +225,12 @@
                <version>${billion.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-pool2</artifactId>
                <version>2.12.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>