소스 검색

update mp化

疯狂的狮子li 4 년 전
부모
커밋
876a06a9cd
29개의 변경된 파일129개의 추가작업 그리고 556개의 파일을 삭제
  1. 2 1
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
  2. 3 2
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java
  3. 3 2
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java
  4. 2 1
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
  5. 2 1
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java
  6. 2 1
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
  7. 4 11
      ruoyi-framework/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java
  8. 2 1
      ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java
  9. 2 1
      ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java
  10. 2 1
      ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java
  11. 3 1
      ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java
  12. 2 1
      ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java
  13. 0 30
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java
  14. 0 48
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java
  15. 0 36
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java
  16. 0 69
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java
  17. 0 8
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java
  18. 2 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
  19. 1 3
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
  20. 9 10
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java
  21. 20 8
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java
  22. 15 12
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysNoticeServiceImpl.java
  23. 33 11
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java
  24. 20 13
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java
  25. 0 38
      ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml
  26. 0 80
      ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
  27. 0 75
      ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
  28. 0 83
      ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml
  29. 0 6
      ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml

+ 2 - 1
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java

@@ -9,6 +9,7 @@ import lombok.experimental.Accessors;
 import javax.validation.constraints.Email;
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.Size;
+import java.io.Serializable;
 import java.util.*;
 
 /**
@@ -21,7 +22,7 @@ import java.util.*;
 @NoArgsConstructor
 @Accessors(chain = true)
 @TableName("sys_dept")
-public class SysDept
+public class SysDept implements Serializable
 {
     private static final long serialVersionUID = 1L;
 

+ 3 - 2
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java

@@ -11,6 +11,7 @@ import lombok.experimental.Accessors;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.Size;
+import java.io.Serializable;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
@@ -25,13 +26,13 @@ import java.util.Map;
 @NoArgsConstructor
 @Accessors(chain = true)
 @TableName("sys_dict_data")
-public class SysDictData
+public class SysDictData implements Serializable
 {
     private static final long serialVersionUID = 1L;
 
     /** 字典编码 */
     @Excel(name = "字典编码", cellType = ColumnType.NUMERIC)
-    @TableId(value = "dept_code",type = IdType.AUTO)
+    @TableId(value = "dict_code",type = IdType.AUTO)
     private Long dictCode;
 
     /** 字典排序 */

+ 3 - 2
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java

@@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.Size;
+import java.io.Serializable;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
@@ -23,8 +24,8 @@ import java.util.Map;
 @Data
 @NoArgsConstructor
 @Accessors(chain = true)
-@TableName("sys_config")
-public class SysDictType
+@TableName("sys_dict_type")
+public class SysDictType implements Serializable
 {
     private static final long serialVersionUID = 1L;
 

+ 2 - 1
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java

@@ -8,6 +8,7 @@ import lombok.experimental.Accessors;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.Size;
+import java.io.Serializable;
 import java.util.*;
 
 /**
@@ -20,7 +21,7 @@ import java.util.*;
 @NoArgsConstructor
 @Accessors(chain = true)
 @TableName("sys_menu")
-public class SysMenu
+public class SysMenu implements Serializable
 {
     private static final long serialVersionUID = 1L;
 

+ 2 - 1
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java

@@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.Size;
+import java.io.Serializable;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
@@ -24,7 +25,7 @@ import java.util.Map;
 @NoArgsConstructor
 @Accessors(chain = true)
 @TableName("sys_role")
-public class SysRole
+public class SysRole implements Serializable
 {
     private static final long serialVersionUID = 1L;
 

+ 2 - 1
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java

@@ -15,6 +15,7 @@ import lombok.experimental.Accessors;
 import javax.validation.constraints.Email;
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.Size;
+import java.io.Serializable;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -30,7 +31,7 @@ import java.util.Map;
 @NoArgsConstructor
 @Accessors(chain = true)
 @TableName("sys_user")
-public class SysUser
+public class SysUser implements Serializable
 {
     private static final long serialVersionUID = 1L;
 

+ 4 - 11
ruoyi-framework/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java

@@ -2,14 +2,7 @@ package com.ruoyi.framework.config;
 
 import com.baomidou.mybatisplus.annotation.DbType;
 import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
-import com.baomidou.mybatisplus.core.incrementer.IKeyGenerator;
-import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
-import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
-import com.baomidou.mybatisplus.core.injector.ISqlInjector;
-import com.baomidou.mybatisplus.extension.incrementer.H2KeyGenerator;
 import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
-import com.baomidou.mybatisplus.extension.plugins.inner.BlockAttackInnerInterceptor;
-import com.baomidou.mybatisplus.extension.plugins.inner.IllegalSQLInnerInterceptor;
 import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
 import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
 import com.ruoyi.framework.mybatisplus.CreateAndUpdateMetaObjectHandler;
@@ -29,7 +22,7 @@ public class MybatisPlusConfig {
 		// 乐观锁插件
 		interceptor.addInnerInterceptor(optimisticLockerInnerInterceptor());
 		// 阻断插件
-		interceptor.addInnerInterceptor(blockAttackInnerInterceptor());
+//		interceptor.addInnerInterceptor(blockAttackInnerInterceptor());
 		return interceptor;
 	}
 
@@ -58,9 +51,9 @@ public class MybatisPlusConfig {
 	 * 如果是对全表的删除或更新操作,就会终止该操作
 	 * https://baomidou.com/guide/interceptor-block-attack.html
 	 */
-	public BlockAttackInnerInterceptor blockAttackInnerInterceptor() {
-		return new BlockAttackInnerInterceptor();
-	}
+//	public BlockAttackInnerInterceptor blockAttackInnerInterceptor() {
+//		return new BlockAttackInnerInterceptor();
+//	}
 
 	/**
 	 * sql性能规范插件(垃圾SQL拦截)

+ 2 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java

@@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.Size;
+import java.io.Serializable;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
@@ -24,7 +25,7 @@ import java.util.Map;
 @NoArgsConstructor
 @Accessors(chain = true)
 @TableName("sys_config")
-public class SysConfig {
+public class SysConfig implements Serializable {
     private static final long serialVersionUID = 1L;
 
     /**

+ 2 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java

@@ -11,6 +11,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.experimental.Accessors;
 
+import java.io.Serializable;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
@@ -25,7 +26,7 @@ import java.util.Map;
 @NoArgsConstructor
 @Accessors(chain = true)
 @TableName("sys_logininfor")
-public class SysLogininfor {
+public class SysLogininfor implements Serializable {
     private static final long serialVersionUID = 1L;
 
     /**

+ 2 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java

@@ -8,6 +8,7 @@ import lombok.experimental.Accessors;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.Size;
+import java.io.Serializable;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
@@ -21,7 +22,7 @@ import java.util.Map;
 @NoArgsConstructor
 @Accessors(chain = true)
 @TableName("sys_notice")
-public class SysNotice {
+public class SysNotice implements Serializable {
     private static final long serialVersionUID = 1L;
 
     /**

+ 3 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java

@@ -11,6 +11,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.experimental.Accessors;
 
+import java.io.Serializable;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
@@ -25,7 +26,7 @@ import java.util.Map;
 @NoArgsConstructor
 @Accessors(chain = true)
 @TableName("sys_oper_log")
-public class SysOperLog {
+public class SysOperLog implements Serializable {
     private static final long serialVersionUID = 1L;
 
     /**
@@ -50,6 +51,7 @@ public class SysOperLog {
     /**
      * 业务类型数组
      */
+    @TableField(exist = false)
     private Integer[] businessTypes;
 
     /**

+ 2 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java

@@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.Size;
+import java.io.Serializable;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
@@ -24,7 +25,7 @@ import java.util.Map;
 @NoArgsConstructor
 @Accessors(chain = true)
 @TableName("sys_post")
-public class SysPost {
+public class SysPost implements Serializable {
     private static final long serialVersionUID = 1L;
 
     /**

+ 0 - 30
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java

@@ -3,41 +3,11 @@ package com.ruoyi.system.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ruoyi.system.domain.SysLogininfor;
 
-import java.util.List;
-
 /**
  * 系统访问日志情况信息 数据层
  *
  * @author ruoyi
  */
 public interface SysLogininforMapper extends BaseMapper<SysLogininfor> {
-    /**
-     * 新增系统登录日志
-     *
-     * @param logininfor 访问日志对象
-     */
-    public void insertLogininfor(SysLogininfor logininfor);
-
-    /**
-     * 查询系统登录日志集合
-     *
-     * @param logininfor 访问日志对象
-     * @return 登录记录集合
-     */
-    public List<SysLogininfor> selectLogininforList(SysLogininfor logininfor);
-
-    /**
-     * 批量删除系统登录日志
-     *
-     * @param infoIds 需要删除的登录日志ID
-     * @return 结果
-     */
-    public int deleteLogininforByIds(Long[] infoIds);
 
-    /**
-     * 清空系统登录日志
-     *
-     * @return 结果
-     */
-    public int cleanLogininfor();
 }

+ 0 - 48
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java

@@ -3,59 +3,11 @@ package com.ruoyi.system.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ruoyi.system.domain.SysNotice;
 
-import java.util.List;
-
 /**
  * 通知公告表 数据层
  *
  * @author ruoyi
  */
 public interface SysNoticeMapper extends BaseMapper<SysNotice> {
-    /**
-     * 查询公告信息
-     *
-     * @param noticeId 公告ID
-     * @return 公告信息
-     */
-    public SysNotice selectNoticeById(Long noticeId);
-
-    /**
-     * 查询公告列表
-     *
-     * @param notice 公告信息
-     * @return 公告集合
-     */
-    public List<SysNotice> selectNoticeList(SysNotice notice);
-
-    /**
-     * 新增公告
-     *
-     * @param notice 公告信息
-     * @return 结果
-     */
-    public int insertNotice(SysNotice notice);
-
-    /**
-     * 修改公告
-     *
-     * @param notice 公告信息
-     * @return 结果
-     */
-    public int updateNotice(SysNotice notice);
-
-    /**
-     * 批量删除公告
-     *
-     * @param noticeId 公告ID
-     * @return 结果
-     */
-    public int deleteNoticeById(Long noticeId);
 
-    /**
-     * 批量删除公告信息
-     *
-     * @param noticeIds 需要删除的公告ID
-     * @return 结果
-     */
-    public int deleteNoticeByIds(Long[] noticeIds);
 }

+ 0 - 36
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java

@@ -3,47 +3,11 @@ package com.ruoyi.system.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ruoyi.system.domain.SysOperLog;
 
-import java.util.List;
-
 /**
  * 操作日志 数据层
  *
  * @author ruoyi
  */
 public interface SysOperLogMapper extends BaseMapper<SysOperLog> {
-    /**
-     * 新增操作日志
-     *
-     * @param operLog 操作日志对象
-     */
-    public void insertOperlog(SysOperLog operLog);
-
-    /**
-     * 查询系统操作日志集合
-     *
-     * @param operLog 操作日志对象
-     * @return 操作日志集合
-     */
-    public List<SysOperLog> selectOperLogList(SysOperLog operLog);
-
-    /**
-     * 批量删除系统操作日志
-     *
-     * @param operIds 需要删除的操作日志ID
-     * @return 结果
-     */
-    public int deleteOperLogByIds(Long[] operIds);
-
-    /**
-     * 查询操作日志详细
-     *
-     * @param operId 操作ID
-     * @return 操作日志对象
-     */
-    public SysOperLog selectOperLogById(Long operId);
 
-    /**
-     * 清空操作日志
-     */
-    public void cleanOperLog();
 }

+ 0 - 69
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java

@@ -11,28 +11,6 @@ import java.util.List;
  * @author ruoyi
  */
 public interface SysPostMapper extends BaseMapper<SysPost> {
-    /**
-     * 查询岗位数据集合
-     *
-     * @param post 岗位信息
-     * @return 岗位数据集合
-     */
-    public List<SysPost> selectPostList(SysPost post);
-
-    /**
-     * 查询所有岗位
-     *
-     * @return 岗位列表
-     */
-    public List<SysPost> selectPostAll();
-
-    /**
-     * 通过岗位ID查询岗位信息
-     *
-     * @param postId 岗位ID
-     * @return 角色对象信息
-     */
-    public SysPost selectPostById(Long postId);
 
     /**
      * 根据用户ID获取岗位选择框列表
@@ -50,51 +28,4 @@ public interface SysPostMapper extends BaseMapper<SysPost> {
      */
     public List<SysPost> selectPostsByUserName(String userName);
 
-    /**
-     * 删除岗位信息
-     *
-     * @param postId 岗位ID
-     * @return 结果
-     */
-    public int deletePostById(Long postId);
-
-    /**
-     * 批量删除岗位信息
-     *
-     * @param postIds 需要删除的岗位ID
-     * @return 结果
-     */
-    public int deletePostByIds(Long[] postIds);
-
-    /**
-     * 修改岗位信息
-     *
-     * @param post 岗位信息
-     * @return 结果
-     */
-    public int updatePost(SysPost post);
-
-    /**
-     * 新增岗位信息
-     *
-     * @param post 岗位信息
-     * @return 结果
-     */
-    public int insertPost(SysPost post);
-
-    /**
-     * 校验岗位名称
-     *
-     * @param postName 岗位名称
-     * @return 结果
-     */
-    public SysPost checkPostNameUnique(String postName);
-
-    /**
-     * 校验岗位编码
-     *
-     * @param postCode 岗位编码
-     * @return 结果
-     */
-    public SysPost checkPostCodeUnique(String postCode);
 }

+ 0 - 8
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java

@@ -19,14 +19,6 @@ public interface SysUserPostMapper extends BaseMapper<SysUserPost> {
      */
     public int deleteUserPostByUserId(Long userId);
 
-    /**
-     * 通过岗位ID查询岗位使用数量
-     *
-     * @param postId 岗位ID
-     * @return 结果
-     */
-    public int countUserPostById(Long postId);
-
     /**
      * 批量删除用户和岗位关联
      *

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java

@@ -91,10 +91,10 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig
         lqw.eq(StrUtil.isNotBlank(config.getConfigType()), SysConfig::getConfigType, config.getConfigType());
         lqw.like(StrUtil.isNotBlank(config.getConfigKey()), SysConfig::getConfigKey, config.getConfigKey());
         Map<String, Object> params = config.getParams();
-        lqw.apply(params.get("beginTime") != null,
+        lqw.apply(Validator.isNotEmpty(params.get("beginTime")),
                 "date_format(create_time,'%y%m%d') >= date_format(#{0},'%y%m%d')",
                 params.get("beginTime"));
-        lqw.apply(params.get("endTime") != null,
+        lqw.apply(Validator.isNotEmpty(params.get("endTime")),
                 "date_format(create_time,'%y%m%d') >= date_format(#{0},'%y%m%d')",
                 params.get("endTime"));
         return baseMapper.selectList(lqw);

+ 1 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java

@@ -32,8 +32,6 @@ import java.util.stream.Collectors;
  */
 @Service
 public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> implements ISysDeptService {
-    @Autowired
-    private SysDeptMapper deptMapper;
 
     @Autowired
     private SysRoleMapper roleMapper;
@@ -109,7 +107,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
     @Override
     public List<Integer> selectDeptListByRoleId(Long roleId) {
         SysRole role = roleMapper.selectRoleById(roleId);
-        return deptMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly());
+        return baseMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly());
     }
 
     /**

+ 9 - 10
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java

@@ -2,6 +2,7 @@ package com.ruoyi.system.service.impl;
 
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.lang.Validator;
+import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -29,8 +30,6 @@ import java.util.Map;
  */
 @Service
 public class SysDictTypeServiceImpl extends ServiceImpl<SysDictTypeMapper, SysDictType> implements ISysDictTypeService {
-    @Autowired
-    private SysDictTypeMapper dictTypeMapper;
 
     @Autowired
     private SysDictDataMapper dictDataMapper;
@@ -45,7 +44,7 @@ public class SysDictTypeServiceImpl extends ServiceImpl<SysDictTypeMapper, SysDi
             List<SysDictData> dictDatas = dictDataMapper.selectList(
                     new LambdaQueryWrapper<SysDictData>()
                             .eq(SysDictData::getStatus, 0)
-                            .eq(SysDictData::getDictType, dictType)
+                            .eq(SysDictData::getDictType, dictType.getDictType())
                             .orderByAsc(SysDictData::getDictSort));
             DictUtils.setDictCache(dictType.getDictType(), dictDatas);
         }
@@ -61,13 +60,13 @@ public class SysDictTypeServiceImpl extends ServiceImpl<SysDictTypeMapper, SysDi
     public List<SysDictType> selectDictTypeList(SysDictType dictType) {
         Map<String, Object> params = dictType.getParams();
         return list(new LambdaQueryWrapper<SysDictType>()
-                .like(SysDictType::getDictName, dictType.getDictName())
-                .eq(SysDictType::getStatus, dictType.getStatus())
-                .like(SysDictType::getDictType, dictType.getDictType())
-                .apply(params.get("beginTime") != null,
+                .like(StrUtil.isNotBlank(dictType.getDictName()),SysDictType::getDictName, dictType.getDictName())
+                .eq(StrUtil.isNotBlank(dictType.getStatus()),SysDictType::getStatus, dictType.getStatus())
+                .like(StrUtil.isNotBlank(dictType.getDictType()),SysDictType::getDictType, dictType.getDictType())
+                .apply(Validator.isNotEmpty(params.get("beginTime")),
                         "date_format(create_time,'%y%m%d') >= date_format({0},'%y%m%d')",
                         params.get("beginTime"))
-                .apply(params.get("endTime") != null,
+                .apply(Validator.isNotEmpty(params.get("endTime")),
                         "date_format(create_time,'%y%m%d') <= date_format({0},'%y%m%d')",
                         params.get("endTime")));
     }
@@ -165,7 +164,7 @@ public class SysDictTypeServiceImpl extends ServiceImpl<SysDictTypeMapper, SysDi
      */
     @Override
     public int insertDictType(SysDictType dictType) {
-        int row = dictTypeMapper.insert(dictType);
+        int row = baseMapper.insert(dictType);
         if (row > 0) {
             DictUtils.clearDictCache();
         }
@@ -185,7 +184,7 @@ public class SysDictTypeServiceImpl extends ServiceImpl<SysDictTypeMapper, SysDi
         dictDataMapper.update(null, new LambdaUpdateWrapper<SysDictData>()
                 .set(SysDictData::getDictType, dictType.getDictType())
                 .eq(SysDictData::getDictType, oldDict.getDictType()));
-        int row = dictTypeMapper.updateById(dictType);
+        int row = baseMapper.updateById(dictType);
         if (row > 0) {
             DictUtils.clearDictCache();
         }

+ 20 - 8
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java

@@ -1,13 +1,17 @@
 package com.ruoyi.system.service.impl;
 
+import cn.hutool.core.lang.Validator;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.system.domain.SysLogininfor;
 import com.ruoyi.system.mapper.SysLogininforMapper;
 import com.ruoyi.system.service.ISysLogininforService;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Arrays;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 系统访问日志情况信息 服务层处理
@@ -17,9 +21,6 @@ import java.util.List;
 @Service
 public class SysLogininforServiceImpl extends ServiceImpl<SysLogininforMapper, SysLogininfor> implements ISysLogininforService {
 
-    @Autowired
-    private SysLogininforMapper logininforMapper;
-
     /**
      * 新增系统登录日志
      *
@@ -27,7 +28,7 @@ public class SysLogininforServiceImpl extends ServiceImpl<SysLogininforMapper, S
      */
     @Override
     public void insertLogininfor(SysLogininfor logininfor) {
-        logininforMapper.insertLogininfor(logininfor);
+        save(logininfor);
     }
 
     /**
@@ -38,7 +39,18 @@ public class SysLogininforServiceImpl extends ServiceImpl<SysLogininforMapper, S
      */
     @Override
     public List<SysLogininfor> selectLogininforList(SysLogininfor logininfor) {
-        return logininforMapper.selectLogininforList(logininfor);
+        Map<String, Object> params = logininfor.getParams();
+        return list(new LambdaQueryWrapper<SysLogininfor>()
+                .like(StrUtil.isNotBlank(logininfor.getIpaddr()),SysLogininfor::getIpaddr,logininfor.getIpaddr())
+                .eq(StrUtil.isNotBlank(logininfor.getStatus()),SysLogininfor::getStatus,logininfor.getStatus())
+                .like(StrUtil.isNotBlank(logininfor.getUserName()),SysLogininfor::getUserName,logininfor.getUserName())
+                .apply(Validator.isNotEmpty(params.get("beginTime")),
+                        "date_format(login_time,'%y%m%d') &gt;= date_format({0},'%y%m%d')",
+                        params.get("beginTime"))
+                .apply(Validator.isNotEmpty(params.get("endTime")),
+                        "date_format(login_time,'%y%m%d') &lt;= date_format({0},'%y%m%d'",
+                        params.get("endTime"))
+                .orderByDesc(SysLogininfor::getInfoId));
     }
 
     /**
@@ -49,7 +61,7 @@ public class SysLogininforServiceImpl extends ServiceImpl<SysLogininforMapper, S
      */
     @Override
     public int deleteLogininforByIds(Long[] infoIds) {
-        return logininforMapper.deleteLogininforByIds(infoIds);
+        return baseMapper.deleteBatchIds(Arrays.asList(infoIds));
     }
 
     /**
@@ -57,6 +69,6 @@ public class SysLogininforServiceImpl extends ServiceImpl<SysLogininforMapper, S
      */
     @Override
     public void cleanLogininfor() {
-        logininforMapper.cleanLogininfor();
+        remove(new LambdaQueryWrapper<>());
     }
 }

+ 15 - 12
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysNoticeServiceImpl.java

@@ -1,13 +1,15 @@
 package com.ruoyi.system.service.impl;
 
-import java.util.List;
-
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
 import com.ruoyi.system.domain.SysNotice;
 import com.ruoyi.system.mapper.SysNoticeMapper;
 import com.ruoyi.system.service.ISysNoticeService;
+import org.springframework.stereotype.Service;
+
+import java.util.Arrays;
+import java.util.List;
 
 /**
  * 公告 服务层实现
@@ -16,8 +18,6 @@ import com.ruoyi.system.service.ISysNoticeService;
  */
 @Service
 public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice> implements ISysNoticeService {
-    @Autowired
-    private SysNoticeMapper noticeMapper;
 
     /**
      * 查询公告信息
@@ -27,7 +27,7 @@ public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice
      */
     @Override
     public SysNotice selectNoticeById(Long noticeId) {
-        return noticeMapper.selectNoticeById(noticeId);
+        return getById(noticeId);
     }
 
     /**
@@ -38,7 +38,10 @@ public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice
      */
     @Override
     public List<SysNotice> selectNoticeList(SysNotice notice) {
-        return noticeMapper.selectNoticeList(notice);
+        return list(new LambdaQueryWrapper<SysNotice>()
+                .like(StrUtil.isNotBlank(notice.getNoticeTitle()),SysNotice::getNoticeTitle,notice.getNoticeTitle())
+                .eq(StrUtil.isNotBlank(notice.getNoticeType()),SysNotice::getNoticeType,notice.getNoticeType())
+                .like(StrUtil.isNotBlank(notice.getCreateBy()),SysNotice::getCreateBy,notice.getCreateBy()));
     }
 
     /**
@@ -49,7 +52,7 @@ public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice
      */
     @Override
     public int insertNotice(SysNotice notice) {
-        return noticeMapper.insertNotice(notice);
+        return baseMapper.insert(notice);
     }
 
     /**
@@ -60,7 +63,7 @@ public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice
      */
     @Override
     public int updateNotice(SysNotice notice) {
-        return noticeMapper.updateNotice(notice);
+        return baseMapper.updateById(notice);
     }
 
     /**
@@ -71,7 +74,7 @@ public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice
      */
     @Override
     public int deleteNoticeById(Long noticeId) {
-        return noticeMapper.deleteNoticeById(noticeId);
+        return baseMapper.deleteById(noticeId);
     }
 
     /**
@@ -82,6 +85,6 @@ public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice
      */
     @Override
     public int deleteNoticeByIds(Long[] noticeIds) {
-        return noticeMapper.deleteNoticeByIds(noticeIds);
+        return baseMapper.deleteBatchIds(Arrays.asList(noticeIds));
     }
 }

+ 33 - 11
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java

@@ -1,13 +1,18 @@
 package com.ruoyi.system.service.impl;
 
-import java.util.List;
-
+import cn.hutool.core.lang.Validator;
+import cn.hutool.core.util.ArrayUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
 import com.ruoyi.system.domain.SysOperLog;
 import com.ruoyi.system.mapper.SysOperLogMapper;
 import com.ruoyi.system.service.ISysOperLogService;
+import org.springframework.stereotype.Service;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 操作日志 服务层处理
@@ -16,8 +21,6 @@ import com.ruoyi.system.service.ISysOperLogService;
  */
 @Service
 public class SysOperLogServiceImpl extends ServiceImpl<SysOperLogMapper, SysOperLog> implements ISysOperLogService {
-    @Autowired
-    private SysOperLogMapper operLogMapper;
 
     /**
      * 新增操作日志
@@ -26,7 +29,7 @@ public class SysOperLogServiceImpl extends ServiceImpl<SysOperLogMapper, SysOper
      */
     @Override
     public void insertOperlog(SysOperLog operLog) {
-        operLogMapper.insertOperlog(operLog);
+        save(operLog);
     }
 
     /**
@@ -37,7 +40,26 @@ public class SysOperLogServiceImpl extends ServiceImpl<SysOperLogMapper, SysOper
      */
     @Override
     public List<SysOperLog> selectOperLogList(SysOperLog operLog) {
-        return operLogMapper.selectOperLogList(operLog);
+        Map<String, Object> params = operLog.getParams();
+        return list(new LambdaQueryWrapper<SysOperLog>()
+                .like(StrUtil.isNotBlank(operLog.getTitle()),SysOperLog::getTitle,operLog.getTitle())
+                .eq(operLog.getBusinessType() != null && operLog.getBusinessType() > 0,
+                        SysOperLog::getBusinessType,operLog.getBusinessType())
+                .func(f -> {
+                    if (ArrayUtil.isNotEmpty(operLog.getBusinessTypes())){
+                        f.in(SysOperLog::getBusinessType, Arrays.asList(operLog.getBusinessTypes()));
+                    }
+                })
+                .eq(operLog.getStatus() != null && operLog.getStatus() > 0,
+                        SysOperLog::getStatus,operLog.getStatus())
+                .like(StrUtil.isNotBlank(operLog.getOperName()),SysOperLog::getOperName,operLog.getOperName())
+                .apply(Validator.isNotEmpty(params.get("beginTime")),
+                        "date_format(login_time,'%y%m%d') &gt;= date_format({0},'%y%m%d')",
+                        params.get("beginTime"))
+                .apply(Validator.isNotEmpty(params.get("endTime")),
+                        "date_format(login_time,'%y%m%d') &lt;= date_format({0},'%y%m%d'",
+                        params.get("endTime"))
+                .orderByDesc(SysOperLog::getOperId));
     }
 
     /**
@@ -48,7 +70,7 @@ public class SysOperLogServiceImpl extends ServiceImpl<SysOperLogMapper, SysOper
      */
     @Override
     public int deleteOperLogByIds(Long[] operIds) {
-        return operLogMapper.deleteOperLogByIds(operIds);
+        return baseMapper.deleteBatchIds(Arrays.asList(operIds));
     }
 
     /**
@@ -59,7 +81,7 @@ public class SysOperLogServiceImpl extends ServiceImpl<SysOperLogMapper, SysOper
      */
     @Override
     public SysOperLog selectOperLogById(Long operId) {
-        return operLogMapper.selectOperLogById(operId);
+        return getById(operId);
     }
 
     /**
@@ -67,6 +89,6 @@ public class SysOperLogServiceImpl extends ServiceImpl<SysOperLogMapper, SysOper
      */
     @Override
     public void cleanOperLog() {
-        operLogMapper.cleanOperLog();
+        remove(new LambdaQueryWrapper<>());
     }
 }

+ 20 - 13
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java

@@ -1,16 +1,20 @@
 package com.ruoyi.system.service.impl;
 
 import cn.hutool.core.lang.Validator;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.exception.CustomException;
 import com.ruoyi.system.domain.SysPost;
+import com.ruoyi.system.domain.SysUserPost;
 import com.ruoyi.system.mapper.SysPostMapper;
 import com.ruoyi.system.mapper.SysUserPostMapper;
 import com.ruoyi.system.service.ISysPostService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -20,8 +24,6 @@ import java.util.List;
  */
 @Service
 public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> implements ISysPostService {
-    @Autowired
-    private SysPostMapper postMapper;
 
     @Autowired
     private SysUserPostMapper userPostMapper;
@@ -34,7 +36,10 @@ public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> impl
      */
     @Override
     public List<SysPost> selectPostList(SysPost post) {
-        return postMapper.selectPostList(post);
+        return list(new LambdaQueryWrapper<SysPost>()
+                .like(StrUtil.isNotBlank(post.getPostCode()), SysPost::getPostCode, post.getPostCode())
+                .eq(StrUtil.isNotBlank(post.getStatus()), SysPost::getStatus, post.getStatus())
+                .like(StrUtil.isNotBlank(post.getPostName()), SysPost::getPostName, post.getPostName()));
     }
 
     /**
@@ -44,7 +49,7 @@ public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> impl
      */
     @Override
     public List<SysPost> selectPostAll() {
-        return postMapper.selectPostAll();
+        return list();
     }
 
     /**
@@ -55,7 +60,7 @@ public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> impl
      */
     @Override
     public SysPost selectPostById(Long postId) {
-        return postMapper.selectPostById(postId);
+        return getById(postId);
     }
 
     /**
@@ -66,7 +71,7 @@ public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> impl
      */
     @Override
     public List<Integer> selectPostListByUserId(Long userId) {
-        return postMapper.selectPostListByUserId(userId);
+        return baseMapper.selectPostListByUserId(userId);
     }
 
     /**
@@ -78,7 +83,8 @@ public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> impl
     @Override
     public String checkPostNameUnique(SysPost post) {
         Long postId = Validator.isNull(post.getPostId()) ? -1L : post.getPostId();
-        SysPost info = postMapper.checkPostNameUnique(post.getPostName());
+        SysPost info = getOne(new LambdaQueryWrapper<SysPost>()
+                .eq(SysPost::getPostName, post.getPostName()).last("limit 1"));
         if (Validator.isNotNull(info) && info.getPostId().longValue() != postId.longValue()) {
             return UserConstants.NOT_UNIQUE;
         }
@@ -94,7 +100,8 @@ public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> impl
     @Override
     public String checkPostCodeUnique(SysPost post) {
         Long postId = Validator.isNull(post.getPostId()) ? -1L : post.getPostId();
-        SysPost info = postMapper.checkPostCodeUnique(post.getPostCode());
+        SysPost info = getOne(new LambdaQueryWrapper<SysPost>()
+                .eq(SysPost::getPostCode, post.getPostCode()).last("limit 1"));
         if (Validator.isNotNull(info) && info.getPostId().longValue() != postId.longValue()) {
             return UserConstants.NOT_UNIQUE;
         }
@@ -109,7 +116,7 @@ public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> impl
      */
     @Override
     public int countUserPostById(Long postId) {
-        return userPostMapper.countUserPostById(postId);
+        return userPostMapper.selectCount(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getPostId,postId));
     }
 
     /**
@@ -120,7 +127,7 @@ public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> impl
      */
     @Override
     public int deletePostById(Long postId) {
-        return postMapper.deletePostById(postId);
+        return baseMapper.deleteById(postId);
     }
 
     /**
@@ -138,7 +145,7 @@ public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> impl
                 throw new CustomException(String.format("%1$s已分配,不能删除", post.getPostName()));
             }
         }
-        return postMapper.deletePostByIds(postIds);
+        return baseMapper.deleteBatchIds(Arrays.asList(postIds));
     }
 
     /**
@@ -149,7 +156,7 @@ public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> impl
      */
     @Override
     public int insertPost(SysPost post) {
-        return postMapper.insertPost(post);
+        return baseMapper.insert(post);
     }
 
     /**
@@ -160,6 +167,6 @@ public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> impl
      */
     @Override
     public int updatePost(SysPost post) {
-        return postMapper.updatePost(post);
+        return baseMapper.updateById(post);
     }
 }

+ 0 - 38
ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml

@@ -16,42 +16,4 @@
         <result property="loginTime" column="login_time"/>
     </resultMap>
 
-    <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())
-    </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>
-            <if test="ipaddr != null and ipaddr != ''">
-                AND ipaddr like concat('%', #{ipaddr}, '%')
-            </if>
-            <if test="status != null and status != ''">
-                AND status = #{status}
-            </if>
-            <if test="userName != null and userName != ''">
-                AND user_name like concat('%', #{userName}, '%')
-            </if>
-            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-                and date_format(login_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
-            </if>
-            <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-                and date_format(login_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
-            </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>
-
 </mapper> 

+ 0 - 80
ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml

@@ -17,84 +17,4 @@
         <result property="remark" column="remark"/>
     </resultMap>
 
-    <sql id="selectNoticeVo">
-        select notice_id,
-               notice_title,
-               notice_type,
-               cast(notice_content as char) as notice_content,
-               status,
-               create_by,
-               create_time,
-               update_by,
-               update_time,
-               remark
-        from sys_notice
-    </sql>
-
-    <select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult">
-        <include refid="selectNoticeVo"/>
-        where notice_id = #{noticeId}
-    </select>
-
-    <select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
-        <include refid="selectNoticeVo"/>
-        <where>
-            <if test="noticeTitle != null and noticeTitle != ''">
-                AND notice_title like concat('%', #{noticeTitle}, '%')
-            </if>
-            <if test="noticeType != null and noticeType != ''">
-                AND notice_type = #{noticeType}
-            </if>
-            <if test="createBy != null and createBy != ''">
-                AND create_by like concat('%', #{createBy}, '%')
-            </if>
-        </where>
-    </select>
-
-    <insert id="insertNotice" parameterType="SysNotice">
-        insert into sys_notice (
-        <if test="noticeTitle != null and noticeTitle != '' ">notice_title,</if>
-        <if test="noticeType != null and noticeType != '' ">notice_type,</if>
-        <if test="noticeContent != null and noticeContent != '' ">notice_content,</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="noticeTitle != null and noticeTitle != ''">#{noticeTitle},</if>
-        <if test="noticeType != null and noticeType != ''">#{noticeType},</if>
-        <if test="noticeContent != null and noticeContent != ''">#{noticeContent},</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>
-
-    <update id="updateNotice" parameterType="SysNotice">
-        update sys_notice
-        <set>
-            <if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle},</if>
-            <if test="noticeType != null and noticeType != ''">notice_type = #{noticeType},</if>
-            <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()
-        </set>
-        where notice_id = #{noticeId}
-    </update>
-
-    <delete id="deleteNoticeById" parameterType="Long">
-        delete
-        from sys_notice
-        where notice_id = #{noticeId}
-    </delete>
-
-    <delete id="deleteNoticeByIds" parameterType="Long">
-        delete from sys_notice where notice_id in
-        <foreach item="noticeId" collection="array" open="(" separator="," close=")">
-            #{noticeId}
-        </foreach>
-    </delete>
-
 </mapper>

+ 0 - 75
ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml

@@ -23,79 +23,4 @@
         <result property="operTime" column="oper_time"/>
     </resultMap>
 
-    <sql id="selectOperLogVo">
-        select oper_id,
-               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,
-               oper_time
-        from sys_oper_log
-    </sql>
-
-    <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,
-                                 oper_time)
-        values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName},
-                #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate())
-    </insert>
-
-    <select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
-        <include refid="selectOperLogVo"/>
-        <where>
-            <if test="title != null and title != ''">
-                AND title like concat('%', #{title}, '%')
-            </if>
-            <if test="businessType != null and businessType != ''">
-                AND business_type = #{businessType}
-            </if>
-            <if test="businessTypes != null and businessTypes.length > 0">
-                AND business_type in
-                <foreach collection="businessTypes" item="businessType" open="(" separator="," close=")">
-                    #{businessType}
-                </foreach>
-            </if>
-            <if test="status != null">
-                AND status = #{status}
-            </if>
-            <if test="operName != null and operName != ''">
-                AND oper_name like concat('%', #{operName}, '%')
-            </if>
-            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-                and date_format(oper_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
-            </if>
-            <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-                and date_format(oper_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
-            </if>
-        </where>
-        order by oper_id desc
-    </select>
-
-    <delete id="deleteOperLogByIds" parameterType="Long">
-        delete from sys_oper_log where oper_id in
-        <foreach collection="array" item="operId" open="(" separator="," close=")">
-            #{operId}
-        </foreach>
-    </delete>
-
-    <select id="selectOperLogById" parameterType="Long" resultMap="SysOperLogResult">
-        <include refid="selectOperLogVo"/>
-        where oper_id = #{operId}
-    </select>
-
-    <update id="cleanOperLog">
-        truncate table sys_oper_log
-    </update>
-
 </mapper> 

+ 0 - 83
ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml

@@ -29,30 +29,6 @@
         from sys_post
     </sql>
 
-    <select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
-        <include refid="selectPostVo"/>
-        <where>
-            <if test="postCode != null and postCode != ''">
-                AND post_code like concat('%', #{postCode}, '%')
-            </if>
-            <if test="status != null and status != ''">
-                AND status = #{status}
-            </if>
-            <if test="postName != null and postName != ''">
-                AND post_name like concat('%', #{postName}, '%')
-            </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="Integer">
         select p.post_id
         from sys_post p
@@ -69,63 +45,4 @@
         where u.user_name = #{userName}
     </select>
 
-    <select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult">
-        <include refid="selectPostVo"/>
-        where post_name=#{postName} limit 1
-    </select>
-
-    <select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult">
-        <include refid="selectPostVo"/>
-        where post_code=#{postCode} limit 1
-    </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 and postSort != ''">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>
-
-    <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 and postSort != ''">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 and postSort != ''">#{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>
-
-    <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>
-
 </mapper> 

+ 0 - 6
ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml

@@ -15,12 +15,6 @@
         where user_id = #{userId}
     </delete>
 
-    <select id="countUserPostById" resultType="Integer">
-        select count(1)
-        from sys_user_post
-        where post_id = #{postId}
-    </select>
-
     <delete id="deleteUserPost" parameterType="Long">
         delete from sys_user_post where user_id in
         <foreach collection="array" item="userId" open="(" separator="," close=")">