superb 1 yıl önce
ebeveyn
işleme
6398648a58
31 değiştirilmiş dosya ile 776 ekleme ve 310 silme
  1. 7 0
      .gitignore
  2. 6 3
      Jenkinsfile
  3. 2 4
      common/src/main/java/com/koobietech/eas/common/result/PageData.java
  4. 5 5
      controller/pom.xml
  5. 14 0
      controller/src/main/java/com/koobietech/eas/config/ExceptionAdvice.java
  6. 67 0
      controller/src/main/java/com/koobietech/eas/controller/EasDepartmentController.java
  7. 62 0
      controller/src/main/java/com/koobietech/eas/controller/EasPermissionController.java
  8. 3 2
      controller/src/main/java/com/koobietech/eas/controller/EasUserController.java
  9. 7 4
      controller/src/main/resources/application-dev.yaml
  10. 10 7
      controller/src/main/resources/application-local.yaml
  11. 78 0
      controller/src/main/resources/logback.xml
  12. 2 1
      docker-compose.yml
  13. 0 6
      mbg/src/main/java/com/koobietech/eas/mbg/mapper/EasEduCategoryMapper.java
  14. 0 6
      mbg/src/main/java/com/koobietech/eas/mbg/mapper/EasEduSubjectsMapper.java
  15. 0 6
      mbg/src/main/java/com/koobietech/eas/mbg/mapper/EasSysPermissionMapper.java
  16. 17 17
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduCategory.java
  17. 70 0
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduCategoryExample.java
  18. 17 17
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduSubjects.java
  19. 70 0
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduSubjectsExample.java
  20. 17 17
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysPermission.java
  21. 70 0
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysPermissionExample.java
  22. 21 65
      mbg/src/main/resources/com/koobietech/eas/mbg/mapper/EasEduCategoryMapper.xml
  23. 23 69
      mbg/src/main/resources/com/koobietech/eas/mbg/mapper/EasEduSubjectsMapper.xml
  24. 23 69
      mbg/src/main/resources/com/koobietech/eas/mbg/mapper/EasSysPermissionMapper.xml
  25. 2 0
      pom.xml
  26. 2 1
      service/src/main/java/com/koobietech/eas/service/DemoService.java
  27. 13 0
      service/src/main/java/com/koobietech/eas/service/EasDepartmentService.java
  28. 12 0
      service/src/main/java/com/koobietech/eas/service/EasPermissionService.java
  29. 11 11
      service/src/main/java/com/koobietech/eas/service/impl/DemoServiceImpl.java
  30. 77 0
      service/src/main/java/com/koobietech/eas/service/impl/EasDepartmentServiceImpl.java
  31. 68 0
      service/src/main/java/com/koobietech/eas/service/impl/EasPermissionServiceImpl.java

+ 7 - 0
.gitignore

@@ -4,6 +4,13 @@ target/
 !**/src/main/**/target/
 !**/src/test/**/target/
 
+sys-debug.log
+sys-error.log
+sys-info.log
+sys-debug*
+sys-info*
+sys-error*
+
 ### STS ###
 .apt_generated
 .classpath

+ 6 - 3
Jenkinsfile

@@ -13,9 +13,12 @@ pipeline {
         stage('Build') {
             steps {
                 echo 'Building..'
-                sh 'docker-compose down'
+                sh 'EASID=$(docker ps | grep easapi${BRANCH_NAME} | awk \'{print $1}\')'
+                sh '[ -n "$EASID" ] && docker kill $EASID && docker rm $EASID || echo -n "Docker Container is Down"'
+                sh '[ -n "$EASID" ] && docker images | grep easapi${BRANCH_NAME} | awk \'{print $1":"$2}\' | xargs docker rmi || echo -n "No Images of remove"'
+                sh '~/tools/apache-maven-3.6.3/bin/mvn sonar:sonar'
                 sh '~/tools/apache-maven-3.6.3/bin/mvn  clean install -Dmaven.test.skip=true'
-                sh 'docker build -t ${BRANCH_NAME}:${BUILD_NUMBER} .'
+                sh 'docker build -t easapi${BRANCH_NAME}:${BUILD_NUMBER} .'
             }
         }
         stage('Test') {
@@ -26,7 +29,7 @@ pipeline {
         stage('Deploy') {
             steps {
                 echo 'Deploying....'
-                sh 'docker ps'
+                sh 'docker-compose up -d'
             }
         }
     }

+ 2 - 4
common/src/main/java/com/koobietech/eas/common/result/PageData.java

@@ -2,13 +2,11 @@ package com.koobietech.eas.common.result;
 
 import lombok.Data;
 
-import java.util.List;
-
 @Data
 public class PageData {
     private long total = 0;
-    private List data = null;
-    public static PageData init(List data, long total){
+    private Object data = null;
+    public static PageData init(Object data, long total){
         PageData ret = new PageData();
         ret.setData(data);
         ret.setTotal(total);

+ 5 - 5
controller/pom.xml

@@ -73,11 +73,11 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.8.1</version>
+                <version>${maven.compiler.plugin.version}</version>
                 <configuration>
-                    <source>11</source>
-                    <target>11</target>
-                    <encoding>UTF-8</encoding>
+                    <source>${maven.compiler.source}</source>
+                    <target>${maven.compiler.target}</target>
+                    <encoding>${maven.compiler.encoding}</encoding>
                 </configuration>
             </plugin>
             <plugin>
@@ -85,7 +85,7 @@
                 <artifactId>spring-boot-maven-plugin</artifactId>
                 <version>${spring-boot.version}</version>
                 <configuration>
-                    <mainClass>com.koobietech.eas.controller.ControllerApplication</mainClass>
+                    <mainClass>com.koobietech.eas.ControllerApplication</mainClass>
                     <skip>false</skip>
                 </configuration>
                 <executions>

+ 14 - 0
controller/src/main/java/com/koobietech/eas/config/ExceptionAdvice.java

@@ -1,6 +1,8 @@
 package com.koobietech.eas.config;
 
 import com.koobietech.eas.common.result.JsonResult;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.ExceptionHandler;
 import org.springframework.web.bind.annotation.ResponseBody;
@@ -8,12 +10,24 @@ import org.springframework.web.bind.annotation.ResponseStatus;
 import org.springframework.web.bind.annotation.RestControllerAdvice;
 
 @RestControllerAdvice
+
 public class ExceptionAdvice {
+
+    private static final Logger logger = LoggerFactory.getLogger(ExceptionAdvice.class);
+
     @ResponseBody
     @ResponseStatus(HttpStatus.OK)
     @ExceptionHandler(Exception.class)
     public JsonResult exceptionHandler(Exception e){
+        StackTraceElement[] stackTrace = e.getStackTrace();
         e.printStackTrace();
+        logger.error("运行异常提醒:");
+        logger.error(e.getMessage());
+        logger.error("异常堆栈信息:");
+        for (StackTraceElement element : stackTrace) {
+            logger.error(element.toString());
+        }
+        logger.error("-------------");
         return JsonResult.fail(e.getMessage());
     }
 }

+ 67 - 0
controller/src/main/java/com/koobietech/eas/controller/EasDepartmentController.java

@@ -0,0 +1,67 @@
+package com.koobietech.eas.controller;
+
+import com.github.pagehelper.PageHelper;
+import com.koobietech.eas.common.result.JsonPageResult;
+import com.koobietech.eas.common.result.JsonResult;
+import com.koobietech.eas.common.result.PageData;
+import com.koobietech.eas.mbg.model.EasSysDepartment;
+import com.koobietech.eas.service.EasDepartmentService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+
+
+@RestController
+@Tag(name = "部门模块")
+@RequestMapping("/department")
+public class EasDepartmentController {
+
+    @Resource
+    EasDepartmentService easDepartmentService;
+
+
+    @PostMapping("/query")
+    @Operation(summary = "查询部门" ,  description = "根据参数查询基本信息")
+    public JsonPageResult query(@RequestBody EasSysDepartment department,
+                                @RequestParam Integer pageNum, @RequestParam Integer pageSize ) {
+        PageHelper.startPage(pageNum, pageSize);
+        PageData ret = easDepartmentService.query(department);
+        return JsonPageResult.data(ret);
+    }
+
+    @PostMapping("/add")
+    @Operation(summary = "添加部门" ,  description = "添加部门信息")
+    public JsonResult add(@RequestBody EasSysDepartment department) {
+        Boolean ret = easDepartmentService.add(department);
+        if (ret) {
+            return JsonResult.data(ret);
+        }
+        return JsonResult.fail();
+    }
+
+
+    @DeleteMapping("/delete/{id}")
+    @Operation(summary = "删除部门" ,  description = "删除部门根据ID")
+    public JsonResult delete(@PathVariable(name="id") Long id) {
+        Boolean ret = easDepartmentService.delete(id);
+        if (ret) {
+            return JsonResult.ok();
+        }
+        return JsonResult.fail();
+    }
+
+
+    @PutMapping("/update")
+    @Operation(summary = "更新部门" ,  description = "更新部门信息根据ID")
+    public JsonResult update(@RequestBody EasSysDepartment department) {
+        Boolean ret = easDepartmentService.update(department);
+        if (ret) {
+            return JsonResult.ok();
+        }
+        return JsonResult.fail();
+    }
+
+
+}

+ 62 - 0
controller/src/main/java/com/koobietech/eas/controller/EasPermissionController.java

@@ -0,0 +1,62 @@
+package com.koobietech.eas.controller;
+
+import com.github.pagehelper.PageHelper;
+import com.koobietech.eas.common.result.JsonPageResult;
+import com.koobietech.eas.common.result.JsonResult;
+import com.koobietech.eas.common.result.PageData;
+import com.koobietech.eas.mbg.model.EasSysPermission;
+import com.koobietech.eas.service.EasPermissionService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+
+
+@RestController
+@Tag(name = "权限模块")
+@RequestMapping("/permission")
+public class EasPermissionController {
+
+    @Resource
+    EasPermissionService easPermissionService;
+
+    @PostMapping("/query")
+    @Operation(summary = "查询权限" ,  description = "根据参数查询基本权限表信息")
+    public JsonPageResult query(@RequestBody(required = false) EasSysPermission permission,
+                                @RequestParam Integer pageNum, @RequestParam Integer pageSize ){
+        PageHelper.startPage(pageNum, pageSize);
+        PageData ret = easPermissionService.query(permission);
+        return JsonPageResult.data(ret);
+    }
+
+    @PostMapping("/add")
+    @Operation(summary = "添加权限" ,  description = "录入权限表基本信息")
+    public JsonResult add(@RequestBody EasSysPermission permission){
+        Boolean ret = easPermissionService.add(permission);
+        if(ret){
+            return JsonResult.ok();
+        }
+        return JsonResult.fail();
+    }
+
+    @DeleteMapping("/delete")
+    @Operation(summary = "删除权限" ,  description = "删除权限表数据根据ID")
+    public JsonResult delete(@RequestParam Integer id){
+        Boolean ret = easPermissionService.delete(id);
+        if(ret){
+            return JsonResult.ok();
+        }
+        return JsonResult.fail();
+    }
+
+    @PutMapping("/update")
+    @Operation(summary = "更新权限" ,  description = "根据ID 更新权限表信息")
+    public JsonResult update(@RequestBody EasSysPermission permission){
+        Boolean ret = easPermissionService.update(permission);
+        if(ret){
+            return JsonResult.ok();
+        }
+        return JsonResult.fail();
+    }
+}

+ 3 - 2
controller/src/main/java/com/koobietech/eas/controller/EasUserController.java

@@ -1,6 +1,7 @@
 package com.koobietech.eas.controller;
 
 import com.koobietech.eas.dao.dto.TestDto;
+import com.koobietech.eas.mbg.model.EasEduSubjects;
 import com.koobietech.eas.mbg.model.EasSysStudent;
 import com.koobietech.eas.service.DemoService;
 import io.swagger.v3.oas.annotations.Operation;
@@ -19,9 +20,9 @@ public class EasUserController {
 
     @PostMapping("/test")
     @Operation(summary = "控制器测试用例" , description = "用于演示Swagger配置注解")
-    public List<EasSysStudent> test(@RequestBody TestDto dto){
+    public List<EasSysStudent> test(@RequestBody EasEduSubjects easEduSubjects){
 
-        return demoService.test( dto );
+        return demoService.test( easEduSubjects );
     }
 
 

+ 7 - 4
controller/src/main/resources/application-dev.yaml

@@ -2,15 +2,15 @@ server:
   port: 8080
 spring:
   datasource:
-    url: jdbc:mysql://39.105.160.25:10992/eas?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=true&tinyInt1isBit=false
+    url: jdbc:mysql://mysql8-compose:3306/eas?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=true&tinyInt1isBit=false
     username: eas
     password: eas
     driver-class-name: com.mysql.cj.jdbc.Driver
   redis:
-    host: localhost
+    host: redis-compose
     database: 9
     password:
-    port: 26379
+    port: 6379
   security:
     user:
       name: admin
@@ -24,4 +24,7 @@ springdoc:
 knife4j:
   enable: true
   setting:
-    language: zh_cn
+    language: zh_cn
+logging:
+  level:
+    com.koobietech.eas.*: TRACE

+ 10 - 7
controller/src/main/resources/application-local.yaml

@@ -1,16 +1,16 @@
 server:
-  port: 8080
+  port: 8081
 spring:
   datasource:
-    url: jdbc:mysql://39.105.160.25:10992/eas?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=true&tinyInt1isBit=false
-    username: eas
-    password: eas
+    url: jdbc:mysql://127.0.0.1:3306/eas?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=true&tinyInt1isBit=false
+    username: root
+    password: 1234
     driver-class-name: com.mysql.cj.jdbc.Driver
   redis:
     host: localhost
-    database: 15
+    database: 9
     password:
-    port: 6379
+    port: 26379
   security:
     user:
       name: admin
@@ -24,4 +24,7 @@ springdoc:
 knife4j:
   enable: true
   setting:
-    language: zh_cn
+    language: zh_cn
+logging:
+  level:
+    com.koobietech.eas.*: TRACE

+ 78 - 0
controller/src/main/resources/logback.xml

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <property name="log.path" value="./" />
+    <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+            <charset>UTF-8</charset>
+        </encoder>
+    </appender>
+    <appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${log.path}/sys-info.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>INFO</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+    <appender name="file_debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${log.path}/sys-debug.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${log.path}/sys-debug.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>DEBUG</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>TRACE</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+    <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${log.path}/sys-error.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <maxHistory>60</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${log.pattern}</pattern>
+        </encoder>
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>WARN</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+        <filter class="ch.qos.logback.classic.filter.LevelFilter">
+            <level>ERROR</level>
+            <onMatch>ACCEPT</onMatch>
+            <onMismatch>DENY</onMismatch>
+        </filter>
+    </appender>
+    <root level="info">
+        <appender-ref ref="console" />
+        <appender-ref ref="file_info" />
+        <appender-ref ref="file_debug" />
+        <appender-ref ref="file_error" />
+    </root>
+    <logger name="com.koobietech.eas" level="debug" additivity="false">
+        <appender-ref ref="console"/>
+        <appender-ref ref="file_info"/>
+        <appender-ref ref="file_error" />
+        <appender-ref ref="file_debug" />
+    </logger>
+</configuration>

+ 2 - 1
docker-compose.yml

@@ -1,7 +1,8 @@
 version: "3"
 services:
   eas-project-api:
-    image: ${BRANCH_NAME}:${BUILD_NUMBER}
+    restart: always
+    image: easapi${BRANCH_NAME}:${BUILD_NUMBER}
     ports:
       - 11004:8080
     networks:

+ 0 - 6
mbg/src/main/java/com/koobietech/eas/mbg/mapper/EasEduCategoryMapper.java

@@ -17,21 +17,15 @@ public interface EasEduCategoryMapper {
 
     int insertSelective(EasEduCategory record);
 
-    List<EasEduCategory> selectByExampleWithBLOBs(EasEduCategoryExample example);
-
     List<EasEduCategory> selectByExample(EasEduCategoryExample example);
 
     EasEduCategory selectByPrimaryKey(Integer id);
 
     int updateByExampleSelective(@Param("record") EasEduCategory record, @Param("example") EasEduCategoryExample example);
 
-    int updateByExampleWithBLOBs(@Param("record") EasEduCategory record, @Param("example") EasEduCategoryExample example);
-
     int updateByExample(@Param("record") EasEduCategory record, @Param("example") EasEduCategoryExample example);
 
     int updateByPrimaryKeySelective(EasEduCategory record);
 
-    int updateByPrimaryKeyWithBLOBs(EasEduCategory record);
-
     int updateByPrimaryKey(EasEduCategory record);
 }

+ 0 - 6
mbg/src/main/java/com/koobietech/eas/mbg/mapper/EasEduSubjectsMapper.java

@@ -17,21 +17,15 @@ public interface EasEduSubjectsMapper {
 
     int insertSelective(EasEduSubjects record);
 
-    List<EasEduSubjects> selectByExampleWithBLOBs(EasEduSubjectsExample example);
-
     List<EasEduSubjects> selectByExample(EasEduSubjectsExample example);
 
     EasEduSubjects selectByPrimaryKey(Integer id);
 
     int updateByExampleSelective(@Param("record") EasEduSubjects record, @Param("example") EasEduSubjectsExample example);
 
-    int updateByExampleWithBLOBs(@Param("record") EasEduSubjects record, @Param("example") EasEduSubjectsExample example);
-
     int updateByExample(@Param("record") EasEduSubjects record, @Param("example") EasEduSubjectsExample example);
 
     int updateByPrimaryKeySelective(EasEduSubjects record);
 
-    int updateByPrimaryKeyWithBLOBs(EasEduSubjects record);
-
     int updateByPrimaryKey(EasEduSubjects record);
 }

+ 0 - 6
mbg/src/main/java/com/koobietech/eas/mbg/mapper/EasSysPermissionMapper.java

@@ -17,21 +17,15 @@ public interface EasSysPermissionMapper {
 
     int insertSelective(EasSysPermission record);
 
-    List<EasSysPermission> selectByExampleWithBLOBs(EasSysPermissionExample example);
-
     List<EasSysPermission> selectByExample(EasSysPermissionExample example);
 
     EasSysPermission selectByPrimaryKey(Integer id);
 
     int updateByExampleSelective(@Param("record") EasSysPermission record, @Param("example") EasSysPermissionExample example);
 
-    int updateByExampleWithBLOBs(@Param("record") EasSysPermission record, @Param("example") EasSysPermissionExample example);
-
     int updateByExample(@Param("record") EasSysPermission record, @Param("example") EasSysPermissionExample example);
 
     int updateByPrimaryKeySelective(EasSysPermission record);
 
-    int updateByPrimaryKeyWithBLOBs(EasSysPermission record);
-
     int updateByPrimaryKey(EasSysPermission record);
 }

+ 17 - 17
mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduCategory.java

@@ -15,6 +15,14 @@ public class EasEduCategory implements Serializable {
     @Schema(description = "学科名称")
     private String name;
 
+    /**
+     * 学科描述
+     *
+     * @mbg.generated
+     */
+    @Schema(description = "学科描述")
+    private String description;
+
     /**
      * 创建时间
      *
@@ -47,14 +55,6 @@ public class EasEduCategory implements Serializable {
     @Schema(description = "状态")
     private String disabled;
 
-    /**
-     * 学科描述
-     *
-     * @mbg.generated
-     */
-    @Schema(description = "学科描述")
-    private String description;
-
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -73,6 +73,14 @@ public class EasEduCategory implements Serializable {
         this.name = name;
     }
 
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
     public Date getCreateTime() {
         return createTime;
     }
@@ -105,14 +113,6 @@ public class EasEduCategory implements Serializable {
         this.disabled = disabled;
     }
 
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -121,11 +121,11 @@ public class EasEduCategory implements Serializable {
         sb.append("Hash = ").append(hashCode());
         sb.append(", id=").append(id);
         sb.append(", name=").append(name);
+        sb.append(", description=").append(description);
         sb.append(", createTime=").append(createTime);
         sb.append(", modifyTime=").append(modifyTime);
         sb.append(", createUid=").append(createUid);
         sb.append(", disabled=").append(disabled);
-        sb.append(", description=").append(description);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 70 - 0
mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduCategoryExample.java

@@ -235,6 +235,76 @@ public class EasEduCategoryExample {
             return (Criteria) this;
         }
 
+        public Criteria andDescriptionIsNull() {
+            addCriterion("description is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionIsNotNull() {
+            addCriterion("description is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionEqualTo(String value) {
+            addCriterion("description =", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionNotEqualTo(String value) {
+            addCriterion("description <>", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionGreaterThan(String value) {
+            addCriterion("description >", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
+            addCriterion("description >=", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionLessThan(String value) {
+            addCriterion("description <", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionLessThanOrEqualTo(String value) {
+            addCriterion("description <=", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionLike(String value) {
+            addCriterion("description like", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionNotLike(String value) {
+            addCriterion("description not like", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionIn(List<String> values) {
+            addCriterion("description in", values, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionNotIn(List<String> values) {
+            addCriterion("description not in", values, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionBetween(String value1, String value2) {
+            addCriterion("description between", value1, value2, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionNotBetween(String value1, String value2) {
+            addCriterion("description not between", value1, value2, "description");
+            return (Criteria) this;
+        }
+
         public Criteria andCreateTimeIsNull() {
             addCriterion("create_time is null");
             return (Criteria) this;

+ 17 - 17
mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduSubjects.java

@@ -15,6 +15,14 @@ public class EasEduSubjects implements Serializable {
     @Schema(description = "学科名称")
     private String name;
 
+    /**
+     * 学科描述
+     *
+     * @mbg.generated
+     */
+    @Schema(description = "学科描述")
+    private String description;
+
     /**
      * 学科分类
      *
@@ -55,14 +63,6 @@ public class EasEduSubjects implements Serializable {
     @Schema(description = "状态")
     private String disabled;
 
-    /**
-     * 学科描述
-     *
-     * @mbg.generated
-     */
-    @Schema(description = "学科描述")
-    private String description;
-
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -81,6 +81,14 @@ public class EasEduSubjects implements Serializable {
         this.name = name;
     }
 
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
     public String getCategoryId() {
         return categoryId;
     }
@@ -121,14 +129,6 @@ public class EasEduSubjects implements Serializable {
         this.disabled = disabled;
     }
 
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -137,12 +137,12 @@ public class EasEduSubjects implements Serializable {
         sb.append("Hash = ").append(hashCode());
         sb.append(", id=").append(id);
         sb.append(", name=").append(name);
+        sb.append(", description=").append(description);
         sb.append(", categoryId=").append(categoryId);
         sb.append(", createTime=").append(createTime);
         sb.append(", modifyTime=").append(modifyTime);
         sb.append(", createUid=").append(createUid);
         sb.append(", disabled=").append(disabled);
-        sb.append(", description=").append(description);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 70 - 0
mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduSubjectsExample.java

@@ -235,6 +235,76 @@ public class EasEduSubjectsExample {
             return (Criteria) this;
         }
 
+        public Criteria andDescriptionIsNull() {
+            addCriterion("description is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionIsNotNull() {
+            addCriterion("description is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionEqualTo(String value) {
+            addCriterion("description =", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionNotEqualTo(String value) {
+            addCriterion("description <>", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionGreaterThan(String value) {
+            addCriterion("description >", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
+            addCriterion("description >=", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionLessThan(String value) {
+            addCriterion("description <", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionLessThanOrEqualTo(String value) {
+            addCriterion("description <=", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionLike(String value) {
+            addCriterion("description like", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionNotLike(String value) {
+            addCriterion("description not like", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionIn(List<String> values) {
+            addCriterion("description in", values, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionNotIn(List<String> values) {
+            addCriterion("description not in", values, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionBetween(String value1, String value2) {
+            addCriterion("description between", value1, value2, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionNotBetween(String value1, String value2) {
+            addCriterion("description not between", value1, value2, "description");
+            return (Criteria) this;
+        }
+
         public Criteria andCategoryIdIsNull() {
             addCriterion("category_id is null");
             return (Criteria) this;

+ 17 - 17
mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysPermission.java

@@ -21,6 +21,14 @@ public class EasSysPermission implements Serializable {
     @Schema(description = "权限名称")
     private String name;
 
+    /**
+     * 权限描述
+     *
+     * @mbg.generated
+     */
+    @Schema(description = "权限描述")
+    private String description;
+
     /**
      * 是否激活
      *
@@ -61,14 +69,6 @@ public class EasSysPermission implements Serializable {
     @Schema(description = "状态")
     private String disabled;
 
-    /**
-     * 权限描述
-     *
-     * @mbg.generated
-     */
-    @Schema(description = "权限描述")
-    private String description;
-
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -87,6 +87,14 @@ public class EasSysPermission implements Serializable {
         this.name = name;
     }
 
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
     public Byte getIsActive() {
         return isActive;
     }
@@ -127,14 +135,6 @@ public class EasSysPermission implements Serializable {
         this.disabled = disabled;
     }
 
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -143,12 +143,12 @@ public class EasSysPermission implements Serializable {
         sb.append("Hash = ").append(hashCode());
         sb.append(", id=").append(id);
         sb.append(", name=").append(name);
+        sb.append(", description=").append(description);
         sb.append(", isActive=").append(isActive);
         sb.append(", createTime=").append(createTime);
         sb.append(", modifyTime=").append(modifyTime);
         sb.append(", createUid=").append(createUid);
         sb.append(", disabled=").append(disabled);
-        sb.append(", description=").append(description);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 70 - 0
mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysPermissionExample.java

@@ -235,6 +235,76 @@ public class EasSysPermissionExample {
             return (Criteria) this;
         }
 
+        public Criteria andDescriptionIsNull() {
+            addCriterion("description is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionIsNotNull() {
+            addCriterion("description is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionEqualTo(String value) {
+            addCriterion("description =", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionNotEqualTo(String value) {
+            addCriterion("description <>", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionGreaterThan(String value) {
+            addCriterion("description >", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
+            addCriterion("description >=", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionLessThan(String value) {
+            addCriterion("description <", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionLessThanOrEqualTo(String value) {
+            addCriterion("description <=", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionLike(String value) {
+            addCriterion("description like", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionNotLike(String value) {
+            addCriterion("description not like", value, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionIn(List<String> values) {
+            addCriterion("description in", values, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionNotIn(List<String> values) {
+            addCriterion("description not in", values, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionBetween(String value1, String value2) {
+            addCriterion("description between", value1, value2, "description");
+            return (Criteria) this;
+        }
+
+        public Criteria andDescriptionNotBetween(String value1, String value2) {
+            addCriterion("description not between", value1, value2, "description");
+            return (Criteria) this;
+        }
+
         public Criteria andIsActiveIsNull() {
             addCriterion("is_active is null");
             return (Criteria) this;

+ 21 - 65
mbg/src/main/resources/com/koobietech/eas/mbg/mapper/EasEduCategoryMapper.xml

@@ -4,14 +4,12 @@
   <resultMap id="BaseResultMap" type="com.koobietech.eas.mbg.model.EasEduCategory">
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="description" jdbcType="VARCHAR" property="description" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
     <result column="create_uid" jdbcType="INTEGER" property="createUid" />
     <result column="disabled" jdbcType="CHAR" property="disabled" />
   </resultMap>
-  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.koobietech.eas.mbg.model.EasEduCategory">
-    <result column="description" jdbcType="LONGVARCHAR" property="description" />
-  </resultMap>
   <sql id="Example_Where_Clause">
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -71,27 +69,8 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, name, create_time, modify_time, create_uid, disabled
-  </sql>
-  <sql id="Blob_Column_List">
-    description
+    id, name, description, create_time, modify_time, create_uid, disabled
   </sql>
-  <select id="selectByExampleWithBLOBs" parameterType="com.koobietech.eas.mbg.model.EasEduCategoryExample" resultMap="ResultMapWithBLOBs">
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
-    from eas_edu_category
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
   <select id="selectByExample" parameterType="com.koobietech.eas.mbg.model.EasEduCategoryExample" resultMap="BaseResultMap">
     select
     <if test="distinct">
@@ -106,11 +85,9 @@
       order by ${orderByClause}
     </if>
   </select>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select 
     <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
     from eas_edu_category
     where id = #{id,jdbcType=INTEGER}
   </select>
@@ -128,11 +105,11 @@
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
       SELECT LAST_INSERT_ID()
     </selectKey>
-    insert into eas_edu_category (name, create_time, modify_time, 
-      create_uid, disabled, description
+    insert into eas_edu_category (name, description, create_time, 
+      modify_time, create_uid, disabled
       )
-    values (#{name,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyTime,jdbcType=TIMESTAMP}, 
-      #{createUid,jdbcType=INTEGER}, #{disabled,jdbcType=CHAR}, #{description,jdbcType=LONGVARCHAR}
+    values (#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{modifyTime,jdbcType=TIMESTAMP}, #{createUid,jdbcType=INTEGER}, #{disabled,jdbcType=CHAR}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.koobietech.eas.mbg.model.EasEduCategory">
@@ -144,6 +121,9 @@
       <if test="name != null">
         name,
       </if>
+      <if test="description != null">
+        description,
+      </if>
       <if test="createTime != null">
         create_time,
       </if>
@@ -156,14 +136,14 @@
       <if test="disabled != null">
         disabled,
       </if>
-      <if test="description != null">
-        description,
-      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="name != null">
         #{name,jdbcType=VARCHAR},
       </if>
+      <if test="description != null">
+        #{description,jdbcType=VARCHAR},
+      </if>
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -176,9 +156,6 @@
       <if test="disabled != null">
         #{disabled,jdbcType=CHAR},
       </if>
-      <if test="description != null">
-        #{description,jdbcType=LONGVARCHAR},
-      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.koobietech.eas.mbg.model.EasEduCategoryExample" resultType="java.lang.Long">
@@ -196,6 +173,9 @@
       <if test="record.name != null">
         name = #{record.name,jdbcType=VARCHAR},
       </if>
+      <if test="record.description != null">
+        description = #{record.description,jdbcType=VARCHAR},
+      </if>
       <if test="record.createTime != null">
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
       </if>
@@ -208,31 +188,16 @@
       <if test="record.disabled != null">
         disabled = #{record.disabled,jdbcType=CHAR},
       </if>
-      <if test="record.description != null">
-        description = #{record.description,jdbcType=LONGVARCHAR},
-      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
   </update>
-  <update id="updateByExampleWithBLOBs" parameterType="map">
-    update eas_edu_category
-    set id = #{record.id,jdbcType=INTEGER},
-      name = #{record.name,jdbcType=VARCHAR},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
-      create_uid = #{record.createUid,jdbcType=INTEGER},
-      disabled = #{record.disabled,jdbcType=CHAR},
-      description = #{record.description,jdbcType=LONGVARCHAR}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
   <update id="updateByExample" parameterType="map">
     update eas_edu_category
     set id = #{record.id,jdbcType=INTEGER},
       name = #{record.name,jdbcType=VARCHAR},
+      description = #{record.description,jdbcType=VARCHAR},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
       create_uid = #{record.createUid,jdbcType=INTEGER},
@@ -247,6 +212,9 @@
       <if test="name != null">
         name = #{name,jdbcType=VARCHAR},
       </if>
+      <if test="description != null">
+        description = #{description,jdbcType=VARCHAR},
+      </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -259,25 +227,13 @@
       <if test="disabled != null">
         disabled = #{disabled,jdbcType=CHAR},
       </if>
-      <if test="description != null">
-        description = #{description,jdbcType=LONGVARCHAR},
-      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.koobietech.eas.mbg.model.EasEduCategory">
-    update eas_edu_category
-    set name = #{name,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      modify_time = #{modifyTime,jdbcType=TIMESTAMP},
-      create_uid = #{createUid,jdbcType=INTEGER},
-      disabled = #{disabled,jdbcType=CHAR},
-      description = #{description,jdbcType=LONGVARCHAR}
-    where id = #{id,jdbcType=INTEGER}
-  </update>
   <update id="updateByPrimaryKey" parameterType="com.koobietech.eas.mbg.model.EasEduCategory">
     update eas_edu_category
     set name = #{name,jdbcType=VARCHAR},
+      description = #{description,jdbcType=VARCHAR},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       modify_time = #{modifyTime,jdbcType=TIMESTAMP},
       create_uid = #{createUid,jdbcType=INTEGER},

+ 23 - 69
mbg/src/main/resources/com/koobietech/eas/mbg/mapper/EasEduSubjectsMapper.xml

@@ -4,15 +4,13 @@
   <resultMap id="BaseResultMap" type="com.koobietech.eas.mbg.model.EasEduSubjects">
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="description" jdbcType="VARCHAR" property="description" />
     <result column="category_id" jdbcType="VARCHAR" property="categoryId" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
     <result column="create_uid" jdbcType="INTEGER" property="createUid" />
     <result column="disabled" jdbcType="CHAR" property="disabled" />
   </resultMap>
-  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.koobietech.eas.mbg.model.EasEduSubjects">
-    <result column="description" jdbcType="LONGVARCHAR" property="description" />
-  </resultMap>
   <sql id="Example_Where_Clause">
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -72,27 +70,8 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, name, category_id, create_time, modify_time, create_uid, disabled
-  </sql>
-  <sql id="Blob_Column_List">
-    description
+    id, name, description, category_id, create_time, modify_time, create_uid, disabled
   </sql>
-  <select id="selectByExampleWithBLOBs" parameterType="com.koobietech.eas.mbg.model.EasEduSubjectsExample" resultMap="ResultMapWithBLOBs">
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
-    from eas_edu_subjects
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
   <select id="selectByExample" parameterType="com.koobietech.eas.mbg.model.EasEduSubjectsExample" resultMap="BaseResultMap">
     select
     <if test="distinct">
@@ -107,11 +86,9 @@
       order by ${orderByClause}
     </if>
   </select>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select 
     <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
     from eas_edu_subjects
     where id = #{id,jdbcType=INTEGER}
   </select>
@@ -129,12 +106,12 @@
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
       SELECT LAST_INSERT_ID()
     </selectKey>
-    insert into eas_edu_subjects (name, category_id, create_time, 
-      modify_time, create_uid, disabled, 
-      description)
-    values (#{name,jdbcType=VARCHAR}, #{categoryId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{modifyTime,jdbcType=TIMESTAMP}, #{createUid,jdbcType=INTEGER}, #{disabled,jdbcType=CHAR}, 
-      #{description,jdbcType=LONGVARCHAR})
+    insert into eas_edu_subjects (name, description, category_id, 
+      create_time, modify_time, create_uid, 
+      disabled)
+    values (#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{categoryId,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{modifyTime,jdbcType=TIMESTAMP}, #{createUid,jdbcType=INTEGER}, 
+      #{disabled,jdbcType=CHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.koobietech.eas.mbg.model.EasEduSubjects">
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
@@ -145,6 +122,9 @@
       <if test="name != null">
         name,
       </if>
+      <if test="description != null">
+        description,
+      </if>
       <if test="categoryId != null">
         category_id,
       </if>
@@ -160,14 +140,14 @@
       <if test="disabled != null">
         disabled,
       </if>
-      <if test="description != null">
-        description,
-      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="name != null">
         #{name,jdbcType=VARCHAR},
       </if>
+      <if test="description != null">
+        #{description,jdbcType=VARCHAR},
+      </if>
       <if test="categoryId != null">
         #{categoryId,jdbcType=VARCHAR},
       </if>
@@ -183,9 +163,6 @@
       <if test="disabled != null">
         #{disabled,jdbcType=CHAR},
       </if>
-      <if test="description != null">
-        #{description,jdbcType=LONGVARCHAR},
-      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.koobietech.eas.mbg.model.EasEduSubjectsExample" resultType="java.lang.Long">
@@ -203,6 +180,9 @@
       <if test="record.name != null">
         name = #{record.name,jdbcType=VARCHAR},
       </if>
+      <if test="record.description != null">
+        description = #{record.description,jdbcType=VARCHAR},
+      </if>
       <if test="record.categoryId != null">
         category_id = #{record.categoryId,jdbcType=VARCHAR},
       </if>
@@ -218,32 +198,16 @@
       <if test="record.disabled != null">
         disabled = #{record.disabled,jdbcType=CHAR},
       </if>
-      <if test="record.description != null">
-        description = #{record.description,jdbcType=LONGVARCHAR},
-      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
   </update>
-  <update id="updateByExampleWithBLOBs" parameterType="map">
-    update eas_edu_subjects
-    set id = #{record.id,jdbcType=INTEGER},
-      name = #{record.name,jdbcType=VARCHAR},
-      category_id = #{record.categoryId,jdbcType=VARCHAR},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
-      create_uid = #{record.createUid,jdbcType=INTEGER},
-      disabled = #{record.disabled,jdbcType=CHAR},
-      description = #{record.description,jdbcType=LONGVARCHAR}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
   <update id="updateByExample" parameterType="map">
     update eas_edu_subjects
     set id = #{record.id,jdbcType=INTEGER},
       name = #{record.name,jdbcType=VARCHAR},
+      description = #{record.description,jdbcType=VARCHAR},
       category_id = #{record.categoryId,jdbcType=VARCHAR},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
@@ -259,6 +223,9 @@
       <if test="name != null">
         name = #{name,jdbcType=VARCHAR},
       </if>
+      <if test="description != null">
+        description = #{description,jdbcType=VARCHAR},
+      </if>
       <if test="categoryId != null">
         category_id = #{categoryId,jdbcType=VARCHAR},
       </if>
@@ -274,26 +241,13 @@
       <if test="disabled != null">
         disabled = #{disabled,jdbcType=CHAR},
       </if>
-      <if test="description != null">
-        description = #{description,jdbcType=LONGVARCHAR},
-      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.koobietech.eas.mbg.model.EasEduSubjects">
-    update eas_edu_subjects
-    set name = #{name,jdbcType=VARCHAR},
-      category_id = #{categoryId,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      modify_time = #{modifyTime,jdbcType=TIMESTAMP},
-      create_uid = #{createUid,jdbcType=INTEGER},
-      disabled = #{disabled,jdbcType=CHAR},
-      description = #{description,jdbcType=LONGVARCHAR}
-    where id = #{id,jdbcType=INTEGER}
-  </update>
   <update id="updateByPrimaryKey" parameterType="com.koobietech.eas.mbg.model.EasEduSubjects">
     update eas_edu_subjects
     set name = #{name,jdbcType=VARCHAR},
+      description = #{description,jdbcType=VARCHAR},
       category_id = #{categoryId,jdbcType=VARCHAR},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       modify_time = #{modifyTime,jdbcType=TIMESTAMP},

+ 23 - 69
mbg/src/main/resources/com/koobietech/eas/mbg/mapper/EasSysPermissionMapper.xml

@@ -4,15 +4,13 @@
   <resultMap id="BaseResultMap" type="com.koobietech.eas.mbg.model.EasSysPermission">
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="description" jdbcType="VARCHAR" property="description" />
     <result column="is_active" jdbcType="TINYINT" property="isActive" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
     <result column="create_uid" jdbcType="INTEGER" property="createUid" />
     <result column="disabled" jdbcType="CHAR" property="disabled" />
   </resultMap>
-  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.koobietech.eas.mbg.model.EasSysPermission">
-    <result column="description" jdbcType="LONGVARCHAR" property="description" />
-  </resultMap>
   <sql id="Example_Where_Clause">
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -72,27 +70,8 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, name, is_active, create_time, modify_time, create_uid, disabled
-  </sql>
-  <sql id="Blob_Column_List">
-    description
+    id, name, description, is_active, create_time, modify_time, create_uid, disabled
   </sql>
-  <select id="selectByExampleWithBLOBs" parameterType="com.koobietech.eas.mbg.model.EasSysPermissionExample" resultMap="ResultMapWithBLOBs">
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
-    from eas_sys_permission
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
   <select id="selectByExample" parameterType="com.koobietech.eas.mbg.model.EasSysPermissionExample" resultMap="BaseResultMap">
     select
     <if test="distinct">
@@ -107,11 +86,9 @@
       order by ${orderByClause}
     </if>
   </select>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select 
     <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
     from eas_sys_permission
     where id = #{id,jdbcType=INTEGER}
   </select>
@@ -129,12 +106,12 @@
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
       SELECT LAST_INSERT_ID()
     </selectKey>
-    insert into eas_sys_permission (name, is_active, create_time, 
-      modify_time, create_uid, disabled, 
-      description)
-    values (#{name,jdbcType=VARCHAR}, #{isActive,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{modifyTime,jdbcType=TIMESTAMP}, #{createUid,jdbcType=INTEGER}, #{disabled,jdbcType=CHAR}, 
-      #{description,jdbcType=LONGVARCHAR})
+    insert into eas_sys_permission (name, description, is_active, 
+      create_time, modify_time, create_uid, 
+      disabled)
+    values (#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{isActive,jdbcType=TINYINT}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{modifyTime,jdbcType=TIMESTAMP}, #{createUid,jdbcType=INTEGER}, 
+      #{disabled,jdbcType=CHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.koobietech.eas.mbg.model.EasSysPermission">
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
@@ -145,6 +122,9 @@
       <if test="name != null">
         name,
       </if>
+      <if test="description != null">
+        description,
+      </if>
       <if test="isActive != null">
         is_active,
       </if>
@@ -160,14 +140,14 @@
       <if test="disabled != null">
         disabled,
       </if>
-      <if test="description != null">
-        description,
-      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="name != null">
         #{name,jdbcType=VARCHAR},
       </if>
+      <if test="description != null">
+        #{description,jdbcType=VARCHAR},
+      </if>
       <if test="isActive != null">
         #{isActive,jdbcType=TINYINT},
       </if>
@@ -183,9 +163,6 @@
       <if test="disabled != null">
         #{disabled,jdbcType=CHAR},
       </if>
-      <if test="description != null">
-        #{description,jdbcType=LONGVARCHAR},
-      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.koobietech.eas.mbg.model.EasSysPermissionExample" resultType="java.lang.Long">
@@ -203,6 +180,9 @@
       <if test="record.name != null">
         name = #{record.name,jdbcType=VARCHAR},
       </if>
+      <if test="record.description != null">
+        description = #{record.description,jdbcType=VARCHAR},
+      </if>
       <if test="record.isActive != null">
         is_active = #{record.isActive,jdbcType=TINYINT},
       </if>
@@ -218,32 +198,16 @@
       <if test="record.disabled != null">
         disabled = #{record.disabled,jdbcType=CHAR},
       </if>
-      <if test="record.description != null">
-        description = #{record.description,jdbcType=LONGVARCHAR},
-      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
   </update>
-  <update id="updateByExampleWithBLOBs" parameterType="map">
-    update eas_sys_permission
-    set id = #{record.id,jdbcType=INTEGER},
-      name = #{record.name,jdbcType=VARCHAR},
-      is_active = #{record.isActive,jdbcType=TINYINT},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
-      create_uid = #{record.createUid,jdbcType=INTEGER},
-      disabled = #{record.disabled,jdbcType=CHAR},
-      description = #{record.description,jdbcType=LONGVARCHAR}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
   <update id="updateByExample" parameterType="map">
     update eas_sys_permission
     set id = #{record.id,jdbcType=INTEGER},
       name = #{record.name,jdbcType=VARCHAR},
+      description = #{record.description,jdbcType=VARCHAR},
       is_active = #{record.isActive,jdbcType=TINYINT},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
@@ -259,6 +223,9 @@
       <if test="name != null">
         name = #{name,jdbcType=VARCHAR},
       </if>
+      <if test="description != null">
+        description = #{description,jdbcType=VARCHAR},
+      </if>
       <if test="isActive != null">
         is_active = #{isActive,jdbcType=TINYINT},
       </if>
@@ -274,26 +241,13 @@
       <if test="disabled != null">
         disabled = #{disabled,jdbcType=CHAR},
       </if>
-      <if test="description != null">
-        description = #{description,jdbcType=LONGVARCHAR},
-      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.koobietech.eas.mbg.model.EasSysPermission">
-    update eas_sys_permission
-    set name = #{name,jdbcType=VARCHAR},
-      is_active = #{isActive,jdbcType=TINYINT},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      modify_time = #{modifyTime,jdbcType=TIMESTAMP},
-      create_uid = #{createUid,jdbcType=INTEGER},
-      disabled = #{disabled,jdbcType=CHAR},
-      description = #{description,jdbcType=LONGVARCHAR}
-    where id = #{id,jdbcType=INTEGER}
-  </update>
   <update id="updateByPrimaryKey" parameterType="com.koobietech.eas.mbg.model.EasSysPermission">
     update eas_sys_permission
     set name = #{name,jdbcType=VARCHAR},
+      description = #{description,jdbcType=VARCHAR},
       is_active = #{isActive,jdbcType=TINYINT},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       modify_time = #{modifyTime,jdbcType=TIMESTAMP},

+ 2 - 0
pom.xml

@@ -12,6 +12,7 @@
     <properties>
         <maven.compiler.source>11</maven.compiler.source>
         <maven.compiler.target>11</maven.compiler.target>
+        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
         <java.version>11</java.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -33,6 +34,7 @@
         <spring-data-redis.version>2.7.3</spring-data-redis.version>
         <knife4j.version>4.1.0</knife4j.version>
         <pagehelper.starter.version>1.3.1</pagehelper.starter.version>
+        <maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
     </properties>
     <dependencyManagement>
         <dependencies>

+ 2 - 1
service/src/main/java/com/koobietech/eas/service/DemoService.java

@@ -1,10 +1,11 @@
 package com.koobietech.eas.service;
 
 import com.koobietech.eas.dao.dto.TestDto;
+import com.koobietech.eas.mbg.model.EasEduSubjects;
 import com.koobietech.eas.mbg.model.EasSysStudent;
 
 import java.util.List;
 
 public interface DemoService {
-    List<EasSysStudent> test(TestDto dto);
+    List test(EasEduSubjects dto);
 }

+ 13 - 0
service/src/main/java/com/koobietech/eas/service/EasDepartmentService.java

@@ -0,0 +1,13 @@
+package com.koobietech.eas.service;
+
+import com.koobietech.eas.common.result.PageData;
+import com.koobietech.eas.mbg.model.EasSysDepartment;
+
+
+public interface EasDepartmentService {
+
+    Boolean update(EasSysDepartment department);
+    Boolean add(EasSysDepartment department);
+    Boolean delete(Long id);
+    PageData query(EasSysDepartment department);
+}

+ 12 - 0
service/src/main/java/com/koobietech/eas/service/EasPermissionService.java

@@ -0,0 +1,12 @@
+package com.koobietech.eas.service;
+
+import com.koobietech.eas.common.result.PageData;
+import com.koobietech.eas.mbg.model.EasSysPermission;
+
+public interface EasPermissionService {
+
+    Boolean update(EasSysPermission record);
+    Boolean add(EasSysPermission record);
+    Boolean delete(Integer id);
+    PageData query(EasSysPermission permission);
+}

+ 11 - 11
service/src/main/java/com/koobietech/eas/service/impl/DemoServiceImpl.java

@@ -1,7 +1,9 @@
 package com.koobietech.eas.service.impl;
 
 import com.koobietech.eas.dao.dto.TestDto;
+import com.koobietech.eas.mbg.mapper.EasEduSubjectsMapper;
 import com.koobietech.eas.mbg.mapper.EasSysStudentMapper;
+import com.koobietech.eas.mbg.model.EasEduSubjects;
 import com.koobietech.eas.mbg.model.EasSysStudent;
 import com.koobietech.eas.mbg.model.EasSysStudentExample;
 import com.koobietech.eas.service.DemoService;
@@ -19,17 +21,15 @@ public class DemoServiceImpl implements DemoService {
     @Resource
     EasSysStudentMapper easSysStudentMapper;
 
+    @Resource
+    EasEduSubjectsMapper easEduSubjectsMapper;
+
     @Override
-    public List<EasSysStudent> test(TestDto dto) {
-        EasSysStudentExample easSysStudentExample = new EasSysStudentExample();
-        EasSysStudentExample.Criteria criteria = easSysStudentExample.createCriteria();
-        if (Objects.nonNull(dto.getId())) {
-            criteria.andIdEqualTo( Long.valueOf(dto.getId()) );
-        }
-        if (StringUtils.hasText(dto.getName())) {
-            criteria.andStudentNameLike( "%" + dto.getName() + "%" );
-        }
-        List<EasSysStudent> easSysStudents = easSysStudentMapper.selectByExample(easSysStudentExample);
-        return easSysStudents;
+    public List test(EasEduSubjects dto) {
+
+        easEduSubjectsMapper.insert(dto);
+
+        List list = easEduSubjectsMapper.selectByExample(null);
+        return list;
     }
 }

+ 77 - 0
service/src/main/java/com/koobietech/eas/service/impl/EasDepartmentServiceImpl.java

@@ -0,0 +1,77 @@
+package com.koobietech.eas.service.impl;
+
+import com.koobietech.eas.common.result.PageData;
+import com.koobietech.eas.mbg.mapper.EasSysDepartmentMapper;
+import com.koobietech.eas.mbg.model.EasSysDepartment;
+import com.koobietech.eas.mbg.model.EasSysDepartmentExample;
+import com.koobietech.eas.service.EasDepartmentService;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+
+
+@Service
+public class EasDepartmentServiceImpl implements EasDepartmentService {
+
+    @Resource
+    EasSysDepartmentMapper easSysDepartmentMapper;
+
+    @Override
+    public Boolean update(EasSysDepartment department) {
+        department.setModifyTime(new Date());
+        return easSysDepartmentMapper.updateByPrimaryKey(department) == 1;
+    }
+
+    @Override
+    public Boolean add(EasSysDepartment department) {
+        department.setCreateTime(new Date());
+        department.setModifyTime(new Date());
+        return easSysDepartmentMapper.insert(department) == 1;
+    }
+
+    @Override
+    public Boolean delete(Long id) {
+        return easSysDepartmentMapper.deleteByPrimaryKey(id) == 1;
+    }
+
+    @Override
+    public PageData query(EasSysDepartment department) {
+
+        EasSysDepartmentExample departmentExample = new EasSysDepartmentExample();
+        EasSysDepartmentExample.Criteria criteria = departmentExample.createCriteria();
+        if (Objects.nonNull(department)) {
+            if (Objects.nonNull(department.getId())) {
+                criteria.andIdEqualTo(department.getId());
+            }
+            if (StringUtils.hasText(department.getAddress())) {
+                criteria.andAddressLike("%" + department.getAddress() + "%");
+            }
+            if (StringUtils.hasText(department.getDepname())) {
+                criteria.andDepnameLike("%" + department.getDepname() + "%");
+            }
+            if (StringUtils.hasText(department.getEmail())) {
+                criteria.andEmailLike("%" + department.getEmail() + "%");
+            }
+            if (StringUtils.hasText(department.getManager())) {
+                criteria.andManagerLike("%" + department.getManager() + "%");
+            }
+            if (StringUtils.hasText(department.getPhone())) {
+                criteria.andPhoneLike("%" + department.getPhone() + "%");
+            }
+            if (Objects.nonNull(department.getCreateTime())) {
+                criteria.andCreateTimeGreaterThan(department.getCreateTime());
+            }
+        }
+        List<EasSysDepartment> departments =
+                 easSysDepartmentMapper.selectByExample(departmentExample);
+        long l = easSysDepartmentMapper.countByExample(departmentExample);
+        PageData ret = new PageData();
+        ret.setData(departments);
+        ret.setTotal(l);
+        return ret;
+    }
+}

+ 68 - 0
service/src/main/java/com/koobietech/eas/service/impl/EasPermissionServiceImpl.java

@@ -0,0 +1,68 @@
+package com.koobietech.eas.service.impl;
+
+import com.koobietech.eas.common.result.PageData;
+import com.koobietech.eas.mbg.mapper.EasSysPermissionMapper;
+import com.koobietech.eas.mbg.model.EasSysPermission;
+import com.koobietech.eas.mbg.model.EasSysPermissionExample;
+import com.koobietech.eas.service.EasPermissionService;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+
+@Service
+public class EasPermissionServiceImpl implements EasPermissionService {
+
+    @Resource
+    EasSysPermissionMapper easSysPermissionMapper;
+
+    @Override
+    public Boolean update(EasSysPermission permission) {
+        permission.setModifyTime(new Date());
+        return easSysPermissionMapper.updateByPrimaryKey(permission) == 1;
+    }
+
+    @Override
+    public Boolean add(EasSysPermission permission) {
+        permission.setCreateTime(new Date());
+        permission.setModifyTime(new Date());
+        return easSysPermissionMapper.insert(permission) == 1;
+    }
+
+    @Override
+    public Boolean delete(Integer id) {
+        return easSysPermissionMapper.deleteByPrimaryKey(id) == 1;
+    }
+
+    @Override
+    public PageData query(EasSysPermission permission) {
+        EasSysPermissionExample easSysPermissionExample = new EasSysPermissionExample();
+        EasSysPermissionExample.Criteria criteria = easSysPermissionExample.createCriteria();
+        if ( Objects.nonNull(permission) ) {
+            if (Objects.nonNull(permission.getId())) {
+                criteria.andIdEqualTo(permission.getId());
+            }
+            if (Objects.nonNull(permission.getIsActive())) {
+                criteria.andIsActiveEqualTo(permission.getIsActive());
+            }
+            if (StringUtils.hasText(permission.getDisabled())) {
+                criteria.andDisabledEqualTo(permission.getDisabled());
+            }
+            if (StringUtils.hasText(permission.getName())) {
+                criteria.andNameLike("%" + permission.getName() + "%");
+            }
+            if (Objects.nonNull(permission.getCreateTime())) {
+                criteria.andCreateTimeGreaterThan(permission.getCreateTime());
+            }
+        }
+        List<EasSysPermission> easSysPermissions = easSysPermissionMapper.selectByExample(easSysPermissionExample);
+        long l = easSysPermissionMapper.countByExample(easSysPermissionExample);
+        PageData ret = new PageData();
+        ret.setData(easSysPermissions);
+        ret.setTotal(l);
+        return ret;
+    }
+}