!34 同步dev分支
Merge pull request !34 from 疯狂的狮子li/dev
| | |
| | | ## å¹³å°ç®ä» |
| | | |
| | | åºäº RuoYi-Vue éæ Mybatis-Plus Lombok Hutool ç便æ·å¼åå·¥å
· éé
éåç¸å
³ä¸å¡ 便äºå¼å å®æä¸ RuoYi-Vue 忥 |
| | | * å端å¼åæ¡æ¶ VueãElement UI |
| | | * å端å¼åæ¡æ¶ Spring BootãRedis |
| | | * 容卿¡æ¶ Undertow åºäº Netty ç髿§è½å®¹å¨ |
| | | * æéè®¤è¯æ¡æ¶ Spring SecurityãJwtï¼æ¯æå¤ç»ç«¯è®¤è¯ç³»ç» |
| | | * å
³ç³»æ°æ®åº MySQL éé
8.X |
| | | * ç¼åæ°æ®åº Redis éé
6.X |
| | | * æ°æ®åºå¼åæ¡æ¶ Mybatis-Plus å¿«é CRUD å¢å å¼åæç æä»¶åæ¯æåç±»éæ± |
| | | * ç½ç»æ¡æ¶ FeignãOkHttp3 æ¥å£å管ç HTTP è¯·æ± |
| | | * å·¥å
·ç±»æ¡æ¶ HutoolãLombok åå°ä»£ç åä½ å¢å å®å
¨æ§ |
| | | * çæ§æ¡æ¶ spring-boot-admin å
¨æ¹ä½æå¡çæ§ |
| | | * æ ¡éªæ¡æ¶ validation å¢å¼ºæ¥å£å®å
¨æ§ ä¸¥è°¨æ§ |
| | | * ææ¡£æ¡æ¶ knife4j ç¾åæ¥å£ææ¡£ |
| | | * 代ç çæå¨ ä¸é®çæåå端代ç |
| | | |
| | | ## ä¿®æ¹RuoYiåè½ |
| | | |
| | | * ORMæ¡æ¶ ä½¿ç¨ Mybatis-Plus ç®åCRUD (ç®åæ¯æå表çæä¸æ 表 䏿¯æä¸»å表) |
| | | ### ä¾èµæ¹å¨ |
| | | |
| | | * ORMæ¡æ¶ ä½¿ç¨ Mybatis-Plus 3.4.2 ç®åCRUD (䏿¯æä¸»å表) |
| | | * Beanç®å ä½¿ç¨ Lombok ç®å get set toString çç |
| | | * 容卿¹å¨ Tomcat æ¹ä¸º å¹¶åæ§è½æ´å¥½ç undertow |
| | | * ææåçåè½ä½¿ç¨ Mybatis-Plus ä¸ Lombok éå |
| | | * 代ç çææ¨¡æ¿ æ¹ä¸ºéé
Mybatis-Plus ç代ç |
| | | * 代ç çææ¨¡æ¿ æååºVo,QueryBo,AddBo,EditBoçé¢å对象 |
| | | * 项ç®ä¿®æ¹ä¸º mavenå¤ç¯å¢é
ç½® |
| | | * 项ç®é
置修æ¹ä¸º application.yml ç»ä¸ç®¡ç |
| | | * swagger ä¿®æ¹ä¸º knife4j |
| | | * åé¡µç§»é¤ pagehelper æ¹ä¸º Mybatis-Plus å页 |
| | | * å级 swagger 为 knife4j |
| | | * éæ Hutool 5.X å¹¶éåRuoYié¨ååè½ |
| | | * éæ Feign æ¥å£å管ç Http 请æ±(å¦ä¸æ¹è¯·æ± æ¯ä»,çä¿¡,æ¨éç) |
| | | * éæ spring-boot-admin å
¨æ¹ä½çæ§ |
| | | * å级MybatisPlus 3.4.2 |
| | | * å¢å demo模å示ä¾(ç»ä¸ä¼å¢å 模åçå°ä¼ä¼´ååè) |
| | | * 忥å级 3.4.0 |
| | | * 忍¡å fast 忝 https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/tree/fast/ |
| | | * å¢å demo 模å示ä¾(ç»ä¸ä¼å¢å 模åçå°ä¼ä¼´ååè) |
| | | |
| | | ## å
³æ³¨ä½è
(æ«ç å 群) |
| | | ### ä»£ç æ¹å¨ |
| | | |
| | | * ææåçåè½ä½¿ç¨ Mybatis-Plus ä¸ Lombok éå |
| | | * å¢å IServicePlus ä¸ BaseMapperPlus å¯èªå®ä¹éç¨æ¹æ³ |
| | | * 代ç çææ¨¡æ¿ æ¹ä¸ºéé
Mybatis-Plus ç代ç |
| | | * 代ç çææ¨¡æ¿ æååº Vo,QueryBo,AddBo,EditBo çé¢å对象 |
| | | * 代ç çææ¨¡æ¿ å¢å ææ¡£æ³¨è§£ ä¸ æ ¡éªæ³¨è§£ ç®åéç¨æä½ |
| | | * 项ç®ä¿®æ¹ä¸º mavenå¤ç¯å¢é
ç½® |
| | | * 项ç®é
置修æ¹ä¸º application.yml ç»ä¸ç®¡ç |
| | | |
| | | ### å
¶ä» |
| | | |
| | | * 忥å级 RuoYi-Vue 3.4.0 |
| | | * 忍¡å fast 忝 [RuoYi-Vue-Plus-fast](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/tree/fast/) |
| | | |
| | | ## å
³æ³¨ä½è
(æ«ç è¯·å¤æ³¨: "å 群") |
| | | |
| | |  |
| | | |
| | | ## å¹³å°ç®ä» |
| | | |
| | | è¥ä¾æ¯ä¸å¥å
¨é¨å¼æºçå¿«éå¼åå¹³å°ï¼æ¯«æ ä¿çç»ä¸ªäººåä¼ä¸å
费使ç¨ã |
| | | |
| | | * å端éç¨VueãElement UIã |
| | | * å端éç¨Spring BootãSpring SecurityãRedis & Jwtã |
| | | * æé认è¯ä½¿ç¨Jwtï¼æ¯æå¤ç»ç«¯è®¤è¯ç³»ç»ã |
| | | * æ¯æå è½½å¨ææéèåï¼å¤æ¹å¼è½»æ¾æéæ§å¶ã |
| | | * 髿çå¼åï¼ä½¿ç¨ä»£ç çæå¨å¯ä»¥ä¸é®çæåå端代ç ã |
| | | * æä¾äºååºç¨çæ¬[RuoYi-Vue-fast](https://github.com/yangzongzhuan/RuoYi-Vue-fast)ï¼Oracleçæ¬[RuoYi-Vue-Oracle](https://github.com/yangzongzhuan/RuoYi-Vue-Oracle)ï¼ä¿æåæ¥æ´æ°ã |
| | | * ä¸åç¦»çæ¬ï¼è¯·ç§»æ¥[RuoYi](https://gitee.com/y_project/RuoYi)ï¼å¾®æå¡çæ¬ï¼è¯·ç§»æ¥[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud) |
| | | |
| | | ## éç¹æ³¨æäºé¡¹ |
| | | |
| | |
| | | * ç´æ¥å¨mysqlè¡¨ä¸ æ·»å parentId orderNum çåæ®µ(æ ¹æ®éè¦åè TreeEntityç±») |
| | | * 代ç çæéæ©æ 表çæå³å¯ |
| | | |
| | | å
³äºæ°æ®æé |
| | | * åèï¼ç¨æ·ï¼è§è²ï¼é¨é¨ï¼å表æ¥å£ç¨æ³ |
| | | * ä» bo.getParam().get("dataScope") å³å¯è·åæ°æ®æéçæçSQL |
| | | |
| | | å
³äºvueä¸bootæ´åé¨ç½² |
| | | * [å端éæèµæºå¦ä½æ´åå°å端访é®](https://doc.ruoyi.vip/ruoyi-vue/other/faq.html#å端éæèµæºå¦ä½æ´åå°å端访é®) |
| | | |
| | |
| | | <description>RuoYi-Vue-Plusåå°ç®¡çç³»ç»</description> |
| | | |
| | | <properties> |
| | | <ruoyi-vue-plus.version>1.0.2</ruoyi-vue-plus.version> |
| | | <ruoyi-vue-plus.version>2.0.0</ruoyi-vue-plus.version> |
| | | <spring-boot.version>2.3.10.RELEASE</spring-boot.version> |
| | | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| | | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
| | | <java.version>1.8</java.version> |
| | | <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version> |
| | | <druid.version>1.2.4</druid.version> |
| | | <knife4j.version>2.0.8</knife4j.version> |
| | | <pagehelper.boot.version>1.3.0</pagehelper.boot.version> |
| | | <fastjson.version>1.2.75</fastjson.version> |
| | | <oshi.version>5.6.0</oshi.version> |
| | | <jna.version>5.7.0</jna.version> |
| | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-dependencies</artifactId> |
| | | <version>2.2.13.RELEASE</version> |
| | | <version>${spring-boot.version}</version> |
| | | <type>pom</type> |
| | | <scope>import</scope> |
| | | </dependency> |
| | |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>druid-spring-boot-starter</artifactId> |
| | | <version>${druid.version}</version> |
| | | </dependency> |
| | | |
| | | <!-- pagehelper å页æä»¶ --> |
| | | <dependency> |
| | | <groupId>com.github.pagehelper</groupId> |
| | | <artifactId>pagehelper-spring-boot-starter</artifactId> |
| | | <version>${pagehelper.boot.version}</version> |
| | | <exclusions> |
| | | <exclusion> |
| | | <groupId>org.mybatis</groupId> |
| | | <artifactId>mybatis</artifactId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | |
| | | <!-- è·åç³»ç»ä¿¡æ¯ --> |
| | |
| | | package com.ruoyi.web.controller.monitor; |
| | | |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.domain.SysLogininfor; |
| | | import com.ruoyi.system.service.ISysLogininforService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç³»ç»è®¿é®è®°å½ |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysLogininfor logininfor) |
| | | { |
| | | startPage(); |
| | | List<SysLogininfor> list = logininforService.selectLogininforList(logininfor); |
| | | return getDataTable(list); |
| | | return logininforService.selectPageLogininforList(logininfor); |
| | | } |
| | | |
| | | @Log(title = "ç»å½æ¥å¿", businessType = BusinessType.EXPORT) |
| | |
| | | package com.ruoyi.web.controller.monitor; |
| | | |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.domain.SysOperLog; |
| | | import com.ruoyi.system.service.ISysOperLogService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æä½æ¥å¿è®°å½ |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysOperLog operLog) |
| | | { |
| | | startPage(); |
| | | List<SysOperLog> list = operLogService.selectOperLogList(operLog); |
| | | return getDataTable(list); |
| | | return operLogService.selectPageOperLogList(operLog); |
| | | } |
| | | |
| | | @Log(title = "æä½æ¥å¿", businessType = BusinessType.EXPORT) |
| | |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.domain.SysUserOnline; |
| | | import com.ruoyi.system.service.ISysUserOnlineService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | Collections.reverse(userOnlineList); |
| | | userOnlineList.removeAll(Collections.singleton(null)); |
| | | return getDataTable(userOnlineList); |
| | | return PageUtils.buildDataInfo(userOnlineList); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åæ°é
ç½® ä¿¡æ¯æä½å¤ç |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysConfig config) |
| | | { |
| | | startPage(); |
| | | List<SysConfig> list = configService.selectConfigList(config); |
| | | return getDataTable(list); |
| | | return configService.selectPageConfigList(config); |
| | | } |
| | | |
| | | @Log(title = "åæ°ç®¡ç", businessType = BusinessType.EXPORT) |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysDictData dictData) |
| | | { |
| | | startPage(); |
| | | List<SysDictData> list = dictDataService.selectDictDataList(dictData); |
| | | return getDataTable(list); |
| | | return dictDataService.selectPageDictDataList(dictData); |
| | | } |
| | | |
| | | @Log(title = "åå
¸æ°æ®", businessType = BusinessType.EXPORT) |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.service.ISysDictTypeService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ°æ®åå
¸ä¿¡æ¯ |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysDictType dictType) |
| | | { |
| | | startPage(); |
| | | List<SysDictType> list = dictTypeService.selectDictTypeList(dictType); |
| | | return getDataTable(list); |
| | | return dictTypeService.selectPageDictTypeList(dictType); |
| | | } |
| | | |
| | | @Log(title = "åå
¸ç±»å", businessType = BusinessType.EXPORT) |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysNotice notice) |
| | | { |
| | | startPage(); |
| | | List<SysNotice> list = noticeService.selectNoticeList(notice); |
| | | return getDataTable(list); |
| | | return noticeService.selectPageNoticeList(notice); |
| | | } |
| | | |
| | | /** |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysPost post) |
| | | { |
| | | startPage(); |
| | | List<SysPost> list = postService.selectPostList(post); |
| | | return getDataTable(list); |
| | | return postService.selectPagePostList(post); |
| | | } |
| | | |
| | | @Log(title = "å²ä½ç®¡ç", businessType = BusinessType.EXPORT) |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysRole role) |
| | | { |
| | | startPage(); |
| | | List<SysRole> list = roleService.selectRoleList(role); |
| | | return getDataTable(list); |
| | | return roleService.selectPageRoleList(role); |
| | | } |
| | | |
| | | @Log(title = "è§è²ç®¡ç", businessType = BusinessType.EXPORT) |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysUser user) |
| | | { |
| | | startPage(); |
| | | List<SysUser> list = userService.selectUserList(user); |
| | | return getDataTable(list); |
| | | return userService.selectPageUserList(user); |
| | | } |
| | | |
| | | @Log(title = "ç¨æ·ç®¡ç", businessType = BusinessType.EXPORT) |
| | |
| | | # æ°æ®æºé
ç½® |
| | | spring: |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | url: jdbc:mysql://192.168.0.222:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true |
| | | username: root |
| | | password: root |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é |
| | | enabled: false |
| | | url: |
| | | username: |
| | | password: |
| | | # åå§è¿æ¥æ° |
| | | initialSize: 5 |
| | | # æå°è¿æ¥æ± æ°é |
| | | minIdle: 10 |
| | | # æå¤§è¿æ¥æ± æ°é |
| | | maxActive: 20 |
| | | # é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ |
| | | maxWait: 60000 |
| | | # é
ç½®é´éå¤ä¹
æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å
³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | minEvictableIdleTimeMillis: 300000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # é
ç½®æ£æµè¿æ¥æ¯å¦ææ |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: true |
| | | # 设置ç½ååï¼ä¸å¡«åå
许ææè®¿é® |
| | | allow: |
| | | url-pattern: /druid/* |
| | | # æ§å¶å°ç®¡çç¨æ·ååå¯ç |
| | | login-username: ruoyi |
| | | login-password: 123456 |
| | | filter: |
| | | stat: |
| | | enabled: true |
| | | # æ
¢SQLè®°å½ |
| | | log-slow-sql: true |
| | | slow-sql-millis: 1000 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: true |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | host: 192.168.0.222 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true |
| | | username: root |
| | | password: root |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é |
| | | enabled: false |
| | | url: |
| | | username: |
| | | password: |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | # åå§è¿æ¥æ° |
| | | initialSize: 5 |
| | | # æå°è¿æ¥æ± æ°é |
| | | minIdle: 10 |
| | | # æå¤§è¿æ¥æ± æ°é |
| | | maxActive: 20 |
| | | # é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ |
| | | maxWait: 60000 |
| | | # é
ç½®é´éå¤ä¹
æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å
³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | minEvictableIdleTimeMillis: 300000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # é
ç½®æ£æµè¿æ¥æ¯å¦ææ |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: true |
| | | # 设置ç½ååï¼ä¸å¡«åå
许ææè®¿é® |
| | | allow: |
| | | url-pattern: /druid/* |
| | | # æ§å¶å°ç®¡çç¨æ·ååå¯ç |
| | | login-username: ruoyi |
| | | login-password: 123456 |
| | | filter: |
| | | stat: |
| | | enabled: true |
| | | # æ
¢SQLè®°å½ |
| | | log-slow-sql: true |
| | | slow-sql-millis: 1000 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: true |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | host: localhost |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | password: |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | |
| | | # æ°æ®æºé
ç½® |
| | | spring: |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true |
| | | username: root |
| | | password: root |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é |
| | | enabled: false |
| | | url: |
| | | username: |
| | | password: |
| | | # åå§è¿æ¥æ° |
| | | initialSize: 5 |
| | | # æå°è¿æ¥æ± æ°é |
| | | minIdle: 10 |
| | | # æå¤§è¿æ¥æ± æ°é |
| | | maxActive: 20 |
| | | # é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ |
| | | maxWait: 60000 |
| | | # é
ç½®é´éå¤ä¹
æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å
³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | minEvictableIdleTimeMillis: 300000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # é
ç½®æ£æµè¿æ¥æ¯å¦ææ |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: true |
| | | # 设置ç½ååï¼ä¸å¡«åå
许ææè®¿é® |
| | | allow: |
| | | url-pattern: /druid/* |
| | | # æ§å¶å°ç®¡çç¨æ·ååå¯ç |
| | | login-username: ruoyi |
| | | login-password: 123456 |
| | | filter: |
| | | stat: |
| | | enabled: true |
| | | # æ
¢SQLè®°å½ |
| | | log-slow-sql: true |
| | | slow-sql-millis: 1000 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: true |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | host: 192.168.0.222 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true |
| | | username: root |
| | | password: root |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é |
| | | enabled: false |
| | | url: |
| | | username: |
| | | password: |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | # åå§è¿æ¥æ° |
| | | initialSize: 5 |
| | | # æå°è¿æ¥æ± æ°é |
| | | minIdle: 10 |
| | | # æå¤§è¿æ¥æ± æ°é |
| | | maxActive: 20 |
| | | # é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ |
| | | maxWait: 60000 |
| | | # é
ç½®é´éå¤ä¹
æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å
³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | minEvictableIdleTimeMillis: 300000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # é
ç½®æ£æµè¿æ¥æ¯å¦ææ |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: true |
| | | # 设置ç½ååï¼ä¸å¡«åå
许ææè®¿é® |
| | | allow: |
| | | url-pattern: /druid/* |
| | | # æ§å¶å°ç®¡çç¨æ·ååå¯ç |
| | | login-username: ruoyi |
| | | login-password: 123456 |
| | | filter: |
| | | stat: |
| | | enabled: true |
| | | # æ
¢SQLè®°å½ |
| | | log-slow-sql: true |
| | | slow-sql-millis: 1000 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: true |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | host: 192.168.0.222 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | password: |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | |
| | | # 以ä¸çé
ç½®ä¼å½±åbuffer,è¿äºbufferä¼ç¨äºæå¡å¨è¿æ¥çIOæä½,æç¹ç±»ä¼¼nettyçæ± åå
å管ç |
| | | # æ¯åbufferç空é´å¤§å°,è¶å°ç空é´è¢«å©ç¨è¶å
å |
| | | buffer-size: 512 |
| | | # 设置IOçº¿ç¨æ°, å®ä¸»è¦æ§è¡éé»å¡çä»»å¡,å®ä»¬ä¼è´è´£å¤ä¸ªè¿æ¥, é»è®¤è®¾ç½®æ¯ä¸ªCPUæ ¸å¿ä¸ä¸ªçº¿ç¨ |
| | | io-threads: 8 |
| | | # é»å¡ä»»å¡çº¿ç¨æ± , 彿§è¡ç±»ä¼¼servlet请æ±é»å¡æä½, undertowä¼ä»è¿ä¸ªçº¿ç¨æ± ä¸åå¾çº¿ç¨,å®çå¼è®¾ç½®åå³äºç³»ç»çè´è½½ |
| | | worker-threads: 256 |
| | | # æ¯å¦åé
çç´æ¥å
å |
| | | direct-buffers: true |
| | | threads: |
| | | # 设置IOçº¿ç¨æ°, å®ä¸»è¦æ§è¡éé»å¡çä»»å¡,å®ä»¬ä¼è´è´£å¤ä¸ªè¿æ¥, é»è®¤è®¾ç½®æ¯ä¸ªCPUæ ¸å¿ä¸ä¸ªçº¿ç¨ |
| | | io: 8 |
| | | # é»å¡ä»»å¡çº¿ç¨æ± , 彿§è¡ç±»ä¼¼servlet请æ±é»å¡æä½, undertowä¼ä»è¿ä¸ªçº¿ç¨æ± ä¸åå¾çº¿ç¨,å®çå¼è®¾ç½®åå³äºç³»ç»çè´è½½ |
| | | worker: 256 |
| | | # # tomcat é
ç½® |
| | | # tomcat: |
| | | # # tomcatçURIç¼ç |
| | |
| | | messages: |
| | | # å½é
åèµæºæä»¶è·¯å¾ |
| | | basename: i18n/messages |
| | | profiles: |
| | | profiles: |
| | | active: @profiles.active@ |
| | | # æä»¶ä¸ä¼ |
| | | servlet: |
| | | multipart: |
| | | # å个æä»¶å¤§å° |
| | | max-file-size: 10MB |
| | | # 设置æ»ä¸ä¼ çæä»¶å¤§å° |
| | | max-request-size: 20MB |
| | | multipart: |
| | | # å个æä»¶å¤§å° |
| | | max-file-size: 10MB |
| | | # 设置æ»ä¸ä¼ çæä»¶å¤§å° |
| | | max-request-size: 20MB |
| | | # æå¡æ¨¡å |
| | | devtools: |
| | | restart: |
| | |
| | | thymeleaf: |
| | | # å°ç³»ç»æ¨¡æ¿æ¾ç½®å°æåé¢ å¦åä¼ä¸ springboot-admin 页é¢å²çª |
| | | template-resolver-order: 1 |
| | | application: |
| | | name: ruoyi-vue-plus |
| | | boot: |
| | | admin: |
| | | # Spring Boot Admin Client 客æ·ç«¯çç¸å
³é
ç½® |
| | | client: |
| | | # 设置 Spring Boot Admin Server å°å |
| | | url: http://localhost:${server.port}${spring.boot.admin.context-path} |
| | | instance: |
| | | prefer-ip: true # 注åå®ä¾æ¶ï¼ä¼å
ä½¿ç¨ IP |
| | | # username: ruoyi |
| | | # password: 123456 |
| | | # Spring Boot Admin Server æå¡ç«¯çç¸å
³é
ç½® |
| | | context-path: /admin # é
ç½® Spring |
| | | |
| | | # Actuator çæ§ç«¯ç¹çé
置项 |
| | | management: |
| | | endpoints: |
| | | web: |
| | | # Actuator æä¾ç API æ¥å£çæ ¹ç®å½ãé»è®¤ä¸º /actuator |
| | | base-path: /actuator |
| | | exposure: |
| | | # éè¦å¼æ¾ç端ç¹ãé»è®¤å¼åªæå¼ health å info 两个端ç¹ãéè¿è®¾ç½® * ï¼å¯ä»¥å¼æ¾ææç«¯ç¹ã |
| | | include: '*' |
| | | endpoint: |
| | | logfile: |
| | | external-file: ./logs/sys-console.log |
| | | |
| | | # tokené
ç½® |
| | | token: |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: abcdefghijklmnopqrstuvwxyz |
| | | # ä»¤çæææï¼é»è®¤30åéï¼ |
| | | expireTime: 30 |
| | | |
| | | # MyBatisé
ç½® |
| | | # 令çèªå®ä¹æ è¯ |
| | | header: Authorization |
| | | # 令çå¯é¥ |
| | | secret: abcdefghijklmnopqrstuvwxyz |
| | | # ä»¤çæææï¼é»è®¤30åéï¼ |
| | | expireTime: 30 |
| | | |
| | | # MyBatisPlusé
ç½® |
| | | # https://baomidou.com/config/ |
| | | mybatis-plus: |
| | | mapperPackage: com.ruoyi.**.mapper |
| | |
| | | # åæ®µéªè¯çç¥ä¹ select,å¨ select çæ¶åçåæ®µéªè¯çç¥æ¢ wrapper æ ¹æ®å
é¨ entity çæç where æ¡ä»¶ |
| | | selectStrategy: NOT_EMPTY |
| | | |
| | | # PageHelperå页æä»¶ |
| | | pagehelper: |
| | | helperDialect: mysql |
| | | reasonable: true |
| | | supportMethodsArguments: true |
| | | params: count=countSql |
| | | |
| | | # Swaggeré
ç½® |
| | | swagger: |
| | | # æ¯å¦å¼å¯swagger |
| | |
| | | version: 'çæ¬å·: ${ruoyi-vue-plus.version}' |
| | | |
| | | # 鲿¢XSSæ»å» |
| | | xss: |
| | | xss: |
| | | # è¿æ»¤å¼å
³ |
| | | enabled: true |
| | | # æé¤é¾æ¥ï¼å¤ä¸ªç¨éå·åéï¼ |
| | |
| | | # å¹é
龿¥ |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |
| | | |
| | | # å
¨å±çº¿ç¨æ± ç¸å
³é
ç½® |
| | | threadPoolConfig: |
| | | # æ¯å¦å¼å¯çº¿ç¨æ± |
| | | enabled: false |
| | |
| | | # AbortPolicy 䏿¢ |
| | | rejectedExecutionHandler: CallerRunsPolicy |
| | | |
| | | # feign ç¸å
³é
ç½® |
| | | feign: |
| | | package: com.ruoyi.**.feign |
| | | # å¼å¯å缩 |
| | |
| | | okhttp: |
| | | enabled: true |
| | | hystrix: |
| | | enabled: true |
| | | enabled: true |
| | | |
| | | --- # 宿¶ä»»å¡é
ç½® |
| | | spring: |
| | | quartz: |
| | | scheduler-name: RuoyiScheduler |
| | | startup-delay: 1s |
| | | overwrite-existing-jobs: true |
| | | auto-startup: true |
| | | job-store-type: jdbc |
| | | properties: |
| | | org: |
| | | quartz: |
| | | # Scheduler ç¸å
³é
ç½® |
| | | scheduler: |
| | | instanceName: RuoyiScheduler |
| | | instanceId: AUTO |
| | | # çº¿ç¨æ± ç¸å
³é
ç½® |
| | | threadPool: |
| | | class: org.quartz.simpl.SimpleThreadPool |
| | | threadCount: 20 |
| | | threadPriority: 5 |
| | | # JobStore é群é
ç½® |
| | | jobStore: |
| | | class: org.quartz.impl.jdbcjobstore.JobStoreTX |
| | | isClustered: true |
| | | clusterCheckinInterval: 15000 |
| | | txIsolationLevelSerializable: true |
| | | misfireThreshold: 60000 |
| | | tablePrefix: QRTZ_ |
| | | # sqlserver å¯ç¨ |
| | | # selectWithLockSQL: SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ? |
| | | |
| | | --- # çæ§é
ç½® |
| | | spring: |
| | | application: |
| | | name: ruoyi-vue-plus |
| | | boot: |
| | | admin: |
| | | # Spring Boot Admin Client 客æ·ç«¯çç¸å
³é
ç½® |
| | | client: |
| | | # 设置 Spring Boot Admin Server å°å |
| | | url: http://localhost:${server.port}${spring.boot.admin.context-path} |
| | | instance: |
| | | prefer-ip: true # 注åå®ä¾æ¶ï¼ä¼å
ä½¿ç¨ IP |
| | | # username: ruoyi |
| | | # password: 123456 |
| | | # Spring Boot Admin Server æå¡ç«¯çç¸å
³é
ç½® |
| | | context-path: /admin # é
ç½® Spring |
| | | |
| | | # Actuator çæ§ç«¯ç¹çé
置项 |
| | | management: |
| | | endpoints: |
| | | web: |
| | | # Actuator æä¾ç API æ¥å£çæ ¹ç®å½ãé»è®¤ä¸º /actuator |
| | | base-path: /actuator |
| | | exposure: |
| | | # éè¦å¼æ¾ç端ç¹ãé»è®¤å¼åªæå¼ health å info 两个端ç¹ãéè¿è®¾ç½® * ï¼å¯ä»¥å¼æ¾ææç«¯ç¹ã |
| | | include: '*' |
| | | endpoint: |
| | | logfile: |
| | | external-file: ./logs/sys-console.log |
| | |
| | | <artifactId>spring-boot-starter-security</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- pagehelper å页æä»¶ --> |
| | | <dependency> |
| | | <groupId>com.github.pagehelper</groupId> |
| | | <artifactId>pagehelper-spring-boot-starter</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- èªå®ä¹éªè¯æ³¨è§£ --> |
| | | <dependency> |
| | | <groupId>javax.validation</groupId> |
| | |
| | | package com.ruoyi.common.core.controller; |
| | | |
| | | import cn.hutool.core.lang.Validator; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.http.HttpStatus; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.PageDomain; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.core.page.TableSupport; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.sql.SqlUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.web.bind.WebDataBinder; |
| | |
| | | |
| | | import java.beans.PropertyEditorSupport; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * webå±éç¨æ°æ®å¤ç |
| | |
| | | setValue(DateUtils.parseDate(text)); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 设置请æ±åé¡µæ°æ® |
| | | */ |
| | | protected void startPage() |
| | | { |
| | | PageDomain pageDomain = TableSupport.buildPageRequest(); |
| | | Integer pageNum = pageDomain.getPageNum(); |
| | | Integer pageSize = pageDomain.getPageSize(); |
| | | if (Validator.isNotNull(pageNum) && Validator.isNotNull(pageSize)) |
| | | { |
| | | String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy()); |
| | | PageHelper.startPage(pageNum, pageSize, orderBy); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ååºè¯·æ±åé¡µæ°æ® |
| | | */ |
| | | @SuppressWarnings({ "rawtypes", "unchecked" }) |
| | | protected <T> TableDataInfo<T> getDataTable(List<T> list) |
| | | { |
| | | TableDataInfo<T> rspData = new TableDataInfo(); |
| | | rspData.setCode(HttpStatus.HTTP_OK); |
| | | rspData.setMsg("æ¥è¯¢æå"); |
| | | rspData.setRows(list); |
| | | rspData.setTotal(new PageInfo(list).getTotal()); |
| | | return rspData; |
| | | } |
| | | |
| | | /** |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.core.page; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * èªå®ä¹ Mapper æ¥å£, å®ç° èªå®ä¹æ©å± |
| | | * |
| | | * @author Lion Li |
| | | * @since 2021-05-13 |
| | | */ |
| | | public interface BaseMapperPlus<T> extends BaseMapper<T> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.core.page; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * èªå®ä¹ Service æ¥å£, å®ç° æ°æ®åºå®ä½ä¸ vo 对象转æ¢è¿å |
| | | * |
| | | * @author Lion Li |
| | | * @since 2021-05-13 |
| | | */ |
| | | public interface IServicePlus<T> extends IService<T> { |
| | | |
| | | /** |
| | | * æ ¹æ® ID æ¥è¯¢ |
| | | * |
| | | * @param kClass voç±»å |
| | | * @param id 主é®ID |
| | | */ |
| | | default <K> K getVoById(Serializable id, Class<K> kClass) { |
| | | T t = getBaseMapper().selectById(id); |
| | | return BeanUtil.toBean(t, kClass); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ï¼æ ¹æ®ID æ¹éæ¥è¯¢ï¼ |
| | | * |
| | | * @param kClass voç±»å |
| | | * @param idList 主é®IDå表 |
| | | */ |
| | | default <K> List<K> listVoByIds(Collection<? extends Serializable> idList, Class<K> kClass) { |
| | | List<T> list = getBaseMapper().selectBatchIds(idList); |
| | | if (list == null) { |
| | | return null; |
| | | } |
| | | return list.stream() |
| | | .map(any -> BeanUtil.toBean(any, kClass)) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ï¼æ ¹æ® columnMap æ¡ä»¶ï¼ |
| | | * |
| | | * @param kClass voç±»å |
| | | * @param columnMap è¡¨åæ®µ map 对象 |
| | | */ |
| | | default <K> List<K> listVoByMap(Map<String, Object> columnMap, Class<K> kClass) { |
| | | List<T> list = getBaseMapper().selectByMap(columnMap); |
| | | if (list == null) { |
| | | return null; |
| | | } |
| | | return list.stream() |
| | | .map(any -> BeanUtil.toBean(any, kClass)) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ® Wrapperï¼æ¥è¯¢ä¸æ¡è®°å½ <br/> |
| | | * <p>ç»æéï¼å¦ææ¯å¤ä¸ªä¼æåºå¼å¸¸ï¼éæºå䏿¡å ä¸éå¶æ¡ä»¶ wrapper.last("LIMIT 1")</p> |
| | | * |
| | | * @param kClass voç±»å |
| | | * @param queryWrapper å®ä½å¯¹è±¡å°è£
æä½ç±» {@link com.baomidou.mybatisplus.core.conditions.query.QueryWrapper} |
| | | */ |
| | | default <K> K getVoOne(Wrapper<T> queryWrapper, Class<K> kClass) { |
| | | return BeanUtil.toBean(getOne(queryWrapper, true), kClass); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å表 |
| | | * |
| | | * @param kClass voç±»å |
| | | * @param queryWrapper å®ä½å¯¹è±¡å°è£
æä½ç±» {@link com.baomidou.mybatisplus.core.conditions.query.QueryWrapper} |
| | | */ |
| | | default <K> List<K> listVo(Wrapper<T> queryWrapper, Class<K> kClass) { |
| | | List<T> list = getBaseMapper().selectList(queryWrapper); |
| | | if (list == null) { |
| | | return null; |
| | | } |
| | | return list.stream() |
| | | .map(any -> BeanUtil.toBean(any, kClass)) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ææ |
| | | * |
| | | * @param kClass voç±»å |
| | | * @see Wrappers#emptyWrapper() |
| | | */ |
| | | default <K> List<K> listVo(Class<K> kClass) { |
| | | return listVo(Wrappers.emptyWrapper(), kClass); |
| | | } |
| | | |
| | | /** |
| | | * 翻页æ¥è¯¢ |
| | | * |
| | | * @param page 翻页对象 |
| | | * @param queryWrapper å®ä½å¯¹è±¡å°è£
æä½ç±» |
| | | * @param kClass voç±»å |
| | | */ |
| | | default <K> PagePlus<T, K> pageVo(PagePlus<T, K> page, Wrapper<T> queryWrapper, Class<K> kClass) { |
| | | PagePlus<T, K> e = getBaseMapper().selectPage(page, queryWrapper); |
| | | page.recordsToVo(kClass); |
| | | return page; |
| | | } |
| | | |
| | | /** |
| | | * æ æ¡ä»¶ç¿»é¡µæ¥è¯¢ |
| | | * |
| | | * @param page 翻页对象 |
| | | * @param kClass voç±»å |
| | | */ |
| | | default <K> PagePlus<T, K> pageVo(PagePlus<T, K> page, Class<K> kClass) { |
| | | return pageVo(page, Wrappers.emptyWrapper(), kClass); |
| | | } |
| | | |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.core.page; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.metadata.OrderItem; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Data |
| | | @Accessors(chain = true) |
| | | public class PagePlus<T,K> implements IPage<T> { |
| | | |
| | | protected List<T> records; |
| | | protected List<K> recordsVo; |
| | | protected long total; |
| | | protected long size; |
| | | protected long current; |
| | | protected List<OrderItem> orders; |
| | | protected boolean optimizeCountSql; |
| | | protected boolean isSearchCount; |
| | | protected boolean hitCount; |
| | | protected String countId; |
| | | protected Long maxLimit; |
| | | |
| | | public PagePlus() { |
| | | this.records = Collections.emptyList(); |
| | | this.recordsVo = Collections.emptyList(); |
| | | this.total = 0L; |
| | | this.size = 10L; |
| | | this.current = 1L; |
| | | this.orders = new ArrayList(); |
| | | this.optimizeCountSql = true; |
| | | this.isSearchCount = true; |
| | | this.hitCount = false; |
| | | } |
| | | |
| | | public PagePlus(long current, long size) { |
| | | this(current, size, 0L); |
| | | } |
| | | |
| | | public PagePlus(long current, long size, long total) { |
| | | this(current, size, total, true); |
| | | } |
| | | |
| | | public PagePlus(long current, long size, boolean isSearchCount) { |
| | | this(current, size, 0L, isSearchCount); |
| | | } |
| | | |
| | | public PagePlus(long current, long size, long total, boolean isSearchCount) { |
| | | this.records = Collections.emptyList(); |
| | | this.total = 0L; |
| | | this.size = 10L; |
| | | this.current = 1L; |
| | | this.orders = new ArrayList(); |
| | | this.optimizeCountSql = true; |
| | | this.isSearchCount = true; |
| | | this.hitCount = false; |
| | | if (current > 1L) { |
| | | this.current = current; |
| | | } |
| | | |
| | | this.size = size; |
| | | this.total = total; |
| | | this.isSearchCount = isSearchCount; |
| | | } |
| | | |
| | | public boolean hasPrevious() { |
| | | return this.current > 1L; |
| | | } |
| | | |
| | | public boolean hasNext() { |
| | | return this.current < this.getPages(); |
| | | } |
| | | |
| | | public void recordsToVo(Class<K> kClass) { |
| | | this.recordsVo = this.records.stream() |
| | | .map(any -> BeanUtil.toBean(any, kClass)) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | |
| | | @Override |
| | | public String countId() { |
| | | return this.getCountId(); |
| | | } |
| | | |
| | | @Override |
| | | public Long maxLimit() { |
| | | return this.getMaxLimit(); |
| | | } |
| | | |
| | | public PagePlus<T, K> addOrder(OrderItem... items) { |
| | | this.orders.addAll(Arrays.asList(items)); |
| | | return this; |
| | | } |
| | | |
| | | public PagePlus<T, K> addOrder(List<OrderItem> items) { |
| | | this.orders.addAll(items); |
| | | return this; |
| | | } |
| | | |
| | | @Override |
| | | public List<OrderItem> orders() { |
| | | return this.getOrders(); |
| | | } |
| | | |
| | | @Override |
| | | public boolean optimizeCountSql() { |
| | | return this.optimizeCountSql; |
| | | } |
| | | |
| | | @Override |
| | | public boolean isSearchCount() { |
| | | return this.total < 0L ? false : this.isSearchCount; |
| | | } |
| | | |
| | | public PagePlus<T, K> setSearchCount(boolean isSearchCount) { |
| | | this.isSearchCount = isSearchCount; |
| | | return this; |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.common.core.page; |
| | | |
| | | import lombok.*; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | * @param list åè¡¨æ°æ® |
| | | * @param total æ»è®°å½æ° |
| | | */ |
| | | public TableDataInfo(List<T> list, int total) |
| | | public TableDataInfo(List<T> list, long total) |
| | | { |
| | | this.rows = list; |
| | | this.total = total; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.utils; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.http.HttpStatus; |
| | | import com.baomidou.mybatisplus.core.metadata.OrderItem; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.page.PagePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.utils.sql.SqlUtil; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å页工å
· |
| | | * |
| | | * @author Lion Li |
| | | */ |
| | | public class PageUtils { |
| | | |
| | | /** |
| | | * å½åè®°å½èµ·å§ç´¢å¼ |
| | | */ |
| | | public static final String PAGE_NUM = "pageNum"; |
| | | |
| | | /** |
| | | * æ¯é¡µæ¾ç¤ºè®°å½æ° |
| | | */ |
| | | public static final String PAGE_SIZE = "pageSize"; |
| | | |
| | | /** |
| | | * æåºå |
| | | */ |
| | | public static final String ORDER_BY_COLUMN = "orderByColumn"; |
| | | |
| | | /** |
| | | * æåºçæ¹å "desc" æè
"asc". |
| | | */ |
| | | public static final String IS_ASC = "isAsc"; |
| | | |
| | | public static <T, K> PagePlus<T, K> buildPagePlus() { |
| | | Integer pageNum = ServletUtils.getParameterToInt(PAGE_NUM); |
| | | Integer pageSize = ServletUtils.getParameterToInt(PAGE_SIZE); |
| | | String orderByColumn = ServletUtils.getParameter(ORDER_BY_COLUMN); |
| | | String isAsc = ServletUtils.getParameter(IS_ASC); |
| | | PagePlus<T, K> page = new PagePlus<>(pageNum, pageSize); |
| | | if (StrUtil.isNotBlank(orderByColumn)) { |
| | | String orderBy = SqlUtil.escapeOrderBySql(orderByColumn); |
| | | if ("asc".equals(isAsc)) { |
| | | page.addOrder(OrderItem.asc(orderBy)); |
| | | } else if ("desc".equals(isAsc)) { |
| | | page.addOrder(OrderItem.desc(orderBy)); |
| | | } |
| | | } |
| | | return page; |
| | | } |
| | | |
| | | public static <T> Page<T> buildPage() { |
| | | Integer pageNum = ServletUtils.getParameterToInt(PAGE_NUM); |
| | | Integer pageSize = ServletUtils.getParameterToInt(PAGE_SIZE); |
| | | String orderByColumn = ServletUtils.getParameter(ORDER_BY_COLUMN); |
| | | String isAsc = ServletUtils.getParameter(IS_ASC); |
| | | Page<T> page = new Page<>(pageNum, pageSize); |
| | | if (StrUtil.isNotBlank(orderByColumn)) { |
| | | String orderBy = SqlUtil.escapeOrderBySql(orderByColumn); |
| | | if ("asc".equals(isAsc)) { |
| | | page.addOrder(OrderItem.asc(orderBy)); |
| | | } else if ("desc".equals(isAsc)) { |
| | | page.addOrder(OrderItem.desc(orderBy)); |
| | | } |
| | | } |
| | | return page; |
| | | } |
| | | |
| | | public static <T, K> TableDataInfo<K> buildDataInfo(PagePlus<T, K> page) { |
| | | TableDataInfo<K> rspData = new TableDataInfo<>(); |
| | | rspData.setCode(HttpStatus.HTTP_OK); |
| | | rspData.setMsg("æ¥è¯¢æå"); |
| | | rspData.setRows(page.getRecordsVo()); |
| | | rspData.setTotal(page.getTotal()); |
| | | return rspData; |
| | | } |
| | | |
| | | public static <T> TableDataInfo<T> buildDataInfo(Page<T> page) { |
| | | TableDataInfo<T> rspData = new TableDataInfo<>(); |
| | | rspData.setCode(HttpStatus.HTTP_OK); |
| | | rspData.setMsg("æ¥è¯¢æå"); |
| | | rspData.setRows(page.getRecords()); |
| | | rspData.setTotal(page.getTotal()); |
| | | return rspData; |
| | | } |
| | | |
| | | public static <T> TableDataInfo<T> buildDataInfo(List<T> list) { |
| | | TableDataInfo<T> rspData = new TableDataInfo<>(); |
| | | rspData.setCode(HttpStatus.HTTP_OK); |
| | | rspData.setMsg("æ¥è¯¢æå"); |
| | | rspData.setRows(list); |
| | | rspData.setTotal(list.size()); |
| | | return rspData; |
| | | } |
| | | |
| | | } |
| | |
| | | <artifactId>spring-boot-starter-aop</artifactId>
|
| | | </dependency>
|
| | |
|
| | | <!-- SpringBoot æ ¡éªæ¡æ¶ -->
|
| | | <dependency>
|
| | | <groupId>org.springframework.boot</groupId>
|
| | | <artifactId>spring-boot-starter-validation</artifactId>
|
| | | </dependency>
|
| | |
|
| | | <!-- é¿éæ°æ®åºè¿æ¥æ± -->
|
| | | <dependency>
|
| | | <groupId>com.alibaba</groupId>
|
| | |
| | | package com.ruoyi.generator.controller; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.generator.domain.GenTable; |
| | | import com.ruoyi.generator.domain.GenTableColumn; |
| | | import com.ruoyi.generator.service.IGenTableColumnService; |
| | | import com.ruoyi.generator.service.IGenTableService; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 代ç çæ æä½å¤ç |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo genList(GenTable genTable) |
| | | { |
| | | startPage(); |
| | | List<GenTable> list = genTableService.selectGenTableList(genTable); |
| | | return getDataTable(list); |
| | | return genTableService.selectPageGenTableList(genTable); |
| | | } |
| | | |
| | | /** |
| | |
| | | @GetMapping("/db/list") |
| | | public TableDataInfo dataList(GenTable genTable) |
| | | { |
| | | startPage(); |
| | | List<GenTable> list = genTableService.selectDbTableList(genTable); |
| | | return getDataTable(list); |
| | | return genTableService.selectPageDbTableList(genTable); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.generator.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | import com.ruoyi.generator.domain.GenTableColumn; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface GenTableColumnMapper extends BaseMapper<GenTableColumn> { |
| | | public interface GenTableColumnMapper extends BaseMapperPlus<GenTableColumn> { |
| | | /** |
| | | * æ ¹æ®è¡¨åç§°æ¥è¯¢åä¿¡æ¯ |
| | | * |
| | |
| | | package com.ruoyi.generator.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | import com.ruoyi.generator.domain.GenTable; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface GenTableMapper extends BaseMapper<GenTable> { |
| | | public interface GenTableMapper extends BaseMapperPlus<GenTable> { |
| | | |
| | | |
| | | Page<GenTable> selectPageGenTableList(@Param("page") Page<GenTable> page, @Param("genTable") GenTable genTable); |
| | | |
| | | Page<GenTable> selectPageDbTableList(@Param("page") Page<GenTable> page, @Param("genTable") GenTable genTable); |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¸å¡å表 |
| | | * |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.constant.GenConstants; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.CustomException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | | import com.ruoyi.generator.domain.GenTable; |
| | |
| | | return genTable; |
| | | } |
| | | |
| | | @Override |
| | | public TableDataInfo<GenTable> selectPageGenTableList(GenTable genTable) { |
| | | return PageUtils.buildDataInfo(baseMapper.selectPageGenTableList(PageUtils.buildPage(), genTable)); |
| | | } |
| | | |
| | | @Override |
| | | public TableDataInfo<GenTable> selectPageDbTableList(GenTable genTable) { |
| | | return PageUtils.buildDataInfo(baseMapper.selectPageDbTableList(PageUtils.buildPage(), genTable)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¸å¡å表 |
| | | * |
| | |
| | | package com.ruoyi.generator.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.generator.domain.GenTableColumn; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface IGenTableColumnService extends IService<GenTableColumn> { |
| | | public interface IGenTableColumnService extends IServicePlus<GenTableColumn> { |
| | | /** |
| | | * æ¥è¯¢ä¸å¡å段å表 |
| | | * |
| | |
| | | package com.ruoyi.generator.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.generator.domain.GenTable; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface IGenTableService extends IService<GenTable> { |
| | | public interface IGenTableService extends IServicePlus<GenTable> { |
| | | |
| | | |
| | | TableDataInfo<GenTable> selectPageGenTableList(GenTable genTable); |
| | | |
| | | |
| | | TableDataInfo<GenTable> selectPageDbTableList(GenTable genTable); |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¸å¡å表 |
| | | * |
| | |
| | | <sql id="selectGenTableVo"> |
| | | select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table |
| | | </sql> |
| | | |
| | | <select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult"> |
| | | |
| | | <select id="selectPageGenTableList" parameterType="GenTable" resultMap="GenTableResult"> |
| | | <include refid="selectGenTableVo"/> |
| | | <where> |
| | | <if test="genTable.tableName != null and genTable.tableName != ''"> |
| | | AND lower(table_name) like lower(concat('%', #{genTable.tableName}, '%')) |
| | | </if> |
| | | <if test="genTable.tableComment != null and genTable.tableComment != ''"> |
| | | AND lower(table_comment) like lower(concat('%', #{genTable.tableComment}, '%')) |
| | | </if> |
| | | <if test="genTable.params.beginTime != null and genTable.params.beginTime != ''"><!-- å¼å§æ¶é´æ£ç´¢ --> |
| | | AND date_format(create_time,'%y%m%d') >= date_format(#{genTable.params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="genTable.params.endTime != null and genTable.params.endTime != ''"><!-- ç»ææ¶é´æ£ç´¢ --> |
| | | AND date_format(create_time,'%y%m%d') <= date_format(#{genTable.params.endTime},'%y%m%d') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPageDbTableList" parameterType="GenTable" resultMap="GenTableResult"> |
| | | select table_name, table_comment, create_time, update_time from information_schema.tables |
| | | where table_schema = (select database()) |
| | | AND table_name NOT LIKE 'qrtz_%' AND table_name NOT LIKE 'gen_%' |
| | | AND table_name NOT IN (select table_name from gen_table) |
| | | <if test="genTable.tableName != null and genTable.tableName != ''"> |
| | | AND lower(table_name) like lower(concat('%', #{genTable.tableName}, '%')) |
| | | </if> |
| | | <if test="genTable.tableComment != null and genTable.tableComment != ''"> |
| | | AND lower(table_comment) like lower(concat('%', #{genTable.tableComment}, '%')) |
| | | </if> |
| | | <if test="genTable.params.beginTime != null and genTable.params.beginTime != ''"><!-- å¼å§æ¶é´æ£ç´¢ --> |
| | | AND date_format(create_time,'%y%m%d') >= date_format(#{genTable.params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="genTable.params.endTime != null and genTable.params.endTime != ''"><!-- ç»ææ¶é´æ£ç´¢ --> |
| | | AND date_format(create_time,'%y%m%d') <= date_format(#{genTable.params.endTime},'%y%m%d') |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult"> |
| | | <include refid="selectGenTableVo"/> |
| | | <where> |
| | | <if test="tableName != null and tableName != ''"> |
| | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | import javax.validation.constraints.*; |
| | | |
| | | |
| | | #foreach ($import in $importList) |
| | |
| | | #if($column.javaType == 'Date') |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | #end |
| | | #if($column.javaType == 'String') |
| | | @NotBlank(message = "$column.columnCommentä¸è½ä¸ºç©º") |
| | | #else |
| | | @NotNull(message = "$column.columnCommentä¸è½ä¸ºç©º") |
| | | #end |
| | | private $column.javaType $column.javaField; |
| | | #end |
| | | #end |
| | |
| | | import java.util.Arrays; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import javax.validation.constraints.*; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:list')") |
| | | @GetMapping("/list") |
| | | #if($table.crud || $table.sub) |
| | | public TableDataInfo<${ClassName}Vo> list(${ClassName}QueryBo bo) { |
| | | startPage(); |
| | | List<${ClassName}Vo> list = i${ClassName}Service.queryList(bo); |
| | | return getDataTable(list); |
| | | public TableDataInfo<${ClassName}Vo> list(@Validated ${ClassName}QueryBo bo) { |
| | | return i${ClassName}Service.queryPageList(bo); |
| | | } |
| | | #elseif($table.tree) |
| | | public AjaxResult<${ClassName}Vo> list(${ClassName}QueryBo bo) { |
| | | public AjaxResult<List<${ClassName}Vo>> list(@Validated ${ClassName}QueryBo bo) { |
| | | List<${ClassName}Vo> list = i${ClassName}Service.queryList(bo); |
| | | return AjaxResult.success(list); |
| | | } |
| | |
| | | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')") |
| | | @Log(title = "${functionName}", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public AjaxResult<${ClassName}Vo> export(${ClassName}QueryBo bo) { |
| | | public AjaxResult<${ClassName}Vo> export(@Validated ${ClassName}QueryBo bo) { |
| | | List<${ClassName}Vo> list = i${ClassName}Service.queryList(bo); |
| | | ExcelUtil<${ClassName}Vo> util = new ExcelUtil<${ClassName}Vo>(${ClassName}Vo.class); |
| | | return util.exportExcel(list, "${functionName}"); |
| | |
| | | @ApiOperation("è·å${functionName}详ç»ä¿¡æ¯") |
| | | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:query')") |
| | | @GetMapping("/{${pkColumn.javaField}}") |
| | | public AjaxResult<${ClassName}Vo> getInfo(@PathVariable("${pkColumn.javaField}" ) ${pkColumn.javaType} ${pkColumn.javaField}) { |
| | | public AjaxResult<${ClassName}Vo> getInfo(@NotNull(message = "主é®ä¸è½ä¸ºç©º") |
| | | @PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) { |
| | | return AjaxResult.success(i${ClassName}Service.queryById(${pkColumn.javaField})); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:add')") |
| | | @Log(title = "${functionName}", businessType = BusinessType.INSERT) |
| | | @PostMapping() |
| | | public AjaxResult<Void> add(@RequestBody ${ClassName}AddBo bo) { |
| | | public AjaxResult<Void> add(@Validated @RequestBody ${ClassName}AddBo bo) { |
| | | return toAjax(i${ClassName}Service.insertByAddBo(bo) ? 1 : 0); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:edit')") |
| | | @Log(title = "${functionName}", businessType = BusinessType.UPDATE) |
| | | @PutMapping() |
| | | public AjaxResult<Void> edit(@RequestBody ${ClassName}EditBo bo) { |
| | | public AjaxResult<Void> edit(@Validated @RequestBody ${ClassName}EditBo bo) { |
| | | return toAjax(i${ClassName}Service.updateByEditBo(bo) ? 1 : 0); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:remove')") |
| | | @Log(title = "${functionName}" , businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{${pkColumn.javaField}s}") |
| | | public AjaxResult<Void> remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) { |
| | | public AjaxResult<Void> remove(@NotEmpty(message = "主é®ä¸è½ä¸ºç©º") |
| | | @PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) { |
| | | return toAjax(i${ClassName}Service.deleteWithValidByIds(Arrays.asList(${pkColumn.javaField}s), true) ? 1 : 0); |
| | | } |
| | | } |
| | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | import javax.validation.constraints.*; |
| | | |
| | | #foreach ($import in $importList) |
| | | import ${import}; |
| | |
| | | #if($column.javaType == 'Date') |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | #end |
| | | #if($column.javaType == 'String') |
| | | @NotBlank(message = "$column.columnCommentä¸è½ä¸ºç©º") |
| | | #else |
| | | @NotNull(message = "$column.columnCommentä¸è½ä¸ºç©º") |
| | | #end |
| | | private $column.javaType $column.javaField; |
| | | #end |
| | | #end |
| | |
| | | package ${packageName}.mapper; |
| | | |
| | | import ${packageName}.domain.${ClassName}; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | |
| | | /** |
| | | * ${functionName}Mapperæ¥å£ |
| | |
| | | * @author ${author} |
| | | * @date ${datetime} |
| | | */ |
| | | public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> { |
| | | public interface ${ClassName}Mapper extends BaseMapperPlus<${ClassName}> { |
| | | |
| | | } |
| | |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | import java.util.HashMap; |
| | | |
| | | #foreach ($import in $importList) |
| | | import ${import}; |
| | |
| | | #elseif($table.tree) |
| | | #set($Entity="TreeEntity") |
| | | #end |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel("${functionName}å页æ¥è¯¢å¯¹è±¡") |
| | |
| | | import ${packageName}.bo.${ClassName}QueryBo; |
| | | import ${packageName}.bo.${ClassName}AddBo; |
| | | import ${packageName}.bo.${ClassName}EditBo; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | #if($table.crud || $table.sub) |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | #end |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | |
| | | * @author ${author} |
| | | * @date ${datetime} |
| | | */ |
| | | public interface I${ClassName}Service extends IService<${ClassName}> { |
| | | public interface I${ClassName}Service extends IServicePlus<${ClassName}> { |
| | | /** |
| | | * æ¥è¯¢å个 |
| | | * @return |
| | | */ |
| | | ${ClassName}Vo queryById(${pkColumn.javaType} ${pkColumn.javaField}); |
| | | |
| | | #if($table.crud || $table.sub) |
| | | /** |
| | | * æ¥è¯¢å表 |
| | | */ |
| | | TableDataInfo<${ClassName}Vo> queryPageList(${ClassName}QueryBo bo); |
| | | #end |
| | | /** |
| | | * æ¥è¯¢å表 |
| | | */ |
| | |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | #if($table.crud || $table.sub) |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.core.page.PagePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | #end |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.Page; |
| | | import ${packageName}.bo.${ClassName}AddBo; |
| | | import ${packageName}.bo.${ClassName}QueryBo; |
| | | import ${packageName}.bo.${ClassName}EditBo; |
| | |
| | | import ${packageName}.vo.${ClassName}Vo; |
| | | import ${packageName}.service.I${ClassName}Service; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | import java.util.Map; |
| | | import java.util.Collection; |
| | | |
| | | /** |
| | | * ${functionName}Serviceä¸å¡å±å¤ç |
| | |
| | | |
| | | @Override |
| | | public ${ClassName}Vo queryById(${pkColumn.javaType} ${pkColumn.javaField}){ |
| | | ${ClassName} db = this.baseMapper.selectById(${pkColumn.javaField}); |
| | | return BeanUtil.toBean(db, ${ClassName}Vo.class); |
| | | return getVoById(${pkColumn.javaField}, ${ClassName}Vo.class); |
| | | } |
| | | |
| | | #if($table.crud || $table.sub) |
| | | @Override |
| | | public TableDataInfo<${ClassName}Vo> queryPageList(${ClassName}QueryBo bo) { |
| | | PagePlus<${ClassName}, ${ClassName}Vo> result = pageVo(PageUtils.buildPagePlus(), buildQueryWrapper(bo), ${ClassName}Vo.class); |
| | | return PageUtils.buildDataInfo(result); |
| | | } |
| | | #end |
| | | |
| | | @Override |
| | | public List<${ClassName}Vo> queryList(${ClassName}QueryBo bo) { |
| | | return listVo(buildQueryWrapper(bo), ${ClassName}Vo.class); |
| | | } |
| | | |
| | | private LambdaQueryWrapper<${ClassName}> buildQueryWrapper(${ClassName}QueryBo bo) { |
| | | Map<String, Object> params = bo.getParams(); |
| | | LambdaQueryWrapper<${ClassName}> lqw = Wrappers.lambdaQuery(); |
| | | #foreach($column in $columns) |
| | | #if($column.query) |
| | |
| | | #end |
| | | lqw.$mpMethod($condition, ${ClassName}::get$AttrName, bo.get$AttrName()); |
| | | #else |
| | | Object dataScope = bo.getParams().get("dataScope"); |
| | | lqw.apply(dataScope != null, dataScope != null ? dataScope.toString() : null); |
| | | Map<String, Object> params = bo.getParams(); |
| | | if (params.get("begin$AttrName") != null && params.get("end$AttrName") != null) { |
| | | lqw.between(${ClassName}::get$AttrName ,params.get("begin$AttrName"), params.get("end$AttrName")); |
| | | } |
| | | lqw.between(params.get("begin$AttrName") != null && params.get("end$AttrName") != null, |
| | | ${ClassName}::get$AttrName ,params.get("begin$AttrName"), params.get("end$AttrName")); |
| | | #end |
| | | #end |
| | | #end |
| | | return entity2Vo(this.list(lqw)); |
| | | } |
| | | |
| | | /** |
| | | * å®ä½ç±»è½¬åæè§å¾å¯¹è±¡ |
| | | * |
| | | * @param collection å®ä½ç±»éå |
| | | * @return |
| | | */ |
| | | private List<${ClassName}Vo> entity2Vo(Collection<${ClassName}> collection) { |
| | | List<${ClassName}Vo> voList = collection.stream() |
| | | .map(any -> BeanUtil.toBean(any, ${ClassName}Vo.class)) |
| | | .collect(Collectors.toList()); |
| | | if (collection instanceof Page) { |
| | | Page<${ClassName}> page = (Page<${ClassName}>)collection; |
| | | Page<${ClassName}Vo> pageVo = new Page<>(); |
| | | BeanUtil.copyProperties(page,pageVo); |
| | | pageVo.addAll(voList); |
| | | voList = pageVo; |
| | | } |
| | | return voList; |
| | | return lqw; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean insertByAddBo(${ClassName}AddBo bo) { |
| | | ${ClassName} add = BeanUtil.toBean(bo, ${ClassName}.class); |
| | | validEntityBeforeSave(add); |
| | | return this.save(add); |
| | | return save(add); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean updateByEditBo(${ClassName}EditBo bo) { |
| | | ${ClassName} update = BeanUtil.toBean(bo, ${ClassName}.class); |
| | | validEntityBeforeSave(update); |
| | | return this.updateById(update); |
| | | return updateById(update); |
| | | } |
| | | |
| | | /** |
| | |
| | | if(isValid){ |
| | | //TODO åä¸äºä¸å¡ä¸çæ ¡éª,夿æ¯å¦éè¦æ ¡éª |
| | | } |
| | | return this.removeByIds(ids); |
| | | return removeByIds(ids); |
| | | } |
| | | } |
| | |
| | |
|
| | | <!-- 宿¶ä»»å¡ -->
|
| | | <dependency>
|
| | | <groupId>org.quartz-scheduler</groupId>
|
| | | <artifactId>quartz</artifactId>
|
| | | <groupId>org.springframework.boot</groupId>
|
| | | <artifactId>spring-boot-starter-quartz</artifactId>
|
| | | <exclusions>
|
| | | <exclusion>
|
| | | <groupId>com.mchange</groupId>
|
| | |
| | | package com.ruoyi.quartz.config;
|
| | |
|
| | | import org.springframework.context.annotation.Bean;
|
| | | import org.springframework.context.annotation.Configuration;
|
| | | import org.springframework.scheduling.quartz.SchedulerFactoryBean;
|
| | | import javax.sql.DataSource;
|
| | | import java.util.Properties;
|
| | |
|
| | | /**
|
| | | * 宿¶ä»»å¡é
ç½®
|
| | | * |
| | | * @author ruoyi
|
| | | *
|
| | | * @author Lion Li
|
| | | */
|
| | | @Configuration
|
| | | public class ScheduleConfig
|
| | | {
|
| | | @Bean
|
| | | public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource)
|
| | | {
|
| | | SchedulerFactoryBean factory = new SchedulerFactoryBean();
|
| | | factory.setDataSource(dataSource);
|
| | | public class ScheduleConfig {
|
| | |
|
| | | // quartzåæ°
|
| | | Properties prop = new Properties();
|
| | | prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler");
|
| | | prop.put("org.quartz.scheduler.instanceId", "AUTO");
|
| | | // çº¿ç¨æ± é
ç½®
|
| | | prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool");
|
| | | prop.put("org.quartz.threadPool.threadCount", "20");
|
| | | prop.put("org.quartz.threadPool.threadPriority", "5");
|
| | | // JobStoreé
ç½®
|
| | | prop.put("org.quartz.jobStore.class", "org.quartz.impl.jdbcjobstore.JobStoreTX");
|
| | | // é群é
ç½®
|
| | | prop.put("org.quartz.jobStore.isClustered", "true");
|
| | | prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000");
|
| | | prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1");
|
| | | prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true");
|
| | |
|
| | | // sqlserver å¯ç¨
|
| | | // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?");
|
| | | prop.put("org.quartz.jobStore.misfireThreshold", "12000");
|
| | | prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
|
| | | factory.setQuartzProperties(prop);
|
| | |
|
| | | factory.setSchedulerName("RuoyiScheduler");
|
| | | // å»¶æ¶å¯å¨
|
| | | factory.setStartupDelay(1);
|
| | | factory.setApplicationContextSchedulerContextKey("applicationContextKey");
|
| | | // å¯éï¼QuartzScheduler
|
| | | // å¯å¨æ¶æ´æ°å·±åå¨çJobï¼è¿æ ·å°±ä¸ç¨æ¯æ¬¡ä¿®æ¹targetObjectåå é¤qrtz_job_details表对åºè®°å½äº
|
| | | factory.setOverwriteExistingJobs(true);
|
| | | // 设置èªå¨å¯å¨ï¼é»è®¤ä¸ºtrue
|
| | | factory.setAutoStartup(true);
|
| | |
|
| | | return factory;
|
| | | }
|
| | | }
|
| | |
| | | package com.ruoyi.quartz.controller;
|
| | |
|
| | | import java.util.List;
|
| | | import org.quartz.SchedulerException;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.PathVariable;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.RequestBody;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.ruoyi.common.annotation.Log;
|
| | | import com.ruoyi.common.core.controller.BaseController;
|
| | | import com.ruoyi.common.core.domain.AjaxResult;
|
| | |
| | | import com.ruoyi.quartz.domain.SysJob;
|
| | | import com.ruoyi.quartz.service.ISysJobService;
|
| | | import com.ruoyi.quartz.util.CronUtils;
|
| | | import org.quartz.SchedulerException;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * è°åº¦ä»»å¡ä¿¡æ¯æä½å¤ç
|
| | |
| | | @GetMapping("/list")
|
| | | public TableDataInfo list(SysJob sysJob)
|
| | | {
|
| | | startPage();
|
| | | List<SysJob> list = jobService.selectJobList(sysJob);
|
| | | return getDataTable(list);
|
| | | return jobService.selectPageJobList(sysJob);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | package com.ruoyi.quartz.controller;
|
| | |
|
| | | import java.util.List;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.PathVariable;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.ruoyi.common.annotation.Log;
|
| | | import com.ruoyi.common.core.controller.BaseController;
|
| | | import com.ruoyi.common.core.domain.AjaxResult;
|
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil;
|
| | | import com.ruoyi.quartz.domain.SysJobLog;
|
| | | import com.ruoyi.quartz.service.ISysJobLogService;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * è°åº¦æ¥å¿æä½å¤ç
|
| | |
| | | @GetMapping("/list")
|
| | | public TableDataInfo list(SysJobLog sysJobLog)
|
| | | {
|
| | | startPage();
|
| | | List<SysJobLog> list = jobLogService.selectJobLogList(sysJobLog);
|
| | | return getDataTable(list);
|
| | | return jobLogService.selectPageJobLogList(sysJobLog);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | package com.ruoyi.quartz.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.ruoyi.common.core.page.BaseMapperPlus;
|
| | | import com.ruoyi.quartz.domain.SysJobLog;
|
| | |
|
| | | /**
|
| | |
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | public interface SysJobLogMapper extends BaseMapper<SysJobLog> {
|
| | | public interface SysJobLogMapper extends BaseMapperPlus<SysJobLog> {
|
| | |
|
| | | }
|
| | |
| | | package com.ruoyi.quartz.mapper;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
| | | import com.ruoyi.common.core.page.BaseMapperPlus;
|
| | | import com.ruoyi.quartz.domain.SysJob;
|
| | |
|
| | | /**
|
| | |
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | public interface SysJobMapper extends BaseMapper<SysJob> {
|
| | | public interface SysJobMapper extends BaseMapperPlus<SysJob> {
|
| | |
|
| | | }
|
| | |
| | | package com.ruoyi.quartz.service;
|
| | |
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | | import com.ruoyi.common.core.page.IServicePlus;
|
| | | import com.ruoyi.common.core.page.TableDataInfo;
|
| | | import com.ruoyi.quartz.domain.SysJobLog;
|
| | |
|
| | | import java.util.List;
|
| | |
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | public interface ISysJobLogService extends IService<SysJobLog> {
|
| | | public interface ISysJobLogService extends IServicePlus<SysJobLog> {
|
| | |
|
| | |
|
| | | TableDataInfo<SysJobLog> selectPageJobLogList(SysJobLog jobLog);
|
| | |
|
| | | /**
|
| | | * è·åquartzè°åº¦å¨æ¥å¿ç计åä»»å¡
|
| | | *
|
| | |
| | | package com.ruoyi.quartz.service;
|
| | |
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | | import com.ruoyi.common.core.page.IServicePlus;
|
| | | import com.ruoyi.common.core.page.TableDataInfo;
|
| | | import com.ruoyi.common.exception.job.TaskException;
|
| | | import com.ruoyi.quartz.domain.SysJob;
|
| | | import org.quartz.SchedulerException;
|
| | |
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | public interface ISysJobService extends IService<SysJob> {
|
| | | public interface ISysJobService extends IServicePlus<SysJob> {
|
| | | /**
|
| | | * è·åquartzè°åº¦å¨ç计åä»»å¡
|
| | | *
|
| | | * @param job è°åº¦ä¿¡æ¯
|
| | | * @return è°åº¦ä»»å¡éå
|
| | | */
|
| | | public TableDataInfo<SysJob> selectPageJobList(SysJob job);
|
| | |
|
| | | public List<SysJob> selectJobList(SysJob job);
|
| | |
|
| | | /**
|
| | |
| | | import cn.hutool.core.util.StrUtil;
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.ruoyi.common.core.page.TableDataInfo;
|
| | | import com.ruoyi.common.utils.PageUtils;
|
| | | import com.ruoyi.quartz.domain.SysJobLog;
|
| | | import com.ruoyi.quartz.mapper.SysJobLogMapper;
|
| | | import com.ruoyi.quartz.service.ISysJobLogService;
|
| | |
| | | @Service
|
| | | public class SysJobLogServiceImpl extends ServiceImpl<SysJobLogMapper, SysJobLog> implements ISysJobLogService {
|
| | |
|
| | | @Override
|
| | | public TableDataInfo<SysJobLog> selectPageJobLogList(SysJobLog jobLog) {
|
| | | Map<String, Object> params = jobLog.getParams();
|
| | | LambdaQueryWrapper<SysJobLog> lqw = new LambdaQueryWrapper<SysJobLog>()
|
| | | .like(StrUtil.isNotBlank(jobLog.getJobName()), SysJobLog::getJobName, jobLog.getJobName())
|
| | | .eq(StrUtil.isNotBlank(jobLog.getJobGroup()), SysJobLog::getJobGroup, jobLog.getJobGroup())
|
| | | .eq(StrUtil.isNotBlank(jobLog.getStatus()), SysJobLog::getStatus, jobLog.getStatus())
|
| | | .like(StrUtil.isNotBlank(jobLog.getInvokeTarget()), SysJobLog::getInvokeTarget, jobLog.getInvokeTarget())
|
| | | .apply(Validator.isNotEmpty(params.get("beginTime")),
|
| | | "date_format(create_time,'%y%m%d') >= date_format({0},'%y%m%d')",
|
| | | params.get("beginTime"))
|
| | | .apply(Validator.isNotEmpty(params.get("endTime")),
|
| | | "date_format(create_time,'%y%m%d') <= date_format({0},'%y%m%d')",
|
| | | params.get("endTime"));
|
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw));
|
| | | }
|
| | |
|
| | | /**
|
| | | * è·åquartzè°åº¦å¨æ¥å¿ç计åä»»å¡
|
| | | *
|
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.ruoyi.common.constant.ScheduleConstants;
|
| | | import com.ruoyi.common.core.page.TableDataInfo;
|
| | | import com.ruoyi.common.exception.job.TaskException;
|
| | | import com.ruoyi.common.utils.PageUtils;
|
| | | import com.ruoyi.quartz.domain.SysJob;
|
| | | import com.ruoyi.quartz.mapper.SysJobMapper;
|
| | | import com.ruoyi.quartz.service.ISysJobService;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public TableDataInfo<SysJob> selectPageJobList(SysJob job) {
|
| | | LambdaQueryWrapper<SysJob> lqw = new LambdaQueryWrapper<SysJob>()
|
| | | .like(StrUtil.isNotBlank(job.getJobName()), SysJob::getJobName, job.getJobName())
|
| | | .eq(StrUtil.isNotBlank(job.getJobGroup()), SysJob::getJobGroup, job.getJobGroup())
|
| | | .eq(StrUtil.isNotBlank(job.getStatus()), SysJob::getStatus, job.getStatus())
|
| | | .like(StrUtil.isNotBlank(job.getInvokeTarget()), SysJob::getInvokeTarget, job.getInvokeTarget());
|
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw));
|
| | | }
|
| | |
|
| | | /**
|
| | | * è·åquartzè°åº¦å¨ç计åä»»å¡å表
|
| | | *
|
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | |
| | | /** |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysConfigMapper extends BaseMapper<SysConfig> { |
| | | public interface SysConfigMapper extends BaseMapperPlus<SysConfig> { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysDeptMapper extends BaseMapper<SysDept> { |
| | | public interface SysDeptMapper extends BaseMapperPlus<SysDept> { |
| | | |
| | | /** |
| | | * æ¥è¯¢é¨é¨ç®¡çæ°æ® |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | |
| | | /** |
| | | * åå
¸è¡¨ æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysDictDataMapper extends BaseMapper<SysDictData> { |
| | | public interface SysDictDataMapper extends BaseMapperPlus<SysDictData> { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.domain.entity.SysDictType; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | |
| | | /** |
| | | * åå
¸è¡¨ æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysDictTypeMapper extends BaseMapper<SysDictType> { |
| | | public interface SysDictTypeMapper extends BaseMapperPlus<SysDictType> { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | import com.ruoyi.system.domain.SysLogininfor; |
| | | |
| | | /** |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysLogininforMapper extends BaseMapper<SysLogininfor> { |
| | | public interface SysLogininforMapper extends BaseMapperPlus<SysLogininfor> { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.domain.entity.SysMenu; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysMenuMapper extends BaseMapper<SysMenu> { |
| | | public interface SysMenuMapper extends BaseMapperPlus<SysMenu> { |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·æææé |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | import com.ruoyi.system.domain.SysNotice; |
| | | |
| | | /** |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysNoticeMapper extends BaseMapper<SysNotice> { |
| | | public interface SysNoticeMapper extends BaseMapperPlus<SysNotice> { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | import com.ruoyi.system.domain.SysOperLog; |
| | | |
| | | /** |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysOperLogMapper extends BaseMapper<SysOperLog> { |
| | | public interface SysOperLogMapper extends BaseMapperPlus<SysOperLog> { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | import com.ruoyi.system.domain.SysPost; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysPostMapper extends BaseMapper<SysPost> { |
| | | public interface SysPostMapper extends BaseMapperPlus<SysPost> { |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDè·åå²ä½éæ©æ¡å表 |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | import com.ruoyi.system.domain.SysRoleDept; |
| | | |
| | | /** |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysRoleDeptMapper extends BaseMapper<SysRoleDept> { |
| | | public interface SysRoleDeptMapper extends BaseMapperPlus<SysRoleDept> { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysRoleMapper extends BaseMapper<SysRole> { |
| | | public interface SysRoleMapper extends BaseMapperPlus<SysRole> { |
| | | |
| | | Page<SysRole> selectPageRoleList(@Param("page") Page<SysRole> page, @Param("role") SysRole role); |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢è§è²æ°æ® |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | import com.ruoyi.system.domain.SysRoleMenu; |
| | | |
| | | /** |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> { |
| | | public interface SysRoleMenuMapper extends BaseMapperPlus<SysRoleMenu> { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysUserMapper extends BaseMapper<SysUser> { |
| | | public interface SysUserMapper extends BaseMapperPlus<SysUser> { |
| | | |
| | | Page<SysUser> selectPageUserList(@Param("page") Page<SysUser> page, @Param("user") SysUser user); |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢ç¨æ·å表 |
| | | * |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | import com.ruoyi.system.domain.SysUserPost; |
| | | |
| | | /** |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysUserPostMapper extends BaseMapper<SysUserPost> { |
| | | public interface SysUserPostMapper extends BaseMapperPlus<SysUserPost> { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.page.BaseMapperPlus; |
| | | import com.ruoyi.system.domain.SysUserRole; |
| | | |
| | | /** |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysUserRoleMapper extends BaseMapper<SysUserRole> { |
| | | public interface SysUserRoleMapper extends BaseMapperPlus<SysUserRole> { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysConfigService extends IService<SysConfig> { |
| | | public interface ISysConfigService extends IServicePlus<SysConfig> { |
| | | |
| | | |
| | | TableDataInfo<SysConfig> selectPageConfigList(SysConfig config); |
| | | |
| | | /** |
| | | * æ¥è¯¢åæ°é
ç½®ä¿¡æ¯ |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.TreeSelect; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysDeptService extends IService<SysDept> { |
| | | public interface ISysDeptService extends IServicePlus<SysDept> { |
| | | /** |
| | | * æ¥è¯¢é¨é¨ç®¡çæ°æ® |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysDictDataService extends IService<SysDictData> { |
| | | public interface ISysDictDataService extends IServicePlus<SysDictData> { |
| | | |
| | | |
| | | TableDataInfo<SysDictData> selectPageDictDataList(SysDictData dictData); |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢åå
¸æ°æ® |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.core.domain.entity.SysDictType; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysDictTypeService extends IService<SysDictType> { |
| | | public interface ISysDictTypeService extends IServicePlus<SysDictType> { |
| | | |
| | | |
| | | TableDataInfo<SysDictType> selectPageDictTypeList(SysDictType dictType); |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢åå
¸ç±»å |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.system.domain.SysLogininfor; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysLogininforService extends IService<SysLogininfor> { |
| | | public interface ISysLogininforService extends IServicePlus<SysLogininfor> { |
| | | |
| | | |
| | | TableDataInfo<SysLogininfor> selectPageLogininforList(SysLogininfor logininfor); |
| | | |
| | | /** |
| | | * æ°å¢ç³»ç»ç»å½æ¥å¿ |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.TreeSelect; |
| | | import com.ruoyi.common.core.domain.entity.SysMenu; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.system.domain.vo.RouterVo; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysMenuService extends IService<SysMenu> { |
| | | public interface ISysMenuService extends IServicePlus<SysMenu> { |
| | | /** |
| | | * æ ¹æ®ç¨æ·æ¥è¯¢ç³»ç»èåå表 |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.system.domain.SysNotice; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysNoticeService extends IService<SysNotice> { |
| | | public interface ISysNoticeService extends IServicePlus<SysNotice> { |
| | | |
| | | |
| | | TableDataInfo<SysNotice> selectPageNoticeList(SysNotice notice); |
| | | |
| | | /** |
| | | * æ¥è¯¢å
¬åä¿¡æ¯ |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.system.domain.SysOperLog; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysOperLogService extends IService<SysOperLog> { |
| | | public interface ISysOperLogService extends IServicePlus<SysOperLog> { |
| | | |
| | | TableDataInfo<SysOperLog> selectPageOperLogList(SysOperLog operLog); |
| | | |
| | | /** |
| | | * æ°å¢æä½æ¥å¿ |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.system.domain.SysPost; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysPostService extends IService<SysPost> { |
| | | public interface ISysPostService extends IServicePlus<SysPost> { |
| | | |
| | | |
| | | TableDataInfo<SysPost> selectPagePostList(SysPost post); |
| | | |
| | | /** |
| | | * æ¥è¯¢å²ä½ä¿¡æ¯éå |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysRoleService extends IService<SysRole> { |
| | | public interface ISysRoleService extends IServicePlus<SysRole> { |
| | | |
| | | |
| | | TableDataInfo<SysRole> selectPageRoleList(SysRole role); |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢è§è²æ°æ® |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysUserService extends IService<SysUser> { |
| | | public interface ISysUserService extends IServicePlus<SysUser> { |
| | | |
| | | |
| | | TableDataInfo<SysUser> selectPageUserList(SysUser user); |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢ç¨æ·å表 |
| | | * |
| | |
| | | import com.ruoyi.common.annotation.DataSource; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.enums.DataSourceType; |
| | | import com.ruoyi.common.exception.CustomException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.mapper.SysConfigMapper; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | |
| | | for (SysConfig config : configsList) { |
| | | redisCache.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public TableDataInfo<SysConfig> selectPageConfigList(SysConfig config) { |
| | | Map<String, Object> params = config.getParams(); |
| | | LambdaQueryWrapper<SysConfig> lqw = new LambdaQueryWrapper<SysConfig>() |
| | | .like(StrUtil.isNotBlank(config.getConfigName()), SysConfig::getConfigName, config.getConfigName()) |
| | | .eq(StrUtil.isNotBlank(config.getConfigType()), SysConfig::getConfigType, config.getConfigType()) |
| | | .like(StrUtil.isNotBlank(config.getConfigKey()), SysConfig::getConfigKey, config.getConfigKey()) |
| | | .apply(Validator.isNotEmpty(params.get("beginTime")), |
| | | "date_format(create_time,'%y%m%d') >= date_format(#{0},'%y%m%d')", |
| | | params.get("beginTime")) |
| | | .apply(Validator.isNotEmpty(params.get("endTime")), |
| | | "date_format(create_time,'%y%m%d') <= date_format(#{0},'%y%m%d')", |
| | | params.get("endTime")); |
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public List<SysConfig> selectConfigList(SysConfig config) { |
| | | LambdaQueryWrapper<SysConfig> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.like(StrUtil.isNotBlank(config.getConfigName()), SysConfig::getConfigName, config.getConfigName()); |
| | | lqw.eq(StrUtil.isNotBlank(config.getConfigType()), SysConfig::getConfigType, config.getConfigType()); |
| | | lqw.like(StrUtil.isNotBlank(config.getConfigKey()), SysConfig::getConfigKey, config.getConfigKey()); |
| | | Map<String, Object> params = config.getParams(); |
| | | lqw.apply(Validator.isNotEmpty(params.get("beginTime")), |
| | | "date_format(create_time,'%y%m%d') >= date_format(#{0},'%y%m%d')", |
| | | params.get("beginTime")); |
| | | lqw.apply(Validator.isNotEmpty(params.get("endTime")), |
| | | "date_format(create_time,'%y%m%d') >= date_format(#{0},'%y%m%d')", |
| | | params.get("endTime")); |
| | | LambdaQueryWrapper<SysConfig> lqw = new LambdaQueryWrapper<SysConfig>() |
| | | .like(StrUtil.isNotBlank(config.getConfigName()), SysConfig::getConfigName, config.getConfigName()) |
| | | .eq(StrUtil.isNotBlank(config.getConfigType()), SysConfig::getConfigType, config.getConfigType()) |
| | | .like(StrUtil.isNotBlank(config.getConfigKey()), SysConfig::getConfigKey, config.getConfigKey()) |
| | | .apply(Validator.isNotEmpty(params.get("beginTime")), |
| | | "date_format(create_time,'%y%m%d') >= date_format(#{0},'%y%m%d')", |
| | | params.get("beginTime")) |
| | | .apply(Validator.isNotEmpty(params.get("endTime")), |
| | | "date_format(create_time,'%y%m%d') >= date_format(#{0},'%y%m%d')", |
| | | params.get("endTime")); |
| | | return baseMapper.selectList(lqw); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.utils.DictUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.mapper.SysDictDataMapper; |
| | | import com.ruoyi.system.service.ISysDictDataService; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Service |
| | | public class SysDictDataServiceImpl extends ServiceImpl<SysDictDataMapper, SysDictData> implements ISysDictDataService { |
| | | |
| | | @Override |
| | | public TableDataInfo<SysDictData> selectPageDictDataList(SysDictData dictData) { |
| | | LambdaQueryWrapper<SysDictData> lqw = new LambdaQueryWrapper<SysDictData>() |
| | | .eq(StrUtil.isNotBlank(dictData.getDictType()), SysDictData::getDictType, dictData.getDictType()) |
| | | .like(StrUtil.isNotBlank(dictData.getDictLabel()), SysDictData::getDictLabel, dictData.getDictLabel()) |
| | | .eq(StrUtil.isNotBlank(dictData.getStatus()), SysDictData::getStatus, dictData.getStatus()) |
| | | .orderByAsc(SysDictData::getDictSort); |
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(),lqw)); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢åå
¸æ°æ® |
| | | * |
| | |
| | | */ |
| | | @Override |
| | | public List<SysDictData> selectDictDataList(SysDictData dictData) { |
| | | return list(new LambdaQueryWrapper<SysDictData>().eq(StrUtil.isNotBlank(dictData.getDictType()), SysDictData::getDictType, dictData.getDictType()) |
| | | return list(new LambdaQueryWrapper<SysDictData>() |
| | | .eq(StrUtil.isNotBlank(dictData.getDictType()), SysDictData::getDictType, dictData.getDictType()) |
| | | .like(StrUtil.isNotBlank(dictData.getDictLabel()), SysDictData::getDictLabel, dictData.getDictLabel()) |
| | | .eq(StrUtil.isNotBlank(dictData.getStatus()), SysDictData::getStatus, dictData.getStatus()) |
| | | .orderByAsc(SysDictData::getDictSort)); |
| | |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.core.domain.entity.SysDictType; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.CustomException; |
| | | import com.ruoyi.common.utils.DictUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.mapper.SysDictDataMapper; |
| | | import com.ruoyi.system.mapper.SysDictTypeMapper; |
| | | import com.ruoyi.system.service.ISysDictTypeService; |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public TableDataInfo<SysDictType> selectPageDictTypeList(SysDictType dictType) { |
| | | Map<String, Object> params = dictType.getParams(); |
| | | LambdaQueryWrapper<SysDictType> lqw = new LambdaQueryWrapper<SysDictType>() |
| | | .like(StrUtil.isNotBlank(dictType.getDictName()), SysDictType::getDictName, dictType.getDictName()) |
| | | .eq(StrUtil.isNotBlank(dictType.getStatus()), SysDictType::getStatus, dictType.getStatus()) |
| | | .like(StrUtil.isNotBlank(dictType.getDictType()), SysDictType::getDictType, dictType.getDictType()) |
| | | .apply(Validator.isNotEmpty(params.get("beginTime")), |
| | | "date_format(create_time,'%y%m%d') >= date_format({0},'%y%m%d')", |
| | | params.get("beginTime")) |
| | | .apply(Validator.isNotEmpty(params.get("endTime")), |
| | | "date_format(create_time,'%y%m%d') <= date_format({0},'%y%m%d')", |
| | | params.get("endTime")); |
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(),lqw)); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢åå
¸ç±»å |
| | | * |
| | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.domain.SysLogininfor; |
| | | import com.ruoyi.system.mapper.SysLogininforMapper; |
| | | import com.ruoyi.system.service.ISysLogininforService; |
| | |
| | | @Service |
| | | public class SysLogininforServiceImpl extends ServiceImpl<SysLogininforMapper, SysLogininfor> implements ISysLogininforService { |
| | | |
| | | @Override |
| | | public TableDataInfo<SysLogininfor> selectPageLogininforList(SysLogininfor logininfor) { |
| | | Map<String, Object> params = logininfor.getParams(); |
| | | LambdaQueryWrapper<SysLogininfor> lqw = new LambdaQueryWrapper<SysLogininfor>() |
| | | .like(StrUtil.isNotBlank(logininfor.getIpaddr()), SysLogininfor::getIpaddr, logininfor.getIpaddr()) |
| | | .eq(StrUtil.isNotBlank(logininfor.getStatus()), SysLogininfor::getStatus, logininfor.getStatus()) |
| | | .like(StrUtil.isNotBlank(logininfor.getUserName()), SysLogininfor::getUserName, logininfor.getUserName()) |
| | | .apply(Validator.isNotEmpty(params.get("beginTime")), |
| | | "date_format(login_time,'%y%m%d') >= date_format({0},'%y%m%d')", |
| | | params.get("beginTime")) |
| | | .apply(Validator.isNotEmpty(params.get("endTime")), |
| | | "date_format(login_time,'%y%m%d') <= date_format({0},'%y%m%d')", |
| | | params.get("endTime")) |
| | | .orderByDesc(SysLogininfor::getInfoId); |
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç³»ç»ç»å½æ¥å¿ |
| | | * |
| | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.domain.SysNotice; |
| | | import com.ruoyi.system.mapper.SysNoticeMapper; |
| | | import com.ruoyi.system.service.ISysNoticeService; |
| | |
| | | @Service |
| | | public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice> implements ISysNoticeService { |
| | | |
| | | @Override |
| | | public TableDataInfo<SysNotice> selectPageNoticeList(SysNotice notice) { |
| | | LambdaQueryWrapper<SysNotice> lqw = new LambdaQueryWrapper<SysNotice>() |
| | | .like(StrUtil.isNotBlank(notice.getNoticeTitle()), SysNotice::getNoticeTitle, notice.getNoticeTitle()) |
| | | .eq(StrUtil.isNotBlank(notice.getNoticeType()), SysNotice::getNoticeType, notice.getNoticeType()) |
| | | .like(StrUtil.isNotBlank(notice.getCreateBy()), SysNotice::getCreateBy, notice.getCreateBy()); |
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(),lqw)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å
¬åä¿¡æ¯ |
| | | * |
| | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.domain.SysOperLog; |
| | | import com.ruoyi.system.mapper.SysOperLogMapper; |
| | | import com.ruoyi.system.service.ISysOperLogService; |
| | |
| | | @Service |
| | | public class SysOperLogServiceImpl extends ServiceImpl<SysOperLogMapper, SysOperLog> implements ISysOperLogService { |
| | | |
| | | @Override |
| | | public TableDataInfo<SysOperLog> selectPageOperLogList(SysOperLog operLog) { |
| | | Map<String, Object> params = operLog.getParams(); |
| | | LambdaQueryWrapper<SysOperLog> lqw = new LambdaQueryWrapper<SysOperLog>() |
| | | .like(StrUtil.isNotBlank(operLog.getTitle()), SysOperLog::getTitle, operLog.getTitle()) |
| | | .eq(operLog.getBusinessType() != null && operLog.getBusinessType() > 0, |
| | | SysOperLog::getBusinessType, operLog.getBusinessType()) |
| | | .func(f -> { |
| | | if (ArrayUtil.isNotEmpty(operLog.getBusinessTypes())) { |
| | | f.in(SysOperLog::getBusinessType, Arrays.asList(operLog.getBusinessTypes())); |
| | | } |
| | | }) |
| | | .eq(operLog.getStatus() != null && operLog.getStatus() > 0, |
| | | SysOperLog::getStatus, operLog.getStatus()) |
| | | .like(StrUtil.isNotBlank(operLog.getOperName()), SysOperLog::getOperName, operLog.getOperName()) |
| | | .apply(Validator.isNotEmpty(params.get("beginTime")), |
| | | "date_format(oper_time,'%y%m%d') >= date_format({0},'%y%m%d')", |
| | | params.get("beginTime")) |
| | | .apply(Validator.isNotEmpty(params.get("endTime")), |
| | | "date_format(oper_time,'%y%m%d') <= date_format({0},'%y%m%d')", |
| | | params.get("endTime")) |
| | | .orderByDesc(SysOperLog::getOperId); |
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æä½æ¥å¿ |
| | | * |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.CustomException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.domain.SysPost; |
| | | import com.ruoyi.system.domain.SysUserPost; |
| | | import com.ruoyi.system.mapper.SysPostMapper; |
| | |
| | | @Autowired |
| | | private SysUserPostMapper userPostMapper; |
| | | |
| | | @Override |
| | | public TableDataInfo<SysPost> selectPagePostList(SysPost post) { |
| | | LambdaQueryWrapper<SysPost> lqw = new LambdaQueryWrapper<SysPost>() |
| | | .like(StrUtil.isNotBlank(post.getPostCode()), SysPost::getPostCode, post.getPostCode()) |
| | | .eq(StrUtil.isNotBlank(post.getStatus()), SysPost::getStatus, post.getStatus()) |
| | | .like(StrUtil.isNotBlank(post.getPostName()), SysPost::getPostName, post.getPostName()); |
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(),lqw)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å²ä½ä¿¡æ¯éå |
| | | * |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import cn.hutool.core.lang.Validator; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.annotation.DataScope; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.CustomException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import com.ruoyi.system.domain.SysRoleDept; |
| | | import com.ruoyi.system.domain.SysRoleMenu; |
| | |
| | | @Autowired |
| | | private SysRoleDeptMapper roleDeptMapper; |
| | | |
| | | @Override |
| | | @DataScope(deptAlias = "d") |
| | | public TableDataInfo<SysRole> selectPageRoleList(SysRole role) { |
| | | return PageUtils.buildDataInfo(baseMapper.selectPageRoleList(PageUtils.buildPage(), role)); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢è§è²æ°æ® |
| | | * |
| | |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.CustomException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.system.domain.SysPost; |
| | | import com.ruoyi.system.domain.SysUserPost; |
| | |
| | | @Autowired |
| | | private ISysConfigService configService; |
| | | |
| | | @Override |
| | | @DataScope(deptAlias = "d", userAlias = "u") |
| | | public TableDataInfo<SysUser> selectPageUserList(SysUser user) { |
| | | return PageUtils.buildDataInfo(baseMapper.selectPageUserList(PageUtils.buildPage(), user)); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢ç¨æ·å表 |
| | | * |
| | |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | </sql> |
| | | |
| | | <select id="selectPageRoleList" parameterType="SysRole" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | where r.del_flag = '0' |
| | | <if test="role.roleName != null and role.roleName != ''"> |
| | | AND r.role_name like concat('%', #{role.roleName}, '%') |
| | | </if> |
| | | <if test="role.status != null and role.status != ''"> |
| | | AND r.status = #{role.status} |
| | | </if> |
| | | <if test="role.roleKey != null and role.roleKey != ''"> |
| | | AND r.role_key like concat('%', #{role.roleKey}, '%') |
| | | </if> |
| | | <if test="role.params.beginTime != null and role.params.beginTime != ''"><!-- å¼å§æ¶é´æ£ç´¢ --> |
| | | and date_format(r.create_time,'%y%m%d') >= date_format(#{role.params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="role.params.endTime != null and role.params.endTime != ''"><!-- ç»ææ¶é´æ£ç´¢ --> |
| | | and date_format(r.create_time,'%y%m%d') <= date_format(#{role.params.endTime},'%y%m%d') |
| | | </if> |
| | | <!-- æ°æ®èå´è¿æ»¤ --> |
| | | ${role.params.dataScope} |
| | | order by r.role_sort |
| | | </select> |
| | | |
| | | <select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | where r.del_flag = '0' |
| | |
| | | left join sys_role r on r.role_id = ur.role_id |
| | | </sql> |
| | | |
| | | <select id="selectPageUserList" parameterType="SysUser" resultMap="SysUserResult"> |
| | | select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, |
| | | u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from |
| | | sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | where u.del_flag = '0' |
| | | <if test="user.userName != null and user.userName != ''"> |
| | | AND u.user_name like concat('%', #{user.userName}, '%') |
| | | </if> |
| | | <if test="user.status != null and user.status != ''"> |
| | | AND u.status = #{user.status} |
| | | </if> |
| | | <if test="user.phonenumber != null and user.phonenumber != ''"> |
| | | AND u.phonenumber like concat('%', #{user.phonenumber}, '%') |
| | | </if> |
| | | <if test="user.params.beginTime != null and user.params.beginTime != ''"><!-- å¼å§æ¶é´æ£ç´¢ --> |
| | | AND date_format(u.create_time,'%y%m%d') >= date_format(#{user.params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="user.params.endTime != null and user.params.endTime != ''"><!-- ç»ææ¶é´æ£ç´¢ --> |
| | | AND date_format(u.create_time,'%y%m%d') <= date_format(#{user.params.endTime},'%y%m%d') |
| | | </if> |
| | | <if test="user.deptId != null and user.deptId != 0"> |
| | | AND (u.dept_id = #{user.deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{user.deptId}, |
| | | ancestors) )) |
| | | </if> |
| | | <!-- æ°æ®èå´è¿æ»¤ --> |
| | | ${user.params.dataScope} |
| | | </select> |
| | | |
| | | <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult"> |
| | | select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, |
| | | u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from |
| | |
| | | { |
| | | "name": "ruoyi-vue-plus", |
| | | "version": "1.0.2", |
| | | "version": "2.0.0", |
| | | "description": "RuoYi-Vue-Plusåå°ç®¡çç³»ç»", |
| | | "author": "LionLi", |
| | | "license": "MIT", |
| | |
| | | <el-col :sm="24" :lg="12" style="padding-left: 20px"> |
| | | <h2>RuoYi-Vue-Plusåå°ç®¡çæ¡æ¶</h2> |
| | | <p> |
| | | åºäºRuoYi-Vueéæ Lombok+Mybatis-Plus+Undertow+knife4j+Hutool+Feign éåææåçä¸å¡ 宿ä¸RuoYi-Vue忥 |
| | | åºäº RuoYi-Vue éæ Mybatis-Plus Lombok Hutool ç便æ·å¼åå·¥å
· éé
éåç¸å
³ä¸å¡ 便äºå¼å å®æä¸ RuoYi-Vue 忥 |
| | | <br/> |
| | | * å端å¼åæ¡æ¶ VueãElement UI<br/> |
| | | * å端å¼åæ¡æ¶ Spring BootãRedis<br/> |
| | | * 容卿¡æ¶ Undertow åºäº Netty ç髿§è½å®¹å¨<br/> |
| | | * æéè®¤è¯æ¡æ¶ Spring SecurityãJwtï¼æ¯æå¤ç»ç«¯è®¤è¯ç³»ç»<br/> |
| | | * å
³ç³»æ°æ®åº MySQL éé
8.X<br/> |
| | | * ç¼åæ°æ®åº Redis éé
6.X<br/> |
| | | * æ°æ®åºå¼åæ¡æ¶ Mybatis-Plus å¿«é CRUD å¢å å¼åæç æä»¶åæ¯æåç±»éæ±<br/> |
| | | * ç½ç»æ¡æ¶ FeignãOkHttp3 æ¥å£å管ç HTTP 请æ±<br/> |
| | | * å·¥å
·ç±»æ¡æ¶ HutoolãLombok åå°ä»£ç åä½ å¢å å®å
¨æ§<br/> |
| | | * çæ§æ¡æ¶ spring-boot-admin å
¨æ¹ä½æå¡çæ§<br/> |
| | | * æ ¡éªæ¡æ¶ validation å¢å¼ºæ¥å£å®å
¨æ§ 严谨æ§<br/> |
| | | * ææ¡£æ¡æ¶ knife4j ç¾åæ¥å£ææ¡£<br/> |
| | | * 代ç çæå¨ ä¸é®çæåå端代ç <br/> |
| | | </p> |
| | | <p> |
| | | <b>å½åçæ¬:</b> <span>v{{ version }}</span> |
| | |
| | | <span>æ´æ°æ¥å¿</span> |
| | | </div> |
| | | <el-collapse accordion> |
| | | <el-collapse-item title="v2.0.0 - 2021-5-15"> |
| | | <ol> |
| | | <li>springboot å级 2.3.10 ä¾èµå
¨é¢å级éé
</li> |
| | | <li>add å¢å å页工å
·</li> |
| | | <li>add å¢å å¢å¼ºMapper ä¸ å¢å¼ºService éåä¸å¡éé
</li> |
| | | <li>add 代ç çæå¨ å¢å æ ¡éªæ³¨è§£</li> |
| | | <li>update 代ç çæå¨ä¿®æ¹ä¸ºMPå页</li> |
| | | <li>update ä½¿ç¨ MP å页工å
· éæä¸å¡</li> |
| | | <li>update éåææ¡£ä»ç»</li> |
| | | <li>remove ç§»é¤ pagehelper å页工å
·</li> |
| | | <li>fix ä¿®å¤ä»£ç çæ æ°æ®æéé®é¢</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v1.0.2 - 2021-5-13"> |
| | | <ol> |
| | | <li>update æ´æ°æ´åæå
ææ¡£ éæ°æç</li> |
| | | <li>fix vueä¸bootæ´åæå
ä¸admin页é¢è·¯ç±å²çª</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v1.0.1 - 2021-5-11"> |
| | | <ol> |
| | | <li>update æ´æ°banner</li> |
| | | <li>update é
ç½®è½¬ç§»å° yml æä»¶ ç»ä¸ç®¡ç</li> |
| | | <li>update ä¸ä¼ åªä½ç±»åæ·»å è§é¢æ ¼å¼</li> |
| | | <li>update æ çº§ç»ææ´æ°åèç¹ä½¿ç¨replaceFirst</li> |
| | | <li>update å 餿使¥å¿è®°å½æ¥å¿</li> |
| | | <li>fix ä¿®æ£å¯¼å
¥è¡¨æéæ è¯</li> |
| | | <li>fix æä»¶ä¸ä¼ æ¶æ¥é</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v1.0.0 - 2021-5-10"> |
| | | <ol> |
| | | <li>RuoYi-Vue-Plus åå°ç®¡çç³»ç»æ£å¼åå¸</li> |
| | |
| | | data() { |
| | | return { |
| | | // çæ¬å· |
| | | version: "1.0.0", |
| | | version: "2.0.0", |
| | | }; |
| | | }, |
| | | methods: { |