├── .gitignore ├── README.md ├── pom.xml ├── src └── main │ ├── java │ └── com │ │ └── bank │ │ ├── Application.java │ │ ├── common │ │ ├── constant │ │ │ ├── CommonMap.java │ │ │ ├── Constants.java │ │ │ ├── GenConstants.java │ │ │ ├── PermissionConstants.java │ │ │ ├── ScheduleConstants.java │ │ │ ├── ShiroConstants.java │ │ │ └── UserConstants.java │ │ ├── exception │ │ │ ├── BusinessException.java │ │ │ ├── DemoModeException.java │ │ │ ├── base │ │ │ │ └── BaseException.java │ │ │ ├── file │ │ │ │ ├── FileException.java │ │ │ │ ├── FileNameLengthLimitExceededException.java │ │ │ │ ├── FileSizeLimitExceededException.java │ │ │ │ └── InvalidExtensionException.java │ │ │ ├── job │ │ │ │ └── TaskException.java │ │ │ └── user │ │ │ │ ├── CaptchaException.java │ │ │ │ ├── RoleBlockedException.java │ │ │ │ ├── UserBlockedException.java │ │ │ │ ├── UserDeleteException.java │ │ │ │ ├── UserException.java │ │ │ │ ├── UserNotExistsException.java │ │ │ │ ├── UserPasswordNotMatchException.java │ │ │ │ ├── UserPasswordRetryLimitCountException.java │ │ │ │ └── UserPasswordRetryLimitExceedException.java │ │ ├── utils │ │ │ ├── AddressUtils.java │ │ │ ├── Arith.java │ │ │ ├── DateUtils.java │ │ │ ├── ExceptionUtil.java │ │ │ ├── IpUtils.java │ │ │ ├── LogUtils.java │ │ │ ├── MapDataUtil.java │ │ │ ├── Md5Utils.java │ │ │ ├── MessageUtils.java │ │ │ ├── ServletUtils.java │ │ │ ├── StringUtils.java │ │ │ ├── Threads.java │ │ │ ├── TreeUtils.java │ │ │ ├── bean │ │ │ │ └── BeanUtils.java │ │ │ ├── file │ │ │ │ ├── FileUploadUtils.java │ │ │ │ ├── FileUtils.java │ │ │ │ └── MimeTypeUtils.java │ │ │ ├── html │ │ │ │ ├── EscapeUtil.java │ │ │ │ └── HTMLFilter.java │ │ │ ├── http │ │ │ │ └── HttpUtils.java │ │ │ ├── poi │ │ │ │ └── ExcelUtil.java │ │ │ ├── reflect │ │ │ │ └── ReflectUtils.java │ │ │ ├── security │ │ │ │ ├── PermissionUtils.java │ │ │ │ └── ShiroUtils.java │ │ │ ├── spring │ │ │ │ └── SpringUtils.java │ │ │ ├── sql │ │ │ │ └── SqlUtil.java │ │ │ └── text │ │ │ │ ├── CharsetKit.java │ │ │ │ ├── Convert.java │ │ │ │ └── StrFormatter.java │ │ └── xss │ │ │ ├── XssFilter.java │ │ │ └── XssHttpServletRequestWrapper.java │ │ ├── framework │ │ ├── aspectj │ │ │ ├── DataScopeAspect.java │ │ │ ├── DataSourceAspect.java │ │ │ ├── LogAspect.java │ │ │ └── lang │ │ │ │ ├── annotation │ │ │ │ ├── DataScope.java │ │ │ │ ├── DataSource.java │ │ │ │ ├── Excel.java │ │ │ │ ├── Excels.java │ │ │ │ └── Log.java │ │ │ │ └── enums │ │ │ │ ├── BusinessStatus.java │ │ │ │ ├── BusinessType.java │ │ │ │ ├── DataSourceType.java │ │ │ │ └── OperatorType.java │ │ ├── config │ │ │ ├── ApplicationConfig.java │ │ │ ├── BankConfig.java │ │ │ ├── CaptchaConfig.java │ │ │ ├── DruidConfig.java │ │ │ ├── FilterConfig.java │ │ │ ├── GenConfig.java │ │ │ ├── I18nConfig.java │ │ │ ├── KaptchaTextCreator.java │ │ │ ├── MyBatisConfig.java │ │ │ ├── ResourcesConfig.java │ │ │ ├── ServerConfig.java │ │ │ ├── ShiroConfig.java │ │ │ ├── SwaggerConfig.java │ │ │ ├── ThreadPoolConfig.java │ │ │ └── properties │ │ │ │ └── DruidProperties.java │ │ ├── datasource │ │ │ ├── DynamicDataSource.java │ │ │ └── DynamicDataSourceContextHolder.java │ │ ├── interceptor │ │ │ ├── RepeatSubmitInterceptor.java │ │ │ ├── annotation │ │ │ │ └── RepeatSubmit.java │ │ │ └── impl │ │ │ │ └── SameUrlDataInterceptor.java │ │ ├── manager │ │ │ ├── AsyncManager.java │ │ │ ├── ShutdownManager.java │ │ │ └── factory │ │ │ │ └── AsyncFactory.java │ │ ├── shiro │ │ │ ├── realm │ │ │ │ └── UserRealm.java │ │ │ ├── service │ │ │ │ ├── LoginService.java │ │ │ │ └── PasswordService.java │ │ │ ├── session │ │ │ │ ├── OnlineSessionDAO.java │ │ │ │ └── OnlineSessionFactory.java │ │ │ └── web │ │ │ │ ├── filter │ │ │ │ ├── LogoutFilter.java │ │ │ │ ├── captcha │ │ │ │ │ └── CaptchaValidateFilter.java │ │ │ │ ├── kickout │ │ │ │ │ └── KickoutSessionFilter.java │ │ │ │ ├── online │ │ │ │ │ └── OnlineSessionFilter.java │ │ │ │ └── sync │ │ │ │ │ └── SyncOnlineSessionFilter.java │ │ │ │ └── session │ │ │ │ ├── OnlineWebSessionManager.java │ │ │ │ └── SpringSessionValidationScheduler.java │ │ └── web │ │ │ ├── controller │ │ │ └── BaseController.java │ │ │ ├── domain │ │ │ ├── AjaxResult.java │ │ │ ├── BaseEntity.java │ │ │ ├── TreeEntity.java │ │ │ └── Ztree.java │ │ │ ├── exception │ │ │ └── GlobalExceptionHandler.java │ │ │ ├── page │ │ │ ├── PageDomain.java │ │ │ ├── TableDataInfo.java │ │ │ └── TableSupport.java │ │ │ └── service │ │ │ ├── ConfigService.java │ │ │ ├── DictService.java │ │ │ └── PermissionService.java │ │ └── project │ │ ├── common │ │ └── CommonController.java │ │ ├── monitor │ │ ├── druid │ │ │ └── DruidController.java │ │ ├── logininfor │ │ │ ├── controller │ │ │ │ └── LogininforController.java │ │ │ ├── domain │ │ │ │ └── Logininfor.java │ │ │ ├── mapper │ │ │ │ └── LogininforMapper.java │ │ │ └── service │ │ │ │ ├── ILogininforService.java │ │ │ │ └── LogininforServiceImpl.java │ │ ├── online │ │ │ ├── controller │ │ │ │ └── UserOnlineController.java │ │ │ ├── domain │ │ │ │ ├── OnlineSession.java │ │ │ │ └── UserOnline.java │ │ │ ├── mapper │ │ │ │ └── UserOnlineMapper.java │ │ │ └── service │ │ │ │ ├── IUserOnlineService.java │ │ │ │ └── UserOnlineServiceImpl.java │ │ ├── operlog │ │ │ ├── controller │ │ │ │ └── OperlogController.java │ │ │ ├── domain │ │ │ │ └── OperLog.java │ │ │ ├── mapper │ │ │ │ └── OperLogMapper.java │ │ │ └── service │ │ │ │ ├── IOperLogService.java │ │ │ │ └── OperLogServiceImpl.java │ │ └── server │ │ │ ├── controller │ │ │ └── ServerController.java │ │ │ └── domain │ │ │ ├── Cpu.java │ │ │ ├── Jvm.java │ │ │ ├── Mem.java │ │ │ ├── Server.java │ │ │ ├── Sys.java │ │ │ └── SysFile.java │ │ ├── oa │ │ ├── constant │ │ │ └── AssetConstant.java │ │ ├── controller │ │ │ ├── AddressBookController.java │ │ │ ├── AssetController.java │ │ │ ├── AssetOperateController.java │ │ │ ├── BankNoticeController.java │ │ │ ├── BookManageController.java │ │ │ ├── ContractController.java │ │ │ ├── MeetManageController.java │ │ │ ├── SalaryDetailController.java │ │ │ ├── SalaryRecordController.java │ │ │ ├── UserDocController.java │ │ │ └── UserPlanController.java │ │ ├── domain │ │ │ ├── AddressBook.java │ │ │ ├── Asset.java │ │ │ ├── AssetOperate.java │ │ │ ├── BankNotice.java │ │ │ ├── BookManage.java │ │ │ ├── BookOperate.java │ │ │ ├── Contract.java │ │ │ ├── MeetManage.java │ │ │ ├── SalaryDetail.java │ │ │ ├── SalaryRecord.java │ │ │ ├── UserDoc.java │ │ │ └── UserPlan.java │ │ ├── mapper │ │ │ ├── AddressBookMapper.java │ │ │ ├── AssetMapper.java │ │ │ ├── AssetOperateMapper.java │ │ │ ├── BankNoticeMapper.java │ │ │ ├── BookManageMapper.java │ │ │ ├── BookOperateMapper.java │ │ │ ├── ContractMapper.java │ │ │ ├── MeetManageMapper.java │ │ │ ├── SalaryDetailMapper.java │ │ │ ├── SalaryRecordMapper.java │ │ │ ├── UserDocMapper.java │ │ │ └── UserPlanMapper.java │ │ └── service │ │ │ ├── AddressBookServiceImpl.java │ │ │ ├── AssetOperateServiceImpl.java │ │ │ ├── AssetServiceImpl.java │ │ │ ├── BankNoticeServiceImpl.java │ │ │ ├── BookManageServiceImpl.java │ │ │ ├── BookOperateServiceImpl.java │ │ │ ├── ContractServiceImpl.java │ │ │ ├── IAddressBookService.java │ │ │ ├── IAssetOperateService.java │ │ │ ├── IAssetService.java │ │ │ ├── IBankNoticeService.java │ │ │ ├── IBookManageService.java │ │ │ ├── IBookOperateService.java │ │ │ ├── IContractService.java │ │ │ ├── IMeetManageService.java │ │ │ ├── ISalaryRecordService.java │ │ │ ├── IUserDocService.java │ │ │ ├── IUserPlanService.java │ │ │ ├── MeetManageServiceImpl.java │ │ │ ├── SalaryRecordServiceImpl.java │ │ │ ├── UserDocServiceImpl.java │ │ │ └── UserPlanServiceImpl.java │ │ └── system │ │ ├── config │ │ ├── domain │ │ │ └── Config.java │ │ ├── mapper │ │ │ └── ConfigMapper.java │ │ └── service │ │ │ ├── ConfigServiceImpl.java │ │ │ └── IConfigService.java │ │ ├── dept │ │ ├── controller │ │ │ └── DeptController.java │ │ ├── domain │ │ │ └── Dept.java │ │ ├── mapper │ │ │ └── DeptMapper.java │ │ └── service │ │ │ ├── DeptServiceImpl.java │ │ │ └── IDeptService.java │ │ ├── dict │ │ ├── controller │ │ │ ├── DictDataController.java │ │ │ └── DictTypeController.java │ │ ├── domain │ │ │ ├── DictData.java │ │ │ └── DictType.java │ │ ├── mapper │ │ │ ├── DictDataMapper.java │ │ │ └── DictTypeMapper.java │ │ └── service │ │ │ ├── DictDataServiceImpl.java │ │ │ ├── DictTypeServiceImpl.java │ │ │ ├── IDictDataService.java │ │ │ └── IDictTypeService.java │ │ ├── menu │ │ ├── controller │ │ │ └── MenuController.java │ │ ├── domain │ │ │ └── Menu.java │ │ ├── mapper │ │ │ └── MenuMapper.java │ │ └── service │ │ │ ├── IMenuService.java │ │ │ └── MenuServiceImpl.java │ │ ├── notice │ │ ├── controller │ │ │ └── NoticeController.java │ │ ├── domain │ │ │ └── Notice.java │ │ ├── mapper │ │ │ └── NoticeMapper.java │ │ └── service │ │ │ ├── INoticeService.java │ │ │ └── NoticeServiceImpl.java │ │ ├── post │ │ ├── controller │ │ │ └── PostController.java │ │ ├── domain │ │ │ └── Post.java │ │ ├── mapper │ │ │ └── PostMapper.java │ │ └── service │ │ │ ├── IPostService.java │ │ │ └── PostServiceImpl.java │ │ ├── role │ │ ├── controller │ │ │ └── RoleController.java │ │ ├── domain │ │ │ ├── Role.java │ │ │ ├── RoleDept.java │ │ │ └── RoleMenu.java │ │ ├── mapper │ │ │ ├── RoleDeptMapper.java │ │ │ ├── RoleMapper.java │ │ │ └── RoleMenuMapper.java │ │ └── service │ │ │ ├── IRoleService.java │ │ │ └── RoleServiceImpl.java │ │ └── user │ │ ├── controller │ │ ├── CaptchaController.java │ │ ├── IndexController.java │ │ ├── LoginController.java │ │ ├── ProfileController.java │ │ └── UserController.java │ │ ├── domain │ │ ├── User.java │ │ ├── UserPost.java │ │ ├── UserRole.java │ │ └── UserStatus.java │ │ ├── mapper │ │ ├── UserMapper.java │ │ ├── UserPostMapper.java │ │ └── UserRoleMapper.java │ │ └── service │ │ ├── IUserService.java │ │ └── UserServiceImpl.java │ └── resources │ ├── application-druid.yml │ ├── application.yml │ ├── banner.txt │ ├── ehcache │ └── ehcache-shiro.xml │ ├── logback.xml │ └── mybatis │ ├── monitor │ ├── LogininforMapper.xml │ ├── OnlineMapper.xml │ └── OperLogMapper.xml │ ├── mybatis-config.xml │ ├── oa │ ├── AddressBookMapper.xml │ ├── AssetMapper.xml │ ├── AssetOperateMapper.xml │ ├── BankNoticeMapper.xml │ ├── BookManageMapper.xml │ ├── BookOperateMapper.xml │ ├── ContractMapper.xml │ ├── MeetManageMapper.xml │ ├── SalaryDetailMapper.xml │ ├── SalaryRecordMapper.xml │ ├── UserDocMapper.xml │ └── UserPlanMapper.xml │ └── system │ ├── ConfigMapper.xml │ ├── DeptMapper.xml │ ├── DictDataMapper.xml │ ├── DictTypeMapper.xml │ ├── MenuMapper.xml │ ├── NoticeMapper.xml │ ├── PostMapper.xml │ ├── RoleDeptMapper.xml │ ├── RoleMapper.xml │ ├── RoleMenuMapper.xml │ ├── UserMapper.xml │ ├── UserPostMapper.xml │ └── UserRoleMapper.xml └── 运行图 ├── 0-1-登录.png ├── 0-2-首页.png ├── 0-3-修改密码.png ├── 0-4-切换主题.png ├── 0-5-个人中心.png ├── 0-99-修改数据库.png ├── 0-99-启动项目.png ├── 1-公文管理-会议管理-列表.png ├── 1-公文管理-会议管理-增加.png ├── 1-公文管理-公文列表-列表.png ├── 1-公文管理-公文列表-增加.png ├── 2-资产管理-资产列表-列表.png ├── 2-资产管理-资产列表-增加.png ├── 2-资产管理-资产盘点-统计.png ├── 3-辅助办公-图书管理-列表.png ├── 3-辅助办公-图书管理-增加.png ├── 4-档案管理-人事档案-列表.png ├── 4-档案管理-人事档案-增加.png ├── 4-档案管理-合同管理-列表.png ├── 4-档案管理-合同管理-增加.png ├── 5-个人中心-工作计划-列表.png ├── 5-个人中心-工作计划-增加.png ├── 5-个人中心-薪资管理-列表.png ├── 5-个人中心-薪资管理-增加.png ├── 5-个人中心-通讯录管理-列表.png ├── 5-个人中心-通讯录管理-增加.png ├── 6-系统管理-字典管理-列表.png ├── 6-系统管理-字典管理-增加.png ├── 6-系统管理-用户管理-列表.png ├── 6-系统管理-用户管理-增加.png ├── 6-系统管理-菜单管理-列表.png ├── 6-系统管理-菜单管理-增加.png ├── 6-系统管理-角色管理-列表.png ├── 6-系统管理-角色管理-增加.png ├── 6-系统管理-部门管理-列表.png ├── 6-系统管理-部门管理-增加.png ├── r-主任.png ├── r-普通用户.png ├── r-管理员.png ├── r-资产盘点员.png └── r-资产管理员.png /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /logs/ 3 | /.idea 4 | -------------------------------------------------------------------------------- /src/main/java/com/bank/Application.java: -------------------------------------------------------------------------------- 1 | package com.bank; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; 6 | 7 | /** 8 | * @author: QQ:553039957 9 | * @Date: 2023/9/25 15:24 10 | * @Description: 11 | * 1. gitcode主页: https://gitcode.net/tbb414 (推荐) 12 | * 2. github主页:https://github.com/doudoutangs 13 | * 3. gitee(码云)主页:https://gitee.com/spdoudoutang 14 | */ 15 | @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) 16 | public class Application 17 | { 18 | public static void main(String[] args) 19 | { 20 | SpringApplication.run(Application.class, args); 21 | System.out.println("银行OA启动成功啦!!"); 22 | System.out.println(" * 0. QQ:553039957\n" + 23 | " * 1. gitcode主页: https://gitcode.net/tbb414 (推荐)\n" + 24 | " * 2. github主页:https://github.com/doudoutangs\n" + 25 | " * 3. gitee(码云)主页:https://gitee.com/spdoudoutang"); 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/common/constant/CommonMap.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.constant; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * 通用数据库映射Map数据 8 | * 9 | * @author bank 10 | */ 11 | public class CommonMap 12 | { 13 | /** 状态编码转换 */ 14 | public static Map javaTypeMap = new HashMap(); 15 | 16 | static 17 | { 18 | initJavaTypeMap(); 19 | } 20 | 21 | /** 22 | * 返回状态映射 23 | */ 24 | public static void initJavaTypeMap() 25 | { 26 | javaTypeMap.put("tinyint", "Integer"); 27 | javaTypeMap.put("smallint", "Integer"); 28 | javaTypeMap.put("mediumint", "Integer"); 29 | javaTypeMap.put("int", "Integer"); 30 | javaTypeMap.put("number", "Integer"); 31 | javaTypeMap.put("integer", "integer"); 32 | javaTypeMap.put("bigint", "Long"); 33 | javaTypeMap.put("float", "Float"); 34 | javaTypeMap.put("double", "Double"); 35 | javaTypeMap.put("decimal", "BigDecimal"); 36 | javaTypeMap.put("bit", "Boolean"); 37 | javaTypeMap.put("char", "String"); 38 | javaTypeMap.put("varchar", "String"); 39 | javaTypeMap.put("varchar2", "String"); 40 | javaTypeMap.put("tinytext", "String"); 41 | javaTypeMap.put("text", "String"); 42 | javaTypeMap.put("mediumtext", "String"); 43 | javaTypeMap.put("longtext", "String"); 44 | javaTypeMap.put("time", "Date"); 45 | javaTypeMap.put("date", "Date"); 46 | javaTypeMap.put("datetime", "Date"); 47 | javaTypeMap.put("timestamp", "Date"); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/constant/Constants.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.constant; 2 | 3 | /** 4 | * 通用常量信息 5 | * 6 | * @author bank 7 | */ 8 | public class Constants 9 | { 10 | /** 11 | * UTF-8 字符集 12 | */ 13 | public static final String UTF8 = "UTF-8"; 14 | 15 | /** 16 | * 通用成功标识 17 | */ 18 | public static final String SUCCESS = "0"; 19 | 20 | /** 21 | * 通用失败标识 22 | */ 23 | public static final String FAIL = "1"; 24 | 25 | /** 26 | * 登录成功 27 | */ 28 | public static final String LOGIN_SUCCESS = "Success"; 29 | 30 | /** 31 | * 注销 32 | */ 33 | public static final String LOGOUT = "Logout"; 34 | 35 | /** 36 | * 登录失败 37 | */ 38 | public static final String LOGIN_FAIL = "Error"; 39 | 40 | /** 41 | * 当前记录起始索引 42 | */ 43 | public static final String PAGE_NUM = "pageNum"; 44 | 45 | /** 46 | * 每页显示记录数 47 | */ 48 | public static final String PAGE_SIZE = "pageSize"; 49 | 50 | /** 51 | * 排序列 52 | */ 53 | public static final String ORDER_BY_COLUMN = "orderByColumn"; 54 | 55 | /** 56 | * 排序的方向 "desc" 或者 "asc". 57 | */ 58 | public static final String IS_ASC = "isAsc"; 59 | 60 | /** 61 | * 资源映射路径 前缀 62 | */ 63 | public static final String RESOURCE_PREFIX = "/profile"; 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/constant/PermissionConstants.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.constant; 2 | 3 | /** 4 | * 权限通用常量 5 | * 6 | * @author bank 7 | */ 8 | public class PermissionConstants 9 | { 10 | /** 新增权限 */ 11 | public static final String ADD_PERMISSION = "add"; 12 | 13 | /** 修改权限 */ 14 | public static final String EDIT_PERMISSION = "edit"; 15 | 16 | /** 删除权限 */ 17 | public static final String REMOVE_PERMISSION = "remove"; 18 | 19 | /** 导出权限 */ 20 | public static final String EXPORT_PERMISSION = "export"; 21 | 22 | /** 显示权限 */ 23 | public static final String VIEW_PERMISSION = "view"; 24 | 25 | /** 查询权限 */ 26 | public static final String LIST_PERMISSION = "list"; 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/constant/ScheduleConstants.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.constant; 2 | 3 | /** 4 | * 任务调度通用常量 5 | * 6 | * @author bank 7 | */ 8 | public interface ScheduleConstants 9 | { 10 | public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME"; 11 | 12 | /** 执行目标key */ 13 | public static final String TASK_PROPERTIES = "TASK_PROPERTIES"; 14 | 15 | /** 默认 */ 16 | public static final String MISFIRE_DEFAULT = "0"; 17 | 18 | /** 立即触发执行 */ 19 | public static final String MISFIRE_IGNORE_MISFIRES = "1"; 20 | 21 | /** 触发一次执行 */ 22 | public static final String MISFIRE_FIRE_AND_PROCEED = "2"; 23 | 24 | /** 不触发立即执行 */ 25 | public static final String MISFIRE_DO_NOTHING = "3"; 26 | 27 | public enum Status 28 | { 29 | /** 30 | * 正常 31 | */ 32 | NORMAL("0"), 33 | /** 34 | * 暂停 35 | */ 36 | PAUSE("1"); 37 | 38 | private String value; 39 | 40 | private Status(String value) 41 | { 42 | this.value = value; 43 | } 44 | 45 | public String getValue() 46 | { 47 | return value; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/constant/ShiroConstants.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.constant; 2 | 3 | /** 4 | * Shiro通用常量 5 | * 6 | * @author bank 7 | */ 8 | public interface ShiroConstants 9 | { 10 | /** 11 | * 当前登录的用户 12 | */ 13 | public static final String CURRENT_USER = "currentUser"; 14 | 15 | /** 16 | * 用户名 17 | */ 18 | public static final String CURRENT_USERNAME = "username"; 19 | 20 | /** 21 | * 消息key 22 | */ 23 | public static String MESSAGE = "message"; 24 | 25 | /** 26 | * 错误key 27 | */ 28 | public static String ERROR = "errorMsg"; 29 | 30 | /** 31 | * 编码格式 32 | */ 33 | public static String ENCODING = "UTF-8"; 34 | 35 | /** 36 | * 当前在线会话 37 | */ 38 | public String ONLINE_SESSION = "online_session"; 39 | 40 | /** 41 | * 验证码key 42 | */ 43 | public static final String CURRENT_CAPTCHA = "captcha"; 44 | 45 | /** 46 | * 验证码开关 47 | */ 48 | public static final String CURRENT_ENABLED = "captchaEnabled"; 49 | 50 | /** 51 | * 验证码类型 52 | */ 53 | public static final String CURRENT_TYPE = "captchaType"; 54 | 55 | /** 56 | * 验证码 57 | */ 58 | public static final String CURRENT_VALIDATECODE = "validateCode"; 59 | 60 | /** 61 | * 验证码错误 62 | */ 63 | public static final String CAPTCHA_ERROR = "captchaError"; 64 | 65 | /** 66 | * 登录记录缓存 67 | */ 68 | public static final String LOGINRECORDCACHE = "loginRecordCache"; 69 | 70 | /** 71 | * 系统活跃用户缓存 72 | */ 73 | public static final String SYS_USERCACHE = "sys-userCache"; 74 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/BusinessException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception; 2 | 3 | /** 4 | * 业务异常 5 | * 6 | * @author bank 7 | */ 8 | public class BusinessException extends RuntimeException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | protected final String message; 13 | 14 | public BusinessException(String message) 15 | { 16 | this.message = message; 17 | } 18 | 19 | public BusinessException(String message, Throwable e) 20 | { 21 | super(message, e); 22 | this.message = message; 23 | } 24 | 25 | @Override 26 | public String getMessage() 27 | { 28 | return message; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/DemoModeException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception; 2 | 3 | /** 4 | * 演示模式异常 5 | * 6 | * @author bank 7 | */ 8 | public class DemoModeException extends RuntimeException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public DemoModeException() 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/base/BaseException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception.base; 2 | 3 | import org.springframework.util.StringUtils; 4 | import com.bank.common.utils.MessageUtils; 5 | 6 | /** 7 | * 基础异常 8 | * 9 | * @author bank 10 | */ 11 | public class BaseException extends RuntimeException 12 | { 13 | private static final long serialVersionUID = 1L; 14 | 15 | /** 16 | * 所属模块 17 | */ 18 | private String module; 19 | 20 | /** 21 | * 错误码 22 | */ 23 | private String code; 24 | 25 | /** 26 | * 错误码对应的参数 27 | */ 28 | private Object[] args; 29 | 30 | /** 31 | * 错误消息 32 | */ 33 | private String defaultMessage; 34 | 35 | public BaseException(String module, String code, Object[] args, String defaultMessage) 36 | { 37 | this.module = module; 38 | this.code = code; 39 | this.args = args; 40 | this.defaultMessage = defaultMessage; 41 | } 42 | 43 | public BaseException(String module, String code, Object[] args) 44 | { 45 | this(module, code, args, null); 46 | } 47 | 48 | public BaseException(String module, String defaultMessage) 49 | { 50 | this(module, null, null, defaultMessage); 51 | } 52 | 53 | public BaseException(String code, Object[] args) 54 | { 55 | this(null, code, args, null); 56 | } 57 | 58 | public BaseException(String defaultMessage) 59 | { 60 | this(null, null, null, defaultMessage); 61 | } 62 | 63 | @Override 64 | public String getMessage() 65 | { 66 | String message = null; 67 | if (!StringUtils.isEmpty(code)) 68 | { 69 | message = MessageUtils.message(code, args); 70 | } 71 | if (message == null) 72 | { 73 | message = defaultMessage; 74 | } 75 | return message; 76 | } 77 | 78 | public String getModule() 79 | { 80 | return module; 81 | } 82 | 83 | public String getCode() 84 | { 85 | return code; 86 | } 87 | 88 | public Object[] getArgs() 89 | { 90 | return args; 91 | } 92 | 93 | public String getDefaultMessage() 94 | { 95 | return defaultMessage; 96 | } 97 | 98 | @Override 99 | public String toString() 100 | { 101 | return this.getClass() + "{" + "module='" + module + '\'' + ", message='" + getMessage() + '\'' + '}'; 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/file/FileException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception.file; 2 | 3 | import com.bank.common.exception.base.BaseException; 4 | 5 | /** 6 | * 文件信息异常类 7 | * 8 | * @author bank 9 | */ 10 | public class FileException extends BaseException 11 | { 12 | private static final long serialVersionUID = 1L; 13 | 14 | public FileException(String code, Object[] args) 15 | { 16 | super("file", code, args, null); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/file/FileNameLengthLimitExceededException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception.file; 2 | 3 | /** 4 | * 文件名称超长限制异常类 5 | * 6 | * @author bank 7 | */ 8 | public class FileNameLengthLimitExceededException extends FileException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public FileNameLengthLimitExceededException(int defaultFileNameLength) 13 | { 14 | super("upload.filename.exceed.length", new Object[] { defaultFileNameLength }); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/file/FileSizeLimitExceededException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception.file; 2 | 3 | /** 4 | * 文件名大小限制异常类 5 | * 6 | * @author bank 7 | */ 8 | public class FileSizeLimitExceededException extends FileException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public FileSizeLimitExceededException(long defaultMaxSize) 13 | { 14 | super("upload.exceed.maxSize", new Object[] { defaultMaxSize }); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/file/InvalidExtensionException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception.file; 2 | 3 | import java.util.Arrays; 4 | import org.apache.commons.fileupload.FileUploadException; 5 | 6 | /** 7 | * 文件上传 误异常类 8 | * 9 | * @author bank 10 | */ 11 | public class InvalidExtensionException extends FileUploadException 12 | { 13 | private static final long serialVersionUID = 1L; 14 | 15 | private String[] allowedExtension; 16 | private String extension; 17 | private String filename; 18 | 19 | public InvalidExtensionException(String[] allowedExtension, String extension, String filename) 20 | { 21 | super("filename : [" + filename + "], extension : [" + extension + "], allowed extension : [" + Arrays.toString(allowedExtension) + "]"); 22 | this.allowedExtension = allowedExtension; 23 | this.extension = extension; 24 | this.filename = filename; 25 | } 26 | 27 | public String[] getAllowedExtension() 28 | { 29 | return allowedExtension; 30 | } 31 | 32 | public String getExtension() 33 | { 34 | return extension; 35 | } 36 | 37 | public String getFilename() 38 | { 39 | return filename; 40 | } 41 | 42 | public static class InvalidImageExtensionException extends InvalidExtensionException 43 | { 44 | private static final long serialVersionUID = 1L; 45 | 46 | public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename) 47 | { 48 | super(allowedExtension, extension, filename); 49 | } 50 | } 51 | 52 | public static class InvalidFlashExtensionException extends InvalidExtensionException 53 | { 54 | private static final long serialVersionUID = 1L; 55 | 56 | public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename) 57 | { 58 | super(allowedExtension, extension, filename); 59 | } 60 | } 61 | 62 | public static class InvalidMediaExtensionException extends InvalidExtensionException 63 | { 64 | private static final long serialVersionUID = 1L; 65 | 66 | public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename) 67 | { 68 | super(allowedExtension, extension, filename); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/job/TaskException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception.job; 2 | 3 | /** 4 | * 计划策略异常 5 | * 6 | * @author bank 7 | */ 8 | public class TaskException extends Exception 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | private Code code; 13 | 14 | public TaskException(String msg, Code code) 15 | { 16 | this(msg, code, null); 17 | } 18 | 19 | public TaskException(String msg, Code code, Exception nestedEx) 20 | { 21 | super(msg, nestedEx); 22 | this.code = code; 23 | } 24 | 25 | public Code getCode() 26 | { 27 | return code; 28 | } 29 | 30 | public enum Code 31 | { 32 | TASK_EXISTS, NO_TASK_EXISTS, TASK_ALREADY_STARTED, UNKNOWN, CONFIG_ERROR, TASK_NODE_NOT_AVAILABLE 33 | } 34 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/user/CaptchaException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception.user; 2 | 3 | /** 4 | * 验证码错误异常类 5 | * 6 | * @author bank 7 | */ 8 | public class CaptchaException extends UserException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public CaptchaException() 13 | { 14 | super("user.jcaptcha.error", null); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/user/RoleBlockedException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception.user; 2 | 3 | /** 4 | * 角色锁定异常类 5 | * 6 | * @author bank 7 | */ 8 | public class RoleBlockedException extends UserException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public RoleBlockedException() 13 | { 14 | super("role.blocked", null); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/user/UserBlockedException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception.user; 2 | 3 | /** 4 | * 用户锁定异常类 5 | * 6 | * @author bank 7 | */ 8 | public class UserBlockedException extends UserException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public UserBlockedException() 13 | { 14 | super("user.blocked", null); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/user/UserDeleteException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception.user; 2 | 3 | /** 4 | * 用户账号已被删除 5 | * 6 | * @author bank 7 | */ 8 | public class UserDeleteException extends UserException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public UserDeleteException() 13 | { 14 | super("user.password.delete", null); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/user/UserException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception.user; 2 | 3 | import com.bank.common.exception.base.BaseException; 4 | 5 | /** 6 | * 用户信息异常类 7 | * 8 | * @author bank 9 | */ 10 | public class UserException extends BaseException 11 | { 12 | private static final long serialVersionUID = 1L; 13 | 14 | public UserException(String code, Object[] args) 15 | { 16 | super("user", code, args, null); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/user/UserNotExistsException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception.user; 2 | 3 | /** 4 | * 用户不存在异常类 5 | * 6 | * @author bank 7 | */ 8 | public class UserNotExistsException extends UserException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public UserNotExistsException() 13 | { 14 | super("user.not.exists", null); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/user/UserPasswordNotMatchException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception.user; 2 | 3 | /** 4 | * 用户密码不正确或不符合规范异常类 5 | * 6 | * @author bank 7 | */ 8 | public class UserPasswordNotMatchException extends UserException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public UserPasswordNotMatchException() 13 | { 14 | super("user.password.not.match", null); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/user/UserPasswordRetryLimitCountException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception.user; 2 | 3 | /** 4 | * 用户错误记数异常类 5 | * 6 | * @author bank 7 | */ 8 | public class UserPasswordRetryLimitCountException extends UserException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public UserPasswordRetryLimitCountException(int retryLimitCount) 13 | { 14 | super("user.password.retry.limit.count", new Object[] { retryLimitCount }); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/exception/user/UserPasswordRetryLimitExceedException.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.exception.user; 2 | 3 | /** 4 | * 用户错误最大次数异常类 5 | * 6 | * @author bank 7 | */ 8 | public class UserPasswordRetryLimitExceedException extends UserException 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public UserPasswordRetryLimitExceedException(int retryLimitCount) 13 | { 14 | super("user.password.retry.limit.exceed", new Object[] { retryLimitCount }); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/utils/AddressUtils.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.utils; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.bank.common.utils.http.HttpUtils; 5 | import com.bank.framework.config.BankConfig; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | 9 | /** 10 | * 获取地址类 11 | * 12 | * @author bank 13 | */ 14 | public class AddressUtils 15 | { 16 | private static final Logger log = LoggerFactory.getLogger(AddressUtils.class); 17 | 18 | public static final String IP_URL = "http://ip.taobao.com/service/getIpInfo.php"; 19 | 20 | public static String getRealAddressByIP(String ip) 21 | { 22 | String address = "XX XX"; 23 | // 内网不查询 24 | if (IpUtils.internalIp(ip)) 25 | { 26 | return "内网IP"; 27 | } 28 | if (BankConfig.isAddressEnabled()) 29 | { 30 | String rspStr = HttpUtils.sendPost(IP_URL, "ip=" + ip); 31 | if (StringUtils.isEmpty(rspStr)) 32 | { 33 | log.error("获取地理位置异常 {}", ip); 34 | return address; 35 | } 36 | JSONObject obj = JSONObject.parseObject(rspStr); 37 | JSONObject data = obj.getObject("data", JSONObject.class); 38 | String region = data.getString("region"); 39 | String city = data.getString("city"); 40 | address = region + " " + city; 41 | } 42 | return address; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/utils/ExceptionUtil.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.utils; 2 | 3 | import java.io.PrintWriter; 4 | import java.io.StringWriter; 5 | import org.apache.commons.lang3.exception.ExceptionUtils; 6 | 7 | /** 8 | * 错误信息处理类。 9 | * 10 | * @author bank 11 | */ 12 | public class ExceptionUtil 13 | { 14 | /** 15 | * 获取exception的详细错误信息。 16 | */ 17 | public static String getExceptionMessage(Throwable e) 18 | { 19 | StringWriter sw = new StringWriter(); 20 | e.printStackTrace(new PrintWriter(sw, true)); 21 | String str = sw.toString(); 22 | return str; 23 | } 24 | 25 | public static String getRootErrorMseeage(Exception e) 26 | { 27 | Throwable root = ExceptionUtils.getRootCause(e); 28 | root = (root == null ? e : root); 29 | if (root == null) 30 | { 31 | return ""; 32 | } 33 | String msg = root.getMessage(); 34 | if (msg == null) 35 | { 36 | return "null"; 37 | } 38 | return StringUtils.defaultString(msg); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/utils/MapDataUtil.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.utils; 2 | 3 | import java.util.HashMap; 4 | import java.util.Iterator; 5 | import java.util.Map; 6 | import java.util.Map.Entry; 7 | import javax.servlet.http.HttpServletRequest; 8 | 9 | /** 10 | * Map通用处理方法 11 | * 12 | * @author bank 13 | */ 14 | public class MapDataUtil 15 | { 16 | public static Map convertDataMap(HttpServletRequest request) 17 | { 18 | Map properties = request.getParameterMap(); 19 | Map returnMap = new HashMap(); 20 | Iterator entries = properties.entrySet().iterator(); 21 | Map.Entry entry; 22 | String name = ""; 23 | String value = ""; 24 | while (entries.hasNext()) 25 | { 26 | entry = (Entry) entries.next(); 27 | name = (String) entry.getKey(); 28 | Object valueObj = entry.getValue(); 29 | if (null == valueObj) 30 | { 31 | value = ""; 32 | } 33 | else if (valueObj instanceof String[]) 34 | { 35 | String[] values = (String[]) valueObj; 36 | for (int i = 0; i < values.length; i++) 37 | { 38 | value = values[i] + ","; 39 | } 40 | value = value.substring(0, value.length() - 1); 41 | } 42 | else 43 | { 44 | value = valueObj.toString(); 45 | } 46 | returnMap.put(name, value); 47 | } 48 | return returnMap; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/utils/Md5Utils.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.utils; 2 | 3 | import java.security.MessageDigest; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | 7 | /** 8 | * Md5加密方法 9 | * 10 | * @author bank 11 | */ 12 | public class Md5Utils 13 | { 14 | private static final Logger log = LoggerFactory.getLogger(Md5Utils.class); 15 | 16 | private static byte[] md5(String s) 17 | { 18 | MessageDigest algorithm; 19 | try 20 | { 21 | algorithm = MessageDigest.getInstance("MD5"); 22 | algorithm.reset(); 23 | algorithm.update(s.getBytes("UTF-8")); 24 | byte[] messageDigest = algorithm.digest(); 25 | return messageDigest; 26 | } 27 | catch (Exception e) 28 | { 29 | log.error("MD5 Error...", e); 30 | } 31 | return null; 32 | } 33 | 34 | private static final String toHex(byte hash[]) 35 | { 36 | if (hash == null) 37 | { 38 | return null; 39 | } 40 | StringBuffer buf = new StringBuffer(hash.length * 2); 41 | int i; 42 | 43 | for (i = 0; i < hash.length; i++) 44 | { 45 | if ((hash[i] & 0xff) < 0x10) 46 | { 47 | buf.append("0"); 48 | } 49 | buf.append(Long.toString(hash[i] & 0xff, 16)); 50 | } 51 | return buf.toString(); 52 | } 53 | 54 | public static String hash(String s) 55 | { 56 | try 57 | { 58 | return new String(toHex(md5(s)).getBytes("UTF-8"), "UTF-8"); 59 | } 60 | catch (Exception e) 61 | { 62 | log.error("not supported charset...{}", e); 63 | return s; 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/utils/MessageUtils.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.utils; 2 | 3 | import org.springframework.context.MessageSource; 4 | import org.springframework.context.i18n.LocaleContextHolder; 5 | import com.bank.common.utils.spring.SpringUtils; 6 | 7 | /** 8 | * 获取i18n资源文件 9 | * 10 | * @author bank 11 | */ 12 | public class MessageUtils 13 | { 14 | /** 15 | * 根据消息键和参数 获取消息 委托给spring messageSource 16 | * 17 | * @param code 消息键 18 | * @param args 参数 19 | * @return 获取国际化翻译值 20 | */ 21 | public static String message(String code, Object... args) 22 | { 23 | MessageSource messageSource = SpringUtils.getBean(MessageSource.class); 24 | return messageSource.getMessage(code, args, LocaleContextHolder.getLocale()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/utils/file/MimeTypeUtils.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.utils.file; 2 | 3 | /** 4 | * 媒体类型工具类 5 | * 6 | * @author bank 7 | */ 8 | public class MimeTypeUtils 9 | { 10 | public static final String IMAGE_PNG = "image/png"; 11 | 12 | public static final String IMAGE_JPG = "image/jpg"; 13 | 14 | public static final String IMAGE_JPEG = "image/jpeg"; 15 | 16 | public static final String IMAGE_BMP = "image/bmp"; 17 | 18 | public static final String IMAGE_GIF = "image/gif"; 19 | 20 | public static final String[] IMAGE_EXTENSION = { "bmp", "gif", "jpg", "jpeg", "png" }; 21 | 22 | public static final String[] FLASH_EXTENSION = { "swf", "flv" }; 23 | 24 | public static final String[] MEDIA_EXTENSION = { "swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg", 25 | "asf", "rm", "rmvb" }; 26 | 27 | public static final String[] DEFAULT_ALLOWED_EXTENSION = { 28 | // 图片 29 | "bmp", "gif", "jpg", "jpeg", "png", 30 | // word excel powerpoint 31 | "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt", 32 | // 压缩文件 33 | "rar", "zip", "gz", "bz2", 34 | // pdf 35 | "pdf" }; 36 | 37 | public static String getExtension(String prefix) 38 | { 39 | switch (prefix) 40 | { 41 | case IMAGE_PNG: 42 | return "png"; 43 | case IMAGE_JPG: 44 | return "jpg"; 45 | case IMAGE_JPEG: 46 | return "jpeg"; 47 | case IMAGE_BMP: 48 | return "bmp"; 49 | case IMAGE_GIF: 50 | return "gif"; 51 | default: 52 | return ""; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/utils/sql/SqlUtil.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.utils.sql; 2 | 3 | import com.bank.common.utils.StringUtils; 4 | 5 | /** 6 | * sql操作工具类 7 | * 8 | * @author bank 9 | */ 10 | public class SqlUtil 11 | { 12 | /** 13 | * 仅支持字母、数字、下划线、空格、逗号(支持多个字段排序) 14 | */ 15 | public static String SQL_PATTERN = "[a-zA-Z0-9_\\ \\,]+"; 16 | 17 | /** 18 | * 检查字符,防止注入绕过 19 | */ 20 | public static String escapeOrderBySql(String value) 21 | { 22 | if (StringUtils.isNotEmpty(value) && !isValidOrderBySql(value)) 23 | { 24 | return StringUtils.EMPTY; 25 | } 26 | return value; 27 | } 28 | 29 | /** 30 | * 验证 order by 语法是否符合规范 31 | */ 32 | public static boolean isValidOrderBySql(String value) 33 | { 34 | return value.matches(SQL_PATTERN); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/utils/text/CharsetKit.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.utils.text; 2 | 3 | import java.nio.charset.Charset; 4 | import java.nio.charset.StandardCharsets; 5 | import com.bank.common.utils.StringUtils; 6 | 7 | /** 8 | * 字符集工具类 9 | * 10 | * @author bank 11 | * 12 | */ 13 | public class CharsetKit 14 | { 15 | /** ISO-8859-1 */ 16 | public static final String ISO_8859_1 = "ISO-8859-1"; 17 | /** UTF-8 */ 18 | public static final String UTF_8 = "UTF-8"; 19 | /** GBK */ 20 | public static final String GBK = "GBK"; 21 | 22 | /** ISO-8859-1 */ 23 | public static final Charset CHARSET_ISO_8859_1 = Charset.forName(ISO_8859_1); 24 | /** UTF-8 */ 25 | public static final Charset CHARSET_UTF_8 = Charset.forName(UTF_8); 26 | /** GBK */ 27 | public static final Charset CHARSET_GBK = Charset.forName(GBK); 28 | 29 | /** 30 | * 转换为Charset对象 31 | * 32 | * @param charset 字符集,为空则返回默认字符集 33 | * @return Charset 34 | */ 35 | public static Charset charset(String charset) 36 | { 37 | return StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset); 38 | } 39 | 40 | /** 41 | * 转换字符串的字符集编码 42 | * 43 | * @param source 字符串 44 | * @param srcCharset 源字符集,默认ISO-8859-1 45 | * @param destCharset 目标字符集,默认UTF-8 46 | * @return 转换后的字符集 47 | */ 48 | public static String convert(String source, String srcCharset, String destCharset) 49 | { 50 | return convert(source, Charset.forName(srcCharset), Charset.forName(destCharset)); 51 | } 52 | 53 | /** 54 | * 转换字符串的字符集编码 55 | * 56 | * @param source 字符串 57 | * @param srcCharset 源字符集,默认ISO-8859-1 58 | * @param destCharset 目标字符集,默认UTF-8 59 | * @return 转换后的字符集 60 | */ 61 | public static String convert(String source, Charset srcCharset, Charset destCharset) 62 | { 63 | if (null == srcCharset) 64 | { 65 | srcCharset = StandardCharsets.ISO_8859_1; 66 | } 67 | 68 | if (null == destCharset) 69 | { 70 | srcCharset = StandardCharsets.UTF_8; 71 | } 72 | 73 | if (StringUtils.isEmpty(source) || srcCharset.equals(destCharset)) 74 | { 75 | return source; 76 | } 77 | return new String(source.getBytes(srcCharset), destCharset); 78 | } 79 | 80 | /** 81 | * @return 系统字符集编码 82 | */ 83 | public static String systemCharset() 84 | { 85 | return Charset.defaultCharset().name(); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/com/bank/common/xss/XssHttpServletRequestWrapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.common.xss; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletRequestWrapper; 5 | import com.bank.common.utils.html.EscapeUtil; 6 | 7 | /** 8 | * XSS过滤处理 9 | * 10 | * @author bank 11 | */ 12 | public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper 13 | { 14 | /** 15 | * @param request 16 | */ 17 | public XssHttpServletRequestWrapper(HttpServletRequest request) 18 | { 19 | super(request); 20 | } 21 | 22 | @Override 23 | public String[] getParameterValues(String name) 24 | { 25 | String[] values = super.getParameterValues(name); 26 | if (values != null) 27 | { 28 | int length = values.length; 29 | String[] escapseValues = new String[length]; 30 | for (int i = 0; i < length; i++) 31 | { 32 | // 防xss攻击和过滤前后空格 33 | escapseValues[i] = EscapeUtil.clean(values[i]).trim(); 34 | } 35 | return escapseValues; 36 | } 37 | return super.getParameterValues(name); 38 | } 39 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/aspectj/DataSourceAspect.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.aspectj; 2 | 3 | import java.lang.reflect.Method; 4 | import org.aspectj.lang.ProceedingJoinPoint; 5 | import org.aspectj.lang.annotation.Around; 6 | import org.aspectj.lang.annotation.Aspect; 7 | import org.aspectj.lang.annotation.Pointcut; 8 | import org.aspectj.lang.reflect.MethodSignature; 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | import org.springframework.core.annotation.Order; 12 | import org.springframework.stereotype.Component; 13 | import com.bank.common.utils.StringUtils; 14 | import com.bank.framework.aspectj.lang.annotation.DataSource; 15 | import com.bank.framework.datasource.DynamicDataSourceContextHolder; 16 | 17 | /** 18 | * 多数据源处理 19 | * 20 | * @author bank 21 | */ 22 | @Aspect 23 | @Order(1) 24 | @Component 25 | public class DataSourceAspect 26 | { 27 | protected Logger logger = LoggerFactory.getLogger(getClass()); 28 | 29 | @Pointcut("@annotation(com.bank.framework.aspectj.lang.annotation.DataSource)" 30 | + "|| @within(com.bank.framework.aspectj.lang.annotation.DataSource)") 31 | public void dsPointCut() 32 | { 33 | 34 | } 35 | 36 | @Around("dsPointCut()") 37 | public Object around(ProceedingJoinPoint point) throws Throwable 38 | { 39 | DataSource dataSource = getDataSource(point); 40 | 41 | if (StringUtils.isNotNull(dataSource)) 42 | { 43 | DynamicDataSourceContextHolder.setDataSourceType(dataSource.value().name()); 44 | } 45 | 46 | try 47 | { 48 | return point.proceed(); 49 | } 50 | finally 51 | { 52 | // 销毁数据源 在执行方法之后 53 | DynamicDataSourceContextHolder.clearDataSourceType(); 54 | } 55 | } 56 | 57 | /** 58 | * 获取需要切换的数据源 59 | */ 60 | public DataSource getDataSource(ProceedingJoinPoint point) 61 | { 62 | MethodSignature signature = (MethodSignature) point.getSignature(); 63 | Class targetClass = point.getTarget().getClass(); 64 | DataSource targetDataSource = targetClass.getAnnotation(DataSource.class); 65 | if (StringUtils.isNotNull(targetDataSource)) 66 | { 67 | return targetDataSource; 68 | } 69 | else 70 | { 71 | Method method = signature.getMethod(); 72 | DataSource dataSource = method.getAnnotation(DataSource.class); 73 | return dataSource; 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/aspectj/lang/annotation/DataScope.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.aspectj.lang.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * 数据权限过滤注解 11 | * 12 | * @author bank 13 | */ 14 | @Target(ElementType.METHOD) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | @Documented 17 | public @interface DataScope 18 | { 19 | /** 20 | * 部门表的别名 21 | */ 22 | public String deptAlias() default ""; 23 | 24 | /** 25 | * 用户表的别名 26 | */ 27 | public String userAlias() default ""; 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/aspectj/lang/annotation/DataSource.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.aspectj.lang.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Inherited; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | import com.bank.framework.aspectj.lang.enums.DataSourceType; 10 | 11 | /** 12 | * 自定义多数据源切换注解 13 | * 14 | * @author bank 15 | */ 16 | @Target({ ElementType.METHOD, ElementType.TYPE }) 17 | @Retention(RetentionPolicy.RUNTIME) 18 | @Documented 19 | @Inherited 20 | public @interface DataSource 21 | { 22 | /** 23 | * 切换数据源名称 24 | */ 25 | public DataSourceType value() default DataSourceType.MASTER; 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/aspectj/lang/annotation/Excels.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.aspectj.lang.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * Excel注解集 10 | * 11 | * @author bank 12 | */ 13 | @Target(ElementType.FIELD) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | public @interface Excels 16 | { 17 | Excel[] value(); 18 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/aspectj/lang/annotation/Log.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.aspectj.lang.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | import com.bank.framework.aspectj.lang.enums.BusinessType; 9 | import com.bank.framework.aspectj.lang.enums.OperatorType; 10 | 11 | /** 12 | * 自定义操作日志记录注解 13 | * 14 | * @author bank 15 | * 16 | */ 17 | @Target({ ElementType.PARAMETER, ElementType.METHOD }) 18 | @Retention(RetentionPolicy.RUNTIME) 19 | @Documented 20 | public @interface Log 21 | { 22 | /** 23 | * 模块 24 | */ 25 | public String title() default ""; 26 | 27 | /** 28 | * 功能 29 | */ 30 | public BusinessType businessType() default BusinessType.OTHER; 31 | 32 | /** 33 | * 操作人类别 34 | */ 35 | public OperatorType operatorType() default OperatorType.MANAGE; 36 | 37 | /** 38 | * 是否保存请求的参数 39 | */ 40 | public boolean isSaveRequestData() default true; 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/aspectj/lang/enums/BusinessStatus.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.aspectj.lang.enums; 2 | 3 | /** 4 | * 操作状态 5 | * 6 | * @author bank 7 | * 8 | */ 9 | public enum BusinessStatus 10 | { 11 | /** 12 | * 成功 13 | */ 14 | SUCCESS, 15 | 16 | /** 17 | * 失败 18 | */ 19 | FAIL, 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/aspectj/lang/enums/BusinessType.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.aspectj.lang.enums; 2 | 3 | /** 4 | * 业务操作类型 5 | * 6 | * @author bank 7 | * 8 | */ 9 | public enum BusinessType 10 | { 11 | /** 12 | * 其它 13 | */ 14 | OTHER, 15 | 16 | /** 17 | * 新增 18 | */ 19 | INSERT, 20 | 21 | /** 22 | * 修改 23 | */ 24 | UPDATE, 25 | 26 | /** 27 | * 删除 28 | */ 29 | DELETE, 30 | 31 | /** 32 | * 授权 33 | */ 34 | GRANT, 35 | 36 | /** 37 | * 导出 38 | */ 39 | EXPORT, 40 | 41 | /** 42 | * 导入 43 | */ 44 | IMPORT, 45 | 46 | /** 47 | * 强退 48 | */ 49 | FORCE, 50 | 51 | /** 52 | * 生成代码 53 | */ 54 | GENCODE, 55 | 56 | /** 57 | * 清空数据 58 | */ 59 | CLEAN, 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/aspectj/lang/enums/DataSourceType.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.aspectj.lang.enums; 2 | 3 | /** 4 | * 数据源 5 | * 6 | * @author bank 7 | */ 8 | public enum DataSourceType 9 | { 10 | /** 11 | * 主库 12 | */ 13 | MASTER, 14 | 15 | /** 16 | * 从库 17 | */ 18 | SLAVE 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/aspectj/lang/enums/OperatorType.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.aspectj.lang.enums; 2 | 3 | /** 4 | * 操作人类别 5 | * 6 | * @author bank 7 | * 8 | */ 9 | public enum OperatorType 10 | { 11 | /** 12 | * 其它 13 | */ 14 | OTHER, 15 | 16 | /** 17 | * 后台用户 18 | */ 19 | MANAGE, 20 | 21 | /** 22 | * 手机端用户 23 | */ 24 | MOBILE 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/config/ApplicationConfig.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.config; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.context.annotation.EnableAspectJAutoProxy; 6 | 7 | /** 8 | * 程序注解配置 9 | * 10 | * @author bank 11 | */ 12 | @Configuration 13 | // 表示通过aop框架暴露该代理对象,AopContext能够访问 14 | @EnableAspectJAutoProxy(exposeProxy = true) 15 | // 指定要扫描的Mapper类的包的路径 16 | @MapperScan("com.bank.project.**.mapper") 17 | public class ApplicationConfig 18 | { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/config/FilterConfig.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.config; 2 | 3 | import java.util.Map; 4 | import javax.servlet.DispatcherType; 5 | import org.springframework.beans.factory.annotation.Value; 6 | import org.springframework.boot.web.servlet.FilterRegistrationBean; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | import com.google.common.collect.Maps; 10 | import com.bank.common.utils.StringUtils; 11 | import com.bank.common.xss.XssFilter; 12 | 13 | /** 14 | * Filter配置 15 | * 16 | * @author bank 17 | */ 18 | @Configuration 19 | public class FilterConfig 20 | { 21 | @Value("${xss.enabled}") 22 | private String enabled; 23 | 24 | @Value("${xss.excludes}") 25 | private String excludes; 26 | 27 | @Value("${xss.urlPatterns}") 28 | private String urlPatterns; 29 | 30 | @SuppressWarnings({ "rawtypes", "unchecked" }) 31 | @Bean 32 | public FilterRegistrationBean xssFilterRegistration() 33 | { 34 | FilterRegistrationBean registration = new FilterRegistrationBean(); 35 | registration.setDispatcherTypes(DispatcherType.REQUEST); 36 | registration.setFilter(new XssFilter()); 37 | registration.addUrlPatterns(StringUtils.split(urlPatterns, ",")); 38 | registration.setName("xssFilter"); 39 | registration.setOrder(Integer.MAX_VALUE); 40 | Map initParameters = Maps.newHashMap(); 41 | initParameters.put("excludes", excludes); 42 | initParameters.put("enabled", enabled); 43 | registration.setInitParameters(initParameters); 44 | return registration; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/config/GenConfig.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.config; 2 | 3 | import org.springframework.boot.context.properties.ConfigurationProperties; 4 | import org.springframework.stereotype.Component; 5 | 6 | /** 7 | * 读取代码生成相关配置 8 | * 9 | * @author bank 10 | */ 11 | @Component 12 | @ConfigurationProperties(prefix = "gen") 13 | public class GenConfig 14 | { 15 | /** 作者 */ 16 | public static String author; 17 | 18 | /** 生成包路径 */ 19 | public static String packageName; 20 | 21 | /** 自动去除表前缀,默认是true */ 22 | public static boolean autoRemovePre; 23 | 24 | /** 表前缀(类名不会包含表前缀) */ 25 | public static String tablePrefix; 26 | 27 | public static String getAuthor() 28 | { 29 | return author; 30 | } 31 | 32 | public void setAuthor(String author) 33 | { 34 | GenConfig.author = author; 35 | } 36 | 37 | public static String getPackageName() 38 | { 39 | return packageName; 40 | } 41 | 42 | public void setPackageName(String packageName) 43 | { 44 | GenConfig.packageName = packageName; 45 | } 46 | 47 | public static boolean getAutoRemovePre() 48 | { 49 | return autoRemovePre; 50 | } 51 | 52 | public void setAutoRemovePre(boolean autoRemovePre) 53 | { 54 | GenConfig.autoRemovePre = autoRemovePre; 55 | } 56 | 57 | public static String getTablePrefix() 58 | { 59 | return tablePrefix; 60 | } 61 | 62 | public void setTablePrefix(String tablePrefix) 63 | { 64 | GenConfig.tablePrefix = tablePrefix; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/config/I18nConfig.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.config; 2 | 3 | import java.util.Locale; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.web.servlet.LocaleResolver; 7 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 8 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 9 | import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; 10 | import org.springframework.web.servlet.i18n.SessionLocaleResolver; 11 | 12 | /** 13 | * 资源文件配置加载 14 | * 15 | * @author bank 16 | */ 17 | @Configuration 18 | public class I18nConfig implements WebMvcConfigurer 19 | { 20 | @Bean 21 | public LocaleResolver localeResolver() 22 | { 23 | SessionLocaleResolver slr = new SessionLocaleResolver(); 24 | // 默认语言 25 | slr.setDefaultLocale(Locale.SIMPLIFIED_CHINESE); 26 | return slr; 27 | } 28 | 29 | @Bean 30 | public LocaleChangeInterceptor localeChangeInterceptor() 31 | { 32 | LocaleChangeInterceptor lci = new LocaleChangeInterceptor(); 33 | // 参数名 34 | lci.setParamName("lang"); 35 | return lci; 36 | } 37 | 38 | @Override 39 | public void addInterceptors(InterceptorRegistry registry) 40 | { 41 | registry.addInterceptor(localeChangeInterceptor()); 42 | } 43 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/config/KaptchaTextCreator.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.config; 2 | 3 | import java.security.SecureRandom; 4 | import java.util.Random; 5 | import com.google.code.kaptcha.text.impl.DefaultTextCreator; 6 | 7 | /** 8 | * 验证码文本生成器 9 | * 10 | * @author bank 11 | */ 12 | public class KaptchaTextCreator extends DefaultTextCreator 13 | { 14 | private static final String[] CNUMBERS = "0,1,2,3,4,5,6,7,8,9,10".split(","); 15 | 16 | @Override 17 | public String getText() 18 | { 19 | Integer result = 0; 20 | Random random = new SecureRandom(); 21 | int x = random.nextInt(10); 22 | int y = random.nextInt(10); 23 | StringBuilder suChinese = new StringBuilder(); 24 | int randomoperands = (int) Math.round(Math.random() * 2); 25 | if (randomoperands == 0) 26 | { 27 | result = x * y; 28 | suChinese.append(CNUMBERS[x]); 29 | suChinese.append("*"); 30 | suChinese.append(CNUMBERS[y]); 31 | } 32 | else if (randomoperands == 1) 33 | { 34 | if (!(x == 0) && y % x == 0) 35 | { 36 | result = y / x; 37 | suChinese.append(CNUMBERS[y]); 38 | suChinese.append("/"); 39 | suChinese.append(CNUMBERS[x]); 40 | } 41 | else 42 | { 43 | result = x + y; 44 | suChinese.append(CNUMBERS[x]); 45 | suChinese.append("+"); 46 | suChinese.append(CNUMBERS[y]); 47 | } 48 | } 49 | else if (randomoperands == 2) 50 | { 51 | if (x >= y) 52 | { 53 | result = x - y; 54 | suChinese.append(CNUMBERS[x]); 55 | suChinese.append("-"); 56 | suChinese.append(CNUMBERS[y]); 57 | } 58 | else 59 | { 60 | result = y - x; 61 | suChinese.append(CNUMBERS[y]); 62 | suChinese.append("-"); 63 | suChinese.append(CNUMBERS[x]); 64 | } 65 | } 66 | else 67 | { 68 | result = x + y; 69 | suChinese.append(CNUMBERS[x]); 70 | suChinese.append("+"); 71 | suChinese.append(CNUMBERS[y]); 72 | } 73 | suChinese.append("=?@" + result); 74 | return suChinese.toString(); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/config/ResourcesConfig.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.config; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.beans.factory.annotation.Value; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 7 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 8 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; 9 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 10 | import com.bank.common.constant.Constants; 11 | import com.bank.framework.interceptor.RepeatSubmitInterceptor; 12 | 13 | /** 14 | * 通用配置 15 | * 16 | * @author bank 17 | */ 18 | @Configuration 19 | public class ResourcesConfig implements WebMvcConfigurer 20 | { 21 | /** 22 | * 首页地址 23 | */ 24 | @Value("${shiro.user.indexUrl}") 25 | private String indexUrl; 26 | 27 | @Autowired 28 | private RepeatSubmitInterceptor repeatSubmitInterceptor; 29 | 30 | /** 31 | * 默认首页的设置,当输入域名是可以自动跳转到默认指定的网页 32 | */ 33 | @Override 34 | public void addViewControllers(ViewControllerRegistry registry) 35 | { 36 | registry.addViewController("/").setViewName("forward:" + indexUrl); 37 | } 38 | 39 | @Override 40 | public void addResourceHandlers(ResourceHandlerRegistry registry) 41 | { 42 | /** 本地文件上传路径 */ 43 | registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**").addResourceLocations("file:" + BankConfig.getProfile() + "/"); 44 | 45 | /** swagger配置 */ 46 | registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/"); 47 | registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); 48 | } 49 | 50 | /** 51 | * 自定义拦截规则 52 | */ 53 | @Override 54 | public void addInterceptors(InterceptorRegistry registry) 55 | { 56 | registry.addInterceptor(repeatSubmitInterceptor).addPathPatterns("/**"); 57 | } 58 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/config/ServerConfig.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.config; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import org.springframework.stereotype.Component; 5 | import com.bank.common.utils.ServletUtils; 6 | 7 | /** 8 | * 服务相关配置 9 | * 10 | * @author bank 11 | * 12 | */ 13 | @Component 14 | public class ServerConfig 15 | { 16 | /** 17 | * 获取完整的请求路径,包括:域名,端口,上下文访问路径 18 | * 19 | * @return 服务地址 20 | */ 21 | public String getUrl() 22 | { 23 | HttpServletRequest request = ServletUtils.getRequest(); 24 | return getDomain(request); 25 | } 26 | 27 | public static String getDomain(HttpServletRequest request) 28 | { 29 | StringBuffer url = request.getRequestURL(); 30 | String contextPath = request.getServletContext().getContextPath(); 31 | return url.delete(url.length() - request.getRequestURI().length(), url.length()).append(contextPath).toString(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/config/SwaggerConfig.java: -------------------------------------------------------------------------------- 1 | //package com.bank.framework.config; 2 | // 3 | //import org.springframework.beans.factory.annotation.Autowired; 4 | //import org.springframework.context.annotation.Bean; 5 | //import org.springframework.context.annotation.Configuration; 6 | //import io.swagger.annotations.ApiOperation; 7 | //import springfox.documentation.builders.ApiInfoBuilder; 8 | //import springfox.documentation.builders.PathSelectors; 9 | //import springfox.documentation.builders.RequestHandlerSelectors; 10 | //import springfox.documentation.service.ApiInfo; 11 | //import springfox.documentation.service.Contact; 12 | //import springfox.documentation.spi.DocumentationType; 13 | //import springfox.documentation.spring.web.plugins.Docket; 14 | //import springfox.documentation.swagger2.annotations.EnableSwagger2; 15 | // 16 | ///** 17 | // * Swagger2的接口配置 18 | // * 19 | // * @author bank 20 | // */ 21 | //@Configuration 22 | //@EnableSwagger2 23 | //public class SwaggerConfig 24 | //{ 25 | // /** 系统基础配置 */ 26 | // @Autowired 27 | // private BankConfig ruoYiConfig; 28 | // 29 | // /** 30 | // * 创建API 31 | // */ 32 | // @Bean 33 | // public Docket createRestApi() 34 | // { 35 | // return new Docket(DocumentationType.SWAGGER_2) 36 | // // 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息) 37 | // .apiInfo(apiInfo()) 38 | // // 设置哪些接口暴露给Swagger展示 39 | // .select() 40 | // // 扫描所有有注解的api,用这种方式更灵活 41 | // .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) 42 | // // 扫描指定包中的swagger注解 43 | // //.apis(RequestHandlerSelectors.basePackage("com.bank.project.tool.swagger")) 44 | // // 扫描所有 .apis(RequestHandlerSelectors.any()) 45 | // .paths(PathSelectors.any()) 46 | // .build(); 47 | // } 48 | // 49 | // /** 50 | // * 添加摘要信息 51 | // */ 52 | // private ApiInfo apiInfo() 53 | // { 54 | // // 用ApiInfoBuilder进行定制 55 | // return new ApiInfoBuilder() 56 | // // 设置标题 57 | // .title("标题:银行OA管理系统_接口文档") 58 | // // 描述 59 | // .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...") 60 | // // 作者信息 61 | // .contact(new Contact(ruoYiConfig.getName(), null, null)) 62 | // // 版本 63 | // .version("版本号:" + ruoYiConfig.getVersion()) 64 | // .build(); 65 | // } 66 | //} 67 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/config/ThreadPoolConfig.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.config; 2 | 3 | import java.util.concurrent.ScheduledExecutorService; 4 | import java.util.concurrent.ScheduledThreadPoolExecutor; 5 | import java.util.concurrent.ThreadPoolExecutor; 6 | import org.apache.commons.lang3.concurrent.BasicThreadFactory; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; 10 | import com.bank.common.utils.Threads; 11 | 12 | /** 13 | * 线程池配置 14 | * 15 | * @author bank 16 | **/ 17 | @Configuration 18 | public class ThreadPoolConfig 19 | { 20 | // 核心线程池大小 21 | private int corePoolSize = 50; 22 | 23 | // 最大可创建的线程数 24 | private int maxPoolSize = 200; 25 | 26 | // 队列最大长度 27 | private int queueCapacity = 1000; 28 | 29 | // 线程池维护线程所允许的空闲时间 30 | private int keepAliveSeconds = 300; 31 | 32 | @Bean(name = "threadPoolTaskExecutor") 33 | public ThreadPoolTaskExecutor threadPoolTaskExecutor() 34 | { 35 | ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); 36 | executor.setMaxPoolSize(maxPoolSize); 37 | executor.setCorePoolSize(corePoolSize); 38 | executor.setQueueCapacity(queueCapacity); 39 | executor.setKeepAliveSeconds(keepAliveSeconds); 40 | // 线程池对拒绝任务(无线程可用)的处理策略 41 | executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); 42 | return executor; 43 | } 44 | 45 | /** 46 | * 执行周期性或定时任务 47 | */ 48 | @Bean(name = "scheduledExecutorService") 49 | protected ScheduledExecutorService scheduledExecutorService() 50 | { 51 | return new ScheduledThreadPoolExecutor(corePoolSize, 52 | new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build()) 53 | { 54 | @Override 55 | protected void afterExecute(Runnable r, Throwable t) 56 | { 57 | super.afterExecute(r, t); 58 | Threads.printException(r, t); 59 | } 60 | }; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/datasource/DynamicDataSource.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.datasource; 2 | 3 | import java.util.Map; 4 | import javax.sql.DataSource; 5 | import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; 6 | 7 | /** 8 | * 动态数据源 9 | * 10 | * @author bank 11 | */ 12 | public class DynamicDataSource extends AbstractRoutingDataSource 13 | { 14 | public DynamicDataSource(DataSource defaultTargetDataSource, Map targetDataSources) 15 | { 16 | super.setDefaultTargetDataSource(defaultTargetDataSource); 17 | super.setTargetDataSources(targetDataSources); 18 | super.afterPropertiesSet(); 19 | } 20 | 21 | @Override 22 | protected Object determineCurrentLookupKey() 23 | { 24 | return DynamicDataSourceContextHolder.getDataSourceType(); 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/datasource/DynamicDataSourceContextHolder.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.datasource; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | 6 | /** 7 | * 数据源切换处理 8 | * 9 | * @author bank 10 | */ 11 | public class DynamicDataSourceContextHolder 12 | { 13 | public static final Logger log = LoggerFactory.getLogger(DynamicDataSourceContextHolder.class); 14 | 15 | /** 16 | * 使用ThreadLocal维护变量,ThreadLocal为每个使用该变量的线程提供独立的变量副本, 17 | * 所以每一个线程都可以独立地改变自己的副本,而不会影响其它线程所对应的副本。 18 | */ 19 | private static final ThreadLocal CONTEXT_HOLDER = new ThreadLocal<>(); 20 | 21 | /** 22 | * 设置数据源的变量 23 | */ 24 | public static void setDataSourceType(String dsType) 25 | { 26 | log.info("切换到{}数据源", dsType); 27 | CONTEXT_HOLDER.set(dsType); 28 | } 29 | 30 | /** 31 | * 获得数据源的变量 32 | */ 33 | public static String getDataSourceType() 34 | { 35 | return CONTEXT_HOLDER.get(); 36 | } 37 | 38 | /** 39 | * 清空数据源变量 40 | */ 41 | public static void clearDataSourceType() 42 | { 43 | CONTEXT_HOLDER.remove(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/interceptor/RepeatSubmitInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.interceptor; 2 | 3 | import java.lang.reflect.Method; 4 | import javax.servlet.http.HttpServletRequest; 5 | import javax.servlet.http.HttpServletResponse; 6 | import org.springframework.stereotype.Component; 7 | import org.springframework.web.method.HandlerMethod; 8 | import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; 9 | import com.alibaba.fastjson.JSONObject; 10 | import com.bank.common.utils.ServletUtils; 11 | import com.bank.framework.interceptor.annotation.RepeatSubmit; 12 | import com.bank.framework.web.domain.AjaxResult; 13 | 14 | /** 15 | * 防止重复提交拦截器 16 | * 17 | * @author bank 18 | */ 19 | @Component 20 | public abstract class RepeatSubmitInterceptor extends HandlerInterceptorAdapter 21 | { 22 | @Override 23 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception 24 | { 25 | if (handler instanceof HandlerMethod) 26 | { 27 | HandlerMethod handlerMethod = (HandlerMethod) handler; 28 | Method method = handlerMethod.getMethod(); 29 | RepeatSubmit annotation = method.getAnnotation(RepeatSubmit.class); 30 | if (annotation != null) 31 | { 32 | if (this.isRepeatSubmit(request)) 33 | { 34 | AjaxResult ajaxResult = AjaxResult.error("不允许重复提交,请稍后再试"); 35 | ServletUtils.renderString(response, JSONObject.toJSONString(ajaxResult)); 36 | return false; 37 | } 38 | } 39 | return true; 40 | } 41 | else 42 | { 43 | return super.preHandle(request, response, handler); 44 | } 45 | } 46 | 47 | /** 48 | * 验证是否重复提交由子类实现具体的防重复提交的规则 49 | * 50 | * @param httpServletRequest 51 | * @return 52 | * @throws Exception 53 | */ 54 | public abstract boolean isRepeatSubmit(HttpServletRequest request); 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/interceptor/annotation/RepeatSubmit.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.interceptor.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Inherited; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | /** 11 | * 自定义注解防止表单重复提交 12 | * 13 | * @author bank 14 | * 15 | */ 16 | @Inherited 17 | @Target(ElementType.METHOD) 18 | @Retention(RetentionPolicy.RUNTIME) 19 | @Documented 20 | public @interface RepeatSubmit 21 | { 22 | 23 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/manager/AsyncManager.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.manager; 2 | 3 | import java.util.TimerTask; 4 | import java.util.concurrent.ScheduledExecutorService; 5 | import java.util.concurrent.TimeUnit; 6 | import com.bank.common.utils.Threads; 7 | import com.bank.common.utils.spring.SpringUtils; 8 | 9 | /** 10 | * 异步任务管理器 11 | * 12 | * @author liuhulu 13 | */ 14 | public class AsyncManager 15 | { 16 | /** 17 | * 操作延迟10毫秒 18 | */ 19 | private final int OPERATE_DELAY_TIME = 10; 20 | 21 | /** 22 | * 异步操作任务调度线程池 23 | */ 24 | private ScheduledExecutorService executor = SpringUtils.getBean("scheduledExecutorService"); 25 | 26 | /** 27 | * 单例模式 28 | */ 29 | private AsyncManager() 30 | { 31 | } 32 | 33 | private static AsyncManager me = new AsyncManager(); 34 | 35 | public static AsyncManager me() 36 | { 37 | return me; 38 | } 39 | 40 | /** 41 | * 执行任务 42 | * 43 | * @param task 任务 44 | */ 45 | public void execute(TimerTask task) 46 | { 47 | executor.schedule(task, OPERATE_DELAY_TIME, TimeUnit.MILLISECONDS); 48 | } 49 | 50 | /** 51 | * 停止任务线程池 52 | */ 53 | public void shutdown() 54 | { 55 | Threads.shutdownAndAwaitTermination(executor); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/shiro/session/OnlineSessionFactory.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.shiro.session; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import org.apache.shiro.session.Session; 5 | import org.apache.shiro.session.mgt.SessionContext; 6 | import org.apache.shiro.session.mgt.SessionFactory; 7 | import org.apache.shiro.web.session.mgt.WebSessionContext; 8 | import org.springframework.stereotype.Component; 9 | import com.bank.common.utils.ServletUtils; 10 | import com.bank.common.utils.IpUtils; 11 | import com.bank.common.utils.StringUtils; 12 | import com.bank.project.monitor.online.domain.OnlineSession; 13 | import com.bank.project.monitor.online.domain.UserOnline; 14 | import eu.bitwalker.useragentutils.UserAgent; 15 | 16 | /** 17 | * 自定义sessionFactory会话 18 | * 19 | * @author bank 20 | */ 21 | @Component 22 | public class OnlineSessionFactory implements SessionFactory 23 | { 24 | public Session createSession(UserOnline userOnline) 25 | { 26 | OnlineSession onlineSession = userOnline.getSession(); 27 | if (StringUtils.isNotNull(onlineSession) && onlineSession.getId() == null) 28 | { 29 | onlineSession.setId(userOnline.getSessionId()); 30 | } 31 | return userOnline.getSession(); 32 | } 33 | 34 | @Override 35 | public Session createSession(SessionContext initData) 36 | { 37 | OnlineSession session = new OnlineSession(); 38 | if (initData != null && initData instanceof WebSessionContext) 39 | { 40 | WebSessionContext sessionContext = (WebSessionContext) initData; 41 | HttpServletRequest request = (HttpServletRequest) sessionContext.getServletRequest(); 42 | if (request != null) 43 | { 44 | UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent")); 45 | // 获取客户端操作系统 46 | String os = userAgent.getOperatingSystem().getName(); 47 | // 获取客户端浏览器 48 | String browser = userAgent.getBrowser().getName(); 49 | session.setHost(IpUtils.getIpAddr(request)); 50 | session.setBrowser(browser); 51 | session.setOs(os); 52 | } 53 | } 54 | return session; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/shiro/web/filter/sync/SyncOnlineSessionFilter.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.shiro.web.filter.sync; 2 | 3 | import javax.servlet.ServletRequest; 4 | import javax.servlet.ServletResponse; 5 | import org.apache.shiro.web.filter.PathMatchingFilter; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import com.bank.common.constant.ShiroConstants; 8 | import com.bank.framework.shiro.session.OnlineSessionDAO; 9 | import com.bank.project.monitor.online.domain.OnlineSession; 10 | 11 | /** 12 | * 同步Session数据到Db 13 | * 14 | * @author bank 15 | */ 16 | public class SyncOnlineSessionFilter extends PathMatchingFilter 17 | { 18 | @Autowired 19 | private OnlineSessionDAO onlineSessionDAO; 20 | 21 | /** 22 | * 同步会话数据到DB 一次请求最多同步一次 防止过多处理 需要放到Shiro过滤器之前 23 | */ 24 | @Override 25 | protected boolean onPreHandle(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception 26 | { 27 | OnlineSession session = (OnlineSession) request.getAttribute(ShiroConstants.ONLINE_SESSION); 28 | // 如果session stop了 也不同步 29 | // session停止时间,如果stopTimestamp不为null,则代表已停止 30 | if (session != null && session.getUserId() != null && session.getStopTimestamp() == null) 31 | { 32 | onlineSessionDAO.syncToDb(session); 33 | } 34 | return true; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/web/domain/TreeEntity.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.web.domain; 2 | 3 | /** 4 | * Tree基类 5 | * 6 | * @author bank 7 | */ 8 | public class TreeEntity extends BaseEntity 9 | { 10 | private static final long serialVersionUID = 1L; 11 | 12 | /** 父菜单名称 */ 13 | private String parentName; 14 | 15 | /** 父菜单ID */ 16 | private Long parentId; 17 | 18 | /** 显示顺序 */ 19 | private Integer orderNum; 20 | 21 | /** 祖级列表 */ 22 | private String ancestors; 23 | 24 | public String getParentName() 25 | { 26 | return parentName; 27 | } 28 | 29 | public void setParentName(String parentName) 30 | { 31 | this.parentName = parentName; 32 | } 33 | 34 | public Long getParentId() 35 | { 36 | return parentId; 37 | } 38 | 39 | public void setParentId(Long parentId) 40 | { 41 | this.parentId = parentId; 42 | } 43 | 44 | public Integer getOrderNum() 45 | { 46 | return orderNum; 47 | } 48 | 49 | public void setOrderNum(Integer orderNum) 50 | { 51 | this.orderNum = orderNum; 52 | } 53 | 54 | public String getAncestors() 55 | { 56 | return ancestors; 57 | } 58 | 59 | public void setAncestors(String ancestors) 60 | { 61 | this.ancestors = ancestors; 62 | } 63 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/web/domain/Ztree.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.web.domain; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Ztree树结构实体类 7 | * 8 | * @author bank 9 | */ 10 | public class Ztree implements Serializable 11 | { 12 | private static final long serialVersionUID = 1L; 13 | 14 | /** 节点ID */ 15 | private Long id; 16 | 17 | /** 节点父ID */ 18 | private Long pId; 19 | 20 | /** 节点名称 */ 21 | private String name; 22 | 23 | /** 节点标题 */ 24 | private String title; 25 | 26 | /** 是否勾选 */ 27 | private boolean checked = false; 28 | 29 | /** 是否展开 */ 30 | private boolean open = false; 31 | 32 | /** 是否能勾选 */ 33 | private boolean nocheck = false; 34 | 35 | public Long getId() 36 | { 37 | return id; 38 | } 39 | 40 | public void setId(Long id) 41 | { 42 | this.id = id; 43 | } 44 | 45 | public Long getpId() 46 | { 47 | return pId; 48 | } 49 | 50 | public void setpId(Long pId) 51 | { 52 | this.pId = pId; 53 | } 54 | 55 | public String getName() 56 | { 57 | return name; 58 | } 59 | 60 | public void setName(String name) 61 | { 62 | this.name = name; 63 | } 64 | 65 | public String getTitle() 66 | { 67 | return title; 68 | } 69 | 70 | public void setTitle(String title) 71 | { 72 | this.title = title; 73 | } 74 | 75 | public boolean isChecked() 76 | { 77 | return checked; 78 | } 79 | 80 | public void setChecked(boolean checked) 81 | { 82 | this.checked = checked; 83 | } 84 | 85 | public boolean isOpen() 86 | { 87 | return open; 88 | } 89 | 90 | public void setOpen(boolean open) 91 | { 92 | this.open = open; 93 | } 94 | 95 | public boolean isNocheck() 96 | { 97 | return nocheck; 98 | } 99 | 100 | public void setNocheck(boolean nocheck) 101 | { 102 | this.nocheck = nocheck; 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/web/page/PageDomain.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.web.page; 2 | 3 | import com.bank.common.utils.StringUtils; 4 | 5 | /** 6 | * 分页数据 7 | * 8 | * @author bank 9 | */ 10 | public class PageDomain 11 | { 12 | /** 当前记录起始索引 */ 13 | private Integer pageNum; 14 | /** 每页显示记录数 */ 15 | private Integer pageSize; 16 | /** 排序列 */ 17 | private String orderByColumn; 18 | /** 排序的方向 "desc" 或者 "asc". */ 19 | private String isAsc; 20 | 21 | public String getOrderBy() 22 | { 23 | if (StringUtils.isEmpty(orderByColumn)) 24 | { 25 | return ""; 26 | } 27 | return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc; 28 | } 29 | 30 | public Integer getPageNum() 31 | { 32 | return pageNum; 33 | } 34 | 35 | public void setPageNum(Integer pageNum) 36 | { 37 | this.pageNum = pageNum; 38 | } 39 | 40 | public Integer getPageSize() 41 | { 42 | return pageSize; 43 | } 44 | 45 | public void setPageSize(Integer pageSize) 46 | { 47 | this.pageSize = pageSize; 48 | } 49 | 50 | public String getOrderByColumn() 51 | { 52 | return orderByColumn; 53 | } 54 | 55 | public void setOrderByColumn(String orderByColumn) 56 | { 57 | this.orderByColumn = orderByColumn; 58 | } 59 | 60 | public String getIsAsc() 61 | { 62 | return isAsc; 63 | } 64 | 65 | public void setIsAsc(String isAsc) 66 | { 67 | this.isAsc = isAsc; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/web/page/TableDataInfo.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.web.page; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | 6 | /** 7 | * 表格分页数据对象 8 | * 9 | * @author bank 10 | */ 11 | public class TableDataInfo implements Serializable 12 | { 13 | private static final long serialVersionUID = 1L; 14 | 15 | /** 总记录数 */ 16 | private long total; 17 | 18 | /** 列表数据 */ 19 | private List rows; 20 | 21 | /** 消息状态码 */ 22 | private int code; 23 | 24 | /** 消息内容 */ 25 | private int msg; 26 | 27 | /** 28 | * 表格数据对象 29 | */ 30 | public TableDataInfo() 31 | { 32 | } 33 | 34 | /** 35 | * 分页 36 | * 37 | * @param list 列表数据 38 | * @param total 总记录数 39 | */ 40 | public TableDataInfo(List list, int total) 41 | { 42 | this.rows = list; 43 | this.total = total; 44 | } 45 | 46 | public long getTotal() 47 | { 48 | return total; 49 | } 50 | 51 | public void setTotal(long total) 52 | { 53 | this.total = total; 54 | } 55 | 56 | public List getRows() 57 | { 58 | return rows; 59 | } 60 | 61 | public void setRows(List rows) 62 | { 63 | this.rows = rows; 64 | } 65 | 66 | public int getCode() 67 | { 68 | return code; 69 | } 70 | 71 | public void setCode(int code) 72 | { 73 | this.code = code; 74 | } 75 | 76 | public int getMsg() 77 | { 78 | return msg; 79 | } 80 | 81 | public void setMsg(int msg) 82 | { 83 | this.msg = msg; 84 | } 85 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/web/page/TableSupport.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.web.page; 2 | 3 | import com.bank.common.utils.ServletUtils; 4 | import com.bank.common.constant.Constants; 5 | 6 | /** 7 | * 表格数据处理 8 | * 9 | * @author bank 10 | */ 11 | public class TableSupport 12 | { 13 | /** 14 | * 封装分页对象 15 | */ 16 | public static PageDomain getPageDomain() 17 | { 18 | PageDomain pageDomain = new PageDomain(); 19 | pageDomain.setPageNum(ServletUtils.getParameterToInt(Constants.PAGE_NUM)); 20 | pageDomain.setPageSize(ServletUtils.getParameterToInt(Constants.PAGE_SIZE)); 21 | pageDomain.setOrderByColumn(ServletUtils.getParameter(Constants.ORDER_BY_COLUMN)); 22 | pageDomain.setIsAsc(ServletUtils.getParameter(Constants.IS_ASC)); 23 | return pageDomain; 24 | } 25 | 26 | public static PageDomain buildPageRequest() 27 | { 28 | return getPageDomain(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/web/service/ConfigService.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.web.service; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | import com.bank.project.system.config.service.IConfigService; 6 | 7 | /** 8 | * bank首创 html调用 thymeleaf 实现参数管理 9 | * 10 | * @author bank 11 | */ 12 | @Service("config") 13 | public class ConfigService 14 | { 15 | @Autowired 16 | private IConfigService configService; 17 | 18 | /** 19 | * 根据键名查询参数配置信息 20 | * 21 | * @param configName 参数名称 22 | * @return 参数键值 23 | */ 24 | public String getKey(String configKey) 25 | { 26 | return configService.selectConfigByKey(configKey); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/bank/framework/web/service/DictService.java: -------------------------------------------------------------------------------- 1 | package com.bank.framework.web.service; 2 | 3 | import java.util.List; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.stereotype.Service; 6 | import com.bank.project.system.dict.domain.DictData; 7 | import com.bank.project.system.dict.service.IDictDataService; 8 | 9 | /** 10 | * bank首创 html调用 thymeleaf 实现字典读取 11 | * 12 | * @author bank 13 | */ 14 | @Service("dict") 15 | public class DictService 16 | { 17 | @Autowired 18 | private IDictDataService dictDataService; 19 | 20 | /** 21 | * 根据字典类型查询字典数据信息 22 | * 23 | * @param dictType 字典类型 24 | * @return 参数键值 25 | */ 26 | public List getType(String dictType) 27 | { 28 | return dictDataService.selectDictDataByType(dictType); 29 | } 30 | 31 | /** 32 | * 根据字典类型和字典键值查询字典数据信息 33 | * 34 | * @param dictType 字典类型 35 | * @param dictValue 字典键值 36 | * @return 字典标签 37 | */ 38 | public String getLabel(String dictType, String dictValue) 39 | { 40 | return dictDataService.selectDictLabel(dictType, dictValue); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/monitor/druid/DruidController.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.monitor.druid; 2 | 3 | import org.apache.shiro.authz.annotation.RequiresPermissions; 4 | import org.springframework.stereotype.Controller; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import com.bank.framework.web.controller.BaseController; 8 | 9 | /** 10 | * @author: QQ:553039957 11 | * @Date: 2023/9/25 15:27 12 | * @Description: 13 | * 1. gitcode主页: https://gitcode.net/tbb414 (推荐) 14 | * 2. github主页:https://github.com/doudoutangs 15 | * 3. gitee(码云)主页:https://gitee.com/spdoudoutang 16 | */ 17 | @Controller 18 | @RequestMapping("/monitor/data") 19 | public class DruidController extends BaseController 20 | { 21 | private String prefix = "/druid"; 22 | 23 | @RequiresPermissions("monitor:data:view") 24 | @GetMapping() 25 | public String index() 26 | { 27 | return redirect(prefix + "/index"); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/monitor/logininfor/mapper/LogininforMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.monitor.logininfor.mapper; 2 | 3 | import java.util.List; 4 | import com.bank.project.monitor.logininfor.domain.Logininfor; 5 | 6 | /** 7 | * 系统访问日志情况信息 数据层 8 | * 9 | * @author bank 10 | */ 11 | public interface LogininforMapper 12 | { 13 | /** 14 | * 新增系统登录日志 15 | * 16 | * @param logininfor 访问日志对象 17 | */ 18 | public void insertLogininfor(Logininfor logininfor); 19 | 20 | /** 21 | * 查询系统登录日志集合 22 | * 23 | * @param logininfor 访问日志对象 24 | * @return 登录记录集合 25 | */ 26 | public List selectLogininforList(Logininfor logininfor); 27 | 28 | /** 29 | * 批量删除系统登录日志 30 | * 31 | * @param ids 需要删除的数据 32 | * @return 结果 33 | */ 34 | public int deleteLogininforByIds(String[] ids); 35 | 36 | /** 37 | * 清空系统登录日志 38 | * 39 | * @return 结果 40 | */ 41 | public int cleanLogininfor(); 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/monitor/logininfor/service/ILogininforService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.monitor.logininfor.service; 2 | 3 | import java.util.List; 4 | import com.bank.project.monitor.logininfor.domain.Logininfor; 5 | 6 | /** 7 | * 系统访问日志情况信息 服务层 8 | * 9 | * @author bank 10 | */ 11 | public interface ILogininforService 12 | { 13 | /** 14 | * 新增系统登录日志 15 | * 16 | * @param logininfor 访问日志对象 17 | */ 18 | public void insertLogininfor(Logininfor logininfor); 19 | 20 | /** 21 | * 查询系统登录日志集合 22 | * 23 | * @param logininfor 访问日志对象 24 | * @return 登录记录集合 25 | */ 26 | public List selectLogininforList(Logininfor logininfor); 27 | 28 | /** 29 | * 批量删除系统登录日志 30 | * 31 | * @param ids 需要删除的数据 32 | * @return 33 | */ 34 | public int deleteLogininforByIds(String ids); 35 | 36 | /** 37 | * 清空系统登录日志 38 | */ 39 | public void cleanLogininfor(); 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/monitor/logininfor/service/LogininforServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.monitor.logininfor.service; 2 | 3 | import java.util.List; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.stereotype.Service; 6 | import com.bank.common.utils.text.Convert; 7 | import com.bank.project.monitor.logininfor.domain.Logininfor; 8 | import com.bank.project.monitor.logininfor.mapper.LogininforMapper; 9 | 10 | /** 11 | * 系统访问日志情况信息 服务层处理 12 | * 13 | * @author bank 14 | */ 15 | @Service 16 | public class LogininforServiceImpl implements ILogininforService 17 | { 18 | @Autowired 19 | private LogininforMapper logininforMapper; 20 | 21 | /** 22 | * 新增系统登录日志 23 | * 24 | * @param logininfor 访问日志对象 25 | */ 26 | @Override 27 | public void insertLogininfor(Logininfor logininfor) 28 | { 29 | logininforMapper.insertLogininfor(logininfor); 30 | } 31 | 32 | /** 33 | * 查询系统登录日志集合 34 | * 35 | * @param logininfor 访问日志对象 36 | * @return 登录记录集合 37 | */ 38 | @Override 39 | public List selectLogininforList(Logininfor logininfor) 40 | { 41 | return logininforMapper.selectLogininforList(logininfor); 42 | } 43 | 44 | /** 45 | * 批量删除系统登录日志 46 | * 47 | * @param ids 需要删除的数据 48 | * @return 49 | */ 50 | @Override 51 | public int deleteLogininforByIds(String ids) 52 | { 53 | return logininforMapper.deleteLogininforByIds(Convert.toStrArray(ids)); 54 | } 55 | 56 | /** 57 | * 清空系统登录日志 58 | */ 59 | @Override 60 | public void cleanLogininfor() 61 | { 62 | logininforMapper.cleanLogininfor(); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/monitor/online/mapper/UserOnlineMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.monitor.online.mapper; 2 | 3 | import java.util.List; 4 | import com.bank.project.monitor.online.domain.UserOnline; 5 | 6 | /** 7 | * 在线用户 数据层 8 | * 9 | * @author bank 10 | */ 11 | public interface UserOnlineMapper 12 | { 13 | /** 14 | * 通过会话序号查询信息 15 | * 16 | * @param sessionId 会话ID 17 | * @return 在线用户信息 18 | */ 19 | public UserOnline selectOnlineById(String sessionId); 20 | 21 | /** 22 | * 通过会话序号删除信息 23 | * 24 | * @param sessionId 会话ID 25 | * @return 在线用户信息 26 | */ 27 | public int deleteOnlineById(String sessionId); 28 | 29 | /** 30 | * 保存会话信息 31 | * 32 | * @param online 会话信息 33 | * @return 结果 34 | */ 35 | public int saveOnline(UserOnline online); 36 | 37 | /** 38 | * 查询会话集合 39 | * 40 | * @param userOnline 会话参数 41 | * @return 会话集合 42 | */ 43 | public List selectUserOnlineList(UserOnline userOnline); 44 | 45 | /** 46 | * 查询过期会话集合 47 | * 48 | * @param lastAccessTime 过期时间 49 | * @return 会话集合 50 | */ 51 | public List selectOnlineByExpired(String lastAccessTime); 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/monitor/online/service/IUserOnlineService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.monitor.online.service; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | import com.bank.project.monitor.online.domain.UserOnline; 6 | 7 | /** 8 | * 在线用户 服务层 9 | * 10 | * @author bank 11 | */ 12 | public interface IUserOnlineService 13 | { 14 | /** 15 | * 通过会话序号查询信息 16 | * 17 | * @param sessionId 会话ID 18 | * @return 在线用户信息 19 | */ 20 | public UserOnline selectOnlineById(String sessionId); 21 | 22 | /** 23 | * 通过会话序号删除信息 24 | * 25 | * @param sessionId 会话ID 26 | * @return 在线用户信息 27 | */ 28 | public void deleteOnlineById(String sessionId); 29 | 30 | /** 31 | * 通过会话序号删除信息 32 | * 33 | * @param sessions 会话ID集合 34 | * @return 在线用户信息 35 | */ 36 | public void batchDeleteOnline(List sessions); 37 | 38 | /** 39 | * 保存会话信息 40 | * 41 | * @param online 会话信息 42 | */ 43 | public void saveOnline(UserOnline online); 44 | 45 | /** 46 | * 查询会话集合 47 | * 48 | * @param userOnline 分页参数 49 | * @return 会话集合 50 | */ 51 | public List selectUserOnlineList(UserOnline userOnline); 52 | 53 | /** 54 | * 强退用户 55 | * 56 | * @param sessionId 会话ID 57 | */ 58 | public void forceLogout(String sessionId); 59 | 60 | /** 61 | * 查询会话集合 62 | * 63 | * @param expiredDate 有效期 64 | * @return 会话集合 65 | */ 66 | public List selectOnlineByExpired(Date expiredDate); 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/monitor/operlog/mapper/OperLogMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.monitor.operlog.mapper; 2 | 3 | import java.util.List; 4 | import com.bank.project.monitor.operlog.domain.OperLog; 5 | 6 | /** 7 | * 操作日志 数据层 8 | * 9 | * @author bank 10 | */ 11 | public interface OperLogMapper 12 | { 13 | /** 14 | * 新增操作日志 15 | * 16 | * @param operLog 操作日志对象 17 | */ 18 | public void insertOperlog(OperLog operLog); 19 | 20 | /** 21 | * 查询系统操作日志集合 22 | * 23 | * @param operLog 操作日志对象 24 | * @return 操作日志集合 25 | */ 26 | public List selectOperLogList(OperLog operLog); 27 | 28 | /** 29 | * 批量删除系统操作日志 30 | * 31 | * @param ids 需要删除的数据 32 | * @return 结果 33 | */ 34 | public int deleteOperLogByIds(String[] ids); 35 | 36 | /** 37 | * 查询操作日志详细 38 | * 39 | * @param operId 操作ID 40 | * @return 操作日志对象 41 | */ 42 | public OperLog selectOperLogById(Long operId); 43 | 44 | /** 45 | * 清空操作日志 46 | */ 47 | public void cleanOperLog(); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/monitor/operlog/service/IOperLogService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.monitor.operlog.service; 2 | 3 | import java.util.List; 4 | import com.bank.project.monitor.operlog.domain.OperLog; 5 | 6 | /** 7 | * 操作日志 服务层 8 | * 9 | * @author bank 10 | */ 11 | public interface IOperLogService 12 | { 13 | /** 14 | * 新增操作日志 15 | * 16 | * @param operLog 操作日志对象 17 | */ 18 | public void insertOperlog(OperLog operLog); 19 | 20 | /** 21 | * 查询系统操作日志集合 22 | * 23 | * @param operLog 操作日志对象 24 | * @return 操作日志集合 25 | */ 26 | public List selectOperLogList(OperLog operLog); 27 | 28 | /** 29 | * 批量删除系统操作日志 30 | * 31 | * @param ids 需要删除的数据 32 | * @return 结果 33 | */ 34 | public int deleteOperLogByIds(String ids); 35 | 36 | /** 37 | * 查询操作日志详细 38 | * 39 | * @param operId 操作ID 40 | * @return 操作日志对象 41 | */ 42 | public OperLog selectOperLogById(Long operId); 43 | 44 | /** 45 | * 清空操作日志 46 | */ 47 | public void cleanOperLog(); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/monitor/operlog/service/OperLogServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.monitor.operlog.service; 2 | 3 | import java.util.List; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.stereotype.Service; 6 | import com.bank.common.utils.text.Convert; 7 | import com.bank.project.monitor.operlog.domain.OperLog; 8 | import com.bank.project.monitor.operlog.mapper.OperLogMapper; 9 | 10 | /** 11 | * 操作日志 服务层处理 12 | * 13 | * @author bank 14 | */ 15 | @Service 16 | public class OperLogServiceImpl implements IOperLogService 17 | { 18 | @Autowired 19 | private OperLogMapper operLogMapper; 20 | 21 | /** 22 | * 新增操作日志 23 | * 24 | * @param operLog 操作日志对象 25 | */ 26 | @Override 27 | public void insertOperlog(OperLog operLog) 28 | { 29 | operLogMapper.insertOperlog(operLog); 30 | } 31 | 32 | /** 33 | * 查询系统操作日志集合 34 | * 35 | * @param operLog 操作日志对象 36 | * @return 操作日志集合 37 | */ 38 | @Override 39 | public List selectOperLogList(OperLog operLog) 40 | { 41 | return operLogMapper.selectOperLogList(operLog); 42 | } 43 | 44 | /** 45 | * 批量删除系统操作日志 46 | * 47 | * @param ids 需要删除的数据 48 | * @return 49 | */ 50 | @Override 51 | public int deleteOperLogByIds(String ids) 52 | { 53 | return operLogMapper.deleteOperLogByIds(Convert.toStrArray(ids)); 54 | } 55 | 56 | /** 57 | * 查询操作日志详细 58 | * 59 | * @param operId 操作ID 60 | * @return 操作日志对象 61 | */ 62 | @Override 63 | public OperLog selectOperLogById(Long operId) 64 | { 65 | return operLogMapper.selectOperLogById(operId); 66 | } 67 | 68 | /** 69 | * 清空操作日志 70 | */ 71 | @Override 72 | public void cleanOperLog() 73 | { 74 | operLogMapper.cleanOperLog(); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/monitor/server/controller/ServerController.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.monitor.server.controller; 2 | 3 | import org.apache.shiro.authz.annotation.RequiresPermissions; 4 | import org.springframework.stereotype.Controller; 5 | import org.springframework.ui.ModelMap; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import com.bank.framework.web.controller.BaseController; 9 | import com.bank.project.monitor.server.domain.Server; 10 | 11 | /** 12 | * 服务器监控 13 | * 14 | * @author bank 15 | */ 16 | @Controller 17 | @RequestMapping("/monitor/server") 18 | public class ServerController extends BaseController 19 | { 20 | private String prefix = "monitor/server"; 21 | 22 | @RequiresPermissions("monitor:server:view") 23 | @GetMapping() 24 | public String server(ModelMap mmap) throws Exception 25 | { 26 | Server server = new Server(); 27 | server.copyTo(); 28 | mmap.put("server", server); 29 | return prefix + "/server"; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/monitor/server/domain/Cpu.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.monitor.server.domain; 2 | 3 | import com.bank.common.utils.Arith; 4 | 5 | /** 6 | * CPU相关信息 7 | * 8 | * @author bank 9 | */ 10 | public class Cpu 11 | { 12 | /** 13 | * 核心数 14 | */ 15 | private int cpuNum; 16 | 17 | /** 18 | * CPU总的使用率 19 | */ 20 | private double total; 21 | 22 | /** 23 | * CPU系统使用率 24 | */ 25 | private double sys; 26 | 27 | /** 28 | * CPU用户使用率 29 | */ 30 | private double used; 31 | 32 | /** 33 | * CPU当前等待率 34 | */ 35 | private double wait; 36 | 37 | /** 38 | * CPU当前空闲率 39 | */ 40 | private double free; 41 | 42 | public int getCpuNum() 43 | { 44 | return cpuNum; 45 | } 46 | 47 | public void setCpuNum(int cpuNum) 48 | { 49 | this.cpuNum = cpuNum; 50 | } 51 | 52 | public double getTotal() 53 | { 54 | return Arith.round(Arith.mul(total, 100), 2); 55 | } 56 | 57 | public void setTotal(double total) 58 | { 59 | this.total = total; 60 | } 61 | 62 | public double getSys() 63 | { 64 | return Arith.round(Arith.mul(sys / total, 100), 2); 65 | } 66 | 67 | public void setSys(double sys) 68 | { 69 | this.sys = sys; 70 | } 71 | 72 | public double getUsed() 73 | { 74 | return Arith.round(Arith.mul(used / total, 100), 2); 75 | } 76 | 77 | public void setUsed(double used) 78 | { 79 | this.used = used; 80 | } 81 | 82 | public double getWait() 83 | { 84 | return Arith.round(Arith.mul(wait / total, 100), 2); 85 | } 86 | 87 | public void setWait(double wait) 88 | { 89 | this.wait = wait; 90 | } 91 | 92 | public double getFree() 93 | { 94 | return Arith.round(Arith.mul(free / total, 100), 2); 95 | } 96 | 97 | public void setFree(double free) 98 | { 99 | this.free = free; 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/monitor/server/domain/Mem.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.monitor.server.domain; 2 | 3 | import com.bank.common.utils.Arith; 4 | 5 | /** 6 | * 內存相关信息 7 | * 8 | * @author bank 9 | */ 10 | public class Mem 11 | { 12 | /** 13 | * 内存总量 14 | */ 15 | private double total; 16 | 17 | /** 18 | * 已用内存 19 | */ 20 | private double used; 21 | 22 | /** 23 | * 剩余内存 24 | */ 25 | private double free; 26 | 27 | public double getTotal() 28 | { 29 | return Arith.div(total, (1024 * 1024 * 1024), 2); 30 | } 31 | 32 | public void setTotal(long total) 33 | { 34 | this.total = total; 35 | } 36 | 37 | public double getUsed() 38 | { 39 | return Arith.div(used, (1024 * 1024 * 1024), 2); 40 | } 41 | 42 | public void setUsed(long used) 43 | { 44 | this.used = used; 45 | } 46 | 47 | public double getFree() 48 | { 49 | return Arith.div(free, (1024 * 1024 * 1024), 2); 50 | } 51 | 52 | public void setFree(long free) 53 | { 54 | this.free = free; 55 | } 56 | 57 | public double getUsage() 58 | { 59 | return Arith.mul(Arith.div(used, total, 4), 100); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/monitor/server/domain/Sys.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.monitor.server.domain; 2 | 3 | /** 4 | * 系统相关信息 5 | * 6 | * @author bank 7 | */ 8 | public class Sys 9 | { 10 | /** 11 | * 服务器名称 12 | */ 13 | private String computerName; 14 | 15 | /** 16 | * 服务器Ip 17 | */ 18 | private String computerIp; 19 | 20 | /** 21 | * 项目路径 22 | */ 23 | private String userDir; 24 | 25 | /** 26 | * 操作系统 27 | */ 28 | private String osName; 29 | 30 | /** 31 | * 系统架构 32 | */ 33 | private String osArch; 34 | 35 | public String getComputerName() 36 | { 37 | return computerName; 38 | } 39 | 40 | public void setComputerName(String computerName) 41 | { 42 | this.computerName = computerName; 43 | } 44 | 45 | public String getComputerIp() 46 | { 47 | return computerIp; 48 | } 49 | 50 | public void setComputerIp(String computerIp) 51 | { 52 | this.computerIp = computerIp; 53 | } 54 | 55 | public String getUserDir() 56 | { 57 | return userDir; 58 | } 59 | 60 | public void setUserDir(String userDir) 61 | { 62 | this.userDir = userDir; 63 | } 64 | 65 | public String getOsName() 66 | { 67 | return osName; 68 | } 69 | 70 | public void setOsName(String osName) 71 | { 72 | this.osName = osName; 73 | } 74 | 75 | public String getOsArch() 76 | { 77 | return osArch; 78 | } 79 | 80 | public void setOsArch(String osArch) 81 | { 82 | this.osArch = osArch; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/monitor/server/domain/SysFile.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.monitor.server.domain; 2 | 3 | /** 4 | * 系统文件相关信息 5 | * 6 | * @author bank 7 | */ 8 | public class SysFile 9 | { 10 | /** 11 | * 盘符路径 12 | */ 13 | private String dirName; 14 | 15 | /** 16 | * 盘符类型 17 | */ 18 | private String sysTypeName; 19 | 20 | /** 21 | * 文件类型 22 | */ 23 | private String typeName; 24 | 25 | /** 26 | * 总大小 27 | */ 28 | private String total; 29 | 30 | /** 31 | * 剩余大小 32 | */ 33 | private String free; 34 | 35 | /** 36 | * 已经使用量 37 | */ 38 | private String used; 39 | 40 | /** 41 | * 资源的使用率 42 | */ 43 | private double usage; 44 | 45 | public String getDirName() 46 | { 47 | return dirName; 48 | } 49 | 50 | public void setDirName(String dirName) 51 | { 52 | this.dirName = dirName; 53 | } 54 | 55 | public String getSysTypeName() 56 | { 57 | return sysTypeName; 58 | } 59 | 60 | public void setSysTypeName(String sysTypeName) 61 | { 62 | this.sysTypeName = sysTypeName; 63 | } 64 | 65 | public String getTypeName() 66 | { 67 | return typeName; 68 | } 69 | 70 | public void setTypeName(String typeName) 71 | { 72 | this.typeName = typeName; 73 | } 74 | 75 | public String getTotal() 76 | { 77 | return total; 78 | } 79 | 80 | public void setTotal(String total) 81 | { 82 | this.total = total; 83 | } 84 | 85 | public String getFree() 86 | { 87 | return free; 88 | } 89 | 90 | public void setFree(String free) 91 | { 92 | this.free = free; 93 | } 94 | 95 | public String getUsed() 96 | { 97 | return used; 98 | } 99 | 100 | public void setUsed(String used) 101 | { 102 | this.used = used; 103 | } 104 | 105 | public double getUsage() 106 | { 107 | return usage; 108 | } 109 | 110 | public void setUsage(double usage) 111 | { 112 | this.usage = usage; 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/constant/AssetConstant.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.constant; 2 | 3 | /** 4 | * @author: QQ:553039957 5 | * @Date: 2023/9/25 15:27 6 | * @Description: 7 | * 1. gitcode主页: https://gitcode.net/tbb414 (推荐) 8 | * 2. github主页:https://github.com/doudoutangs 9 | * 3. gitee(码云)主页:https://gitee.com/spdoudoutang 10 | */ 11 | public interface AssetConstant { 12 | /**********资产类型************/ 13 | String TYPE_CONSUMABLE = "0";//消耗品 14 | String TYPE_FIXED = "1";//固定资产 15 | String TYPE_TOOLS = "2";//公共工具 16 | /**********资产状态************/ 17 | String STATUS_NORMAL = "0";//正常 18 | String STATUS_LEND = "1";//借出 19 | String STATUS_REPAIR = "2";//维修 20 | String STATUS_SCRAP = "3";//报废 21 | /**********资产操作类型************/ 22 | /** 23 | * 入库 24 | */ 25 | String OPERATE_ADD = "0";//入库 26 | /** 27 | * 领用 28 | */ 29 | String OPERATE_LEND = "1";//领用 30 | /** 31 | * 归还 32 | */ 33 | String OPERATE_RETURN = "2";//归还 34 | /** 35 | * 退库 36 | */ 37 | String OPERATE_RETREAT = "3";//退库 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/domain/AddressBook.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.domain; 2 | 3 | import com.bank.framework.web.domain.BaseEntity; 4 | /** 5 | * @author: QQ:553039957 6 | * @Date: 2023/9/25 15:26 7 | * @Description: 8 | * 1. gitcode主页: https://gitcode.net/tbb414 (推荐) 9 | * 2. github主页:https://github.com/doudoutangs 10 | * 3. gitee(码云)主页:https://gitee.com/spdoudoutang 11 | */ 12 | public class AddressBook extends BaseEntity { 13 | private Long id; 14 | 15 | private String name; 16 | 17 | private String deptName; 18 | 19 | private String mobile; 20 | 21 | private Integer orderNum; 22 | 23 | 24 | public Long getId() { 25 | return id; 26 | } 27 | 28 | public void setId(Long id) { 29 | this.id = id; 30 | } 31 | 32 | public String getName() { 33 | return name; 34 | } 35 | 36 | public void setName(String name) { 37 | this.name = name; 38 | } 39 | 40 | public String getDeptName() { 41 | return deptName; 42 | } 43 | 44 | public void setDeptName(String deptName) { 45 | this.deptName = deptName; 46 | } 47 | 48 | public String getMobile() { 49 | return mobile; 50 | } 51 | 52 | public void setMobile(String mobile) { 53 | this.mobile = mobile; 54 | } 55 | 56 | public Integer getOrderNum() { 57 | return orderNum; 58 | } 59 | 60 | public void setOrderNum(Integer orderNum) { 61 | this.orderNum = orderNum; 62 | } 63 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/domain/AssetOperate.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.domain; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.bank.framework.web.domain.BaseEntity; 5 | import lombok.Data; 6 | 7 | import java.util.Date; 8 | 9 | public class AssetOperate extends BaseEntity { 10 | private Long id; 11 | 12 | private Long assetId; 13 | 14 | private String abradeRate; 15 | 16 | private String operateUserId; 17 | 18 | private String operateDate; 19 | 20 | private String operateNum; 21 | 22 | private String operateType; 23 | 24 | private String revertTime; 25 | 26 | public Long getId() { 27 | return id; 28 | } 29 | 30 | public void setId(Long id) { 31 | this.id = id; 32 | } 33 | 34 | public Long getAssetId() { 35 | return assetId; 36 | } 37 | 38 | public void setAssetId(Long assetId) { 39 | this.assetId = assetId; 40 | } 41 | 42 | public String getAbradeRate() { 43 | return abradeRate; 44 | } 45 | 46 | public void setAbradeRate(String abradeRate) { 47 | this.abradeRate = abradeRate; 48 | } 49 | 50 | public String getOperateUserId() { 51 | return operateUserId; 52 | } 53 | 54 | public void setOperateUserId(String operateUserId) { 55 | this.operateUserId = operateUserId; 56 | } 57 | 58 | public String getOperateDate() { 59 | return operateDate; 60 | } 61 | 62 | public void setOperateDate(String operateDate) { 63 | this.operateDate = operateDate; 64 | } 65 | 66 | public String getOperateNum() { 67 | return operateNum; 68 | } 69 | 70 | public void setOperateNum(String operateNum) { 71 | this.operateNum = operateNum; 72 | } 73 | 74 | public String getOperateType() { 75 | return operateType; 76 | } 77 | 78 | public void setOperateType(String operateType) { 79 | this.operateType = operateType; 80 | } 81 | 82 | public String getRevertTime() { 83 | return revertTime; 84 | } 85 | 86 | public void setRevertTime(String revertTime) { 87 | this.revertTime = revertTime; 88 | } 89 | 90 | @Override 91 | public String toString() { 92 | return JSON.toJSONString(this); 93 | } 94 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/domain/BankNotice.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.domain; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.bank.framework.web.domain.BaseEntity; 5 | import lombok.Data; 6 | 7 | import java.util.Date; 8 | 9 | public class BankNotice extends BaseEntity { 10 | private Long id; 11 | 12 | private String level; 13 | 14 | private String title; 15 | 16 | private String content; 17 | 18 | private String publishTime; 19 | 20 | private String publishUserId; 21 | 22 | private Integer status; 23 | 24 | public Integer getStatus() { 25 | return status; 26 | } 27 | 28 | public void setStatus(Integer status) { 29 | this.status = status; 30 | } 31 | 32 | public Long getId() { 33 | return id; 34 | } 35 | 36 | public void setId(Long id) { 37 | this.id = id; 38 | } 39 | 40 | public String getLevel() { 41 | return level; 42 | } 43 | 44 | public void setLevel(String level) { 45 | this.level = level; 46 | } 47 | 48 | public String getTitle() { 49 | return title; 50 | } 51 | 52 | public void setTitle(String title) { 53 | this.title = title; 54 | } 55 | 56 | public String getContent() { 57 | return content; 58 | } 59 | 60 | public void setContent(String content) { 61 | this.content = content; 62 | } 63 | 64 | public String getPublishTime() { 65 | return publishTime; 66 | } 67 | 68 | public void setPublishTime(String publishTime) { 69 | this.publishTime = publishTime; 70 | } 71 | 72 | public String getPublishUserId() { 73 | return publishUserId; 74 | } 75 | 76 | public void setPublishUserId(String publishUserId) { 77 | this.publishUserId = publishUserId; 78 | } 79 | 80 | @Override 81 | public String toString() { 82 | return JSON.toJSONString(this); 83 | } 84 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/domain/BookManage.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.domain; 2 | 3 | import com.bank.framework.web.domain.BaseEntity; 4 | 5 | import java.util.Date; 6 | /** 7 | * @author: QQ:553039957 8 | * @Date: 2023/9/25 15:26 9 | * @Description: 10 | * 1. gitcode主页: https://gitcode.net/tbb414 (推荐) 11 | * 2. github主页:https://github.com/doudoutangs 12 | * 3. gitee(码云)主页:https://gitee.com/spdoudoutang 13 | */ 14 | public class BookManage extends BaseEntity { 15 | private Long id; 16 | 17 | private String name; 18 | 19 | private String press; 20 | 21 | private String summary; 22 | 23 | private Integer status; 24 | 25 | private Date createTime; 26 | 27 | private Date updateTime; 28 | 29 | public Long getId() { 30 | return id; 31 | } 32 | 33 | public void setId(Long id) { 34 | this.id = id; 35 | } 36 | 37 | public String getName() { 38 | return name; 39 | } 40 | 41 | public void setName(String name) { 42 | this.name = name; 43 | } 44 | 45 | public String getPress() { 46 | return press; 47 | } 48 | 49 | public void setPress(String press) { 50 | this.press = press; 51 | } 52 | 53 | public String getSummary() { 54 | return summary; 55 | } 56 | 57 | public void setSummary(String summary) { 58 | this.summary = summary; 59 | } 60 | 61 | public Integer getStatus() { 62 | return status; 63 | } 64 | 65 | public void setStatus(Integer status) { 66 | this.status = status; 67 | } 68 | 69 | public Date getCreateTime() { 70 | return createTime; 71 | } 72 | 73 | public void setCreateTime(Date createTime) { 74 | this.createTime = createTime; 75 | } 76 | 77 | public Date getUpdateTime() { 78 | return updateTime; 79 | } 80 | 81 | public void setUpdateTime(Date updateTime) { 82 | this.updateTime = updateTime; 83 | } 84 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/domain/BookOperate.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.domain; 2 | 3 | import com.bank.framework.web.domain.BaseEntity; 4 | 5 | import java.util.Date; 6 | 7 | public class BookOperate extends BaseEntity { 8 | private Long id; 9 | 10 | private Long userId; 11 | 12 | private String lendDate; 13 | 14 | private String returnDate; 15 | 16 | private Long bookId; 17 | 18 | private Date createTime; 19 | 20 | private Date updateTime; 21 | 22 | public Long getId() { 23 | return id; 24 | } 25 | 26 | public void setId(Long id) { 27 | this.id = id; 28 | } 29 | 30 | public Long getUserId() { 31 | return userId; 32 | } 33 | 34 | public void setUserId(Long userId) { 35 | this.userId = userId; 36 | } 37 | 38 | public String getLendDate() { 39 | return lendDate; 40 | } 41 | 42 | public void setLendDate(String lendDate) { 43 | this.lendDate = lendDate; 44 | } 45 | 46 | public String getReturnDate() { 47 | return returnDate; 48 | } 49 | 50 | public void setReturnDate(String returnDate) { 51 | this.returnDate = returnDate; 52 | } 53 | 54 | public Long getBookId() { 55 | return bookId; 56 | } 57 | 58 | public void setBookId(Long bookId) { 59 | this.bookId = bookId; 60 | } 61 | 62 | public Date getCreateTime() { 63 | return createTime; 64 | } 65 | 66 | public void setCreateTime(Date createTime) { 67 | this.createTime = createTime; 68 | } 69 | 70 | public Date getUpdateTime() { 71 | return updateTime; 72 | } 73 | 74 | public void setUpdateTime(Date updateTime) { 75 | this.updateTime = updateTime; 76 | } 77 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/domain/Contract.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.domain; 2 | 3 | import com.bank.framework.web.domain.BaseEntity; 4 | 5 | 6 | public class Contract extends BaseEntity { 7 | private Long id; 8 | 9 | private String name; 10 | 11 | private String partA; 12 | 13 | private String partB; 14 | 15 | private String signDate; 16 | 17 | private String personA; 18 | 19 | private String personB; 20 | 21 | private Float amount; 22 | 23 | public Long getId() { 24 | return id; 25 | } 26 | 27 | public void setId(Long id) { 28 | this.id = id; 29 | } 30 | 31 | public String getName() { 32 | return name; 33 | } 34 | 35 | public void setName(String name) { 36 | this.name = name; 37 | } 38 | 39 | public String getPartA() { 40 | return partA; 41 | } 42 | 43 | public void setPartA(String partA) { 44 | this.partA = partA; 45 | } 46 | 47 | public String getPartB() { 48 | return partB; 49 | } 50 | 51 | public void setPartB(String partB) { 52 | this.partB = partB; 53 | } 54 | 55 | public String getSignDate() { 56 | return signDate; 57 | } 58 | 59 | public void setSignDate(String signDate) { 60 | this.signDate = signDate; 61 | } 62 | 63 | public String getPersonA() { 64 | return personA; 65 | } 66 | 67 | public void setPersonA(String personA) { 68 | this.personA = personA; 69 | } 70 | 71 | public String getPersonB() { 72 | return personB; 73 | } 74 | 75 | public void setPersonB(String personB) { 76 | this.personB = personB; 77 | } 78 | 79 | public Float getAmount() { 80 | return amount; 81 | } 82 | 83 | public void setAmount(Float amount) { 84 | this.amount = amount; 85 | } 86 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/domain/SalaryDetail.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.domain; 2 | 3 | import com.bank.framework.web.domain.BaseEntity; 4 | 5 | public class SalaryDetail extends BaseEntity { 6 | private Long id; 7 | 8 | private String type; 9 | 10 | private String costNo; 11 | 12 | private String costName; 13 | 14 | private Float costAmount; 15 | public Long getId() { 16 | return id; 17 | } 18 | 19 | public void setId(Long id) { 20 | this.id = id; 21 | } 22 | 23 | public String getType() { 24 | return type; 25 | } 26 | 27 | public void setType(String type) { 28 | this.type = type; 29 | } 30 | 31 | public String getCostNo() { 32 | return costNo; 33 | } 34 | 35 | public void setCostNo(String costNo) { 36 | this.costNo = costNo; 37 | } 38 | 39 | public String getCostName() { 40 | return costName; 41 | } 42 | 43 | public void setCostName(String costName) { 44 | this.costName = costName; 45 | } 46 | 47 | public Float getCostAmount() { 48 | return costAmount; 49 | } 50 | 51 | public void setCostAmount(Float costAmount) { 52 | this.costAmount = costAmount; 53 | } 54 | 55 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/domain/SalaryRecord.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.domain; 2 | 3 | import com.bank.framework.web.domain.BaseEntity; 4 | /** 5 | * @author: QQ:553039957 6 | * @Date: 2023/9/25 15:27 7 | * @Description: 8 | * 1. gitcode主页: https://gitcode.net/tbb414 (推荐) 9 | * 2. github主页:https://github.com/doudoutangs 10 | * 3. gitee(码云)主页:https://gitee.com/spdoudoutang 11 | */ 12 | public class SalaryRecord extends BaseEntity { 13 | private Long id; 14 | 15 | private Long userId; 16 | private String userName; 17 | 18 | private String salaryDate; 19 | 20 | private Float mustSalary; 21 | 22 | private Float realitySalary; 23 | 24 | public String getUserName() { 25 | return userName; 26 | } 27 | 28 | public void setUserName(String userName) { 29 | this.userName = userName; 30 | } 31 | 32 | public Long getId() { 33 | return id; 34 | } 35 | 36 | public void setId(Long id) { 37 | this.id = id; 38 | } 39 | 40 | public Long getUserId() { 41 | return userId; 42 | } 43 | 44 | public void setUserId(Long userId) { 45 | this.userId = userId; 46 | } 47 | 48 | public String getSalaryDate() { 49 | return salaryDate; 50 | } 51 | 52 | public void setSalaryDate(String salaryDate) { 53 | this.salaryDate = salaryDate; 54 | } 55 | 56 | public Float getMustSalary() { 57 | return mustSalary; 58 | } 59 | 60 | public void setMustSalary(Float mustSalary) { 61 | this.mustSalary = mustSalary; 62 | } 63 | 64 | public Float getRealitySalary() { 65 | return realitySalary; 66 | } 67 | 68 | public void setRealitySalary(Float realitySalary) { 69 | this.realitySalary = realitySalary; 70 | } 71 | 72 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/domain/UserPlan.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.domain; 2 | 3 | import com.bank.framework.web.domain.BaseEntity; 4 | 5 | import java.util.Date; 6 | 7 | public class UserPlan extends BaseEntity { 8 | private Long id; 9 | 10 | private Long userId; 11 | 12 | private String startDate; 13 | 14 | private String endDate; 15 | 16 | private String name; 17 | 18 | private Date createTime; 19 | 20 | private Date updateTime; 21 | 22 | public Long getId() { 23 | return id; 24 | } 25 | 26 | public void setId(Long id) { 27 | this.id = id; 28 | } 29 | 30 | public Long getUserId() { 31 | return userId; 32 | } 33 | 34 | public void setUserId(Long userId) { 35 | this.userId = userId; 36 | } 37 | 38 | public String getStartDate() { 39 | return startDate; 40 | } 41 | 42 | public void setStartDate(String startDate) { 43 | this.startDate = startDate; 44 | } 45 | 46 | public String getEndDate() { 47 | return endDate; 48 | } 49 | 50 | public void setEndDate(String endDate) { 51 | this.endDate = endDate; 52 | } 53 | 54 | public String getName() { 55 | return name; 56 | } 57 | 58 | public void setName(String name) { 59 | this.name = name; 60 | } 61 | 62 | public Date getCreateTime() { 63 | return createTime; 64 | } 65 | 66 | public void setCreateTime(Date createTime) { 67 | this.createTime = createTime; 68 | } 69 | 70 | public Date getUpdateTime() { 71 | return updateTime; 72 | } 73 | 74 | public void setUpdateTime(Date updateTime) { 75 | this.updateTime = updateTime; 76 | } 77 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/mapper/AddressBookMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.mapper; 2 | 3 | 4 | import com.bank.project.oa.domain.AddressBook; 5 | import com.bank.project.oa.domain.Asset; 6 | 7 | import java.util.List; 8 | 9 | public interface AddressBookMapper { 10 | int deleteByPrimaryKey(Long id); 11 | 12 | int deleteByIds(String[] ids); 13 | 14 | int insertSelective(AddressBook record); 15 | 16 | AddressBook selectByPrimaryKey(Long id); 17 | 18 | List selectByExample(AddressBook record); 19 | 20 | int updateByPrimaryKeySelective(AddressBook record); 21 | 22 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/mapper/AssetMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.mapper; 2 | 3 | import com.bank.project.oa.domain.Asset; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | public interface AssetMapper { 9 | 10 | int deleteByIds(String[] ids); 11 | 12 | int deleteById(String id); 13 | 14 | int insertSelective(Asset record); 15 | 16 | Asset selectByPrimaryKey(Long id); 17 | 18 | List selectByExample(Asset record); 19 | 20 | int updateByPrimaryKey(Asset record); 21 | 22 | Map countTypeTotal(); 23 | 24 | String countAmount(); 25 | 26 | String countTotal(); 27 | 28 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/mapper/AssetOperateMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.mapper; 2 | 3 | import com.bank.project.oa.domain.AssetOperate; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | public interface AssetOperateMapper { 9 | int deleteByPrimaryKey(String id); 10 | 11 | int insertSelective(AssetOperate record); 12 | 13 | AssetOperate selectByPrimaryKey(Long id); 14 | 15 | List selectListByAssetId(Long assetId); 16 | 17 | List selectList(AssetOperate record); 18 | 19 | String countTypeTotal(String operateType); 20 | 21 | List> count30DayOperateTotal(String operateType); 22 | 23 | int updateByPrimaryKeySelective(AssetOperate record); 24 | 25 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/mapper/BankNoticeMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.mapper; 2 | 3 | import com.bank.project.oa.domain.BankNotice; 4 | 5 | import java.util.List; 6 | 7 | public interface BankNoticeMapper { 8 | int deleteById(String id); 9 | 10 | int deleteByIds(String[] ids); 11 | 12 | int insertSelective(BankNotice record); 13 | 14 | BankNotice selectByPrimaryKey(Long id); 15 | 16 | int updateByPrimaryKeySelective(BankNotice record); 17 | 18 | List selectByExample(BankNotice record); 19 | 20 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/mapper/BookManageMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.mapper; 2 | 3 | 4 | import com.bank.project.oa.domain.BookManage; 5 | import com.bank.project.oa.domain.MeetManage; 6 | 7 | import java.util.List; 8 | 9 | public interface BookManageMapper { 10 | int deleteByPrimaryKey(Long id); 11 | 12 | int deleteByIds(String[] ids); 13 | 14 | int insertSelective(BookManage record); 15 | 16 | BookManage selectByPrimaryKey(Long id); 17 | 18 | int updateByPrimaryKeySelective(BookManage record); 19 | 20 | List selectByExample(BookManage record); 21 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/mapper/BookOperateMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.mapper; 2 | 3 | 4 | import com.bank.project.oa.domain.BookOperate; 5 | import com.bank.project.oa.domain.MeetManage; 6 | 7 | import java.util.List; 8 | 9 | public interface BookOperateMapper { 10 | int deleteByPrimaryKey(Long id); 11 | 12 | int insertSelective(BookOperate record); 13 | 14 | BookOperate selectByPrimaryKey(Long id); 15 | 16 | int updateByPrimaryKeySelective(BookOperate record); 17 | 18 | List selectByExample(BookOperate record); 19 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/mapper/ContractMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.mapper; 2 | 3 | 4 | import com.bank.project.oa.domain.BookManage; 5 | import com.bank.project.oa.domain.Contract; 6 | 7 | import java.util.List; 8 | 9 | public interface ContractMapper { 10 | int deleteByPrimaryKey(Long id); 11 | 12 | int deleteByIds(String[] ids); 13 | 14 | List selectByExample(Contract record); 15 | 16 | 17 | int insertSelective(Contract record); 18 | 19 | Contract selectByPrimaryKey(Long id); 20 | 21 | int updateByPrimaryKeySelective(Contract record); 22 | 23 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/mapper/MeetManageMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.mapper; 2 | 3 | 4 | import com.bank.project.oa.domain.MeetManage; 5 | import com.bank.project.oa.domain.SalaryRecord; 6 | 7 | import java.util.List; 8 | 9 | public interface MeetManageMapper { 10 | int deleteByPrimaryKey(Long id); 11 | int deleteByIds(String[] ids); 12 | 13 | int insertSelective(MeetManage record); 14 | 15 | MeetManage selectByPrimaryKey(Long id); 16 | 17 | int updateByPrimaryKeySelective(MeetManage record); 18 | 19 | List selectByExample(MeetManage record); 20 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/mapper/SalaryDetailMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.mapper; 2 | 3 | 4 | import com.bank.project.oa.domain.SalaryDetail; 5 | /** 6 | * @author: QQ:553039957 7 | * @Date: 2023/9/25 15:27 8 | * @Description: 9 | * 1. gitcode主页: https://gitcode.net/tbb414 (推荐) 10 | * 2. github主页:https://github.com/doudoutangs 11 | * 3. gitee(码云)主页:https://gitee.com/spdoudoutang 12 | */ 13 | public interface SalaryDetailMapper { 14 | int deleteByPrimaryKey(Integer id); 15 | 16 | int insert(SalaryDetail record); 17 | 18 | int insertSelective(SalaryDetail record); 19 | 20 | SalaryDetail selectByPrimaryKey(Integer id); 21 | 22 | int updateByPrimaryKeySelective(SalaryDetail record); 23 | 24 | int updateByPrimaryKey(SalaryDetail record); 25 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/mapper/SalaryRecordMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.mapper; 2 | 3 | 4 | import com.bank.project.oa.domain.SalaryRecord; 5 | 6 | import java.util.List; 7 | 8 | public interface SalaryRecordMapper { 9 | int deleteByPrimaryKey(Long id); 10 | int deleteByIds(String[] ids); 11 | 12 | int insertSelective(SalaryRecord record); 13 | 14 | SalaryRecord selectByPrimaryKey(Long id); 15 | 16 | List selectByExample(SalaryRecord record); 17 | 18 | int updateByPrimaryKeySelective(SalaryRecord record); 19 | 20 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/mapper/UserDocMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.mapper; 2 | 3 | 4 | import com.bank.project.oa.domain.Contract; 5 | import com.bank.project.oa.domain.UserDoc; 6 | 7 | import java.util.List; 8 | 9 | public interface UserDocMapper { 10 | int deleteByPrimaryKey(Long id); 11 | 12 | int deleteByIds(String[] ids); 13 | 14 | List selectByExample(UserDoc record); 15 | 16 | int insertSelective(UserDoc record); 17 | 18 | UserDoc selectByPrimaryKey(Long id); 19 | 20 | int updateByPrimaryKeySelective(UserDoc record); 21 | 22 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/mapper/UserPlanMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.mapper; 2 | 3 | 4 | import com.bank.project.oa.domain.SalaryRecord; 5 | import com.bank.project.oa.domain.UserPlan; 6 | 7 | import java.util.List; 8 | 9 | public interface UserPlanMapper { 10 | int deleteByPrimaryKey(Long id); 11 | int deleteByIds(String[] ids); 12 | 13 | int insertSelective(UserPlan record); 14 | 15 | UserPlan selectByPrimaryKey(Long id); 16 | 17 | int updateByPrimaryKeySelective(UserPlan record); 18 | 19 | List selectByExample(UserPlan record); 20 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/AssetOperateServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.common.exception.BusinessException; 4 | import com.bank.common.utils.text.Convert; 5 | import com.bank.framework.aspectj.lang.annotation.DataScope; 6 | import com.bank.project.oa.domain.Asset; 7 | import com.bank.project.oa.domain.AssetOperate; 8 | import com.bank.project.oa.mapper.AssetMapper; 9 | import com.bank.project.oa.mapper.AssetOperateMapper; 10 | import org.slf4j.Logger; 11 | import org.slf4j.LoggerFactory; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Service; 14 | import org.springframework.transaction.annotation.Transactional; 15 | 16 | import java.util.List; 17 | 18 | /** 19 | * 业务层处理 20 | * 21 | * @author bank 22 | */ 23 | @Service 24 | public class AssetOperateServiceImpl implements IAssetOperateService { 25 | private static final Logger log = LoggerFactory.getLogger(IAssetOperateService.class); 26 | 27 | @Autowired 28 | private AssetOperateMapper assetMapper; 29 | 30 | /** 31 | * 根据条件分页查询列表 32 | * 33 | * @return 信息集合信息 34 | */ 35 | @Override 36 | @DataScope(deptAlias = "d", userAlias = "u") 37 | public List selectListByAssetId(Long assetId) { 38 | return assetMapper.selectListByAssetId(assetId); 39 | } 40 | 41 | @Override 42 | public List selectList(AssetOperate record) { 43 | return assetMapper.selectList(record); 44 | } 45 | 46 | @Override 47 | public AssetOperate getById(Long id) { 48 | return assetMapper.selectByPrimaryKey(id); 49 | } 50 | 51 | /** 52 | * 新增保存信息 53 | * 54 | * @param user 信息 55 | * @return 结果 56 | */ 57 | @Override 58 | @Transactional 59 | public int insert(AssetOperate user) { 60 | int rows = assetMapper.insertSelective(user); 61 | return rows; 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/BookManageServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.common.exception.BusinessException; 4 | import com.bank.common.utils.text.Convert; 5 | import com.bank.framework.aspectj.lang.annotation.DataScope; 6 | import com.bank.project.oa.domain.BookManage; 7 | import com.bank.project.oa.mapper.BookManageMapper; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | import org.springframework.transaction.annotation.Transactional; 13 | 14 | import java.util.List; 15 | 16 | /** 17 | * 业务层处理 18 | * 19 | * @author bank 20 | */ 21 | @Service 22 | public class BookManageServiceImpl implements IBookManageService { 23 | private static final Logger log = LoggerFactory.getLogger(IBookManageService.class); 24 | 25 | @Autowired 26 | private BookManageMapper bookManageMapper; 27 | 28 | /** 29 | * 根据条件分页查询列表 30 | * 31 | * @param record 信息 32 | * @return 信息集合信息 33 | */ 34 | @Override 35 | @DataScope(deptAlias = "d", userAlias = "u") 36 | public List selectList(BookManage record) { 37 | return bookManageMapper.selectByExample(record); 38 | } 39 | 40 | @Override 41 | public BookManage getById(Long id) { 42 | return bookManageMapper.selectByPrimaryKey(id); 43 | } 44 | 45 | 46 | /** 47 | * 通过ID删除 48 | * 49 | * @param id 50 | * @return 结果 51 | */ 52 | @Override 53 | public int deleteById(Long id) { 54 | return bookManageMapper.deleteByPrimaryKey(id); 55 | } 56 | 57 | /** 58 | * 批量删除信息 59 | * 60 | * @param ids 需要删除的数据ID 61 | * @return 结果 62 | */ 63 | @Override 64 | public int deleteByIds(String ids) throws BusinessException { 65 | return bookManageMapper.deleteByIds(Convert.toStrArray(ids)); 66 | } 67 | 68 | /** 69 | * 新增保存信息 70 | * 71 | * @param user 信息 72 | * @return 结果 73 | */ 74 | @Override 75 | @Transactional 76 | public int insert(BookManage user) { 77 | int rows = bookManageMapper.insertSelective(user); 78 | return rows; 79 | } 80 | 81 | /** 82 | * 修改保存信息 83 | * 84 | * @param record 信息 85 | * @return 结果 86 | */ 87 | @Override 88 | @Transactional 89 | public int update(BookManage record) { 90 | return bookManageMapper.updateByPrimaryKeySelective(record); 91 | 92 | } 93 | 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/BookOperateServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.framework.aspectj.lang.annotation.DataScope; 4 | import com.bank.project.oa.domain.BookOperate; 5 | import com.bank.project.oa.mapper.BookOperateMapper; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | import org.springframework.transaction.annotation.Transactional; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | * 业务层处理 16 | * 17 | * @author bank 18 | */ 19 | @Service 20 | public class BookOperateServiceImpl implements IBookOperateService { 21 | private static final Logger log = LoggerFactory.getLogger(IBookOperateService.class); 22 | 23 | @Autowired 24 | private BookOperateMapper bookOperateMapper; 25 | 26 | /** 27 | * 根据条件分页查询列表 28 | * 29 | * @param record 信息 30 | * @return 信息集合信息 31 | */ 32 | @Override 33 | @DataScope(deptAlias = "d", userAlias = "u") 34 | public List selectList(BookOperate record) { 35 | return bookOperateMapper.selectByExample(record); 36 | } 37 | 38 | @Override 39 | public BookOperate getById(Long id) { 40 | return bookOperateMapper.selectByPrimaryKey(id); 41 | } 42 | 43 | /** 44 | * 新增保存信息 45 | * 46 | * @param user 信息 47 | * @return 结果 48 | */ 49 | @Override 50 | @Transactional 51 | public int insert(BookOperate user) { 52 | int rows = bookOperateMapper.insertSelective(user); 53 | return rows; 54 | } 55 | 56 | /** 57 | * 修改保存信息 58 | * 59 | * @param record 信息 60 | * @return 结果 61 | */ 62 | @Override 63 | @Transactional 64 | public int update(BookOperate record) { 65 | return bookOperateMapper.updateByPrimaryKeySelective(record); 66 | 67 | } 68 | 69 | 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/ContractServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.common.exception.BusinessException; 4 | import com.bank.common.utils.text.Convert; 5 | import com.bank.framework.aspectj.lang.annotation.DataScope; 6 | import com.bank.project.oa.domain.Contract; 7 | import com.bank.project.oa.mapper.ContractMapper; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | import org.springframework.transaction.annotation.Transactional; 13 | 14 | import java.util.List; 15 | 16 | /** 17 | * 业务层处理 18 | * 19 | * @author bank 20 | */ 21 | @Service 22 | public class ContractServiceImpl implements IContractService { 23 | private static final Logger log = LoggerFactory.getLogger(IBookManageService.class); 24 | 25 | @Autowired 26 | private ContractMapper contractMapper; 27 | 28 | /** 29 | * 根据条件分页查询列表 30 | * 31 | * @param record 信息 32 | * @return 信息集合信息 33 | */ 34 | @Override 35 | @DataScope(deptAlias = "d", userAlias = "u") 36 | public List selectList(Contract record) { 37 | return contractMapper.selectByExample(record); 38 | } 39 | 40 | @Override 41 | public Contract getById(Long id) { 42 | return contractMapper.selectByPrimaryKey(id); 43 | } 44 | 45 | 46 | /** 47 | * 通过ID删除 48 | * 49 | * @param id 50 | * @return 结果 51 | */ 52 | @Override 53 | public int deleteById(Long id) { 54 | return contractMapper.deleteByPrimaryKey(id); 55 | } 56 | 57 | /** 58 | * 批量删除信息 59 | * 60 | * @param ids 需要删除的数据ID 61 | * @return 结果 62 | */ 63 | @Override 64 | public int deleteByIds(String ids) throws BusinessException { 65 | return contractMapper.deleteByIds(Convert.toStrArray(ids)); 66 | } 67 | 68 | /** 69 | * 新增保存信息 70 | * 71 | * @param user 信息 72 | * @return 结果 73 | */ 74 | @Override 75 | @Transactional 76 | public int insert(Contract user) { 77 | int rows = contractMapper.insertSelective(user); 78 | return rows; 79 | } 80 | 81 | /** 82 | * 修改保存信息 83 | * 84 | * @param record 信息 85 | * @return 结果 86 | */ 87 | @Override 88 | @Transactional 89 | public int update(Contract record) { 90 | return contractMapper.updateByPrimaryKeySelective(record); 91 | 92 | } 93 | 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/IAddressBookService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.project.oa.domain.AddressBook; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 业务层 9 | * 10 | * @author bank 11 | */ 12 | public interface IAddressBookService { 13 | /** 14 | * 根据条件分页查询列表 15 | * 16 | * @param record 信息 17 | * @return 信息集合信息 18 | */ 19 | List selectList(AddressBook record); 20 | 21 | AddressBook getById(Long id); 22 | 23 | 24 | /** 25 | * 通过ID删除 26 | * 27 | * @param id ID 28 | * @return 结果 29 | */ 30 | int deleteById(Long id); 31 | 32 | /** 33 | * 批量删除信息 34 | * 35 | * @param ids 需要删除的数据ID 36 | * @return 结果 37 | * @throws Exception 异常 38 | */ 39 | int deleteByIds(String ids) throws Exception; 40 | 41 | /** 42 | * 保存信息 43 | * 44 | * @param recore 信息 45 | * @return 结果 46 | */ 47 | int insert(AddressBook recore); 48 | 49 | /** 50 | * 修改详细信息 51 | * 52 | * @param recore 信息 53 | * @return 结果 54 | */ 55 | int update(AddressBook recore); 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/IAssetOperateService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.project.oa.domain.Asset; 4 | import com.bank.project.oa.domain.AssetOperate; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 业务层 10 | * 11 | * @author bank 12 | */ 13 | public interface IAssetOperateService { 14 | /** 15 | * 根据条件分页查询列表 16 | * 17 | * @return 信息集合信息 18 | */ 19 | List selectListByAssetId(Long assetId); 20 | 21 | List selectList(AssetOperate record); 22 | 23 | AssetOperate getById(Long id); 24 | 25 | 26 | /** 27 | * 保存信息 28 | * 29 | * @param asset 信息 30 | * @return 结果 31 | */ 32 | int insert(AssetOperate asset); 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/IAssetService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.bank.project.oa.domain.Asset; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 业务层 10 | * 11 | * @author bank 12 | */ 13 | public interface IAssetService { 14 | /** 15 | * 根据条件分页查询列表 16 | * 17 | * @param asset 信息 18 | * @return 信息集合信息 19 | */ 20 | List selectList(Asset asset); 21 | 22 | Asset getById(Long id); 23 | 24 | 25 | /** 26 | * 通过ID删除 27 | * 28 | * @param userId ID 29 | * @return 结果 30 | */ 31 | int deleteById(String userId); 32 | 33 | /** 34 | * 批量删除信息 35 | * 36 | * @param ids 需要删除的数据ID 37 | * @return 结果 38 | * @throws Exception 异常 39 | */ 40 | int deleteByIds(String ids) throws Exception; 41 | 42 | /** 43 | * 保存信息 44 | * 45 | * @param asset 信息 46 | * @return 结果 47 | */ 48 | int insert(Asset asset); 49 | 50 | /** 51 | * 修改详细信息 52 | * 53 | * @param asset 信息 54 | * @return 结果 55 | */ 56 | int update(Asset asset); 57 | 58 | JSONObject stat(); 59 | 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/IBankNoticeService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.project.oa.domain.Asset; 4 | import com.bank.project.oa.domain.BankNotice; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 业务层 10 | * 11 | * @author bank 12 | */ 13 | public interface IBankNoticeService { 14 | /** 15 | * 根据条件分页查询列表 16 | * 17 | * @param asset 信息 18 | * @return 信息集合信息 19 | */ 20 | List selectList(BankNotice asset); 21 | 22 | BankNotice getById(Long id); 23 | 24 | 25 | /** 26 | * 通过ID删除 27 | * 28 | * @param userId ID 29 | * @return 结果 30 | */ 31 | int deleteById(String userId); 32 | 33 | /** 34 | * 批量删除信息 35 | * 36 | * @param ids 需要删除的数据ID 37 | * @return 结果 38 | * @throws Exception 异常 39 | */ 40 | int deleteByIds(String ids) throws Exception; 41 | 42 | /** 43 | * 保存信息 44 | * 45 | * @param recore 信息 46 | * @return 结果 47 | */ 48 | int insert(BankNotice recore); 49 | 50 | /** 51 | * 修改详细信息 52 | * 53 | * @param recore 信息 54 | * @return 结果 55 | */ 56 | int update(BankNotice recore); 57 | 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/IBookManageService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.project.oa.domain.BookManage; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 业务层 9 | * 10 | * @author bank 11 | */ 12 | public interface IBookManageService { 13 | /** 14 | * 根据条件分页查询列表 15 | * 16 | * @param record 信息 17 | * @return 信息集合信息 18 | */ 19 | List selectList(BookManage record); 20 | 21 | BookManage getById(Long id); 22 | 23 | 24 | /** 25 | * 通过ID删除 26 | * 27 | * @param userId ID 28 | * @return 结果 29 | */ 30 | int deleteById(Long userId); 31 | 32 | /** 33 | * 批量删除信息 34 | * 35 | * @param ids 需要删除的数据ID 36 | * @return 结果 37 | * @throws Exception 异常 38 | */ 39 | int deleteByIds(String ids) throws Exception; 40 | 41 | /** 42 | * 保存信息 43 | * 44 | * @param recore 信息 45 | * @return 结果 46 | */ 47 | int insert(BookManage recore); 48 | 49 | /** 50 | * 修改详细信息 51 | * 52 | * @param recore 信息 53 | * @return 结果 54 | */ 55 | int update(BookManage recore); 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/IBookOperateService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.project.oa.domain.BookOperate; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 业务层 9 | * 10 | * @author bank 11 | */ 12 | public interface IBookOperateService { 13 | /** 14 | * 根据条件分页查询列表 15 | * 16 | * @param record 信息 17 | * @return 信息集合信息 18 | */ 19 | List selectList(BookOperate record); 20 | 21 | BookOperate getById(Long id); 22 | 23 | 24 | 25 | /** 26 | * 保存信息 27 | * 28 | * @param recore 信息 29 | * @return 结果 30 | */ 31 | int insert(BookOperate recore); 32 | 33 | /** 34 | * 修改详细信息 35 | * 36 | * @param recore 信息 37 | * @return 结果 38 | */ 39 | int update(BookOperate recore); 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/IContractService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.project.oa.domain.Contract; 4 | import com.bank.project.oa.domain.Contract; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 业务层 10 | * 11 | * @author bank 12 | */ 13 | public interface IContractService { 14 | /** 15 | * 根据条件分页查询列表 16 | * 17 | * @param record 信息 18 | * @return 信息集合信息 19 | */ 20 | List selectList(Contract record); 21 | 22 | Contract getById(Long id); 23 | 24 | 25 | /** 26 | * 通过ID删除 27 | * 28 | * @param userId ID 29 | * @return 结果 30 | */ 31 | int deleteById(Long userId); 32 | 33 | /** 34 | * 批量删除信息 35 | * 36 | * @param ids 需要删除的数据ID 37 | * @return 结果 38 | * @throws Exception 异常 39 | */ 40 | int deleteByIds(String ids) throws Exception; 41 | 42 | /** 43 | * 保存信息 44 | * 45 | * @param recore 信息 46 | * @return 结果 47 | */ 48 | int insert(Contract recore); 49 | 50 | /** 51 | * 修改详细信息 52 | * 53 | * @param recore 信息 54 | * @return 结果 55 | */ 56 | int update(Contract recore); 57 | 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/IMeetManageService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.project.oa.domain.MeetManage; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 业务层 9 | * 10 | * @author bank 11 | */ 12 | public interface IMeetManageService { 13 | /** 14 | * 根据条件分页查询列表 15 | * 16 | * @param record 信息 17 | * @return 信息集合信息 18 | */ 19 | List selectList(MeetManage record); 20 | 21 | MeetManage getById(Long id); 22 | 23 | 24 | /** 25 | * 通过ID删除 26 | * 27 | * @param userId ID 28 | * @return 结果 29 | */ 30 | int deleteById(Long userId); 31 | 32 | /** 33 | * 批量删除信息 34 | * 35 | * @param ids 需要删除的数据ID 36 | * @return 结果 37 | * @throws Exception 异常 38 | */ 39 | int deleteByIds(String ids) throws Exception; 40 | 41 | /** 42 | * 保存信息 43 | * 44 | * @param recore 信息 45 | * @return 结果 46 | */ 47 | int insert(MeetManage recore); 48 | 49 | /** 50 | * 修改详细信息 51 | * 52 | * @param recore 信息 53 | * @return 结果 54 | */ 55 | int update(MeetManage recore); 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/ISalaryRecordService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.project.oa.domain.SalaryRecord; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 业务层 9 | * 10 | * @author bank 11 | */ 12 | public interface ISalaryRecordService { 13 | /** 14 | * 根据条件分页查询列表 15 | * 16 | * @param record 信息 17 | * @return 信息集合信息 18 | */ 19 | List selectList(SalaryRecord record); 20 | 21 | SalaryRecord getById(Long id); 22 | 23 | 24 | /** 25 | * 通过ID删除 26 | * 27 | * @param userId ID 28 | * @return 结果 29 | */ 30 | int deleteById(Long userId); 31 | 32 | /** 33 | * 批量删除信息 34 | * 35 | * @param ids 需要删除的数据ID 36 | * @return 结果 37 | * @throws Exception 异常 38 | */ 39 | int deleteByIds(String ids) throws Exception; 40 | 41 | /** 42 | * 保存信息 43 | * 44 | * @param recore 信息 45 | * @return 结果 46 | */ 47 | int insert(SalaryRecord recore); 48 | 49 | /** 50 | * 修改详细信息 51 | * 52 | * @param recore 信息 53 | * @return 结果 54 | */ 55 | int update(SalaryRecord recore); 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/IUserDocService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.project.oa.domain.UserDoc; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 业务层 9 | * 10 | * @author bank 11 | */ 12 | public interface IUserDocService { 13 | /** 14 | * 根据条件分页查询列表 15 | * 16 | * @param record 信息 17 | * @return 信息集合信息 18 | */ 19 | List selectList(UserDoc record); 20 | 21 | UserDoc getById(Long id); 22 | 23 | 24 | /** 25 | * 通过ID删除 26 | * 27 | * @param userId ID 28 | * @return 结果 29 | */ 30 | int deleteById(Long userId); 31 | 32 | /** 33 | * 批量删除信息 34 | * 35 | * @param ids 需要删除的数据ID 36 | * @return 结果 37 | * @throws Exception 异常 38 | */ 39 | int deleteByIds(String ids) throws Exception; 40 | 41 | /** 42 | * 保存信息 43 | * 44 | * @param recore 信息 45 | * @return 结果 46 | */ 47 | int insert(UserDoc recore); 48 | 49 | /** 50 | * 修改详细信息 51 | * 52 | * @param recore 信息 53 | * @return 结果 54 | */ 55 | int update(UserDoc recore); 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/IUserPlanService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.project.oa.domain.UserPlan; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 业务层 9 | * 10 | * @author bank 11 | */ 12 | public interface IUserPlanService { 13 | /** 14 | * 根据条件分页查询列表 15 | * 16 | * @param record 信息 17 | * @return 信息集合信息 18 | */ 19 | List selectList(UserPlan record); 20 | 21 | UserPlan getById(Long id); 22 | 23 | 24 | /** 25 | * 通过ID删除 26 | * 27 | * @param userId ID 28 | * @return 结果 29 | */ 30 | int deleteById(Long userId); 31 | 32 | /** 33 | * 批量删除信息 34 | * 35 | * @param ids 需要删除的数据ID 36 | * @return 结果 37 | * @throws Exception 异常 38 | */ 39 | int deleteByIds(String ids) throws Exception; 40 | 41 | /** 42 | * 保存信息 43 | * 44 | * @param recore 信息 45 | * @return 结果 46 | */ 47 | int insert(UserPlan recore); 48 | 49 | /** 50 | * 修改详细信息 51 | * 52 | * @param recore 信息 53 | * @return 结果 54 | */ 55 | int update(UserPlan recore); 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/MeetManageServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.common.exception.BusinessException; 4 | import com.bank.common.utils.text.Convert; 5 | import com.bank.framework.aspectj.lang.annotation.DataScope; 6 | import com.bank.project.oa.domain.MeetManage; 7 | import com.bank.project.oa.mapper.MeetManageMapper; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | import org.springframework.transaction.annotation.Transactional; 13 | 14 | import java.util.List; 15 | 16 | /** 17 | * 业务层处理 18 | * 19 | * @author bank 20 | */ 21 | @Service 22 | public class MeetManageServiceImpl implements IMeetManageService { 23 | private static final Logger log = LoggerFactory.getLogger(IMeetManageService.class); 24 | 25 | @Autowired 26 | private MeetManageMapper meetManageMapper; 27 | 28 | /** 29 | * 根据条件分页查询列表 30 | * 31 | * @param record 信息 32 | * @return 信息集合信息 33 | */ 34 | @Override 35 | @DataScope(deptAlias = "d", userAlias = "u") 36 | public List selectList(MeetManage record) { 37 | return meetManageMapper.selectByExample(record); 38 | } 39 | 40 | @Override 41 | public MeetManage getById(Long id) { 42 | return meetManageMapper.selectByPrimaryKey(id); 43 | } 44 | 45 | 46 | /** 47 | * 通过ID删除 48 | * 49 | * @param id 50 | * @return 结果 51 | */ 52 | @Override 53 | public int deleteById(Long id) { 54 | return meetManageMapper.deleteByPrimaryKey(id); 55 | } 56 | 57 | /** 58 | * 批量删除信息 59 | * 60 | * @param ids 需要删除的数据ID 61 | * @return 结果 62 | */ 63 | @Override 64 | public int deleteByIds(String ids) throws BusinessException { 65 | return meetManageMapper.deleteByIds(Convert.toStrArray(ids)); 66 | } 67 | 68 | /** 69 | * 新增保存信息 70 | * 71 | * @param user 信息 72 | * @return 结果 73 | */ 74 | @Override 75 | @Transactional 76 | public int insert(MeetManage user) { 77 | int rows = meetManageMapper.insertSelective(user); 78 | return rows; 79 | } 80 | 81 | /** 82 | * 修改保存信息 83 | * 84 | * @param record 信息 85 | * @return 结果 86 | */ 87 | @Override 88 | @Transactional 89 | public int update(MeetManage record) { 90 | return meetManageMapper.updateByPrimaryKeySelective(record); 91 | 92 | } 93 | 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/SalaryRecordServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.common.exception.BusinessException; 4 | import com.bank.common.utils.text.Convert; 5 | import com.bank.framework.aspectj.lang.annotation.DataScope; 6 | import com.bank.project.oa.domain.SalaryRecord; 7 | import com.bank.project.oa.mapper.SalaryRecordMapper; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | import org.springframework.transaction.annotation.Transactional; 13 | 14 | import java.util.List; 15 | 16 | /** 17 | * 业务层处理 18 | * 19 | * @author bank 20 | */ 21 | @Service 22 | public class SalaryRecordServiceImpl implements ISalaryRecordService { 23 | private static final Logger log = LoggerFactory.getLogger(ISalaryRecordService.class); 24 | 25 | @Autowired 26 | private SalaryRecordMapper salaryRecordMapper; 27 | 28 | /** 29 | * 根据条件分页查询列表 30 | * 31 | * @param record 信息 32 | * @return 信息集合信息 33 | */ 34 | @Override 35 | @DataScope(deptAlias = "d", userAlias = "u") 36 | public List selectList(SalaryRecord record) { 37 | return salaryRecordMapper.selectByExample(record); 38 | } 39 | 40 | @Override 41 | public SalaryRecord getById(Long id) { 42 | return salaryRecordMapper.selectByPrimaryKey(id); 43 | } 44 | 45 | @Override 46 | public int deleteById(Long userId) { 47 | return salaryRecordMapper.deleteByPrimaryKey(userId); 48 | } 49 | 50 | 51 | /** 52 | * 批量删除信息 53 | * 54 | * @param ids 需要删除的数据ID 55 | * @return 结果 56 | */ 57 | @Override 58 | public int deleteByIds(String ids) throws BusinessException { 59 | return salaryRecordMapper.deleteByIds(Convert.toStrArray(ids)); 60 | } 61 | 62 | /** 63 | * 新增保存信息 64 | * 65 | * @param user 信息 66 | * @return 结果 67 | */ 68 | @Override 69 | @Transactional 70 | public int insert(SalaryRecord user) { 71 | int rows = salaryRecordMapper.insertSelective(user); 72 | return rows; 73 | } 74 | 75 | /** 76 | * 修改保存信息 77 | * 78 | * @param record 信息 79 | * @return 结果 80 | */ 81 | @Override 82 | @Transactional 83 | public int update(SalaryRecord record) { 84 | return salaryRecordMapper.updateByPrimaryKeySelective(record); 85 | 86 | } 87 | 88 | 89 | } 90 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/UserDocServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.common.exception.BusinessException; 4 | import com.bank.common.utils.text.Convert; 5 | import com.bank.framework.aspectj.lang.annotation.DataScope; 6 | import com.bank.project.oa.domain.UserDoc; 7 | import com.bank.project.oa.mapper.UserDocMapper; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | import org.springframework.transaction.annotation.Transactional; 13 | 14 | import java.util.List; 15 | 16 | /** 17 | * 业务层处理 18 | * 19 | * @author bank 20 | */ 21 | @Service 22 | public class UserDocServiceImpl implements IUserDocService { 23 | private static final Logger log = LoggerFactory.getLogger(IUserDocService.class); 24 | 25 | @Autowired 26 | private UserDocMapper userDocMapper; 27 | 28 | /** 29 | * 根据条件分页查询列表 30 | * 31 | * @param record 信息 32 | * @return 信息集合信息 33 | */ 34 | @Override 35 | @DataScope(deptAlias = "d", userAlias = "u") 36 | public List selectList(UserDoc record) { 37 | return userDocMapper.selectByExample(record); 38 | } 39 | 40 | @Override 41 | public UserDoc getById(Long id) { 42 | return userDocMapper.selectByPrimaryKey(id); 43 | } 44 | 45 | 46 | /** 47 | * 通过ID删除 48 | * 49 | * @param id 50 | * @return 结果 51 | */ 52 | @Override 53 | public int deleteById(Long id) { 54 | return userDocMapper.deleteByPrimaryKey(id); 55 | } 56 | 57 | /** 58 | * 批量删除信息 59 | * 60 | * @param ids 需要删除的数据ID 61 | * @return 结果 62 | */ 63 | @Override 64 | public int deleteByIds(String ids) throws BusinessException { 65 | return userDocMapper.deleteByIds(Convert.toStrArray(ids)); 66 | } 67 | 68 | /** 69 | * 新增保存信息 70 | * 71 | * @param user 信息 72 | * @return 结果 73 | */ 74 | @Override 75 | @Transactional 76 | public int insert(UserDoc user) { 77 | int rows = userDocMapper.insertSelective(user); 78 | return rows; 79 | } 80 | 81 | /** 82 | * 修改保存信息 83 | * 84 | * @param record 信息 85 | * @return 结果 86 | */ 87 | @Override 88 | @Transactional 89 | public int update(UserDoc record) { 90 | return userDocMapper.updateByPrimaryKeySelective(record); 91 | 92 | } 93 | 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/oa/service/UserPlanServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.oa.service; 2 | 3 | import com.bank.common.exception.BusinessException; 4 | import com.bank.common.utils.text.Convert; 5 | import com.bank.framework.aspectj.lang.annotation.DataScope; 6 | import com.bank.project.oa.domain.UserPlan; 7 | import com.bank.project.oa.mapper.UserPlanMapper; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | import org.springframework.transaction.annotation.Transactional; 13 | 14 | import java.util.List; 15 | 16 | /** 17 | * 业务层处理 18 | * 19 | * @author bank 20 | */ 21 | @Service 22 | public class UserPlanServiceImpl implements IUserPlanService { 23 | private static final Logger log = LoggerFactory.getLogger(IUserPlanService.class); 24 | 25 | @Autowired 26 | private UserPlanMapper userPlanMapper; 27 | 28 | /** 29 | * 根据条件分页查询列表 30 | * 31 | * @param record 信息 32 | * @return 信息集合信息 33 | */ 34 | @Override 35 | @DataScope(deptAlias = "d", userAlias = "u") 36 | public List selectList(UserPlan record) { 37 | return userPlanMapper.selectByExample(record); 38 | } 39 | 40 | @Override 41 | public UserPlan getById(Long id) { 42 | return userPlanMapper.selectByPrimaryKey(id); 43 | } 44 | 45 | 46 | /** 47 | * 通过ID删除 48 | * 49 | * @param id 50 | * @return 结果 51 | */ 52 | @Override 53 | public int deleteById(Long id) { 54 | return userPlanMapper.deleteByPrimaryKey(id); 55 | } 56 | 57 | /** 58 | * 批量删除信息 59 | * 60 | * @param ids 需要删除的数据ID 61 | * @return 结果 62 | */ 63 | @Override 64 | public int deleteByIds(String ids) throws BusinessException { 65 | return userPlanMapper.deleteByIds(Convert.toStrArray(ids)); 66 | } 67 | 68 | /** 69 | * 新增保存信息 70 | * 71 | * @param user 信息 72 | * @return 结果 73 | */ 74 | @Override 75 | @Transactional 76 | public int insert(UserPlan user) { 77 | int rows = userPlanMapper.insertSelective(user); 78 | return rows; 79 | } 80 | 81 | /** 82 | * 修改保存信息 83 | * 84 | * @param record 信息 85 | * @return 结果 86 | */ 87 | @Override 88 | @Transactional 89 | public int update(UserPlan record) { 90 | return userPlanMapper.updateByPrimaryKeySelective(record); 91 | 92 | } 93 | 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/config/mapper/ConfigMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.config.mapper; 2 | 3 | import com.bank.project.system.config.domain.Config; 4 | import java.util.List; 5 | 6 | /** 7 | * 参数配置 数据层 8 | * 9 | * @author bank 10 | */ 11 | public interface ConfigMapper 12 | { 13 | /** 14 | * 查询参数配置信息 15 | * 16 | * @param config 参数配置信息 17 | * @return 参数配置信息 18 | */ 19 | public Config selectConfig(Config config); 20 | 21 | /** 22 | * 查询参数配置列表 23 | * 24 | * @param config 参数配置信息 25 | * @return 参数配置集合 26 | */ 27 | public List selectConfigList(Config config); 28 | 29 | /** 30 | * 根据键名查询参数配置信息 31 | * 32 | * @param configKey 参数键名 33 | * @return 参数配置信息 34 | */ 35 | public Config checkConfigKeyUnique(String configKey); 36 | 37 | /** 38 | * 新增参数配置 39 | * 40 | * @param config 参数配置信息 41 | * @return 结果 42 | */ 43 | public int insertConfig(Config config); 44 | 45 | /** 46 | * 修改参数配置 47 | * 48 | * @param config 参数配置信息 49 | * @return 结果 50 | */ 51 | public int updateConfig(Config config); 52 | 53 | /** 54 | * 批量删除参数配置 55 | * 56 | * @param configIds 需要删除的数据ID 57 | * @return 结果 58 | */ 59 | public int deleteConfigByIds(String[] configIds); 60 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/config/service/IConfigService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.config.service; 2 | 3 | import com.bank.project.system.config.domain.Config; 4 | import java.util.List; 5 | 6 | /** 7 | * 参数配置 服务层 8 | * 9 | * @author bank 10 | */ 11 | public interface IConfigService 12 | { 13 | /** 14 | * 查询参数配置信息 15 | * 16 | * @param configId 参数配置ID 17 | * @return 参数配置信息 18 | */ 19 | public Config selectConfigById(Long configId); 20 | 21 | /** 22 | * 根据键名查询参数配置信息 23 | * 24 | * @param configKey 参数键名 25 | * @return 参数键值 26 | */ 27 | public String selectConfigByKey(String configKey); 28 | 29 | /** 30 | * 查询参数配置列表 31 | * 32 | * @param config 参数配置信息 33 | * @return 参数配置集合 34 | */ 35 | public List selectConfigList(Config config); 36 | 37 | /** 38 | * 新增参数配置 39 | * 40 | * @param config 参数配置信息 41 | * @return 结果 42 | */ 43 | public int insertConfig(Config config); 44 | 45 | /** 46 | * 修改参数配置 47 | * 48 | * @param config 参数配置信息 49 | * @return 结果 50 | */ 51 | public int updateConfig(Config config); 52 | 53 | /** 54 | * 批量删除参数配置信息 55 | * 56 | * @param ids 需要删除的数据ID 57 | * @return 结果 58 | */ 59 | public int deleteConfigByIds(String ids); 60 | 61 | /** 62 | * 校验参数键名是否唯一 63 | * 64 | * @param config 参数信息 65 | * @return 结果 66 | */ 67 | public String checkConfigKeyUnique(Config config); 68 | } 69 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/dept/mapper/DeptMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.dept.mapper; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import com.bank.project.system.dept.domain.Dept; 6 | 7 | /** 8 | * 部门管理 数据层 9 | * 10 | * @author bank 11 | */ 12 | public interface DeptMapper 13 | { 14 | /** 15 | * 查询部门人数 16 | * 17 | * @param dept 部门信息 18 | * @return 结果 19 | */ 20 | public int selectDeptCount(Dept dept); 21 | 22 | /** 23 | * 查询部门是否存在用户 24 | * 25 | * @param deptId 部门ID 26 | * @return 结果 27 | */ 28 | public int checkDeptExistUser(Long deptId); 29 | 30 | /** 31 | * 查询部门管理数据 32 | * 33 | * @param dept 部门信息 34 | * @return 部门信息集合 35 | */ 36 | public List selectDeptList(Dept dept); 37 | 38 | /** 39 | * 删除部门管理信息 40 | * 41 | * @param deptId 部门ID 42 | * @return 结果 43 | */ 44 | public int deleteDeptById(Long deptId); 45 | 46 | /** 47 | * 新增部门信息 48 | * 49 | * @param dept 部门信息 50 | * @return 结果 51 | */ 52 | public int insertDept(Dept dept); 53 | 54 | /** 55 | * 修改部门信息 56 | * 57 | * @param dept 部门信息 58 | * @return 结果 59 | */ 60 | public int updateDept(Dept dept); 61 | 62 | /** 63 | * 修改子元素关系 64 | * 65 | * @param depts 子元素 66 | * @return 结果 67 | */ 68 | public int updateDeptChildren(@Param("depts") List depts); 69 | 70 | /** 71 | * 根据部门ID查询信息 72 | * 73 | * @param deptId 部门ID 74 | * @return 部门信息 75 | */ 76 | public Dept selectDeptById(Long deptId); 77 | 78 | /** 79 | * 校验部门名称是否唯一 80 | * 81 | * @param deptName 部门名称 82 | * @param parentId 父部门ID 83 | * @return 结果 84 | */ 85 | public Dept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId); 86 | 87 | /** 88 | * 根据角色ID查询部门 89 | * 90 | * @param roleId 角色ID 91 | * @return 部门列表 92 | */ 93 | public List selectRoleDeptTree(Long roleId); 94 | 95 | /** 96 | * 修改所在部门的父级部门状态 97 | * 98 | * @param dept 部门 99 | */ 100 | public void updateDeptStatus(Dept dept); 101 | 102 | /** 103 | * 根据ID查询所有子部门 104 | * 105 | * @param deptId 部门ID 106 | * @return 部门列表 107 | */ 108 | public List selectChildrenDeptById(Long deptId); 109 | } 110 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/dept/service/IDeptService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.dept.service; 2 | 3 | import java.util.List; 4 | import com.bank.framework.web.domain.Ztree; 5 | import com.bank.project.system.dept.domain.Dept; 6 | import com.bank.project.system.role.domain.Role; 7 | 8 | /** 9 | * 部门管理 服务层 10 | * 11 | * @author bank 12 | */ 13 | public interface IDeptService 14 | { 15 | /** 16 | * 查询部门管理数据 17 | * 18 | * @param dept 部门信息 19 | * @return 部门信息集合 20 | */ 21 | public List selectDeptList(Dept dept); 22 | 23 | /** 24 | * 查询部门管理树 25 | * 26 | * @param dept 部门信息 27 | * @return 所有部门信息 28 | */ 29 | public List selectDeptTree(Dept dept); 30 | 31 | /** 32 | * 根据角色ID查询菜单 33 | * 34 | * @param role 角色对象 35 | * @return 菜单列表 36 | */ 37 | public List roleDeptTreeData(Role role); 38 | 39 | /** 40 | * 查询部门人数 41 | * 42 | * @param parentId 父部门ID 43 | * @return 结果 44 | */ 45 | public int selectDeptCount(Long parentId); 46 | 47 | /** 48 | * 查询部门是否存在用户 49 | * 50 | * @param deptId 部门ID 51 | * @return 结果 true 存在 false 不存在 52 | */ 53 | public boolean checkDeptExistUser(Long deptId); 54 | 55 | /** 56 | * 删除部门管理信息 57 | * 58 | * @param deptId 部门ID 59 | * @return 结果 60 | */ 61 | public int deleteDeptById(Long deptId); 62 | 63 | /** 64 | * 新增保存部门信息 65 | * 66 | * @param dept 部门信息 67 | * @return 结果 68 | */ 69 | public int insertDept(Dept dept); 70 | 71 | /** 72 | * 修改保存部门信息 73 | * 74 | * @param dept 部门信息 75 | * @return 结果 76 | */ 77 | public int updateDept(Dept dept); 78 | 79 | /** 80 | * 根据部门ID查询信息 81 | * 82 | * @param deptId 部门ID 83 | * @return 部门信息 84 | */ 85 | public Dept selectDeptById(Long deptId); 86 | 87 | /** 88 | * 校验部门名称是否唯一 89 | * 90 | * @param dept 部门信息 91 | * @return 结果 92 | */ 93 | public String checkDeptNameUnique(Dept dept); 94 | } 95 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/dict/mapper/DictDataMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.dict.mapper; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import com.bank.project.system.dict.domain.DictData; 6 | 7 | /** 8 | * 字典表 数据层 9 | * 10 | * @author bank 11 | */ 12 | public interface DictDataMapper 13 | { 14 | /** 15 | * 根据条件分页查询字典数据 16 | * 17 | * @param dictData 字典数据信息 18 | * @return 字典数据集合信息 19 | */ 20 | public List selectDictDataList(DictData dictData); 21 | 22 | /** 23 | * 根据字典类型查询字典数据 24 | * 25 | * @param dictType 字典类型 26 | * @return 字典数据集合信息 27 | */ 28 | public List selectDictDataByType(String dictType); 29 | 30 | /** 31 | * 根据字典类型和字典键值查询字典数据信息 32 | * 33 | * @param dictType 字典类型 34 | * @param dictValue 字典键值 35 | * @return 字典标签 36 | */ 37 | public String selectDictLabel(@Param("dictType") String dictType, @Param("dictValue") String dictValue); 38 | 39 | /** 40 | * 根据字典数据ID查询信息 41 | * 42 | * @param dictCode 字典数据ID 43 | * @return 字典数据 44 | */ 45 | public DictData selectDictDataById(Long dictCode); 46 | 47 | /** 48 | * 查询字典数据 49 | * 50 | * @param dictType 字典类型 51 | * @return 字典数据 52 | */ 53 | public int countDictDataByType(String dictType); 54 | 55 | /** 56 | * 通过字典ID删除字典数据信息 57 | * 58 | * @param dictCode 字典数据ID 59 | * @return 结果 60 | */ 61 | public int deleteDictDataById(Long dictCode); 62 | 63 | /** 64 | * 批量删除字典数据 65 | * 66 | * @param ids 需要删除的数据 67 | * @return 结果 68 | */ 69 | public int deleteDictDataByIds(String[] ids); 70 | 71 | /** 72 | * 新增字典数据信息 73 | * 74 | * @param dictData 字典数据信息 75 | * @return 结果 76 | */ 77 | public int insertDictData(DictData dictData); 78 | 79 | /** 80 | * 修改字典数据信息 81 | * 82 | * @param dictData 字典数据信息 83 | * @return 结果 84 | */ 85 | public int updateDictData(DictData dictData); 86 | 87 | /** 88 | * 同步修改字典类型 89 | * 90 | * @param oldDictType 旧字典类型 91 | * @param newDictType 新旧字典类型 92 | * @return 结果 93 | */ 94 | public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType); 95 | } 96 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/dict/mapper/DictTypeMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.dict.mapper; 2 | 3 | import java.util.List; 4 | import com.bank.project.system.dict.domain.DictType; 5 | 6 | /** 7 | * 字典表 数据层 8 | * 9 | * @author bank 10 | */ 11 | public interface DictTypeMapper 12 | { 13 | /** 14 | * 根据条件分页查询字典类型 15 | * 16 | * @param dictType 字典类型信息 17 | * @return 字典类型集合信息 18 | */ 19 | public List selectDictTypeList(DictType dictType); 20 | 21 | /** 22 | * 根据所有字典类型 23 | * 24 | * @return 字典类型集合信息 25 | */ 26 | public List selectDictTypeAll(); 27 | 28 | /** 29 | * 根据字典类型ID查询信息 30 | * 31 | * @param dictId 字典类型ID 32 | * @return 字典类型 33 | */ 34 | public DictType selectDictTypeById(Long dictId); 35 | 36 | /** 37 | * 根据字典类型查询信息 38 | * 39 | * @param dictType 字典类型 40 | * @return 字典类型 41 | */ 42 | public DictType selectDictTypeByType(String dictType); 43 | 44 | /** 45 | * 通过字典ID删除字典信息 46 | * 47 | * @param dictId 字典ID 48 | * @return 结果 49 | */ 50 | public int deleteDictTypeById(Long dictId); 51 | 52 | /** 53 | * 批量删除字典类型 54 | * 55 | * @param ids 需要删除的数据 56 | * @return 结果 57 | */ 58 | public int deleteDictTypeByIds(Long[] ids); 59 | 60 | /** 61 | * 新增字典类型信息 62 | * 63 | * @param dictType 字典类型信息 64 | * @return 结果 65 | */ 66 | public int insertDictType(DictType dictType); 67 | 68 | /** 69 | * 修改字典类型信息 70 | * 71 | * @param dictType 字典类型信息 72 | * @return 结果 73 | */ 74 | public int updateDictType(DictType dictType); 75 | 76 | /** 77 | * 校验字典类型称是否唯一 78 | * 79 | * @param dictType 字典类型 80 | * @return 结果 81 | */ 82 | public DictType checkDictTypeUnique(String dictType); 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/dict/service/IDictDataService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.dict.service; 2 | 3 | import java.util.List; 4 | import com.bank.project.system.dict.domain.DictData; 5 | 6 | /** 7 | * 字典 业务层 8 | * 9 | * @author bank 10 | */ 11 | public interface IDictDataService 12 | { 13 | /** 14 | * 根据条件分页查询字典数据 15 | * 16 | * @param dictData 字典数据信息 17 | * @return 字典数据集合信息 18 | */ 19 | public List selectDictDataList(DictData dictData); 20 | 21 | /** 22 | * 根据字典类型查询字典数据 23 | * 24 | * @param dictType 字典类型 25 | * @return 字典数据集合信息 26 | */ 27 | public List selectDictDataByType(String dictType); 28 | 29 | /** 30 | * 根据字典类型和字典键值查询字典数据信息 31 | * 32 | * @param dictType 字典类型 33 | * @param dictValue 字典键值 34 | * @return 字典标签 35 | */ 36 | public String selectDictLabel(String dictType, String dictValue); 37 | 38 | /** 39 | * 根据字典数据ID查询信息 40 | * 41 | * @param dictCode 字典数据ID 42 | * @return 字典数据 43 | */ 44 | public DictData selectDictDataById(Long dictCode); 45 | 46 | /** 47 | * 通过字典ID删除字典数据信息 48 | * 49 | * @param dictCode 字典数据ID 50 | * @return 结果 51 | */ 52 | public int deleteDictDataById(Long dictCode); 53 | 54 | /** 55 | * 批量删除字典数据 56 | * 57 | * @param ids 需要删除的数据 58 | * @return 结果 59 | */ 60 | public int deleteDictDataByIds(String ids); 61 | 62 | /** 63 | * 新增保存字典数据信息 64 | * 65 | * @param dictData 字典数据信息 66 | * @return 结果 67 | */ 68 | public int insertDictData(DictData dictData); 69 | 70 | /** 71 | * 修改保存字典数据信息 72 | * 73 | * @param dictData 字典数据信息 74 | * @return 结果 75 | */ 76 | public int updateDictData(DictData dictData); 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/dict/service/IDictTypeService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.dict.service; 2 | 3 | import java.util.List; 4 | import com.bank.framework.web.domain.Ztree; 5 | import com.bank.project.system.dict.domain.DictType; 6 | 7 | /** 8 | * 字典 业务层 9 | * 10 | * @author bank 11 | */ 12 | public interface IDictTypeService 13 | { 14 | /** 15 | * 根据条件分页查询字典类型 16 | * 17 | * @param dictType 字典类型信息 18 | * @return 字典类型集合信息 19 | */ 20 | public List selectDictTypeList(DictType dictType); 21 | 22 | /** 23 | * 根据所有字典类型 24 | * 25 | * @return 字典类型集合信息 26 | */ 27 | public List selectDictTypeAll(); 28 | 29 | /** 30 | * 根据字典类型ID查询信息 31 | * 32 | * @param dictId 字典类型ID 33 | * @return 字典类型 34 | */ 35 | public DictType selectDictTypeById(Long dictId); 36 | 37 | /** 38 | * 根据字典类型查询信息 39 | * 40 | * @param dictType 字典类型 41 | * @return 字典类型 42 | */ 43 | public DictType selectDictTypeByType(String dictType); 44 | 45 | /** 46 | * 通过字典ID删除字典信息 47 | * 48 | * @param dictId 字典ID 49 | * @return 结果 50 | */ 51 | public int deleteDictTypeById(Long dictId); 52 | 53 | /** 54 | * 批量删除字典类型 55 | * 56 | * @param ids 需要删除的数据 57 | * @return 结果 58 | * @throws Exception 异常 59 | */ 60 | public int deleteDictTypeByIds(String ids) throws Exception; 61 | 62 | /** 63 | * 新增保存字典类型信息 64 | * 65 | * @param dictType 字典类型信息 66 | * @return 结果 67 | */ 68 | public int insertDictType(DictType dictType); 69 | 70 | /** 71 | * 修改保存字典类型信息 72 | * 73 | * @param dictType 字典类型信息 74 | * @return 结果 75 | */ 76 | public int updateDictType(DictType dictType); 77 | 78 | /** 79 | * 校验字典类型称是否唯一 80 | * 81 | * @param dictType 字典类型 82 | * @return 结果 83 | */ 84 | public String checkDictTypeUnique(DictType dictType); 85 | 86 | /** 87 | * 查询字典类型树 88 | * 89 | * @param dictType 字典类型 90 | * @return 所有字典类型 91 | */ 92 | public List selectDictTree(DictType dictType); 93 | } 94 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/notice/mapper/NoticeMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.notice.mapper; 2 | 3 | import com.bank.project.system.notice.domain.Notice; 4 | import java.util.List; 5 | 6 | /** 7 | * 公告 数据层 8 | * 9 | * @author bank 10 | */ 11 | public interface NoticeMapper 12 | { 13 | /** 14 | * 查询公告信息 15 | * 16 | * @param noticeId 公告ID 17 | * @return 公告信息 18 | */ 19 | public Notice selectNoticeById(Long noticeId); 20 | 21 | /** 22 | * 查询公告列表 23 | * 24 | * @param notice 公告信息 25 | * @return 公告集合 26 | */ 27 | public List selectNoticeList(Notice notice); 28 | 29 | /** 30 | * 新增公告 31 | * 32 | * @param notice 公告信息 33 | * @return 结果 34 | */ 35 | public int insertNotice(Notice notice); 36 | 37 | /** 38 | * 修改公告 39 | * 40 | * @param notice 公告信息 41 | * @return 结果 42 | */ 43 | public int updateNotice(Notice notice); 44 | 45 | /** 46 | * 批量删除公告 47 | * 48 | * @param noticeIds 需要删除的数据ID 49 | * @return 结果 50 | */ 51 | public int deleteNoticeByIds(String[] noticeIds); 52 | } -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/notice/service/INoticeService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.notice.service; 2 | 3 | import com.bank.project.system.notice.domain.Notice; 4 | import java.util.List; 5 | 6 | /** 7 | * 公告 服务层 8 | * 9 | * @author bank 10 | */ 11 | public interface INoticeService 12 | { 13 | /** 14 | * 查询公告信息 15 | * 16 | * @param noticeId 公告ID 17 | * @return 公告信息 18 | */ 19 | public Notice selectNoticeById(Long noticeId); 20 | 21 | /** 22 | * 查询公告列表 23 | * 24 | * @param notice 公告信息 25 | * @return 公告集合 26 | */ 27 | public List selectNoticeList(Notice notice); 28 | 29 | /** 30 | * 新增公告 31 | * 32 | * @param notice 公告信息 33 | * @return 结果 34 | */ 35 | public int insertNotice(Notice notice); 36 | 37 | /** 38 | * 修改公告 39 | * 40 | * @param notice 公告信息 41 | * @return 结果 42 | */ 43 | public int updateNotice(Notice notice); 44 | 45 | /** 46 | * 删除公告信息 47 | * 48 | * @param ids 需要删除的数据ID 49 | * @return 结果 50 | */ 51 | public int deleteNoticeByIds(String ids); 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/notice/service/NoticeServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.notice.service; 2 | 3 | import java.util.List; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.stereotype.Service; 6 | import com.bank.common.utils.security.ShiroUtils; 7 | import com.bank.common.utils.text.Convert; 8 | import com.bank.project.system.notice.mapper.NoticeMapper; 9 | import com.bank.project.system.notice.domain.Notice; 10 | 11 | /** 12 | * 公告 服务层实现 13 | * 14 | * @author bank 15 | * @date 2018-06-25 16 | */ 17 | @Service 18 | public class NoticeServiceImpl implements INoticeService 19 | { 20 | @Autowired 21 | private NoticeMapper noticeMapper; 22 | 23 | /** 24 | * 查询公告信息 25 | * 26 | * @param noticeId 公告ID 27 | * @return 公告信息 28 | */ 29 | @Override 30 | public Notice selectNoticeById(Long noticeId) 31 | { 32 | return noticeMapper.selectNoticeById(noticeId); 33 | } 34 | 35 | /** 36 | * 查询公告列表 37 | * 38 | * @param notice 公告信息 39 | * @return 公告集合 40 | */ 41 | @Override 42 | public List selectNoticeList(Notice notice) 43 | { 44 | return noticeMapper.selectNoticeList(notice); 45 | } 46 | 47 | /** 48 | * 新增公告 49 | * 50 | * @param notice 公告信息 51 | * @return 结果 52 | */ 53 | @Override 54 | public int insertNotice(Notice notice) 55 | { 56 | notice.setCreateBy(ShiroUtils.getLoginName()); 57 | return noticeMapper.insertNotice(notice); 58 | } 59 | 60 | /** 61 | * 修改公告 62 | * 63 | * @param notice 公告信息 64 | * @return 结果 65 | */ 66 | @Override 67 | public int updateNotice(Notice notice) 68 | { 69 | notice.setUpdateBy(ShiroUtils.getLoginName()); 70 | return noticeMapper.updateNotice(notice); 71 | } 72 | 73 | /** 74 | * 删除公告对象 75 | * 76 | * @param ids 需要删除的数据ID 77 | * @return 结果 78 | */ 79 | @Override 80 | public int deleteNoticeByIds(String ids) 81 | { 82 | return noticeMapper.deleteNoticeByIds(Convert.toStrArray(ids)); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/post/mapper/PostMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.post.mapper; 2 | 3 | import java.util.List; 4 | import com.bank.project.system.post.domain.Post; 5 | 6 | /** 7 | * 岗位信息 数据层 8 | * 9 | * @author bank 10 | */ 11 | public interface PostMapper 12 | { 13 | /** 14 | * 查询岗位数据集合 15 | * 16 | * @param post 岗位信息 17 | * @return 岗位数据集合 18 | */ 19 | public List selectPostList(Post post); 20 | 21 | /** 22 | * 查询所有岗位 23 | * 24 | * @return 岗位列表 25 | */ 26 | public List selectPostAll(); 27 | 28 | /** 29 | * 根据用户ID查询岗位 30 | * 31 | * @param userId 用户ID 32 | * @return 岗位列表 33 | */ 34 | public List selectPostsByUserId(Long userId); 35 | 36 | /** 37 | * 通过岗位ID查询岗位信息 38 | * 39 | * @param postId 岗位ID 40 | * @return 角色对象信息 41 | */ 42 | public Post selectPostById(Long postId); 43 | 44 | /** 45 | * 批量删除岗位信息 46 | * 47 | * @param ids 需要删除的数据ID 48 | * @return 结果 49 | */ 50 | public int deletePostByIds(Long[] ids); 51 | 52 | /** 53 | * 修改岗位信息 54 | * 55 | * @param post 岗位信息 56 | * @return 结果 57 | */ 58 | public int updatePost(Post post); 59 | 60 | /** 61 | * 新增岗位信息 62 | * 63 | * @param post 岗位信息 64 | * @return 结果 65 | */ 66 | public int insertPost(Post post); 67 | 68 | /** 69 | * 校验岗位名称 70 | * 71 | * @param postName 岗位名称 72 | * @return 结果 73 | */ 74 | public Post checkPostNameUnique(String postName); 75 | 76 | /** 77 | * 校验岗位编码 78 | * 79 | * @param postCode 岗位编码 80 | * @return 结果 81 | */ 82 | public Post checkPostCodeUnique(String postCode); 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/post/service/IPostService.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.post.service; 2 | 3 | import java.util.List; 4 | import com.bank.project.system.post.domain.Post; 5 | 6 | /** 7 | * 岗位信息 服务层 8 | * 9 | * @author bank 10 | */ 11 | public interface IPostService 12 | { 13 | /** 14 | * 查询岗位信息集合 15 | * 16 | * @param post 岗位信息 17 | * @return 岗位信息集合 18 | */ 19 | public List selectPostList(Post post); 20 | 21 | /** 22 | * 查询所有岗位 23 | * 24 | * @return 岗位列表 25 | */ 26 | public List selectPostAll(); 27 | 28 | /** 29 | * 根据用户ID查询岗位 30 | * 31 | * @param userId 用户ID 32 | * @return 岗位列表 33 | */ 34 | public List selectPostsByUserId(Long userId); 35 | 36 | /** 37 | * 通过岗位ID查询岗位信息 38 | * 39 | * @param postId 岗位ID 40 | * @return 角色对象信息 41 | */ 42 | public Post selectPostById(Long postId); 43 | 44 | /** 45 | * 批量删除岗位信息 46 | * 47 | * @param ids 需要删除的数据ID 48 | * @return 结果 49 | * @throws Exception 异常 50 | */ 51 | public int deletePostByIds(String ids) throws Exception; 52 | 53 | /** 54 | * 新增保存岗位信息 55 | * 56 | * @param post 岗位信息 57 | * @return 结果 58 | */ 59 | public int insertPost(Post post); 60 | 61 | /** 62 | * 修改保存岗位信息 63 | * 64 | * @param post 岗位信息 65 | * @return 结果 66 | */ 67 | public int updatePost(Post post); 68 | 69 | /** 70 | * 通过岗位ID查询岗位使用数量 71 | * 72 | * @param postId 岗位ID 73 | * @return 结果 74 | */ 75 | public int countUserPostById(Long postId); 76 | 77 | /** 78 | * 校验岗位名称 79 | * 80 | * @param post 岗位信息 81 | * @return 结果 82 | */ 83 | public String checkPostNameUnique(Post post); 84 | 85 | /** 86 | * 校验岗位编码 87 | * 88 | * @param post 岗位信息 89 | * @return 结果 90 | */ 91 | public String checkPostCodeUnique(Post post); 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/role/domain/RoleDept.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.role.domain; 2 | 3 | import org.apache.commons.lang3.builder.ToStringBuilder; 4 | import org.apache.commons.lang3.builder.ToStringStyle; 5 | 6 | /** 7 | * 角色和部门关联 sys_role_dept 8 | * 9 | * @author bank 10 | */ 11 | public class RoleDept 12 | { 13 | /** 角色ID */ 14 | private Long roleId; 15 | 16 | /** 部门ID */ 17 | private Long deptId; 18 | 19 | public Long getRoleId() 20 | { 21 | return roleId; 22 | } 23 | 24 | public void setRoleId(Long roleId) 25 | { 26 | this.roleId = roleId; 27 | } 28 | 29 | public Long getDeptId() 30 | { 31 | return deptId; 32 | } 33 | 34 | public void setDeptId(Long deptId) 35 | { 36 | this.deptId = deptId; 37 | } 38 | 39 | @Override 40 | public String toString() { 41 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) 42 | .append("roleId", getRoleId()) 43 | .append("deptId", getDeptId()) 44 | .toString(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/role/domain/RoleMenu.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.role.domain; 2 | 3 | import org.apache.commons.lang3.builder.ToStringBuilder; 4 | import org.apache.commons.lang3.builder.ToStringStyle; 5 | 6 | /** 7 | * 角色和菜单关联 sys_role_menu 8 | * 9 | * @author bank 10 | */ 11 | public class RoleMenu 12 | { 13 | /** 角色ID */ 14 | private Long roleId; 15 | 16 | /** 菜单ID */ 17 | private Long menuId; 18 | 19 | public Long getRoleId() 20 | { 21 | return roleId; 22 | } 23 | 24 | public void setRoleId(Long roleId) 25 | { 26 | this.roleId = roleId; 27 | } 28 | 29 | public Long getMenuId() 30 | { 31 | return menuId; 32 | } 33 | 34 | public void setMenuId(Long menuId) 35 | { 36 | this.menuId = menuId; 37 | } 38 | 39 | @Override 40 | public String toString() { 41 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) 42 | .append("roleId", getRoleId()) 43 | .append("menuId", getMenuId()) 44 | .toString(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/role/mapper/RoleDeptMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.role.mapper; 2 | 3 | import java.util.List; 4 | import com.bank.project.system.role.domain.RoleDept; 5 | 6 | /** 7 | * 角色与部门关联表 数据层 8 | * 9 | * @author bank 10 | */ 11 | public interface RoleDeptMapper 12 | { 13 | /** 14 | * 通过角色ID删除角色和部门关联 15 | * 16 | * @param roleId 角色ID 17 | * @return 结果 18 | */ 19 | public int deleteRoleDeptByRoleId(Long roleId); 20 | 21 | /** 22 | * 批量删除角色部门关联信息 23 | * 24 | * @param ids 需要删除的数据ID 25 | * @return 结果 26 | */ 27 | public int deleteRoleDept(Long[] ids); 28 | 29 | /** 30 | * 查询部门使用数量 31 | * 32 | * @param deptId 部门ID 33 | * @return 结果 34 | */ 35 | public int selectCountRoleDeptByDeptId(Long deptId); 36 | 37 | /** 38 | * 批量新增角色部门信息 39 | * 40 | * @param roleDeptList 角色部门列表 41 | * @return 结果 42 | */ 43 | public int batchRoleDept(List roleDeptList); 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/role/mapper/RoleMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.role.mapper; 2 | 3 | import java.util.List; 4 | import com.bank.project.system.role.domain.Role; 5 | 6 | /** 7 | * 角色表 数据层 8 | * 9 | * @author bank 10 | */ 11 | public interface RoleMapper 12 | { 13 | /** 14 | * 根据条件分页查询角色数据 15 | * 16 | * @param role 角色信息 17 | * @return 角色数据集合信息 18 | */ 19 | public List selectRoleList(Role role); 20 | 21 | /** 22 | * 根据用户ID查询角色 23 | * 24 | * @param userId 用户ID 25 | * @return 角色列表 26 | */ 27 | public List selectRolesByUserId(Long userId); 28 | 29 | /** 30 | * 通过角色ID查询角色 31 | * 32 | * @param roleId 角色ID 33 | * @return 角色对象信息 34 | */ 35 | public Role selectRoleById(Long roleId); 36 | 37 | /** 38 | * 通过角色ID删除角色 39 | * 40 | * @param roleId 角色ID 41 | * @return 结果 42 | */ 43 | public int deleteRoleById(Long roleId); 44 | 45 | /** 46 | * 批量角色用户信息 47 | * 48 | * @param ids 需要删除的数据ID 49 | * @return 结果 50 | */ 51 | public int deleteRoleByIds(Long[] ids); 52 | 53 | /** 54 | * 修改角色信息 55 | * 56 | * @param role 角色信息 57 | * @return 结果 58 | */ 59 | public int updateRole(Role role); 60 | 61 | /** 62 | * 新增角色信息 63 | * 64 | * @param role 角色信息 65 | * @return 结果 66 | */ 67 | public int insertRole(Role role); 68 | 69 | /** 70 | * 校验角色名称是否唯一 71 | * 72 | * @param roleName 角色名称 73 | * @return 角色信息 74 | */ 75 | public Role checkRoleNameUnique(String roleName); 76 | 77 | /** 78 | * 校验角色权限是否唯一 79 | * 80 | * @param roleKey 角色权限 81 | * @return 角色信息 82 | */ 83 | public Role checkRoleKeyUnique(String roleKey); 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/role/mapper/RoleMenuMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.role.mapper; 2 | 3 | import java.util.List; 4 | import com.bank.project.system.role.domain.RoleMenu; 5 | 6 | /** 7 | * 角色与菜单关联表 数据层 8 | * 9 | * @author bank 10 | */ 11 | public interface RoleMenuMapper 12 | { 13 | /** 14 | * 通过角色ID删除角色和菜单关联 15 | * 16 | * @param roleId 角色ID 17 | * @return 结果 18 | */ 19 | public int deleteRoleMenuByRoleId(Long roleId); 20 | 21 | /** 22 | * 批量删除角色菜单关联信息 23 | * 24 | * @param ids 需要删除的数据ID 25 | * @return 结果 26 | */ 27 | public int deleteRoleMenu(Long[] ids); 28 | 29 | /** 30 | * 查询菜单使用数量 31 | * 32 | * @param menuId 菜单ID 33 | * @return 结果 34 | */ 35 | public int selectCountRoleMenuByMenuId(Long menuId); 36 | 37 | /** 38 | * 批量新增角色菜单信息 39 | * 40 | * @param roleMenuList 角色菜单列表 41 | * @return 结果 42 | */ 43 | public int batchRoleMenu(List roleMenuList); 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/user/controller/IndexController.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.user.controller; 2 | 3 | import java.util.List; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.stereotype.Controller; 6 | import org.springframework.ui.ModelMap; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import com.bank.framework.config.BankConfig; 9 | import com.bank.framework.web.controller.BaseController; 10 | import com.bank.project.system.menu.domain.Menu; 11 | import com.bank.project.system.menu.service.IMenuService; 12 | import com.bank.project.system.user.domain.User; 13 | 14 | /** 15 | * 首页 业务处理 16 | * 17 | * @author bank 18 | */ 19 | @Controller 20 | public class IndexController extends BaseController 21 | { 22 | @Autowired 23 | private IMenuService menuService; 24 | 25 | @Autowired 26 | private BankConfig ruoYiConfig; 27 | 28 | // 系统首页 29 | @GetMapping("/index") 30 | public String index(ModelMap mmap) 31 | { 32 | // 取身份信息 33 | User user = getSysUser(); 34 | // 根据用户id取出菜单 35 | List menus = menuService.selectMenusByUser(user); 36 | mmap.put("menus", menus); 37 | mmap.put("user", user); 38 | mmap.put("copyrightYear", ruoYiConfig.getCopyrightYear()); 39 | mmap.put("demoEnabled", ruoYiConfig.isDemoEnabled()); 40 | return "index"; 41 | } 42 | 43 | // 切换主题 44 | @GetMapping("/system/switchSkin") 45 | public String switchSkin(ModelMap mmap) 46 | { 47 | return "skin"; 48 | } 49 | 50 | // 系统介绍 51 | @GetMapping("/system/main") 52 | public String main(ModelMap mmap) 53 | { 54 | mmap.put("version", ruoYiConfig.getVersion()); 55 | return "main"; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/user/controller/LoginController.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.user.controller; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import org.apache.shiro.SecurityUtils; 6 | import org.apache.shiro.authc.AuthenticationException; 7 | import org.apache.shiro.authc.UsernamePasswordToken; 8 | import org.apache.shiro.subject.Subject; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.web.bind.annotation.GetMapping; 11 | import org.springframework.web.bind.annotation.PostMapping; 12 | import org.springframework.web.bind.annotation.ResponseBody; 13 | import com.bank.common.utils.ServletUtils; 14 | import com.bank.common.utils.StringUtils; 15 | import com.bank.framework.web.controller.BaseController; 16 | import com.bank.framework.web.domain.AjaxResult; 17 | 18 | /** 19 | * 登录验证 20 | * 21 | * @author bank 22 | */ 23 | @Controller 24 | public class LoginController extends BaseController 25 | { 26 | @GetMapping("/login") 27 | public String login(HttpServletRequest request, HttpServletResponse response) 28 | { 29 | // 如果是Ajax请求,返回Json字符串。 30 | if (ServletUtils.isAjaxRequest(request)) 31 | { 32 | return ServletUtils.renderString(response, "{\"code\":\"1\",\"msg\":\"未登录或登录超时。请重新登录\"}"); 33 | } 34 | 35 | return "login"; 36 | } 37 | 38 | @PostMapping("/login") 39 | @ResponseBody 40 | public AjaxResult ajaxLogin(String username, String password, Boolean rememberMe) 41 | { 42 | UsernamePasswordToken token = new UsernamePasswordToken(username, password, rememberMe); 43 | Subject subject = SecurityUtils.getSubject(); 44 | try 45 | { 46 | subject.login(token); 47 | return success(); 48 | } 49 | catch (AuthenticationException e) 50 | { 51 | String msg = "用户或密码错误"; 52 | if (StringUtils.isNotEmpty(e.getMessage())) 53 | { 54 | msg = e.getMessage(); 55 | } 56 | return error(msg); 57 | } 58 | } 59 | 60 | @GetMapping("/unauth") 61 | public String unauth() 62 | { 63 | return "error/unauth"; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/user/domain/UserPost.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.user.domain; 2 | 3 | import org.apache.commons.lang3.builder.ToStringBuilder; 4 | import org.apache.commons.lang3.builder.ToStringStyle; 5 | 6 | /** 7 | * 用户和岗位关联 sys_user_post 8 | * 9 | * @author bank 10 | */ 11 | public class UserPost 12 | { 13 | /** 用户ID */ 14 | private Long userId; 15 | /** 岗位ID */ 16 | private Long postId; 17 | 18 | public Long getUserId() 19 | { 20 | return userId; 21 | } 22 | 23 | public void setUserId(Long userId) 24 | { 25 | this.userId = userId; 26 | } 27 | 28 | public Long getPostId() 29 | { 30 | return postId; 31 | } 32 | 33 | public void setPostId(Long postId) 34 | { 35 | this.postId = postId; 36 | } 37 | 38 | @Override 39 | public String toString() { 40 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) 41 | .append("userId", getUserId()) 42 | .append("postId", getPostId()) 43 | .toString(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/user/domain/UserRole.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.user.domain; 2 | 3 | import org.apache.commons.lang3.builder.ToStringBuilder; 4 | import org.apache.commons.lang3.builder.ToStringStyle; 5 | 6 | /** 7 | * 用户和角色关联 sys_user_role 8 | * 9 | * @author bank 10 | */ 11 | public class UserRole 12 | { 13 | /** 用户ID */ 14 | private Long userId; 15 | 16 | /** 角色ID */ 17 | private Long roleId; 18 | 19 | public Long getUserId() 20 | { 21 | return userId; 22 | } 23 | 24 | public void setUserId(Long userId) 25 | { 26 | this.userId = userId; 27 | } 28 | 29 | public Long getRoleId() 30 | { 31 | return roleId; 32 | } 33 | 34 | public void setRoleId(Long roleId) 35 | { 36 | this.roleId = roleId; 37 | } 38 | 39 | @Override 40 | public String toString() { 41 | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) 42 | .append("userId", getUserId()) 43 | .append("roleId", getRoleId()) 44 | .toString(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/user/domain/UserStatus.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.user.domain; 2 | 3 | /** 4 | * 用户状态 5 | * 6 | * @author bank 7 | * 8 | */ 9 | public enum UserStatus 10 | { 11 | OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除"); 12 | 13 | private final String code; 14 | private final String info; 15 | 16 | UserStatus(String code, String info) 17 | { 18 | this.code = code; 19 | this.info = info; 20 | } 21 | 22 | public String getCode() 23 | { 24 | return code; 25 | } 26 | 27 | public String getInfo() 28 | { 29 | return info; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/user/mapper/UserPostMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.user.mapper; 2 | 3 | import java.util.List; 4 | import com.bank.project.system.user.domain.UserPost; 5 | 6 | /** 7 | * 用户与岗位关联表 数据层 8 | * 9 | * @author bank 10 | */ 11 | public interface UserPostMapper 12 | { 13 | /** 14 | * 通过用户ID删除用户和岗位关联 15 | * 16 | * @param userId 用户ID 17 | * @return 结果 18 | */ 19 | public int deleteUserPostByUserId(Long userId); 20 | 21 | /** 22 | * 通过岗位ID查询岗位使用数量 23 | * 24 | * @param postId 岗位ID 25 | * @return 结果 26 | */ 27 | public int countUserPostById(Long postId); 28 | 29 | /** 30 | * 批量删除用户和岗位关联 31 | * 32 | * @param ids 需要删除的数据ID 33 | * @return 结果 34 | */ 35 | public int deleteUserPost(Long[] ids); 36 | 37 | /** 38 | * 批量新增用户岗位信息 39 | * 40 | * @param userPostList 用户角色列表 41 | * @return 结果 42 | */ 43 | public int batchUserPost(List userPostList); 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/bank/project/system/user/mapper/UserRoleMapper.java: -------------------------------------------------------------------------------- 1 | package com.bank.project.system.user.mapper; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import com.bank.project.system.user.domain.UserRole; 6 | 7 | /** 8 | * 用户与角色关联表 数据层 9 | * 10 | * @author bank 11 | */ 12 | public interface UserRoleMapper 13 | { 14 | /** 15 | * 通过用户ID删除用户和角色关联 16 | * 17 | * @param userId 用户ID 18 | * @return 结果 19 | */ 20 | public int deleteUserRoleByUserId(Long userId); 21 | 22 | /** 23 | * 批量删除用户和角色关联 24 | * 25 | * @param ids 需要删除的数据ID 26 | * @return 结果 27 | */ 28 | public int deleteUserRole(Long[] ids); 29 | 30 | /** 31 | * 通过角色ID查询角色使用数量 32 | * 33 | * @param roleId 角色ID 34 | * @return 结果 35 | */ 36 | public int countUserRoleByRoleId(Long roleId); 37 | 38 | /** 39 | * 批量新增用户角色信息 40 | * 41 | * @param userRoleList 用户角色列表 42 | * @return 结果 43 | */ 44 | public int batchUserRole(List userRoleList); 45 | 46 | /** 47 | * 删除用户和角色关联信息 48 | * 49 | * @param userRole 用户和角色关联信息 50 | * @return 结果 51 | */ 52 | public int deleteUserRoleInfo(UserRole userRole); 53 | 54 | /** 55 | * 批量取消授权用户角色 56 | * 57 | * @param roleId 角色ID 58 | * @param userIds 需要删除的用户数据ID 59 | * @return 结果 60 | */ 61 | public int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds); 62 | } 63 | -------------------------------------------------------------------------------- /src/main/resources/application-druid.yml: -------------------------------------------------------------------------------- 1 | # * @author: QQ:553039957 2 | # * @Date: 2023/9/25 14:35 3 | # * @Description: 4 | # * 1. gitcode主页: https://gitcode.net/tbb414 (推荐) 5 | # * 2. github主页:https://github.com/doudoutangs 6 | # * 3. gitee(码云)主页:https://gitee.com/spdoudoutang 7 | spring: 8 | datasource: 9 | type: com.alibaba.druid.pool.DruidDataSource 10 | driverClassName: com.mysql.cj.jdbc.Driver 11 | druid: 12 | # 主库数据源 13 | master: 14 | url: jdbc:mysql://localhost:3306/sp_bank_oa_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 15 | username: root 16 | password: mysql 17 | # 从库数据源 18 | slave: 19 | # 从数据源开关/默认关闭 20 | enabled: false 21 | url: 22 | username: 23 | password: 24 | # 初始连接数 25 | initialSize: 5 26 | # 最小连接池数量 27 | minIdle: 10 28 | # 最大连接池数量 29 | maxActive: 20 30 | # 配置获取连接等待超时的时间 31 | maxWait: 60000 32 | # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 33 | timeBetweenEvictionRunsMillis: 60000 34 | # 配置一个连接在池中最小生存的时间,单位是毫秒 35 | minEvictableIdleTimeMillis: 300000 36 | # 配置一个连接在池中最大生存的时间,单位是毫秒 37 | maxEvictableIdleTimeMillis: 900000 38 | # 配置检测连接是否有效 39 | validationQuery: SELECT 1 FROM DUAL 40 | testWhileIdle: true 41 | testOnBorrow: false 42 | testOnReturn: false 43 | webStatFilter: 44 | enabled: true 45 | statViewServlet: 46 | enabled: true 47 | # 设置白名单,不填则允许所有访问 48 | allow: 49 | url-pattern: /druid/* 50 | # 控制台管理用户名和密码 51 | login-username: 52 | login-password: 53 | filter: 54 | stat: 55 | enabled: true 56 | # 慢SQL记录 57 | log-slow-sql: true 58 | slow-sql-millis: 1000 59 | merge-sql: true 60 | wall: 61 | config: 62 | multi-statement-allow: true -------------------------------------------------------------------------------- /src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | ____ ____ _____ _____ ____ ___ ____ ___ ___ _____ ______ 2 | / __ \ / __ \ _| ____| ____|___ \ / _ \___ \ / _ \ / _ \| ____|____ | 3 | | | | | | | (_) |__ | |__ __) | | | |__) | (_) | (_) | |__ / / 4 | | | | | | | | |___ \|___ \ |__ <| | | |__ < \__, |\__, |___ \ / / 5 | | |__| | |__| |_ ___) |___) |___) | |_| |__) | / / / / ___) | / / 6 | \___\_\\___\_(_)____/|____/|____/ \___/____/ /_/ /_/ |____/ /_/ 7 | 8 | -------------------------------------------------------------------------------- /src/main/resources/ehcache/ehcache-shiro.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 22 | 23 | 24 | 25 | 32 | 33 | 34 | 35 | 43 | 44 | 45 | 46 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/main/resources/mybatis/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/mybatis/system/RoleDeptMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | delete from sys_role_dept where role_id=#{roleId} 14 | 15 | 16 | 19 | 20 | 21 | delete from sys_role_dept where role_id in 22 | 23 | #{roleId} 24 | 25 | 26 | 27 | 28 | insert into sys_role_dept(role_id, dept_id) values 29 | 30 | (#{item.roleId},#{item.deptId}) 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/resources/mybatis/system/RoleMenuMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | delete from sys_role_menu where role_id=#{roleId} 14 | 15 | 16 | 19 | 20 | 21 | delete from sys_role_menu where role_id in 22 | 23 | #{roleId} 24 | 25 | 26 | 27 | 28 | insert into sys_role_menu(role_id, menu_id) values 29 | 30 | (#{item.roleId},#{item.menuId}) 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/resources/mybatis/system/UserPostMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | delete from sys_user_post where user_id=#{userId} 14 | 15 | 16 | 19 | 20 | 21 | delete from sys_user_post where user_id in 22 | 23 | #{userId} 24 | 25 | 26 | 27 | 28 | insert into sys_user_post(user_id, post_id) values 29 | 30 | (#{item.userId},#{item.postId}) 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/resources/mybatis/system/UserRoleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | delete from sys_user_role where user_id=#{userId} 14 | 15 | 16 | 19 | 20 | 21 | delete from sys_user_role where user_id in 22 | 23 | #{userId} 24 | 25 | 26 | 27 | 28 | insert into sys_user_role(user_id, role_id) values 29 | 30 | (#{item.userId},#{item.roleId}) 31 | 32 | 33 | 34 | 35 | delete from sys_user_role where user_id=#{userId} and role_id=#{roleId} 36 | 37 | 38 | 39 | delete from sys_user_role where role_id=#{roleId} and user_id in 40 | 41 | #{userId} 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /运行图/0-1-登录.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/0-1-登录.png -------------------------------------------------------------------------------- /运行图/0-2-首页.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/0-2-首页.png -------------------------------------------------------------------------------- /运行图/0-3-修改密码.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/0-3-修改密码.png -------------------------------------------------------------------------------- /运行图/0-4-切换主题.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/0-4-切换主题.png -------------------------------------------------------------------------------- /运行图/0-5-个人中心.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/0-5-个人中心.png -------------------------------------------------------------------------------- /运行图/0-99-修改数据库.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/0-99-修改数据库.png -------------------------------------------------------------------------------- /运行图/0-99-启动项目.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/0-99-启动项目.png -------------------------------------------------------------------------------- /运行图/1-公文管理-会议管理-列表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/1-公文管理-会议管理-列表.png -------------------------------------------------------------------------------- /运行图/1-公文管理-会议管理-增加.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/1-公文管理-会议管理-增加.png -------------------------------------------------------------------------------- /运行图/1-公文管理-公文列表-列表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/1-公文管理-公文列表-列表.png -------------------------------------------------------------------------------- /运行图/1-公文管理-公文列表-增加.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/1-公文管理-公文列表-增加.png -------------------------------------------------------------------------------- /运行图/2-资产管理-资产列表-列表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/2-资产管理-资产列表-列表.png -------------------------------------------------------------------------------- /运行图/2-资产管理-资产列表-增加.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/2-资产管理-资产列表-增加.png -------------------------------------------------------------------------------- /运行图/2-资产管理-资产盘点-统计.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/2-资产管理-资产盘点-统计.png -------------------------------------------------------------------------------- /运行图/3-辅助办公-图书管理-列表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/3-辅助办公-图书管理-列表.png -------------------------------------------------------------------------------- /运行图/3-辅助办公-图书管理-增加.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/3-辅助办公-图书管理-增加.png -------------------------------------------------------------------------------- /运行图/4-档案管理-人事档案-列表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/4-档案管理-人事档案-列表.png -------------------------------------------------------------------------------- /运行图/4-档案管理-人事档案-增加.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/4-档案管理-人事档案-增加.png -------------------------------------------------------------------------------- /运行图/4-档案管理-合同管理-列表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/4-档案管理-合同管理-列表.png -------------------------------------------------------------------------------- /运行图/4-档案管理-合同管理-增加.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/4-档案管理-合同管理-增加.png -------------------------------------------------------------------------------- /运行图/5-个人中心-工作计划-列表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/5-个人中心-工作计划-列表.png -------------------------------------------------------------------------------- /运行图/5-个人中心-工作计划-增加.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/5-个人中心-工作计划-增加.png -------------------------------------------------------------------------------- /运行图/5-个人中心-薪资管理-列表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/5-个人中心-薪资管理-列表.png -------------------------------------------------------------------------------- /运行图/5-个人中心-薪资管理-增加.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/5-个人中心-薪资管理-增加.png -------------------------------------------------------------------------------- /运行图/5-个人中心-通讯录管理-列表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/5-个人中心-通讯录管理-列表.png -------------------------------------------------------------------------------- /运行图/5-个人中心-通讯录管理-增加.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/5-个人中心-通讯录管理-增加.png -------------------------------------------------------------------------------- /运行图/6-系统管理-字典管理-列表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/6-系统管理-字典管理-列表.png -------------------------------------------------------------------------------- /运行图/6-系统管理-字典管理-增加.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/6-系统管理-字典管理-增加.png -------------------------------------------------------------------------------- /运行图/6-系统管理-用户管理-列表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/6-系统管理-用户管理-列表.png -------------------------------------------------------------------------------- /运行图/6-系统管理-用户管理-增加.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/6-系统管理-用户管理-增加.png -------------------------------------------------------------------------------- /运行图/6-系统管理-菜单管理-列表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/6-系统管理-菜单管理-列表.png -------------------------------------------------------------------------------- /运行图/6-系统管理-菜单管理-增加.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/6-系统管理-菜单管理-增加.png -------------------------------------------------------------------------------- /运行图/6-系统管理-角色管理-列表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/6-系统管理-角色管理-列表.png -------------------------------------------------------------------------------- /运行图/6-系统管理-角色管理-增加.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/6-系统管理-角色管理-增加.png -------------------------------------------------------------------------------- /运行图/6-系统管理-部门管理-列表.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/6-系统管理-部门管理-列表.png -------------------------------------------------------------------------------- /运行图/6-系统管理-部门管理-增加.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/6-系统管理-部门管理-增加.png -------------------------------------------------------------------------------- /运行图/r-主任.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/r-主任.png -------------------------------------------------------------------------------- /运行图/r-普通用户.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/r-普通用户.png -------------------------------------------------------------------------------- /运行图/r-管理员.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/r-管理员.png -------------------------------------------------------------------------------- /运行图/r-资产盘点员.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/r-资产盘点员.png -------------------------------------------------------------------------------- /运行图/r-资产管理员.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doudoutangs/2.oa_system/40c3cdf027537ff6f816aa6752cbe63ef73913fc/运行图/r-资产管理员.png --------------------------------------------------------------------------------