李卫 1 year ago
parent
commit
54049bfaee
28 changed files with 280 additions and 103 deletions
  1. 1 1
      warewms-admin/src/main/resources/application-dev.yml
  2. 12 8
      warewms-common/src/main/java/com/warewms/common/core/domain/entity/SysUser.java
  3. 17 7
      warewms-system/src/main/java/com/warewms/system/controller/system/SysConfigController.java
  4. 19 9
      warewms-system/src/main/java/com/warewms/system/controller/system/SysDictDataController.java
  5. 17 6
      warewms-system/src/main/java/com/warewms/system/controller/system/SysMenuController.java
  6. 28 6
      warewms-system/src/main/java/com/warewms/system/controller/system/SysNoticeController.java
  7. 18 7
      warewms-system/src/main/java/com/warewms/system/controller/system/SysPostController.java
  8. 13 4
      warewms-system/src/main/java/com/warewms/system/controller/system/SysProfileController.java
  9. 18 1
      warewms-system/src/main/java/com/warewms/system/controller/system/SysRoleController.java
  10. 32 15
      warewms-system/src/main/java/com/warewms/system/controller/system/SysUserController.java
  11. 3 1
      warewms-system/src/main/java/com/warewms/system/mapper/SysDictDataMapper.java
  12. 3 1
      warewms-system/src/main/java/com/warewms/system/mapper/SysMenuMapper.java
  13. 3 1
      warewms-system/src/main/java/com/warewms/system/mapper/SysNoticeMapper.java
  14. 3 1
      warewms-system/src/main/java/com/warewms/system/mapper/SysPostMapper.java
  15. 3 1
      warewms-system/src/main/java/com/warewms/system/mapper/SysRoleMapper.java
  16. 3 1
      warewms-system/src/main/java/com/warewms/system/mapper/SysUserMapper.java
  17. 3 1
      warewms-system/src/main/java/com/warewms/system/service/ISysDictDataService.java
  18. 2 1
      warewms-system/src/main/java/com/warewms/system/service/ISysMenuService.java
  19. 4 1
      warewms-system/src/main/java/com/warewms/system/service/ISysNoticeService.java
  20. 3 1
      warewms-system/src/main/java/com/warewms/system/service/ISysPostService.java
  21. 2 1
      warewms-system/src/main/java/com/warewms/system/service/ISysRoleService.java
  22. 2 1
      warewms-system/src/main/java/com/warewms/system/service/ISysUserService.java
  23. 12 1
      warewms-system/src/main/java/com/warewms/system/service/impl/SysDictDataServiceImpl.java
  24. 10 8
      warewms-system/src/main/java/com/warewms/system/service/impl/SysMenuServiceImpl.java
  25. 10 1
      warewms-system/src/main/java/com/warewms/system/service/impl/SysNoticeServiceImpl.java
  26. 13 1
      warewms-system/src/main/java/com/warewms/system/service/impl/SysPostServiceImpl.java
  27. 13 10
      warewms-system/src/main/java/com/warewms/system/service/impl/SysRoleServiceImpl.java
  28. 13 6
      warewms-system/src/main/java/com/warewms/system/service/impl/SysUserServiceImpl.java

+ 1 - 1
warewms-admin/src/main/resources/application-dev.yml

@@ -123,7 +123,7 @@ spring:
   # redis 配置
   redis:
     # 地址
-    host: 154.12.20.200
+    host: 192.168.157.130
     # 端口,默认为6379
     port: 6379
     # 数据库索引

+ 12 - 8
warewms-common/src/main/java/com/warewms/common/core/domain/entity/SysUser.java

@@ -1,19 +1,18 @@
 package com.warewms.common.core.domain.entity;
 
+import java.util.Date;
+import java.util.List;
+import javax.validation.constraints.*;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
 import com.warewms.common.annotation.Excel;
 import com.warewms.common.annotation.Excel.ColumnType;
 import com.warewms.common.annotation.Excel.Type;
 import com.warewms.common.annotation.Excels;
 import com.warewms.common.core.domain.base.BaseEntity;
 import com.warewms.common.xss.Xss;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-import javax.validation.constraints.Email;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Size;
-import java.util.Date;
-import java.util.List;
 
 /**
  * 用户对象 sys_user
@@ -78,18 +77,23 @@ public class SysUser extends BaseEntity
         @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
         @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)
     })
+    @TableField(exist = false)
     private SysDept dept;
 
     /** 角色对象 */
+    @TableField(exist = false)
     private List<SysRole> roles;
 
     /** 角色组 */
+    @TableField(exist = false)
     private Long[] roleIds;
 
     /** 岗位组 */
+    @TableField(exist = false)
     private Long[] postIds;
 
     /** 角色ID */
+    @TableField(exist = false)
     private Long roleId;
 
     public SysUser()

+ 17 - 7
warewms-system/src/main/java/com/warewms/system/controller/system/SysConfigController.java

@@ -1,5 +1,21 @@
 package com.warewms.system.controller.system;
 
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
 import com.warewms.common.annotation.Log;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
@@ -8,13 +24,7 @@ import com.warewms.common.enums.BusinessType;
 import com.warewms.common.utils.poi.ExcelUtil;
 import com.warewms.system.domain.SysConfig;
 import com.warewms.system.service.ISysConfigService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
 
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
 
 /**
  * 参数配置 信息操作处理
@@ -23,7 +33,7 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/system/config")
-public class  SysConfigController extends BaseController
+public class  SysConfigController extends BaseController<SysConfig>
 {
     @Autowired
     private ISysConfigService configService;

+ 19 - 9
warewms-system/src/main/java/com/warewms/system/controller/system/SysDictDataController.java

@@ -1,5 +1,23 @@
 package com.warewms.system.controller.system;
 
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
 import com.warewms.common.annotation.Log;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
@@ -9,14 +27,6 @@ import com.warewms.common.utils.StringUtils;
 import com.warewms.common.utils.poi.ExcelUtil;
 import com.warewms.system.service.ISysDictDataService;
 import com.warewms.system.service.ISysDictTypeService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.List;
 
 /**
  * 数据字典信息
@@ -25,7 +35,7 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/system/dict/data")
-public class SysDictDataController extends BaseController
+public class SysDictDataController extends BaseController<SysDictData>
 {
     @Autowired
     private ISysDictDataService dictDataService;

+ 17 - 6
warewms-system/src/main/java/com/warewms/system/controller/system/SysMenuController.java

@@ -1,5 +1,21 @@
 package com.warewms.system.controller.system;
 
+
+import java.util.List;
+
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
 import com.warewms.common.annotation.Log;
 import com.warewms.common.constant.UserConstants;
 import com.warewms.common.core.controller.BaseController;
@@ -8,12 +24,7 @@ import com.warewms.common.core.domain.entity.SysMenu;
 import com.warewms.common.enums.BusinessType;
 import com.warewms.common.utils.StringUtils;
 import com.warewms.system.service.ISysMenuService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
 
-import java.util.List;
 
 /**
  * 菜单信息
@@ -22,7 +33,7 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/system/menu")
-public class SysMenuController extends BaseController
+public class SysMenuController extends BaseController<SysMenu>
 {
     @Autowired
     private ISysMenuService menuService;

+ 28 - 6
warewms-system/src/main/java/com/warewms/system/controller/system/SysNoticeController.java

@@ -1,5 +1,22 @@
 package com.warewms.system.controller.system;
 
+
+import com.warewms.common.core.domain.base.page.PageDomain;
+import com.warewms.common.core.domain.base.page.TableDataInfo;
+import com.warewms.common.core.domain.entity.SysDictType;
+import com.warewms.common.utils.bean.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
 import com.warewms.common.annotation.Log;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
@@ -11,6 +28,8 @@ import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.Map;
+
 /**
  * 公告 信息操作处理
  * 
@@ -18,7 +37,7 @@ import org.springframework.web.bind.annotation.*;
  */
 @RestController
 @RequestMapping("/system/notice")
-public class SysNoticeController extends BaseController
+public class SysNoticeController extends BaseController<SysNotice>
 {
     @Autowired
     private ISysNoticeService noticeService;
@@ -26,14 +45,17 @@ public class SysNoticeController extends BaseController
     /**
      * 获取通知公告列表
      */
-    /*@PreAuthorize("@ss.hasPermi('system:notice:list')")
+    @PreAuthorize("@ss.hasPermi('system:notice:list')")
     @GetMapping("/list")
-    public TableDataInfo list(SysNotice notice)
+    public TableDataInfo list(PageDomain pageDomain, SysNotice notice)
     {
-        startPage();
+        /*startPage();
         List<SysNotice> list = noticeService.selectNoticeList(notice);
-        return getDataTable(list);
-    }*/
+        return getDataTable(list);*/
+        Map<String, Object> pageParams = BeanUtils.beanToMap(pageDomain);
+        Map<String, Object> params = BeanUtils.beanToMap(notice, pageParams);
+        return getDataTable(noticeService.page(params));
+    }
 
     /**
      * 根据通知公告编号获取详细信息

+ 18 - 7
warewms-system/src/main/java/com/warewms/system/controller/system/SysPostController.java

@@ -1,5 +1,22 @@
 package com.warewms.system.controller.system;
 
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.warewms.common.core.domain.entity.SysDictType;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
 import com.warewms.common.annotation.Log;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
@@ -7,13 +24,7 @@ import com.warewms.common.enums.BusinessType;
 import com.warewms.common.utils.poi.ExcelUtil;
 import com.warewms.system.domain.SysPost;
 import com.warewms.system.service.ISysPostService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
 
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
 
 /**
  * 岗位信息操作处理
@@ -22,7 +33,7 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/system/post")
-public class SysPostController extends BaseController
+public class SysPostController extends BaseController<SysPost>
 {
     @Autowired
     private ISysPostService postService;

+ 13 - 4
warewms-system/src/main/java/com/warewms/system/controller/system/SysProfileController.java

@@ -1,5 +1,16 @@
 package com.warewms.system.controller.system;
 
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
 import com.warewms.common.annotation.Log;
 import com.warewms.common.config.RuoYiConfig;
 import com.warewms.common.core.controller.BaseController;
@@ -13,9 +24,7 @@ import com.warewms.common.utils.file.FileUploadUtils;
 import com.warewms.common.utils.file.MimeTypeUtils;
 import com.warewms.system.service.ISysUserService;
 import com.warewms.system.service.monitor.service.TokenService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
+
 
 /**
  * 个人信息 业务处理
@@ -24,7 +33,7 @@ import org.springframework.web.multipart.MultipartFile;
  */
 @RestController
 @RequestMapping("/system/user/profile")
-public class SysProfileController extends BaseController
+public class SysProfileController extends BaseController<SysUser>
 {
     @Autowired
     private ISysUserService userService;

+ 18 - 1
warewms-system/src/main/java/com/warewms/system/controller/system/SysRoleController.java

@@ -1,5 +1,22 @@
 package com.warewms.system.controller.system;
 
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.warewms.common.core.domain.entity.SysDictType;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
 import com.warewms.common.annotation.Log;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
@@ -30,7 +47,7 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/system/role")
-public class SysRoleController extends BaseController
+public class SysRoleController extends BaseController<SysRole>
 {
     @Autowired
     private ISysRoleService roleService;

+ 32 - 15
warewms-system/src/main/java/com/warewms/system/controller/system/SysUserController.java

@@ -1,5 +1,28 @@
 package com.warewms.system.controller.system;
 
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import javax.servlet.http.HttpServletResponse;
+
+import com.warewms.common.core.domain.base.page.PageDomain;
+import com.warewms.common.core.domain.base.page.TableDataInfo;
+import com.warewms.common.core.domain.entity.SysDictType;
+import com.warewms.common.utils.bean.BeanUtils;
+import org.apache.commons.lang3.ArrayUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
 import com.warewms.common.annotation.Log;
 import com.warewms.common.core.controller.BaseController;
 import com.warewms.common.core.domain.AjaxResult;
@@ -14,16 +37,7 @@ import com.warewms.system.service.ISysDeptService;
 import com.warewms.system.service.ISysPostService;
 import com.warewms.system.service.ISysRoleService;
 import com.warewms.system.service.ISysUserService;
-import org.apache.commons.lang3.ArrayUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
 
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-import java.util.stream.Collectors;
 
 /**
  * 用户信息
@@ -32,7 +46,7 @@ import java.util.stream.Collectors;
  */
 @RestController
 @RequestMapping("/system/user")
-public class SysUserController extends BaseController
+public class SysUserController extends BaseController<SysUser>
 {
     @Autowired
     private ISysUserService userService;
@@ -49,14 +63,17 @@ public class SysUserController extends BaseController
     /**
      * 获取用户列表
      */
-    /*@PreAuthorize("@ss.hasPermi('system:user:list')")
+    @PreAuthorize("@ss.hasPermi('system:user:list')")
     @GetMapping("/list")
-    public TableDataInfo list(SysUser user)
+    public TableDataInfo list(PageDomain pageDomain,SysUser user)
     {
-        startPage();
+        /*startPage();
         List<SysUser> list = userService.selectUserList(user);
-        return getDataTable(list);
-    }*/
+        return getDataTable(list);*/
+        Map<String, Object> pageParams = BeanUtils.beanToMap(pageDomain);
+        Map<String, Object> params = BeanUtils.beanToMap(user, pageParams);
+        return getDataTable(userService.page(params));
+    }
 
     @Log(title = "用户管理", businessType = BusinessType.EXPORT)
     @PreAuthorize("@ss.hasPermi('system:user:export')")

+ 3 - 1
warewms-system/src/main/java/com/warewms/system/mapper/SysDictDataMapper.java

@@ -1,6 +1,8 @@
 package com.warewms.system.mapper;
 
 import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Param;
 import com.warewms.common.core.domain.entity.SysDictData;
 
@@ -9,7 +11,7 @@ import com.warewms.common.core.domain.entity.SysDictData;
  * 
  * @author ruoyi
  */
-public interface SysDictDataMapper
+public interface SysDictDataMapper extends BaseMapper<SysDictData>
 {
     /**
      * 根据条件分页查询字典数据

+ 3 - 1
warewms-system/src/main/java/com/warewms/system/mapper/SysMenuMapper.java

@@ -1,6 +1,8 @@
 package com.warewms.system.mapper;
 
 import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Param;
 import com.warewms.common.core.domain.entity.SysMenu;
 
@@ -9,7 +11,7 @@ import com.warewms.common.core.domain.entity.SysMenu;
  *
  * @author ruoyi
  */
-public interface SysMenuMapper
+public interface SysMenuMapper extends BaseMapper<SysMenu>
 {
     /**
      * 查询系统菜单列表

+ 3 - 1
warewms-system/src/main/java/com/warewms/system/mapper/SysNoticeMapper.java

@@ -1,6 +1,8 @@
 package com.warewms.system.mapper;
 
 import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.warewms.system.domain.SysNotice;
 
 /**
@@ -8,7 +10,7 @@ import com.warewms.system.domain.SysNotice;
  * 
  * @author ruoyi
  */
-public interface SysNoticeMapper
+public interface SysNoticeMapper extends BaseMapper<SysNotice>
 {
     /**
      * 查询公告信息

+ 3 - 1
warewms-system/src/main/java/com/warewms/system/mapper/SysPostMapper.java

@@ -1,6 +1,8 @@
 package com.warewms.system.mapper;
 
 import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.warewms.system.domain.SysPost;
 
 /**
@@ -8,7 +10,7 @@ import com.warewms.system.domain.SysPost;
  * 
  * @author ruoyi
  */
-public interface SysPostMapper
+public interface SysPostMapper extends BaseMapper<SysPost>
 {
     /**
      * 查询岗位数据集合

+ 3 - 1
warewms-system/src/main/java/com/warewms/system/mapper/SysRoleMapper.java

@@ -1,6 +1,8 @@
 package com.warewms.system.mapper;
 
 import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.warewms.common.core.domain.entity.SysRole;
 
 /**
@@ -8,7 +10,7 @@ import com.warewms.common.core.domain.entity.SysRole;
  * 
  * @author ruoyi
  */
-public interface SysRoleMapper
+public interface SysRoleMapper extends BaseMapper<SysRole>
 {
     /**
      * 根据条件分页查询角色数据

+ 3 - 1
warewms-system/src/main/java/com/warewms/system/mapper/SysUserMapper.java

@@ -1,6 +1,8 @@
 package com.warewms.system.mapper;
 
 import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Param;
 import com.warewms.common.core.domain.entity.SysUser;
 
@@ -9,7 +11,7 @@ import com.warewms.common.core.domain.entity.SysUser;
  * 
  * @author ruoyi
  */
-public interface SysUserMapper
+public interface SysUserMapper extends BaseMapper<SysUser>
 {
     /**
      * 根据条件分页查询用户列表

+ 3 - 1
warewms-system/src/main/java/com/warewms/system/service/ISysDictDataService.java

@@ -2,13 +2,15 @@ package com.warewms.system.service;
 
 import java.util.List;
 import com.warewms.common.core.domain.entity.SysDictData;
+import com.warewms.common.core.domain.entity.SysDictType;
+import com.warewms.common.service.CrudService;
 
 /**
  * 字典 业务层
  * 
  * @author ruoyi
  */
-public interface ISysDictDataService
+public interface ISysDictDataService extends CrudService<SysDictData, SysDictData>
 {
     /**
      * 根据条件分页查询字典数据

+ 2 - 1
warewms-system/src/main/java/com/warewms/system/service/ISysMenuService.java

@@ -4,6 +4,7 @@ import java.util.List;
 import java.util.Set;
 import com.warewms.common.core.domain.TreeSelect;
 import com.warewms.common.core.domain.entity.SysMenu;
+import com.warewms.common.service.CrudService;
 import com.warewms.system.domain.vo.RouterVo;
 
 /**
@@ -11,7 +12,7 @@ import com.warewms.system.domain.vo.RouterVo;
  * 
  * @author ruoyi
  */
-public interface ISysMenuService
+public interface ISysMenuService extends CrudService<SysMenu, SysMenu>
 {
     /**
      * 根据用户查询系统菜单列表

+ 4 - 1
warewms-system/src/main/java/com/warewms/system/service/ISysNoticeService.java

@@ -1,6 +1,9 @@
 package com.warewms.system.service;
 
 import java.util.List;
+
+import com.warewms.common.core.domain.entity.SysDictType;
+import com.warewms.common.service.CrudService;
 import com.warewms.system.domain.SysNotice;
 
 /**
@@ -8,7 +11,7 @@ import com.warewms.system.domain.SysNotice;
  * 
  * @author ruoyi
  */
-public interface ISysNoticeService
+public interface ISysNoticeService extends CrudService<SysNotice, SysNotice>
 {
     /**
      * 查询公告信息

+ 3 - 1
warewms-system/src/main/java/com/warewms/system/service/ISysPostService.java

@@ -1,6 +1,8 @@
 package com.warewms.system.service;
 
 import java.util.List;
+
+import com.warewms.common.service.CrudService;
 import com.warewms.system.domain.SysPost;
 
 /**
@@ -8,7 +10,7 @@ import com.warewms.system.domain.SysPost;
  * 
  * @author ruoyi
  */
-public interface ISysPostService
+public interface ISysPostService extends CrudService<SysPost, SysPost>
 {
     /**
      * 查询岗位信息集合

+ 2 - 1
warewms-system/src/main/java/com/warewms/system/service/ISysRoleService.java

@@ -3,6 +3,7 @@ package com.warewms.system.service;
 import java.util.List;
 import java.util.Set;
 import com.warewms.common.core.domain.entity.SysRole;
+import com.warewms.common.service.CrudService;
 import com.warewms.system.domain.SysUserRole;
 
 /**
@@ -10,7 +11,7 @@ import com.warewms.system.domain.SysUserRole;
  * 
  * @author ruoyi
  */
-public interface ISysRoleService
+public interface ISysRoleService extends CrudService<SysRole, SysRole>
 {
     /**
      * 根据条件分页查询角色数据

+ 2 - 1
warewms-system/src/main/java/com/warewms/system/service/ISysUserService.java

@@ -2,13 +2,14 @@ package com.warewms.system.service;
 
 import java.util.List;
 import com.warewms.common.core.domain.entity.SysUser;
+import com.warewms.common.service.CrudService;
 
 /**
  * 用户 业务层
  * 
  * @author ruoyi
  */
-public interface ISysUserService
+public interface ISysUserService extends CrudService<SysUser, SysUser>
 {
     /**
      * 根据条件分页查询用户列表

+ 12 - 1
warewms-system/src/main/java/com/warewms/system/service/impl/SysDictDataServiceImpl.java

@@ -1,7 +1,12 @@
 package com.warewms.system.service.impl;
 
 import java.util.List;
+import java.util.Map;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.warewms.common.core.domain.entity.SysDictType;
+import com.warewms.common.service.impl.CrudServiceImpl;
+import com.warewms.system.mapper.SysDictTypeMapper;
 import com.warewms.system.service.ISysDictDataService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -15,7 +20,7 @@ import com.warewms.system.mapper.SysDictDataMapper;
  * @author ruoyi
  */
 @Service
-public class SysDictDataServiceImpl implements ISysDictDataService
+public class SysDictDataServiceImpl extends CrudServiceImpl<SysDictDataMapper, SysDictData, SysDictData> implements ISysDictDataService
 {
     @Autowired
     private SysDictDataMapper dictDataMapper;
@@ -109,4 +114,10 @@ public class SysDictDataServiceImpl implements ISysDictDataService
         }
         return row;
     }
+
+
+    @Override
+    public QueryWrapper<SysDictData> getWrapper(Map<String, Object> params) {
+        return null;
+    }
 }

+ 10 - 8
warewms-system/src/main/java/com/warewms/system/service/impl/SysMenuServiceImpl.java

@@ -1,13 +1,10 @@
 package com.warewms.system.service.impl;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 import java.util.stream.Collectors;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.warewms.common.service.impl.CrudServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.warewms.common.constant.Constants;
@@ -31,7 +28,7 @@ import com.warewms.system.service.ISysMenuService;
  * @author ruoyi
  */
 @Service
-public class SysMenuServiceImpl implements ISysMenuService
+public class SysMenuServiceImpl extends CrudServiceImpl<SysMenuMapper, SysMenu, SysMenu> implements ISysMenuService
 {
     public static final String PREMISSION_STRING = "perms[\"{0}\"]";
 
@@ -528,4 +525,9 @@ public class SysMenuServiceImpl implements ISysMenuService
         return StringUtils.replaceEach(path, new String[] { Constants.HTTP, Constants.HTTPS, Constants.WWW, "." },
                 new String[] { "", "", "", "/" });
     }
+
+    @Override
+    public QueryWrapper<SysMenu> getWrapper(Map<String, Object> params) {
+        return null;
+    }
 }

+ 10 - 1
warewms-system/src/main/java/com/warewms/system/service/impl/SysNoticeServiceImpl.java

@@ -1,6 +1,10 @@
 package com.warewms.system.service.impl;
 
 import java.util.List;
+import java.util.Map;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.warewms.common.service.impl.CrudServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.warewms.system.domain.SysNotice;
@@ -13,7 +17,7 @@ import com.warewms.system.service.ISysNoticeService;
  * @author ruoyi
  */
 @Service
-public class SysNoticeServiceImpl implements ISysNoticeService
+public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeMapper, SysNotice, SysNotice> implements ISysNoticeService
 {
     @Autowired
     private SysNoticeMapper noticeMapper;
@@ -89,4 +93,9 @@ public class SysNoticeServiceImpl implements ISysNoticeService
     {
         return noticeMapper.deleteNoticeByIds(noticeIds);
     }
+
+    @Override
+    public QueryWrapper<SysNotice> getWrapper(Map<String, Object> params) {
+        return null;
+    }
 }

+ 13 - 1
warewms-system/src/main/java/com/warewms/system/service/impl/SysPostServiceImpl.java

@@ -1,6 +1,13 @@
 package com.warewms.system.service.impl;
 
 import java.util.List;
+import java.util.Map;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.warewms.common.core.domain.entity.SysDictType;
+import com.warewms.common.service.impl.CrudServiceImpl;
+import com.warewms.system.mapper.SysDictTypeMapper;
+import com.warewms.system.service.ISysDictTypeService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.warewms.common.constant.UserConstants;
@@ -17,7 +24,7 @@ import com.warewms.system.service.ISysPostService;
  * @author ruoyi
  */
 @Service
-public class SysPostServiceImpl implements ISysPostService
+public class SysPostServiceImpl extends CrudServiceImpl<SysPostMapper, SysPost, SysPost> implements ISysPostService
 {
     @Autowired
     private SysPostMapper postMapper;
@@ -175,4 +182,9 @@ public class SysPostServiceImpl implements ISysPostService
     {
         return postMapper.updatePost(post);
     }
+
+    @Override
+    public QueryWrapper<SysPost> getWrapper(Map<String, Object> params) {
+        return null;
+    }
 }

+ 13 - 10
warewms-system/src/main/java/com/warewms/system/service/impl/SysRoleServiceImpl.java

@@ -1,10 +1,12 @@
 package com.warewms.system.service.impl;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.warewms.common.core.domain.entity.SysDictType;
+import com.warewms.common.service.impl.CrudServiceImpl;
+import com.warewms.system.mapper.*;
+import com.warewms.system.service.ISysDictTypeService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -19,10 +21,6 @@ import com.warewms.common.utils.spring.SpringUtils;
 import com.warewms.system.domain.SysRoleDept;
 import com.warewms.system.domain.SysRoleMenu;
 import com.warewms.system.domain.SysUserRole;
-import com.warewms.system.mapper.SysRoleDeptMapper;
-import com.warewms.system.mapper.SysRoleMapper;
-import com.warewms.system.mapper.SysRoleMenuMapper;
-import com.warewms.system.mapper.SysUserRoleMapper;
 import com.warewms.system.service.ISysRoleService;
 
 /**
@@ -31,7 +29,7 @@ import com.warewms.system.service.ISysRoleService;
  * @author ruoyi
  */
 @Service
-public class SysRoleServiceImpl implements ISysRoleService
+public class SysRoleServiceImpl extends CrudServiceImpl<SysRoleMapper, SysRole, SysRole> implements ISysRoleService
 {
     @Autowired
     private SysRoleMapper roleMapper;
@@ -421,4 +419,9 @@ public class SysRoleServiceImpl implements ISysRoleService
         }
         return userRoleMapper.batchUserRole(list);
     }
+
+    @Override
+    public QueryWrapper<SysRole> getWrapper(Map<String, Object> params) {
+        return null;
+    }
 }

+ 13 - 6
warewms-system/src/main/java/com/warewms/system/service/impl/SysUserServiceImpl.java

@@ -2,8 +2,15 @@ package com.warewms.system.service.impl;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 import javax.validation.Validator;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.warewms.common.core.domain.entity.SysDictType;
+import com.warewms.common.service.impl.CrudServiceImpl;
+import com.warewms.system.mapper.*;
+import com.warewms.system.service.ISysDictTypeService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -22,11 +29,6 @@ import com.warewms.common.utils.spring.SpringUtils;
 import com.warewms.system.domain.SysPost;
 import com.warewms.system.domain.SysUserPost;
 import com.warewms.system.domain.SysUserRole;
-import com.warewms.system.mapper.SysPostMapper;
-import com.warewms.system.mapper.SysRoleMapper;
-import com.warewms.system.mapper.SysUserMapper;
-import com.warewms.system.mapper.SysUserPostMapper;
-import com.warewms.system.mapper.SysUserRoleMapper;
 import com.warewms.system.service.ISysConfigService;
 import com.warewms.system.service.ISysUserService;
 
@@ -36,7 +38,7 @@ import com.warewms.system.service.ISysUserService;
  * @author ruoyi
  */
 @Service
-public class SysUserServiceImpl implements ISysUserService
+public class SysUserServiceImpl extends CrudServiceImpl<SysUserMapper, SysUser, SysUser> implements ISysUserService
 {
     private static final Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class);
 
@@ -541,4 +543,9 @@ public class SysUserServiceImpl implements ISysUserService
         }
         return successMsg.toString();
     }
+
+    @Override
+    public QueryWrapper<SysUser> getWrapper(Map<String, Object> params) {
+        return null;
+    }
 }