sch 2 vuotta sitten
commit
13e1b71678
100 muutettua tiedostoa jossa 5213 lisäystä ja 0 poistoa
  1. 33 0
      .gitignore
  2. 11 0
      Dockerfile
  3. 92 0
      README.md
  4. 190 0
      pom.xml
  5. 22 0
      sino-mark-client/pom.xml
  6. 180 0
      sino-mark-server/pom.xml
  7. 41 0
      sino-mark-server/src/main/java/cn/sino/mark/SinoMarkApplication.java
  8. 19 0
      sino-mark-server/src/main/java/cn/sino/mark/common/config/APIConfig.java
  9. 34 0
      sino-mark-server/src/main/java/cn/sino/mark/common/config/MarkCorsConfig.java
  10. 73 0
      sino-mark-server/src/main/java/cn/sino/mark/common/config/MybatisPlusConfig.java
  11. 57 0
      sino-mark-server/src/main/java/cn/sino/mark/common/config/RedisConfig.java
  12. 28 0
      sino-mark-server/src/main/java/cn/sino/mark/common/config/SnowflakeConfig.java
  13. 197 0
      sino-mark-server/src/main/java/cn/sino/mark/common/config/WebConfig.java
  14. 31 0
      sino-mark-server/src/main/java/cn/sino/mark/common/config/security/CusAccessDeniedHandler.java
  15. 31 0
      sino-mark-server/src/main/java/cn/sino/mark/common/config/security/CusAuthenticationEntryPoint.java
  16. 25 0
      sino-mark-server/src/main/java/cn/sino/mark/common/config/security/PasswordEncoderConfig.java
  17. 89 0
      sino-mark-server/src/main/java/cn/sino/mark/common/config/security/SysUserDetails.java
  18. 104 0
      sino-mark-server/src/main/java/cn/sino/mark/common/config/security/WebSecurityConfig.java
  19. 28 0
      sino-mark-server/src/main/java/cn/sino/mark/common/config/security/permission/CusMethodSecurityExpressionHandler.java
  20. 96 0
      sino-mark-server/src/main/java/cn/sino/mark/common/config/security/permission/CusPermissionEvaluator.java
  21. 225 0
      sino-mark-server/src/main/java/cn/sino/mark/common/config/security/permission/CustomSecurityExpressionRoot.java
  22. 28 0
      sino-mark-server/src/main/java/cn/sino/mark/common/config/security/permission/PermissionConfig.java
  23. 86 0
      sino-mark-server/src/main/java/cn/sino/mark/common/constants/Constant.java
  24. 31 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/BooleanEnum.java
  25. 33 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/DeleteStatusEnum.java
  26. 8 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/ErrorCode.java
  27. 27 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/ErrorCodeEnum.java
  28. 32 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/IsOrNotEnum.java
  29. 35 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/LogTypeEnum.java
  30. 36 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/MoveNodeTypeEnum.java
  31. 41 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/ProjectStatusEnum.java
  32. 32 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/ResourceAssignStatusEnum.java
  33. 32 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/ResourceTypeEnum.java
  34. 32 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/SampleTypeEnums.java
  35. 38 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/SysRoleEnums.java
  36. 33 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/SysUserLeaveEnum.java
  37. 40 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/SysUserStatusEnum.java
  38. 40 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/SysUserTypeEnum.java
  39. 32 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/TaskMarkEnums.java
  40. 32 0
      sino-mark-server/src/main/java/cn/sino/mark/common/enums/TaskRunningEnums.java
  41. 29 0
      sino-mark-server/src/main/java/cn/sino/mark/common/filter/LogMdcFilter.java
  42. 82 0
      sino-mark-server/src/main/java/cn/sino/mark/common/filter/LoginFilter.java
  43. 87 0
      sino-mark-server/src/main/java/cn/sino/mark/common/filter/TokenFilter.java
  44. 96 0
      sino-mark-server/src/main/java/cn/sino/mark/common/log/Log.java
  45. 23 0
      sino-mark-server/src/main/java/cn/sino/mark/common/log/SysLogEvent.java
  46. 29 0
      sino-mark-server/src/main/java/cn/sino/mark/common/log/SysLogEventPublisher.java
  47. 46 0
      sino-mark-server/src/main/java/cn/sino/mark/common/log/SysLogListener.java
  48. 55 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/ExportDataBO.java
  49. 52 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/ProjectBO.java
  50. 44 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/ProjectTaskBO.java
  51. 50 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/ProjectTaskDetailBO.java
  52. 25 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/ResourceBO.java
  53. 121 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/SysPermBO.java
  54. 40 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/SysUserBO.java
  55. 7 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/package-info.java
  56. 39 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddCategoryDTO.java
  57. 48 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddInnerUserDTO.java
  58. 68 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddPermReqDTO.java
  59. 33 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddProjectCategoryDTO.java
  60. 77 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddProjectDTO.java
  61. 39 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddProjectGroupDTO.java
  62. 41 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddProjectResourceDTO.java
  63. 41 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddProjectUserDTO.java
  64. 36 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddResourceDTO.java
  65. 34 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddRoleReqDTO.java
  66. 31 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddTaskSampleDTO.java
  67. 62 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddUserDTO.java
  68. 32 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AssignPermsReqDTO.java
  69. 21 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AssignRolesDTO.java
  70. 40 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/CompleteProjectDTO.java
  71. 24 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/DeletePermReqDTO.java
  72. 68 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/EditPermReqDTO.java
  73. 45 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/EditRoleReqDTO.java
  74. 51 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/EditUserDTO.java
  75. 56 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/ExportTaskDTO.java
  76. 32 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/ImportResourceDTO.java
  77. 32 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/InnerLoginDTO.java
  78. 40 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/LoginUserDTO.java
  79. 59 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/MarkProjectTaskDTO.java
  80. 34 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/ModifyCategoryDTO.java
  81. 34 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/ModifyProjectGroupDTO.java
  82. 90 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/MultipartFileDTO.java
  83. 59 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/QueryMyProjectTaskDTO.java
  84. 82 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/QueryProjectDTO.java
  85. 75 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/QueryResourceDTO.java
  86. 105 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/QueryTaskDTO.java
  87. 58 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/QueryUserPageDTO.java
  88. 54 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/ReAssignProjectTaskDTO.java
  89. 35 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/SysRolePageQueryReqDTO.java
  90. 34 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/UserLoginDTO.java
  91. 39 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/CategoryTreeVo.java
  92. 39 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/ImportResourceVO.java
  93. 26 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/InnerLoginUserVO.java
  94. 39 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/InnerUserVO.java
  95. 43 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/LoginUserInfoVO.java
  96. 27 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/MyTaskStatisticVO.java
  97. 103 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/PermResDTO.java
  98. 27 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/ProjectBaseInfoVO.java
  99. 35 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/ProjectGroupTreeVO.java
  100. 66 0
      sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/ProjectPageItemVO.java

+ 33 - 0
.gitignore

@@ -0,0 +1,33 @@
+*.project
+.settings/
+
+
+# Package Files #
+*.jar
+*.war
+*.ear
+
+hs_err_pid*
+
+#IntelliJ
+.idea/
+logs/
+*.iml
+out/
+target/
+
+.svn/
+bin/
+build/
+
+generatorConfig.xml
+
+# OSX
+.DS_Store
+.AppleDouble
+.LSOverride
+
+.idea/
+log.base_IS_UNDEFINED/
+sino-mark-server/target/
+sino-mark-server/.DS_Store

+ 11 - 0
Dockerfile

@@ -0,0 +1,11 @@
+FROM harbor.meetsocial.cn/library/java:openjdk_11.0.11_9-skywalking_8.5.0
+
+RUN mkdir -p /services/sino-mark/
+
+COPY sino-mark-server/target/*.jar /services/sino-mark/sino-mark.jar
+
+RUN chown -R work:work /services/sino-mark/
+
+EXPOSE 8060
+
+CMD ["sh","-c","java $JAVA_OPTS -jar /services/sino-mark/sino-mark.jar"]

+ 92 - 0
README.md

@@ -0,0 +1,92 @@
+# Sino Mark
+
+
+
+## Getting started
+
+To make it easy for you to get started with GitLab, here's a list of recommended next steps.
+
+Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
+
+## Add your files
+
+- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
+- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
+
+```
+cd existing_repo
+git remote add origin https://git.meetsocial.cn/data/sino-mark.git
+git branch -M master
+git push -uf origin master
+```
+
+## Integrate with your tools
+
+- [ ] [Set up project integrations](https://git.meetsocial.cn/data/sino-mark/-/settings/integrations)
+
+## Collaborate with your team
+
+- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
+- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
+- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
+- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
+- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
+
+## Test and Deploy
+
+Use the built-in continuous integration in GitLab.
+
+- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
+- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
+- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
+- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
+- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
+
+***
+
+# Editing this README
+
+When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!).  Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
+
+## Suggestions for a good README
+Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
+
+## Name
+Choose a self-explaining name for your project.
+
+## Description
+Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
+
+## Badges
+On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
+
+## Visuals
+Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
+
+## Installation
+Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
+
+## Usage
+Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
+
+## Support
+Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
+
+## Roadmap
+If you have ideas for releases in the future, it is a good idea to list them in the README.
+
+## Contributing
+State if you are open to contributions and what your requirements are for accepting them.
+
+For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
+
+You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
+
+## Authors and acknowledgment
+Show your appreciation to those who have contributed to the project.
+
+## License
+For open source projects, say how it is licensed.
+
+## Project status
+If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.

+ 190 - 0
pom.xml

@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.springframework.boot</groupId>
+    <artifactId>spring-boot-starter-parent</artifactId>
+    <version>2.2.6.RELEASE</version>
+  </parent>
+
+  <groupId>cn.sino</groupId>
+  <artifactId>sino-mark</artifactId>
+  <version>0.0.1</version>
+
+  <description>飞书标注系统</description>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>sino-mark-client</module>
+    <module>sino-mark-server</module>
+  </modules>
+
+  <properties>
+    <java.version>11</java.version>
+    <maven.compiler.source>11</maven.compiler.source>
+    <maven.compiler.target>11</maven.compiler.target>
+    <sino-common.version>3.2.0</sino-common.version>
+    <spring-cloud.version>Hoxton.SR3</spring-cloud.version>
+    <org.mapstruct.version>1.4.1.Final</org.mapstruct.version>
+    <org.projectlombok.version>1.18.16</org.projectlombok.version>
+    <alibaba-druid.version>1.1.22</alibaba-druid.version>
+    <pagehelper.version>1.3.0</pagehelper.version>
+    <apollo-client.version>1.7.0-sino</apollo-client.version>
+    <knife4j-spring-ui.version>3.0.2</knife4j-spring-ui.version>
+    <hutool-all.version>5.6.5</hutool-all.version>
+    <mybatis-plus-boot-starter.version>3.4.2</mybatis-plus-boot-starter.version>
+    <mybatis-plus-generator.version>3.4.1</mybatis-plus-generator.version>
+    <velocity-engine-core.version>2.3</velocity-engine-core.version>
+    <mockito-junit-jupiter.version>3.5.7</mockito-junit-jupiter.version>
+    <mockito-core.version>3.5.7</mockito-core.version>
+    <assertj-core.version>3.20.1</assertj-core.version>
+    <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
+    <jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
+    <sonar-maven-plugin.version>3.6.0.1398</sonar-maven-plugin.version>
+    <logstash-logback-encoder.version>6.3</logstash-logback-encoder.version>
+    <freemarker.version>2.3.31</freemarker.version>
+    <mysql-connector-java.verison>8.0.11</mysql-connector-java.verison>
+    <rabbitmq-mock.verison>1.1.1</rabbitmq-mock.verison>
+    <spring-boot-maven-plugin.version>2.5.3</spring-boot-maven-plugin.version>
+    <spring-cloud-starter-sleuth.version>2.2.2.RELEASE</spring-cloud-starter-sleuth.version>
+    <sino-cloud-storage.version>1.0.4</sino-cloud-storage.version>
+    <axis.version>1.4</axis.version>
+    <feign-form.version>3.8.0</feign-form.version>
+    <feign-form-spring.version>3.8.0</feign-form-spring.version>
+    <jwt.version>3.3.0</jwt.version>
+  </properties>
+
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>cn.sino</groupId>
+        <artifactId>sino-mark-client</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>cn.sino</groupId>
+        <artifactId>sino-common</artifactId>
+        <version>${sino-common.version}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>
+
+      <dependency>
+        <groupId>org.mybatis.spring.boot</groupId>
+        <artifactId>mybatis-spring-boot-starter</artifactId>
+        <version>2.2.0</version>
+      </dependency>
+
+      <dependency>
+        <groupId>com.baomidou</groupId>
+        <artifactId>mybatis-plus-boot-starter</artifactId>
+        <version>${mybatis-plus-boot-starter.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>com.github.pagehelper</groupId>
+        <artifactId>pagehelper-spring-boot-starter</artifactId>
+        <version>${pagehelper.version}</version>
+      </dependency>
+
+      <!--MP代码自动生成-->
+      <dependency>
+        <groupId>com.baomidou</groupId>
+        <artifactId>mybatis-plus-generator</artifactId>
+        <version>${mybatis-plus-generator.version}</version>
+        <scope>test</scope>
+      </dependency>
+
+      <dependency>
+        <groupId>com.alibaba</groupId>
+        <artifactId>druid-spring-boot-starter</artifactId>
+        <version>${alibaba-druid.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>mysql</groupId>
+        <artifactId>mysql-connector-java</artifactId>
+        <version>${mysql-connector-java.verison}</version>
+        <scope>runtime</scope>
+      </dependency>
+
+      <dependency>
+        <groupId>org.projectlombok</groupId>
+        <artifactId>lombok</artifactId>
+        <version>${org.projectlombok.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>org.mapstruct</groupId>
+        <artifactId>mapstruct</artifactId>
+        <version>${org.mapstruct.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>cn.hutool</groupId>
+        <artifactId>hutool-all</artifactId>
+        <version>${hutool-all.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>com.auth0</groupId>
+        <artifactId>java-jwt</artifactId>
+        <version>${jwt.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>com.ctrip.framework.apollo</groupId>
+        <artifactId>apollo-client</artifactId>
+        <version>${apollo-client.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>net.logstash.logback</groupId>
+        <artifactId>logstash-logback-encoder</artifactId>
+        <version>${logstash-logback-encoder.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>com.github.xiaoymin</groupId>
+        <artifactId>knife4j-spring-ui</artifactId>
+        <version>${knife4j-spring-ui.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>org.springframework.cloud</groupId>
+        <artifactId>spring-cloud-dependencies</artifactId>
+        <version>${spring-cloud.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+
+    </dependencies>
+  </dependencyManagement>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.springframework.boot</groupId>
+          <artifactId>spring-boot-maven-plugin</artifactId>
+          <version>${spring-boot-maven-plugin.version}</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>${maven-compiler-plugin.version}</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+</project>

+ 22 - 0
sino-mark-client/pom.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>cn.sino</groupId>
+    <artifactId>sino-mark</artifactId>
+    <version>0.0.1</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>sino-mark-client</artifactId>
+  <packaging>jar</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>cn.sino</groupId>
+      <artifactId>sino-common</artifactId>
+    </dependency>
+  </dependencies>
+
+</project>

+ 180 - 0
sino-mark-server/pom.xml

@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>cn.sino</groupId>
+    <artifactId>sino-mark</artifactId>
+    <version>0.0.1</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>sino-mark-server</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>cn.sino</groupId>
+      <artifactId>sino-mark-client</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-web</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-validation</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-data-redis</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-amqp</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>com.alibaba</groupId>
+      <artifactId>druid-spring-boot-starter</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.mybatis.spring.boot</groupId>
+      <artifactId>mybatis-spring-boot-starter</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>com.github.pagehelper</groupId>
+      <artifactId>pagehelper-spring-boot-starter</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>com.baomidou</groupId>
+      <artifactId>mybatis-plus-boot-starter</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-security</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-configuration-processor</artifactId>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-actuator</artifactId>
+    </dependency>
+
+    <!--MP代码自动生成-->
+    <dependency>
+      <groupId>com.baomidou</groupId>
+      <artifactId>mybatis-plus-generator</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>mysql</groupId>
+      <artifactId>mysql-connector-java</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.mapstruct</groupId>
+      <artifactId>mapstruct</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>cn.hutool</groupId>
+      <artifactId>hutool-all</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.projectlombok</groupId>
+      <artifactId>lombok</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>com.ctrip.framework.apollo</groupId>
+      <artifactId>apollo-client</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>net.logstash.logback</groupId>
+      <artifactId>logstash-logback-encoder</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>com.github.xiaoymin</groupId>
+      <artifactId>knife4j-spring-ui</artifactId>
+    </dependency>
+    <!-- Micrometer Prometheus registry  -->
+    <dependency>
+      <groupId>io.micrometer</groupId>
+      <artifactId>micrometer-registry-prometheus</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>com.google.guava</groupId>
+          <artifactId>guava</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>com.auth0</groupId>
+      <artifactId>java-jwt</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>com.alibaba</groupId>
+      <artifactId>fastjson</artifactId>
+      <version>1.2.46</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-maven-plugin</artifactId>
+        <configuration>
+          <!--fork:如果没有该项配置,整个devtools不会起作用-->
+          <fork>true</fork>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>${java.version}</source>
+          <target>${java.version}</target>
+          <annotationProcessorPaths>
+            <path>
+              <groupId>org.projectlombok</groupId>
+              <artifactId>lombok</artifactId>
+              <version>${org.projectlombok.version}</version>
+            </path>
+            <path>
+              <groupId>org.mapstruct</groupId>
+              <artifactId>mapstruct-processor</artifactId>
+              <version>${org.mapstruct.version}</version>
+            </path>
+          </annotationProcessorPaths>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

+ 41 - 0
sino-mark-server/src/main/java/cn/sino/mark/SinoMarkApplication.java

@@ -0,0 +1,41 @@
+package cn.sino.mark;
+
+import cn.sino.common.config.CorsConfig;
+import cn.sino.mark.common.properties.InnerUserProperties;
+import cn.sino.mark.common.properties.JwtProperties;
+import cn.sino.mark.common.properties.SnowflakeProperties;
+import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.FilterType;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+/**
+ * 启动入口
+ *
+ * @author zhangamin
+ * @date 2022/3/15
+ */
+@Slf4j
+@EnableApolloConfig
+@EnableCaching
+@RequiredArgsConstructor
+@EnableTransactionManagement
+@ComponentScan(value = {"cn.sino.mark", "cn.sino.common"},excludeFilters= {@ComponentScan.Filter(type= FilterType.ASSIGNABLE_TYPE, value= {CorsConfig.class})})
+@SpringBootApplication()
+@EnableConfigurationProperties({
+        SnowflakeProperties.class,
+        JwtProperties.class,
+        InnerUserProperties.class
+})
+public class SinoMarkApplication {
+
+    public static void main(String[] args) {
+        new SpringApplicationBuilder(SinoMarkApplication.class).run(args);
+    }
+}

+ 19 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/config/APIConfig.java

@@ -0,0 +1,19 @@
+package cn.sino.mark.common.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.MediaType;
+import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+/**
+ * Created by Tate on 2016/12/9.
+ */
+@Configuration
+public class APIConfig implements WebMvcConfigurer {
+
+    @Override
+    public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
+        configurer.defaultContentType(MediaType.APPLICATION_JSON);
+    }
+
+}

+ 34 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/config/MarkCorsConfig.java

@@ -0,0 +1,34 @@
+package cn.sino.mark.common.config;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
+import org.springframework.web.filter.CorsFilter;
+
+/**
+ * 跨域
+ */
+@Configuration
+public class MarkCorsConfig {
+    @Value("${cors.origin}")
+    private String origin;
+
+    private CorsConfiguration buildConfig() {
+        CorsConfiguration corsConfiguration = new CorsConfiguration();
+        corsConfiguration.addAllowedOrigin(origin); // 1
+        corsConfiguration.setAllowCredentials(true);
+        corsConfiguration.addAllowedHeader("*"); // 2
+        corsConfiguration.addAllowedMethod("*"); // 3
+        return corsConfiguration;
+    }
+
+    @Bean
+    public CorsFilter corsFilter() {
+        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+        source.registerCorsConfiguration("/**", buildConfig()); //// 4
+        return new CorsFilter(source);
+    }
+
+}

+ 73 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/config/MybatisPlusConfig.java

@@ -0,0 +1,73 @@
+package cn.sino.mark.common.config;
+
+import cn.sino.mark.common.constants.Constant;
+import cn.sino.mark.common.utils.LoginUserUtil;
+import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
+import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import org.apache.ibatis.reflection.MetaObject;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
+import org.springframework.transaction.TransactionManager;
+
+import javax.sql.DataSource;
+import java.time.LocalDateTime;
+
+@Configuration
+@MapperScan(basePackages = "cn.sino.mark.dao.mapper")
+@SuppressWarnings("java:S1874")
+public class MybatisPlusConfig implements MetaObjectHandler {
+
+    /**
+     * 新的分页插件
+     * -----------
+     * 一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false
+     * 避免缓存出现问题(该属性会在旧插件移除后一同移除)
+     */
+    @Bean
+    public MybatisPlusInterceptor mybatisPlusInterceptor() {
+        var interceptor = new MybatisPlusInterceptor();
+        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
+        return interceptor;
+    }
+
+    @Bean
+    public ConfigurationCustomizer configurationCustomizer() {
+        return configuration -> configuration.setUseDeprecatedExecutor(false);
+    }
+
+    @Override
+    public void insertFill(MetaObject metaObject) {
+        Long loginUserId = LoginUserUtil.getLoginUserId();
+        if (loginUserId == null || loginUserId < 0) {
+            loginUserId = Constant.DEFAULT_BY;
+        }
+        LocalDateTime now = LocalDateTime.now();
+        this.strictInsertFill(metaObject, "isDelete", Boolean.class, Boolean.FALSE);
+        this.strictInsertFill(metaObject, "createBy", Long.class, loginUserId);
+        this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, now);
+        this.strictInsertFill(metaObject, "updateBy", Long.class, loginUserId);
+        this.strictInsertFill(metaObject, "updateTime", LocalDateTime.class, now);
+    }
+
+    @Override
+    public void updateFill(MetaObject metaObject) {
+        Long loginUserId = LoginUserUtil.getLoginUserId();
+        if (loginUserId == null || loginUserId < 0) {
+            loginUserId = Constant.DEFAULT_BY;
+        }
+        this.strictUpdateFill(metaObject, "updateBy", Long.class, loginUserId);
+        this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now());
+    }
+
+    @Bean
+    public TransactionManager transactionManager(DataSource dataSource) {
+        DataSourceTransactionManager transactionManager = new DataSourceTransactionManager();
+        transactionManager.setDataSource(dataSource);
+        return transactionManager;
+    }
+}

+ 57 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/config/RedisConfig.java

@@ -0,0 +1,57 @@
+package cn.sino.mark.common.config;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.collect.Maps;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.cache.CacheManager;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.cache.RedisCacheConfiguration;
+import org.springframework.data.redis.cache.RedisCacheManager;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializationContext;
+import org.springframework.data.redis.serializer.RedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+import java.time.Duration;
+import java.util.Map;
+
+@Configuration
+public class RedisConfig {
+
+    private static final String BASE_KEY = "mark:";
+    private static final String DEMO_KEY = BASE_KEY + "demo:";
+
+
+    @Bean
+    public CacheManager cacheManager(RedisConnectionFactory factory, @Qualifier("redisObjectMapper") ObjectMapper objectMapper) {
+        RedisSerializer<String> redisSerializer = new StringRedisSerializer();
+        GenericJackson2JsonRedisSerializer jackson2JsonRedisSerializer = new GenericJackson2JsonRedisSerializer(objectMapper);
+        // 配置序列化
+        RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig()
+                .entryTtl(Duration.ofHours(1))
+                .serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer))
+                .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(jackson2JsonRedisSerializer));
+
+        // 针对不同cacheName,设置不同的过期时间
+        Map<String, RedisCacheConfiguration> configMap = Maps.newHashMap();
+        configMap.put(DEMO_KEY, config.entryTtl(Duration.ofMinutes(30L)));
+        return RedisCacheManager.builder(factory).cacheDefaults(config).withInitialCacheConfigurations(configMap).build();
+    }
+
+    @Bean
+    public RedisTemplate<String, Object> redisTemplate(
+            RedisConnectionFactory redisConnectionFactory, @Qualifier("redisObjectMapper") ObjectMapper objectMapper) {
+        RedisTemplate<String, Object> template = new RedisTemplate<>();
+        StringRedisSerializer stringSerializer = new StringRedisSerializer();
+        GenericJackson2JsonRedisSerializer jsonSerializer = new GenericJackson2JsonRedisSerializer(objectMapper);
+        template.setConnectionFactory(redisConnectionFactory);
+        template.setKeySerializer(stringSerializer);
+        template.setValueSerializer(jsonSerializer);
+        template.setHashKeySerializer(stringSerializer);
+        template.setHashValueSerializer(jsonSerializer);
+        return template;
+    }
+}

+ 28 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/config/SnowflakeConfig.java

@@ -0,0 +1,28 @@
+package cn.sino.mark.common.config;
+
+import cn.sino.common.util.SnowflakeIdFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * 唯一ID生成器
+ *
+ * @author zhangamin
+ * @date 2022/3/22
+ */
+@Configuration
+public class SnowflakeConfig {
+
+    @Value("${snowflake.work-id:0}")
+    private Long workId;
+
+    @Value("${snowflake.date-center-id:0}")
+    private Long dateCenterId;
+
+    @Bean(name = "snowflakeIdFactory")
+    public SnowflakeIdFactory snowflakeIdFactory() {
+        return new SnowflakeIdFactory(workId, dateCenterId);
+    }
+
+}

+ 197 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/config/WebConfig.java

@@ -0,0 +1,197 @@
+package cn.sino.mark.common.config;
+
+import cn.sino.mark.common.processor.JsonModelAttributeMethodProcessor;
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
+import com.fasterxml.jackson.module.paramnames.ParameterNamesModule;
+import org.springframework.boot.web.client.RestTemplateBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.MediaType;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.http.converter.StringHttpMessageConverter;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
+import org.springframework.web.client.RestTemplate;
+import org.springframework.web.method.support.HandlerMethodArgumentResolver;
+import org.springframework.web.multipart.commons.CommonsMultipartResolver;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.ParameterBuilder;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.schema.ModelRef;
+import springfox.documentation.service.Parameter;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+
+import java.time.Duration;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.List;
+
+@Configuration
+public class WebConfig implements WebMvcConfigurer {
+    /**
+     * 格式化类型
+     */
+    public static final String YMDHMS2 = "yyyy-MM-dd HH:mm:ss";
+    public static final String YMD2 = "yyyy-MM-dd";
+    /**
+     * 上传文件最大体积
+     */
+    private static final Long MAX_UPLOAD_SIZE = 50 * 1024 * 1024L;
+
+    /**
+     * 重写ObjectMapper
+     *
+     * @return ObjectMapper
+     */
+    @Bean
+    public ObjectMapper markObjectMapper() {
+        var objectMapper = new ObjectMapper();
+        objectMapper.configure(SerializationFeature.INDENT_OUTPUT, true)
+                .setSerializationInclusion(JsonInclude.Include.ALWAYS)
+                .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
+                .setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY)
+                .registerModule(new ParameterNamesModule()).registerModule(new Jdk8Module())
+                .registerModule(javaTimeModule())
+                .registerModule(longStrModule());
+        return objectMapper;
+    }
+
+    private JavaTimeModule javaTimeModule() {
+        var javaTimeModule = new JavaTimeModule();
+        javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern(YMD2)));
+        javaTimeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern(YMD2)));
+        javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(YMDHMS2)));
+        javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(YMDHMS2)));
+        return javaTimeModule;
+    }
+
+    /**
+     * TODO 注意
+     * @return
+     */
+    private SimpleModule longStrModule() {
+        SimpleModule simpleModule = new SimpleModule();
+        simpleModule.addSerializer(Long.class, ToStringSerializer.instance);
+        simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance);
+        return simpleModule;
+    }
+
+    @Bean
+    public ObjectMapper redisObjectMapper() {
+        var objectMapper = new ObjectMapper();
+        objectMapper.configure(MapperFeature.USE_ANNOTATIONS, false)
+                .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
+                .setSerializationInclusion(JsonInclude.Include.NON_NULL)
+                .setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY)
+                //必须配置,反序列化回来后信息不对
+                .activateDefaultTyping(LaissezFaireSubTypeValidator.instance,
+                        ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY)
+                .registerModule(new ParameterNamesModule()).registerModule(new Jdk8Module())
+                .registerModule(javaTimeModule());
+        return objectMapper;
+    }
+
+    @Bean
+    public MappingJackson2HttpMessageConverter jackson2HttpMessageConverter() {
+        return new MappingJackson2HttpMessageConverter(markObjectMapper());
+    }
+
+    /**
+     * 配置json日期序列化和反序列化
+     *
+     * @param converters 转换器列表
+     */
+    @Override
+    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
+        converters.add(jackson2HttpMessageConverter());
+        StringHttpMessageConverter stringConverter = new StringHttpMessageConverter();
+        stringConverter.setSupportedMediaTypes(List.of(MediaType.TEXT_PLAIN));
+        converters.add(stringConverter);
+    }
+
+    /**
+     * 添加自定义参数解析器
+     *
+     * @param argumentResolvers 方法参数转换器
+     */
+    @Override
+    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
+        argumentResolvers.add(new JsonModelAttributeMethodProcessor(true, jackson2HttpMessageConverter()));
+    }
+
+    @Override
+    public void addCorsMappings(CorsRegistry registry) {
+//        registry.addMapping("/**");
+    }
+
+    @Override
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+        registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
+        registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
+        registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
+    }
+
+    @Bean
+    public Docket docket() {
+        ParameterBuilder ticketPar = new ParameterBuilder();
+        List<Parameter> pars = new ArrayList<>();
+        ticketPar.name("X-USER-ID").description("user ticket")
+                .modelRef(new ModelRef("string")).parameterType("header")
+                .required(false).build();
+        pars.add(ticketPar.build());    //根据每个方法名也知道当前方法在设置什么参数
+
+        return new Docket(DocumentationType.SWAGGER_12)
+                .groupName("飞书标注系统")
+                .select()
+                .apis(RequestHandlerSelectors.any())
+                .build()
+                .globalOperationParameters(pars)
+                .apiInfo(new ApiInfoBuilder()
+                        .title("api swagger document")
+                        .description("前后端联调swagger api 文档")
+                        .version("1.0.0")
+                        .build());
+    }
+
+
+    /**
+     * 超出体积上线后抛出MaxUploadSizeExceededException异常(common包公共处理逻辑)
+     */
+    @Bean
+    public CommonsMultipartResolver commonsMultipartResolver() {
+        var multipartResolver = new CommonsMultipartResolver();
+        multipartResolver.setResolveLazily(true);
+        multipartResolver.setMaxUploadSizePerFile(MAX_UPLOAD_SIZE);
+        multipartResolver.setMaxUploadSize(MAX_UPLOAD_SIZE);
+        return multipartResolver;
+    }
+
+    @Bean
+    public RestTemplate restTemplate(RestTemplateBuilder restTemplateBuilder) {
+        return restTemplateBuilder
+                .setConnectTimeout(Duration.ofSeconds(30))
+                .setReadTimeout(Duration.ofSeconds(30))
+                .build();
+    }
+}

+ 31 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/config/security/CusAccessDeniedHandler.java

@@ -0,0 +1,31 @@
+package cn.sino.mark.common.config.security;
+
+import cn.hutool.json.JSONUtil;
+import cn.sino.common.exception.BizException;
+import cn.sino.common.vo.RestResponseVO;
+import cn.sino.mark.common.constants.Constant;
+import cn.sino.mark.common.enums.ErrorCodeEnum;
+import org.springframework.security.access.AccessDeniedException;
+import org.springframework.security.web.access.AccessDeniedHandler;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @author zhangamin
+ * @description 自定义禁止访问处理
+ * @className cn.sino.coop.common.config.security.CusAccessDeniedHandler
+ * @date 2022/3/16
+ */
+public class CusAccessDeniedHandler implements AccessDeniedHandler {
+
+    @Override
+    public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException e) throws IOException {
+        response.setContentType(Constant.APPLICATION_JSON_UTF8_VALUE);
+        response.setStatus(HttpServletResponse.SC_OK);
+        RestResponseVO<Object> forbidden = RestResponseVO.fail(
+                new BizException(ErrorCodeEnum.FORBIDDEN.getCode(), ErrorCodeEnum.FORBIDDEN.getMessage()));
+        response.getWriter().println(JSONUtil.toJsonStr(forbidden));
+    }
+}

+ 31 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/config/security/CusAuthenticationEntryPoint.java

@@ -0,0 +1,31 @@
+package cn.sino.mark.common.config.security;
+
+import cn.hutool.json.JSONUtil;
+import cn.sino.common.exception.BizException;
+import cn.sino.common.vo.RestResponseVO;
+import cn.sino.mark.common.constants.Constant;
+import cn.sino.mark.common.enums.ErrorCodeEnum;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.web.AuthenticationEntryPoint;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @author zhangamin
+ * @description 处理认证过程中的认证失败异常
+ * @className cn.sino.coop.common.config.security.CusAuthenticationEntryPoint
+ * @date 2022/3/16
+ */
+public class CusAuthenticationEntryPoint implements AuthenticationEntryPoint {
+
+    @Override
+    public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException e) throws IOException {
+        response.setContentType(Constant.APPLICATION_JSON_UTF8_VALUE);
+        response.setStatus(HttpServletResponse.SC_OK);
+        RestResponseVO<Object> fail = RestResponseVO.fail(
+                new BizException(ErrorCodeEnum.AUTHORIZATION.getCode(), ErrorCodeEnum.AUTHORIZATION.getMessage()));
+        response.getWriter().println(JSONUtil.toJsonStr(fail));
+    }
+}

+ 25 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/config/security/PasswordEncoderConfig.java

@@ -0,0 +1,25 @@
+package cn.sino.mark.common.config.security;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.crypto.password.PasswordEncoder;
+
+/**
+ * @author zhangamin
+ * @description 密码加密类(BCrypt)
+ * @className cn.sino.mark.common.config.security.PasswordEncoderConfig
+ * @date 2022/3/16
+ */
+@Configuration
+public class PasswordEncoderConfig {
+
+    /**
+     * 密码加密器
+     */
+    @Bean
+    public PasswordEncoder passwordEncoder() {
+        return new BCryptPasswordEncoder();
+    }
+
+}

+ 89 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/config/security/SysUserDetails.java

@@ -0,0 +1,89 @@
+package cn.sino.mark.common.config.security;
+
+import cn.sino.mark.common.enums.SysUserStatusEnum;
+import lombok.Data;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetails;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+/**
+ * spring security 登录用户明细
+ *
+ * @author zhangamin
+ * @date 2021/12/22
+ */
+@Data
+public class SysUserDetails implements UserDetails {
+
+    /**
+     * 用户ID
+     */
+    private Long userId;
+
+    /**
+     * 账号
+     */
+    private String account;
+
+    /**
+     * 用户名
+     */
+    private String userName;
+
+    /**
+     * 密码
+     */
+    private String password;
+
+    /**
+     * 用户状态(0:正常;1:冻结)
+     */
+    private Integer status;
+
+    /**
+     * 是否删除(0:正常;1:已删除)
+     */
+    private Boolean isDelete;
+
+    @Override
+    public Collection<? extends GrantedAuthority> getAuthorities() {
+        return new ArrayList<>();
+    }
+
+    @Override
+    public String getPassword() {
+        return password;
+    }
+
+    @Override
+    public String getUsername() {
+        return account;
+    }
+
+    @Override
+    public boolean isAccountNonExpired() {
+        return true;
+    }
+
+    @Override
+    public boolean isAccountNonLocked() {
+        return true;
+    }
+
+    @Override
+    public boolean isCredentialsNonExpired() {
+        return true;
+    }
+
+    @Override
+    public boolean isEnabled() {
+        return status == SysUserStatusEnum.NORMAL.getValue() &&
+                Boolean.FALSE.equals(isDelete);
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+}

+ 104 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/config/security/WebSecurityConfig.java

@@ -0,0 +1,104 @@
+package cn.sino.mark.common.config.security;
+
+import cn.sino.mark.common.filter.LoginFilter;
+import cn.sino.mark.common.filter.TokenFilter;
+import cn.sino.mark.common.properties.JwtProperties;
+import cn.sino.mark.service.SysUserService;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import lombok.RequiredArgsConstructor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.http.HttpMethod;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
+import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+import org.springframework.security.config.http.SessionCreationPolicy;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
+
+import javax.annotation.Resource;
+
+/**
+ * security配置
+ *
+ * @author zhangamin
+ * @date 2021/12/22
+ */
+@Configuration
+@EnableWebSecurity
+@RequiredArgsConstructor
+public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
+
+    private final SysUserService sysUserService;
+    private final UserDetailsService userDetailsService;
+    private final PasswordEncoder passwordEncoder;
+    private final StringRedisTemplate stringRedisTemplate;
+    private final JwtProperties jwtProperties;
+
+    @Resource(name = "markObjectMapper")
+    private ObjectMapper objectMapper;
+
+
+    @Bean
+    @Override
+    public AuthenticationManager authenticationManagerBean() throws Exception {
+        return super.authenticationManagerBean();
+    }
+
+    @Override
+    protected void configure(HttpSecurity http) throws Exception {
+        http.cors().and().csrf().disable()
+                .httpBasic().disable()
+                // 对请求进行认证
+                .authorizeRequests()
+                //处理请求嗅探
+                .antMatchers(HttpMethod.OPTIONS, "/**").permitAll()
+                //SwaggerUI允许匿名访问
+                .antMatchers(
+                        "/swagger-ui.html",
+                        "/swagger-ui/**",
+                        "/swagger-resources",
+                        "/swagger-resources/**",
+                        "/v2/api-docs",
+                        "/v3/api-docs",
+                        "/configuration/ui",
+                        "/webjars/**",
+                        "/client/**",
+                        "/api/**",
+                        "/actuator",
+                        "/sys-user/inner-login",
+                        "/actuator/**"
+                ).permitAll()
+                // 所有请求需要身份认证
+                .anyRequest().authenticated()
+                .and()
+                //自定义401/403返回结果
+                .exceptionHandling()
+                .authenticationEntryPoint(new CusAuthenticationEntryPoint())
+                .accessDeniedHandler(new CusAccessDeniedHandler())
+                .and()
+                //禁止创建session
+                .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
+                .and()
+                //登录验证
+                .addFilterBefore(new LoginFilter("/sys-user/login", authenticationManager(), sysUserService, objectMapper), UsernamePasswordAuthenticationFilter.class)
+                //Token验证
+                .addFilterBefore(new TokenFilter(jwtProperties, stringRedisTemplate), UsernamePasswordAuthenticationFilter.class);
+
+    }
+
+    @Override
+    protected void configure(AuthenticationManagerBuilder auth) {
+        // 使用自定义身份验证组件
+        DaoAuthenticationProvider daoAuthenticationProvider = new DaoAuthenticationProvider();
+        daoAuthenticationProvider.setUserDetailsService(userDetailsService);
+        daoAuthenticationProvider.setPasswordEncoder(passwordEncoder);
+        auth.authenticationProvider(daoAuthenticationProvider);
+    }
+
+}

+ 28 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/config/security/permission/CusMethodSecurityExpressionHandler.java

@@ -0,0 +1,28 @@
+package cn.sino.mark.common.config.security.permission;
+
+import org.aopalliance.intercept.MethodInvocation;
+import org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler;
+import org.springframework.security.access.expression.method.MethodSecurityExpressionHandler;
+import org.springframework.security.access.expression.method.MethodSecurityExpressionOperations;
+import org.springframework.security.core.Authentication;
+
+/**
+ * @author zhangamin
+ * @description 自定义方法权限表达式处理方法
+ * @className cn.sino.coop.common.config.security.permission.CustomMethodSecurityExpressionHandler
+ * @date 2022/3/16
+ */
+public class CusMethodSecurityExpressionHandler extends DefaultMethodSecurityExpressionHandler
+        implements MethodSecurityExpressionHandler {
+
+    @Override
+    protected MethodSecurityExpressionOperations createSecurityExpressionRoot(Authentication authentication,
+                                                                              MethodInvocation invocation) {
+        CustomSecurityExpressionRoot root = new CustomSecurityExpressionRoot(authentication);
+        root.setPermissionEvaluator(getPermissionEvaluator());
+        root.setThis(invocation.getThis());
+        root.setTrustResolver(getTrustResolver());
+        root.setDefaultRolePrefix(getDefaultRolePrefix());
+        return root;
+    }
+}

+ 96 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/config/security/permission/CusPermissionEvaluator.java

@@ -0,0 +1,96 @@
+package cn.sino.mark.common.config.security.permission;
+
+import cn.hutool.json.JSONUtil;
+import cn.sino.mark.common.constants.Constant;
+import cn.sino.mark.common.model.dto.LoginUserDTO;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.security.access.PermissionEvaluator;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
+
+import java.io.Serializable;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @author zhangamin
+ * @description 自定义权限表达式
+ * @className cn.sino.coop.common.config.security.permission.CusPermissionEvaluator
+ * @date 2022/3/16
+ */
+@Configuration
+public class CusPermissionEvaluator implements PermissionEvaluator {
+
+    private final StringRedisTemplate stringRedisTemplate;
+
+    public CusPermissionEvaluator(StringRedisTemplate stringRedisTemplate) {
+        this.stringRedisTemplate = stringRedisTemplate;
+    }
+
+    @Override
+    public boolean hasPermission(Authentication authentication, Object targetDomainObject, Object permission) {
+        return false;
+    }
+
+    @Override
+    public boolean hasPermission(Authentication authentication, Serializable targetId, String targetType, Object permission) {
+        return false;
+    }
+
+    public boolean hasAnyRole(String... roles) {
+        LoginUserDTO loginUser = (LoginUserDTO) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
+        String loginKey = Constant.ADMIN_LOGIN_KEY + loginUser.getUuid();
+        //从缓存中取用户角色
+        Object loginRoles = stringRedisTemplate.opsForHash().get(loginKey, Constant.LOGIN_USER_ROLES);
+        if (loginRoles == null) {
+            return false;
+        }
+        List<String> roleList = JSONUtil.toList(loginRoles.toString(), String.class);
+        //判断角色code是否匹配
+        return Arrays.stream(roles).anyMatch(roleList::contains);
+    }
+
+    public boolean hasPermission(String permission) {
+        LoginUserDTO loginUser = (LoginUserDTO) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
+        String loginKey = Constant.ADMIN_LOGIN_KEY + loginUser.getUuid();
+        //从缓存中取用户角色
+        Object loginRoles = stringRedisTemplate.opsForHash().get(loginKey, Constant.LOGIN_USER_ROLES);
+        if (loginRoles == null) {
+            return false;
+        }
+        List<String> roles = JSONUtil.toList(loginRoles.toString(), String.class);
+        if (roles.contains(Constant.ADMIN_ROLE)) {
+            return true;
+        }
+        Object loginPerms = stringRedisTemplate.opsForHash().get(loginKey, Constant.LOGIN_USER_PERMS);
+        if (loginPerms == null) {
+            return false;
+        }
+        List<String> perms = JSONUtil.toList(loginPerms.toString(), String.class);
+        return perms.contains(permission);
+    }
+
+    public boolean hasAnyPermission(String... permission) {
+        LoginUserDTO loginUser = (LoginUserDTO) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
+        String loginKey = Constant.ADMIN_LOGIN_KEY + loginUser.getUuid();
+        //从缓存中取用户角色
+        Object loginRoles = stringRedisTemplate.opsForHash().get(loginKey, Constant.LOGIN_USER_ROLES);
+        if (loginRoles == null) {
+            return false;
+        }
+        List<String> roles = JSONUtil.toList(loginRoles.toString(), String.class);
+        if (roles.contains(Constant.ADMIN_ROLE)) {
+            return true;
+        }
+
+        Object loginPerms = stringRedisTemplate.opsForHash().get(loginKey, Constant.LOGIN_USER_PERMS);
+        if (loginPerms == null) {
+            return false;
+        }
+        List<String> perms = JSONUtil.toList(loginPerms.toString(), String.class);
+
+        //匹配关系:anyMatch
+        return Arrays.stream(permission).anyMatch(perms::contains);
+    }
+}

+ 225 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/config/security/permission/CustomSecurityExpressionRoot.java

@@ -0,0 +1,225 @@
+package cn.sino.mark.common.config.security.permission;
+
+import org.springframework.security.access.PermissionEvaluator;
+import org.springframework.security.access.expression.SecurityExpressionOperations;
+import org.springframework.security.access.expression.method.MethodSecurityExpressionOperations;
+import org.springframework.security.access.hierarchicalroles.RoleHierarchy;
+import org.springframework.security.authentication.AuthenticationTrustResolver;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.AuthorityUtils;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author zhangamin
+ * @date 2021/12/22
+ */
+public class CustomSecurityExpressionRoot implements MethodSecurityExpressionOperations, SecurityExpressionOperations {
+    private Object filterObject;
+    private Object returnObject;
+    private Object target;
+
+    protected final Authentication authentication;
+    private AuthenticationTrustResolver trustResolver;
+    private RoleHierarchy roleHierarchy;
+    private Set<String> roles;
+    private String defaultRolePrefix = "ROLE_";
+    private CusPermissionEvaluator permissionEvaluator;
+    public final String create;
+    public final String delete;
+    public final String admin;
+
+
+    public void setPermissionEvaluator(PermissionEvaluator permissionEvaluator) {
+        this.permissionEvaluator = (CusPermissionEvaluator) permissionEvaluator;
+    }
+
+    CustomSecurityExpressionRoot(Authentication authentication) {
+        if (authentication == null) {
+            throw new IllegalArgumentException("Authentication object cannot be null");
+        }
+        this.authentication = authentication;
+        create = "create";
+        delete = "delete";
+        admin = "administration";
+    }
+
+    public void setFilterObject(Object filterObject) {
+        this.filterObject = filterObject;
+    }
+
+    public Object getFilterObject() {
+        return filterObject;
+    }
+
+    public void setReturnObject(Object returnObject) {
+        this.returnObject = returnObject;
+    }
+
+    public Object getReturnObject() {
+        return returnObject;
+    }
+
+    void setThis(Object target) {
+        this.target = target;
+    }
+
+    public Object getThis() {
+        return target;
+    }
+
+    public boolean hasPermission(String permission) {
+        return permissionEvaluator.hasPermission(permission);
+    }
+
+    public boolean hasAnyPermission(String... permission) {
+        return permissionEvaluator.hasAnyPermission(permission);
+    }
+
+    public final boolean hasAuthority(String authority) {
+        return hasAnyAuthority(authority);
+    }
+
+    public final boolean hasAnyAuthority(String... authorities) {
+        return hasAnyAuthorityName(null, authorities);
+    }
+
+    public final boolean hasRole(String role) {
+        return hasAnyRole(role);
+    }
+
+    public final boolean hasAnyRole(String... roles) {
+        return permissionEvaluator.hasAnyRole(roles);
+    }
+
+    private boolean hasAnyAuthorityName(String prefix, String... roles) {
+        Set<String> roleSet = getAuthoritySet();
+
+        for (String role : roles) {
+            String defaultedRole = getRoleWithDefaultPrefix(prefix, role);
+            if (roleSet.contains(defaultedRole)) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    public final Authentication getAuthentication() {
+        return authentication;
+    }
+
+    public final boolean permitAll() {
+        return true;
+    }
+
+    public final boolean denyAll() {
+        return false;
+    }
+
+    public final boolean isAnonymous() {
+        return trustResolver.isAnonymous(authentication);
+    }
+
+    public final boolean isAuthenticated() {
+        return !isAnonymous();
+    }
+
+    public final boolean isRememberMe() {
+        return trustResolver.isRememberMe(authentication);
+    }
+
+    public final boolean isFullyAuthenticated() {
+        return !trustResolver.isAnonymous(authentication)
+                && !trustResolver.isRememberMe(authentication);
+    }
+
+    /**
+     * Convenience method to access {@link Authentication#getPrincipal()} from
+     * {@link #getAuthentication()}
+     *
+     * @return
+     */
+    public Object getPrincipal() {
+        return authentication.getPrincipal();
+    }
+
+    public void setTrustResolver(AuthenticationTrustResolver trustResolver) {
+        this.trustResolver = trustResolver;
+    }
+
+    public void setRoleHierarchy(RoleHierarchy roleHierarchy) {
+        this.roleHierarchy = roleHierarchy;
+    }
+
+    /**
+     * <p>
+     * Sets the default prefix to be added to {@link #hasAnyRole(String...)} or
+     * {@link #hasRole(String)}. For example, if hasRole("ADMIN") or hasRole("ROLE_ADMIN")
+     * is passed in, then the role ROLE_ADMIN will be used when the defaultRolePrefix is
+     * "ROLE_" (default).
+     * </p>
+     *
+     * <p>
+     * If null or empty, then no default role prefix is used.
+     * </p>
+     *
+     * @param defaultRolePrefix the default prefix to add to roles. Default "ROLE_".
+     */
+    public void setDefaultRolePrefix(String defaultRolePrefix) {
+        this.defaultRolePrefix = defaultRolePrefix;
+    }
+
+    private Set<String> getAuthoritySet() {
+        if (roles == null) {
+            roles = new HashSet<>();
+            Collection<? extends GrantedAuthority> userAuthorities = authentication
+                    .getAuthorities();
+
+            if (roleHierarchy != null) {
+                userAuthorities = roleHierarchy
+                        .getReachableGrantedAuthorities(userAuthorities);
+            }
+
+            roles = AuthorityUtils.authorityListToSet(userAuthorities);
+        }
+
+        return roles;
+    }
+
+    public boolean hasPermission(Object target, Object permission) {
+        return permissionEvaluator.hasPermission(authentication, target, permission);
+    }
+
+    public boolean hasPermission(Object targetId, String targetType, Object permission) {
+        return permissionEvaluator.hasPermission(authentication, (Serializable) targetId,
+                targetType, permission);
+    }
+
+
+    /**
+     * Prefixes role with defaultRolePrefix if defaultRolePrefix is non-null and if role
+     * does not already start with defaultRolePrefix.
+     *
+     *
+     * @param defaultRolePrefix 默认的角色前缀
+     * @param role              角色名称
+     * @return 装换后的角色名称
+     */
+    private static String getRoleWithDefaultPrefix(String defaultRolePrefix, String role) {
+        if (role == null) {
+            return role;
+        }
+        if (defaultRolePrefix == null || defaultRolePrefix.length() == 0) {
+            return role;
+        }
+        if (role.startsWith(defaultRolePrefix)) {
+            return role;
+        }
+        return defaultRolePrefix + role;
+    }
+}

+ 28 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/config/security/permission/PermissionConfig.java

@@ -0,0 +1,28 @@
+package cn.sino.mark.common.config.security.permission;
+
+import org.springframework.security.access.expression.method.MethodSecurityExpressionHandler;
+import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
+import org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration;
+
+/**
+ * 进入controller鉴权
+ *
+ * @author zhangamin
+ * @date 2021/12/22
+ */
+@EnableGlobalMethodSecurity(prePostEnabled = true)
+public class PermissionConfig extends GlobalMethodSecurityConfiguration {
+
+    private final CusPermissionEvaluator cusPermissionEvaluator;
+
+    public PermissionConfig(CusPermissionEvaluator myPermissionEvaluator) {
+        this.cusPermissionEvaluator = myPermissionEvaluator;
+    }
+
+    @Override
+    protected MethodSecurityExpressionHandler createExpressionHandler() {
+        CusMethodSecurityExpressionHandler expressionHandler = new CusMethodSecurityExpressionHandler();
+        expressionHandler.setPermissionEvaluator(cusPermissionEvaluator);
+        return expressionHandler;
+    }
+}

+ 86 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/constants/Constant.java

@@ -0,0 +1,86 @@
+package cn.sino.mark.common.constants;
+
+/**
+ * @author zhangamin
+ * @description 全局通用静态变量
+ * @className cn.sino.coop.common.constants.Constants
+ * @date 2022/3/16
+ */
+public class Constant {
+
+    /**
+     * 拿不到用户ID或者定时任务中的当前登录人ID
+     */
+    public static final long DEFAULT_BY = 0L;
+
+    /**
+     * 后台管理系统授权token的头部键名
+     */
+    public static final String ADMIN_TOKEN_HEADER_KEY = "X-Sino-Mark-Token";
+
+    /**
+     * 协作系统客户端token的头部键名
+     */
+    public static final String TOKEN_HEADER_KEY = "X-Sino-Token";
+
+    /**
+     * 匿名用户
+     */
+    public static final String ANONYMOUS_USER = "anonymoususer";
+
+    /**
+     * 后台登录session默认保存8小时
+     */
+    public static final int ADMIN_LOGIN_SESSION_TIME = 8;
+    public static final int CLIENT_LOGIN_SESSION_TIME = 8;
+
+    /**
+     * 登陆相关的redis键
+     */
+    public static final String ADMIN_LOGIN_KEY = "mark:admin_login:";
+    public static final String LOGIN_USER_INFO = "user_info";
+    public static final String LOGIN_USER_ROLES = "user_roles";
+    public static final String LOGIN_USER_PERMS = "user_perms";
+
+    /**
+     * 超级管理员角色代码
+     */
+    public static final String ADMIN_ROLE = "Administrator";
+
+    /**
+     * json content-type
+     */
+    public static final String APPLICATION_JSON_UTF8_VALUE = "application/json;charset=UTF-8";
+
+    /**
+     * 分页
+     */
+    public static final int DEFAULT_PAGE_INDEX = 1;
+    public static final int DEFAULT_PAGE_SIZE = 10;
+
+    /**
+     * 客户端登录时间差误差范围(5分钟 = 5 * 60 * 1000L)
+     */
+    public static final long CLIENT_LOGIN_TIMESTAMP_DIFF = 300000L;
+
+    /**
+     * 年-月-日 时:分:秒
+     */
+    public static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
+
+    /**
+     * 年-月-日
+     */
+    public static final String DATE_FORMAT = "yyyy-MM-dd";
+
+    /**
+     * 默认密码
+     */
+    public static final String DEFAULT_PASSWORD = "000000000";
+
+    /**
+     * 用户信息key
+     */
+    public static final String USER_INFO_ACCOUNT = "mark:user:account";
+    public static final String USER_INFO_ID = "mark:user:id";
+}

+ 31 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/BooleanEnum.java

@@ -0,0 +1,31 @@
+package cn.sino.mark.common.enums;
+
+import lombok.Getter;
+
+/**
+ * @author zhangamin
+ * @description 是、否的状态枚举
+ * @className cn.sino.coop.common.enums.SysUserLeaveEnum
+ * @date 2022/3/16
+ */
+@Getter
+public enum BooleanEnum {
+
+    /**
+     * true
+     */
+    NO(0, "否"),
+
+    /**
+     * false
+     */
+    YES(1, "是");
+
+    BooleanEnum(int value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+
+    private final int value;
+    private final String name;
+}

+ 33 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/DeleteStatusEnum.java

@@ -0,0 +1,33 @@
+package cn.sino.mark.common.enums;
+
+
+import lombok.Getter;
+
+/**
+ * 删除状态
+ *
+ * @author zhangamin
+ * @date 2020/11/23
+ */
+@Getter
+public enum DeleteStatusEnum {
+
+    NOT_DELETE(0,"正常"),DELETED(1,"已删除");
+
+    DeleteStatusEnum(int value, String name){
+        this.value = value;
+        this.name = name;
+    }
+
+    private final int value;
+    private final String name;
+
+    public static String getName(int value) {
+        for (DeleteStatusEnum obj : DeleteStatusEnum.values()) {
+            if (obj.getValue() == value) {
+                return obj.getName();
+            }
+        }
+        return "";
+    }
+}

+ 8 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/ErrorCode.java

@@ -0,0 +1,8 @@
+package cn.sino.mark.common.enums;
+
+public interface ErrorCode {
+
+    Integer getCode();
+
+    String getMessage();
+}

+ 27 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/ErrorCodeEnum.java

@@ -0,0 +1,27 @@
+package cn.sino.mark.common.enums;
+
+@SuppressWarnings("java:S1144")
+public enum ErrorCodeEnum implements ErrorCode {
+
+    FORBIDDEN(403, "您暂无权限访问此资源,请联系管理员."),
+    AUTHORIZATION(10000, "请登录系统");
+
+
+    ErrorCodeEnum(Integer code, String message) {
+        this.code = code;
+        this.message = message;
+    }
+
+    private final Integer code;
+    private final String message;
+
+    @Override
+    public Integer getCode() {
+        return code;
+    }
+
+    @Override
+    public String getMessage() {
+        return message;
+    }
+}

+ 32 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/IsOrNotEnum.java

@@ -0,0 +1,32 @@
+package cn.sino.mark.common.enums;
+
+import lombok.Getter;
+
+/**
+ * @author sch
+ * @description 是和否状态枚举
+ * @className cn.sino.mark.common.enums.IsOrNotEnum
+ * @date 2022/4/1
+ */
+@Getter
+public enum IsOrNotEnum {
+
+    NOT(0, "否"), IS(1, "是");
+
+    private final Integer value;
+    private final String name;
+
+    IsOrNotEnum(int value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+
+    public static String getName(Integer value){
+        for (IsOrNotEnum posts : IsOrNotEnum.values()) {
+            if (posts.getValue().equals(value)) {
+                return posts.getName();
+            }
+        }
+        return "";
+    }
+}

+ 35 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/LogTypeEnum.java

@@ -0,0 +1,35 @@
+package cn.sino.mark.common.enums;
+
+
+import lombok.Getter;
+
+/**
+ * @author zhangamin
+ * @description 日志类型
+ * @className cn.sino.coop.common.enums.LogTypeEnum
+ * @date 2022/3/30
+ */
+@Getter
+public enum LogTypeEnum {
+
+    LOGIN(0,"登录"),
+    INSERT(1,"添加"),
+    UPDATE(2,"更新"),
+    DELETE(3,"删除");
+
+    LogTypeEnum(int value, String name){
+        this.value = value;
+        this.name = name;
+    }
+
+    private final int value;
+    private final String name;
+    public static String getName(int value) {
+        for (LogTypeEnum obj : LogTypeEnum.values()) {
+            if (obj.getValue() == value) {
+                return obj.getName();
+            }
+        }
+        return "";
+    }
+}

+ 36 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/MoveNodeTypeEnum.java

@@ -0,0 +1,36 @@
+package cn.sino.mark.common.enums;
+
+
+/**
+ * 菜单移动方向
+ *
+ * @author zhangamin
+ * @date 2020/11/23
+ */
+public enum MoveNodeTypeEnum {
+
+    UP_NODE(0,"上移"),DOWN_NODE(1,"下移");
+    private final int value;
+    private final String name;
+
+    MoveNodeTypeEnum(int value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+    public static String getName(int value) {
+        for (MoveNodeTypeEnum obj : MoveNodeTypeEnum.values()) {
+            if (obj.getValue() == value) {
+                return obj.getName();
+            }
+        }
+        return "";
+    }
+    public int getValue() {
+        return value;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+}

+ 41 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/ProjectStatusEnum.java

@@ -0,0 +1,41 @@
+package cn.sino.mark.common.enums;
+
+
+import lombok.Getter;
+
+/**
+ * @author sch
+ * @description 项目状态枚举
+ * @className cn.sino.mark.common.enums.ProjectStatusEnum
+ * @date 2022/4/5
+ */
+@Getter
+public enum ProjectStatusEnum {
+
+    DRAFT(0, "草稿状态"),
+    OFFICIAL(1, "正式状态"),
+    WAIT_ASSIGN(2, "待分配"),
+    ASSIGNED(3, "已分配"),
+    STARTED(4, "已开始"),
+    FINISHED(5, "已完成"),
+    PART_EXPIRED(6, "部分过期"),
+    ACCESS(7, "已验证");
+
+
+    ProjectStatusEnum(int value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+
+    private final int value;
+    private final String name;
+
+    public static String getName(int value) {
+        for (ProjectStatusEnum obj : ProjectStatusEnum.values()) {
+            if (obj.getValue() == value) {
+                return obj.getName();
+            }
+        }
+        return "";
+    }
+}

+ 32 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/ResourceAssignStatusEnum.java

@@ -0,0 +1,32 @@
+package cn.sino.mark.common.enums;
+
+import lombok.Getter;
+
+/**
+ * @author sch
+ * @description 资源f分配状态枚举
+ * @className cn.sino.mark.common.enums.ResourceAssignStatusEnum
+ * @date 2022/4/3
+ */
+@Getter
+public enum ResourceAssignStatusEnum {
+
+    ASSIGNED(1, "已分配"), NOT_ASSIGNED(0, "未分配");
+
+    private final Integer value;
+    private final String name;
+
+    ResourceAssignStatusEnum(int value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+
+    public static String getName(Integer value){
+        for (ResourceAssignStatusEnum posts : ResourceAssignStatusEnum.values()) {
+            if (posts.getValue().equals(value)) {
+                return posts.getName();
+            }
+        }
+        return "";
+    }
+}

+ 32 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/ResourceTypeEnum.java

@@ -0,0 +1,32 @@
+package cn.sino.mark.common.enums;
+
+import lombok.Getter;
+
+/**
+ * @author sch
+ * @description 资源分类状态枚举
+ * @className cn.sino.mark.common.enums.ResourceTypeEnum
+ * @date 2022/4/1
+ */
+@Getter
+public enum ResourceTypeEnum {
+
+    DOC(0, "文本"), PICTURE(1, "图片"),MOVIE(2,"视频");
+
+    private final Integer value;
+    private final String name;
+
+    ResourceTypeEnum(int value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+
+    public static String getName(Integer value){
+        for (ResourceTypeEnum posts : ResourceTypeEnum.values()) {
+            if (posts.getValue().equals(value)) {
+                return posts.getName();
+            }
+        }
+        return "";
+    }
+}

+ 32 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/SampleTypeEnums.java

@@ -0,0 +1,32 @@
+package cn.sino.mark.common.enums;
+
+import lombok.Getter;
+
+/**
+ * @author sch
+ * @description 抽样状态
+ * @className cn.sino.mark.common.enums.SampleTypeEnums
+ * @date 2022/4/7
+ */
+@Getter
+public enum SampleTypeEnums {
+
+    NONE(0, "未抽样"), SUCCESS(1, "验证成功"), FAIL(2, "验证失败");
+
+    private final Integer value;
+    private final String name;
+
+    SampleTypeEnums(int value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+
+    public static String getName(Integer value) {
+        for (SampleTypeEnums mark : SampleTypeEnums.values()) {
+            if (mark.getValue().equals(value)) {
+                return mark.getName();
+            }
+        }
+        return "";
+    }
+}

+ 38 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/SysRoleEnums.java

@@ -0,0 +1,38 @@
+package cn.sino.mark.common.enums;
+
+import lombok.Getter;
+
+/**
+ * @author sch
+ * @description 角色
+ * @className cn.sino.mark.common.enums.cn.sino.mark.common.enums.SysRoleEnums
+ * @date 2022/4/9
+ */
+@Getter
+public enum SysRoleEnums {
+
+    ADMIN(1, "超级管理员"),
+    USER_MANAGER(2, "人员管理负责人"),
+    TASK_MANAGER(3, "任务分配负责人"),
+    CATEGORY_MANAGER(4, "分类管理负责人"),
+    RESOURCE_MANAGER(5, "资源管理负责人"),
+    INNER_MARKER(6, "标注员(外部)"),
+    OUTER_MARKER(7, "标注员(内部)");
+
+    private final Integer value;
+    private final String name;
+
+    SysRoleEnums(int value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+
+    public static String getName(Integer value) {
+        for (SysRoleEnums mark : SysRoleEnums.values()) {
+            if (mark.getValue().equals(value)) {
+                return mark.getName();
+            }
+        }
+        return "";
+    }
+}

+ 33 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/SysUserLeaveEnum.java

@@ -0,0 +1,33 @@
+package cn.sino.mark.common.enums;
+
+
+import lombok.Getter;
+
+/**
+ * @author zhangamin
+ * @description 用户是否离职的状态枚举
+ * @className cn.sino.coop.common.enums.SysUserLeaveEnum
+ * @date 2022/3/16
+ */
+@Getter
+public enum SysUserLeaveEnum {
+
+    /**
+     * 在职
+     */
+    ENTRY_DUTY(0, "在职"),
+
+    /**
+     * 离职
+     */
+    QUIT_DUTY(1, "离职");
+
+    private final int value;
+    private final String name;
+
+    SysUserLeaveEnum(int value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+
+}

+ 40 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/SysUserStatusEnum.java

@@ -0,0 +1,40 @@
+package cn.sino.mark.common.enums;
+
+
+import lombok.Getter;
+
+/**
+ * @author zhangamin
+ * @description 用户状态枚举
+ * @className cn.sino.mark.common.enums.SysUserLeaveEnum
+ * @date 2022/3/16
+ */
+@Getter
+public enum SysUserStatusEnum {
+
+    /**
+     * 正常
+     */
+    NORMAL(0, "正常"),
+
+    /**
+     * 冻结
+     */
+    FROZEN(1, "作废");
+
+    SysUserStatusEnum(int value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+
+    private final int value;
+    private final String name;
+    public static String getName(int value) {
+        for (SysUserStatusEnum obj : SysUserStatusEnum.values()) {
+            if (obj.getValue() == value) {
+                return obj.getName();
+            }
+        }
+        return "";
+    }
+}

+ 40 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/SysUserTypeEnum.java

@@ -0,0 +1,40 @@
+package cn.sino.mark.common.enums;
+
+
+import lombok.Getter;
+
+/**
+ * @author sch
+ * @description 用户类型枚举
+ * @className cn.sino.mark.common.enums.SysUserTypeEnum
+ * @date 2022/3/29
+ */
+@Getter
+public enum SysUserTypeEnum {
+
+    /**
+     * 外部员工
+     */
+    OUTER_EMPLOYEE(0, "外部员工"),
+
+    /**
+     * 内部员工
+     */
+    INNER_EMPLOYEE(1, "内部员工");
+
+    SysUserTypeEnum(int value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+
+    private final int value;
+    private final String name;
+    public static String getName(int value) {
+        for (SysUserTypeEnum obj : SysUserTypeEnum.values()) {
+            if (obj.getValue() == value) {
+                return obj.getName();
+            }
+        }
+        return "";
+    }
+}

+ 32 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/TaskMarkEnums.java

@@ -0,0 +1,32 @@
+package cn.sino.mark.common.enums;
+
+import lombok.Getter;
+
+/**
+ * @author sch
+ * @description 任务标注状态
+ * @className cn.sino.mark.common.enums.TaskMarkEnums
+ * @date 2022/4/5
+ */
+@Getter
+public enum TaskMarkEnums {
+
+    MARK(0, "打标"), QUEST(2, "存疑"), IGNORE(1, "忽略");
+
+    private final Integer value;
+    private final String name;
+
+    TaskMarkEnums(int value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+
+    public static String getName(Integer value) {
+        for (TaskMarkEnums mark : TaskMarkEnums.values()) {
+            if (mark.getValue().equals(value)) {
+                return mark.getName();
+            }
+        }
+        return "";
+    }
+}

+ 32 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/enums/TaskRunningEnums.java

@@ -0,0 +1,32 @@
+package cn.sino.mark.common.enums;
+
+import lombok.Getter;
+
+/**
+ * @author sch
+ * @description 任务运行状态
+ * @className cn.sino.mark.common.enums.TaskRunningEnums
+ * @date 2022/4/8
+ */
+@Getter
+public enum TaskRunningEnums {
+
+    WAIT(0, "未开始"), RUNNING(1, "进行中"), COMPLETED(2, "已完成"), EXPIRED(3, "已过期");
+
+    private final Integer value;
+    private final String name;
+
+    TaskRunningEnums(int value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+
+    public static String getName(Integer value) {
+        for (TaskRunningEnums mark : TaskRunningEnums.values()) {
+            if (mark.getValue().equals(value)) {
+                return mark.getName();
+            }
+        }
+        return "";
+    }
+}

+ 29 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/filter/LogMdcFilter.java

@@ -0,0 +1,29 @@
+package cn.sino.mark.common.filter;
+
+import cn.hutool.core.util.IdUtil;
+import org.slf4j.MDC;
+import org.springframework.core.annotation.Order;
+
+import javax.servlet.*;
+import javax.servlet.annotation.WebFilter;
+import java.io.IOException;
+
+@Order(-10000)
+@WebFilter(urlPatterns = "/*", filterName = "logMdcFilter")
+public class LogMdcFilter implements Filter {
+
+    private static final String UNIQUE_ID = "traceId";
+
+    @Override
+    public void doFilter(ServletRequest request,
+                         ServletResponse response,
+                         FilterChain chain) throws IOException, ServletException {
+        String uniqueId = IdUtil.fastSimpleUUID();
+        MDC.put(UNIQUE_ID, uniqueId);
+        try {
+            chain.doFilter(request, response);
+        } finally {
+            MDC.remove(UNIQUE_ID);
+        }
+    }
+}

+ 82 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/filter/LoginFilter.java

@@ -0,0 +1,82 @@
+package cn.sino.mark.common.filter;
+
+import cn.hutool.json.JSONUtil;
+import cn.sino.common.exception.BizException;
+import cn.sino.common.vo.RestResponseVO;
+import cn.sino.mark.common.config.security.SysUserDetails;
+import cn.sino.mark.common.constants.Constant;
+import cn.sino.mark.common.model.dto.LoginUserDTO;
+import cn.sino.mark.common.model.dto.UserLoginDTO;
+import cn.sino.mark.service.SysUserService;
+import cn.sino.mark.service.convert.SysUserMapStruct;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.http.MediaType;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+
+import javax.servlet.FilterChain;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.ArrayList;
+
+
+/**
+ * @author zhangamin
+ * @description 处理用户登录的过滤器
+ * @className cn.sino.coop.common.filter.LoginFilter
+ * @date 2021/12/22
+ */
+public class LoginFilter extends AbstractAuthenticationProcessingFilter {
+
+    private SysUserService sysUserService;
+    private ObjectMapper objectMapper;
+
+    public LoginFilter(String url, AuthenticationManager authManager) {
+        super(new AntPathRequestMatcher(url));
+        setAuthenticationManager(authManager);
+    }
+
+    public LoginFilter(String url, AuthenticationManager authManager, SysUserService sysUserService, ObjectMapper objectMapper) {
+        this(url, authManager);
+        this.objectMapper = objectMapper;
+        this.sysUserService = sysUserService;
+    }
+
+    @Override
+    public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        UserLoginDTO userLoginInfo = objectMapper.readValue(request.getInputStream(), UserLoginDTO.class);
+        // 返回一个验证令牌
+        UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = new UsernamePasswordAuthenticationToken(
+                userLoginInfo.getAccount(), userLoginInfo.getPassword());
+        return getAuthenticationManager().authenticate(usernamePasswordAuthenticationToken);
+    }
+
+    @Override
+    protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authResult) throws IOException {
+        //登录成功处理
+        SysUserDetails principal = (SysUserDetails) authResult.getPrincipal();
+        LoginUserDTO loginUser = SysUserMapStruct.INSTANCE.convertToLoginUserDTO(principal);
+        UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(loginUser, null, new ArrayList<>());
+        SecurityContextHolder.getContext().setAuthentication(authentication);
+        String token = sysUserService.createUserLoginToken(principal.getUsername());
+        response.setContentType(MediaType.APPLICATION_JSON_VALUE);
+        response.setStatus(HttpServletResponse.SC_OK);
+        RestResponseVO<Object> success = RestResponseVO.success(token);
+        response.getWriter().println(JSONUtil.toJsonStr(success));
+    }
+
+    @Override
+    protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException failed) throws IOException {
+        response.setContentType(Constant.APPLICATION_JSON_UTF8_VALUE);
+        response.setStatus(HttpServletResponse.SC_OK);
+        RestResponseVO<Object> fail = RestResponseVO.fail(new BizException(failed.getMessage()));
+        response.getWriter().println(JSONUtil.toJsonStr(fail));
+    }
+
+}

+ 87 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/filter/TokenFilter.java

@@ -0,0 +1,87 @@
+package cn.sino.mark.common.filter;
+
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONUtil;
+import cn.sino.mark.common.constants.Constant;
+import cn.sino.mark.common.model.dto.LoginUserDTO;
+import cn.sino.mark.common.properties.JwtProperties;
+import com.auth0.jwt.JWT;
+import com.auth0.jwt.JWTVerifier;
+import com.auth0.jwt.algorithms.Algorithm;
+import com.auth0.jwt.interfaces.DecodedJWT;
+import com.google.common.base.Strings;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.web.filter.OncePerRequestFilter;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.concurrent.TimeUnit;
+
+import static cn.hutool.core.text.CharSequenceUtil.isNotBlank;
+
+/**
+ * @author zhangamin
+ * @description 验证后台授权Token过滤器
+ * @className cn.sino.coop.common.filter.TokenFilter
+ * @date 2022/3/16
+ */
+public class TokenFilter extends OncePerRequestFilter {
+
+    private final JwtProperties jwtProperties;
+    private final StringRedisTemplate stringRedisTemplate;
+
+    public TokenFilter(JwtProperties jwtProperties, StringRedisTemplate stringRedisTemplate) {
+        this.jwtProperties = jwtProperties;
+        this.stringRedisTemplate = stringRedisTemplate;
+    }
+
+    @Override
+    protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
+        String tokenValue = request.getHeader(Constant.ADMIN_TOKEN_HEADER_KEY);
+        if (Strings.isNullOrEmpty(tokenValue)) {
+            tokenValue = request.getHeader(Constant.ADMIN_TOKEN_HEADER_KEY.toLowerCase());
+        }
+        if (isNotBlank(tokenValue)) {
+            String token = decodeJwt(tokenValue);
+            if (isNotBlank(token)) {
+                // 头部信息中存在token
+                String loginRedisKey = Constant.ADMIN_LOGIN_KEY + token;
+                Object loginUserObj = stringRedisTemplate.opsForHash().get(loginRedisKey, Constant.LOGIN_USER_INFO);
+                if (loginUserObj != null) {
+                    LoginUserDTO loginUser = JSONUtil.toBean(loginUserObj.toString(), LoginUserDTO.class);
+                    //将当前登陆用户信息注入到Authentication
+                    UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(loginUser, null, new ArrayList<>());
+                    SecurityContextHolder.getContext().setAuthentication(authentication);
+                    stringRedisTemplate.expire(loginRedisKey, Constant.ADMIN_LOGIN_SESSION_TIME, TimeUnit.HOURS);
+                }
+            }
+        }
+        filterChain.doFilter(request, response);
+    }
+
+    /**
+     * 解析jwt
+     *
+     * @param jwt 解析的jwt字符串
+     * @return token
+     */
+    private String decodeJwt(String jwt) {
+        String token = "";
+        try {
+            Algorithm algorithm = Algorithm.HMAC256(jwtProperties.getAdminSecret());
+            JWTVerifier verifier = JWT.require(algorithm).withIssuer(jwtProperties.getIssuer()).build();
+            DecodedJWT decoded = verifier.verify(jwt);
+            token = decoded.getClaim("uid").asString();
+        } catch (Exception e) {
+            logger.error("解析后台登录token jwt失败:", e);
+        }
+        return token;
+    }
+
+}

+ 96 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/log/Log.java

@@ -0,0 +1,96 @@
+package cn.sino.mark.common.log;
+
+
+import cn.sino.mark.common.enums.LogTypeEnum;
+
+
+/**
+ * @author zhangamin
+ * @description 日志试题
+ * @className cn.sino.mark.common.log.Log
+ * @date 2022/3/30
+ */
+public class Log {
+
+
+    /**
+     * 日志
+     */
+    private String log;
+
+    /**
+     * 日志类型
+     */
+    private LogTypeEnum logType;
+
+    public Log(Builder builder) {
+        this.log = builder.stringBuilder.toString();
+        this.logType = builder.logType;
+    }
+
+    public static Builder builder() {
+        return new Builder();
+    }
+
+    public String getLog() {
+        return log;
+    }
+
+    public void setLog(String log) {
+        this.log = log;
+    }
+
+    public LogTypeEnum getLogType() {
+        return logType;
+    }
+
+    public void setLogType(LogTypeEnum logType) {
+        this.logType = logType;
+    }
+
+    /**
+     * builder模式
+     */
+    public static class Builder {
+
+        private LogTypeEnum logType;
+
+        private StringBuilder stringBuilder = new StringBuilder();
+
+        public Builder append(String log) {
+            stringBuilder.append(log);
+            return this;
+        }
+
+        public Builder isLogin() {
+            this.logType = LogTypeEnum.LOGIN;
+            return this;
+        }
+
+        public Builder isInsert() {
+            this.logType = LogTypeEnum.INSERT;
+            return this;
+        }
+
+        public Builder isUpdate() {
+            this.logType = LogTypeEnum.UPDATE;
+            return this;
+        }
+
+        public Builder isDelete() {
+            this.logType = LogTypeEnum.DELETE;
+            return this;
+        }
+
+        public Builder type(LogTypeEnum logType) {
+            this.logType = logType;
+            return this;
+        }
+
+    }
+
+    @Override
+    public String toString() {
+        return "【日志描述:" + this.log + ";日志类型:" + this.logType.getName() + "】";
+    }
+}

+ 23 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/log/SysLogEvent.java

@@ -0,0 +1,23 @@
+package cn.sino.mark.common.log;
+
+import org.springframework.context.ApplicationEvent;
+
+
+/**
+ * @author zhangamin
+ * @description 记录日志事件
+ * @className cn.sino.mark.common.log.SysLogEvent
+ * @date 2022/3/30
+ */
+public class SysLogEvent extends ApplicationEvent {
+
+    /**
+     * Create a new {@code ApplicationEvent}.
+     *
+     * @param source the object on which the event initially occurred or with
+     *               which the event is associated (never {@code null})
+     */
+    public SysLogEvent(Object source) {
+        super(source);
+    }
+}

+ 29 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/log/SysLogEventPublisher.java

@@ -0,0 +1,29 @@
+package cn.sino.mark.common.log;
+
+import org.springframework.context.ApplicationContext;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * @author zhangamin
+ * @description 日志发送
+ * @className cn.sino.mark.common.log.SysLogEventPublisher
+ * @date 2022/3/30
+ */
+@Component
+public class SysLogEventPublisher {
+
+
+    private final ApplicationContext applicationContext;
+
+    public SysLogEventPublisher(ApplicationContext applicationContext) {
+        this.applicationContext = applicationContext;
+    }
+
+    /**
+     * 写入日志
+     */
+    public void publish(Log.Builder builder) {
+        applicationContext.publishEvent(new SysLogEvent(new Log(builder)));
+    }
+}

+ 46 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/log/SysLogListener.java

@@ -0,0 +1,46 @@
+package cn.sino.mark.common.log;
+
+import cn.sino.mark.common.utils.IPHelper;
+import cn.sino.mark.common.utils.LoginUserUtil;
+import cn.sino.mark.dao.mapper.SysLogMapper;
+import cn.sino.mark.dao.model.SysLogDO;
+import org.springframework.context.ApplicationListener;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.time.LocalDateTime;
+import java.util.Objects;
+
+
+/**
+ * @author zhangamin
+ * @description 日志监听器
+ * @className cn.sino.mark.common.log.SysLogEvent
+ * @date 2022/3/30
+ */
+@Component
+public class SysLogListener implements ApplicationListener<SysLogEvent> {
+
+    private final SysLogMapper sysLogMapper;
+
+    public SysLogListener(SysLogMapper sysLogMapper) {
+        this.sysLogMapper = sysLogMapper;
+    }
+
+    @Override
+    public void onApplicationEvent(SysLogEvent sysLogEvent) {
+        Log log = (Log) sysLogEvent.getSource();
+        HttpServletRequest req = ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest();
+        SysLogDO sysLog = new SysLogDO();
+        sysLog.setAccount(LoginUserUtil.getLoginUser().getAccount());
+        sysLog.setUserName(LoginUserUtil.getLoginUser().getUserName());
+        sysLog.setIp(IPHelper.getIpAddress(req));
+        sysLog.setType(log.getLogType().getValue());
+        sysLog.setLog(log.getLog());
+        sysLog.setCreateTime(LocalDateTime.now());
+        sysLogMapper.insert(sysLog);
+    }
+
+}

+ 55 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/ExportDataBO.java

@@ -0,0 +1,55 @@
+package cn.sino.mark.common.model.bo;
+
+import lombok.Data;
+
+/**
+ * @author sch
+ * @description 导出资源
+ * @className cn.sino.mark.common.model.bo.ExportDataBO
+ * @date 2022/4/11
+ */
+@Data
+public class ExportDataBO {
+    /**
+     * 项目id
+     */
+    private String projectId;
+
+    /**
+     * 项目名称
+     */
+    private String projectName;
+
+    /**
+     * 任务id
+     */
+    private String taskId;
+
+    /**
+     * 任务名称
+     */
+    private String taskName;
+
+    /**
+     * 资源类型
+     */
+    private String typeName;
+    private Integer type;
+
+    /**
+     * 资源内容
+     */
+    private String content;
+    private String picUrl;
+    private String movUrl;
+
+    /**
+     * 分类id
+     */
+    private String categoryId;
+
+    /**
+     * 分类名称
+     */
+    private String categoryName;
+}

+ 52 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/ProjectBO.java

@@ -0,0 +1,52 @@
+package cn.sino.mark.common.model.bo;
+
+import cn.sino.mark.dao.model.ProjectDO;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @author sch
+ * @description 项目BO
+ * @className cn.sino.mark.common.model.bo.ProjectBO
+ * @date 2022/4/5
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class ProjectBO extends ProjectDO {
+    /**
+     * 一级项目组
+     */
+    private String firstGroup;
+
+    /**
+     * 二级项目组
+     */
+    private String secondGroup;
+
+    /**
+     * 任务总数
+     */
+    private Integer totalTaskNum;
+
+    /**
+     * 完成任务数
+     */
+    private Integer completeTaskNum;
+
+    /**
+     * 过期任务数
+     */
+    private Integer expiredNum;
+
+    /**
+     * 已验证的任务数
+     */
+    private Integer sampledNum;
+
+    /**
+     * 存疑数量
+     */
+    private Integer problemNum;
+
+
+}

+ 44 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/ProjectTaskBO.java

@@ -0,0 +1,44 @@
+package cn.sino.mark.common.model.bo;
+
+import cn.sino.mark.dao.model.ProjectTaskDO;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.time.LocalDateTime;
+
+/**
+ * @author sch
+ * @description
+ * @className
+ * @date 2022/4/7
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class ProjectTaskBO extends ProjectTaskDO {
+    /**
+     * 推送时间
+     */
+    private LocalDateTime pushTime;
+
+    /**
+     * 项目名称
+     */
+    private String projectName;
+
+    /**
+     * 打标人账号
+     */
+    private String markUserAccount;
+    private String markUserName;
+
+
+    /**
+     * 一级项目组
+     */
+    private String firstGroup;
+
+    /**
+     * 二级项目组
+     */
+    private String secondGroup;
+}

+ 50 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/ProjectTaskDetailBO.java

@@ -0,0 +1,50 @@
+package cn.sino.mark.common.model.bo;
+
+import cn.sino.mark.dao.model.ProjectTaskDetailDO;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @author sch
+ * @description
+ * @className
+ * @date 2022/4/7
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class ProjectTaskDetailBO extends ProjectTaskDetailDO {
+    /**
+     * 资源类型
+     */
+    private Integer resourceType;
+
+    /**
+     * 文本内容
+     */
+    private String content;
+
+    /**
+     * 任务名称
+     */
+    private String taskName;
+
+    /**
+     * 图片地址
+     */
+    private String picUrl;
+
+    /**
+     * 视频地址
+     */
+    private String movUrl;
+
+    /**
+     * 注释
+     */
+    private String hint;
+
+    /**
+     * 分类名称
+     */
+    private String categoryName;
+}

+ 25 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/ResourceBO.java

@@ -0,0 +1,25 @@
+package cn.sino.mark.common.model.bo;
+
+import cn.sino.mark.dao.model.ResourceDO;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @author sch
+ * @description 资源数据集BO
+ * @className cn.sino.mark.common.model.bo.ResourceBO
+ * @date 2022/4/3
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class ResourceBO extends ResourceDO {
+    /**
+     * 创建人姓名
+     */
+    private String createByName;
+
+    /**
+     * 资源数量
+     */
+    private Integer dataNum;
+}

+ 121 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/SysPermBO.java

@@ -0,0 +1,121 @@
+package cn.sino.mark.common.model.bo;
+
+import java.util.List;
+
+
+/**
+ * 权限菜单集合
+ *
+ * @author zhangamin
+ * @date 2020/11/21
+ */
+public class SysPermBO {
+
+    private Long permId;
+    private String permName;
+    private String permCode;
+    private String pattern;
+    private Long parentId;
+    /**
+     * 是否是菜单(0:不是;1:是)
+     */
+    private int isMenu;
+    /**
+     * 排序
+     */
+    private Long sort;
+    /**
+     * 标识 该角色是否拥有这个权限,有 true  么有 no
+     */
+    private boolean hasPerm =true;
+    /**
+     * 子权限信息
+     */
+    List<SysPermBO> children;
+    /**
+     * 是否默认拥有(0:否;1:是)
+     */
+    private Integer isDefault;
+
+    public Integer getIsDefault() {
+        return isDefault;
+    }
+
+    public void setIsDefault(Integer isDefault) {
+        this.isDefault = isDefault;
+    }
+
+    public int getIsMenu() {
+        return isMenu;
+    }
+
+    public void setIsMenu(int isMenu) {
+        this.isMenu = isMenu;
+    }
+
+    public Long getSort() {
+        return sort;
+    }
+
+    public void setSort(Long sort) {
+        this.sort = sort;
+    }
+
+    public boolean isHasPerm() {
+        return hasPerm;
+    }
+
+    public void setHasPerm(boolean hasPerm) {
+        this.hasPerm = hasPerm;
+    }
+
+    public List<SysPermBO> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<SysPermBO> children) {
+        this.children = children;
+    }
+
+    public Long getPermId() {
+        return permId;
+    }
+
+    public void setPermId(Long permId) {
+        this.permId = permId;
+    }
+
+    public String getPermName() {
+        return permName;
+    }
+
+    public void setPermName(String permName) {
+        this.permName = permName;
+    }
+
+    public String getPermCode() {
+        return permCode;
+    }
+
+    public void setPermCode(String permCode) {
+        this.permCode = permCode;
+    }
+
+    public String getPattern() {
+        return pattern;
+    }
+
+    public void setPattern(String pattern) {
+        this.pattern = pattern;
+    }
+
+
+    public Long getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId) {
+        this.parentId = parentId;
+    }
+
+}

+ 40 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/SysUserBO.java

@@ -0,0 +1,40 @@
+package cn.sino.mark.common.model.bo;
+
+import cn.sino.mark.dao.model.SysUserDO;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * @author sch
+ * @description 用户信息BO
+ * @className cn.sino.mark.common.model.bo.UserBO
+ * @date 2022/3/29
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class SysUserBO extends SysUserDO {
+    /**
+     * 角色名称
+     */
+    private String userRoleNames;
+
+    /**
+     * 状态名
+     */
+    private String statusName;
+
+    /**
+     * 类型
+     */
+    private String userTypeName;
+
+    /**
+     * 创建时间
+     */
+    private String createTimeStr;
+
+    /**
+     * 进行中任务数
+     */
+    private Integer taskNum;
+}

+ 7 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/bo/package-info.java

@@ -0,0 +1,7 @@
+/**
+ * TODO
+ *
+ * @author zhangamin
+ * @date 2022/3/27
+ */
+package cn.sino.mark.common.model.bo;

+ 39 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddCategoryDTO.java

@@ -0,0 +1,39 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author zhangamin
+ * @description 新增分类
+ * @className cn.sino.mark.common.model.dto.AddCategoryDTO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class AddCategoryDTO {
+
+    /**
+     * 分类名称
+     */
+    @NotBlank(message = "分类名称不能为空")
+    @ApiModelProperty(value = "分类名称", required = true)
+    private String categoryName;
+
+    /**
+     * 上级分类ID
+     */
+    @ApiModelProperty("上级分类ID")
+    private String parentId;
+
+    /**
+     * 是否根分类(0:不是,1:是)
+     */
+    @ApiModelProperty("是否根分类(0:不是,1:是)")
+    @NotNull(message = "是否根分类不能为空")
+    private Integer isBaseCategory;
+}

+ 48 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddInnerUserDTO.java

@@ -0,0 +1,48 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.*;
+import java.util.List;
+
+/**
+ * @author sch
+ * @description 新增用户
+ * @className cn.sino.mark.common.model.dto.AddInnerUserDTO
+ * @date 2022/4/18
+ */
+@Data
+@ApiModel
+public class AddInnerUserDTO {
+    /**
+     * 登录账号
+     */
+    @ApiModelProperty("登录账号")
+    @NotBlank(message = "登录账号不能为空")
+    @Size(min = 5, max = 16, message = "登录账号长度在{min}~{max}之间")
+    private String account;
+
+    /**
+     * 姓名
+     */
+    @ApiModelProperty("姓名")
+    @NotBlank(message = "用户姓名不能为空")
+    @Size(min = 1, max = 20, message = "用户姓名长度在{min}~{max}之间")
+    private String userName;
+
+    /**
+     * 是否作废(0:正常,1:作废)
+     */
+    @ApiModelProperty("是否作废(0:正常,1:作废)")
+    @NotNull(message = "请选择是否作废")
+    private Integer status;
+
+    /**
+     * 角色
+     */
+    @ApiModelProperty("角色")
+    @NotEmpty(message = "角色信息不能为空")
+    private List<Long> roleIds;
+}

+ 68 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddPermReqDTO.java

@@ -0,0 +1,68 @@
+package cn.sino.mark.common.model.dto;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * @author zhangamin
+ * @date 2020/11/25
+ */
+public class AddPermReqDTO {
+
+    @Size(min = 1,max = 30,message = "权限名称长度在{min}~{max}之间")
+    @NotNull(message = "权限名称不能为空")
+    private String permName;
+
+    @Size(min = 1,max = 512,message = "权限代码长度在{min}~{max}之间")
+    @NotNull(message = "权限代码不能为空")
+    private String permCode;
+
+    @NotNull(message = "是否是菜单(0:不是;1:是)")
+    private int isMenu;
+
+    @NotNull(message = "父节点id不能为空")
+    private Long parentId;
+
+    @NotNull(message = "请选择是否默认拥有")
+    private Integer isDefault;
+
+    public String getPermName() {
+        return permName;
+    }
+
+    public void setPermName(String permName) {
+        this.permName = permName;
+    }
+
+    public String getPermCode() {
+        return permCode;
+    }
+
+    public void setPermCode(String permCode) {
+        this.permCode = permCode;
+    }
+
+    public int getIsMenu() {
+        return isMenu;
+    }
+
+    public void setIsMenu(int isMenu) {
+        this.isMenu = isMenu;
+    }
+
+    public Long getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId) {
+        this.parentId = parentId;
+    }
+
+    public Integer getIsDefault() {
+        return isDefault;
+    }
+
+    public void setIsDefault(Integer isDefault) {
+        this.isDefault = isDefault;
+    }
+}

+ 33 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddProjectCategoryDTO.java

@@ -0,0 +1,33 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author zhangamin
+ * @description 新增项目分类
+ * @className cn.sino.mark.common.model.dto.AddProjectCategoryDTO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class AddProjectCategoryDTO {
+
+    /**
+     * 项目ID
+     */
+    @ApiModelProperty("项目ID")
+    @NotNull(message = "项目ID不能为空")
+    private Long projectId;
+
+    /**
+     * 项目分类
+     */
+    @ApiModelProperty("项目分类")
+    @NotNull(message = "分类ID不能为空")
+    private String categoryId;
+
+}

+ 77 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddProjectDTO.java

@@ -0,0 +1,77 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+import java.time.LocalDateTime;
+
+/**
+ * @author zhangamin
+ * @description 新增项目
+ * @className cn.sino.mark.common.model.dto.AddProjectDTO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class AddProjectDTO {
+
+    /**
+     * 项目名称
+     */
+    @ApiModelProperty(value = "项目名称", required = true)
+    @NotBlank(message = "项目名称不能为空")
+    @Size(min = 1, max = 45, message = "项目名称长度在{min}~{max}之间")
+    private String projectName;
+
+    /**
+     * 项目分组
+     */
+    @ApiModelProperty(value = "项目分组", required = true)
+    @NotNull(message = "项目分组不能为空")
+    private Long groupId;
+
+    /**
+     * 有效期开始时间
+     */
+    @ApiModelProperty(value = "有效期开始时间", required = true)
+    @NotNull(message = "有效期开始时间不能为空")
+    private LocalDateTime beginTime;
+
+    /**
+     * 有效期结束时间
+     */
+    @ApiModelProperty(value = "有效期结束时间", required = true)
+    @NotNull(message = "有效期结束时间不能为空")
+    private LocalDateTime endTime;
+
+    /**
+     * 推送时间
+     */
+    @ApiModelProperty(value = "推送时间", required = true)
+    @NotNull(message = "推送时间不能为空")
+    private LocalDateTime pushTime;
+
+    /**
+     * 项目描述
+     */
+    @ApiModelProperty(value = "项目描述")
+    private String description;
+
+    /**
+     * 是否编辑(0:新增,1:编辑)
+     */
+    @ApiModelProperty("是否编辑(0:新增,1:编辑)")
+    @NotNull(message = "是否编辑不能为空")
+    private Integer isEdit;
+
+    /**
+     * 项目id(编辑才有)
+     */
+    @ApiModelProperty("项目id(编辑才有)")
+    private Long projectId;
+
+}

+ 39 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddProjectGroupDTO.java

@@ -0,0 +1,39 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author zhangamin
+ * @description 新增分组
+ * @className cn.sino.mark.common.model.dto.AddProjectGroupDTO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class AddProjectGroupDTO {
+
+    /**
+     * 分组名称
+     */
+    @NotBlank(message = "分组名称不能为空")
+    @ApiModelProperty(value = "分组名称", required = true)
+    private String groupName;
+
+    /**
+     * 上级分组ID
+     */
+    @ApiModelProperty("上级分组ID")
+    private Long parentId;
+
+    /**
+     * 是否根项目组
+     */
+    @ApiModelProperty("是否根项目组")
+    @NotNull(message = "是否为一级项目组不能为空")
+    private Integer isBaseGroup;
+}

+ 41 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddProjectResourceDTO.java

@@ -0,0 +1,41 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @author zhangamin
+ * @description 新增项目资源
+ * @className cn.sino.mark.common.model.dto.AddProjectResourceDTO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class AddProjectResourceDTO {
+
+    /**
+     * 项目ID
+     */
+    @ApiModelProperty("项目ID")
+    @NotNull(message = "项目ID不能为空")
+    private Long projectId;
+
+    /**
+     * 项目资源ID集合
+     */
+    @ApiModelProperty("项目资源ID集合")
+    @NotEmpty(message = "资源ID不能为空")
+    private List<Long> resourceIds;
+
+    /**
+     * 是否编辑(0:新增,1:编辑)
+     */
+    @ApiModelProperty("是否编辑(0:新增,1:编辑)")
+//    @NotNull(message = "是否编辑不能为空")
+    private Integer isEdit;
+}

+ 41 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddProjectUserDTO.java

@@ -0,0 +1,41 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @author zhangamin
+ * @description 新增项目用户
+ * @className cn.sino.mark.common.model.dto.AddProjectUserDTO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class AddProjectUserDTO {
+
+    /**
+     * 项目ID
+     */
+    @ApiModelProperty("项目ID")
+    @NotNull(message = "项目ID不能为空")
+    private Long projectId;
+
+    /**
+     * 项目用户ID集合
+     */
+    @ApiModelProperty("项目用户ID集合")
+    @NotEmpty(message = "用户id集合不能为空")
+    private List<Long> userIds;
+
+    /**
+     * 是否编辑(0:新增,1:编辑)
+     */
+    @ApiModelProperty("是否编辑(0:新增,1:编辑)")
+//    @NotNull(message = "是否编辑不能为空")
+    private Integer isEdit;
+}

+ 36 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddResourceDTO.java

@@ -0,0 +1,36 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * @author zhangamin
+ * @description 新增资源
+ * @className cn.sino.mark.common.model.dto.AddResourceDTO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class AddResourceDTO {
+
+    /**
+     * 资源(数据集)名称
+     */
+    @ApiModelProperty(value = "资源(数据集)名称", required = true)
+    @NotBlank(message = "数据集名称不能为空")
+    @Size(min = 1, max = 20, message = "数据集名称长度在{min}~{max}之间")
+    private String name;
+
+    /**
+     * 资源类型(0:文本,1:图片,2:视频)
+     */
+    @ApiModelProperty(value = "资源类型(0:文本,1:图片,2:视频)", required = true)
+    @NotNull(message = "资源类型不能为空")
+    private Integer type;
+
+}

+ 34 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddRoleReqDTO.java

@@ -0,0 +1,34 @@
+package cn.sino.mark.common.model.dto;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * @author zhangamin
+ * @date 2020/11/25
+ */
+public class AddRoleReqDTO {
+
+    @Size(min = 1,max = 30,message = "角色名称长度在{min}~{max}之间")
+    @NotNull(message = "角色名称不能为空")
+    private String roleName;
+
+    @Size(min = 0,max = 100,message = "描述长度在{min}~{max}之间")
+    private String description;
+
+    public String getRoleName() {
+        return roleName;
+    }
+
+    public void setRoleName(String roleName) {
+        this.roleName = roleName;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+}

+ 31 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddTaskSampleDTO.java

@@ -0,0 +1,31 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author sch
+ * @description 新增抽样验证
+ * @className cn.sino.mark.common.model.dto.AddTaskSampleDTO
+ * @date 2022/4/9
+ */
+@ApiModel
+@Data
+public class AddTaskSampleDTO {
+    /**
+     * 任务id
+     */
+    @ApiModelProperty("任务id")
+    @NotNull(message = "任务id不能为空")
+    private Long taskId;
+
+    /**
+     * 抽样数量
+     */
+    @ApiModelProperty("抽样数量")
+    @NotNull(message = "抽样数量不能为空")
+    private Integer sampleNum;
+}

+ 62 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AddUserDTO.java

@@ -0,0 +1,62 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.*;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+
+/**
+ * @author sch
+ * @description 新增用户
+ * @className cn.sino.mark.common.model.dto.AddUserDTO
+ * @date 2022/3/29
+ */
+@Data
+@ApiModel
+public class AddUserDTO {
+    /**
+     * 登录账号
+     */
+    @ApiModelProperty("登录账号")
+    @NotBlank(message = "登录账号不能为空")
+    @Size(min = 5, max = 16, message = "登录账号长度在{min}~{max}之间")
+    @Pattern(regexp = "^[A-Za-z0-9]+$", message = "登录帐号只能是字母或数字")
+    private String account;
+
+    /**
+     * 姓名
+     */
+    @ApiModelProperty("姓名")
+    @NotBlank(message = "用户姓名不能为空")
+    @Size(min = 1, max = 20, message = "用户姓名长度在{min}~{max}之间")
+    private String userName;
+
+    /**
+     * 密码
+     */
+    @ApiModelProperty("密码")
+    @NotBlank(message = "密码不能为空")
+    @Size(min = 9, max = 16, message = "密码长度在{min}~{max}之间")
+    @Pattern(regexp = "^[A-Za-z0-9]+$", message = "大于8位,包含字母和数字")
+    private String password;
+
+    /**
+     * 确认密码
+     */
+    @ApiModelProperty("确认密码")
+    @Size(min = 9, max = 16, message = "确认密码长度在{min}~{max}之间")
+    @NotNull(message = "确认密码不能为空")
+    @Pattern(regexp = "^[A-Za-z0-9]+$", message = "大于8位,包含字母和数字")
+    private String confirmedPassword;
+
+    /**
+     * 是否作废(0:正常,1:作废)
+     */
+    @ApiModelProperty("是否作废(0:正常,1:作废)")
+    @NotNull(message = "请选择是否作废")
+    private Integer status;
+}

+ 32 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AssignPermsReqDTO.java

@@ -0,0 +1,32 @@
+package cn.sino.mark.common.model.dto;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author zhangamin
+ * @date 2020/11/25
+ */
+public class AssignPermsReqDTO {
+
+    @NotNull(message = "角色id不能为空")
+    private Long roleId;
+
+    @NotNull(message = "权限id不能为空")
+    private Long[] permIds;
+
+    public Long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(Long roleId) {
+        this.roleId = roleId;
+    }
+
+    public Long[] getPermIds() {
+        return permIds;
+    }
+
+    public void setPermIds(Long[] permIds) {
+        this.permIds = permIds;
+    }
+}

+ 21 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/AssignRolesDTO.java

@@ -0,0 +1,21 @@
+package cn.sino.mark.common.model.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author sch
+ * @description 用户分配角色
+ * @className cn.sino.mark.common.model.dto.AssignRolesDTO
+ * @date 2022/3/30
+ */
+@Data
+public class AssignRolesDTO {
+    @NotNull(message = "用户id不能为空")
+    private Long userId;
+
+    @NotEmpty(message = "角色id不能为空")
+    private Long[] roleIds;
+}

+ 40 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/CompleteProjectDTO.java

@@ -0,0 +1,40 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @author sch
+ * @description
+ * @className
+ * @date 2022/4/5
+ */
+@ApiModel
+@Data
+public class CompleteProjectDTO {
+    /**
+     * 项目ID
+     */
+    @ApiModelProperty("项目ID")
+    @NotNull(message = "项目ID不能为空")
+    private Long projectId;
+
+    /**
+     * 项目任务ID集合
+     */
+    @ApiModelProperty("任务ID集合")
+    @NotEmpty(message = "任务id集合不能为空")
+    private List<Long> taskIds;
+
+    /**
+     * 是否编辑(0:新增,1:编辑)
+     */
+    @ApiModelProperty("是否编辑(0:新增,1:编辑)")
+//    @NotNull(message = "是否编辑不能为空")
+    private Integer isEdit;
+}

+ 24 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/DeletePermReqDTO.java

@@ -0,0 +1,24 @@
+package cn.sino.mark.common.model.dto;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @author zhangamin
+ * @date 2020/11/23
+ */
+public class DeletePermReqDTO {
+
+    @NotNull(message = "权限id不能为空")
+    @NotEmpty(message = "权限id不能为空")
+    private List<Long> permIds;
+
+    public List<Long> getPermIds() {
+        return permIds;
+    }
+
+    public void setPermIds(List<Long> permIds) {
+        this.permIds = permIds;
+    }
+}

+ 68 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/EditPermReqDTO.java

@@ -0,0 +1,68 @@
+package cn.sino.mark.common.model.dto;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * @author zhangamin
+ * @date 2020/11/23
+ */
+public class EditPermReqDTO {
+
+    @NotNull(message = "权限id不能为空")
+    private Long permId;
+
+    @Size(min = 1,max = 30,message = "权限名称长度在{min}~{max}之间")
+    @NotNull(message = "权限名称不能为空")
+    private String permName;
+
+    @Size(min = 1,max = 512,message = "权限代码长度在{min}~{max}之间")
+    @NotNull(message = "权限代码不能为空")
+    private String permCode;
+
+    @NotNull(message = "是否是菜单(0:不是;1:是)")
+    private Integer isMenu;
+
+    @NotNull(message = "是否可分配(0:否;1:是)")
+    private Integer isDefault;
+
+    public Integer getIsDefault() {
+        return isDefault;
+    }
+
+    public void setIsDefault(Integer isDefault) {
+        this.isDefault = isDefault;
+    }
+
+    public Long getPermId() {
+        return permId;
+    }
+
+    public void setPermId(Long permId) {
+        this.permId = permId;
+    }
+
+    public String getPermName() {
+        return permName;
+    }
+
+    public void setPermName(String permName) {
+        this.permName = permName;
+    }
+
+    public String getPermCode() {
+        return permCode;
+    }
+
+    public void setPermCode(String permCode) {
+        this.permCode = permCode;
+    }
+
+    public Integer getIsMenu() {
+        return isMenu;
+    }
+
+    public void setIsMenu(Integer isMenu) {
+        this.isMenu = isMenu;
+    }
+}

+ 45 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/EditRoleReqDTO.java

@@ -0,0 +1,45 @@
+package cn.sino.mark.common.model.dto;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * @author zhangamin
+ * @date 2020/11/23
+ */
+public class EditRoleReqDTO {
+
+    @NotNull(message = "角色id不能为空")
+    private Long roleId;
+
+    @Size(min = 1,max = 30,message = "角色名称长度在{min}~{max}之间")
+    @NotNull(message = "角色名称不能为空")
+    private String roleName;
+
+    @Size(min = 0,max = 100,message = "描述长度在{min}~{max}之间")
+    private String description;
+
+    public Long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(Long roleId) {
+        this.roleId = roleId;
+    }
+
+    public String getRoleName() {
+        return roleName;
+    }
+
+    public void setRoleName(String roleName) {
+        this.roleName = roleName;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+}

+ 51 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/EditUserDTO.java

@@ -0,0 +1,51 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * @author sch
+ * @description 编辑用户
+ * @className cn.sino.mark.common.model.dto.EditUserDTO
+ * @date 2022/3/29
+ */
+@Data
+@ApiModel
+public class EditUserDTO {
+
+    /**
+     * 姓名
+     */
+    @ApiModelProperty("姓名")
+    @NotBlank(message = "用户姓名不能为空")
+    @Size(min = 1, max = 20, message = "用户姓名长度在{min}~{max}之间")
+    private String userName;
+
+    /**
+     * 密码
+     */
+    @ApiModelProperty("密码")
+//    @Size(min = 9, max = 16, message = "密码长度在{min}~{max}之间")
+//    @Pattern(regexp = "^[A-Za-z0-9]+$", message = "密码只能是字母或数字")
+    private String password;
+
+    /**
+     * 确认密码
+     */
+    @ApiModelProperty("确认密码")
+//    @Size(min = 9, max = 16, message = "确认密码长度在{min}~{max}之间")
+//    @Pattern(regexp = "^[A-Za-z0-9]+$", message = "确认密码只能是字母或数字")
+    private String confirmedPassword;
+
+    /**
+     * 是否作废(0:正常,1:作废)
+     */
+    @ApiModelProperty("是否作废(0:正常,1:作废)")
+    @NotNull(message = "请选择是否作废")
+    private Integer status;
+}

+ 56 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/ExportTaskDTO.java

@@ -0,0 +1,56 @@
+package cn.sino.mark.common.model.dto;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @author sch
+ * @description 导出标注结果条件
+ * @className cn.sino.mark.common.model.dto.ExportTaskDTO
+ * @date 2022/4/11
+ */
+@ApiModel
+@Data
+public class ExportTaskDTO {
+    /**
+     * 任务id集合
+     */
+    @ApiModelProperty("任务id集合")
+    @NotEmpty(message = "任务id集合不能为空")
+    private List<Long> taskIds;
+
+    /**
+     * 含正常分类结果
+     */
+    @ApiModelProperty("含正常分类结果")
+    @NotNull(message = "含正常分类结果不能为空")
+    private boolean hasCommon;
+
+    /**
+     * 含存疑
+     */
+    @ApiModelProperty("含存疑")
+    @NotNull(message = "含存疑为空")
+    private boolean hasProblem;
+
+    /**
+     * 含忽略
+     */
+    @ApiModelProperty("含忽略")
+    @NotNull(message = "含忽略不能为空")
+    private boolean hasIgnore;
+
+    /**
+     * 标注类型集合
+     */
+    @ApiModelProperty("标注类型集合")
+    @JsonIgnore
+    private List<Integer> markTypeList;
+
+}

+ 32 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/ImportResourceDTO.java

@@ -0,0 +1,32 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.*;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @author sch
+ * @description 上传资源参数
+ * @className cn.sino.mark.common.model.dto.ImportResourceDTO
+ * @date 2022/4/1
+ */
+@Data
+@ApiModel
+public class ImportResourceDTO {
+
+    /**
+     * 资源id
+     */
+    @ApiModelProperty(value = "资源id", required = true)
+    @NotNull(message = "资源id不能为空")
+    private Long resourceId;
+
+    /**
+     * 资源串
+     */
+    @ApiModelProperty("资源串")
+    private List<String> dataList;
+    private String resourceStr;
+}

+ 32 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/InnerLoginDTO.java

@@ -0,0 +1,32 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.*;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author sch
+ * @description 内部用户登录参数
+ * @className cn.sino.mark.common.model.dto.InnerLoginDTO
+ * @date 2022/4/18
+ */
+@Data
+@ApiModel
+public class InnerLoginDTO {
+    /**
+     * token
+     */
+    @ApiModelProperty("token")
+    @NotBlank(message = "token不能为空")
+    private String token;
+
+    /**
+     * userSource
+     */
+    @ApiModelProperty("userSource")
+    @NotNull(message = "userSource不能为空")
+    private Integer userSource;
+}

+ 40 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/LoginUserDTO.java

@@ -0,0 +1,40 @@
+package cn.sino.mark.common.model.dto;
+
+
+import lombok.Data;
+
+/**
+ * @author zhangamin
+ * @description 用户登录成功后从jwt中解析出的登陆用户信息
+ * @className cn.sino.coop.common.model.dto.LoginUserDTO
+ * @date 2022/3/16
+ */
+@Data
+public class LoginUserDTO {
+
+    /**
+     * 用户ID
+     */
+    private Long userId;
+
+    /**
+     * 用户账号(用于登录)
+     */
+    private String account;
+
+    /**
+     * 用户姓名
+     */
+    private String userName;
+
+    /**
+     * 登录时间
+     */
+    private Long loginTime;
+
+    /**
+     * 随机字符串
+     */
+    private String uuid;
+
+}

+ 59 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/MarkProjectTaskDTO.java

@@ -0,0 +1,59 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+ * @author zhangamin
+ * @description 打标
+ * @className cn.sino.mark.common.model.dto.MarkProjectTaskDTO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class MarkProjectTaskDTO {
+
+    /**
+     * 任务明细id
+     */
+    @ApiModelProperty("任务明细id")
+    @NotNull(message = "任务明细id不能为空")
+    private Long taskDetailId;
+
+    /**
+     * 打标分类ID
+     */
+    @ApiModelProperty("'打标分类ID'")
+    private String categoryId;
+    private List<String> categoryIds;
+
+    /**
+     * 类型(0:打标,1忽略)
+     */
+    @ApiModelProperty("类型(0:打标,1:忽略)")
+    @NotNull(message = "标注类型不能为空")
+    private Integer type;
+
+    /**
+     * 是否存疑
+     */
+    @ApiModelProperty("是否存疑")
+    private boolean hasProblem = false;
+
+    /**
+     * 验证结果
+     */
+    @ApiModelProperty("验证结果")
+    private Integer sampleType;
+
+    /**
+     * 验证说明
+     */
+    @ApiModelProperty("验证说明")
+    private String sampleDesc;
+
+}

+ 34 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/ModifyCategoryDTO.java

@@ -0,0 +1,34 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author zhangamin
+ * @description 修改分类
+ * @className cn.sino.mark.common.model.dto.ModifyCategoryDTO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class ModifyCategoryDTO {
+
+    /**
+     * 分类ID
+     */
+    @NotNull(message = "分类ID不能为空")
+    @ApiModelProperty(value = "分类ID", required = true)
+    private String categoryId;
+
+    /**
+     * 分类名称
+     */
+    @NotBlank(message = "分类名称不能为空")
+    @ApiModelProperty(value = "分类名称", required = true)
+    private String categoryName;
+
+}

+ 34 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/ModifyProjectGroupDTO.java

@@ -0,0 +1,34 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author zhangamin
+ * @description 修改分组
+ * @className cn.sino.mark.common.model.dto.ModifyProjectGroupDTO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class ModifyProjectGroupDTO {
+
+    /**
+     * 项目分组ID
+     */
+    @NotNull(message = "项目分组ID不能为空")
+    @ApiModelProperty(value = "项目分组ID", required = true)
+    private Long groupId;
+
+    /**
+     * 项目分组名称
+     */
+    @NotBlank(message = "项目分组名称不能为空")
+    @ApiModelProperty(value = "项目分组名称", required = true)
+    private String groupName;
+
+}

+ 90 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/MultipartFileDTO.java

@@ -0,0 +1,90 @@
+package cn.sino.mark.common.model.dto;
+
+
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.constraints.NotEmpty;
+import java.io.*;
+
+/**
+ * @author sch
+ * @description 上传文件
+ * @className cn.sino.mark.common.model.dto.MultipartFileDTO
+ * @date 2022/4/11
+ */
+public class MultipartFileDTO implements MultipartFile, Serializable {
+
+    /**
+     * 文件名
+     */
+    @NotEmpty(message = "文件名称不能为空")
+    private String originalFilename;
+
+    /**
+     * 文件类型
+     */
+    @NotEmpty(message = "文件类型不能为空")
+    private String contentType;
+
+    /**
+     * 文件内容
+     */
+    private byte[] bytes;
+
+    @Override
+    public String getName() {
+        return "file";
+    }
+
+    @Override
+    public String getOriginalFilename() {
+        return originalFilename;
+    }
+
+    public void setOriginalFilename(String originalFilename) {
+        this.originalFilename = originalFilename;
+    }
+
+    @Override
+    public String getContentType() {
+        return contentType;
+    }
+
+    @Override
+    public boolean isEmpty() {
+        return bytes == null || bytes.length == 0;
+    }
+
+    @Override
+    public long getSize() {
+        return bytes.length;
+    }
+
+    public void setContentType(String contentType) {
+        this.contentType = contentType;
+    }
+
+    @Override
+    public byte[] getBytes() {
+        return bytes;
+    }
+
+    @Override
+    public InputStream getInputStream() {
+        return new ByteArrayInputStream(bytes);
+    }
+
+    @Override
+    public void transferTo(File dest) throws IOException, IllegalStateException {
+        FileOutputStream fileOutputStream = new FileOutputStream(dest);
+        try {
+            fileOutputStream.write(bytes);
+        } finally {
+            fileOutputStream.close();
+        }
+    }
+
+    public void setBytes(byte[] bytes) {
+        this.bytes = bytes;
+    }
+}

+ 59 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/QueryMyProjectTaskDTO.java

@@ -0,0 +1,59 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author zhangamin
+ * @description 查询我的项目任务列表参数
+ * @className cn.sino.mark.common.model.dto.QueryMyProjectTaskDTO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class QueryMyProjectTaskDTO {
+
+    /**
+     * 任务ID
+     */
+    @ApiModelProperty("任务ID")
+    private Long taskId;
+
+    /**
+     * 任务名称
+     */
+    @ApiModelProperty("任务名称")
+    private String taskName;
+
+    /**
+     * 状态(已完成,进行中,已过期,待开始)
+     */
+    @ApiModelProperty("状态(已完成,进行中,已过期,待开始)")
+    private String status;
+
+    /**
+     * 即将到期天数
+     */
+    @ApiModelProperty("即将到期天数")
+    private Integer nearExpireDays;
+
+    /**
+     * 是否存疑
+     */
+    @ApiModelProperty("是否存疑")
+    private Integer isProblem;
+
+    /**
+     * 有效期开始时间
+     */
+    @ApiModelProperty("有效期开始时间")
+    private String beginTime;
+
+    /**
+     * 有效期结束时间
+     */
+    @ApiModelProperty("有效期结束时间")
+    private String endTime;
+
+}

+ 82 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/QueryProjectDTO.java

@@ -0,0 +1,82 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+/**
+ * @author zhangamin
+ * @description 查询项目列表参数
+ * @className cn.sino.mark.common.model.dto.QueryProjectDTO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class QueryProjectDTO {
+    /**
+     * 页码
+     */
+    @ApiModelProperty("页码")
+    private Integer pageNum = 1;
+
+    /**
+     * 每页数量
+     */
+    @ApiModelProperty("每页数量")
+    private Integer pageSize = 10;
+
+    /**
+     * 项目名称或ID
+     */
+    @ApiModelProperty("项目名称或ID")
+    private String nameOrId;
+
+    /**
+     * 所属任务组
+     */
+    @ApiModelProperty("所属任务组")
+    private Long groupId;
+
+    /**
+     * 状态
+     */
+    @ApiModelProperty("状态")
+    private Integer status;
+
+    /**
+     * 有效期开始时间
+     */
+    @ApiModelProperty("有效期开始时间")
+    private String validBeginTime;
+
+    /**
+     * 有效期结束时间
+     */
+    @ApiModelProperty("有效期结束时间")
+    private String validEndTime;
+
+    /**
+     * 完成日期开始时间
+     */
+    @ApiModelProperty("完成日期开始时间")
+    private String completeBeginTime;
+
+    /**
+     * 完成日期结束时间
+     */
+    @ApiModelProperty("完成日期结束时间")
+    private String completeEndTime;
+
+    /**
+     * 分配日期开始时间
+     */
+    @ApiModelProperty("分配日期开始时间")
+    private String assignBeginTime;
+
+    /**
+     * 分配日期结束时间
+     */
+    @ApiModelProperty("分配日期结束时间")
+    private String assignEndTime;
+}

+ 75 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/QueryResourceDTO.java

@@ -0,0 +1,75 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author zhangamin
+ * @description 查询资源列表参数
+ * @className cn.sino.mark.common.model.dto.QueryResourceDTO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class QueryResourceDTO {
+
+    /**
+     * 页码
+     */
+    @ApiModelProperty(value = "页码", required = true)
+    @NotNull(message = "请输入页码")
+    private Integer pageNum = 1;
+
+    /**
+     * 每页数量
+     */
+    @ApiModelProperty(value = "每页数量", required = true)
+    @NotNull(message = "请选择每页数量")
+    private Integer pageSize = 10;
+
+    /**
+     * 资源ID
+     */
+    @ApiModelProperty("资源ID")
+    private Long resourceId;
+
+    /**
+     * 资源名称
+     */
+    @ApiModelProperty("资源名称")
+    private String resourceName;
+
+    /**
+     * 名称或ID
+     */
+    @ApiModelProperty("名称或ID")
+    private String nameOrId;
+
+    /**
+     * 创建日期开始时间
+     */
+    @ApiModelProperty("创建日期开始时间")
+    private String beginTime;
+
+    /**
+     * 创建日期结束时间
+     */
+    @ApiModelProperty("创建日期结束时间")
+    private String endTime;
+
+    /**
+     * 创建人
+     */
+    @ApiModelProperty("创建人")
+    private String createByName;
+
+    /**
+     * 状态
+     */
+    @ApiModelProperty("状态")
+    private Integer assignStatus;
+
+}

+ 105 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/QueryTaskDTO.java

@@ -0,0 +1,105 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author sch
+ * @description 查询任务条件
+ * @className cn.sino.mark.common.model.dto.QueryTaskDTO
+ * @date 2022/4/10
+ */
+@ApiModel
+@Data
+public class QueryTaskDTO {
+    /**
+     * 用户id
+     */
+    @ApiModelProperty("用户id")
+    private Long userId;
+
+    /**
+     * 页码
+     */
+    @ApiModelProperty("页码")
+    private Integer pageNum = 1;
+
+    /**
+     * 每页数量
+     */
+    @ApiModelProperty("每页数量")
+    private Integer pageSize = 10;
+
+    /**
+     * 项目名称或ID
+     */
+    @ApiModelProperty("项目名称或ID")
+    private String projectNameOrId;
+
+    /**
+     * 任务名称或ID
+     */
+    @ApiModelProperty("任务名称或ID")
+    private String nameOrId;
+
+    /**
+     * 状态
+     */
+    @ApiModelProperty("状态")
+    private Integer status;
+
+    /**
+     * 即将到期
+     */
+    @ApiModelProperty("即将到期")
+    private Integer expiredDays;
+
+    /**
+     * 存疑
+     */
+    @ApiModelProperty("存疑")
+    private Integer hasProblem;
+
+    /**
+     * 有效期开始时间
+     */
+    @ApiModelProperty("有效期开始时间")
+    private String validBeginTime;
+
+    /**
+     * 有效期结束时间
+     */
+    @ApiModelProperty("有效期结束时间")
+    private String validEndTime;
+
+    /**
+     * 项目组id
+     */
+    @ApiModelProperty("项目组id")
+    private Long groupId;
+
+    /**
+     * 类型
+     */
+    @ApiModelProperty("类型")
+    private Integer type;
+
+    /**
+     * 完成时间开始时间
+     */
+    @ApiModelProperty("完成时间开始时间")
+    private String completeBeginTime;
+
+    /**
+     * 完成时间结束时间
+     */
+    @ApiModelProperty("完成时间结束时间")
+    private String completeEndTime;
+
+    /**
+     * 已完成
+     */
+    @ApiModelProperty("已完成")
+    private Integer isFinish;
+}

+ 58 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/QueryUserPageDTO.java

@@ -0,0 +1,58 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.*;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+ * @author sch
+ * @description 查询用户列表参数
+ * @className cn.sino.mark.common.model.dto.QueryUserPageDTO
+ * @date 2022/3/29
+ */
+@Data
+@ApiModel
+public class QueryUserPageDTO {
+    /**
+     * 页码
+     */
+    @ApiModelProperty("页码")
+    private Integer pageNum = 1;
+
+    /**
+     * 账号/姓名
+     */
+    @ApiModelProperty("账号/姓名")
+    private String nameOrAccount;
+
+    /**
+     * 来源渠道
+     */
+    @ApiModelProperty("来源渠道")
+    private Integer userType;
+
+    /**
+     * 注册时间开始
+     */
+    @ApiModelProperty("注册时间开始")
+    private String createTimeBegin;
+
+    /**
+     * 注册时间截止
+     */
+    @ApiModelProperty("注册时间截止")
+    private String createTimeEnd;
+
+    /**
+     * 角色
+     */
+    @ApiModelProperty("角色")
+    private Long roleId;
+
+    /**
+     * 状态
+     */
+    @ApiModelProperty("状态")
+    private Integer status;
+
+}

+ 54 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/ReAssignProjectTaskDTO.java

@@ -0,0 +1,54 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.time.LocalDateTime;
+
+/**
+ * @author zhangamin
+ * @description 重新指派任务
+ * @className cn.sino.mark.common.model.dto.ReAssignProjectTaskDTO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class ReAssignProjectTaskDTO {
+
+    /**
+     * 项目ID
+     */
+    @ApiModelProperty(value = "项目ID", required = true)
+    @NotNull(message = "项目id不能为空")
+    private Long projectId;
+
+    /**
+     * 任务ID
+     */
+    @ApiModelProperty(value = "任务ID", required = true)
+    @NotNull(message = "任务ID不能为空")
+    private Long taskId;
+
+    /**
+     * 打标人用户ID
+     */
+    @ApiModelProperty(value = "打标人用户ID", required = true)
+    @NotNull(message = "打标人用户ID不能为空")
+    private Long markUserId;
+
+    /**
+     * 有效期开始时间
+     */
+    @ApiModelProperty(value = "有效期开始时间", required = true)
+    @NotNull(message = "有效期开始时间不能为空")
+    private LocalDateTime beginTime;
+
+    /**
+     * 有效期结束时间
+     */
+    @ApiModelProperty(value = "有效期结束时间", required = true)
+    @NotNull(message = "有效期结束时间不能为空")
+    private LocalDateTime endTime;
+}

+ 35 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/SysRolePageQueryReqDTO.java

@@ -0,0 +1,35 @@
+package cn.sino.mark.common.model.dto;
+
+/**
+ * @author zhangamin
+ * @date 2020/11/23
+ */
+public class SysRolePageQueryReqDTO {
+
+    /**
+     * 页码
+     */
+    private Integer pageNum;
+
+    /**
+     * 角色名称
+     */
+    private String roleName;
+
+    public Integer getPageNum() {
+        return pageNum;
+    }
+
+    public void setPageNum(Integer pageNum) {
+        this.pageNum = pageNum;
+    }
+
+    public String getRoleName() {
+        return roleName;
+    }
+
+    public void setRoleName(String roleName) {
+        this.roleName = roleName;
+    }
+
+}

+ 34 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/dto/UserLoginDTO.java

@@ -0,0 +1,34 @@
+package cn.sino.mark.common.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * @author zhangamin
+ * @description 用户登录参数
+ * @className cn.sino.coop.common.model.dto.UserLoginDTO
+ * @date 2022/3/16
+ */
+@Data
+@ApiModel
+public class UserLoginDTO {
+
+    /**
+     * 用户账号
+     */
+    @ApiModelProperty(value = "用户账号", required = true)
+    @NotBlank(message = "登录账号不能为空")
+    private String account;
+
+    /**
+     * 用户密码
+     */
+    @ApiModelProperty(value = "用户密码", required = true)
+    @NotBlank(message = "登录密码不能为空")
+    private String password;
+
+
+}

+ 39 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/CategoryTreeVo.java

@@ -0,0 +1,39 @@
+package cn.sino.mark.common.model.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author zhangamin
+ * @description 分类树
+ * @className cn.sino.mark.common.model.vo.CategoryTreeVo
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class CategoryTreeVo {
+
+    /**
+     * 分类ID
+     */
+    @ApiModelProperty("分类ID")
+    private String value;
+
+    /**
+     * 分类名称
+     */
+    @ApiModelProperty("分类名称")
+    private String label;
+
+    /**
+     * 子节点
+     */
+    @ApiModelProperty("子节点")
+    private List<CategoryTreeVo> children;
+
+
+
+}

+ 39 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/ImportResourceVO.java

@@ -0,0 +1,39 @@
+package cn.sino.mark.common.model.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author zhangamin
+ * @description 导入资源个数
+ * @className cn.sino.mark.common.model.vo.ImportResourceVO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class ImportResourceVO {
+
+    /**
+     * 导入资源个数
+     */
+    @ApiModelProperty("导入资源个数")
+    private Integer resourceCount;
+
+    /**
+     * 无效资源个数
+     */
+    @ApiModelProperty("无效资源个数")
+    private Integer failedCount;
+
+    /**
+     * 有效资源
+     */
+    @ApiModelProperty("有效资源")
+    private List<String> dataList;
+    private String effectiveResourceStr;
+
+
+}

+ 26 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/InnerLoginUserVO.java

@@ -0,0 +1,26 @@
+package cn.sino.mark.common.model.vo;
+
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.RequiredArgsConstructor;
+
+/**
+ * @author sch
+ * @description
+ * @className
+ * @date 2022/4/20
+ */
+@Data
+@AllArgsConstructor
+public class InnerLoginUserVO {
+    private Integer thirdPartId;
+    private Integer userId;
+    private String employeeNumber;
+    private String token;
+    private Integer loginSource;
+    private String loginName;
+    private String userDisplayName;
+    private boolean needTransferPwd;
+    private Integer userSource;
+}

+ 39 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/InnerUserVO.java

@@ -0,0 +1,39 @@
+package cn.sino.mark.common.model.vo;
+
+import io.swagger.annotations.*;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+ * @author sch
+ * @description 内部用户信息
+ * @className cn.sino.mark.common.model.vo.InnerUserVO
+ * @date 2022/4/18
+ */
+@Data
+@ApiModel
+public class InnerUserVO {
+    /**
+     * 部门id
+     */
+    @ApiModelProperty("部门id")
+    private Integer thirdPartId;
+
+    /**
+     * 用户id
+     */
+    @ApiModelProperty("用户id")
+    private Integer userId;
+
+    /**
+     * 登录名
+     */
+    @ApiModelProperty("登录名")
+    private String loginName;
+
+    /**
+     * 账号
+     */
+    @ApiModelProperty("用户名")
+    private String displayName;
+}

+ 43 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/LoginUserInfoVO.java

@@ -0,0 +1,43 @@
+package cn.sino.mark.common.model.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author zhangamin
+ * @className cn.sino.coop.common.model.vo.LoginUserInfoVO
+ * @description 登录用户信息
+ * @date 2022/3/21
+ */
+@Data
+@ApiModel
+public class LoginUserInfoVO {
+
+    /**
+     * 用户姓名
+     */
+    @ApiModelProperty("用户姓名")
+    private String userName;
+
+    /**
+     * 用户状态(0:正常;1:冻结)
+     */
+    @ApiModelProperty("用户状态(0:正常;1:冻结)")
+    private Integer status;
+
+    /**
+     * 用户的角色
+     */
+    @ApiModelProperty("用户的角色")
+    private List<String> roles;
+
+    /**
+     * 用户的权限
+     */
+    @ApiModelProperty("用户的权限")
+    private List<String> permissions;
+
+}

+ 27 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/MyTaskStatisticVO.java

@@ -0,0 +1,27 @@
+package cn.sino.mark.common.model.vo;
+
+import io.swagger.annotations.*;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+ * @author sch
+ * @description 我的任务统计
+ * @className cn.sino.mark.common.model.vo.MyTaskStatisticVO
+ * @date 2022/4/10
+ */
+@ApiModel
+@Data
+public class MyTaskStatisticVO {
+    /**
+     * 未完成任务数
+     */
+    @ApiModelProperty("未完成任务数")
+    private Integer notCompleteNum;
+
+    /**
+     * 即将过期任务数(5天内将过期)
+     */
+    @ApiModelProperty("即将过期任务数")
+    private Integer expiredSoonNum;
+}

+ 103 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/PermResDTO.java

@@ -0,0 +1,103 @@
+package cn.sino.mark.common.model.vo;
+
+
+import java.util.List;
+
+/**
+ * @author zhangamin
+ * @date 2020/11/23
+ */
+public class PermResDTO {
+
+    /**
+     * 权限id
+     */
+    private Long permId;
+
+    /**
+     * 权限名称
+     */
+    private String permName;
+
+    /**
+     * 权限代码
+     */
+    private String permCode;
+
+    /**
+     * 父节点ID
+     */
+    private Long parentId;
+
+    /**
+     * 是否是菜单(0:不是;1:是)
+     */
+    private int isMenu;
+
+    /**
+     * 是否默认拥有(0:否;1:是)
+     */
+    private Integer isDefault;
+
+    public Integer getIsDefault() {
+        return isDefault;
+    }
+
+    public void setIsDefault(Integer isDefault) {
+        this.isDefault = isDefault;
+    }
+
+    /**
+     * 子权限集合
+     */
+    private List<PermResDTO> children;
+
+    public int getIsMenu() {
+        return isMenu;
+    }
+
+    public void setIsMenu(int isMenu) {
+        this.isMenu = isMenu;
+    }
+
+    public List<PermResDTO> getChildren() {
+        return children;
+    }
+
+    public void setChildren(List<PermResDTO> children) {
+        this.children = children;
+    }
+
+    public Long getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(Long parentId) {
+        this.parentId = parentId;
+    }
+
+    public Long getPermId() {
+        return permId;
+    }
+
+    public void setPermId(Long permId) {
+        this.permId = permId;
+    }
+
+    public String getPermName() {
+        return permName;
+    }
+
+    public void setPermName(String permName) {
+        this.permName = permName;
+    }
+
+    public String getPermCode() {
+        return permCode;
+    }
+
+    public void setPermCode(String permCode) {
+        this.permCode = permCode;
+    }
+
+}

+ 27 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/ProjectBaseInfoVO.java

@@ -0,0 +1,27 @@
+package cn.sino.mark.common.model.vo;
+
+import io.swagger.annotations.*;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+ * @author sch
+ * @description
+ * @className
+ * @date 2022/4/8
+ */
+@Data
+@ApiModel
+public class ProjectBaseInfoVO {
+    /**
+     * 项目id
+     */
+    @ApiModelProperty("项目id")
+    private Long projectId;
+
+    /**
+     * 项目名称
+     */
+    @ApiModelProperty("项目名称")
+    private String projectName;
+}

+ 35 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/ProjectGroupTreeVO.java

@@ -0,0 +1,35 @@
+package cn.sino.mark.common.model.vo;
+
+import io.swagger.annotations.*;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author sch
+ * @description 项目组树结构
+ * @className cn.sino.mark.common.model.vo.ProjectGroupTreeVO
+ * @date 2022/4/3
+ */
+@ApiModel
+@Data
+public class ProjectGroupTreeVO {
+    /**
+     * 项目组id
+     */
+    @ApiModelProperty("项目组id")
+    private Long value;
+
+    /**
+     * 项目组名称
+     */
+    @ApiModelProperty("项目组名称")
+    private String label;
+
+    /**
+     * 子节点
+     */
+    @ApiModelProperty("子节点")
+    private List<ProjectGroupTreeVO> children;
+}

+ 66 - 0
sino-mark-server/src/main/java/cn/sino/mark/common/model/vo/ProjectPageItemVO.java

@@ -0,0 +1,66 @@
+package cn.sino.mark.common.model.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author zhangamin
+ * @description 项目分页查询列表
+ * @className cn.sino.mark.common.model.vo.ProjectPageItemVO
+ * @date 2022/3/27
+ */
+@Data
+@ApiModel
+public class ProjectPageItemVO {
+
+    /**
+     * 项目ID
+     */
+    @ApiModelProperty("项目ID")
+    private Long projectId;
+
+    /**
+     * 项目名称
+     */
+    @ApiModelProperty("项目名称")
+    private String name;
+
+    /**
+     * 所属任务组
+     */
+    @ApiModelProperty("所属任务组")
+    private String groupName;
+
+    /**
+     * 状态
+     */
+    @ApiModelProperty("状态")
+    private String statusText;
+    private Integer status;
+
+    /**
+     * 分配时间/推送时间
+     */
+    @ApiModelProperty("分配时间")
+    private String assignTimeStr;
+
+    /**
+     * 完成时间
+     */
+    @ApiModelProperty("完成时间")
+    private String completeTimeStr;
+
+    /**
+     * 有效期
+     */
+    @ApiModelProperty("有效期")
+    private String validTimeStr;
+
+    /**
+     * 存疑数量
+     */
+    @ApiModelProperty("存疑数量")
+    private Integer problemNum;
+
+}

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä