From 2600e457e4b0df5be48ca33eb85290d383352dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= Date: Fri, 25 May 2018 00:38:41 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=20BUG,shardingjdbc=E8=B6=8A=E7=95=8C=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pig/admin/common/config/MybatisPlusConfig.java | 9 +++++---- .../src/main/resources/mapper/SysUserMapper.xml | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pig-modules/pig-upms-service/src/main/java/com/github/pig/admin/common/config/MybatisPlusConfig.java b/pig-modules/pig-upms-service/src/main/java/com/github/pig/admin/common/config/MybatisPlusConfig.java index 66adc342..e2633a1d 100644 --- a/pig-modules/pig-upms-service/src/main/java/com/github/pig/admin/common/config/MybatisPlusConfig.java +++ b/pig-modules/pig-upms-service/src/main/java/com/github/pig/admin/common/config/MybatisPlusConfig.java @@ -1,6 +1,7 @@ package com.github.pig.admin.common.config; import com.baomidou.mybatisplus.plugins.PaginationInterceptor; +import com.github.pig.common.bean.interceptor.DataScopeInterceptor; import org.mybatis.spring.annotation.MapperScan; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -27,8 +28,8 @@ public class MybatisPlusConfig { * * @return DataScopeInterceptor */ -// @Bean -// public DataScopeInterceptor dataScopeInterceptor() { -// return new DataScopeInterceptor(); -// } + @Bean + public DataScopeInterceptor dataScopeInterceptor() { + return new DataScopeInterceptor(); + } } \ No newline at end of file diff --git a/pig-modules/pig-upms-service/src/main/resources/mapper/SysUserMapper.xml b/pig-modules/pig-upms-service/src/main/resources/mapper/SysUserMapper.xml index 1dccca5e..5d1d016f 100644 --- a/pig-modules/pig-upms-service/src/main/resources/mapper/SysUserMapper.xml +++ b/pig-modules/pig-upms-service/src/main/resources/mapper/SysUserMapper.xml @@ -135,6 +135,7 @@ and `user`.username LIKE CONCAT('%',#{username},'%') + ORDER BY `user`.create_time DESC