pipIrr-platform/pipIrr-global/src/main/resources/application-database-ym.yml
@@ -6,9 +6,9 @@ type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.cj.jdbc.Driver # url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull #url: jdbc:mysql://8.130.130.233:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull url: jdbc:mysql://8.130.130.233:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull #url: jdbc:mysql://8.140.179.55:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull # url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull username: root password: dysql,;.abc!@# druid: pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml
@@ -71,7 +71,7 @@ pipIrr: global: dev: false #是否开发阶段,true或false dev: true #是否开发阶段,true或false dsName: ym #开发阶段,设置临时的数据库名称 mw: webPort: 8070 pipIrr-platform/pipIrr-global/src/main/resources/mapper/BaUserMapper.xml
@@ -48,7 +48,7 @@ </sql> <sql id="part_Column_List"> ${alias}.id, ${alias}.name, ${alias}.phone, ${alias}.disabled #{alias}.id, #{alias}.name, #{alias}.phone, #{alias}.disabled </sql> <sql id="Login_Column_List"> @@ -240,7 +240,7 @@ INNER JOIN ba_role_permissions per ON per.roleId = rol.id <where> <if test = "userId != null and userId > 0"> AND user.id = ${userId} AND user.id = #{userId} </if> </where> </select> @@ -259,7 +259,7 @@ AND us.disabled = 0 AND us.deleted = 0 <if test = "userId != null and userId > 0"> AND us.id = ${userId} AND us.id = #{userId} </if> </where> </select> @@ -268,6 +268,19 @@ <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long"> SELECT COUNT(*) AS recordCount FROM ( SELECT CAST(id AS char) AS id, phone, name AS userName, disabled AS stateId, (CASE WHEN disabled = 0 THEN "正常" WHEN disabled = 1 THEN "已禁用" END) AS stateName, CAST(blockId AS char) AS blockId, (SELECT name FROM ba_block WHERE id = user.blockId) AS blockName FROM ba_user user LEFT JOIN ba_user_role usro ON usro.userId = user.id <where> @@ -283,9 +296,10 @@ </if> <if test = "roleId != null and roleId > 0"> AND usro.roleId = ${roleId} AND usro.roleId = #{roleId} </if> </where> GROUP BY user.id) c </select> <!--根据指定条件获取用户列表--> @@ -316,9 +330,10 @@ </if> <if test = "roleId != null and roleId > 0"> AND usro.roleId = ${roleId} AND usro.roleId = #{roleId} </if> </where> GROUP BY user.id ORDER BY user.id DESC <trim prefix="limit " > <if test="start != null and count != null"> @@ -332,7 +347,7 @@ SELECT roleId FROM ba_user_role WHERE userId = ${userId} WHERE userId = #{userId} </select> <select id="getRoleNamesByUserId" resultType="java.util.HashMap"> @@ -340,7 +355,7 @@ ro.name AS roleName FROM ba_user_role usro INNER JOIN ba_role ro ON usro.roleId = ro.id WHERE userId = ${userId} WHERE userId = #{userId} </select>