src/main/resources/config/application-dev.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/config/application-prod.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/0Mapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/CommonMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/UserInfMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
target/classes/config/application-dev.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
target/classes/config/application-prod.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/resources/config/application-dev.yml
@@ -17,9 +17,9 @@ datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.10.82:3361/db_user?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true&useSSL=false url: jdbc:mysql://192.168.10.82:3382/db_user?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true&useSSL=false username: root password: hdw8688139 password: Hdw8688139 maxIdel: 60 initialPoolSize: 2 minPoolSize: 2 src/main/resources/config/application-prod.yml
@@ -17,9 +17,9 @@ datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3361/db_user?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true url: jdbc:mysql://localhost:3382/db_user?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true username: root password: hdw8688139 password: Hdw8688139 maxIdel: 60 initialPoolSize: 2 minPoolSize: 2 src/main/resources/mapper/0Mapper.xml
New file @@ -0,0 +1,6 @@ <?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"> <mapper namespace="com.whyc.mapper" > </mapper> src/main/resources/mapper/CommonMapper.xml
New file @@ -0,0 +1,25 @@ <?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"> <mapper namespace="com.whyc.mapper.CommonMapper" > <select id="getMaxValue" resultType="java.lang.Object"> select max(${field}) from ${schema}.${table} </select> <select id="existTable" resultType="java.lang.String"> select table_name from `INFORMATION_SCHEMA`.`TABLES` where table_name = #{tableName} and TABLE_SCHEMA = #{dbName} </select> <select id="getTableListLike" resultType="java.lang.String"> select table_name from `INFORMATION_SCHEMA`.`TABLES` where TABLE_SCHEMA = #{dbName} and table_name like concat(#{tableLike},'%') </select> </mapper> src/main/resources/mapper/UserInfMapper.xml
New file @@ -0,0 +1,37 @@ <?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"> <mapper namespace="com.whyc.mapper.UserInfMapper"> <update id="createNumber"> CREATE TABLE if not exists db_user.temp_numbers (unumber INT); </update> <update id="setUnumber"> ${sql} </update> <select id="existTable" resultType="java.lang.String"> select table_name from `INFORMATION_SCHEMA`.`TABLES` where table_name = 'temp_numbers' and TABLE_SCHEMA = 'db_user' </select> <select id="selectSnId" resultType="java.lang.String"> select usnid from db_user.tb_user_inf where uname=#{uname} limit 1 </select> <select id="judgeUname" resultType="java.lang.Integer"> select count(*) from db_user.tb_user_inf where uid>100 </select> <select id="getAllUser" resultType="UserInf"> select uid,uname,udownload_role,create_time from db_user.tb_user_inf where uid>100 order by create_time desc </select> <select id="getIn1000" resultType="java.lang.String"> SELECT min(unumber) FROM db_user.temp_numbers t WHERE t.unumber NOT IN (SELECT uid FROM db_user.tb_user_inf); </select> <select id="getMaxUid" resultType="java.lang.String"> SELECT max(uid) FROM db_user.tb_user_inf where uid>1000 </select> </mapper> target/classes/config/application-dev.yml
@@ -17,9 +17,9 @@ datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.10.82:3361/db_user?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true&useSSL=false url: jdbc:mysql://192.168.10.82:3382/db_user?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true&useSSL=false username: root password: hdw8688139 password: Hdw8688139 maxIdel: 60 initialPoolSize: 2 minPoolSize: 2 target/classes/config/application-prod.yml
@@ -17,9 +17,9 @@ datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3361/db_user?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true url: jdbc:mysql://localhost:3382/db_user?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true username: root password: hdw8688139 password: Hdw8688139 maxIdel: 60 initialPoolSize: 2 minPoolSize: 2