Full Code of moshuying/project-3-crm for AI

main ae731cc0378a cached
383 files
13.9 MB
247.0k tokens
814 symbols
1 requests
Download .txt
Showing preview only (1,013K chars total). Download the full file or copy to clipboard to get everything.
Repository: moshuying/project-3-crm
Branch: main
Commit: ae731cc0378a
Files: 383
Total size: 13.9 MB

Directory structure:
gitextract_6d5po4kp/

├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── dependabot.yml
│   └── workflows/
│       ├── blank.yml
│       └── codeql-analysis.yml
├── .gitignore
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── back/
│   ├── .gitignore
│   ├── LICENSE
│   ├── README-zh.md
│   ├── README.md
│   ├── pom.xml
│   ├── resetDB.sh
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── msy/
│       │   │           └── plus/
│       │   │               ├── Application.java
│       │   │               ├── aspect/
│       │   │               │   └── ControllerLogAspect.java
│       │   │               ├── controller/
│       │   │               │   ├── AccountController.java
│       │   │               │   ├── AnalysisController.java
│       │   │               │   ├── CustomerFollowUpHistoryController.java
│       │   │               │   ├── CustomerHandoverController.java
│       │   │               │   ├── CustomerManagerController.java
│       │   │               │   ├── DepartmentController.java
│       │   │               │   ├── DictionaryContentsController.java
│       │   │               │   ├── DictionaryDetailsController.java
│       │   │               │   ├── EmployeeController.java
│       │   │               │   ├── PermissionController.java
│       │   │               │   └── RoleController.java
│       │   │               ├── core/
│       │   │               │   ├── cache/
│       │   │               │   │   ├── CacheExpire.java
│       │   │               │   │   └── MyRedisCacheManager.java
│       │   │               │   ├── config/
│       │   │               │   │   ├── JasyptConfig.java
│       │   │               │   │   ├── RedisCacheConfig.java
│       │   │               │   │   ├── RedisConfig.java
│       │   │               │   │   ├── Swagger3Config.java
│       │   │               │   │   ├── ValidatorConfig.java
│       │   │               │   │   ├── WebMvcConfig.java
│       │   │               │   │   ├── WebSecurityConfig.java
│       │   │               │   │   └── YamlPropertySourceFactory.java
│       │   │               │   ├── constant/
│       │   │               │   │   └── ProjectConstant.java
│       │   │               │   ├── dto/
│       │   │               │   │   └── AbstractConverter.java
│       │   │               │   ├── exception/
│       │   │               │   │   ├── ExceptionResolver.java
│       │   │               │   │   ├── ResourcesNotFoundException.java
│       │   │               │   │   ├── RsaException.java
│       │   │               │   │   ├── ServiceException.java
│       │   │               │   │   ├── UsernameNotFoundException2.java
│       │   │               │   │   └── YamlNotFoundException.java
│       │   │               │   ├── jasypt/
│       │   │               │   │   └── MyEncryptablePropertyDetector.java
│       │   │               │   ├── jwt/
│       │   │               │   │   ├── JwtConfigurationProperties.java
│       │   │               │   │   └── JwtUtil.java
│       │   │               │   ├── mapper/
│       │   │               │   │   └── MyMapper.java
│       │   │               │   ├── response/
│       │   │               │   │   ├── Result.java
│       │   │               │   │   ├── ResultCode.java
│       │   │               │   │   └── ResultGenerator.java
│       │   │               │   ├── rsa/
│       │   │               │   │   ├── RsaConfigurationProperties.java
│       │   │               │   │   └── RsaUtils.java
│       │   │               │   ├── service/
│       │   │               │   │   ├── AbstractService.java
│       │   │               │   │   └── Service.java
│       │   │               │   └── upload/
│       │   │               │       └── UploadConfigurationProperties.java
│       │   │               ├── dto/
│       │   │               │   ├── AccountDTO.java
│       │   │               │   ├── AccountLoginDTO.java
│       │   │               │   ├── AnalysisQuery.java
│       │   │               │   ├── CustomerHandoverList.java
│       │   │               │   ├── CustomerManagerList.java
│       │   │               │   ├── LoginResultDTO.java
│       │   │               │   ├── RoleDTO.java
│       │   │               │   └── RoleWithPermissionDTO.java
│       │   │               ├── entity/
│       │   │               │   ├── AccountDO.java
│       │   │               │   ├── AccountWithRoleDO.java
│       │   │               │   ├── Analysis.java
│       │   │               │   ├── CFUHSearch.java
│       │   │               │   ├── CustomerFollowUpHistory.java
│       │   │               │   ├── CustomerHandover.java
│       │   │               │   ├── CustomerManager.java
│       │   │               │   ├── Department.java
│       │   │               │   ├── DictionaryContents.java
│       │   │               │   ├── DictionaryDetails.java
│       │   │               │   ├── Employee.java
│       │   │               │   ├── EmployeeDetail.java
│       │   │               │   ├── EmployeeWithRoleDO.java
│       │   │               │   ├── LoginResultDO.java
│       │   │               │   ├── Permission.java
│       │   │               │   ├── RoleDO.java
│       │   │               │   ├── RolePermissionDO.java
│       │   │               │   ├── RoleWithPermissionDO.java
│       │   │               │   └── Test.java
│       │   │               ├── filter/
│       │   │               │   ├── AuthenticationFilter.java
│       │   │               │   ├── CorsFilter.java
│       │   │               │   ├── MyAuthenticationEntryPoint.java
│       │   │               │   └── RequestWrapper.java
│       │   │               ├── mapper/
│       │   │               │   ├── AccountMapper.java
│       │   │               │   ├── CustomerFollowUpHistoryMapper.java
│       │   │               │   ├── CustomerHandoverMapper.java
│       │   │               │   ├── CustomerManagerMapper.java
│       │   │               │   ├── DepartmentMapper.java
│       │   │               │   ├── DictionaryContentsMapper.java
│       │   │               │   ├── DictionaryDetailsMapper.java
│       │   │               │   ├── EmployeeMapper.java
│       │   │               │   ├── PermissionMapper.java
│       │   │               │   └── RoleMapper.java
│       │   │               ├── query/
│       │   │               │   └── AccountQuery.java
│       │   │               ├── service/
│       │   │               │   ├── AccountService.java
│       │   │               │   ├── CustomerFollowUpHistoryService.java
│       │   │               │   ├── CustomerHandoverService.java
│       │   │               │   ├── CustomerManagerService.java
│       │   │               │   ├── DepartmentService.java
│       │   │               │   ├── DictionaryContentsService.java
│       │   │               │   ├── DictionaryDetailsService.java
│       │   │               │   ├── EmployeeService.java
│       │   │               │   ├── PermissionService.java
│       │   │               │   ├── RoleService.java
│       │   │               │   └── impl/
│       │   │               │       ├── AccountServiceImpl.java
│       │   │               │       ├── CustomerFollowUpHistoryServiceImpl.java
│       │   │               │       ├── CustomerHandoverServiceImpl.java
│       │   │               │       ├── CustomerManagerServiceImpl.java
│       │   │               │       ├── DepartmentServiceImpl.java
│       │   │               │       ├── DictionaryContentsServiceImpl.java
│       │   │               │       ├── DictionaryDetailsServiceImpl.java
│       │   │               │       ├── EmployeeServiceImpl.java
│       │   │               │       ├── PermissionServiceImpl.java
│       │   │               │       ├── RoleServiceImpl.java
│       │   │               │       └── UserDetailsServiceImpl.java
│       │   │               └── util/
│       │   │                   ├── AssertUtils.java
│       │   │                   ├── ContextUtils.java
│       │   │                   ├── DateUtils.java
│       │   │                   ├── FileUtils.java
│       │   │                   ├── IdCardUtils.java
│       │   │                   ├── IdUtils.java
│       │   │                   ├── IpUtils.java
│       │   │                   ├── JsonUtils.java
│       │   │                   ├── RedisUtils.java
│       │   │                   └── UrlUtils.java
│       │   └── resources/
│       │       ├── META-INF/
│       │       │   ├── spring-devtools.yml
│       │       │   └── swagger3.yml
│       │       ├── application-dev.yml
│       │       ├── application-test.yml
│       │       ├── application.yml
│       │       ├── banner.txt
│       │       ├── mapper/
│       │       │   ├── AccountMapper.xml
│       │       │   ├── CustomerFollowUpHistoryMapper.xml
│       │       │   ├── CustomerHandoverMapper.xml
│       │       │   ├── CustomerManagerMapper.xml
│       │       │   ├── DepartmentMapper.xml
│       │       │   ├── DictionaryContentsMapper.xml
│       │       │   ├── DictionaryDetailsMapper.xml
│       │       │   ├── EmployeeMapper.xml
│       │       │   ├── PermissionMapper.xml
│       │       │   └── RoleMapper.xml
│       │       └── rsa/
│       │           ├── private-key.pem
│       │           └── public-key.pem
│       └── test/
│           ├── java/
│           │   ├── CodeGenerator.java
│           │   ├── JasyptStringEncryptor.java
│           │   ├── PasswordEncryptor.java
│           │   ├── RsaEncryptor.java
│           │   └── com/
│           │       └── msy/
│           │           └── plus/
│           │               ├── AccountControllerTest.java
│           │               ├── BaseControllerTest.java
│           │               ├── WithCustomSecurityContextFactory.java
│           │               ├── WithCustomUser.java
│           │               └── util/
│           │                   └── JsonUtilsTest.java
│           ├── resources/
│           │   ├── generator/
│           │   │   └── template/
│           │   │       ├── controller-restful.ftl
│           │   │       ├── controller.ftl
│           │   │       ├── service-impl.ftl
│           │   │       └── service.ftl
│           │   └── sql/
│           │       └── dev/
│           │           ├── account.sql
│           │           ├── account_role.sql
│           │           └── role.sql
│           └── rest-test/
│               └── upload.http
├── docs/
│   ├── CRM需求模拟.docx
│   ├── JAVA实训方案-CRM(10天)-高级.docx
│   ├── crm商业计划书.pptx
│   ├── 员工信息模板.xlsx
│   └── 项目需求文档.docx
├── front/
│   ├── .github/
│   │   └── ISSUE_TEMPLATE/
│   │       ├── bug_report.md
│   │       └── feature_request.md
│   ├── .gitignore
│   ├── LICENSE
│   ├── README.en-US.md
│   ├── README.md
│   ├── babel.config.js
│   ├── docs/
│   │   ├── .vuepress/
│   │   │   ├── components/
│   │   │   │   ├── Alert.vue
│   │   │   │   ├── Color.vue
│   │   │   │   └── ColorList.vue
│   │   │   ├── config.js
│   │   │   ├── plugins/
│   │   │   │   └── alert/
│   │   │   │       ├── Alert.vue
│   │   │   │       ├── alertMixin.js
│   │   │   │       ├── clientRootMixin.js
│   │   │   │       ├── enhanceApp.js
│   │   │   │       └── index.js
│   │   │   └── styles/
│   │   │       ├── index.styl
│   │   │       └── palette.styl
│   │   ├── README.md
│   │   ├── advance/
│   │   │   ├── README.md
│   │   │   ├── api.md
│   │   │   ├── async.md
│   │   │   ├── authority.md
│   │   │   ├── chart.md
│   │   │   ├── error.md
│   │   │   ├── guard.md
│   │   │   ├── i18n.md
│   │   │   ├── interceptors.md
│   │   │   ├── login.md
│   │   │   ├── skill.md
│   │   │   └── theme.md
│   │   ├── develop/
│   │   │   ├── README.md
│   │   │   ├── layout.md
│   │   │   ├── mock.md
│   │   │   ├── page.md
│   │   │   ├── router.md
│   │   │   ├── service.md
│   │   │   └── theme.md
│   │   ├── other/
│   │   │   ├── README.md
│   │   │   ├── community.md
│   │   │   └── upgrade.md
│   │   └── start/
│   │       ├── README.md
│   │       ├── faq.md
│   │       └── use.md
│   ├── package.json
│   ├── public/
│   │   └── index.html
│   ├── src/
│   │   ├── App.vue
│   │   ├── bootstrap.js
│   │   ├── components/
│   │   │   ├── cache/
│   │   │   │   └── AKeepAlive.js
│   │   │   ├── card/
│   │   │   │   └── ChartCard.vue
│   │   │   ├── chart/
│   │   │   │   ├── Bar.vue
│   │   │   │   ├── MiniArea.vue
│   │   │   │   ├── MiniBar.vue
│   │   │   │   ├── MiniProgress.vue
│   │   │   │   ├── Radar.vue
│   │   │   │   ├── RankingList.vue
│   │   │   │   ├── Trend.vue
│   │   │   │   └── index.less
│   │   │   ├── checkbox/
│   │   │   │   ├── ColorCheckbox.vue
│   │   │   │   ├── ImgCheckbox.vue
│   │   │   │   └── index.js
│   │   │   ├── exception/
│   │   │   │   ├── ExceptionPage.vue
│   │   │   │   └── typeConfig.js
│   │   │   ├── form/
│   │   │   │   └── FormRow.vue
│   │   │   ├── input/
│   │   │   │   └── IInput.vue
│   │   │   ├── menu/
│   │   │   │   ├── Contextmenu.vue
│   │   │   │   ├── SideMenu.vue
│   │   │   │   ├── index.less
│   │   │   │   └── menu.js
│   │   │   ├── page/
│   │   │   │   └── header/
│   │   │   │       ├── PageHeader.vue
│   │   │   │       └── index.less
│   │   │   ├── result/
│   │   │   │   └── Result.vue
│   │   │   ├── setting/
│   │   │   │   ├── Setting.vue
│   │   │   │   ├── SettingItem.vue
│   │   │   │   └── i18n.js
│   │   │   ├── table/
│   │   │   │   ├── StandardTable.vue
│   │   │   │   ├── advance/
│   │   │   │   │   ├── ActionColumns.vue
│   │   │   │   │   ├── ActionSize.vue
│   │   │   │   │   ├── AdvanceTable.vue
│   │   │   │   │   ├── SearchArea.vue
│   │   │   │   │   └── index.js
│   │   │   │   └── api/
│   │   │   │       └── ApiTable.vue
│   │   │   ├── task/
│   │   │   │   ├── TaskGroup.vue
│   │   │   │   └── TaskItem.vue
│   │   │   ├── tool/
│   │   │   │   ├── AStepItem.vue
│   │   │   │   ├── AvatarList.vue
│   │   │   │   ├── DetailList.vue
│   │   │   │   ├── Drawer.vue
│   │   │   │   ├── FooterToolBar.vue
│   │   │   │   ├── HeadInfo.vue
│   │   │   │   ├── TagSelect.vue
│   │   │   │   └── TagSelectOption.vue
│   │   │   └── transition/
│   │   │       └── PageToggleTransition.vue
│   │   ├── config/
│   │   │   ├── config.js
│   │   │   ├── default/
│   │   │   │   ├── admin.config.js
│   │   │   │   ├── animate.config.js
│   │   │   │   ├── antd.config.js
│   │   │   │   ├── index.js
│   │   │   │   └── setting.config.js
│   │   │   ├── index.js
│   │   │   └── replacer/
│   │   │       ├── index.js
│   │   │       └── resolve.config.js
│   │   ├── layouts/
│   │   │   ├── AdminLayout.vue
│   │   │   ├── BlankView.vue
│   │   │   ├── CommonLayout.vue
│   │   │   ├── PageLayout.vue
│   │   │   ├── PageView.vue
│   │   │   ├── footer/
│   │   │   │   └── PageFooter.vue
│   │   │   ├── header/
│   │   │   │   ├── AdminHeader.vue
│   │   │   │   ├── HeaderAvatar.vue
│   │   │   │   ├── HeaderNotice.vue
│   │   │   │   ├── HeaderSearch.vue
│   │   │   │   └── index.less
│   │   │   └── tabs/
│   │   │       ├── TabsHead.vue
│   │   │       ├── TabsView.vue
│   │   │       ├── i18n.js
│   │   │       └── index.js
│   │   ├── main.js
│   │   ├── mock/
│   │   │   ├── common/
│   │   │   │   ├── activityData.js
│   │   │   │   ├── index.js
│   │   │   │   └── tableData.js
│   │   │   ├── goods/
│   │   │   │   └── index.js
│   │   │   ├── index.js
│   │   │   ├── user/
│   │   │   │   ├── login.js
│   │   │   │   └── routes.js
│   │   │   └── workplace/
│   │   │       └── index.js
│   │   ├── pages/
│   │   │   ├── analysis/
│   │   │   │   └── index.vue
│   │   │   ├── components/
│   │   │   │   ├── Palette.vue
│   │   │   │   ├── TaskCard.vue
│   │   │   │   └── table/
│   │   │   │       ├── Api.vue
│   │   │   │       ├── Table.vue
│   │   │   │       └── index.js
│   │   │   ├── customer/
│   │   │   │   ├── followHistory.vue
│   │   │   │   ├── handoverHistory.vue
│   │   │   │   ├── manager.vue
│   │   │   │   ├── official.vue
│   │   │   │   └── resource.vue
│   │   │   ├── dashboard/
│   │   │   │   └── workplace/
│   │   │   │       ├── WorkPlace.vue
│   │   │   │       ├── i18n.js
│   │   │   │       ├── index.js
│   │   │   │       └── index.less
│   │   │   ├── department/
│   │   │   │   └── index.vue
│   │   │   ├── dictionary/
│   │   │   │   ├── contents.vue
│   │   │   │   └── details.vue
│   │   │   ├── employee/
│   │   │   │   └── index.vue
│   │   │   ├── exception/
│   │   │   │   ├── 403.vue
│   │   │   │   ├── 404.vue
│   │   │   │   └── 500.vue
│   │   │   ├── login/
│   │   │   │   ├── Login.vue
│   │   │   │   └── index.js
│   │   │   ├── permission/
│   │   │   │   └── index.vue
│   │   │   ├── result/
│   │   │   │   ├── Error.vue
│   │   │   │   └── Success.vue
│   │   │   └── role/
│   │   │       └── index.vue
│   │   ├── plugins/
│   │   │   ├── authority-plugin.js
│   │   │   ├── i18n-extend.js
│   │   │   ├── index.js
│   │   │   └── tabs-page-plugin.js
│   │   ├── router/
│   │   │   ├── async/
│   │   │   │   ├── config.async.js
│   │   │   │   └── router.map.js
│   │   │   ├── config.js
│   │   │   ├── guards.js
│   │   │   ├── i18n.js
│   │   │   └── index.js
│   │   ├── services/
│   │   │   ├── analysis.js
│   │   │   ├── api.js
│   │   │   ├── customerFollowUpHistory.js
│   │   │   ├── customerHandover.js
│   │   │   ├── customerManager.js
│   │   │   ├── dataSource.js
│   │   │   ├── department.js
│   │   │   ├── dictionaryContents.js
│   │   │   ├── dictionaryDetails.js
│   │   │   ├── employee.js
│   │   │   ├── index.js
│   │   │   ├── permission.js
│   │   │   ├── role.js
│   │   │   └── user.js
│   │   ├── store/
│   │   │   ├── index.js
│   │   │   └── modules/
│   │   │       ├── account.js
│   │   │       ├── index.js
│   │   │       └── setting.js
│   │   ├── theme/
│   │   │   ├── antd/
│   │   │   │   ├── ant-menu.less
│   │   │   │   ├── ant-message.less
│   │   │   │   ├── ant-table.less
│   │   │   │   ├── ant-time-picker.less
│   │   │   │   └── index.less
│   │   │   ├── default/
│   │   │   │   ├── color.less
│   │   │   │   ├── index.less
│   │   │   │   ├── nprogress.less
│   │   │   │   └── style.less
│   │   │   ├── index.less
│   │   │   └── theme.less
│   │   └── utils/
│   │       ├── Objects.js
│   │       ├── authority-utils.js
│   │       ├── axios-interceptors.js
│   │       ├── colors.js
│   │       ├── formatter.js
│   │       ├── i18n.js
│   │       ├── request.js
│   │       ├── routerUtil.js
│   │       ├── theme-color-replacer-extend.js
│   │       ├── themeUtil.js
│   │       ├── util.js
│   │       └── validators.js
│   └── vue.config.js
└── mysql/
    ├── dev.sql
    └── prod.sql

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

github: moshuying # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
 - OS: [e.g. iOS]
 - Browser [e.g. chrome, safari]
 - Version [e.g. 22]

**Smartphone (please complete the following information):**
 - Device: [e.g. iPhone6]
 - OS: [e.g. iOS8.1]
 - Browser [e.g. stock browser, safari]
 - Version [e.g. 22]

**Additional context**
Add any other context about the problem here.


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.


================================================
FILE: .github/dependabot.yml
================================================

# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
  - package-ecosystem: "" # See documentation for possible values
    directory: "/" # Location of package manifests
    schedule:
      interval: "daily"


================================================
FILE: .github/workflows/blank.yml
================================================
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. 
on:
  # Triggers the workflow on push or pull request events but only for the main branch
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/checkout@v2

      # Runs a single command using the runners shell
      - name: Run a one-line script
        run: echo Hello, world!

      # Runs a set of commands using the runners shell
      - name: Run a multi-line script
        run: |
          echo Add other actions to build,
          echo test, and deploy your project.


================================================
FILE: .github/workflows/codeql-analysis.yml
================================================
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
  push:
    branches: [ main ]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [ main ]
  schedule:
    - cron: '45 1 * * 2'

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest
    permissions:
      actions: read
      contents: read
      security-events: write

    strategy:
      fail-fast: false
      matrix:
        language: [ 'java', 'javascript' ]
        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
        # Learn more:
        # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2

    # Initializes the CodeQL tools for scanning.
    - name: Initialize CodeQL
      uses: github/codeql-action/init@v1
      with:
        languages: ${{ matrix.language }}
        # If you wish to specify custom queries, you can do so here or in a config file.
        # By default, queries listed here will override any specified in a config file.
        # Prefix the list here with "+" to use these queries and those in the config file.
        # queries: ./path/to/local/query, your-org/your-repo/queries@main

    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
    # If this step fails, then you should remove it and run the build manually (see below)
    - name: Autobuild
      uses: github/codeql-action/autobuild@v1

    # ℹ️ Command-line programs to run using the OS shell.
    # 📚 https://git.io/JvXDl

    # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
    #    and modify them (or add more) to build your code if your project
    #    uses a compiled language

    #- run: |
    #   make bootstrap
    #   make release

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v1


================================================
FILE: .gitignore
================================================
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
idea


================================================
FILE: .travis.yml
================================================
language: node_js
node_js:
  - "14"
install: 
  - cd ./front
  - npm i
script:
  - npm run build
notifications:
  email:
    - 1460083332@qq.com
cache:
  directories:
    - node_modules #缓存依赖

#after_script前5句是把部署分支的.git文件夹保护起来,用于保留历史部署的commit日志,否则部署分支永远只有一条commit记录。
#命令里面的变量都是在Travis CI里配置过的。
# after_script:
#   - git clone https://${GH_REF} .temp
#   - cd .temp
#   - git checkout gh-pages
#   - cd ../
#   - mv .temp/.git dist
#   - cd dist
#   - git config user.name "${U_NAME}"
#   - git config user.email "${U_EMAIL}"
#   - git add .
#   - git commit -m ":construction_worker:- Build & Deploy by Travis CI"
#   - git push --force --quiet "https://${Travis_Token}@${GH_REF}" gh-pages:${D_BRANCH}
# E: Build LifeCycle
# 只有指定的分支提交时才会运行脚本
# branches:
#   only:
#     - master

================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
  and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
  overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
  advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
  address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior,  harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.


================================================
FILE: CONTRIBUTING.md
================================================
感谢贡献者们

墨抒颖 MoShuYing 刘九江 LiuJiuJiang

================================================
FILE: LICENSE
================================================
                    GNU AFFERO GENERAL PUBLIC LICENSE
                       Version 3, 19 November 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.

  A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate.  Many developers of free software are heartened and
encouraged by the resulting cooperation.  However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.

  The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community.  It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server.  Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.

  An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals.  This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU Affero General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Remote Network Interaction; Use with the GNU General Public License.

  Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software.  This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time.  Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <2021>  <刘九江>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published
    by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source.  For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code.  There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.


================================================
FILE: README.md
================================================
<center>

# project-3 CRM 客户资源管理系统

  
<img align="right" src='/front/src/assets/img/logo.png' />
  
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) [![Join the chat at https://gitter.im/墨抒颖/project-3-crm](https://badges.gitter.im/墨抒颖/project-3-crm.svg)](https://gitter.im/墨抒颖/project-3-crm?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
 
 ![GitHub language count](https://img.shields.io/github/languages/count/moshuying/project-3-crm) ![GitHub search hit counter](https://img.shields.io/github/search/moshuying/project-3-crm/1) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/moshuying/project-3-crm) ![GitHub repo size](https://img.shields.io/github/repo-size/moshuying/project-3-crm) 
  
  ![GitHub closed issues](https://img.shields.io/github/issues-closed/moshuying/project-3-crm) ![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/moshuying/project-3-crm) ![GitHub](https://img.shields.io/github/license/moshuying/project-3-crm)

### 国内用户请访问[同步仓库](https://gitee.com/moshuying/project-3-crm)


# 简述

[sql文件包含在/mysql文件夹内](https://github.com/moshuying/project-3-crm/blob/main/mysql)

<a href="https://www.msy.plus/discover/" target="_blank">
在线演示(向下翻页就有)
</a>
</center>


- 前端使用 [vue-antd-admin](https://github.com/iczer/vue-antd-admin) 
- [项目文档地址](https://iczer.gitee.io/vue-antd-admin-docs/advance/authority.html#%E9%A1%B5%E9%9D%A2%E6%9D%83%E9%99%90) 
- 后台使用 [spring-boot-api-seedling](https://github.com/Zoctan/spring-boot-api-seedling) 

<h1>把项目拷贝下来后,导入`mysql/dev.sql`到`crm`数据库</h1>

<h1>数据库配置的在`back/src/main/resources/application-dev.yml`下,默认账户密码都是`root`。使用`crm`数据库</h1>

![image](https://user-images.githubusercontent.com/37231523/157181254-38b38973-522e-4fdb-803f-3e374caca5f4.png)


系统包括:系统设置、客户管理、营销管理、服务管理、合同管理和统计分析六个功能模块。可满足管理人员日常对客户的资源维护、销售数据分析、潜在和有价值客户分析等需求。


甲方需求文档和演讲ppt位于/docs目录下。较为详细的描述了甲方的功能需求。
- [腾讯文档在线查看甲方需求](https://docs.qq.com/doc/DR0JVbFpmdXNEU1NM)
- [ppt商业计划书在线查看](https://docs.qq.com/slide/DR2dIaXB1b3hVZkdw)
- [商业计划书参考](https://max.book118.com/html/2017/0508/105355794.shtm)
- [sourceforge](https://sourceforge.net/projects/project-3-crm/)



系统经过github工作流,travis集成测试。尽可能多的测试了系统中的功能。

客户关系管理系统用于管理与客户相关的信息与活动,包括企业与顾客间在销售、营销和服务上的交互。从而提升其管理方式,向客户提供创新式的个性化的客户交互和服务。CRM不仅仅是一个软件,它还是方法论、软件和IT能力综合,是一种商业策略。其最终目标是吸引新客户、保留老客户以及将已有客户转为忠实客户。为企业一系列的客户关系管理解决方案。

# contributors
[![](https://opencollective.com/project-3-crm/contributors.svg?width=890)](https://github.com/moshuying/project-3-crm/graphs/contributors)

部分页面截图

![](/images/Snipaste_2021-05-24_17-26-55.png)
![](/images/Snipaste_2021-05-24_17-27-16.png)
![](/images/Snipaste_2021-05-24_17-27-48.png)
![](/images/Snipaste_2021-05-24_17-28-09.png)
![](/images/Snipaste_2021-05-24_17-28-20.png)
![](/images/Snipaste_2021-05-24_17-28-29.png)
![](/images/Snipaste_2021-05-24_17-28-40.png)
![](/images/Snipaste_2021-05-24_17-28-46.png)
![](/images/Snipaste_2021-05-24_17-28-54.png)
![](/images/Snipaste_2021-05-24_17-29-11.png)
![](/images/Snipaste_2021-05-24_17-29-16.png)
![](/images/Snipaste_2021-05-24_17-29-24.png)
![](/images/Snipaste_2021-05-24_17-29-29.png)
![](/images/Snipaste_2021-05-24_17-29-37.png)
![](/images/Snipaste_2021-05-24_17-29-48.png)
![](/images/Snipaste_2021-05-24_17-29-55.png)
![](/images/Snipaste_2021-05-24_17-30-06.png)
![](/images/Snipaste_2021-05-24_17-30-18.png)
![](/images/Snipaste_2021-05-24_17-30-39.png)
![](/images/Snipaste_2021-05-24_17-30-49.png)
![](/images/Snipaste_2021-05-24_17-30-56.png)
![](/images/Snipaste_2021-05-24_17-31-03.png)


================================================
FILE: SECURITY.md
================================================
# Security Policy

## Supported Versions

Use this section to tell people about which versions of your project are
currently being supported with security updates.

| Version | Supported          |
| ------- | ------------------ |
| 5.1.x   | :white_check_mark: |
| 5.0.x   | :x:                |
| 4.0.x   | :white_check_mark: |
| < 4.0   | :x:                |

## Reporting a Vulnerability

Use this section to tell people how to report a vulnerability.

Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.


================================================
FILE: back/.gitignore
================================================
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

.idea/

target/

*.iml

application-prod.yml

================================================
FILE: back/LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


================================================
FILE: back/README-zh.md
================================================
# Spring Boot API Seedling

![stars](https://img.shields.io/github/stars/Zoctan/spring-boot-api-seedling.svg?style=flat-square&label=Stars)
![license](https://img.shields.io/github/license/Zoctan/spring-boot-api-seedling.svg?style=flat-square)

[English](./README.md) | 简体中文

## 简介

本项目修改自:[spring-boot-api-project-seed](https://github.com/lihengming/spring-boot-api-project-seed)

原项目本身很简洁,已经能满足很多基本需求,在此感谢种子作者。

我根据需求继续添加了一些小功能,比如 API 的签名认证、调用文档、一些小工具等,所以就有了该 Seedling 项目。

添加的内容包括:
- Spring Cache:缓存
- Redis:缓存中间件
- Swagger3:API 文档展示
- Spring Security + JWT:对调用方签名认证
- Jasypt:加密配置
- 其他略

代码规范参考阿里巴巴 Java 开发手册,安装 Alibaba Java Coding Guidelines 插件。

风格规范使用 Google,安装 google-java-format 插件。

注解工具:Lombok,安装同名 Idea 插件。

## 版本

| 依赖         | 版本    |
|:-----------:|--------:|
| Java        | 1.8     |
| SpringBoot  | 2.3.5   |

## 快速开始

\# 克隆项目

git clone https://github.com/Zoctan/spring-boot-api-seedling.git

\# 配置代码生成器

对 test/java 包内的代码生成器 CodeGenerator 进行配置
导入 test/resources/sql 目录下的开发环境 dev 的数据库文件 *.sql

\# 根据表名生成代码

输入表名,运行 CodeGenerator.main() 方法,生成基础代码(观看[种子项目的快速演示视频](http://v.youku.com/v_show/id_XMjg1NjYwNDgxNg==.html?spm=a2h3j.8428770.3416059.1))

\# last

对开发环境配置文件 application-dev.properties 进行配置,启动项目,Have Fun Too:)

## 技术选型&文档

1. Spring Boot([种子项目作者的学习&使用指南](https://www.jianshu.com/p/1a9fd8936bd8) | [基础教程](http://blog.didispace.com/Spring-Boot%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B/))
2. MyBatis([官方中文文档](http://www.mybatis.org/mybatis-3/zh/index.html))
3. MyBatis通用Mapper插件([官方中文文档](https://mapperhelper.github.io/docs/))
4. MyBatis PageHelper分页插件([官方中文文档](https://pagehelper.github.io/))
5. Druid Spring Boot Starter([官方中文文档](https://github.com/alibaba/druid/tree/master/druid-spring-boot-starter/))
6. FastJson([官方中文文档](https://github.com/alibaba/fastjson/wiki/Quick-Start-CN) | [W3CSchool使用指南](https://www.w3cschool.cn/fastjson/fastjson-quickstart.html))

## 相关项目

- [前端 Vue + 后端 Spring Boot 完全分离的用户角色管理模板](https://github.com/Zoctan/spring-boot-vue-admin)

## 更新记录

2020-11-09 更新 Swagger2 至 Swagger3,更新其他依赖版本。

2019-08-13 更换 Tomcat 容器为 Jetty,修复 RSA 密钥文件无法读取问题,添加文件上传控制器,更新其他依赖版本。

2018-11-29 配置改为 yml ,完善单元测试,更新其他依赖版本。

2018-07-21 增加 Jasypt 自定义配置和配置密码加密,Tomcat 打包,修改 RSA 工具和添加相应配置。

2018-07-15 增加 DTO 层,避免 DO 层被污染。

2018-07-11 添加了可自定义缓存过期时间的注解,修改了数据表 user 为 account。


================================================
FILE: back/README.md
================================================
# Spring Boot API Seedling

![stars](https://img.shields.io/github/stars/Zoctan/spring-boot-api-seedling.svg?style=flat-square&label=Stars)
![license](https://img.shields.io/github/license/Zoctan/spring-boot-api-seedling.svg?style=flat-square)

English | [简体中文](./README-zh.md)

## Introduction

Modified from: [spring-boot-api-project-seed](https://github.com/lihengming/spring-boot-api-project-seed)

The original project is very well and has been able to meet many basic needs. Thanks the seed author!

Seedling project:
I continued to add some small functions according to my needs, such as API signature authentication, API documents, some tools, etc.

The added content includes:
- Spring Cache: To cache
- Redis: Cache middleware
- Swagger3:API Doc
- Spring Security + JWT:Sign the caller authentication
- Jasypt:Encryption configuration
- etc.

The code specification refers to the《Alibaba Java Development》 and install the Alibaba Java Coding Guidelines plugin.

The style specification refers to Google and install google-java-format plugin.

Annotation tool: Lombok, install the Idea plugin of the same name.

## Version

| Dependencies | Version |
|:------------:|--------:|
| Java         | 1.8     |
| SpringBoot   | 2.3.5   |

## Start

\# Clone project

git clone https://github.com/Zoctan/spring-boot-api-seedling.git

\# Configure code generator

configure package test/java/.../CodeGenerator, import directory test/resources/sql/dev/*.sql file

\# Generate code from database schema

input table name, run CodeGenerator.main() method to generate basic code (watch [demo video](http://v.youku.com/v_show/id_XMjg1NjYwNDgxNg==.html?spm=a2h3j.8428770.3416059.1))

\# Last

configure the development environment configuration file application-dev.properties and start the project.

Have Fun Too:)

## Related project

- [前端 Vue + 后端 Spring Boot 完全分离的用户角色管理模板](https://github.com/Zoctan/spring-boot-vue-admin)

## Update log

2020-11-09 Update Swagger2 to Swagger3, update other dependencies version.

2019-08-13 Modify Tomcat to Jetty, read RSA file error have been fixed, add file upload controller, update dependencies version.

2018-11-29 Modify setting file format to yml, improve unit testing, update dependencies version.

2018-07-21 Add Jasypt custom setting and password encryption, add Tomcat pack, modify RSA tool.

2018-07-15 Add DTO to prevent DO pollution.

2018-07-11 Add annotation for customizable cache expiration time, modify the data table user to account.


================================================
FILE: back/pom.xml
================================================
<?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>

    <groupId>com.github.zoctan</groupId>
    <artifactId>spring-boot-api-seeding</artifactId>
    <version>1.1</version>
    <!-- 打包类型 -->
    <packaging>war</packaging>

    <!-- Inherit defaults from Spring Boot -->
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.5.RELEASE</version>
    </parent>

    <properties>
        <!-- 打包配置 -->
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <!-- 依赖版本 -->
        <spring-security-test.version>5.3.5.RELEASE</spring-security-test.version>
        <swagger3.version>3.0.0</swagger3.version>
        <jjwt.version>0.9.1</jjwt.version>
        <jedis.version>3.3.0</jedis.version>
        <commons-beanutils.version>1.9.4</commons-beanutils.version>
        <commons-codec.version>1.15</commons-codec.version>
        <commons-lang3.version>3.11</commons-lang3.version>
        <guava.version>32.0.0-jre</guava.version>
        <mybatis.version>2.1.3</mybatis.version>
        <mybatis-generator.version>1.3.7</mybatis-generator.version>
        <mapper.version>4.1.5</mapper.version>
        <mapper-starter.version>2.1.5</mapper-starter.version>
        <pagehelper.version>1.3.0</pagehelper.version>
        <fastjson.version>1.2.83</fastjson.version>
        <druid.version>1.2.2</druid.version>
        <jasypt.version>3.0.3</jasypt.version>
        <freemarker.version>2.3.30</freemarker.version>
        <lombok.version>1.18.16</lombok.version>
        <hibernate.version>6.1.6.Final</hibernate.version>
    </properties>

    <dependencies>
        <!-- swagger3 -->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-boot-starter</artifactId>
            <version>${swagger3.version}</version>
        </dependency>
        <!-- spring security + json web token -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt</artifactId>
            <version>${jjwt.version}</version>
        </dependency>
        <!-- MySQL JDBC驱动 -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <!-- Spring Boot依赖 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jetty</artifactId>
        </dependency>
        <!-- MockMvc带Auth测试需要 -->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
            <version>${spring-security-test.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- 热部署 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <!-- optional=true,依赖不会传递,该项目依赖devtools,之后依赖该项目的子项目要使用devtools,需重新引入 -->
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-cache</artifactId>
        </dependency>

        <!-- redis -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>io.lettuce</groupId>
                    <artifactId>lettuce-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- https://github.com/xetorthio/jedis -->
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>${jedis.version}</version>
        </dependency>

        <!-- 常用库依赖 -->
        <!-- http://commons.apache.org/proper/commons-beanutils/javadocs/v1.9.4/apidocs/index.html -->
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>${commons-beanutils.version}</version>
        </dependency>
        <!-- https://commons.apache.org/proper/commons-codec/apidocs/index.html -->
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>${commons-codec.version}</version>
        </dependency>
        <!-- http://commons.apache.org/proper/commons-lang/apidocs/index.html -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${commons-lang3.version}</version>
        </dependency>
        <!-- https://guava.dev/releases/snapshot-jre/api/docs/ -->
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
        </dependency>

        <!-- FastJson -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>${fastjson.version}</version>
        </dependency>
        <!-- Druid 数据库连接池 -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
            <version>${druid.version}</version>
        </dependency>

        <!-- jasypt 用于加密配置文件 -->
        <dependency>
            <groupId>com.github.ulisesbocchio</groupId>
            <artifactId>jasypt-spring-boot-starter</artifactId>
            <version>${jasypt.version}</version>
        </dependency>

        <!-- PageHelper -->
        <dependency>
            <groupId>com.github.pagehelper</groupId>
            <artifactId>pagehelper-spring-boot-starter</artifactId>
            <version>${pagehelper.version}</version>
        </dependency>
        <!-- MyBatis及插件依赖 -->
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>${mybatis.version}</version>
        </dependency>
        <!-- mapper -->
        <dependency>
            <groupId>tk.mybatis</groupId>
            <artifactId>mapper</artifactId>
            <version>${mapper.version}</version>
        </dependency>
        <dependency>
            <groupId>tk.mybatis</groupId>
            <artifactId>mapper-spring-boot-starter</artifactId>
            <version>${mapper-starter.version}</version>
        </dependency>
        <!-- 代码生成器依赖 -->
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>${freemarker.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mybatis.generator</groupId>
            <artifactId>mybatis-generator-core</artifactId>
            <version>${mybatis-generator.version}</version>
        </dependency>

        <!-- https://projectlombok.org/ -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>${hibernate.version}</version>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <!-- 打包插件 -->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                        <configuration>
                            <mainClass>com.msy.plus.Application</mainClass>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${java.version}</source>
                    <!-- 指定JDK编译版本 -->
                    <target>${java.version}</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>aliyun-snapshots</id>
            <url>https://maven.aliyun.com/repository/snapshots</url>
        </repository>
        <repository>
            <id>aliyun-repo</id>
            <url>https://maven.aliyun.com/repository/central</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>aliyun-plugin</id>
            <url>https://maven.aliyun.com/repository/central</url>
        </pluginRepository>
    </pluginRepositories>

</project>

================================================
FILE: back/resetDB.sh
================================================
#!/bin/bash

db="seedling_dev"

while IFS= read -r -d '' sql; do
  echo "$sql"" -> "$db
  mysql -uroot -proot $db <"$sql"
done < <(find src/test/resources/sql/dev/ -name '*.sql' -print0)
echo "finished"
echo "import $db done"


================================================
FILE: back/src/main/java/com/msy/plus/Application.java
================================================
package com.msy.plus;

import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import tk.mybatis.spring.annotation.MapperScan;

import static com.msy.plus.core.constant.ProjectConstant.FILTER_PACKAGE;
import static com.msy.plus.core.constant.ProjectConstant.MAPPER_PACKAGE;

/**
 * 主程序
 *
 * @author MoShuying
 * @date 2018/05/27
 */
@EnableCaching
@SpringBootApplication
@EnableEncryptableProperties
@EnableTransactionManagement
@MapperScan(basePackages = MAPPER_PACKAGE)
@ServletComponentScan(basePackages = FILTER_PACKAGE)
public class Application extends SpringBootServletInitializer {

  public static void main(final String[] args) {
    SpringApplication.run(Application.class, args);
  }

  /** 容器启动配置 */
  @Override
  protected SpringApplicationBuilder configure(final SpringApplicationBuilder builder) {
    return builder.sources(Application.class);
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/aspect/ControllerLogAspect.java
================================================
package com.msy.plus.aspect;

import com.msy.plus.util.IpUtils;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.*;
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.time.temporal.ChronoUnit;
import java.util.Arrays;
import java.util.Optional;

import static com.msy.plus.core.constant.ProjectConstant.CONTROLLER_PACKAGE;

/**
 * Controller log aspect
 *
 * @author MoShuying
 * @date 2018/07/13
 */
@Aspect
@Slf4j
@Component
public class ControllerLogAspect {
  private LocalDateTime startTime;

  @Pointcut("execution(* " + CONTROLLER_PACKAGE + "..*.*(..))")
  public void controllers() {}

  /**
   * before controller handling, log something
   *
   * @param joinPoint controller join point
   */
  @Before("controllers()")
  public void doBefore(final JoinPoint joinPoint) {
    log.debug("===========================================================");
    log.debug("================  Controller Log Start  ===================");
    log.debug("===========================================================");
    this.startTime = LocalDateTime.now();
    final ServletRequestAttributes attributes =
        (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
    if (Optional.ofNullable(attributes).isPresent()) {
      final HttpServletRequest request = attributes.getRequest();
      log.debug("==> Request: [{}]{}", request.getMethod(), request.getRequestURL());
      log.debug("==> From IP: {}", IpUtils.getIpAddress());
    }
    log.debug(
        "==>  Method: {}",
        joinPoint.getSignature().getDeclaringTypeName() + "#" + joinPoint.getSignature().getName());
    log.debug("==>    Args: {}", Arrays.toString(joinPoint.getArgs()));
  }

  /**
   * after controller handling, return result
   *
   * @param result origin result
   */
  @AfterReturning(pointcut = "controllers()", returning = "result")
  public void doAfterReturning(final Object result) {
    // 处理请求的时间差
    final long difference = ChronoUnit.MILLIS.between(this.startTime, LocalDateTime.now());
    log.debug("==>   Spend: {}s", difference / 1000.0);
    log.debug("==>  Return: {}", result);
    log.debug("================  Controller Log End  =====================");
  }

  /**
   * log when throwing error
   *
   * @param e error
   */
  @AfterThrowing(pointcut = "controllers()", throwing = "e")
  public static void doAfterThrowing(final Throwable e) {
    log.debug("==> Exception: {}", e.toString());
    e.printStackTrace();
    log.debug("================  Controller Log End  =====================");
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/controller/AccountController.java
================================================
package com.msy.plus.controller;

import com.msy.plus.core.jwt.JwtUtil;
import com.msy.plus.core.response.Result;
import com.msy.plus.core.response.ResultGenerator;
import com.msy.plus.dto.AccountDTO;
import com.msy.plus.dto.AccountLoginDTO;
import com.msy.plus.dto.LoginResultDTO;
import com.msy.plus.service.AccountService;
import com.msy.plus.service.impl.UserDetailsServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.*;

/**
 * @author MoShuying
 * @date 2018/07/15
 */
@Slf4j
@Api(tags={"账户操作接口(登录)"})
@Validated
@RestController
@RequestMapping("/account")
public class AccountController {
  @Resource private AccountService accountService;
  @Resource private UserDetailsServiceImpl userDetailsService;
  @Resource private JwtUtil jwtUtil;

  @Operation(summary = "账户注册", description = "注册账户,签发token")
  @ApiResponses({
    @ApiResponse(responseCode = "200", description = "OK"),
    @ApiResponse(responseCode = "2004", description = "账户名重复")
  })
  @PostMapping
  public Result register(
      @Parameter(required = true) @RequestBody @Valid final AccountDTO accountDTO,
      final BindingResult bindingResult) {
    // 账户持久化
    this.accountService.save(accountDTO);
    // 签发 token
    final UserDetails userDetails =
        this.userDetailsService.loadUserByUsername(accountDTO.getName());
    final String token = this.jwtUtil.sign(
            accountDTO.getName(),
            userDetails.getAuthorities(),
            accountService.getByNameWithRole(userDetails.getUsername()).getId());
    return ResultGenerator.genOkResult(token);
  }

  @Operation(summary = "账户登录", description = "账户登录,签发token")
  @ApiResponses({
    @ApiResponse(responseCode = "200", description = "OK"),
    @ApiResponse(responseCode = "1000", description = "密码错误")
  })
  @PostMapping("/token")
  public Result login(
      @Parameter(required = true) @RequestBody @Valid final AccountLoginDTO accountLoginDTO,
      final BindingResult bindingResult) {
    // {"name":"admin","password":"admin"}
    final String name = accountLoginDTO.getName();
    final String password = accountLoginDTO.getPassword();
    // 验证账户
    final UserDetails userDetails = this.userDetailsService.loadUserByUsername(name);
    if (!this.accountService.verifyPassword(password, userDetails.getPassword())) {
      return ResultGenerator.genFailedResult("密码错误");
    }
    // 更新登录时间
    this.accountService.updateLoginTimeByName(name);
    final String token = this.jwtUtil.sign(name, userDetails.getAuthorities(),accountService.getByNameWithRole(name).getId());
    // 返回Ant Design Admin提供的登录返回格式
    LoginResultDTO loginResultDTO = new LoginResultDTO();

    // 设置过期时间,和application-*.yml文件中的过期时间设定一致
    final long expireTime = this.jwtUtil.getJwtProperties().getExpireTime().toMillis();
    loginResultDTO.setExpireAt(new Date(new Date().getTime()+expireTime));
    loginResultDTO.setToken(token);
    loginResultDTO.setUserName(name);
    Map<String,Object> roles = new HashMap<String,Object>();
    roles.put("id",name);
    roles.put("operation",new String[]{"add","edit","delete"});

    loginResultDTO.getRoles().add(roles);
    loginResultDTO.setMessage("欢迎回来 "+name);
    return ResultGenerator.genOkResult(loginResultDTO);
  }

  @Operation(summary = "账户注销", description = "账户注销,使token失效")
  @ApiResponses({@ApiResponse(responseCode = "200", description = "OK")})
  @DeleteMapping("/token")
  public Result logout(@RequestHeader Map<String, String> headers) {
    String header = jwtUtil.getJwtProperties().getHeader();
    jwtUtil.invalidRedisToken(jwtUtil.getName(headers.get(header)).get());
    return ResultGenerator.genOkResult();
  }

  @PreAuthorize("#accountDTO.name == authentication.name or hasAuthority('ADMIN')")
  @Operation(summary = "更新账户", description = "更新账户信息")
  @ApiResponses({@ApiResponse(responseCode = "200", description = "OK")})
  @PatchMapping
  public Result update(@Parameter(required = true) @RequestBody final AccountDTO accountDTO) {
    this.accountService.updateByName(accountDTO);
    return ResultGenerator.genOkResult();
  }

  @PreAuthorize("hasAuthority('ADMIN')" +
          "or hasAuthority('主席')"+
          "or hasAuthority('高级主席')"+
          "or hasAuthority('副主席')"+
          "or hasAuthority('总裁')")
  @Operation(summary = "删除账户", description = "删除账户信息")
  @ApiResponses({@ApiResponse(responseCode = "200", description = "OK")})
  @Parameter(
      name = "id",
      description = "账户Id",
      required = true,
      in = ParameterIn.QUERY,
      example = "1")
  @DeleteMapping("/{id}")
  public Result delete(@PathVariable final Long id) {
    this.accountService.deleteById(id);
    return ResultGenerator.genOkResult();
  }
//
//  @Operation(summary = "获取单个账户", description = "获取单个账户信息")
//  @ApiResponses({@ApiResponse(responseCode = "200", description = "OK")})
//  @Parameter(
//      name = "id",
//      description = "账户Id",
//      required = true,
//      in = ParameterIn.PATH,
//      example = "1")
//  @GetMapping("/{id}")
//  public Result detail(@PathVariable final Long id) {
//    final AccountWithRoleDO account = this.accountService.getByIdWithRole(id);
//    return ResultGenerator.genOkResult(account);
//  }
//
//  @Operation(summary = "获取账户列表", description = "获取多个账户信息")
//  @ApiResponses({@ApiResponse(responseCode = "200", description = "OK")})
//  @Parameters({
//    @Parameter(name = "page", description = "页号", in = ParameterIn.QUERY, example = "1"),
//    @Parameter(name = "size", description = "页大小", in = ParameterIn.QUERY, example = "10")
//  })
//  @Cacheable(value = "account.list", unless = "#result == null or #result.code != 200")
//  @CacheExpire(expire = 60)
//  @GetMapping
//  public Result list(
//      @RequestParam(defaultValue = "0") final Integer page,
//      @RequestParam(defaultValue = "0") final Integer size) {
//    AccountController.log.debug("==> No cache, find database");
//    PageHelper.startPage(page, size);
//    final List<AccountDO> list = this.accountService.listAll();
//    final PageInfo<AccountDO> pageInfo = PageInfo.of(list);
//    // 不显示 password 字段
//    final PageInfo<JSONObject> objectPageInfo = JsonUtils.deleteFields(pageInfo, PageInfo.class, "password");
//    return ResultGenerator.genOkResult(objectPageInfo);
//  }
}


================================================
FILE: back/src/main/java/com/msy/plus/controller/AnalysisController.java
================================================
package com.msy.plus.controller;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.msy.plus.core.jwt.JwtUtil;
import com.msy.plus.core.response.Result;
import com.msy.plus.core.response.ResultGenerator;
import com.msy.plus.dto.AnalysisQuery;
import com.msy.plus.entity.*;
import com.msy.plus.service.CustomerManagerService;
import com.msy.plus.service.EmployeeService;
import com.msy.plus.service.RoleService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.annotations.Api;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author MoShuYing
 * @date 2021/05/15
 */
@PreAuthorize(
        "hasAuthority('ADMIN')"+
                "or hasAuthority('董事长')"+
                "or hasAuthority('主席')"+
                "or hasAuthority('高级主席')"+
                "or hasAuthority('副主席')"+
                "or hasAuthority('总裁')"+
                "or hasAuthority('会长')"+
                "or hasAuthority('高级总裁')"+
                "or hasAuthority('高级副总裁')"+
                "or hasAuthority('副总裁')"+
                "or hasAuthority('总经理')"+
                "or hasAuthority('副总经理')"+
                "or hasAuthority('总监')"+
                "or hasAuthority('经理')"+
                "or hasAuthority('高级经理')"+
                "or hasAuthority('副经理')"+
                "or hasAuthority('主任')"+
                "or hasAuthority('高级主任')"+
                "or hasAuthority('副主任')"+
                "or hasAuthority('组长')"+
                "or hasAuthority('副组长')"+
                "or hasAuthority('普通员工')"+
                "or hasAuthority('人事专员')"+
                "or hasAuthority('市场专员')"+
                "or hasAuthority('市场主管')"+
                "or hasAuthority('销售主管')"
)
@Api(tags={"统计分析接口"})
@RestController
@RequestMapping("/analysis")
public class AnalysisController {
    @Resource CustomerManagerService customerManagerService;
    @Resource EmployeeService employeeService;
    @Resource RoleService roleService;
    @Resource private JwtUtil jwtUtil;
    @Operation(description = "统计分析")
    @PostMapping
    public Result listAndSearch(@RequestBody AnalysisQuery analysisQuery,@RequestHeader Map<String, String> headers) {
        String header = jwtUtil.getJwtProperties().getHeader();
        String id= jwtUtil.getId(headers.get(header)).get();
        List<Long> roleIds = employeeService.getDetailById(Integer.valueOf(id).longValue()).getRoleIds();
        for(Long roleId:roleIds){
            RoleWithPermissionDO  roleWithPermissionDO =  roleService.getDetailById(roleId);
            if(roleWithPermissionDO==null) {
                continue;
            }
            String roleName = roleWithPermissionDO.getName();
            if(roleName==null || roleName.isEmpty()){
                continue;
            }
            if(roleName.equals("董事长")){
                PageHelper.startPage(analysisQuery.getPage(),analysisQuery.getSize());
                PageInfo<Analysis> pageInfo = PageInfo.of(customerManagerService.queryAnalysis(analysisQuery));
                return ResultGenerator.genOkResult(pageInfo);
            }
        }
        // 除了董事长 其他人都只能查看自己的
        analysisQuery.setName(jwtUtil.getName(headers.get(header)).get());
        PageHelper.startPage(analysisQuery.getPage(),analysisQuery.getSize());
        PageInfo<Analysis> pageInfo = PageInfo.of(customerManagerService.queryAnalysis(analysisQuery));
        return ResultGenerator.genOkResult(pageInfo);
    }

}


================================================
FILE: back/src/main/java/com/msy/plus/controller/CustomerFollowUpHistoryController.java
================================================
package com.msy.plus.controller;

import com.msy.plus.core.jwt.JwtUtil;
import com.msy.plus.core.response.Result;
import com.msy.plus.core.response.ResultGenerator;
import com.msy.plus.entity.CFUHSearch;
import com.msy.plus.entity.CustomerFollowUpHistory;
import com.msy.plus.service.CustomerFollowUpHistoryService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.security.access.prepost.PreAuthorize;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author MoShuYing
* @date 2021/05/21
*/
@PreAuthorize("hasAuthority('ADMIN')")
@Api(tags={"客户跟进记录接口"})
@RestController
@RequestMapping("/customer/follow/up/history")
public class CustomerFollowUpHistoryController {
    @Resource private CustomerFollowUpHistoryService customerFollowUpHistoryService;
    @Resource private JwtUtil jwtUtil;
    @Operation(description = "客户跟进记录添加")
    @PostMapping
    public Result add(@RequestBody CustomerFollowUpHistory customerFollowUpHistory,@RequestHeader Map<String, String> headers) {
        if(customerFollowUpHistory.getId()!=null){
            customerFollowUpHistory.setId(null);
        }
        String header = jwtUtil.getJwtProperties().getHeader();
        String id= jwtUtil.getId(headers.get(header)).get();
        customerFollowUpHistory.setInputuser(Integer.valueOf(id));
        customerFollowUpHistoryService.save(customerFollowUpHistory);
        return ResultGenerator.genOkResult();
    }

//    @Operation(description = "客户跟进记录删除")
//    @DeleteMapping("/{id}")
//    public Result delete(@PathVariable Long id) {
//    customerFollowUpHistoryService.deleteById(id);
//        return ResultGenerator.genOkResult();
//    }

    @Operation(description = "客户跟进记录更新")
    @PutMapping
    public Result update(@RequestBody CustomerFollowUpHistory customerFollowUpHistory) {
    customerFollowUpHistoryService.update(customerFollowUpHistory);
        return ResultGenerator.genOkResult();
    }

    @Operation(description = "客户跟进记录获取详细信息")
    @GetMapping("/{id}")
    public Result detail(@PathVariable Long id) {
    CustomerFollowUpHistory customerFollowUpHistory = customerFollowUpHistoryService.getById(id);
        return ResultGenerator.genOkResult(customerFollowUpHistory);
    }

    @Operation(description = "客户跟进记录分页查询")
    @GetMapping
    @ApiOperation(value="分页查询客户跟进记录", notes="分页查询 ")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "page", value = "第几页", required = true, dataType = "Integer", paramType="query"),
        @ApiImplicitParam(name = "size", value = "一页有几条", required = true, dataType = "Integer", paramType="query")
    })
    public Result list(
            @RequestParam(defaultValue = "1") Integer page,
            @RequestParam(defaultValue = "10") Integer size,
            @RequestParam(defaultValue = "") String keyword,
            @RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) Date startTime,
            @RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) Date endTime,
            @RequestParam(required = false) Integer type) {
        PageHelper.startPage(page, size);
        List<CFUHSearch> list = customerFollowUpHistoryService.listAndSearch(keyword,startTime,endTime,type);
        PageInfo<CFUHSearch> pageInfo = PageInfo.of(list);
        return ResultGenerator.genOkResult(pageInfo);
    }
}


================================================
FILE: back/src/main/java/com/msy/plus/controller/CustomerHandoverController.java
================================================
package com.msy.plus.controller;

import com.msy.plus.core.jwt.JwtUtil;
import com.msy.plus.core.response.Result;
import com.msy.plus.core.response.ResultGenerator;
import com.msy.plus.dto.CustomerHandoverList;
import com.msy.plus.entity.CustomerHandover;
import com.msy.plus.service.CustomerHandoverService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.security.access.prepost.PreAuthorize;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author MoShuYing
* @date 2021/05/21
*/
@PreAuthorize(
        "hasAuthority('ADMIN')"+
        "or hasAuthority('董事长')"+
        "or hasAuthority('主席')"+
        "or hasAuthority('高级主席')"+
        "or hasAuthority('副主席')"+
        "or hasAuthority('总裁')"+
        "or hasAuthority('会长')"+
        "or hasAuthority('高级总裁')"+
        "or hasAuthority('高级副总裁')"+
        "or hasAuthority('副总裁')"+
        "or hasAuthority('总经理')"+
        "or hasAuthority('副总经理')"+
        "or hasAuthority('总监')"+
        "or hasAuthority('经理')"+
        "or hasAuthority('高级经理')"+
        "or hasAuthority('副经理')"+
        "or hasAuthority('主任')"+
        "or hasAuthority('高级主任')"+
        "or hasAuthority('副主任')"+
        "or hasAuthority('组长')"+
        "or hasAuthority('副组长')"+
        "or hasAuthority('普通员工')"+
        "or hasAuthority('人事专员')"+
        "or hasAuthority('市场专员')"+
        "or hasAuthority('市场主管')"+
        "or hasAuthority('销售主管')"
)
@Api(tags={"移交历史接口"})
@RestController
@RequestMapping("/customer/handover")
public class CustomerHandoverController {
    @Resource private CustomerHandoverService customerHandoverService;
    @Resource private JwtUtil jwtUtil;

    @Operation(description = "移交历史添加")
    @PostMapping
    public Result add(@RequestBody CustomerHandover customerHandover,@RequestHeader Map<String, String> headers) {
        if(customerHandover.getId()!=null){
            customerHandover.setId(null);
        }
        String header = jwtUtil.getJwtProperties().getHeader();
        String id= jwtUtil.getId(headers.get(header)).get();
        customerHandover.setTransuser(Integer.valueOf(id));
        customerHandoverService.save(customerHandover);
        return ResultGenerator.genOkResult();
    }

//    @Operation(description = "移交历史删除")
//    @DeleteMapping("/{id}")
//    public Result delete(@PathVariable Long id) {
//    customerHandoverService.deleteById(id);
//        return ResultGenerator.genOkResult();
//    }
//
//    @Operation(description = "移交历史更新")
//    @PutMapping
//    public Result update(@RequestBody CustomerHandover customerHandover) {
//    customerHandoverService.update(customerHandover);
//        return ResultGenerator.genOkResult();
//    }
//
//    @Operation(description = "移交历史获取详细信息")
//    @GetMapping("/{id}")
//    public Result detail(@PathVariable Long id) {
//    CustomerHandover customerHandover = customerHandoverService.getById(id);
//        return ResultGenerator.genOkResult(customerHandover);
//    }

    @Operation(description = "移交历史分页查询")
    @GetMapping
    @ApiOperation(value="分页查询移交历史", notes="分页查询 ")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "page", value = "第几页", required = true, dataType = "Integer", paramType="query"),
        @ApiImplicitParam(name = "size", value = "一页有几条", required = true, dataType = "Integer", paramType="query")
    })
    public Result list(@RequestParam(defaultValue = "1") Integer page,
    @RequestParam(defaultValue = "10") Integer size,
                       @RequestParam(defaultValue = "") String keyword,
                       @RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) Date startTime,
                       @RequestParam(required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) Date endTime) {
        PageHelper.startPage(page, size);
        List<CustomerHandoverList> list = customerHandoverService.listAndSearch(keyword,startTime,endTime);
        PageInfo<CustomerHandoverList> pageInfo = PageInfo.of(list);
        return ResultGenerator.genOkResult(pageInfo);
    }
}


================================================
FILE: back/src/main/java/com/msy/plus/controller/CustomerManagerController.java
================================================
package com.msy.plus.controller;

import com.msy.plus.core.jwt.JwtUtil;
import com.msy.plus.core.response.Result;
import com.msy.plus.core.response.ResultGenerator;
import com.msy.plus.dto.CustomerManagerList;
import com.msy.plus.entity.CustomerManager;
import com.msy.plus.service.CustomerManagerService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
* @author MoShuYing
* @date 2021/05/20
*/
@PreAuthorize(
        "hasAuthority('ADMIN')"+
                "or hasAuthority('董事长')"+
                "or hasAuthority('主席')"+
                "or hasAuthority('高级主席')"+
                "or hasAuthority('副主席')"+
                "or hasAuthority('总裁')"+
                "or hasAuthority('会长')"+
                "or hasAuthority('高级总裁')"+
                "or hasAuthority('高级副总裁')"+
                "or hasAuthority('副总裁')"+
                "or hasAuthority('总经理')"+
                "or hasAuthority('副总经理')"+
                "or hasAuthority('总监')"+
                "or hasAuthority('经理')"+
                "or hasAuthority('高级经理')"+
                "or hasAuthority('副经理')"+
                "or hasAuthority('主任')"+
                "or hasAuthority('高级主任')"+
                "or hasAuthority('副主任')"+
                "or hasAuthority('组长')"+
                "or hasAuthority('副组长')"+
                "or hasAuthority('普通员工')"+
                "or hasAuthority('人事专员')"+
                "or hasAuthority('市场专员')"+
                "or hasAuthority('市场主管')"+
                "or hasAuthority('销售主管')"
)
@Api(tags={"客户管理接口"})
@RestController
@RequestMapping("/customer/manager")
public class CustomerManagerController {
    @Resource private CustomerManagerService customerManagerService;
    @Resource private JwtUtil jwtUtil;

    @Operation(description = "客户管理添加")
    @PostMapping
    public Result add(@RequestBody CustomerManager customerManager,@RequestHeader Map<String, String> headers) {
        if(customerManager.getId()!=null){
            customerManager.setId(null);
        }
        String header = jwtUtil.getJwtProperties().getHeader();
        String id= jwtUtil.getId(headers.get(header)).get();
        customerManager.setInputuser(Integer.valueOf(id));
        customerManager.setSeller(Integer.valueOf(id));
        customerManagerService.save(customerManager);
        return ResultGenerator.genOkResult();
    }

//    @Operation(description = "客户管理删除")
//    @DeleteMapping("/{id}")
//    public Result delete(@PathVariable Long id) {
//    customerManagerService.deleteById(id);
//        return ResultGenerator.genOkResult();
//    }

    @Operation(description = "客户管理更新")
    @PutMapping
    public Result update(@RequestBody CustomerManager customerManager) {
    customerManagerService.update(customerManager);
        return ResultGenerator.genOkResult();
    }

    @Operation(description = "客户管理获取详细信息")
    @GetMapping("/{id}")
    public Result detail(@PathVariable Long id) {
    CustomerManager customerManager = customerManagerService.getById(id);
        return ResultGenerator.genOkResult(customerManager);
    }

    @Operation(description = "客户管理分页查询")
    @GetMapping
    @ApiOperation(value="分页查询客户管理", notes="分页查询 ")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "page", value = "第几页", required = true, dataType = "Integer", paramType="query"),
        @ApiImplicitParam(name = "size", value = "一页有几条", required = true, dataType = "Integer", paramType="query")
    })
    public Result list(@RequestParam(defaultValue = "1") Integer page,
       @RequestParam(defaultValue = "10") Integer size,
       @RequestParam(defaultValue = "",required = false) String keyword,
       @RequestParam(required = false) Integer status) {
        PageHelper.startPage(page, size);
        List<CustomerManagerList> list = customerManagerService.listAllWithDictionary(keyword,status);
        PageInfo<CustomerManagerList> pageInfo = PageInfo.of(list);
        return ResultGenerator.genOkResult(pageInfo);
    }
}


================================================
FILE: back/src/main/java/com/msy/plus/controller/DepartmentController.java
================================================
package com.msy.plus.controller;

import com.msy.plus.core.response.Result;
import com.msy.plus.core.response.ResultGenerator;
import com.msy.plus.entity.Department;
import com.msy.plus.service.DepartmentService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author MoShuYing
 * @date 2021/05/12
 */
@PreAuthorize(
        "hasAuthority('ADMIN') " +
                "or hasAuthority('董事长') " +
                "or hasAuthority('主席') " +
                "or hasAuthority('高级主席') " +
                "or hasAuthority('副主席') " +
                "or hasAuthority('总裁') " +
                "or hasAuthority('会长') " +
                "or hasAuthority('高级总裁') " +
                "or hasAuthority('高级副总裁')")
@Api(tags={"部门接口"})
@RestController
@RequestMapping("/department")
public class DepartmentController {
    @Resource
    private DepartmentService departmentService;

    @Operation(description = "部门添加")
    @PostMapping
    public Result add(@RequestBody Department department) {
        departmentService.save(department);
        return ResultGenerator.genOkResult();
    }

    @Operation(description = "部门删除")
    @DeleteMapping("/{id}")
    public Result delete(@PathVariable Long id) {
        departmentService.deleteById(id);
        return ResultGenerator.genOkResult();
    }

    @Operation(description = "部门更新")
    @PatchMapping
    public Result update(@RequestBody Department department) {
        departmentService.update(department);
        return ResultGenerator.genOkResult();
    }

    @Operation(description = "获取部门详细信息")
    @GetMapping("/{id}")
    public Result detail(@PathVariable Long id) {
        Department department = departmentService.getById(id);
        return ResultGenerator.genOkResult(department);
    }

    @Operation(description = "分页查询部门")
    @GetMapping
    @ApiOperation(value="分页查询部门", notes="分页查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "page", value = "第几页", required = true, dataType = "Integer", paramType="query"),
            @ApiImplicitParam(name = "size", value = "一页有几条", required = true, dataType = "Integer", paramType="query")
    })
    public Result list(@RequestParam(defaultValue = "1") Integer page,
                       @RequestParam(defaultValue = "10") Integer size) {
        PageHelper.startPage(page, size);
        List<Department> list = departmentService.listAll();
        PageInfo<Department> pageInfo = PageInfo.of(list);
        return ResultGenerator.genOkResult(pageInfo);
    }
}


================================================
FILE: back/src/main/java/com/msy/plus/controller/DictionaryContentsController.java
================================================
package com.msy.plus.controller;

import com.msy.plus.core.response.Result;
import com.msy.plus.core.response.ResultGenerator;
import com.msy.plus.entity.DictionaryContents;
import com.msy.plus.service.DictionaryContentsService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;


/**
* @author MoShuYing
* @date 2021/05/18
*/
@PreAuthorize("hasAuthority('ADMIN')")
@Api(tags={"数据字典接口"})
@RestController
@RequestMapping("/dictionary/contents")
public class DictionaryContentsController {
    @Resource
    private DictionaryContentsService dictionaryContentsService;

    @Operation(description = "数据字典添加")
    @PostMapping
    public Result add(@RequestBody DictionaryContents dictionaryContents) {
        dictionaryContentsService.save(dictionaryContents);
        return ResultGenerator.genOkResult();
    }

//    @Operation(description = "数据字典删除")
//    @DeleteMapping("/{id}")
//    public Result delete(@PathVariable Long id) {
//    dictionaryContentsService.deleteById(id);
//        return ResultGenerator.genOkResult();
//    }

    @Operation(description = "数据字典更新")
    @PutMapping
    public Result update(@RequestBody DictionaryContents dictionaryContents) {
    dictionaryContentsService.update(dictionaryContents);
        return ResultGenerator.genOkResult();
    }

    @Operation(description = "数据字典获取详细信息")
    @GetMapping("/{id}")
    public Result detail(@PathVariable Long id) {
    DictionaryContents dictionaryContents = dictionaryContentsService.getById(id);
        return ResultGenerator.genOkResult(dictionaryContents);
    }

    @Operation(description = "数据字典分页查询")
    @GetMapping
    @ApiOperation(value="分页查询数据字典", notes="分页查询 ")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "page", value = "第几页", required = true, dataType = "Integer", paramType="query"),
        @ApiImplicitParam(name = "size", value = "一页有几条", required = true, dataType = "Integer", paramType="query")
    })
    public Result list(@RequestParam(defaultValue = "1") Integer page,
                       @RequestParam(defaultValue = "10") Integer size,
                       @RequestParam(defaultValue = "null") String keyword) {
        String inKeyword = null;
        if (!(keyword == null || keyword.equals("null"))) {
            inKeyword = keyword;
        }
        PageHelper.startPage(page, size);
        List<DictionaryContents> list = dictionaryContentsService.listWithKeyword(inKeyword);
        PageInfo<DictionaryContents> pageInfo = PageInfo.of(list);
        return ResultGenerator.genOkResult(pageInfo);
    }
}


================================================
FILE: back/src/main/java/com/msy/plus/controller/DictionaryDetailsController.java
================================================
package com.msy.plus.controller;

import com.msy.plus.core.response.Result;
import com.msy.plus.core.response.ResultGenerator;
import com.msy.plus.entity.DictionaryContents;
import com.msy.plus.entity.DictionaryDetails;
import com.msy.plus.service.DictionaryDetailsService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
* @author MoShuYing
* @date 2021/05/18
*/
@PreAuthorize("hasAuthority('ADMIN')")
@Api(tags={"数据字典明细接口"})
@RestController
@RequestMapping("/dictionary/details")
public class DictionaryDetailsController {
    @Resource
    private DictionaryDetailsService dictionaryDetailsService;

    @Operation(description = "数据字典明细添加")
    @PostMapping
    public Result add(@RequestBody DictionaryDetails dictionaryDetails) {
        dictionaryDetailsService.save(dictionaryDetails);
        return ResultGenerator.genOkResult();
    }

//    @Operation(description = "数据字典明细删除")
//    @DeleteMapping("/{id}")
//    public Result delete(@PathVariable Long id) {
//    dictionaryDetailsService.deleteById(id);
//        return ResultGenerator.genOkResult();
//    }

    @Operation(description = "数据字典明细更新")
    @PutMapping
    public Result update(@RequestBody DictionaryDetails dictionaryDetails) {
    dictionaryDetailsService.update(dictionaryDetails);
        return ResultGenerator.genOkResult();
    }

    @Operation(description = "数据字典明细获取详细信息")
    @GetMapping("/{id}")
    public Result detail(@PathVariable Long id) {
    DictionaryDetails dictionaryDetails = dictionaryDetailsService.getById(id);
        return ResultGenerator.genOkResult(dictionaryDetails);
    }

    @Operation(description = "数据字典明细分页查询")
    @GetMapping
    @ApiOperation(value="分页查询数据字典明细", notes="分页查询 ")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "page", value = "第几页", required = true, dataType = "Integer", paramType="query"),
        @ApiImplicitParam(name = "size", value = "一页有几条", required = true, dataType = "Integer", paramType="query")
    })
    public Result list(@RequestParam(defaultValue = "1") Integer page,
                       @RequestParam(defaultValue = "10") Integer size,
                       @RequestParam(defaultValue = "1") Integer id,
                       @RequestParam(defaultValue = "null") String keyword) {
        String inKeyword = null;
        if (!(keyword == null || keyword.equals("null"))) {
            inKeyword = keyword;
        }
        Integer inId = Integer.valueOf(id);
        if(inId==null){
            inId = dictionaryDetailsService.listAll().get(0).getId();
        }
        PageHelper.startPage(page, size);
        List<DictionaryContents> list = dictionaryDetailsService.listWithKeyword(inId.intValue(),inKeyword);
        PageInfo<DictionaryContents> pageInfo = PageInfo.of(list);
        return ResultGenerator.genOkResult(pageInfo);
    }
}


================================================
FILE: back/src/main/java/com/msy/plus/controller/EmployeeController.java
================================================
package com.msy.plus.controller;

import com.alibaba.fastjson.JSONObject;
import com.msy.plus.core.jwt.JwtUtil;
import com.msy.plus.core.response.Result;
import com.msy.plus.core.response.ResultGenerator;
import com.msy.plus.entity.Employee;
import com.msy.plus.entity.EmployeeDetail;
import com.msy.plus.entity.EmployeeWithRoleDO;
import com.msy.plus.service.EmployeeService;
import com.msy.plus.util.JsonUtils;
import com.msy.plus.util.RedisUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
* @author MoShuYing
* @date 2021/05/15
*/
@PreAuthorize(
        "hasAuthority('ADMIN')"+
                "or hasAuthority('董事长')"+
                "or hasAuthority('主席')"+
                "or hasAuthority('高级主席')"+
                "or hasAuthority('副主席')"+
                "or hasAuthority('总裁')"+
                "or hasAuthority('会长')"+
                "or hasAuthority('高级总裁')"+
                "or hasAuthority('高级副总裁')"+
                "or hasAuthority('副总裁')"+
                "or hasAuthority('总经理')"+
                "or hasAuthority('副总经理')"+
                "or hasAuthority('总监')"+
                "or hasAuthority('经理')"+
                "or hasAuthority('高级经理')"+
                "or hasAuthority('副经理')"+
                "or hasAuthority('主任')"+
                "or hasAuthority('高级主任')"+
                "or hasAuthority('副主任')"+
                "or hasAuthority('组长')"+
                "or hasAuthority('副组长')"+
                "or hasAuthority('人事专员')"+
                "or hasAuthority('市场专员')"+
                "or hasAuthority('市场主管')"+
                "or hasAuthority('销售主管')"
)
@Api(tags={"员工接口"})
@RestController
@RequestMapping("/employee")
public class EmployeeController {
    @Resource
    private EmployeeService employeeService;
    @Resource private PasswordEncoder passwordEncoder;
    @Resource private JwtUtil jwtUtil;

    @Operation(description = "员工添加")
    @PostMapping
    public Result add(@RequestBody EmployeeDetail employee) {
        if (employee.getId()!=null){
            employee.setId(null);
        }
        if(employee.getDept() ==null){
            return ResultGenerator.genFailedResult("请填写员工部门信息");
        }
        if(employee.getPassword()!=null && employee.getPassword().length()<=5){
            return ResultGenerator.genFailedResult("密码长度不能少于或等于五位");
        }
        employee.setPassword(this.passwordEncoder.encode(employee.getPassword().trim()));
        try{
            employeeService.save(employee);
        }catch (Exception e){
            e.printStackTrace();
            String msg = "信息有误";
            if(e.toString().contains("for key 'employee.employee_name_uindex'")){
                msg = "已有同名员工,请检查员工名称";
            }else if(e.toString().contains("for key 'employee.employee_email_uindex'")){
                msg = "已有同名邮箱,请检查员工邮箱";
            }
            return ResultGenerator.genFailedResult(msg);
        }
        if(!(employee.getRoleIds() ==null || employee.getRoleIds().size()<1)){
            employeeService.saveRoles(employee.getId(),employee.getRoleIds());
        }
        return ResultGenerator.genOkResult();
    }

    @Operation(description = "员工删除")
    @DeleteMapping("/{id}")
    public Result delete(@PathVariable Long id) {
        employeeService.deleteById(id);
        employeeService.deleteEmployeeWithRole(id);
        return ResultGenerator.genOkResult();
    }

    @Operation(description = "员工更新")
    @PutMapping
    public Result update(@RequestBody EmployeeDetail employee,@RequestHeader Map<String, String> headers) {
        if(employee.getName().equals("admin")){
            return ResultGenerator.genFailedResult("禁止修改管理员角色!");
        }
        // 更新员工基本信息
        if(employee.getDept() ==null){
            return ResultGenerator.genFailedResult("请填写员工部门信息");
        }
        if(employee.getPassword()!=null){
            if(employee.getPassword().length()<=5){
                return ResultGenerator.genFailedResult("密码长度不能少于或等于五位");
            }
            employee.setPassword(this.passwordEncoder.encode(employee.getPassword().trim()));
        }
        try{
            employeeService.update((Employee) employee);
        }catch (Exception e){
            e.printStackTrace();
            String msg = "信息有误";
            if(e.toString().contains("for key 'employee.employee_name_uindex'")){
                msg = "已有同名员工,请检查员工名称";
            }else if(e.toString().contains("for key 'employee.employee_email_uindex'")){
                msg = "已有同名邮箱,请检查员工邮箱";
            }
            return ResultGenerator.genFailedResult(msg);
        }
        List<Long> now= employee.getRoleIds();
        if(now==null) {
            return ResultGenerator.genOkResult();
        }
        List<Long> raw = this.employeeService.getAllEmployeeRoleTableRow(employee.getId());
        // diff运算
        List<Long> adds = new ArrayList<>();
        List<Long> removes = new ArrayList<>();
        for(Long i:now){
            if(!raw.contains(i)){
                adds.add(i);
            }
        }
        for(Long i:raw){
            if(!now.contains(i)){
                removes.add(i);
            }
        }
        // 更新权限即注销对应用户登录
        if(!adds.isEmpty() || !removes.isEmpty()){
            jwtUtil.invalidRedisToken(employee.getName());
        }
        if(!adds.isEmpty()){
            this.employeeService.saveRoles(employee.getId(),adds);
        }
        if(!removes.isEmpty()){
            for(Long i :removes){
                this.employeeService.deleteEmployeeWithRoleItem(employee.getId(),i);
            }
        }

        return ResultGenerator.genOkResult();
    }

    @Operation(description = "员工获取详细信息")
    @GetMapping("/{id}")
    public Result detail(@PathVariable Long id) {
        EmployeeDetail employee = employeeService.getDetailById(id);
        final EmployeeDetail object = JsonUtils.deleteFields(employee, EmployeeDetail.class, "password");
        return ResultGenerator.genOkResult(object);
    }

    @Operation(description = "员工分页查询")
    @GetMapping
    @ApiOperation(value="分页查询员工", notes="分页查询 ")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "page", value = "第几页", required = true, dataType = "Integer", paramType="query"),
        @ApiImplicitParam(name = "size", value = "一页有几条", required = true, dataType = "Integer", paramType="query")
    })
    public Result list(
            @RequestParam(defaultValue = "1") Integer page,
            @RequestParam(defaultValue = "10") Integer size,
            @RequestParam(required = false) Integer dept,
            @RequestParam(defaultValue = "") String keyword) {
        PageHelper.startPage(page, size);
        List<EmployeeWithRoleDO> list = employeeService.listEmployeeWithRole(keyword, dept);
        PageInfo<EmployeeWithRoleDO> pageInfo = PageInfo.of(list);
        // 不显示 password 字段
        final PageInfo<JSONObject> objectPageInfo = JsonUtils.deleteFields(pageInfo, PageInfo.class, "password");
        return ResultGenerator.genOkResult(objectPageInfo);
    }
}


================================================
FILE: back/src/main/java/com/msy/plus/controller/PermissionController.java
================================================
package com.msy.plus.controller;

import com.msy.plus.core.response.Result;
import com.msy.plus.core.response.ResultGenerator;
import com.msy.plus.entity.Permission;
import com.msy.plus.service.PermissionService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
* @author MoShuYing
* @date 2021/05/14
*/
@PreAuthorize("hasAuthority('ADMIN')")
@Api(tags={"权限接口"})
@RestController
@RequestMapping("/permission")
public class PermissionController {
    @Resource
    private PermissionService permissionService;
//
//    @Operation(description = "权限添加")
//    @PostMapping
//    public Result add(@RequestBody Permission permission) {
//        permissionService.save(permission);
//        return ResultGenerator.genOkResult();
//    }

    @Operation(description = "权限删除")
    @DeleteMapping("/{id}")
    public Result delete(@PathVariable Long id) {
    permissionService.deleteById(id);
        return ResultGenerator.genOkResult();
    }

//    @Operation(description = "权限更新")
//    @PutMapping
//    public Result update(@RequestBody Permission permission) {
//    permissionService.update(permission);
//        return ResultGenerator.genOkResult();
//    }

//    @Operation(description = "权限获取详细信息")
//    @GetMapping("/{id}")
//    public Result detail(@PathVariable Long id) {
//    Permission permission = permissionService.getById(id);
//        return ResultGenerator.genOkResult(permission);
//    }

    @Operation(description = "权限分页查询")
    @GetMapping
    @ApiOperation(value="分页查询权限", notes="分页查询 ")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "page", value = "第几页", required = true, dataType = "Integer", paramType="query"),
        @ApiImplicitParam(name = "size", value = "一页有几条", required = true, dataType = "Integer", paramType="query")
    })
    public Result list(@RequestParam(defaultValue = "1") Integer page,
    @RequestParam(defaultValue = "10") Integer size) {
        PageHelper.startPage(page, size);
        List<Permission> list = permissionService.listAll();
        PageInfo<Permission> pageInfo = PageInfo.of(list);
        return ResultGenerator.genOkResult(pageInfo);
    }
}


================================================
FILE: back/src/main/java/com/msy/plus/controller/RoleController.java
================================================
package com.msy.plus.controller;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.msy.plus.core.response.Result;
import com.msy.plus.core.response.ResultGenerator;
import com.msy.plus.dto.RoleWithPermissionDTO;
import com.msy.plus.entity.RoleDO;
import com.msy.plus.entity.RolePermissionDO;
import com.msy.plus.service.RoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.*;

/**
 * 角色控制器
 *
 * @author MoShuying
 * @date 2018/05/27
 */
@PreAuthorize("hasAuthority('ADMIN')")
@Api(tags={"角色接口"})
@RestController
@RequestMapping("/role")
public class RoleController {
  @Resource private RoleService roleService;

  @Operation(description = "角色添加")
  @PostMapping
  public Result add(@RequestBody final RoleWithPermissionDTO roleDTO) {
    if(roleDTO.getPermissions()==null){
      return ResultGenerator.genFailedResult("尚未添加角色权限");
    }
    try{
      this.roleService.save(roleDTO);
    }catch (DuplicateKeyException e){
      return ResultGenerator.genFailedResult("提交的信息中包含已存在的字段");
    }
    List<Long> temp = new ArrayList<>();
    roleDTO.getPermissions().forEach(e->{ temp.add(e.getId()); });
    this.roleService.savePermissions(roleDTO.getId(),temp);
    return ResultGenerator.genOkResult();
  }

  @Operation(description = "角色删除")
  @DeleteMapping("/{id}")
  public Result delete(@PathVariable final Long id) {
    List<RolePermissionDO> raw = this.roleService.getAllRolePermissionTableRow(id);
    for(RolePermissionDO e :raw){
      this.roleService.deleteRolePermissionItem(id,e.getPermission_id());
    }
    this.roleService.deleteById(id);
    return ResultGenerator.genOkResult();
  }

  @Operation(description = "角色更新")
  @PutMapping
  public Result update(@RequestBody final RoleWithPermissionDTO roleWithPermissionDTO) {
    // 更新用户基本信息
    this.roleService.update(roleWithPermissionDTO);
    List<Long> nowPermissions = new ArrayList<>();
    if(roleWithPermissionDTO.getPermissions()==null){
      return ResultGenerator.genOkResult();
    }

    List<RolePermissionDO> rawPer = this.roleService.getAllRolePermissionTableRow(roleWithPermissionDTO.getId());
    // 表中权限信息去重
    Set<Long> raw = new HashSet<>();
    for(RolePermissionDO e: rawPer){
      raw.add(e.getPermission_id());
    }

    roleWithPermissionDTO.getPermissions().forEach(e->{ nowPermissions.add(e.getId()); });

    // diff运算
    Set<Long> adds = new HashSet<>();
    Set<Long> removes = new HashSet<>();

    // 如果修改后的不包含原来的 那么为新增元素
    for(Long i:nowPermissions){
      if(!raw.contains(i)){
        adds.add(i);
      }
    }

    // 如果原来的不包含修改后的 那么是删除元素
    for(Long i:raw){
      if(!nowPermissions.contains(i)){
        removes.add(i);
      }
    }

    if(!adds.isEmpty()){
        this.roleService.savePermissions(roleWithPermissionDTO.getId(),new ArrayList<>(adds));
    }
    if(!removes.isEmpty()){
      removes.forEach(e->{
        this.roleService.deleteRolePermissionItem(roleWithPermissionDTO.getId(),e);
      });
    }
    return ResultGenerator.genOkResult();
  }
  @Operation(description = "角色详情")
  @GetMapping("/{id}")
  public Result detail(@PathVariable final Long id) {
    final RoleDO role = this.roleService.getDetailById(id);
    return ResultGenerator.genOkResult(role);
  }

  @Operation(description = "角色列表")
  @GetMapping
  @ApiOperation(value="分页查询角色", notes="分页查询角色列表")
  @ApiImplicitParams({
          @ApiImplicitParam(name = "page", value = "第几页", required = true, dataType = "Integer", paramType="query"),
          @ApiImplicitParam(name = "size", value = "一页有几条", required = true, dataType = "Integer", paramType="query")
  })
  public Result list(
      @RequestParam(defaultValue = "1") final Integer page,
      @RequestParam(defaultValue = "10") final Integer size) {
    PageHelper.startPage(page, size);
    final List<RoleDO> list = this.roleService.listAll();
    final PageInfo<RoleDO> pageInfo = new PageInfo<>(list);
    return ResultGenerator.genOkResult(pageInfo);
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/cache/CacheExpire.java
================================================
package com.msy.plus.core.cache;

import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;

/**
 * 缓存过期注解
 *
 * @author MoShuying
 * @date 2018/07/11
 */
@Inherited
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface CacheExpire {
  /** 过期时间,默认 60s */
  @AliasFor("expire")
  long value() default 60L;

  /** 过期时间,默认 60s */
  @AliasFor("value")
  long expire() default 60L;
}


================================================
FILE: back/src/main/java/com/msy/plus/core/cache/MyRedisCacheManager.java
================================================
package com.msy.plus.core.cache;

import com.alibaba.fastjson.support.spring.GenericFastJsonRedisSerializer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.cache.Cache;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.cache.annotation.Caching;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.data.redis.cache.RedisCache;
import org.springframework.data.redis.cache.RedisCacheConfiguration;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.data.redis.cache.RedisCacheWriter;
import org.springframework.data.redis.serializer.RedisSerializationContext;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.lang.NonNull;
import org.springframework.util.ReflectionUtils;

import java.time.Duration;
import java.util.*;
import java.util.concurrent.Callable;

/**
 * Redis 容易出现缓存问题(超时、Redis 宕机等),当使用 spring cache 的注释 Cacheable、Cacheput 等处理缓存问题时, 我们无法使用 try catch
 * 处理出现的异常,所以最后导致结果是整个服务报错无法正常工作。 通过自定义 MyRedisCacheManager 并继承 RedisCacheManager 来处理异常可以解决这个问题
 *
 * <p>http://www.spring4all.com/article/937
 *
 * @author MoShuying
 * @date 2018/07/11
 */
@Slf4j
public class MyRedisCacheManager extends RedisCacheManager
    implements ApplicationContextAware, InitializingBean {
  /** key serializer */
  public static final StringRedisSerializer STRING_SERIALIZER = new StringRedisSerializer();
  /**
   * value serializer
   *
   * <p>使用 FastJsonRedisSerializer 会报错:java.lang.ClassCastException FastJsonRedisSerializer<Object>
   * fastSerializer = new FastJsonRedisSerializer<>(Object.class);
   */
  public static final GenericFastJsonRedisSerializer FASTJSON_SERIALIZER =
      new GenericFastJsonRedisSerializer();
  /** key serializer pair */
  public static final RedisSerializationContext.SerializationPair<String> STRING_PAIR =
      RedisSerializationContext.SerializationPair.fromSerializer(STRING_SERIALIZER);
  /** value serializer pair */
  public static final RedisSerializationContext.SerializationPair<Object> FASTJSON_PAIR =
      RedisSerializationContext.SerializationPair.fromSerializer(FASTJSON_SERIALIZER);

  private final Map<String, RedisCacheConfiguration> initialCacheConfiguration =
      new LinkedHashMap<>();
  private ApplicationContext applicationContext;

  public MyRedisCacheManager(
      final RedisCacheWriter cacheWriter, final RedisCacheConfiguration defaultCacheConfiguration) {
    super(cacheWriter, defaultCacheConfiguration);
  }

  public MyRedisCacheManager(
      final RedisCacheWriter cacheWriter,
      final RedisCacheConfiguration defaultCacheConfiguration,
      final Map<String, RedisCacheConfiguration> initialCacheConfigurations) {
    super(cacheWriter, defaultCacheConfiguration, initialCacheConfigurations);
  }

  @Override
  public Cache getCache(@NonNull final String name) {
    final Cache cache = super.getCache(name);
    return new RedisCacheWrapper(cache);
  }

  @Override
  public void setApplicationContext(@NonNull final ApplicationContext applicationContext)
      throws BeansException {
    this.applicationContext = applicationContext;
  }

  @Override
  public void afterPropertiesSet() {
    final String[] beanNames = this.applicationContext.getBeanNamesForType(Object.class);
    for (final String beanName : beanNames) {
      final Class clazz = this.applicationContext.getType(beanName);
      this.add(clazz);
    }
    super.afterPropertiesSet();
  }

  @NonNull
  @Override
  protected Collection<RedisCache> loadCaches() {
    final List<RedisCache> caches = new LinkedList<>();
    for (final Map.Entry<String, RedisCacheConfiguration> entry :
        this.initialCacheConfiguration.entrySet()) {
      caches.add(super.createRedisCache(entry.getKey(), entry.getValue()));
    }
    return caches;
  }

  private void add(final Class clazz) {
    ReflectionUtils.doWithMethods(
        clazz,
        method -> {
          ReflectionUtils.makeAccessible(method);
          final CacheExpire cacheExpire = AnnotationUtils.findAnnotation(method, CacheExpire.class);
          if (!Optional.ofNullable(cacheExpire).isPresent()) {
            return;
          }
          final Cacheable cacheable = AnnotationUtils.findAnnotation(method, Cacheable.class);
          if (Optional.ofNullable(cacheable).isPresent()) {
            this.add(cacheable.cacheNames(), cacheExpire);
            return;
          }
          final Caching caching = AnnotationUtils.findAnnotation(method, Caching.class);
          if (Optional.ofNullable(caching).isPresent()) {
            final Cacheable[] cs = caching.cacheable();
            if (cs.length > 0) {
              for (final Cacheable c : cs) {
                if (Optional.ofNullable(c).isPresent()) {
                  this.add(c.cacheNames(), cacheExpire);
                }
              }
            }
          } else {
            final CacheConfig cacheConfig =
                AnnotationUtils.findAnnotation(clazz, CacheConfig.class);
            if (Optional.ofNullable(cacheConfig).isPresent()) {
              this.add(cacheConfig.cacheNames(), cacheExpire);
            }
          }
        },
        method -> null != AnnotationUtils.findAnnotation(method, CacheExpire.class));
  }

  private void add(final String[] cacheNames, final CacheExpire cacheExpire) {
    for (final String cacheName : cacheNames) {
      if (!Optional.ofNullable(cacheName).isPresent() || "".equals(cacheName.trim())) {
        continue;
      }
      final long expire = cacheExpire.expire();
      log.debug("cache name<{}> expire: {}", cacheName, expire);
      if (expire >= 0) {
        // 缓存配置
        final RedisCacheConfiguration config =
            RedisCacheConfiguration.defaultCacheConfig()
                .entryTtl(Duration.ofSeconds(expire))
                .disableCachingNullValues()
                // .prefixKeysWith(cacheName)
                .serializeKeysWith(STRING_PAIR)
                .serializeValuesWith(FASTJSON_PAIR);
        this.initialCacheConfiguration.put(cacheName, config);
      } else {
        log.warn("{} use default expiration.", cacheName);
      }
    }
  }

  protected static class RedisCacheWrapper implements Cache {
    private final Cache cache;

    RedisCacheWrapper(final Cache cache) {
      this.cache = cache;
    }

    @Override
    public String getName() {
      MyRedisCacheManager.log.debug("get name: {}", this.cache.getName());
      try {
        return this.cache.getName();
      } catch (final Exception e) {
        MyRedisCacheManager.log.error("get name => {}", e.getMessage());
        return null;
      }
    }

    @Override
    public Object getNativeCache() {
      MyRedisCacheManager.log.debug("native cache: {}", this.cache.getNativeCache());
      try {
        return this.cache.getNativeCache();
      } catch (final Exception e) {
        MyRedisCacheManager.log.error("get native cache => {}", e.getMessage());
        return null;
      }
    }

    @Override
    public ValueWrapper get(@NonNull final Object o) {
      MyRedisCacheManager.log.debug("get => o: {}", o);
      try {
        return this.cache.get(o);
      } catch (final Exception e) {
        MyRedisCacheManager.log.error("get => o: {}, error: {}", o, e.getMessage());
        return null;
      }
    }

    @Override
    public <T> T get(@NonNull final Object o, final Class<T> aClass) {
      MyRedisCacheManager.log.debug("get => o: {}, clazz: {}", o, aClass);
      try {
        return this.cache.get(o, aClass);
      } catch (final Exception e) {
        MyRedisCacheManager.log.error("get => o: {}, clazz: {}, error: {}", o, aClass, e.getMessage());
        return null;
      }
    }

    @Override
    public <T> T get(@NonNull final Object o, @NonNull final Callable<T> callable) {
      MyRedisCacheManager.log.debug("get => o: {}", o);
      try {
        return this.cache.get(o, callable);
      } catch (final Exception e) {
        MyRedisCacheManager.log.error("get => o: {}, error: {}", o, e.getMessage());
        return null;
      }
    }

    @Override
    public void put(@NonNull final Object o, final Object o1) {
      MyRedisCacheManager.log.debug("put => o: {}, o1: {}", o, o1);
      try {
        this.cache.put(o, o1);
      } catch (final Exception e) {
        MyRedisCacheManager.log.error("put => o: {}, o1: {}, error: {}", o, o1, e.getMessage());
      }
    }

    @Override
    public ValueWrapper putIfAbsent(@NonNull final Object o, final Object o1) {
      MyRedisCacheManager.log.debug("put if absent => o: {}, o1: {}", o, o1);
      try {
        return this.cache.putIfAbsent(o, o1);
      } catch (final Exception e) {
        MyRedisCacheManager.log.error("put if absent => o: {}, o1: {}, error: {}", o, o1, e.getMessage());
        return null;
      }
    }

    @Override
    public void evict(@NonNull final Object o) {
      MyRedisCacheManager.log.debug("evict => o: {}", o);
      try {
        this.cache.evict(o);
      } catch (final Exception e) {
        MyRedisCacheManager.log.error("evict => o: {}, error: {}", o, e.getMessage());
      }
    }

    @Override
    public void clear() {
      MyRedisCacheManager.log.debug("clear");
      try {
        this.cache.clear();
      } catch (final Exception e) {
        MyRedisCacheManager.log.error("clear => error: {}", e.getMessage());
      }
    }
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/config/JasyptConfig.java
================================================
package com.msy.plus.core.config;

import com.msy.plus.core.rsa.RsaUtils;
import org.jasypt.encryption.StringEncryptor;
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.Base64Utils;

import javax.annotation.Resource;

/**
 * Jasypt 配置(2.1.1可以配置非对称加密,但是测试还有问题,等解决再更新)
 *
 * @author MoShuying
 * @date 2018/07/21
 */
@Configuration
public class JasyptConfig {
  @Value("${jasypt.encryptor.password}")
  private String passwordEncryptedByBase64AndRsa;

  @Resource private RsaUtils rsaUtils;

  @Bean
  public StringEncryptor myStringEncryptor() throws Exception {
    // 先 Base64,后 RSA 加密的密码
    final byte[] passwordEncryptedByRsa =
        Base64Utils.decodeFromString(this.passwordEncryptedByBase64AndRsa);
    final String password = new String(this.rsaUtils.decrypt(passwordEncryptedByRsa));
    // 配置
    final SimpleStringPBEConfig config =
        new SimpleStringPBEConfig() {
          {
            this.setPassword(password);
            // 加密算法
            this.setAlgorithm("PBEWithMD5AndDES");
            this.setKeyObtentionIterations("1000");
            this.setPoolSize("1");
            this.setProviderName("SunJCE");
            this.setSaltGeneratorClassName("org.jasypt.salt.RandomSaltGenerator");
            this.setStringOutputType("base64");
          }
        };
    final PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
    encryptor.setConfig(config);
    return encryptor;
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/config/RedisCacheConfig.java
================================================
package com.msy.plus.core.config;

import com.msy.plus.core.cache.MyRedisCacheManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.interceptor.CacheErrorHandler;
import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.cache.interceptor.SimpleCacheErrorHandler;
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.RedisCacheWriter;
import org.springframework.data.redis.connection.RedisConnectionFactory;

import javax.annotation.Resource;
import java.util.Optional;

/**
 * Redis缓存配置
 *
 * @author MoShuying
 * @date 2018/07/11
 */
@Slf4j
@Configuration
@EnableCaching(proxyTargetClass = true)
@ConditionalOnProperty(name = "spring.redis.host")
@EnableConfigurationProperties(RedisProperties.class)
public class RedisCacheConfig extends CachingConfigurerSupport {
  @Resource private RedisConnectionFactory redisConnectionFactory;

  @Bean
  @Override
  public CacheManager cacheManager() {
    // 初始化一个 RedisCacheWriter
    final RedisCacheWriter redisCacheWriter =
        RedisCacheWriter.nonLockingRedisCacheWriter(this.redisConnectionFactory);
    final RedisCacheConfiguration defaultCacheConfig =
        RedisCacheConfiguration.defaultCacheConfig()
            // 不缓存 null 值
            // .disableCachingNullValues()
            // 使用注解时的序列化、反序列化对
            .serializeKeysWith(MyRedisCacheManager.STRING_PAIR)
            .serializeValuesWith(MyRedisCacheManager.FASTJSON_PAIR);
    // 初始化RedisCacheManager
    return new MyRedisCacheManager(redisCacheWriter, defaultCacheConfig);
  }

  /**
   * 如果 @Cacheable、@CachePut、@CacheEvict 等注解没有配置 key,则使用这个自定义 key 生成器
   *
   * <p>自定义缓存的 key 时,难以保证 key 的唯一性
   *
   * <p>此时最好指定方法名,比如:@Cacheable(value="", key="{#root.methodName, #id}")
   */
  @Bean
  @Override
  public KeyGenerator keyGenerator() {
    // 比如 User 类 list(Integer page, Integer size) 方法
    // 用户 A 请求:list(1, 2)
    // redis 缓存的 key:User.list#1,2
    return (target, method, params) -> {
      final String dot = ".";
      final StringBuilder sb = new StringBuilder(32);
      // 类名
      sb.append(target.getClass().getSimpleName());
      sb.append(dot);
      // 方法名
      sb.append(method.getName());
      // 如果存在参数
      if (0 < params.length) {
        sb.append("#");
        // 带上参数
        String comma = "";
        for (final Object param : params) {
          sb.append(comma);
          if (!Optional.ofNullable(param).isPresent()) {
            sb.append("NULL");
          } else {
            sb.append(param.toString());
          }
          comma = ",";
        }
      }
      return sb.toString();
    };
  }

  /** 错误处理,主要是打印日志 */
  @Bean
  @Override
  public CacheErrorHandler errorHandler() {
    return new SimpleCacheErrorHandler() {
      @Override
      public void handleCacheGetError(
          final RuntimeException e, final Cache cache, final Object key) {
        RedisCacheConfig.log.error("==> cache: {}", cache);
        RedisCacheConfig.log.error("==>   key: {}", key);
        RedisCacheConfig.log.error("==> error: {}", e.getMessage());
        super.handleCacheGetError(e, cache, key);
      }

      @Override
      public void handleCachePutError(
          final RuntimeException e, final Cache cache, final Object key, final Object value) {
        RedisCacheConfig.log.error("==> cache: {}", cache);
        RedisCacheConfig.log.error("==>   key: {}", key);
        RedisCacheConfig.log.error("==> value: {}", value);
        RedisCacheConfig.log.error("==> error: {}", e.getMessage());
        super.handleCachePutError(e, cache, key, value);
      }

      @Override
      public void handleCacheEvictError(
          final RuntimeException e, final Cache cache, final Object key) {
        RedisCacheConfig.log.error("==> cache: {}", cache);
        RedisCacheConfig.log.error("==>   key: {}", key);
        RedisCacheConfig.log.error("==> error: {}", e.getMessage());
        super.handleCacheEvictError(e, cache, key);
      }

      @Override
      public void handleCacheClearError(final RuntimeException e, final Cache cache) {
        RedisCacheConfig.log.error("==> cache: {}", cache);
        RedisCacheConfig.log.error("==> error: {}", e.getMessage());
        super.handleCacheClearError(e, cache);
      }
    };
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/config/RedisConfig.java
================================================
package com.msy.plus.core.config;

import com.alibaba.fastjson.support.spring.GenericFastJsonRedisSerializer;
import com.msy.plus.core.cache.MyRedisCacheManager;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
import org.springframework.data.redis.connection.jedis.JedisClientConfiguration;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import redis.clients.jedis.JedisPoolConfig;

import javax.annotation.Resource;
import java.time.Duration;

/**
 * Redis配置
 *
 * @author MoShuying
 * @date 2018/05/27
 */
@Configuration
public class RedisConfig {
  @Resource private RedisProperties redisProperties;

  @Bean
  @ConfigurationProperties(prefix = "spring.redis.jedis.pool")
  public JedisPoolConfig jedisPoolConfig() {
    return new JedisPoolConfig();
  }

  @Bean
  @ConfigurationProperties(prefix = "spring.redis")
  public RedisConnectionFactory redisConnectionFactory(
      @Qualifier(value = "jedisPoolConfig") final JedisPoolConfig jedisPoolConfig) {
    // 方法上的 @ConfigurationProperties 不生效
    // 未知 bug,暂时这样手动设置
    // fixme
    // 单机版 jedis
    final RedisStandaloneConfiguration redisStandaloneConfiguration =
        new RedisStandaloneConfiguration(
            this.redisProperties.getHost(), this.redisProperties.getPort());
    redisStandaloneConfiguration.setDatabase(this.redisProperties.getDatabase());
    redisStandaloneConfiguration.setPassword(this.redisProperties.getPassword());

    // 获得默认的连接池构造器
    final JedisClientConfiguration.JedisPoolingClientConfigurationBuilder jpcb =
        (JedisClientConfiguration.JedisPoolingClientConfigurationBuilder)
            JedisClientConfiguration.builder();
    // 指定 jedisPoolConifig 来修改默认的连接池构造器
    jpcb.poolConfig(jedisPoolConfig);
    // 连接超时
    jpcb.and().connectTimeout(Duration.ofSeconds(10));
    // 通过构造器来构造 jedis 客户端配置
    final JedisClientConfiguration jedisClientConfiguration = jpcb.build();
    // 单机配置 + 客户端配置 = jedis 连接工厂
    return new JedisConnectionFactory(redisStandaloneConfiguration, jedisClientConfiguration);
  }

  /**
   * 配置 RedisTemplate,配置 key 和 value 的序列化类
   *
   * <p>key 序列化使用 StringRedisSerializer, 不配置的话,key 会出现乱码
   */
  @Bean
  public RedisTemplate redisTemplate(
      @Qualifier(value = "redisConnectionFactory") final RedisConnectionFactory factory) {
    final RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();

    // 设置 key 的序列化器为字符串 serializer
    final StringRedisSerializer stringSerializer = MyRedisCacheManager.STRING_SERIALIZER;

    redisTemplate.setKeySerializer(stringSerializer);
    redisTemplate.setHashKeySerializer(stringSerializer);

    // 设置 value 的序列化器为 fastjson serializer
    final GenericFastJsonRedisSerializer fastSerializer = MyRedisCacheManager.FASTJSON_SERIALIZER;

    redisTemplate.setValueSerializer(fastSerializer);
    redisTemplate.setHashValueSerializer(fastSerializer);

    // 如果 KeySerializer 或者 ValueSerializer 没有配置
    // 则对应的 KeySerializer、ValueSerializer 才使用 fastjson serializer
    redisTemplate.setDefaultSerializer(fastSerializer);

    redisTemplate.setConnectionFactory(factory);
    redisTemplate.afterPropertiesSet();
    return redisTemplate;
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/config/Swagger3Config.java
================================================
package com.msy.plus.core.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import springfox.documentation.service.*;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.spi.service.contexts.SecurityContext;

import java.util.Collections;
import java.util.List;

import static com.msy.plus.core.constant.ProjectConstant.SPRING_PROFILE_PRODUCTION;

/**
 * Swagger3
 *
 * @author MoShuying
 * @date 2020/11/06
 */
@PropertySource(
    value = "classpath:/META-INF/swagger3.yml",
    factory = YamlPropertySourceFactory.class)
@Configuration
public class Swagger3Config {

  @Value("${spring.profiles.active}")
  private String activeProfile;

  @Value("${application.name}")
  private String applicationName;

  @Value("${application.version}")
  private String applicationVersion;

  @Value("${application.description}")
  private String applicationDescription;

  @Value("${application.url.service}")
  private String applicationServiceUrl;

  @Value("${application.license}")
  private String applicationLicense;

  @Value("${application.url.license}")
  private String applicationLicenseUrl;

  @Value("${application.apis.selector}")
  private String selector;

  @Value("${author.name}")
  private String authorName;

  @Value("${author.url}")
  private String authorUrl;

  @Value("${author.email}")
  private String authorEmail;

  private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
            .title(applicationName)
            .version(applicationVersion)
            .description(applicationDescription)
            .termsOfServiceUrl(applicationServiceUrl)
            .contact(new Contact(authorName, authorUrl, authorEmail))
            .license(applicationLicense)
            .licenseUrl(applicationLicenseUrl)
            .build();
  }

  @Bean
  public Docket docket() {
//添加head参数配置start
    return new Docket(DocumentationType.SWAGGER_2)
        .apiInfo(this.apiInfo())
        // 仅在非生产环境下生效
        .enable(!SPRING_PROFILE_PRODUCTION.equals(this.activeProfile))
        .select()
        .apis(RequestHandlerSelectors.basePackage(selector))
        .paths(PathSelectors.any())
        .build()
        .securitySchemes(securitySchemes())
        .securityContexts(securityContexts());
  }

  private List<SecurityScheme> securitySchemes(){
    return Collections.singletonList(new ApiKey("Authorization", "Authorization", "header"));
  }

  private List<SecurityContext> securityContexts() {
    return Collections.singletonList(
            SecurityContext.builder()
                    .securityReferences(defaultAuth())
                    .operationSelector(null)
                    .build()
    );
  }

  private List<SecurityReference> defaultAuth() {
    AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
    return Collections.singletonList(new SecurityReference("Authorization", new AuthorizationScope[]{authorizationScope}));
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/config/ValidatorConfig.java
================================================
package com.msy.plus.core.config;

import org.hibernate.validator.HibernateValidator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;

import javax.validation.Validation;
import javax.validation.Validator;
import javax.validation.ValidatorFactory;

/**
 * 参数校验
 * https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/#section-constraint-violation-methods
 *
 * @author MoShuying
 * @date 2018/05/27
 */
@Configuration
public class ValidatorConfig {
  @Bean
  public MethodValidationPostProcessor methodValidationPostProcessor() {
    final MethodValidationPostProcessor postProcessor = new MethodValidationPostProcessor();
    // 设置 validator 模式为快速失败返回
    postProcessor.setValidator(this.validatorFailFast());
    return postProcessor;
    // 默认是普通模式,会返回所有的验证不通过信息集合
    // return new MethodValidationPostProcessor();
  }

  @Bean
  public Validator validatorFailFast() {
    final ValidatorFactory validatorFactory =
        Validation.byProvider(HibernateValidator.class)
            .configure()
            .addProperty("hibernate.validator.fail_fast", "true")
            .buildValidatorFactory();
    return validatorFactory.getValidator();
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/config/WebMvcConfig.java
================================================
package com.msy.plus.core.config;

import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.support.config.FastJsonConfig;
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;

/**
 * Spring MVC 配置
 *
 * @author MoShuying
 * @date 2018/05/27
 */
@Configuration
public class WebMvcConfig extends WebMvcConfigurationSupport {
  /** 使用阿里 FastJson 作为 JSON MessageConverter */
  @Override
  public void configureMessageConverters(final List<HttpMessageConverter<?>> converters) {
    final FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
    final FastJsonConfig config = new FastJsonConfig();
    // 支持的输出类型
    final List<MediaType> supportedMediaTypes = new ArrayList<>();
    supportedMediaTypes.add(MediaType.APPLICATION_JSON);
    supportedMediaTypes.add(MediaType.APPLICATION_OCTET_STREAM);
    supportedMediaTypes.add(MediaType.APPLICATION_FORM_URLENCODED);
    supportedMediaTypes.add(MediaType.TEXT_HTML);
    converter.setSupportedMediaTypes(supportedMediaTypes);
    config.setSerializerFeatures(
        // 保留空的字段
        // SerializerFeature.WriteMapNullValue,
        // Number null -> 0
        SerializerFeature.WriteNullNumberAsZero,
        // 美化输出
        SerializerFeature.PrettyFormat);
    converter.setFastJsonConfig(config);
    converter.setDefaultCharset(StandardCharsets.UTF_8);
    converters.add(converter);
  }

  /** 资源控制器 */
  @Override
  public void addResourceHandlers(final ResourceHandlerRegistry registry) {
    if (!registry.hasMappingForPattern("/webjars/**")) {
      registry
          .addResourceHandler("/webjars/**")
          .addResourceLocations("classpath:/META-INF/resources/webjars/");
    }

    if (!registry.hasMappingForPattern("/swagger-ui/**")) {
      // It is recommended by Springfox 3.x to disable caching of the static Swagger page content
      registry
          .addResourceHandler("/swagger-ui/**")
          .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/")
          .resourceChain(false);
    }
  }

  @Override
  public void addViewControllers(ViewControllerRegistry registry) {
    registry.addRedirectViewController("/swagger-ui.html", "/swagger-ui/index.html");
    registry.addRedirectViewController("/swagger-ui", "/swagger-ui/index.html");
    registry.addRedirectViewController("/swagger-ui/", "/swagger-ui/index.html");
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/config/WebSecurityConfig.java
================================================
package com.msy.plus.core.config;

import com.msy.plus.filter.AuthenticationFilter;
import com.msy.plus.filter.MyAuthenticationEntryPoint;
import com.msy.plus.service.impl.UserDetailsServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
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.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;

import javax.annotation.Resource;

/**
 * 安全设置
 *
 * @author MoShuying
 * @date 2018/05/27
 */
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
class WebSecurityConfig extends WebSecurityConfigurerAdapter {
  private static final String[] ANONYMOUS_LIST = {
    "/druid/**",
    "/swagger-ui/",
    "/swagger-ui/index.html",
    "/swagger-ui.html",
    "/swagger-ui/**",
    "/v2/api-docs",
    "/v3/api-docs",
    "/swagger-resources",
    "/swagger-resources/**",
    "/webjars/**",
  };

  @Resource private MyAuthenticationEntryPoint myAuthenticationEntryPoint;
  @Resource private AuthenticationFilter authenticationFilter;

  /** 使用随机加盐哈希算法对密码进行加密 */
  @Bean
  public static PasswordEncoder passwordEncoder() {
    // 默认强度10,可以指定 4 到 31 之间的强度
    return new BCryptPasswordEncoder();
  }

  @Bean
  @Override
  public UserDetailsServiceImpl userDetailsService() {
    return new UserDetailsServiceImpl();
  }

  @Override
  protected void configure(final AuthenticationManagerBuilder auth) throws Exception {
    auth
        // 自定义获取账户信息
        .userDetailsService(this.userDetailsService())
        // 设置密码加密
        .passwordEncoder(WebSecurityConfig.passwordEncoder());
  }

  @Override
  protected void configure(final HttpSecurity http) throws Exception {
    http
        // 禁用页面缓存
        .headers()
        .cacheControl()
        .and()
        .and()
        // 关闭 cors 验证
        .cors()
        .disable()
        // 关闭 csrf 验证
        .csrf()
        .disable()
        // 无状态 session
        .sessionManagement()
        .sessionCreationPolicy(SessionCreationPolicy.STATELESS)
        .and()
        // 异常处理
        .exceptionHandling()
        // 因为 RESTFul 没有登录界面所以只显示未登录 Json
        .authenticationEntryPoint(this.myAuthenticationEntryPoint)
        .and()
        // 身份过滤器
        .addFilterBefore(this.authenticationFilter, UsernamePasswordAuthenticationFilter.class)
        // 认证访问
        .authorizeRequests()
        // 允许匿名请求
        .antMatchers(ANONYMOUS_LIST)
        .permitAll()
        // 注册和登录
        .antMatchers(HttpMethod.POST, "/account", "/account/token")
        .permitAll()
        // 预请求
        .antMatchers(HttpMethod.OPTIONS)
        .permitAll()
        // 对除上面特别请求外所有都鉴权认证
        .anyRequest()
        .authenticated();
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/config/YamlPropertySourceFactory.java
================================================
package com.msy.plus.core.config;

import com.msy.plus.core.exception.YamlNotFoundException;
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
import org.springframework.core.env.PropertiesPropertySource;
import org.springframework.core.env.PropertySource;
import org.springframework.core.io.support.EncodedResource;
import org.springframework.core.io.support.PropertySourceFactory;

import java.util.Optional;
import java.util.Properties;

/**
 * Yml配置文件工厂
 *
 * @author MoShuying
 * @date 2020/11/12
 */
public class YamlPropertySourceFactory implements PropertySourceFactory {

  @Override
  public PropertySource<?> createPropertySource(final String name, final EncodedResource resource) {
    final YamlPropertiesFactoryBean factory = new YamlPropertiesFactoryBean();
    factory.setResources(resource.getResource());
    factory.afterPropertiesSet();
    final Properties ymlProperties =
        Optional.ofNullable(factory.getObject()).orElseThrow(YamlNotFoundException::new);
    final String propertyName =
        Optional.ofNullable(name).orElse(resource.getResource().getFilename());
    Optional.ofNullable(propertyName).orElseThrow(YamlNotFoundException::new);
    return new PropertiesPropertySource(propertyName, ymlProperties);
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/constant/ProjectConstant.java
================================================
package com.msy.plus.core.constant;

/**
 * 项目常量
 *
 * @author MoShuying
 * @date 2018/05/27
 */
public final class ProjectConstant {
  /** 开发环境 */
  public static final String SPRING_PROFILE_DEVELOPMENT = "dev";

  /** 生产环境 */
  public static final String SPRING_PROFILE_PRODUCTION = "prod";

  /** 测试环境 */
  public static final String SPRING_PROFILE_TEST = "test";

  /** 项目基础包名称 */
  public static final String BASE_PACKAGE = "com.msy.plus";

  /** Entity 所在包 */
  public static final String ENTITY_PACKAGE = BASE_PACKAGE + ".entity";

  /** Mapper 所在包 */
  public static final String MAPPER_PACKAGE = BASE_PACKAGE + ".mapper";

  /** Filter 所在包 */
  public static final String FILTER_PACKAGE = BASE_PACKAGE + ".filter";

  /** Service 所在包 */
  public static final String SERVICE_PACKAGE = BASE_PACKAGE + ".service";

  /** ServiceImpl 所在包 */
  public static final String SERVICE_IMPL_PACKAGE = SERVICE_PACKAGE + ".impl";

  /** Controller 所在包 */
  public static final String CONTROLLER_PACKAGE = BASE_PACKAGE + ".controller";

  /** Mapper 插件基础接口的完全限定名 */
  public static final String MAPPER_INTERFACE_REFERENCE = BASE_PACKAGE + ".core.mapper.MyMapper";
}


================================================
FILE: back/src/main/java/com/msy/plus/core/dto/AbstractConverter.java
================================================
package com.msy.plus.core.dto;

import com.google.common.base.Converter;
import org.springframework.beans.BeanUtils;

import javax.annotation.ParametersAreNonnullByDefault;
import java.lang.reflect.ParameterizedType;

/**
 * DTO -> DO 抽象转换器
 *
 * @author MoShuying
 * @date 2018/11/28
 */
public abstract class AbstractConverter<DTO, DO> extends Converter<DTO, DO> {
  private final Class<DO> doClass;
  private final DTO theDTO = this.setDTO();
  private DO theDO;

  public AbstractConverter() {
    final ParameterizedType parameterizedType =
        (ParameterizedType) this.getClass().getGenericSuperclass();
    this.doClass = (Class<DO>) parameterizedType.getActualTypeArguments()[1];
  }

  /**
   * 设置 DTO
   *
   * @return DTO
   */
  protected abstract DTO setDTO();

  @Override
  @ParametersAreNonnullByDefault
  public DO doForward(final DTO theDTO) {
    BeanUtils.copyProperties(theDTO, this.theDO);
    return this.theDO;
  }

  @Override
  @ParametersAreNonnullByDefault
  public DTO doBackward(final DO theDO) {
    BeanUtils.copyProperties(theDO, this.theDTO);
    return this.theDTO;
  }

  public DO convertToDO() {
    try {
      this.theDO = this.doClass.getDeclaredConstructor().newInstance();
      return this.convert(this.theDTO);
    } catch (final Exception ignored) {
      return null;
    }
  }

  public DTO convertFor(final DO aDO) {
    return this.reverse().convert(aDO);
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/exception/ExceptionResolver.java
================================================
package com.msy.plus.core.exception;

import com.msy.plus.core.response.Result;
import com.msy.plus.core.response.ResultCode;
import com.msy.plus.core.response.ResultGenerator;
import com.msy.plus.util.UrlUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.dao.DataAccessException;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.servlet.NoHandlerFoundException;

import javax.servlet.http.HttpServletRequest;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import java.sql.SQLException;
import java.util.stream.Collectors;

/**
 * 统一异常处理
 *
 * 对于业务异常:返回头 Http 状态码一律使用500,避免浏览器缓存,在响应 Result 中指明异常的状态码 code
 *
 * @author MoShuying
 * @date 2018/06/09
 */
@Slf4j
@RestControllerAdvice
public class ExceptionResolver {
  @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
  @ExceptionHandler(ConstraintViolationException.class)
  public Result validatorException(final ConstraintViolationException e) {
    final String msg =
        e.getConstraintViolations().stream()
            .map(ConstraintViolation::getMessage)
            .collect(Collectors.joining(","));
    // e.toString 多了不需要用户知道的属性路径
    ExceptionResolver.log.error("==> 验证实体异常: {}", e.toString());
    e.printStackTrace();
    return ResultGenerator.genFailedResult(ResultCode.VIOLATION_EXCEPTION, msg);
  }

  @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
  @ExceptionHandler({ServiceException.class})
  public Result serviceException(final ServiceException e) {
    ExceptionResolver.log.error("==> 服务异常: {}", e.getMessage());
    e.printStackTrace();
    return ResultGenerator.genFailedResult(e.getResultCode(), e.getMessage());
  }

  @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
  @ExceptionHandler({ResourcesNotFoundException.class})
  public Result resourcesException(final Throwable e) {
    ExceptionResolver.log.error("==> 资源异常: {}", e.getMessage());
    e.printStackTrace();
    return ResultGenerator.genFailedResult(ResultCode.FIND_FAILED);
  }

  @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
  @ExceptionHandler({SQLException.class, DataAccessException.class})
  public Result databaseException(final Throwable e) {
    ExceptionResolver.log.error("==> 数据库异常: {}", e.getMessage());
    e.printStackTrace();
    return ResultGenerator.genFailedResult(ResultCode.DATABASE_EXCEPTION);
  }

  @ResponseStatus(HttpStatus.UNAUTHORIZED)
  @ExceptionHandler({BadCredentialsException.class, AuthenticationException.class})
  public Result authException(final Throwable e) {
    ExceptionResolver.log.error("==> 身份验证异常: {}", e.getMessage());
    e.printStackTrace();
    return ResultGenerator.genFailedResult(ResultCode.UNAUTHORIZED_EXCEPTION);
  }

  @ResponseStatus(HttpStatus.FORBIDDEN)
  @ExceptionHandler({AccessDeniedException.class, UsernameNotFoundException.class})
  public Result accountException(final Throwable e) {
    ExceptionResolver.log.error("==> 账户异常: {}", e.getMessage());
    e.printStackTrace();
    return ResultGenerator.genFailedResult(e.getMessage());
  }

  @ResponseStatus(HttpStatus.NOT_FOUND)
  @ExceptionHandler(NoHandlerFoundException.class)
  public Result apiNotFoundException(final Throwable e, final HttpServletRequest request) {
    ExceptionResolver.log.error("==> API不存在: {}", e.getMessage());
    e.printStackTrace();
    return ResultGenerator.genFailedResult(
        "API [" + UrlUtils.getMappingUrl(request) + "] not existed");
  }

  @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
  @ExceptionHandler(Exception.class)
  public Result globalException(final HttpServletRequest request, final Throwable e) {
    ExceptionResolver.log.error("==> 全局异常: {}", e.getMessage());
    e.printStackTrace();
    return ResultGenerator.genFailedResult(
        HttpStatus.INTERNAL_SERVER_ERROR.value(),
        String.format("%s => %s", UrlUtils.getMappingUrl(request), e.getMessage()));
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/exception/ResourcesNotFoundException.java
================================================
package com.msy.plus.core.exception;

/**
 * 资源没找到异常(更新和删除都需先确认存在才操作)
 *
 * @author MoShuying
 * @date 2018/07/20
 */
public class ResourcesNotFoundException extends RuntimeException {
  private static final long serialVersionUID = -4770095291206546216L;

  private static final String DEFAULT_MESSAGE = "资源不存在";

  public ResourcesNotFoundException() {
    super(ResourcesNotFoundException.DEFAULT_MESSAGE);
  }

  public ResourcesNotFoundException(final String message) {
    super(message);
  }

  public ResourcesNotFoundException(final String message, final Throwable cause) {
    super(message, cause);
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/exception/RsaException.java
================================================
package com.msy.plus.core.exception;

/**
 * Rsa 异常
 *
 * @author MoShuying
 * @date 2018/05/27
 */
public class RsaException extends RuntimeException {
  private static final long serialVersionUID = 5010582133829256626L;

  private static final String DEFAULT_MESSAGE = "Rsa 异常";

  public RsaException() {
    super(RsaException.DEFAULT_MESSAGE);
  }

  public RsaException(final String message) {
    super(message);
  }

  public RsaException(final String message, final Throwable cause) {
    super(message, cause);
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/exception/ServiceException.java
================================================
package com.msy.plus.core.exception;

import com.msy.plus.core.response.ResultCode;

/**
 * Service 异常
 *
 * @author MoShuying
 * @date 2018/05/27
 */
public class ServiceException extends RuntimeException {
  private static final long serialVersionUID = 770293933438435163L;

  private ResultCode resultCode;

  public ServiceException(final String message) {
    super(message);
  }

  public ServiceException(final String message, final Throwable cause) {
    super(message, cause);
  }

  public ServiceException(final ResultCode resultCode, final String message) {
    super(message);
    this.resultCode = resultCode;
  }

  public ServiceException(final ResultCode resultCode) {
    super(resultCode.getReason());
    this.resultCode = resultCode;
  }

  public ResultCode getResultCode() {
    return this.resultCode;
  }

  public void setResultCode(final ResultCode resultCode) {
    this.resultCode = resultCode;
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/exception/UsernameNotFoundException2.java
================================================
package com.msy.plus.core.exception;

import org.springframework.security.core.userdetails.UsernameNotFoundException;

/**
 * 用户名没找到异常
 *
 * @author MoShuying
 * @date 2020/11/12
 */
public class UsernameNotFoundException2 extends UsernameNotFoundException {
  private static final long serialVersionUID = 90476943748478489L;

  private static final String DEFAULT_MESSAGE = "账户名不存在";

  public UsernameNotFoundException2() {
    super(UsernameNotFoundException2.DEFAULT_MESSAGE);
  }

  public UsernameNotFoundException2(final String message) {
    super(message);
  }

  public UsernameNotFoundException2(final String message, final Throwable cause) {
    super(message, cause);
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/exception/YamlNotFoundException.java
================================================
package com.msy.plus.core.exception;

/**
 * Yml配置没找到异常
 *
 * @author MoShuying
 * @date 2020/11/12
 */
public class YamlNotFoundException extends RuntimeException {
  private static final long serialVersionUID = 7081775224645592074L;

  private static final String DEFAULT_MESSAGE = "Yml不存在";

  public YamlNotFoundException() {
    super(YamlNotFoundException.DEFAULT_MESSAGE);
  }

  public YamlNotFoundException(final String message) {
    super(message);
  }

  public YamlNotFoundException(final String message, final Throwable cause) {
    super(message, cause);
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/jasypt/MyEncryptablePropertyDetector.java
================================================
package com.msy.plus.core.jasypt;

import com.ulisesbocchio.jasyptspringboot.EncryptablePropertyDetector;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

/**
 * 自定义被加密值的发现器 默认:ENC(abc) 自定义:MyEnc({abc})
 *
 * <p>https://github.com/ulisesbocchio/jasypt-spring-boot#provide-a-custom-encryptablepropertydetector
 *
 * <p>如果只是单纯想让前后缀不同,可以直接配置前后缀属性:
 *
 * <p>https://github.com/ulisesbocchio/jasypt-spring-boot#provide-a-custom-encrypted-property-prefix-and-suffix
 *
 * <p>jasypt.encryptor.property.prefix=TEST(
 *
 * <p>jasypt.encryptor.property.suffix=)
 *
 * @author MoShuying
 * @date 2018/07/20
 */
@Component
public class MyEncryptablePropertyDetector implements EncryptablePropertyDetector {
  /** 前缀 */
  private static final String PREFIX = "MyEnc({";
  /** 后缀 */
  private static final String SUFFIX = "})";

  @Override
  public boolean isEncrypted(final String property) {
    if (StringUtils.isBlank(property)) {
      return false;
    }
    final String trimmedProperty = property.trim();

    return trimmedProperty.startsWith(MyEncryptablePropertyDetector.PREFIX)
        && trimmedProperty.endsWith(MyEncryptablePropertyDetector.SUFFIX);
  }

  @Override
  public String unwrapEncryptedValue(final String property) {
    return property.substring(
        MyEncryptablePropertyDetector.PREFIX.length(),
        property.length() - MyEncryptablePropertyDetector.SUFFIX.length());
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/jwt/JwtConfigurationProperties.java
================================================
package com.msy.plus.core.jwt;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.time.Duration;

/**
 * Json web token 配置
 *
 * @author MoShuying
 * @date 2018/06/09
 */
@Data
@Component
@ConfigurationProperties(prefix = "jwt")
public class JwtConfigurationProperties {
  /** claim authorities key */
  private String claimKeyAuth;

  /** token 前缀 */
  private String tokenType;

  /** 请求头或请求参数的key */
  private String header;

  /** 有效期 */
  private Duration expireTime;
}


================================================
FILE: back/src/main/java/com/msy/plus/core/jwt/JwtUtil.java
================================================
package com.msy.plus.core.jwt;

import com.msy.plus.core.rsa.RsaUtils;
import com.msy.plus.util.RedisUtils;
import io.jsonwebtoken.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.security.PublicKey;
import java.time.Duration;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.Optional;
import java.util.function.Supplier;
import java.util.stream.Collectors;

/**
 * Json web token 工具 验证、生成 token
 *
 * @author MoShuying
 * @date 2018/05/27
 */
@Slf4j
@Component
public class JwtUtil {
  @Resource private JwtConfigurationProperties jwtProperties;
  @Resource private RedisUtils redisUtils;
  @Resource private RsaUtils rsaUtils;
  public JwtConfigurationProperties getJwtProperties(){
    return this.jwtProperties;
  }
  /** 根据 token 得到账户名 */
  public Optional<String> getName(final String token) {
    final Optional<Claims> claims = this.parseToken(token);
    return claims.map(Claims::getSubject);
  }
  public Optional<String> getId(final String token){
    final Optional<Claims> claims = this.parseToken(token);
    return claims.map(Claims::getId);
  }

  /**
   * 签发 token
   *
   * @param name 账户名
   * @param grantedAuthorities 账户权限信息[ADMIN, TEST, ...]
   */
  public String sign(
      final String name, final Collection<? extends GrantedAuthority> grantedAuthorities,Long id) {
    // 函数式创建 token,避免重复书写
    final Supplier<String> createToken = () -> this.createToken(name, grantedAuthorities,id);
    // 看看缓存有没有账户token
    final String token = (String) this.redisUtils.getValue(name);
    // 没有登录过
    if (StringUtils.isBlank(token)) {
      return createToken.get();
    }
    final boolean isValidate = (boolean) this.redisUtils.getValue(token);
    // 有 token,仍有效,将 token 置为无效,并重新签发(防止 token 被利用)
    if (isValidate) {
      this.invalidRedisToken(name);
    }
    // 重新签发
    return createToken.get();
  }

  /**
   * 清除账户在 Redis 中缓存的 token
   *
   * @param name 账户名
   */
  public void invalidRedisToken(final String name) {
    // 将 token 设置为无效
    Object value = this.redisUtils.getValue(name);
    if(value==null){ return; }
    Optional.ofNullable((String) value).ifPresent(_token -> this.redisUtils.setValue(_token, false));
  }

  /** 从请求头或请求参数中获取 token */
  public String getTokenFromRequest(final HttpServletRequest httpRequest) {
    final String header = this.jwtProperties.getHeader();
    final String token = httpRequest.getHeader(header);
    return StringUtils.isNotBlank(token) ? token : httpRequest.getParameter(header);
  }

  /** 返回账户认证 */
  public UsernamePasswordAuthenticationToken getAuthentication(
      final String name, final String token) {
    // 解析 token 的 payload
    final Optional<Claims> claims = this.parseToken(token);
    final String claimKeyAuth = this.jwtProperties.getClaimKeyAuth();
    // 账户角色列表
    final String[] auths =
        claims.map(c -> c.get(claimKeyAuth).toString().split(",")).orElse(new String[0]);
    // 将元素转换为 GrantedAuthority 接口集合
    final Collection<? extends GrantedAuthority> authorities =
        Arrays.stream(auths).map(SimpleGrantedAuthority::new).collect(Collectors.toList());
    final User user = new User(name, "", authorities);
    return new UsernamePasswordAuthenticationToken(user, null, authorities);
  }

  /** 验证 token 是否正确 */
  public boolean validateToken(final String token) {
    boolean isValidate = true;
    final Object redisTokenValidate = this.redisUtils.getValue(token);
    // 可能 redis 部署出现了问题
    // 或者清空了缓存导致 token 键不存在
    if (redisTokenValidate != null) {
      isValidate = (boolean) redisTokenValidate;
    }
    // 能正确解析 token,并且 redis 中缓存的 token 也是有效的
    return this.parseToken(token).isPresent() && isValidate;
  }

  /** 生成 token */
  private String createToken(
      final String name,
      final Collection<? extends GrantedAuthority> grantedAuthorities,
      Long id) {
    // 获取账户的角色字符串,如 USER,ADMIN
    final String authorities =
        grantedAuthorities.stream()
            .map(GrantedAuthority::getAuthority)
            .collect(Collectors.joining(","));
    JwtUtil.log.debug("==> Account<{}> authorities: {}", name, authorities);

    // 过期时间
    final Duration expireTime = this.jwtProperties.getExpireTime();
    // 当前时间 + 有效时长
    final Date expireDate = new Date(System.currentTimeMillis() + expireTime.toMillis());
    // 创建 token,比如 "Bearer abc1234"
    final String token =
        this.jwtProperties.getTokenType()
            + " "
            + Jwts.builder()
                // 设置账户名
                .setSubject(name)
                .setId(id.toString())
                // 添加权限属性
                .claim(this.jwtProperties.getClaimKeyAuth(), authorities)
                // 设置失效时间
                .setExpiration(expireDate)
                // 私钥加密生成签名
                .signWith(SignatureAlgorithm.RS256, this.rsaUtils.loadPrivateKey())
                // 使用LZ77算法与哈夫曼编码结合的压缩算法进行压缩
                .compressWith(CompressionCodecs.DEFLATE)
                .compact();
    // 保存账户 token
    // 因为账户注销后 JWT 本身只要没过期就仍然有效,所以只能通过 redis 缓存来校验有无效
    // 校验时只要 redis 中的 token 无效即可(JWT 本身可以校验有无过期,而 redis 过期即被删除了)
    // true 有效
    this.redisUtils.setValue(token, true, expireTime);
    // redis 过期时间和 JWT 的一致
    this.redisUtils.setValue(name, token, expireTime);
    JwtUtil.log.debug("==> Redis set Account<{}> token: {}", name, token);
    return token;
  }

  /** 解析 token */
  private Optional<Claims> parseToken(final String token) {
    Optional<Claims> claims = Optional.empty();
    try {
      final PublicKey publicKey = this.rsaUtils.loadPublicKey();
      claims =
          Optional.of(
              Jwts.parser()
                  // 公钥解密
                  .setSigningKey(publicKey)
                  .parseClaimsJws(token.replace(this.jwtProperties.getTokenType(), ""))
                  .getBody());
    } catch (final SignatureException e) {
      // 签名异常
      JwtUtil.log.debug("Invalid JWT signature");
    } catch (final MalformedJwtException e) {
      // 格式错误
      JwtUtil.log.debug("Invalid JWT token");
    } catch (final ExpiredJwtException e) {
      // 过期
      JwtUtil.log.debug("Expired JWT token");
    } catch (final UnsupportedJwtException e) {
      // 不支持该JWT
      JwtUtil.log.debug("Unsupported JWT token");
    } catch (final IllegalArgumentException e) {
      // 参数错误异常
      JwtUtil.log.debug("JWT token compact of handler are invalid");
    }
    return claims;
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/mapper/MyMapper.java
================================================
package com.msy.plus.core.mapper;

import tk.mybatis.mapper.common.BaseMapper;
import tk.mybatis.mapper.common.ConditionMapper;
import tk.mybatis.mapper.common.IdsMapper;
import tk.mybatis.mapper.common.special.InsertListMapper;

/**
 * 定制版 MyBatis Mapper 插件接口,如需其他接口参考官方文档自行添加
 *
 * @author MoShuying
 * @date 2018/05/27
 */
public interface MyMapper<T>
    extends BaseMapper<T>, ConditionMapper<T>, IdsMapper<T>, InsertListMapper<T> {}


================================================
FILE: back/src/main/java/com/msy/plus/core/response/Result.java
================================================
package com.msy.plus.core.response;

import com.alibaba.fastjson.JSON;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author MoShuying
 * @date 2018/07/15
 */
@ApiModel(value = "响应结果")
public class Result<T> {
  @ApiModelProperty(value = "状态码")
  private Integer code;

  @ApiModelProperty(value = "消息")
  private String message;

  @ApiModelProperty(value = "数据")
  private T data;

  @Override
  public String toString() {
    return JSON.toJSONString(this);
  }

  public Integer getCode() {
    return this.code;
  }

  public Result<T> setCode(final Integer code) {
    this.code = code;
    return this;
  }

  public String getMessage() {
    return this.message;
  }

  public Result<T> setMessage(final String message) {
    this.message = message;
    return this;
  }

  public T getData() {
    return this.data;
  }

  public Result<T> setData(final T data) {
    this.data = data;
    return this;
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/response/ResultCode.java
================================================
package com.msy.plus.core.response;

/**
 * 响应状态码枚举类
 *
 * <p>自定义业务异常 2*** 开始
 *
 * <p>原有类异常 4*** 开始
 *
 * @author MoShuying
 * @date 2018/07/14
 */
public enum ResultCode {
  /** 成功请求,但结果不是期望的成功结果 */
  SUCCEED_REQUEST_FAILED_RESULT(1000, "成功请求,但结果不是期望的成功结果"),

  /** 查询失败 */
  FIND_FAILED(2000, "查询失败"),

  /** 保存失败 */
  SAVE_FAILED(2001, "保存失败"),

  /** 更新失败 */
  UPDATE_FAILED(2002, "更新失败"),

  /** 删除失败 */
  DELETE_FAILED(2003, "删除失败"),

  /** 账户名重复 */
  DUPLICATE_NAME(2004, "账户名重复"),

  /** 数据库异常 */
  DATABASE_EXCEPTION(4001, "数据库异常"),

  /** 认证异常 */
  UNAUTHORIZED_EXCEPTION(4002, "认证异常"),

  /** 验证异常 */
  VIOLATION_EXCEPTION(4003, "验证异常");

  private final int value;

  private final String reason;

  ResultCode(final int value, final String reason) {
    this.value = value;
    this.reason = reason;
  }

  public int getValue() {
    return this.value;
  }

  public String getReason() {
    return this.reason;
  }

  public String format(final Object... objects) {
    return objects.length > 0 ? String.format(this.getReason(), objects) : this.getReason();
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/response/ResultGenerator.java
================================================
package com.msy.plus.core.response;

import org.springframework.http.HttpStatus;

/**
 * 响应结果生成工具
 *
 * @author MoShuying
 * @date 2018/06/09
 */
public class ResultGenerator {
  /**
   * 成功响应结果
   *
   * @param data 内容
   * @return 响应结果
   */
  public static <T> Result<T> genOkResult(final T data) {
    return new Result<T>().setCode(HttpStatus.OK.value()).setData(data);
  }

  /**
   * 成功响应结果
   *
   * @return 响应结果
   */
  public static <T> Result<T> genOkResult() {
    return ResultGenerator.genOkResult(null);
  }

  /**
   * 失败响应结果
   *
   * @param code 状态码
   * @param message 消息
   * @return 响应结果
   */
  public static <T> Result<T> genFailedResult(
      final int code, final String message, final Object... objects) {
    return new Result<T>().setCode(code).setMessage(String.format(message, objects));
  }

  /**
   * 失败响应结果
   *
   * @param resultCode 状态码枚举
   * @return 响应结果
   */
  public static <T> Result<T> genFailedResult(final ResultCode resultCode) {
    return ResultGenerator.genFailedResult(resultCode.getValue(), resultCode.getReason());
  }

  /**
   * 失败响应结果
   *
   * @param resultCode 状态码枚举
   * @param message 消息
   * @return 响应结果
   */
  public static <T> Result<T> genFailedResult(
      final ResultCode resultCode, final String message, final Object... objects) {
    return ResultGenerator.genFailedResult(resultCode.getValue(), message, objects);
  }

  /**
   * 失败响应结果
   *
   * @param message 消息
   * @return 响应结果
   */
  public static <T> Result<T> genFailedResult(final String message, final Object... objects) {
    return ResultGenerator.genFailedResult(
        ResultCode.SUCCEED_REQUEST_FAILED_RESULT.getValue(), message, objects);
  }

  /**
   * 失败响应结果
   *
   * @return 响应结果
   */
  public static <T> Result<T> genFailedResult() {
    return ResultGenerator.genFailedResult(ResultCode.SUCCEED_REQUEST_FAILED_RESULT);
  }
}


================================================
FILE: back/src/main/java/com/msy/plus/core/rsa/RsaConfigurationProperties.java
================================================
package com.msy.plus.core.rsa;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * RSA 配置
 *
 * @author MoShuying
 * @date 2019/08/12
 */
@Data
@Component
@ConfigurationProperties(prefix = "rsa")
public class RsaConfigurationProperties {
  /** 公钥头 */
  private String publicKeyHead = "-----BEGIN PUBLIC KEY-----";

  /** 公钥尾 */
  private String publicKeyTail = "-----END PUBLIC KEY-----";

  /** 私钥头 */
  private String privateKeyHead = "-----BEGIN PRIVATE KEY-----";

  /** 私钥尾 */
  private String privateKeyTail = "-----END PRIVATE KEY-----";

  /** 公钥位置,默认在 rsa 文件夹下 */
  private String publicKeyPath = "classpath:rsa/public-key.pem";

  /** 私钥位置,默认在 rsa 文件夹下 */
  private String privateKeyPath = "classpath:rsa/private-key.pem";

  /** 使用文件还是直接使用字符串,默认使用字符串 */
  private boolean useFile = false;

  /** 私钥 */
  private String privateKey;

  /** 公钥 */
  private String publicKey;
}


================================================
FILE: back/src/main/java/com/msy/plus/core/rsa/RsaUtils.java
================================================
package com.msy.plus.core.rsa;

import com.msy.plus.core.exception.RsaException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.binary.Base64;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.stereotype.Component;
import org.springframework.util.FileCopyUtils;

import javax.crypto.Cipher;
import java.io.IOException;
import java.security.*;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.util.Optional;

/**
 * RSA 工具
 *
 * <p>用openssl生成512位RSA:
 *
 * <p>生成私钥: openssl genrsa -out key.pem 512
 *
 * <p>从私钥中导出公钥: openssl rsa -in key.pem -pubout -out public-key.pem
 *
 * <p>公钥加密: openssl rsautl -encrypt -in xx.file -inkey public-key.pem -pubin -out xx.en
 *
 * <p>私钥解密: openssl rsautl -decrypt -in xx.en -inkey key.pem -out xx.de
 *
 * <p>pkcs8编码(Java): openssl pkcs8 -topk8 -inform PEM -in key.pem -outform PEM -out private-key.pem
 * -nocrypt
 *
 * <p>最后将公私玥放在/resources/rsa/:private-key.pem public-key.pem
 *
 * @author MoShuying
 * @date 2018/07/20
 */
@Slf4j
@Component
public class RsaUtils {
  private static final String ALGORITHM = "RSA";
  private final ResourceLoader resourceLoader = new DefaultResourceLoader();
  @javax.annotation.Resource private RsaConfigurationProperties rsaProperties;

  public RsaUtils() {
    if (!Optional.ofNullable(this.rsaProperties).isPresent()) {
      this.rsaProperties = new RsaConfigurationProperties();
    }
  }

  /**
   * 生成密钥对
   *
   * @param keyLength 密钥长度(最少512位)
   * @return 密钥对 公钥 keyPair.getPublic() 私钥 keyPair.getPrivate()
   * @throws Exception e
   */
  public static KeyPair genKeyPair(final int keyLength) throws Exception {
    final KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(RsaUtils.ALGORITHM);
    keyPairGenerator.initialize(keyLength);
    return keyPairGenerator.generateKeyPair();
  }

  /**
   * 公钥加密
   *
   * @param content 待加密数据
   * @param publicKey 公钥
   * @return 加密内容
   * @throws Exception e
   */
  public static byte[] encrypt(final byte[] content, final PublicKey publicKey) throws Exception {
    final Cipher cipher = Cipher.getInstance(RsaUtils.ALGORITHM);
    cipher.init(Cipher.ENCRYPT_MODE, publicKey);
    return cipher.doFinal(content);
  }

  /**
   * 私钥解密
   *
   * @param content 加密数据
   * @param privateKey 私钥
   * @return 解密内容
   * @throws Exception e
   */
  public static byte[] decrypt(final byte[] content, final PrivateKey privateKey) throws Exception {
    final Cipher cipher = Cipher.getInstance(RsaUtils.ALGORITHM);
    cipher.init(Cipher.DECRYPT_MODE, privateKey);
    return cipher.doFinal(content);
  }

  /**
   * 公钥加密
   *
   * @param content 待加密数据
   * @return 加密内容
   * @throws Exception e
   */
  public byte[] encrypt(final byte[] content) throws Exception {
    return RsaUtils.encrypt(content, this.loadPublicKey());
  }

  /**
   * 私钥解密
   *
   * @param content 加密数据
   * @return 解密内容
   * @throws Exception e
   */
  public byte[] decrypt(final byte[] content) throws Exception {
    return RsaUtils.decrypt(content, this.loadPrivateKey());
  }
  /**
   * 加载pem格式X509编码的公钥
   *
   * @return 公钥
   */
  public PublicKey loadPublicKey() throws RsaException {
    final byte[] decoded;
    if (this.rsaProperties.isUseFile()) {
      decoded =
          this.loadAndReplaceAndDecodeByBase64(
              this.rsaProperties.getPublicKeyPath(),
              this.rsaProperties.getPublicKeyHead(),
              this
Download .txt
gitextract_6d5po4kp/

├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── dependabot.yml
│   └── workflows/
│       ├── blank.yml
│       └── codeql-analysis.yml
├── .gitignore
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── back/
│   ├── .gitignore
│   ├── LICENSE
│   ├── README-zh.md
│   ├── README.md
│   ├── pom.xml
│   ├── resetDB.sh
│   └── src/
│       ├── main/
│       │   ├── java/
│       │   │   └── com/
│       │   │       └── msy/
│       │   │           └── plus/
│       │   │               ├── Application.java
│       │   │               ├── aspect/
│       │   │               │   └── ControllerLogAspect.java
│       │   │               ├── controller/
│       │   │               │   ├── AccountController.java
│       │   │               │   ├── AnalysisController.java
│       │   │               │   ├── CustomerFollowUpHistoryController.java
│       │   │               │   ├── CustomerHandoverController.java
│       │   │               │   ├── CustomerManagerController.java
│       │   │               │   ├── DepartmentController.java
│       │   │               │   ├── DictionaryContentsController.java
│       │   │               │   ├── DictionaryDetailsController.java
│       │   │               │   ├── EmployeeController.java
│       │   │               │   ├── PermissionController.java
│       │   │               │   └── RoleController.java
│       │   │               ├── core/
│       │   │               │   ├── cache/
│       │   │               │   │   ├── CacheExpire.java
│       │   │               │   │   └── MyRedisCacheManager.java
│       │   │               │   ├── config/
│       │   │               │   │   ├── JasyptConfig.java
│       │   │               │   │   ├── RedisCacheConfig.java
│       │   │               │   │   ├── RedisConfig.java
│       │   │               │   │   ├── Swagger3Config.java
│       │   │               │   │   ├── ValidatorConfig.java
│       │   │               │   │   ├── WebMvcConfig.java
│       │   │               │   │   ├── WebSecurityConfig.java
│       │   │               │   │   └── YamlPropertySourceFactory.java
│       │   │               │   ├── constant/
│       │   │               │   │   └── ProjectConstant.java
│       │   │               │   ├── dto/
│       │   │               │   │   └── AbstractConverter.java
│       │   │               │   ├── exception/
│       │   │               │   │   ├── ExceptionResolver.java
│       │   │               │   │   ├── ResourcesNotFoundException.java
│       │   │               │   │   ├── RsaException.java
│       │   │               │   │   ├── ServiceException.java
│       │   │               │   │   ├── UsernameNotFoundException2.java
│       │   │               │   │   └── YamlNotFoundException.java
│       │   │               │   ├── jasypt/
│       │   │               │   │   └── MyEncryptablePropertyDetector.java
│       │   │               │   ├── jwt/
│       │   │               │   │   ├── JwtConfigurationProperties.java
│       │   │               │   │   └── JwtUtil.java
│       │   │               │   ├── mapper/
│       │   │               │   │   └── MyMapper.java
│       │   │               │   ├── response/
│       │   │               │   │   ├── Result.java
│       │   │               │   │   ├── ResultCode.java
│       │   │               │   │   └── ResultGenerator.java
│       │   │               │   ├── rsa/
│       │   │               │   │   ├── RsaConfigurationProperties.java
│       │   │               │   │   └── RsaUtils.java
│       │   │               │   ├── service/
│       │   │               │   │   ├── AbstractService.java
│       │   │               │   │   └── Service.java
│       │   │               │   └── upload/
│       │   │               │       └── UploadConfigurationProperties.java
│       │   │               ├── dto/
│       │   │               │   ├── AccountDTO.java
│       │   │               │   ├── AccountLoginDTO.java
│       │   │               │   ├── AnalysisQuery.java
│       │   │               │   ├── CustomerHandoverList.java
│       │   │               │   ├── CustomerManagerList.java
│       │   │               │   ├── LoginResultDTO.java
│       │   │               │   ├── RoleDTO.java
│       │   │               │   └── RoleWithPermissionDTO.java
│       │   │               ├── entity/
│       │   │               │   ├── AccountDO.java
│       │   │               │   ├── AccountWithRoleDO.java
│       │   │               │   ├── Analysis.java
│       │   │               │   ├── CFUHSearch.java
│       │   │               │   ├── CustomerFollowUpHistory.java
│       │   │               │   ├── CustomerHandover.java
│       │   │               │   ├── CustomerManager.java
│       │   │               │   ├── Department.java
│       │   │               │   ├── DictionaryContents.java
│       │   │               │   ├── DictionaryDetails.java
│       │   │               │   ├── Employee.java
│       │   │               │   ├── EmployeeDetail.java
│       │   │               │   ├── EmployeeWithRoleDO.java
│       │   │               │   ├── LoginResultDO.java
│       │   │               │   ├── Permission.java
│       │   │               │   ├── RoleDO.java
│       │   │               │   ├── RolePermissionDO.java
│       │   │               │   ├── RoleWithPermissionDO.java
│       │   │               │   └── Test.java
│       │   │               ├── filter/
│       │   │               │   ├── AuthenticationFilter.java
│       │   │               │   ├── CorsFilter.java
│       │   │               │   ├── MyAuthenticationEntryPoint.java
│       │   │               │   └── RequestWrapper.java
│       │   │               ├── mapper/
│       │   │               │   ├── AccountMapper.java
│       │   │               │   ├── CustomerFollowUpHistoryMapper.java
│       │   │               │   ├── CustomerHandoverMapper.java
│       │   │               │   ├── CustomerManagerMapper.java
│       │   │               │   ├── DepartmentMapper.java
│       │   │               │   ├── DictionaryContentsMapper.java
│       │   │               │   ├── DictionaryDetailsMapper.java
│       │   │               │   ├── EmployeeMapper.java
│       │   │               │   ├── PermissionMapper.java
│       │   │               │   └── RoleMapper.java
│       │   │               ├── query/
│       │   │               │   └── AccountQuery.java
│       │   │               ├── service/
│       │   │               │   ├── AccountService.java
│       │   │               │   ├── CustomerFollowUpHistoryService.java
│       │   │               │   ├── CustomerHandoverService.java
│       │   │               │   ├── CustomerManagerService.java
│       │   │               │   ├── DepartmentService.java
│       │   │               │   ├── DictionaryContentsService.java
│       │   │               │   ├── DictionaryDetailsService.java
│       │   │               │   ├── EmployeeService.java
│       │   │               │   ├── PermissionService.java
│       │   │               │   ├── RoleService.java
│       │   │               │   └── impl/
│       │   │               │       ├── AccountServiceImpl.java
│       │   │               │       ├── CustomerFollowUpHistoryServiceImpl.java
│       │   │               │       ├── CustomerHandoverServiceImpl.java
│       │   │               │       ├── CustomerManagerServiceImpl.java
│       │   │               │       ├── DepartmentServiceImpl.java
│       │   │               │       ├── DictionaryContentsServiceImpl.java
│       │   │               │       ├── DictionaryDetailsServiceImpl.java
│       │   │               │       ├── EmployeeServiceImpl.java
│       │   │               │       ├── PermissionServiceImpl.java
│       │   │               │       ├── RoleServiceImpl.java
│       │   │               │       └── UserDetailsServiceImpl.java
│       │   │               └── util/
│       │   │                   ├── AssertUtils.java
│       │   │                   ├── ContextUtils.java
│       │   │                   ├── DateUtils.java
│       │   │                   ├── FileUtils.java
│       │   │                   ├── IdCardUtils.java
│       │   │                   ├── IdUtils.java
│       │   │                   ├── IpUtils.java
│       │   │                   ├── JsonUtils.java
│       │   │                   ├── RedisUtils.java
│       │   │                   └── UrlUtils.java
│       │   └── resources/
│       │       ├── META-INF/
│       │       │   ├── spring-devtools.yml
│       │       │   └── swagger3.yml
│       │       ├── application-dev.yml
│       │       ├── application-test.yml
│       │       ├── application.yml
│       │       ├── banner.txt
│       │       ├── mapper/
│       │       │   ├── AccountMapper.xml
│       │       │   ├── CustomerFollowUpHistoryMapper.xml
│       │       │   ├── CustomerHandoverMapper.xml
│       │       │   ├── CustomerManagerMapper.xml
│       │       │   ├── DepartmentMapper.xml
│       │       │   ├── DictionaryContentsMapper.xml
│       │       │   ├── DictionaryDetailsMapper.xml
│       │       │   ├── EmployeeMapper.xml
│       │       │   ├── PermissionMapper.xml
│       │       │   └── RoleMapper.xml
│       │       └── rsa/
│       │           ├── private-key.pem
│       │           └── public-key.pem
│       └── test/
│           ├── java/
│           │   ├── CodeGenerator.java
│           │   ├── JasyptStringEncryptor.java
│           │   ├── PasswordEncryptor.java
│           │   ├── RsaEncryptor.java
│           │   └── com/
│           │       └── msy/
│           │           └── plus/
│           │               ├── AccountControllerTest.java
│           │               ├── BaseControllerTest.java
│           │               ├── WithCustomSecurityContextFactory.java
│           │               ├── WithCustomUser.java
│           │               └── util/
│           │                   └── JsonUtilsTest.java
│           ├── resources/
│           │   ├── generator/
│           │   │   └── template/
│           │   │       ├── controller-restful.ftl
│           │   │       ├── controller.ftl
│           │   │       ├── service-impl.ftl
│           │   │       └── service.ftl
│           │   └── sql/
│           │       └── dev/
│           │           ├── account.sql
│           │           ├── account_role.sql
│           │           └── role.sql
│           └── rest-test/
│               └── upload.http
├── docs/
│   ├── CRM需求模拟.docx
│   ├── JAVA实训方案-CRM(10天)-高级.docx
│   ├── crm商业计划书.pptx
│   ├── 员工信息模板.xlsx
│   └── 项目需求文档.docx
├── front/
│   ├── .github/
│   │   └── ISSUE_TEMPLATE/
│   │       ├── bug_report.md
│   │       └── feature_request.md
│   ├── .gitignore
│   ├── LICENSE
│   ├── README.en-US.md
│   ├── README.md
│   ├── babel.config.js
│   ├── docs/
│   │   ├── .vuepress/
│   │   │   ├── components/
│   │   │   │   ├── Alert.vue
│   │   │   │   ├── Color.vue
│   │   │   │   └── ColorList.vue
│   │   │   ├── config.js
│   │   │   ├── plugins/
│   │   │   │   └── alert/
│   │   │   │       ├── Alert.vue
│   │   │   │       ├── alertMixin.js
│   │   │   │       ├── clientRootMixin.js
│   │   │   │       ├── enhanceApp.js
│   │   │   │       └── index.js
│   │   │   └── styles/
│   │   │       ├── index.styl
│   │   │       └── palette.styl
│   │   ├── README.md
│   │   ├── advance/
│   │   │   ├── README.md
│   │   │   ├── api.md
│   │   │   ├── async.md
│   │   │   ├── authority.md
│   │   │   ├── chart.md
│   │   │   ├── error.md
│   │   │   ├── guard.md
│   │   │   ├── i18n.md
│   │   │   ├── interceptors.md
│   │   │   ├── login.md
│   │   │   ├── skill.md
│   │   │   └── theme.md
│   │   ├── develop/
│   │   │   ├── README.md
│   │   │   ├── layout.md
│   │   │   ├── mock.md
│   │   │   ├── page.md
│   │   │   ├── router.md
│   │   │   ├── service.md
│   │   │   └── theme.md
│   │   ├── other/
│   │   │   ├── README.md
│   │   │   ├── community.md
│   │   │   └── upgrade.md
│   │   └── start/
│   │       ├── README.md
│   │       ├── faq.md
│   │       └── use.md
│   ├── package.json
│   ├── public/
│   │   └── index.html
│   ├── src/
│   │   ├── App.vue
│   │   ├── bootstrap.js
│   │   ├── components/
│   │   │   ├── cache/
│   │   │   │   └── AKeepAlive.js
│   │   │   ├── card/
│   │   │   │   └── ChartCard.vue
│   │   │   ├── chart/
│   │   │   │   ├── Bar.vue
│   │   │   │   ├── MiniArea.vue
│   │   │   │   ├── MiniBar.vue
│   │   │   │   ├── MiniProgress.vue
│   │   │   │   ├── Radar.vue
│   │   │   │   ├── RankingList.vue
│   │   │   │   ├── Trend.vue
│   │   │   │   └── index.less
│   │   │   ├── checkbox/
│   │   │   │   ├── ColorCheckbox.vue
│   │   │   │   ├── ImgCheckbox.vue
│   │   │   │   └── index.js
│   │   │   ├── exception/
│   │   │   │   ├── ExceptionPage.vue
│   │   │   │   └── typeConfig.js
│   │   │   ├── form/
│   │   │   │   └── FormRow.vue
│   │   │   ├── input/
│   │   │   │   └── IInput.vue
│   │   │   ├── menu/
│   │   │   │   ├── Contextmenu.vue
│   │   │   │   ├── SideMenu.vue
│   │   │   │   ├── index.less
│   │   │   │   └── menu.js
│   │   │   ├── page/
│   │   │   │   └── header/
│   │   │   │       ├── PageHeader.vue
│   │   │   │       └── index.less
│   │   │   ├── result/
│   │   │   │   └── Result.vue
│   │   │   ├── setting/
│   │   │   │   ├── Setting.vue
│   │   │   │   ├── SettingItem.vue
│   │   │   │   └── i18n.js
│   │   │   ├── table/
│   │   │   │   ├── StandardTable.vue
│   │   │   │   ├── advance/
│   │   │   │   │   ├── ActionColumns.vue
│   │   │   │   │   ├── ActionSize.vue
│   │   │   │   │   ├── AdvanceTable.vue
│   │   │   │   │   ├── SearchArea.vue
│   │   │   │   │   └── index.js
│   │   │   │   └── api/
│   │   │   │       └── ApiTable.vue
│   │   │   ├── task/
│   │   │   │   ├── TaskGroup.vue
│   │   │   │   └── TaskItem.vue
│   │   │   ├── tool/
│   │   │   │   ├── AStepItem.vue
│   │   │   │   ├── AvatarList.vue
│   │   │   │   ├── DetailList.vue
│   │   │   │   ├── Drawer.vue
│   │   │   │   ├── FooterToolBar.vue
│   │   │   │   ├── HeadInfo.vue
│   │   │   │   ├── TagSelect.vue
│   │   │   │   └── TagSelectOption.vue
│   │   │   └── transition/
│   │   │       └── PageToggleTransition.vue
│   │   ├── config/
│   │   │   ├── config.js
│   │   │   ├── default/
│   │   │   │   ├── admin.config.js
│   │   │   │   ├── animate.config.js
│   │   │   │   ├── antd.config.js
│   │   │   │   ├── index.js
│   │   │   │   └── setting.config.js
│   │   │   ├── index.js
│   │   │   └── replacer/
│   │   │       ├── index.js
│   │   │       └── resolve.config.js
│   │   ├── layouts/
│   │   │   ├── AdminLayout.vue
│   │   │   ├── BlankView.vue
│   │   │   ├── CommonLayout.vue
│   │   │   ├── PageLayout.vue
│   │   │   ├── PageView.vue
│   │   │   ├── footer/
│   │   │   │   └── PageFooter.vue
│   │   │   ├── header/
│   │   │   │   ├── AdminHeader.vue
│   │   │   │   ├── HeaderAvatar.vue
│   │   │   │   ├── HeaderNotice.vue
│   │   │   │   ├── HeaderSearch.vue
│   │   │   │   └── index.less
│   │   │   └── tabs/
│   │   │       ├── TabsHead.vue
│   │   │       ├── TabsView.vue
│   │   │       ├── i18n.js
│   │   │       └── index.js
│   │   ├── main.js
│   │   ├── mock/
│   │   │   ├── common/
│   │   │   │   ├── activityData.js
│   │   │   │   ├── index.js
│   │   │   │   └── tableData.js
│   │   │   ├── goods/
│   │   │   │   └── index.js
│   │   │   ├── index.js
│   │   │   ├── user/
│   │   │   │   ├── login.js
│   │   │   │   └── routes.js
│   │   │   └── workplace/
│   │   │       └── index.js
│   │   ├── pages/
│   │   │   ├── analysis/
│   │   │   │   └── index.vue
│   │   │   ├── components/
│   │   │   │   ├── Palette.vue
│   │   │   │   ├── TaskCard.vue
│   │   │   │   └── table/
│   │   │   │       ├── Api.vue
│   │   │   │       ├── Table.vue
│   │   │   │       └── index.js
│   │   │   ├── customer/
│   │   │   │   ├── followHistory.vue
│   │   │   │   ├── handoverHistory.vue
│   │   │   │   ├── manager.vue
│   │   │   │   ├── official.vue
│   │   │   │   └── resource.vue
│   │   │   ├── dashboard/
│   │   │   │   └── workplace/
│   │   │   │       ├── WorkPlace.vue
│   │   │   │       ├── i18n.js
│   │   │   │       ├── index.js
│   │   │   │       └── index.less
│   │   │   ├── department/
│   │   │   │   └── index.vue
│   │   │   ├── dictionary/
│   │   │   │   ├── contents.vue
│   │   │   │   └── details.vue
│   │   │   ├── employee/
│   │   │   │   └── index.vue
│   │   │   ├── exception/
│   │   │   │   ├── 403.vue
│   │   │   │   ├── 404.vue
│   │   │   │   └── 500.vue
│   │   │   ├── login/
│   │   │   │   ├── Login.vue
│   │   │   │   └── index.js
│   │   │   ├── permission/
│   │   │   │   └── index.vue
│   │   │   ├── result/
│   │   │   │   ├── Error.vue
│   │   │   │   └── Success.vue
│   │   │   └── role/
│   │   │       └── index.vue
│   │   ├── plugins/
│   │   │   ├── authority-plugin.js
│   │   │   ├── i18n-extend.js
│   │   │   ├── index.js
│   │   │   └── tabs-page-plugin.js
│   │   ├── router/
│   │   │   ├── async/
│   │   │   │   ├── config.async.js
│   │   │   │   └── router.map.js
│   │   │   ├── config.js
│   │   │   ├── guards.js
│   │   │   ├── i18n.js
│   │   │   └── index.js
│   │   ├── services/
│   │   │   ├── analysis.js
│   │   │   ├── api.js
│   │   │   ├── customerFollowUpHistory.js
│   │   │   ├── customerHandover.js
│   │   │   ├── customerManager.js
│   │   │   ├── dataSource.js
│   │   │   ├── department.js
│   │   │   ├── dictionaryContents.js
│   │   │   ├── dictionaryDetails.js
│   │   │   ├── employee.js
│   │   │   ├── index.js
│   │   │   ├── permission.js
│   │   │   ├── role.js
│   │   │   └── user.js
│   │   ├── store/
│   │   │   ├── index.js
│   │   │   └── modules/
│   │   │       ├── account.js
│   │   │       ├── index.js
│   │   │       └── setting.js
│   │   ├── theme/
│   │   │   ├── antd/
│   │   │   │   ├── ant-menu.less
│   │   │   │   ├── ant-message.less
│   │   │   │   ├── ant-table.less
│   │   │   │   ├── ant-time-picker.less
│   │   │   │   └── index.less
│   │   │   ├── default/
│   │   │   │   ├── color.less
│   │   │   │   ├── index.less
│   │   │   │   ├── nprogress.less
│   │   │   │   └── style.less
│   │   │   ├── index.less
│   │   │   └── theme.less
│   │   └── utils/
│   │       ├── Objects.js
│   │       ├── authority-utils.js
│   │       ├── axios-interceptors.js
│   │       ├── colors.js
│   │       ├── formatter.js
│   │       ├── i18n.js
│   │       ├── request.js
│   │       ├── routerUtil.js
│   │       ├── theme-color-replacer-extend.js
│   │       ├── themeUtil.js
│   │       ├── util.js
│   │       └── validators.js
│   └── vue.config.js
└── mysql/
    ├── dev.sql
    └── prod.sql
Download .txt
SYMBOL INDEX (814 symbols across 169 files)

FILE: back/src/main/java/com/msy/plus/Application.java
  class Application (line 22) | @EnableCaching
    method main (line 30) | public static void main(final String[] args) {
    method configure (line 35) | @Override

FILE: back/src/main/java/com/msy/plus/aspect/ControllerLogAspect.java
  class ControllerLogAspect (line 25) | @Aspect
    method controllers (line 31) | @Pointcut("execution(* " + CONTROLLER_PACKAGE + "..*.*(..))")
    method doBefore (line 39) | @Before("controllers()")
    method doAfterReturning (line 63) | @AfterReturning(pointcut = "controllers()", returning = "result")
    method doAfterThrowing (line 77) | @AfterThrowing(pointcut = "controllers()", throwing = "e")

FILE: back/src/main/java/com/msy/plus/controller/AccountController.java
  class AccountController (line 34) | @Slf4j
    method register (line 44) | @Operation(summary = "账户注册", description = "注册账户,签发token")
    method login (line 65) | @Operation(summary = "账户登录", description = "账户登录,签发token")
    method logout (line 102) | @Operation(summary = "账户注销", description = "账户注销,使token失效")
    method update (line 111) | @PreAuthorize("#accountDTO.name == authentication.name or hasAuthority...
    method delete (line 120) | @PreAuthorize("hasAuthority('ADMIN')" +

FILE: back/src/main/java/com/msy/plus/controller/AnalysisController.java
  class AnalysisController (line 26) | @PreAuthorize(
    method listAndSearch (line 62) | @Operation(description = "统计分析")

FILE: back/src/main/java/com/msy/plus/controller/CustomerFollowUpHistoryController.java
  class CustomerFollowUpHistoryController (line 29) | @PreAuthorize("hasAuthority('ADMIN')")
    method add (line 36) | @Operation(description = "客户跟进记录添加")
    method update (line 56) | @Operation(description = "客户跟进记录更新")
    method detail (line 63) | @Operation(description = "客户跟进记录获取详细信息")
    method list (line 70) | @Operation(description = "客户跟进记录分页查询")

FILE: back/src/main/java/com/msy/plus/controller/CustomerHandoverController.java
  class CustomerHandoverController (line 29) | @PreAuthorize(
    method add (line 64) | @Operation(description = "移交历史添加")
    method list (line 98) | @Operation(description = "移交历史分页查询")

FILE: back/src/main/java/com/msy/plus/controller/CustomerManagerController.java
  class CustomerManagerController (line 27) | @PreAuthorize(
    method add (line 62) | @Operation(description = "客户管理添加")
    method update (line 83) | @Operation(description = "客户管理更新")
    method detail (line 90) | @Operation(description = "客户管理获取详细信息")
    method list (line 97) | @Operation(description = "客户管理分页查询")

FILE: back/src/main/java/com/msy/plus/controller/DepartmentController.java
  class DepartmentController (line 24) | @PreAuthorize(
    method add (line 41) | @Operation(description = "部门添加")
    method delete (line 48) | @Operation(description = "部门删除")
    method update (line 55) | @Operation(description = "部门更新")
    method detail (line 62) | @Operation(description = "获取部门详细信息")
    method list (line 69) | @Operation(description = "分页查询部门")

FILE: back/src/main/java/com/msy/plus/controller/DictionaryContentsController.java
  class DictionaryContentsController (line 25) | @PreAuthorize("hasAuthority('ADMIN')")
    method add (line 33) | @Operation(description = "数据字典添加")
    method update (line 47) | @Operation(description = "数据字典更新")
    method detail (line 54) | @Operation(description = "数据字典获取详细信息")
    method list (line 61) | @Operation(description = "数据字典分页查询")

FILE: back/src/main/java/com/msy/plus/controller/DictionaryDetailsController.java
  class DictionaryDetailsController (line 25) | @PreAuthorize("hasAuthority('ADMIN')")
    method add (line 33) | @Operation(description = "数据字典明细添加")
    method update (line 47) | @Operation(description = "数据字典明细更新")
    method detail (line 54) | @Operation(description = "数据字典明细获取详细信息")
    method list (line 61) | @Operation(description = "数据字典明细分页查询")

FILE: back/src/main/java/com/msy/plus/controller/EmployeeController.java
  class EmployeeController (line 33) | @PreAuthorize(
    method add (line 69) | @Operation(description = "员工添加")
    method delete (line 100) | @Operation(description = "员工删除")
    method update (line 108) | @Operation(description = "员工更新")
    method detail (line 170) | @Operation(description = "员工获取详细信息")
    method list (line 178) | @Operation(description = "员工分页查询")

FILE: back/src/main/java/com/msy/plus/controller/PermissionController.java
  class PermissionController (line 24) | @PreAuthorize("hasAuthority('ADMIN')")
    method delete (line 39) | @Operation(description = "权限删除")
    method list (line 60) | @Operation(description = "权限分页查询")

FILE: back/src/main/java/com/msy/plus/controller/RoleController.java
  class RoleController (line 29) | @PreAuthorize("hasAuthority('ADMIN')")
    method add (line 36) | @Operation(description = "角色添加")
    method delete (line 53) | @Operation(description = "角色删除")
    method update (line 64) | @Operation(description = "角色更新")
    method detail (line 111) | @Operation(description = "角色详情")
    method list (line 118) | @Operation(description = "角色列表")

FILE: back/src/main/java/com/msy/plus/core/cache/MyRedisCacheManager.java
  class MyRedisCacheManager (line 36) | @Slf4j
    method MyRedisCacheManager (line 60) | public MyRedisCacheManager(
    method MyRedisCacheManager (line 65) | public MyRedisCacheManager(
    method getCache (line 72) | @Override
    method setApplicationContext (line 78) | @Override
    method afterPropertiesSet (line 84) | @Override
    method loadCaches (line 94) | @NonNull
    method add (line 105) | private void add(final Class clazz) {
    method add (line 140) | private void add(final String[] cacheNames, final CacheExpire cacheExp...
    class RedisCacheWrapper (line 163) | protected static class RedisCacheWrapper implements Cache {
      method RedisCacheWrapper (line 166) | RedisCacheWrapper(final Cache cache) {
      method getName (line 170) | @Override
      method getNativeCache (line 181) | @Override
      method get (line 192) | @Override
      method get (line 203) | @Override
      method get (line 214) | @Override
      method put (line 225) | @Override
      method putIfAbsent (line 235) | @Override
      method evict (line 246) | @Override
      method clear (line 256) | @Override

FILE: back/src/main/java/com/msy/plus/core/config/JasyptConfig.java
  class JasyptConfig (line 20) | @Configuration
    method myStringEncryptor (line 27) | @Bean

FILE: back/src/main/java/com/msy/plus/core/config/RedisCacheConfig.java
  class RedisCacheConfig (line 30) | @Slf4j
    method cacheManager (line 38) | @Bean
    method keyGenerator (line 62) | @Bean
    method errorHandler (line 96) | @Bean

FILE: back/src/main/java/com/msy/plus/core/config/RedisConfig.java
  class RedisConfig (line 27) | @Configuration
    method jedisPoolConfig (line 31) | @Bean
    method redisConnectionFactory (line 37) | @Bean
    method redisTemplate (line 70) | @Bean

FILE: back/src/main/java/com/msy/plus/core/config/Swagger3Config.java
  class Swagger3Config (line 26) | @PropertySource(
    method apiInfo (line 65) | private ApiInfo apiInfo() {
    method docket (line 77) | @Bean
    method securitySchemes (line 92) | private List<SecurityScheme> securitySchemes(){
    method securityContexts (line 96) | private List<SecurityContext> securityContexts() {
    method defaultAuth (line 105) | private List<SecurityReference> defaultAuth() {

FILE: back/src/main/java/com/msy/plus/core/config/ValidatorConfig.java
  class ValidatorConfig (line 19) | @Configuration
    method methodValidationPostProcessor (line 21) | @Bean
    method validatorFailFast (line 31) | @Bean

FILE: back/src/main/java/com/msy/plus/core/config/WebMvcConfig.java
  class WebMvcConfig (line 23) | @Configuration
    method configureMessageConverters (line 26) | @Override
    method addResourceHandlers (line 50) | @Override
    method addViewControllers (line 67) | @Override

FILE: back/src/main/java/com/msy/plus/core/config/WebSecurityConfig.java
  class WebSecurityConfig (line 27) | @Configuration
    method passwordEncoder (line 48) | @Bean
    method userDetailsService (line 54) | @Bean
    method configure (line 60) | @Override
    method configure (line 69) | @Override

FILE: back/src/main/java/com/msy/plus/core/config/YamlPropertySourceFactory.java
  class YamlPropertySourceFactory (line 19) | public class YamlPropertySourceFactory implements PropertySourceFactory {
    method createPropertySource (line 21) | @Override

FILE: back/src/main/java/com/msy/plus/core/constant/ProjectConstant.java
  class ProjectConstant (line 9) | public final class ProjectConstant {

FILE: back/src/main/java/com/msy/plus/core/dto/AbstractConverter.java
  class AbstractConverter (line 15) | public abstract class AbstractConverter<DTO, DO> extends Converter<DTO, ...
    method AbstractConverter (line 20) | public AbstractConverter() {
    method setDTO (line 31) | protected abstract DTO setDTO();
    method doForward (line 33) | @Override
    method doBackward (line 40) | @Override
    method convertToDO (line 47) | public DO convertToDO() {
    method convertFor (line 56) | public DTO convertFor(final DO aDO) {

FILE: back/src/main/java/com/msy/plus/core/exception/ExceptionResolver.java
  class ExceptionResolver (line 33) | @Slf4j
    method validatorException (line 36) | @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
    method serviceException (line 49) | @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
    method resourcesException (line 57) | @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
    method databaseException (line 65) | @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
    method authException (line 73) | @ResponseStatus(HttpStatus.UNAUTHORIZED)
    method accountException (line 81) | @ResponseStatus(HttpStatus.FORBIDDEN)
    method apiNotFoundException (line 89) | @ResponseStatus(HttpStatus.NOT_FOUND)
    method globalException (line 98) | @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)

FILE: back/src/main/java/com/msy/plus/core/exception/ResourcesNotFoundException.java
  class ResourcesNotFoundException (line 9) | public class ResourcesNotFoundException extends RuntimeException {
    method ResourcesNotFoundException (line 14) | public ResourcesNotFoundException() {
    method ResourcesNotFoundException (line 18) | public ResourcesNotFoundException(final String message) {
    method ResourcesNotFoundException (line 22) | public ResourcesNotFoundException(final String message, final Throwabl...

FILE: back/src/main/java/com/msy/plus/core/exception/RsaException.java
  class RsaException (line 9) | public class RsaException extends RuntimeException {
    method RsaException (line 14) | public RsaException() {
    method RsaException (line 18) | public RsaException(final String message) {
    method RsaException (line 22) | public RsaException(final String message, final Throwable cause) {

FILE: back/src/main/java/com/msy/plus/core/exception/ServiceException.java
  class ServiceException (line 11) | public class ServiceException extends RuntimeException {
    method ServiceException (line 16) | public ServiceException(final String message) {
    method ServiceException (line 20) | public ServiceException(final String message, final Throwable cause) {
    method ServiceException (line 24) | public ServiceException(final ResultCode resultCode, final String mess...
    method ServiceException (line 29) | public ServiceException(final ResultCode resultCode) {
    method getResultCode (line 34) | public ResultCode getResultCode() {
    method setResultCode (line 38) | public void setResultCode(final ResultCode resultCode) {

FILE: back/src/main/java/com/msy/plus/core/exception/UsernameNotFoundException2.java
  class UsernameNotFoundException2 (line 11) | public class UsernameNotFoundException2 extends UsernameNotFoundException {
    method UsernameNotFoundException2 (line 16) | public UsernameNotFoundException2() {
    method UsernameNotFoundException2 (line 20) | public UsernameNotFoundException2(final String message) {
    method UsernameNotFoundException2 (line 24) | public UsernameNotFoundException2(final String message, final Throwabl...

FILE: back/src/main/java/com/msy/plus/core/exception/YamlNotFoundException.java
  class YamlNotFoundException (line 9) | public class YamlNotFoundException extends RuntimeException {
    method YamlNotFoundException (line 14) | public YamlNotFoundException() {
    method YamlNotFoundException (line 18) | public YamlNotFoundException(final String message) {
    method YamlNotFoundException (line 22) | public YamlNotFoundException(final String message, final Throwable cau...

FILE: back/src/main/java/com/msy/plus/core/jasypt/MyEncryptablePropertyDetector.java
  class MyEncryptablePropertyDetector (line 23) | @Component
    method isEncrypted (line 30) | @Override
    method unwrapEncryptedValue (line 41) | @Override

FILE: back/src/main/java/com/msy/plus/core/jwt/JwtConfigurationProperties.java
  class JwtConfigurationProperties (line 15) | @Data

FILE: back/src/main/java/com/msy/plus/core/jwt/JwtUtil.java
  class JwtUtil (line 31) | @Slf4j
    method getJwtProperties (line 37) | public JwtConfigurationProperties getJwtProperties(){
    method getName (line 41) | public Optional<String> getName(final String token) {
    method getId (line 45) | public Optional<String> getId(final String token){
    method sign (line 56) | public String sign(
    method invalidRedisToken (line 80) | public void invalidRedisToken(final String name) {
    method getTokenFromRequest (line 88) | public String getTokenFromRequest(final HttpServletRequest httpRequest) {
    method getAuthentication (line 95) | public UsernamePasswordAuthenticationToken getAuthentication(
    method validateToken (line 111) | public boolean validateToken(final String token) {
    method createToken (line 124) | private String createToken(
    method parseToken (line 168) | private Optional<Claims> parseToken(final String token) {

FILE: back/src/main/java/com/msy/plus/core/mapper/MyMapper.java
  type MyMapper (line 14) | public interface MyMapper<T>

FILE: back/src/main/java/com/msy/plus/core/response/Result.java
  class Result (line 11) | @ApiModel(value = "响应结果")
    method toString (line 22) | @Override
    method getCode (line 27) | public Integer getCode() {
    method setCode (line 31) | public Result<T> setCode(final Integer code) {
    method getMessage (line 36) | public String getMessage() {
    method setMessage (line 40) | public Result<T> setMessage(final String message) {
    method getData (line 45) | public T getData() {
    method setData (line 49) | public Result<T> setData(final T data) {

FILE: back/src/main/java/com/msy/plus/core/response/ResultCode.java
  type ResultCode (line 13) | public enum ResultCode {
    method ResultCode (line 45) | ResultCode(final int value, final String reason) {
    method getValue (line 50) | public int getValue() {
    method getReason (line 54) | public String getReason() {
    method format (line 58) | public String format(final Object... objects) {

FILE: back/src/main/java/com/msy/plus/core/response/ResultGenerator.java
  class ResultGenerator (line 11) | public class ResultGenerator {
    method genOkResult (line 18) | public static <T> Result<T> genOkResult(final T data) {
    method genOkResult (line 27) | public static <T> Result<T> genOkResult() {
    method genFailedResult (line 38) | public static <T> Result<T> genFailedResult(
    method genFailedResult (line 49) | public static <T> Result<T> genFailedResult(final ResultCode resultCod...
    method genFailedResult (line 60) | public static <T> Result<T> genFailedResult(
    method genFailedResult (line 71) | public static <T> Result<T> genFailedResult(final String message, fina...
    method genFailedResult (line 81) | public static <T> Result<T> genFailedResult() {

FILE: back/src/main/java/com/msy/plus/core/rsa/RsaConfigurationProperties.java
  class RsaConfigurationProperties (line 13) | @Data

FILE: back/src/main/java/com/msy/plus/core/rsa/RsaUtils.java
  class RsaUtils (line 41) | @Slf4j
    method RsaUtils (line 48) | public RsaUtils() {
    method genKeyPair (line 61) | public static KeyPair genKeyPair(final int keyLength) throws Exception {
    method encrypt (line 75) | public static byte[] encrypt(final byte[] content, final PublicKey pub...
    method decrypt (line 89) | public static byte[] decrypt(final byte[] content, final PrivateKey pr...
    method encrypt (line 102) | public byte[] encrypt(final byte[] content) throws Exception {
    method decrypt (line 113) | public byte[] decrypt(final byte[] content) throws Exception {
    method loadPublicKey (line 121) | public PublicKey loadPublicKey() throws RsaException {
    method loadPrivateKey (line 147) | public PrivateKey loadPrivateKey() throws RsaException {
    method loadAndReplaceAndDecodeByBase64 (line 173) | private byte[] loadAndReplaceAndDecodeByBase64(

FILE: back/src/main/java/com/msy/plus/core/service/AbstractService.java
  class AbstractService (line 23) | public abstract class AbstractService<T> implements Service<T> {
    method AbstractService (line 29) | protected AbstractService() {
    method assertSave (line 35) | private static void assertSave(final boolean statement) {
    method assertDelete (line 39) | private static void assertDelete(final boolean statement) {
    method assertUpdate (line 43) | private static void assertUpdate(final boolean statement) {
    method getEntity (line 47) | private T getEntity(final String fieldName, final Object value) throws...
    method assertById (line 55) | @Override
    method assertBy (line 61) | @Override
    method assertByIds (line 66) | @Override
    method countByIds (line 75) | @Override
    method countByCondition (line 80) | @Override
    method save (line 85) | @Override
    method save (line 90) | @Override
    method deleteById (line 95) | @Override
    method deleteBy (line 101) | @Override
    method deleteByIds (line 112) | @Override
    method deleteByCondition (line 118) | @Override
    method update (line 124) | @Override
    method updateByCondition (line 129) | @Override
    method getById (line 134) | @Override
    method getBy (line 139) | @Override
    method listByIds (line 149) | @Override
    method listByCondition (line 154) | @Override
    method listAll (line 159) | @Override

FILE: back/src/main/java/com/msy/plus/core/service/Service.java
  type Service (line 15) | public interface Service<T> {
    method assertById (line 22) | void assertById(Object id);
    method assertBy (line 30) | void assertBy(T entity);
    method assertByIds (line 37) | void assertByIds(String ids);
    method countByIds (line 44) | int countByIds(String ids);
    method countByCondition (line 51) | int countByCondition(Condition condition);
    method save (line 58) | void save(T entity);
    method save (line 65) | void save(List<T> entities);
    method deleteById (line 72) | void deleteById(Object id);
    method deleteBy (line 81) | void deleteBy(String fieldName, Object value) throws TooManyResultsExc...
    method deleteByIds (line 88) | void deleteByIds(String ids);
    method deleteByCondition (line 95) | void deleteByCondition(Condition condition);
    method update (line 102) | void update(T entity);
    method updateByCondition (line 110) | void updateByCondition(T entity, Condition condition);
    method getById (line 118) | T getById(Object id);
    method getBy (line 128) | T getBy(String fieldName, Object value) throws TooManyResultsException;
    method listByIds (line 136) | List<T> listByIds(String ids);
    method listByCondition (line 144) | List<T> listByCondition(Condition condition);
    method listAll (line 151) | List<T> listAll();

FILE: back/src/main/java/com/msy/plus/core/upload/UploadConfigurationProperties.java
  class UploadConfigurationProperties (line 14) | @Data

FILE: back/src/main/java/com/msy/plus/dto/AccountDTO.java
  class AccountDTO (line 18) | @Data
    method setDTO (line 41) | @Override

FILE: back/src/main/java/com/msy/plus/dto/AccountLoginDTO.java
  class AccountLoginDTO (line 17) | @Data
    method setDTO (line 34) | @Override

FILE: back/src/main/java/com/msy/plus/dto/AnalysisQuery.java
  class AnalysisQuery (line 8) | @Getter

FILE: back/src/main/java/com/msy/plus/dto/CustomerHandoverList.java
  class CustomerHandoverList (line 8) | @Getter

FILE: back/src/main/java/com/msy/plus/dto/CustomerManagerList.java
  class CustomerManagerList (line 12) | @Getter

FILE: back/src/main/java/com/msy/plus/dto/LoginResultDTO.java
  class LoginResultDTO (line 14) | @Getter
    method setUserName (line 37) | public void setUserName(String name) {
    method LoginResultDTO (line 41) | public LoginResultDTO() {
    method setDTO (line 64) | @Override

FILE: back/src/main/java/com/msy/plus/dto/RoleDTO.java
  class RoleDTO (line 16) | @Data
    method setDTO (line 32) | @Override

FILE: back/src/main/java/com/msy/plus/dto/RoleWithPermissionDTO.java
  class RoleWithPermissionDTO (line 18) | @Getter

FILE: back/src/main/java/com/msy/plus/entity/AccountDO.java
  class AccountDO (line 12) | @Data

FILE: back/src/main/java/com/msy/plus/entity/AccountWithRoleDO.java
  class AccountWithRoleDO (line 14) | @Data

FILE: back/src/main/java/com/msy/plus/entity/Analysis.java
  class Analysis (line 6) | @Getter

FILE: back/src/main/java/com/msy/plus/entity/CFUHSearch.java
  class CFUHSearch (line 9) | @Getter

FILE: back/src/main/java/com/msy/plus/entity/CustomerFollowUpHistory.java
  class CustomerFollowUpHistory (line 6) | @Table(name = "customer_follow_up_history")
    method getId (line 58) | public Integer getId() {
    method setId (line 65) | public void setId(Integer id) {
    method getTracetime (line 74) | public Date getTracetime() {
    method setTracetime (line 83) | public void setTracetime(Date tracetime) {
    method getTracetype (line 92) | public Integer getTracetype() {
    method setTracetype (line 101) | public void setTracetype(Integer tracetype) {
    method getTraceresult (line 110) | public Integer getTraceresult() {
    method setTraceresult (line 119) | public void setTraceresult(Integer traceresult) {
    method getCustomerid (line 128) | public Integer getCustomerid() {
    method setCustomerid (line 137) | public void setCustomerid(Integer customerid) {
    method getInputuser (line 146) | public Integer getInputuser() {
    method setInputuser (line 155) | public void setInputuser(Integer inputuser) {
    method getType (line 164) | public Integer getType() {
    method setType (line 173) | public void setType(Integer type) {
    method getTracedetails (line 182) | public String getTracedetails() {
    method setTracedetails (line 191) | public void setTracedetails(String tracedetails) {
    method getComment (line 198) | public String getComment() {
    method setComment (line 205) | public void setComment(String comment) {

FILE: back/src/main/java/com/msy/plus/entity/CustomerHandover.java
  class CustomerHandover (line 6) | @Table(name = "customer_handover")
    method getId (line 48) | public Integer getId() {
    method setId (line 55) | public void setId(Integer id) {
    method getCustomerid (line 64) | public Integer getCustomerid() {
    method setCustomerid (line 73) | public void setCustomerid(Integer customerid) {
    method getTransuser (line 82) | public Integer getTransuser() {
    method setTransuser (line 91) | public void setTransuser(Integer transuser) {
    method getTranstime (line 98) | public Date getTranstime() {
    method setTranstime (line 105) | public void setTranstime(Date transtime) {
    method getOldseller (line 114) | public Integer getOldseller() {
    method setOldseller (line 123) | public void setOldseller(Integer oldseller) {
    method getNewseller (line 132) | public Integer getNewseller() {
    method setNewseller (line 141) | public void setNewseller(Integer newseller) {
    method getTransreason (line 150) | public String getTransreason() {
    method setTransreason (line 159) | public void setTransreason(String transreason) {

FILE: back/src/main/java/com/msy/plus/entity/CustomerManager.java
  class CustomerManager (line 6) | @Table(name = "customer_manager")
    method getId (line 69) | public Integer getId() {
    method setId (line 76) | public void setId(Integer id) {
    method getName (line 85) | public String getName() {
    method setName (line 94) | public void setName(String name) {
    method getAge (line 103) | public Integer getAge() {
    method setAge (line 112) | public void setAge(Integer age) {
    method getGender (line 121) | public Integer getGender() {
    method setGender (line 130) | public void setGender(Integer gender) {
    method getTel (line 139) | public String getTel() {
    method setTel (line 148) | public void setTel(String tel) {
    method getQq (line 155) | public String getQq() {
    method setQq (line 162) | public void setQq(String qq) {
    method getJob (line 169) | public Integer getJob() {
    method setJob (line 176) | public void setJob(Integer job) {
    method getSource (line 185) | public Integer getSource() {
    method setSource (line 194) | public void setSource(Integer source) {
    method getSeller (line 203) | public Integer getSeller() {
    method setSeller (line 212) | public void setSeller(Integer seller) {
    method getInputuser (line 221) | public Integer getInputuser() {
    method setInputuser (line 230) | public void setInputuser(Integer inputuser) {
    method getInputtime (line 237) | public Date getInputtime() {
    method setInputtime (line 244) | public void setInputtime(Date inputtime) {
    method getStatus (line 253) | public Integer getStatus() {
    method setStatus (line 262) | public void setStatus(Integer status) {
    method getPositivetime (line 271) | public Date getPositivetime() {
    method setPositivetime (line 280) | public void setPositivetime(Date positivetime) {

FILE: back/src/main/java/com/msy/plus/entity/Department.java
  class Department (line 5) | public class Department {
    method getId (line 17) | public Integer getId() {
    method setId (line 24) | public void setId(Integer id) {
    method getSn (line 31) | public String getSn() {
    method setSn (line 38) | public void setSn(String sn) {
    method getName (line 45) | public String getName() {
    method setName (line 52) | public void setName(String name) {

FILE: back/src/main/java/com/msy/plus/entity/DictionaryContents.java
  class DictionaryContents (line 5) | @Table(name = "dictionary_contents")
    method getId (line 29) | public Integer getId() {
    method setId (line 36) | public void setId(Integer id) {
    method getSn (line 45) | public String getSn() {
    method setSn (line 54) | public void setSn(String sn) {
    method getTitle (line 63) | public String getTitle() {
    method setTitle (line 72) | public void setTitle(String title) {
    method getIntro (line 81) | public String getIntro() {
    method setIntro (line 90) | public void setIntro(String intro) {

FILE: back/src/main/java/com/msy/plus/entity/DictionaryDetails.java
  class DictionaryDetails (line 5) | @Table(name = "dictionary_details")
    method getId (line 27) | public Integer getId() {
    method setId (line 34) | public void setId(Integer id) {
    method getTitle (line 43) | public String getTitle() {
    method setTitle (line 52) | public void setTitle(String title) {
    method getSequence (line 61) | public Integer getSequence() {
    method setSequence (line 70) | public void setSequence(Integer sequence) {
    method getParentid (line 77) | public Integer getParentid() {
    method setParentid (line 84) | public void setParentid(Integer parentid) {

FILE: back/src/main/java/com/msy/plus/entity/Employee.java
  class Employee (line 9) | @Getter

FILE: back/src/main/java/com/msy/plus/entity/EmployeeDetail.java
  class EmployeeDetail (line 6) | @Getter

FILE: back/src/main/java/com/msy/plus/entity/EmployeeWithRoleDO.java
  class EmployeeWithRoleDO (line 5) | @Getter

FILE: back/src/main/java/com/msy/plus/entity/LoginResultDO.java
  class LoginResultDO (line 8) | @Data

FILE: back/src/main/java/com/msy/plus/entity/Permission.java
  class Permission (line 7) | @Getter

FILE: back/src/main/java/com/msy/plus/entity/RoleDO.java
  class RoleDO (line 15) | @Data

FILE: back/src/main/java/com/msy/plus/entity/RolePermissionDO.java
  class RolePermissionDO (line 12) | @Getter

FILE: back/src/main/java/com/msy/plus/entity/RoleWithPermissionDO.java
  class RoleWithPermissionDO (line 7) | @Getter

FILE: back/src/main/java/com/msy/plus/entity/Test.java
  class Test (line 7) | public class Test {
    method getId (line 21) | public Long getId() {
    method setId (line 30) | public void setId(Long id) {
    method getName (line 39) | public String getName() {
    method setName (line 48) | public void setName(String name) {

FILE: back/src/main/java/com/msy/plus/filter/AuthenticationFilter.java
  class AuthenticationFilter (line 27) | @Slf4j
    method init (line 33) | @Override
    method doFilter (line 38) | @Override
    method destroy (line 77) | @Override

FILE: back/src/main/java/com/msy/plus/filter/CorsFilter.java
  class CorsFilter (line 28) | @Slf4j
    method init (line 35) | @Override
    method doFilter (line 40) | @Override
    method destroy (line 88) | @Override

FILE: back/src/main/java/com/msy/plus/filter/MyAuthenticationEntryPoint.java
  class MyAuthenticationEntryPoint (line 22) | @Component
    method commence (line 24) | @Override

FILE: back/src/main/java/com/msy/plus/filter/RequestWrapper.java
  class RequestWrapper (line 19) | public class RequestWrapper extends HttpServletRequestWrapper {
    method RequestWrapper (line 22) | public RequestWrapper(final HttpServletRequest request) throws IOExcep...
    method getInputStream (line 32) | @Override
    method getReader (line 57) | @Override
    method getJson (line 62) | public String getJson() {

FILE: back/src/main/java/com/msy/plus/mapper/AccountMapper.java
  type AccountMapper (line 13) | public interface AccountMapper extends MyMapper<AccountDO> {
    method getByQueryWithRole (line 20) | AccountWithRoleDO getByQueryWithRole(AccountQuery accountQuery);
    method updateLoginTimeByName (line 28) | int updateLoginTimeByName(@Param("name") String name);

FILE: back/src/main/java/com/msy/plus/mapper/CustomerFollowUpHistoryMapper.java
  type CustomerFollowUpHistoryMapper (line 9) | public interface CustomerFollowUpHistoryMapper extends MyMapper<Customer...
    method listAndSearch (line 10) | List<CFUHSearch> listAndSearch(String keyword, String startTime, Strin...

FILE: back/src/main/java/com/msy/plus/mapper/CustomerHandoverMapper.java
  type CustomerHandoverMapper (line 10) | public interface CustomerHandoverMapper extends MyMapper<CustomerHandove...
    method listAndSearch (line 11) | List<CustomerHandoverList> listAndSearch(String keyword, Date startTim...

FILE: back/src/main/java/com/msy/plus/mapper/CustomerManagerMapper.java
  type CustomerManagerMapper (line 11) | public interface CustomerManagerMapper extends MyMapper<CustomerManager> {
    method listAllWithDictionary (line 12) | List<CustomerManagerList> listAllWithDictionary(String keyword,Integer...
    method getDetailById (line 13) | CustomerManager getDetailById(Object id);
    method queryAnalysis (line 14) | List<Analysis> queryAnalysis(AnalysisQuery analysisQuery);

FILE: back/src/main/java/com/msy/plus/mapper/DepartmentMapper.java
  type DepartmentMapper (line 6) | public interface DepartmentMapper extends MyMapper<Department> {

FILE: back/src/main/java/com/msy/plus/mapper/DictionaryContentsMapper.java
  type DictionaryContentsMapper (line 8) | public interface DictionaryContentsMapper extends MyMapper<DictionaryCon...
    method listWithKeyword (line 9) | List<DictionaryContents> listWithKeyword(String keyword);

FILE: back/src/main/java/com/msy/plus/mapper/DictionaryDetailsMapper.java
  type DictionaryDetailsMapper (line 9) | public interface DictionaryDetailsMapper extends MyMapper<DictionaryDeta...
    method listWithKeyword (line 10) | List<DictionaryContents> listWithKeyword(int id,String keyword);

FILE: back/src/main/java/com/msy/plus/mapper/EmployeeMapper.java
  type EmployeeMapper (line 10) | public interface EmployeeMapper extends MyMapper<Employee> {
    method getDetailById (line 11) | EmployeeDetail getDetailById(Long id);
    method listEmployeeWithRole (line 17) | List<EmployeeWithRoleDO> listEmployeeWithRole(String keyword,int dept);
    method saveRoles (line 25) | void saveRoles(Long id, List<Long> roles);
    method deleteEmployeeWithRole (line 32) | int deleteEmployeeWithRole(Long id);
    method deleteEmployeeWithRoleItem (line 33) | int deleteEmployeeWithRoleItem(Long id,Long roleId);
    method getAllEmployeeRoleTableRow (line 40) | List<Long> getAllEmployeeRoleTableRow(Long id);

FILE: back/src/main/java/com/msy/plus/mapper/PermissionMapper.java
  type PermissionMapper (line 6) | public interface PermissionMapper extends MyMapper<Permission> {

FILE: back/src/main/java/com/msy/plus/mapper/RoleMapper.java
  type RoleMapper (line 16) | public interface RoleMapper extends MyMapper<RoleDO> {
    method saveAsDefaultRole (line 23) | int saveAsDefaultRole(@Param("accountId") Long accountId);
    method getDetailById (line 30) | RoleWithPermissionDO getDetailById(Long id);
    method savePermissions (line 36) | int savePermissions(Long roleId,List<Long> permissions);
    method deleteRolePermissionItem (line 43) | void deleteRolePermissionItem(Long roleId,Long permissionId);
    method getAllRolePermissionTableRow (line 50) | List<RolePermissionDO> getAllRolePermissionTableRow(Long roleId);

FILE: back/src/main/java/com/msy/plus/query/AccountQuery.java
  class AccountQuery (line 13) | @Builder

FILE: back/src/main/java/com/msy/plus/service/AccountService.java
  type AccountService (line 12) | public interface AccountService extends Service<AccountDO> {
    method save (line 18) | void save(AccountDTO accountDTO);
    method getByNameWithRole (line 26) | AccountWithRoleDO getByNameWithRole(String name);
    method getByIdWithRole (line 34) | AccountWithRoleDO getByIdWithRole(Long id);
    method updateByName (line 41) | void updateByName(AccountDTO accountDTO);
    method updateLoginTimeByName (line 49) | boolean updateLoginTimeByName(String name);
    method verifyPassword (line 58) | boolean verifyPassword(String rawPassword, String encodedPassword);

FILE: back/src/main/java/com/msy/plus/service/CustomerFollowUpHistoryService.java
  type CustomerFollowUpHistoryService (line 14) | public interface CustomerFollowUpHistoryService extends Service<Customer...
    method listAndSearch (line 15) | List<CFUHSearch> listAndSearch(String keyword, Date startTime, Date en...

FILE: back/src/main/java/com/msy/plus/service/CustomerHandoverService.java
  type CustomerHandoverService (line 14) | public interface CustomerHandoverService extends Service<CustomerHandove...
    method listAndSearch (line 15) | List<CustomerHandoverList> listAndSearch(String keyword, Date startTim...

FILE: back/src/main/java/com/msy/plus/service/CustomerManagerService.java
  type CustomerManagerService (line 15) | public interface CustomerManagerService extends Service<CustomerManager> {
    method listAllWithDictionary (line 16) | List<CustomerManagerList> listAllWithDictionary(String keyword, Intege...
    method queryAnalysis (line 17) | List<Analysis> queryAnalysis(AnalysisQuery analysisQuery);

FILE: back/src/main/java/com/msy/plus/service/DepartmentService.java
  type DepartmentService (line 10) | public interface DepartmentService extends Service<Department> {

FILE: back/src/main/java/com/msy/plus/service/DictionaryContentsService.java
  type DictionaryContentsService (line 12) | public interface DictionaryContentsService extends Service<DictionaryCon...
    method listWithKeyword (line 13) | List<DictionaryContents>  listWithKeyword(String keyword);

FILE: back/src/main/java/com/msy/plus/service/DictionaryDetailsService.java
  type DictionaryDetailsService (line 13) | public interface DictionaryDetailsService extends Service<DictionaryDeta...
    method listWithKeyword (line 14) | List<DictionaryContents> listWithKeyword(int id,String keyword);

FILE: back/src/main/java/com/msy/plus/service/EmployeeService.java
  type EmployeeService (line 13) | public interface EmployeeService extends Service<Employee> {
    method getDetailById (line 14) | EmployeeDetail getDetailById(Long id);
    method listEmployeeWithRole (line 20) | List<EmployeeWithRoleDO> listEmployeeWithRole(String keyword,Integer d...
    method saveRoles (line 28) | void saveRoles(Long id,List<Long> roles);
    method deleteEmployeeWithRole (line 35) | int deleteEmployeeWithRole(Long id);
    method deleteEmployeeWithRoleItem (line 36) | int deleteEmployeeWithRoleItem(Long id,Long roleId);
    method getAllEmployeeRoleTableRow (line 43) | List<Long> getAllEmployeeRoleTableRow(Long id);

FILE: back/src/main/java/com/msy/plus/service/PermissionService.java
  type PermissionService (line 10) | public interface PermissionService extends Service<Permission> {

FILE: back/src/main/java/com/msy/plus/service/RoleService.java
  type RoleService (line 15) | public interface RoleService extends Service<RoleDO> {
    method saveAsDefaultRole (line 21) | void saveAsDefaultRole(Long accountId);
    method save (line 28) | void save(RoleDTO roleDTO);
    method update (line 35) | void update(RoleDTO roleDTO);
    method getDetailById (line 42) | RoleWithPermissionDO getDetailById(Long id);
    method savePermissions (line 48) | void savePermissions(Long roleId,List<Long> permissions);
    method deleteRolePermissionItem (line 55) | void deleteRolePermissionItem(Long roleId,Long permissionId);
    method getAllRolePermissionTableRow (line 62) | List<RolePermissionDO> getAllRolePermissionTableRow(Long roleId);

FILE: back/src/main/java/com/msy/plus/service/impl/AccountServiceImpl.java
  class AccountServiceImpl (line 27) | @Slf4j
    method save (line 36) | @Override
    method updateByName (line 51) | @Override
    method getByIdWithRole (line 68) | @Override
    method getByNameWithRole (line 74) | @Override
    method verifyPassword (line 80) | @Override
    method updateLoginTimeByName (line 85) | @Override

FILE: back/src/main/java/com/msy/plus/service/impl/CustomerFollowUpHistoryServiceImpl.java
  class CustomerFollowUpHistoryServiceImpl (line 20) | @Service
    method listAndSearch (line 27) | @Override

FILE: back/src/main/java/com/msy/plus/service/impl/CustomerHandoverServiceImpl.java
  class CustomerHandoverServiceImpl (line 19) | @Service
    method listAndSearch (line 25) | @Override

FILE: back/src/main/java/com/msy/plus/service/impl/CustomerManagerServiceImpl.java
  class CustomerManagerServiceImpl (line 20) | @Service
    method getById (line 26) | @Override
    method listAllWithDictionary (line 31) | @Override
    method queryAnalysis (line 36) | @Override

FILE: back/src/main/java/com/msy/plus/service/impl/DepartmentServiceImpl.java
  class DepartmentServiceImpl (line 16) | @Service

FILE: back/src/main/java/com/msy/plus/service/impl/DictionaryContentsServiceImpl.java
  class DictionaryContentsServiceImpl (line 17) | @Service
    method listWithKeyword (line 23) | @Override

FILE: back/src/main/java/com/msy/plus/service/impl/DictionaryDetailsServiceImpl.java
  class DictionaryDetailsServiceImpl (line 18) | @Service
    method listWithKeyword (line 24) | @Override

FILE: back/src/main/java/com/msy/plus/service/impl/EmployeeServiceImpl.java
  class EmployeeServiceImpl (line 19) | @Service
    method getDetailById (line 27) | @Override
    method listEmployeeWithRole (line 32) | @Override
    method saveRoles (line 38) | @Override
    method deleteEmployeeWithRole (line 43) | @Override
    method deleteEmployeeWithRoleItem (line 48) | @Override
    method getAllEmployeeRoleTableRow (line 53) | @Override

FILE: back/src/main/java/com/msy/plus/service/impl/PermissionServiceImpl.java
  class PermissionServiceImpl (line 16) | @Service

FILE: back/src/main/java/com/msy/plus/service/impl/RoleServiceImpl.java
  class RoleServiceImpl (line 22) | @Service
    method saveAsDefaultRole (line 27) | @Override
    method save (line 33) | @Override
    method update (line 39) | @Override
    method getDetailById (line 45) | @Override
    method savePermissions (line 50) | @Override
    method deleteRolePermissionItem (line 56) | @Override
    method getAllRolePermissionTableRow (line 61) | @Override

FILE: back/src/main/java/com/msy/plus/service/impl/UserDetailsServiceImpl.java
  class UserDetailsServiceImpl (line 21) | @Service
    method loadUserByUsername (line 26) | @Override

FILE: back/src/main/java/com/msy/plus/util/AssertUtils.java
  class AssertUtils (line 12) | public class AssertUtils {
    method throwIf (line 13) | public static void throwIf(
    method throwIf (line 20) | public static void throwIf(
    method toThrow (line 25) | public static RuntimeException toThrow(final ResultCode resultCode, fi...
    method asserts (line 29) | public static void asserts(

FILE: back/src/main/java/com/msy/plus/util/ContextUtils.java
  class ContextUtils (line 14) | public class ContextUtils {
    method ContextUtils (line 15) | private ContextUtils() {}
    method getRequest (line 22) | public static HttpServletRequest getRequest() {

FILE: back/src/main/java/com/msy/plus/util/DateUtils.java
  class DateUtils (line 14) | public class DateUtils {
    method DateUtils (line 22) | private DateUtils() {}
    method getThisYear (line 29) | public static String getThisYear() {
    method validateYear (line 39) | public static Boolean validateYear(final String dateString) {
    method getThisDay (line 48) | public static String getThisDay() {
    method validateDay (line 58) | public static Boolean validateDay(final String dateString) {
    method getThisDays (line 67) | public static String getThisDays() {
    method validateDays (line 77) | public static Boolean validateDays(final String dateString) {
    method getThisTime (line 86) | public static String getThisTime() {
    method validateTime (line 96) | public static Boolean validateTime(final String dateString) {
    method getThisTimes (line 105) | public static String getThisTimes() {
    method validateTimes (line 115) | public static Boolean validateTimes(final String dateString) {
    method validate (line 126) | public static Boolean validate(final String dateString, final String d...
    method validate (line 143) | public static Boolean validate(
    method compare (line 161) | public static Integer compare(
    method add (line 184) | public static String add(
    method addHours (line 203) | public static String addHours(
    method addMinutes (line 216) | public static String addMinutes(
    method addSeconds (line 229) | public static String addSeconds(
    method isLeapYear (line 241) | public static Boolean isLeapYear(final String dateString, final String...

FILE: back/src/main/java/com/msy/plus/util/FileUtils.java
  class FileUtils (line 10) | public class FileUtils {
    method FileUtils (line 53) | private FileUtils() {}
    method getFileType (line 61) | public static String getFileType(final File file) {
    method getFileType (line 81) | public static String getFileType(final byte[] fileBytes) {
    method getFileHexString (line 92) | public static String getFileHexString(final byte[] b) {

FILE: back/src/main/java/com/msy/plus/util/IdCardUtils.java
  class IdCardUtils (line 44) | @Slf4j
    method IdCardUtils (line 91) | private IdCardUtils() {}
    method main (line 93) | public static void main(final String[] args) {
    method validate (line 103) | public static Boolean validate(@NotBlank final String idCard) {
    method isDigital (line 151) | private static Boolean isDigital(final String string) {
    method getProvince (line 168) | public static String getProvince(@NotBlank final String idCard, final ...
    method getBirthday (line 188) | public static String getBirthday(@NotBlank final String idCard, final ...
    method getSex (line 209) | public static String getSex(@NotBlank final String idCard, final boole...
    method getProvinceCode (line 217) | private static String getProvinceCode(@NotBlank final String idCard) {
    method getBirthdayCode (line 221) | private static String getBirthdayCode(@NotBlank final String idCard) {
    method getSexCode (line 225) | private static String getSexCode(@NotBlank final String idCard) {

FILE: back/src/main/java/com/msy/plus/util/IdUtils.java
  class IdUtils (line 17) | public class IdUtils {
    method IdUtils (line 20) | private IdUtils() {}
    method uuid16 (line 22) | public static String uuid16() {
    method uuid64 (line 26) | public static String uuid64() {
    method timeId (line 34) | public static String timeId() {

FILE: back/src/main/java/com/msy/plus/util/IpUtils.java
  class IpUtils (line 24) | public class IpUtils {
    method IpUtils (line 29) | private IpUtils() {}
    method getIpAddress (line 31) | public static String getIpAddress() {
    method getIpAddress (line 41) | public static String getIpAddress(final HttpServletRequest request) {
    method getInfoByIP (line 87) | public static String getInfoByIP(final String ip) {

FILE: back/src/main/java/com/msy/plus/util/JsonUtils.java
  class JsonUtils (line 14) | public class JsonUtils {
    method JsonUtils (line 15) | private JsonUtils() {}
    method keepFields (line 24) | public static <T> T keepFields(final Object target, final Class<T> clz...
    method deleteFields (line 37) | public static <T> T deleteFields(
    method done (line 44) | private static <T> T done(

FILE: back/src/main/java/com/msy/plus/util/RedisUtils.java
  class RedisUtils (line 18) | @Component
    method setExpire (line 31) | public Boolean setExpire(@NotBlank final String key, @NotBlank final D...
    method getExpire (line 44) | public Long getExpire(@NotBlank final String key) {
    method hasKey (line 54) | public Boolean hasKey(@NotBlank final String key) {
    method delete (line 63) | public Boolean delete(@NotBlank final String... keys) {
    method getValue (line 76) | public Object getValue(@NotBlank final String key) {
    method setValue (line 86) | public void setValue(@NotBlank final String key, @NotBlank final Objec...
    method setValue (line 97) | public void setValue(
    method incrementValue (line 109) | public Long incrementValue(@NotBlank final String key, @NotBlank final...
    method decrementValue (line 123) | public Long decrementValue(@NotBlank final String key, @NotBlank final...
    method getHash (line 139) | public Object getHash(@NotBlank final String key, @NotBlank final Stri...
    method getHash (line 149) | public Map<Object, Object> getHash(@NotBlank final String key) {
    method putHash (line 159) | public void putHash(@NotBlank final String key, @NotBlank final Map<St...
    method putHash (line 170) | public void putHash(
    method putHash (line 185) | public void putHash(
    method putHash (line 198) | public void putHash(
    method deleteHash (line 213) | public void deleteHash(@NotBlank final String key, @NotBlank final Obj...
    method hasKeyHash (line 224) | public Boolean hasKeyHash(@NotBlank final String key, @NotBlank final ...
    method incrementHash (line 236) | public Double incrementHash(
    method decrementHash (line 249) | public Double decrementHash(
    method getSet (line 262) | public Set<Object> getSet(@NotBlank final String key) {
    method hasKeySet (line 273) | public Boolean hasKeySet(@NotBlank final String key, @NotBlank final O...
    method addSet (line 284) | public Long addSet(@NotBlank final String key, @NotBlank final Object....
    method addSet (line 296) | public Long addSet(
    method getSetSize (line 311) | public Long getSetSize(@NotBlank final String key) {
    method removeSet (line 322) | public Long removeSet(@NotBlank final String key, @NotBlank final Obje...
    method getList (line 335) | public List<Object> getList(
    method getListSize (line 346) | public Long getListSize(@NotBlank final String key) {
    method getListIndex (line 357) | public Object getListIndex(@NotBlank final String key, @NotBlank final...
    method pushList (line 368) | public Long pushList(@NotBlank final String key, @NotBlank final Objec...
    method pushList (line 379) | public Long pushList(
    method pushList (line 393) | public Long pushList(@NotBlank final String key, @NotBlank final List<...
    method pushList (line 405) | public Long pushList(
    method updateListIndex (line 421) | public void updateListIndex(
    method removeList (line 434) | public Long removeList(

FILE: back/src/main/java/com/msy/plus/util/UrlUtils.java
  class UrlUtils (line 12) | public class UrlUtils {
    method UrlUtils (line 13) | private UrlUtils() {}
    method getMappingUrl (line 21) | public static String getMappingUrl(final ServletRequest request) {
    method getMappingUrl (line 25) | public static String getMappingUrl(final HttpServletRequest request) {

FILE: back/src/test/java/CodeGenerator.java
  class CodeGenerator (line 22) | class CodeGenerator {
    method main (line 56) | public static void main(final String[] args) {
    method genCode (line 72) | private static void genCode(final String... tableNames) {
    method genCodeByCustomModelName (line 85) | private static void genCodeByCustomModelName(final String tableName, f...
    method genModelAndMapper (line 91) | private static void genModelAndMapper(final String tableName, String m...
    method genService (line 173) | private static void genService(final String tableName, final String mo...
    method createFileDir (line 212) | private static File createFileDir(final String name) throws RuntimeExc...
    method genController (line 223) | private static void genController(final String tableName, final String...
    method getConfiguration (line 261) | private static freemarker.template.Configuration getConfiguration() th...
    method tableNameConvertLowerCamel (line 270) | private static String tableNameConvertLowerCamel(final String tableNam...
    method tableNameConvertUpperCamel (line 274) | private static String tableNameConvertUpperCamel(final String tableNam...
    method tableNameConvertMappingPath (line 278) | private static String tableNameConvertMappingPath(String tableName) {
    method modelNameConvertMappingPath (line 283) | private static String modelNameConvertMappingPath(final String modelNa...
    method packageConvertPath (line 288) | private static String packageConvertPath(final String packageName) {

FILE: back/src/test/java/JasyptStringEncryptor.java
  class JasyptStringEncryptor (line 16) | @RunWith(SpringRunner.class)
    method encode (line 24) | @Test

FILE: back/src/test/java/PasswordEncryptor.java
  class PasswordEncryptor (line 13) | @RunWith(SpringRunner.class)
    method encode (line 19) | @Test

FILE: back/src/test/java/RsaEncryptor.java
  class RsaEncryptor (line 17) | public class RsaEncryptor {
    method test1 (line 21) | @Test
    method test2 (line 41) | @Test

FILE: back/src/test/java/com/msy/plus/AccountControllerTest.java
  class AccountControllerTest (line 15) | @FixMethodOrder(MethodSorters.NAME_ASCENDING)
    method test1 (line 21) | @Test(timeout = 5000)
    method test2 (line 32) | @Test(timeout = 5000)
    method test3 (line 42) | @Test(timeout = 5000)
    method test4 (line 54) | @Test(timeout = 5000)
    method test5 (line 65) | @Test(timeout = 5000)
    method test6 (line 73) | @Test(timeout = 5000)
    method test7 (line 81) | @Test(timeout = 5000)

FILE: back/src/test/java/com/msy/plus/BaseControllerTest.java
  class BaseControllerTest (line 36) | @Rollback(value = false)
    method setUp (line 48) | @Before
    method execute (line 58) | private Result execute(
    method get (line 82) | protected Result get(final String targetUrl, final Object args, final ...
    method post (line 87) | protected Result post(final String targetUrl, final Object args, final...
    method delete (line 92) | protected Result delete(final String targetUrl, final Object args, fin...
    method patch (line 97) | protected Result patch(final String targetUrl, final Object args, fina...

FILE: back/src/test/java/com/msy/plus/WithCustomSecurityContextFactory.java
  class WithCustomSecurityContextFactory (line 19) | public class WithCustomSecurityContextFactory
    method createSecurityContext (line 23) | @Override

FILE: back/src/test/java/com/msy/plus/util/JsonUtilsTest.java
  class JsonUtilsTest (line 10) | public class JsonUtilsTest {
    method getAccountList (line 11) | private List<AccountDO> getAccountList() {
    method keepFields (line 34) | @Test
    method deleteFields (line 44) | @Test

FILE: back/src/test/resources/sql/dev/account.sql
  type `account` (line 25) | CREATE TABLE `account` (

FILE: back/src/test/resources/sql/dev/account_role.sql
  type `account_role` (line 25) | CREATE TABLE `account_role` (

FILE: back/src/test/resources/sql/dev/role.sql
  type `role` (line 25) | CREATE TABLE `role` (

FILE: front/babel.config.js
  constant IS_PROD (line 1) | const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)

FILE: front/docs/.vuepress/plugins/alert/alertMixin.js
  method install (line 4) | install(Vue) {

FILE: front/docs/.vuepress/plugins/alert/clientRootMixin.js
  method updated (line 2) | updated() {

FILE: front/docs/.vuepress/plugins/alert/index.js
  method extendPageData (line 6) | extendPageData($page) {

FILE: front/src/bootstrap.js
  function bootstrap (line 14) | function bootstrap({router, store, i18n, message}) {

FILE: front/src/components/cache/AKeepAlive.js
  function matches (line 5) | function matches (pattern, name) {
  function getComponentName (line 26) | function getComponentName (opts) {
  function getComponentKey (line 30) | function getComponentKey (vnode) {
  function getFirstComponentChild (line 37) | function getFirstComponentChild (children) {
  function pruneCache (line 48) | function pruneCache (keepAliveInstance, filter) {
  function pruneCacheEntry2 (line 62) | function pruneCacheEntry2(cache, key, keys) {
  function pruneCacheEntry (line 71) | function pruneCacheEntry (cache, key, keys, current) {
  method created (line 106) | created() {
  method destroyed (line 111) | destroyed () {
  method mounted (line 117) | mounted () {
  method render (line 129) | render () {

FILE: front/src/components/menu/menu.js
  method data (line 86) | data () {
  method menuTheme (line 94) | menuTheme() {
  method routesMap (line 97) | routesMap() {
  method created (line 101) | created () {
  method options (line 115) | options(val) {
  method i18n (line 120) | i18n(val) {
  method collapsed (line 128) | collapsed (val) {
  method sOpenKeys (line 139) | sOpenKeys(val) {
  method formatOptions (line 217) | formatOptions(options, parentPath) {
  method updateMenu (line 226) | updateMenu () {
  method getSelectedKeys (line 234) | getSelectedKeys() {
  method render (line 246) | render (h) {

FILE: front/src/config/default/admin.config.js
  constant ADMIN (line 2) | const ADMIN = {

FILE: front/src/config/default/animate.config.js
  constant ANIMATE (line 8) | const ANIMATE = {

FILE: front/src/config/default/antd.config.js
  constant ANTD (line 2) | const ANTD = {

FILE: front/src/config/default/index.js
  constant ANTD (line 1) | const ANTD = require('./antd.config')
  constant ADMIN (line 2) | const ADMIN = require('./admin.config')
  constant ANIMATE (line 3) | const ANIMATE = require('./animate.config')

FILE: front/src/config/replacer/resolve.config.js
  method resolve (line 17) | resolve(cssText, cssObj) {
  method resolve (line 23) | resolve(cssText, cssObj) {
  method resolve (line 29) | resolve(cssText, cssObj) {
  method resolve (line 35) | resolve(cssText, cssObj) {
  method resolve (line 41) | resolve(cssText, cssObj) {
  method resolve (line 47) | resolve(cssText, cssObj) {
  method resolve (line 53) | resolve(cssText, cssObj) {
  method resolve (line 59) | resolve(cssText, cssObj) {

FILE: front/src/plugins/authority-plugin.js
  method install (line 105) | install(Vue) {

FILE: front/src/plugins/i18n-extend.js
  constant MODE (line 2) | const MODE = {
  method $ta (line 11) | $ta(syntaxKey, mode) {

FILE: front/src/plugins/tabs-page-plugin.js
  method install (line 2) | install(Vue) {

FILE: front/src/router/index.js
  method includes (line 16) | includes(route) {
  function initRouter (line 26) | function initRouter(isAsync) {

FILE: front/src/services/analysis.js
  function list (line 4) | async function list(params) {

FILE: front/src/services/api.js
  constant BASE_URL (line 3) | const BASE_URL = process.env.NODE_ENV === 'production' ?

FILE: front/src/services/customerFollowUpHistory.js
  function list (line 9) | async function list(page ) {
  function deleteItem (line 18) | async function deleteItem(id) {
  function getDetail (line 27) | async function getDetail(id) {
  function update (line 46) | async function update(object) {
  function add (line 64) | async function add(object) {

FILE: front/src/services/customerHandover.js
  function list (line 9) | async function list(page ) {
  function deleteItem (line 18) | async function deleteItem(id) {
  function getDetail (line 27) | async function getDetail(id) {
  function update (line 43) | async function update(object) {
  function add (line 60) | async function add(object) {

FILE: front/src/services/customerManager.js
  function list (line 9) | async function list(page ) {
  function deleteItem (line 18) | async function deleteItem(id) {
  function getDetail (line 27) | async function getDetail(id) {
  function update (line 50) | async function update(object) {
  function add (line 71) | async function add(object) {

FILE: front/src/services/dataSource.js
  function goodsList (line 4) | async function goodsList(params) {
  function goodsColumns (line 8) | async function goodsColumns() {

FILE: front/src/services/department.js
  function list (line 9) | async function list(page = {
  function add (line 24) | async function add(object) {
  function deleteItem (line 33) | async function deleteItem(id) {
  function getDetail (line 42) | async function getDetail(id) {
  function update (line 55) | async function update(object) {

FILE: front/src/services/dictionaryContents.js
  function list (line 9) | async function list(page ) {
  function deleteItem (line 18) | async function deleteItem(id) {
  function getDetail (line 27) | async function getDetail(id) {
  function update (line 35) | async function update(object) {
  function add (line 43) | async function add(object) {

FILE: front/src/services/dictionaryDetails.js
  function list (line 9) | async function list(page ) {
  function deleteItem (line 18) | async function deleteItem(id) {
  function getDetail (line 27) | async function getDetail(id) {
  function update (line 40) | async function update(object) {
  function add (line 52) | async function add(object) {

FILE: front/src/services/employee.js
  function list (line 9) | async function list(page ) {
  function add (line 28) | async function add(object) {
  function deleteItem (line 37) | async function deleteItem(id) {
  function getDetail (line 46) | async function getDetail(id) {
  function update (line 66) | async function update(object) {

FILE: front/src/services/permission.js
  function list (line 9) | async function list(page ) {
  function deleteItem (line 18) | async function deleteItem(id) {
  function getDetail (line 27) | async function getDetail(id) {
  function update (line 40) | async function update(object) {
  function add (line 52) | async function add(object) {

FILE: front/src/services/role.js
  function list (line 9) | async function list(page ) {
  function add (line 22) | async function add(object) {
  function deleteItem (line 31) | async function deleteItem(id) {
  function getDetail (line 40) | async function getDetail(id) {
  function update (line 54) | async function update(object) {

FILE: front/src/services/user.js
  function login (line 10) | async function login(name, password) {
  function logoutRequest (line 21) | async function logoutRequest() {
  function getRoutesConfig (line 25) | async function getRoutesConfig() {
  function logout (line 32) | function logout() {

FILE: front/src/store/modules/account.js
  method setUser (line 59) | setUser (state, user) {
  method setPermissions (line 63) | setPermissions(state, permissions) {
  method setRoles (line 67) | setRoles(state, roles) {
  method setRoutesConfig (line 71) | setRoutesConfig(state, routesConfig) {

FILE: front/src/store/modules/setting.js
  method menuData (line 26) | menuData(state, getters, rootState) {
  method firstMenu (line 33) | firstMenu(state, getters) {
  method subMenu (line 44) | subMenu(state) {
  method setDevice (line 54) | setDevice (state, isMobile) {
  method setTheme (line 57) | setTheme (state, theme) {
  method setLayout (line 60) | setLayout (state, layout) {
  method setMultiPage (line 63) | setMultiPage (state, multiPage) {
  method setAnimate (line 66) | setAnimate (state, animate) {
  method setWeekMode (line 69) | setWeekMode(state, weekMode) {
  method setFixedHeader (line 72) | setFixedHeader(state, fixedHeader) {
  method setFixedSideBar (line 75) | setFixedSideBar(state, fixedSideBar) {
  method setLang (line 78) | setLang(state, lang) {
  method setHideSetting (line 81) | setHideSetting(state, hideSetting) {
  method correctPageMinHeight (line 84) | correctPageMinHeight(state, minHeight) {
  method setMenuData (line 87) | setMenuData(state, menuData) {
  method setAsyncRoutes (line 90) | setAsyncRoutes(state, asyncRoutes) {
  method setPageWidth (line 93) | setPageWidth(state, pageWidth) {
  method setActivatedFirst (line 96) | setActivatedFirst(state, activatedFirst) {
  method setFixedTabs (line 99) | setFixedTabs(state, fixedTabs) {
  method setCustomTitle (line 102) | setCustomTitle(state, {path, title}) {

FILE: front/src/utils/authority-utils.js
  function hasPermission (line 7) | function hasPermission(authority, permissions) {
  function hasRole (line 22) | function hasRole(authority, roles) {
  function hasAnyRole (line 36) | function hasAnyRole(required, roles) {
  function hasAuthority (line 55) | function hasAuthority(route, permissions, roles) {
  function filterMenu (line 71) | function filterMenu(menuData, permissions, roles) {

FILE: front/src/utils/axios-interceptors.js
  method onFulfilled (line 35) | onFulfilled(response, options) {
  method onRejected (line 42) | onRejected(error, options) {
  method onFulfilled (line 52) | onFulfilled(response, options) {
  method onRejected (line 59) | onRejected(error, options) {
  method onFulfilled (line 69) | onFulfilled(response, options) {
  method onRejected (line 76) | onRejected(error, options) {
  method onFulfilled (line 93) | onFulfilled(config, options) {
  method onRejected (line 108) | onRejected(error, options) {

FILE: front/src/utils/colors.js
  function getAntdColors (line 9) | function getAntdColors(color, mode) {
  function getFunctionalColors (line 15) | function getFunctionalColors(mode) {
  function getMenuColors (line 33) | function getMenuColors(color, mode) {
  function getThemeToggleColors (line 44) | function getThemeToggleColors(color, mode) {
  function toNum3 (line 65) | function toNum3(color) {
  function isHex (line 82) | function isHex(color) {
  function isRgb (line 86) | function isRgb(color) {
  function isRgba (line 90) | function isRgba(color) {

FILE: front/src/utils/formatter.js
  function formatConfig (line 7) | function formatConfig(obj, dep) {

FILE: front/src/utils/i18n.js
  function initI18n (line 13) | function initI18n(locale, fallback) {
  function generateI18n (line 30) | function generateI18n(lang, routes, valueKey) {
  function formatFullPath (line 47) | function formatFullPath(routes, parentPath = '') {
  function mergeI18nFromRoutes (line 62) | function mergeI18nFromRoutes(i18n, routes) {

FILE: front/src/utils/request.js
  constant AUTH_TYPE (line 14) | const AUTH_TYPE = {
  constant METHOD (line 22) | const METHOD = {
  function request (line 37) | async function request(url, method, params, config) {
  function setAuthorization (line 70) | function setAuthorization(auth, authType = AUTH_TYPE.BEARER) {
  function removeAuthorization (line 88) | function removeAuthorization(authType = AUTH_TYPE.BEARER) {
  function checkAuthorization (line 106) | function checkAuthorization(authType = AUTH_TYPE.BEARER) {
  function loadInterceptors (line 127) | function loadInterceptors(interceptors, options) {
  function parseUrlParams (line 164) | function parseUrlParams(url) {

FILE: front/src/utils/routerUtil.js
  function setAppOptions (line 18) | function setAppOptions(options) {
  function parseRoutes (line 30) | function parseRoutes(routesConfig, routerMap) {
  function loadRoutes (line 93) | function loadRoutes(routesConfig) {
  function mergeRoutes (line 143) | function mergeRoutes(target, source) {
  function deepMergeRoutes (line 156) | function deepMergeRoutes(target, source) {
  function formatRoutes (line 192) | function formatRoutes(routes) {
  function formatAuthority (line 207) | function formatAuthority(routes, pAuthorities = []) {
  function getI18nKey (line 244) | function getI18nKey(path) {
  function loadGuards (line 255) | function loadGuards(guards, options) {

FILE: front/src/utils/theme-color-replacer-extend.js
  function resolveCss (line 3) | function resolveCss(output, srcArr) {
  function dropDuplicate (line 56) | function dropDuplicate(arr) {
  function parseCssObj (line 77) | function parseCssObj(cssText) {

FILE: front/src/utils/themeUtil.js
  function getThemeColors (line 6) | function getThemeColors(color, $theme) {
  function changeThemeColor (line 23) | function changeThemeColor(newColor, $theme) {
  function modifyVars (line 28) | function modifyVars(color) {
  function loadLocalTheme (line 68) | function loadLocalTheme(localSetting) {
  function getLocalSetting (line 82) | function getLocalSetting(loadTheme) {

FILE: front/src/utils/util.js
  function isDef (line 3) | function isDef (v){
  function remove (line 10) | function remove (arr, item) {
  function isRegExp (line 19) | function isRegExp (v) {
  function enquireScreen (line 23) | function enquireScreen(call) {

FILE: front/src/utils/validators.js
  method password (line 7) | password(){
  method email (line 17) | email(){

FILE: mysql/dev.sql
  type `customer_follow_up_history` (line 27) | CREATE TABLE `customer_follow_up_history` (
  type `customer_handover` (line 59) | CREATE TABLE `customer_handover` (
  type `customer_manager` (line 89) | CREATE TABLE `customer_manager` (
  type `department` (line 125) | CREATE TABLE `department` (
  type `dictionary_contents` (line 151) | CREATE TABLE `dictionary_contents` (
  type `dictionary_details` (line 178) | CREATE TABLE `dictionary_details` (
  type `employee` (line 205) | CREATE TABLE `employee` (
  type `employee_role` (line 241) | CREATE TABLE `employee_role` (
  type `permission` (line 267) | CREATE TABLE `permission` (
  type `role` (line 293) | CREATE TABLE `role` (
  type `role_permission` (line 319) | CREATE TABLE `role_permission` (
Condensed preview — 383 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (996K chars).
[
  {
    "path": ".github/FUNDING.yml",
    "chars": 813,
    "preview": "# These are supported funding model platforms\n\ngithub: moshuying # Replace with up to 4 GitHub Sponsors-enabled username"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 834,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the b"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 595,
    "preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 499,
    "preview": "\n# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where"
  },
  {
    "path": ".github/workflows/blank.yml",
    "chars": 1134,
    "preview": "# This is a basic workflow to help you get started with Actions\n\nname: CI\n\n# Controls when the action will run. \non:\n  #"
  },
  {
    "path": ".github/workflows/codeql-analysis.yml",
    "chars": 2444,
    "preview": "# For most projects, this workflow file will not need changing; you simply need\n# to commit it to your repository.\n#\n# Y"
  },
  {
    "path": ".gitignore",
    "chars": 283,
    "preview": "# Compiled class file\n*.class\n\n# Log file\n*.log\n\n# BlueJ files\n*.ctxt\n\n# Mobile Tools for Java (J2ME)\n.mtj.tmp/\n\n# Packa"
  },
  {
    "path": ".travis.yml",
    "chars": 779,
    "preview": "language: node_js\nnode_js:\n  - \"14\"\ninstall: \n  - cd ./front\n  - npm i\nscript:\n  - npm run build\nnotifications:\n  email:"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 5202,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participa"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 37,
    "preview": "感谢贡献者们\n\n墨抒颖 MoShuYing 刘九江 LiuJiuJiang"
  },
  {
    "path": "LICENSE",
    "chars": 34512,
    "preview": "                    GNU AFFERO GENERAL PUBLIC LICENSE\n                       Version 3, 19 November 2007\n\n Copyright (C)"
  },
  {
    "path": "README.md",
    "chars": 3624,
    "preview": "<center>\n\n# project-3 CRM 客户资源管理系统\n\n  \n<img align=\"right\" src='/front/src/assets/img/logo.png' />\n  \n[![Commitizen frien"
  },
  {
    "path": "SECURITY.md",
    "chars": 619,
    "preview": "# Security Policy\n\n## Supported Versions\n\nUse this section to tell people about which versions of your project are\ncurre"
  },
  {
    "path": "back/.gitignore",
    "chars": 317,
    "preview": "# Compiled class file\n*.class\n\n# Log file\n*.log\n\n# BlueJ files\n*.ctxt\n\n# Mobile Tools for Java (J2ME)\n.mtj.tmp/\n\n# Packa"
  },
  {
    "path": "back/LICENSE",
    "chars": 11357,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "back/README-zh.md",
    "chars": 2292,
    "preview": "# Spring Boot API Seedling\n\n![stars](https://img.shields.io/github/stars/Zoctan/spring-boot-api-seedling.svg?style=flat-"
  },
  {
    "path": "back/README.md",
    "chars": 2490,
    "preview": "# Spring Boot API Seedling\n\n![stars](https://img.shields.io/github/stars/Zoctan/spring-boot-api-seedling.svg?style=flat-"
  },
  {
    "path": "back/pom.xml",
    "chars": 10395,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
  },
  {
    "path": "back/resetDB.sh",
    "chars": 226,
    "preview": "#!/bin/bash\n\ndb=\"seedling_dev\"\n\nwhile IFS= read -r -d '' sql; do\n  echo \"$sql\"\" -> \"$db\n  mysql -uroot -proot $db <\"$sql"
  },
  {
    "path": "back/src/main/java/com/msy/plus/Application.java",
    "chars": 1365,
    "preview": "package com.msy.plus;\n\nimport com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;\nimport org.spri"
  },
  {
    "path": "back/src/main/java/com/msy/plus/aspect/ControllerLogAspect.java",
    "chars": 2815,
    "preview": "package com.msy.plus.aspect;\n\nimport com.msy.plus.util.IpUtils;\nimport lombok.extern.slf4j.Slf4j;\nimport org.aspectj.lan"
  },
  {
    "path": "back/src/main/java/com/msy/plus/controller/AccountController.java",
    "chars": 7085,
    "preview": "package com.msy.plus.controller;\n\nimport com.msy.plus.core.jwt.JwtUtil;\nimport com.msy.plus.core.response.Result;\nimport"
  },
  {
    "path": "back/src/main/java/com/msy/plus/controller/AnalysisController.java",
    "chars": 3618,
    "preview": "package com.msy.plus.controller;\n\nimport com.github.pagehelper.PageHelper;\nimport com.github.pagehelper.PageInfo;\nimport"
  },
  {
    "path": "back/src/main/java/com/msy/plus/controller/CustomerFollowUpHistoryController.java",
    "chars": 3789,
    "preview": "package com.msy.plus.controller;\n\nimport com.msy.plus.core.jwt.JwtUtil;\nimport com.msy.plus.core.response.Result;\nimport"
  },
  {
    "path": "back/src/main/java/com/msy/plus/controller/CustomerHandoverController.java",
    "chars": 4482,
    "preview": "package com.msy.plus.controller;\n\nimport com.msy.plus.core.jwt.JwtUtil;\nimport com.msy.plus.core.response.Result;\nimport"
  },
  {
    "path": "back/src/main/java/com/msy/plus/controller/CustomerManagerController.java",
    "chars": 4412,
    "preview": "package com.msy.plus.controller;\n\nimport com.msy.plus.core.jwt.JwtUtil;\nimport com.msy.plus.core.response.Result;\nimport"
  },
  {
    "path": "back/src/main/java/com/msy/plus/controller/DepartmentController.java",
    "chars": 2931,
    "preview": "package com.msy.plus.controller;\n\nimport com.msy.plus.core.response.Result;\nimport com.msy.plus.core.response.ResultGene"
  },
  {
    "path": "back/src/main/java/com/msy/plus/controller/DictionaryContentsController.java",
    "chars": 2978,
    "preview": "package com.msy.plus.controller;\n\nimport com.msy.plus.core.response.Result;\nimport com.msy.plus.core.response.ResultGene"
  },
  {
    "path": "back/src/main/java/com/msy/plus/controller/DictionaryDetailsController.java",
    "chars": 3251,
    "preview": "package com.msy.plus.controller;\n\nimport com.msy.plus.core.response.Result;\nimport com.msy.plus.core.response.ResultGene"
  },
  {
    "path": "back/src/main/java/com/msy/plus/controller/EmployeeController.java",
    "chars": 7570,
    "preview": "package com.msy.plus.controller;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.msy.plus.core.jwt.JwtUtil;\nimport c"
  },
  {
    "path": "back/src/main/java/com/msy/plus/controller/PermissionController.java",
    "chars": 2564,
    "preview": "package com.msy.plus.controller;\n\nimport com.msy.plus.core.response.Result;\nimport com.msy.plus.core.response.ResultGene"
  },
  {
    "path": "back/src/main/java/com/msy/plus/controller/RoleController.java",
    "chars": 4370,
    "preview": "package com.msy.plus.controller;\n\nimport com.github.pagehelper.PageHelper;\nimport com.github.pagehelper.PageInfo;\nimport"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/cache/CacheExpire.java",
    "chars": 466,
    "preview": "package com.msy.plus.core.cache;\n\nimport org.springframework.core.annotation.AliasFor;\n\nimport java.lang.annotation.*;\n\n"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/cache/MyRedisCacheManager.java",
    "chars": 9700,
    "preview": "package com.msy.plus.core.cache;\n\nimport com.alibaba.fastjson.support.spring.GenericFastJsonRedisSerializer;\nimport lomb"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/config/JasyptConfig.java",
    "chars": 1709,
    "preview": "package com.msy.plus.core.config;\n\nimport com.msy.plus.core.rsa.RsaUtils;\nimport org.jasypt.encryption.StringEncryptor;\n"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/config/RedisCacheConfig.java",
    "chars": 4882,
    "preview": "package com.msy.plus.core.config;\n\nimport com.msy.plus.core.cache.MyRedisCacheManager;\nimport lombok.extern.slf4j.Slf4j;"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/config/RedisConfig.java",
    "chars": 3725,
    "preview": "package com.msy.plus.core.config;\n\nimport com.alibaba.fastjson.support.spring.GenericFastJsonRedisSerializer;\nimport com"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/config/Swagger3Config.java",
    "chars": 3377,
    "preview": "package com.msy.plus.core.config;\n\nimport org.springframework.beans.factory.annotation.Value;\nimport org.springframework"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/config/ValidatorConfig.java",
    "chars": 1328,
    "preview": "package com.msy.plus.core.config;\n\nimport org.hibernate.validator.HibernateValidator;\nimport org.springframework.context"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/config/WebMvcConfig.java",
    "chars": 2923,
    "preview": "package com.msy.plus.core.config;\n\nimport com.alibaba.fastjson.serializer.SerializerFeature;\nimport com.alibaba.fastjson"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/config/WebSecurityConfig.java",
    "chars": 3462,
    "preview": "package com.msy.plus.core.config;\n\nimport com.msy.plus.filter.AuthenticationFilter;\nimport com.msy.plus.filter.MyAuthent"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/config/YamlPropertySourceFactory.java",
    "chars": 1276,
    "preview": "package com.msy.plus.core.config;\n\nimport com.msy.plus.core.exception.YamlNotFoundException;\nimport org.springframework."
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/constant/ProjectConstant.java",
    "chars": 1160,
    "preview": "package com.msy.plus.core.constant;\n\n/**\n * 项目常量\n *\n * @author MoShuying\n * @date 2018/05/27\n */\npublic final class Proj"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/dto/AbstractConverter.java",
    "chars": 1416,
    "preview": "package com.msy.plus.core.dto;\n\nimport com.google.common.base.Converter;\nimport org.springframework.beans.BeanUtils;\n\nim"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/exception/ExceptionResolver.java",
    "chars": 4391,
    "preview": "package com.msy.plus.core.exception;\n\nimport com.msy.plus.core.response.Result;\nimport com.msy.plus.core.response.Result"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/exception/ResourcesNotFoundException.java",
    "chars": 615,
    "preview": "package com.msy.plus.core.exception;\n\n/**\n * 资源没找到异常(更新和删除都需先确认存在才操作)\n *\n * @author MoShuying\n * @date 2018/07/20\n */\npu"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/exception/RsaException.java",
    "chars": 527,
    "preview": "package com.msy.plus.core.exception;\n\n/**\n * Rsa 异常\n *\n * @author MoShuying\n * @date 2018/05/27\n */\npublic class RsaExce"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/exception/ServiceException.java",
    "chars": 930,
    "preview": "package com.msy.plus.core.exception;\n\nimport com.msy.plus.core.response.ResultCode;\n\n/**\n * Service 异常\n *\n * @author MoS"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/exception/UsernameNotFoundException2.java",
    "chars": 687,
    "preview": "package com.msy.plus.core.exception;\n\nimport org.springframework.security.core.userdetails.UsernameNotFoundException;\n\n/"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/exception/YamlNotFoundException.java",
    "chars": 576,
    "preview": "package com.msy.plus.core.exception;\n\n/**\n * Yml配置没找到异常\n *\n * @author MoShuying\n * @date 2020/11/12\n */\npublic class Yam"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/jasypt/MyEncryptablePropertyDetector.java",
    "chars": 1445,
    "preview": "package com.msy.plus.core.jasypt;\n\nimport com.ulisesbocchio.jasyptspringboot.EncryptablePropertyDetector;\nimport org.apa"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/jwt/JwtConfigurationProperties.java",
    "chars": 583,
    "preview": "package com.msy.plus.core.jwt;\n\nimport lombok.Data;\nimport org.springframework.boot.context.properties.ConfigurationProp"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/jwt/JwtUtil.java",
    "chars": 6859,
    "preview": "package com.msy.plus.core.jwt;\n\nimport com.msy.plus.core.rsa.RsaUtils;\nimport com.msy.plus.util.RedisUtils;\nimport io.js"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/mapper/MyMapper.java",
    "chars": 439,
    "preview": "package com.msy.plus.core.mapper;\n\nimport tk.mybatis.mapper.common.BaseMapper;\nimport tk.mybatis.mapper.common.Condition"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/response/Result.java",
    "chars": 968,
    "preview": "package com.msy.plus.core.response;\n\nimport com.alibaba.fastjson.JSON;\nimport io.swagger.annotations.ApiModel;\nimport io"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/response/ResultCode.java",
    "chars": 1081,
    "preview": "package com.msy.plus.core.response;\n\n/**\n * 响应状态码枚举类\n *\n * <p>自定义业务异常 2*** 开始\n *\n * <p>原有类异常 4*** 开始\n *\n * @author MoShu"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/response/ResultGenerator.java",
    "chars": 1876,
    "preview": "package com.msy.plus.core.response;\n\nimport org.springframework.http.HttpStatus;\n\n/**\n * 响应结果生成工具\n *\n * @author MoShuyin"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/rsa/RsaConfigurationProperties.java",
    "chars": 987,
    "preview": "package com.msy.plus.core.rsa;\n\nimport lombok.Data;\nimport org.springframework.boot.context.properties.ConfigurationProp"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/rsa/RsaUtils.java",
    "chars": 5694,
    "preview": "package com.msy.plus.core.rsa;\n\nimport com.msy.plus.core.exception.RsaException;\nimport lombok.extern.slf4j.Slf4j;\nimpor"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/service/AbstractService.java",
    "chars": 4840,
    "preview": "package com.msy.plus.core.service;\n\nimport com.msy.plus.core.exception.ResourcesNotFoundException;\nimport com.msy.plus.c"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/service/Service.java",
    "chars": 2369,
    "preview": "package com.msy.plus.core.service;\n\nimport com.msy.plus.core.exception.ResourcesNotFoundException;\nimport org.apache.iba"
  },
  {
    "path": "back/src/main/java/com/msy/plus/core/upload/UploadConfigurationProperties.java",
    "chars": 512,
    "preview": "package com.msy.plus.core.upload;\n\nimport lombok.Data;\nimport org.springframework.boot.context.properties.ConfigurationP"
  },
  {
    "path": "back/src/main/java/com/msy/plus/dto/AccountDTO.java",
    "chars": 1248,
    "preview": "package com.msy.plus.dto;\n\nimport com.msy.plus.core.dto.AbstractConverter;\nimport com.msy.plus.entity.AccountDO;\nimport "
  },
  {
    "path": "back/src/main/java/com/msy/plus/dto/AccountLoginDTO.java",
    "chars": 995,
    "preview": "package com.msy.plus.dto;\n\nimport com.msy.plus.core.dto.AbstractConverter;\nimport com.msy.plus.entity.AccountDO;\nimport "
  },
  {
    "path": "back/src/main/java/com/msy/plus/dto/AnalysisQuery.java",
    "chars": 582,
    "preview": "package com.msy.plus.dto;\n\nimport lombok.*;\nimport org.springframework.format.annotation.DateTimeFormat;\n\nimport java.ut"
  },
  {
    "path": "back/src/main/java/com/msy/plus/dto/CustomerHandoverList.java",
    "chars": 357,
    "preview": "package com.msy.plus.dto;\n\nimport lombok.Getter;\nimport lombok.Setter;\n\nimport java.util.Date;\n\n@Getter\n@Setter\npublic c"
  },
  {
    "path": "back/src/main/java/com/msy/plus/dto/CustomerManagerList.java",
    "chars": 1155,
    "preview": "package com.msy.plus.dto;\n\nimport lombok.Getter;\nimport lombok.Setter;\n\nimport javax.persistence.Column;\nimport javax.pe"
  },
  {
    "path": "back/src/main/java/com/msy/plus/dto/LoginResultDTO.java",
    "chars": 2178,
    "preview": "package com.msy.plus.dto;\n\nimport com.msy.plus.core.dto.AbstractConverter;\nimport com.msy.plus.entity.LoginResultDO;\nimp"
  },
  {
    "path": "back/src/main/java/com/msy/plus/dto/RoleDTO.java",
    "chars": 816,
    "preview": "package com.msy.plus.dto;\n\nimport com.msy.plus.core.dto.AbstractConverter;\nimport com.msy.plus.entity.RoleDO;\nimport io."
  },
  {
    "path": "back/src/main/java/com/msy/plus/dto/RoleWithPermissionDTO.java",
    "chars": 1065,
    "preview": "package com.msy.plus.dto;\n\nimport com.msy.plus.entity.Permission;\nimport com.msy.plus.entity.RoleWithPermissionDO;\nimpor"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/AccountDO.java",
    "chars": 688,
    "preview": "package com.msy.plus.entity;\n\nimport lombok.Data;\n\nimport javax.persistence.*;\nimport java.sql.Timestamp;\n\n/**\n * @autho"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/AccountWithRoleDO.java",
    "chars": 319,
    "preview": "package com.msy.plus.entity;\n\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\n\nimport java.util.List;\n\n/**\n * 包含角色信"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/Analysis.java",
    "chars": 165,
    "preview": "package com.msy.plus.entity;\n\nimport lombok.Getter;\nimport lombok.Setter;\n\n@Getter\n@Setter\npublic class Analysis {\n    p"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/CFUHSearch.java",
    "chars": 199,
    "preview": "package com.msy.plus.entity;\n\nimport lombok.Getter;\nimport lombok.Setter;\n\n/**\n * 客户跟进历史分页查询搜索\n */\n@Getter\n@Setter\npubli"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/CustomerFollowUpHistory.java",
    "chars": 3934,
    "preview": "package com.msy.plus.entity;\n\nimport java.util.Date;\nimport javax.persistence.*;\n\n@Table(name = \"customer_follow_up_hist"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/CustomerHandover.java",
    "chars": 2910,
    "preview": "package com.msy.plus.entity;\n\nimport java.util.Date;\nimport javax.persistence.*;\n\n@Table(name = \"customer_handover\")\npub"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/CustomerManager.java",
    "chars": 4467,
    "preview": "package com.msy.plus.entity;\n\nimport java.util.Date;\nimport javax.persistence.*;\n\n@Table(name = \"customer_manager\")\npubl"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/Department.java",
    "chars": 797,
    "preview": "package com.msy.plus.entity;\n\nimport javax.persistence.*;\n\npublic class Department {\n    @Id\n    @GeneratedValue(strateg"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/DictionaryContents.java",
    "chars": 1363,
    "preview": "package com.msy.plus.entity;\n\nimport javax.persistence.*;\n\n@Table(name = \"dictionary_contents\")\npublic class DictionaryC"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/DictionaryDetails.java",
    "chars": 1387,
    "preview": "package com.msy.plus.entity;\n\nimport javax.persistence.*;\n\n@Table(name = \"dictionary_details\")\npublic class DictionaryDe"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/Employee.java",
    "chars": 577,
    "preview": "package com.msy.plus.entity;\n\nimport lombok.Getter;\nimport lombok.Setter;\n\nimport java.util.Date;\nimport javax.persisten"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/EmployeeDetail.java",
    "chars": 208,
    "preview": "package com.msy.plus.entity;\n\nimport lombok.*;\nimport java.util.List;\n\n@Getter\n@Setter\n@AllArgsConstructor\n@NoArgsConstr"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/EmployeeWithRoleDO.java",
    "chars": 222,
    "preview": "package com.msy.plus.entity;\n\nimport lombok.*;\n\n@Getter\n@Setter\n@AllArgsConstructor\n@NoArgsConstructor\n@ToString\npublic "
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/LoginResultDO.java",
    "chars": 319,
    "preview": "package com.msy.plus.entity;\n\nimport lombok.Data;\n\nimport java.util.Date;\nimport java.util.Map;\n\n@Data\npublic class Logi"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/Permission.java",
    "chars": 345,
    "preview": "package com.msy.plus.entity;\n\nimport lombok.Getter;\nimport lombok.Setter;\nimport javax.persistence.*;\n\n@Getter\n@Setter\np"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/RoleDO.java",
    "chars": 490,
    "preview": "package com.msy.plus.entity;\n\nimport lombok.Data;\nimport lombok.Getter;\nimport lombok.Setter;\n\nimport javax.persistence."
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/RolePermissionDO.java",
    "chars": 484,
    "preview": "package com.msy.plus.entity;\n\nimport lombok.*;\n\nimport javax.persistence.GeneratedValue;\nimport javax.persistence.Genera"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/RoleWithPermissionDO.java",
    "chars": 224,
    "preview": "package com.msy.plus.entity;\n\nimport lombok.*;\n\nimport java.util.List;\n\n@Getter\n@Setter\n@AllArgsConstructor\n@NoArgsConst"
  },
  {
    "path": "back/src/main/java/com/msy/plus/entity/Test.java",
    "chars": 713,
    "preview": "package com.msy.plus.entity;\n\nimport javax.persistence.GeneratedValue;\nimport javax.persistence.GenerationType;\nimport j"
  },
  {
    "path": "back/src/main/java/com/msy/plus/filter/AuthenticationFilter.java",
    "chars": 2723,
    "preview": "package com.msy.plus.filter;\n\nimport com.msy.plus.core.jwt.JwtUtil;\nimport com.msy.plus.util.IpUtils;\nimport com.msy.plu"
  },
  {
    "path": "back/src/main/java/com/msy/plus/filter/CorsFilter.java",
    "chars": 3168,
    "preview": "package com.msy.plus.filter;\n\nimport com.msy.plus.util.IpUtils;\nimport com.msy.plus.util.UrlUtils;\nimport lombok.extern."
  },
  {
    "path": "back/src/main/java/com/msy/plus/filter/MyAuthenticationEntryPoint.java",
    "chars": 1312,
    "preview": "package com.msy.plus.filter;\n\nimport com.msy.plus.core.response.ResultCode;\nimport com.msy.plus.core.response.ResultGene"
  },
  {
    "path": "back/src/main/java/com/msy/plus/filter/RequestWrapper.java",
    "chars": 1767,
    "preview": "package com.msy.plus.filter;\n\nimport javax.servlet.ReadListener;\nimport javax.servlet.ServletInputStream;\nimport javax.s"
  },
  {
    "path": "back/src/main/java/com/msy/plus/mapper/AccountMapper.java",
    "chars": 630,
    "preview": "package com.msy.plus.mapper;\n\nimport com.msy.plus.core.mapper.MyMapper;\nimport com.msy.plus.entity.AccountDO;\nimport com"
  },
  {
    "path": "back/src/main/java/com/msy/plus/mapper/CustomerFollowUpHistoryMapper.java",
    "chars": 380,
    "preview": "package com.msy.plus.mapper;\n\nimport com.msy.plus.core.mapper.MyMapper;\nimport com.msy.plus.entity.CFUHSearch;\nimport co"
  },
  {
    "path": "back/src/main/java/com/msy/plus/mapper/CustomerHandoverMapper.java",
    "chars": 381,
    "preview": "package com.msy.plus.mapper;\n\nimport com.msy.plus.core.mapper.MyMapper;\nimport com.msy.plus.dto.CustomerHandoverList;\nim"
  },
  {
    "path": "back/src/main/java/com/msy/plus/mapper/CustomerManagerMapper.java",
    "chars": 531,
    "preview": "package com.msy.plus.mapper;\n\nimport com.msy.plus.core.mapper.MyMapper;\nimport com.msy.plus.dto.AnalysisQuery;\nimport co"
  },
  {
    "path": "back/src/main/java/com/msy/plus/mapper/DepartmentMapper.java",
    "chars": 178,
    "preview": "package com.msy.plus.mapper;\n\nimport com.msy.plus.core.mapper.MyMapper;\nimport com.msy.plus.entity.Department;\n\npublic i"
  },
  {
    "path": "back/src/main/java/com/msy/plus/mapper/DictionaryContentsMapper.java",
    "chars": 288,
    "preview": "package com.msy.plus.mapper;\n\nimport com.msy.plus.core.mapper.MyMapper;\nimport com.msy.plus.entity.DictionaryContents;\n\n"
  },
  {
    "path": "back/src/main/java/com/msy/plus/mapper/DictionaryDetailsMapper.java",
    "chars": 340,
    "preview": "package com.msy.plus.mapper;\n\nimport com.msy.plus.core.mapper.MyMapper;\nimport com.msy.plus.entity.DictionaryContents;\ni"
  },
  {
    "path": "back/src/main/java/com/msy/plus/mapper/EmployeeMapper.java",
    "chars": 887,
    "preview": "package com.msy.plus.mapper;\n\nimport com.msy.plus.core.mapper.MyMapper;\nimport com.msy.plus.entity.Employee;\nimport com."
  },
  {
    "path": "back/src/main/java/com/msy/plus/mapper/PermissionMapper.java",
    "chars": 178,
    "preview": "package com.msy.plus.mapper;\n\nimport com.msy.plus.core.mapper.MyMapper;\nimport com.msy.plus.entity.Permission;\n\npublic i"
  },
  {
    "path": "back/src/main/java/com/msy/plus/mapper/RoleMapper.java",
    "chars": 1055,
    "preview": "package com.msy.plus.mapper;\n\nimport com.msy.plus.core.mapper.MyMapper;\nimport com.msy.plus.entity.Permission;\nimport co"
  },
  {
    "path": "back/src/main/java/com/msy/plus/query/AccountQuery.java",
    "chars": 449,
    "preview": "package com.msy.plus.query;\n\nimport lombok.Builder;\n\nimport java.io.Serializable;\n\n/**\n * 账户查询实体\n *\n * @author MoShuying"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/AccountService.java",
    "chars": 1062,
    "preview": "package com.msy.plus.service;\n\nimport com.msy.plus.core.service.Service;\nimport com.msy.plus.dto.AccountDTO;\nimport com."
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/CustomerFollowUpHistoryService.java",
    "chars": 447,
    "preview": "package com.msy.plus.service;\n\nimport com.msy.plus.entity.CFUHSearch;\nimport com.msy.plus.entity.CustomerFollowUpHistory"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/CustomerHandoverService.java",
    "chars": 429,
    "preview": "package com.msy.plus.service;\n\nimport com.msy.plus.dto.CustomerHandoverList;\nimport com.msy.plus.entity.CustomerHandover"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/CustomerManagerService.java",
    "chars": 534,
    "preview": "package com.msy.plus.service;\n\nimport com.msy.plus.dto.AnalysisQuery;\nimport com.msy.plus.dto.CustomerManagerList;\nimpor"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/DepartmentService.java",
    "chars": 227,
    "preview": "package com.msy.plus.service;\n\nimport com.msy.plus.entity.Department;\nimport com.msy.plus.core.service.Service;\n\n/**\n* @"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/DictionaryContentsService.java",
    "chars": 337,
    "preview": "package com.msy.plus.service;\n\nimport com.msy.plus.entity.DictionaryContents;\nimport com.msy.plus.core.service.Service;\n"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/DictionaryDetailsService.java",
    "chars": 387,
    "preview": "package com.msy.plus.service;\n\nimport com.msy.plus.entity.DictionaryContents;\nimport com.msy.plus.entity.DictionaryDetai"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/EmployeeService.java",
    "chars": 936,
    "preview": "package com.msy.plus.service;\n\nimport com.msy.plus.entity.Employee;\nimport com.msy.plus.core.service.Service;\nimport com"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/PermissionService.java",
    "chars": 227,
    "preview": "package com.msy.plus.service;\n\nimport com.msy.plus.entity.Permission;\nimport com.msy.plus.core.service.Service;\n\n/**\n* @"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/RoleService.java",
    "chars": 1142,
    "preview": "package com.msy.plus.service;\n\nimport com.msy.plus.core.service.Service;\nimport com.msy.plus.dto.RoleDTO;\nimport com.msy"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/impl/AccountServiceImpl.java",
    "chars": 3267,
    "preview": "package com.msy.plus.service.impl;\n\nimport com.msy.plus.core.response.ResultCode;\nimport com.msy.plus.core.service.Abstr"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/impl/CustomerFollowUpHistoryServiceImpl.java",
    "chars": 1290,
    "preview": "package com.msy.plus.service.impl;\n\nimport com.msy.plus.entity.CFUHSearch;\nimport com.msy.plus.mapper.CustomerFollowUpHi"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/impl/CustomerHandoverServiceImpl.java",
    "chars": 979,
    "preview": "package com.msy.plus.service.impl;\n\nimport com.msy.plus.dto.CustomerHandoverList;\nimport com.msy.plus.mapper.CustomerHan"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/impl/CustomerManagerServiceImpl.java",
    "chars": 1386,
    "preview": "package com.msy.plus.service.impl;\n\nimport com.msy.plus.dto.AnalysisQuery;\nimport com.msy.plus.dto.CustomerManagerList;\n"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/impl/DepartmentServiceImpl.java",
    "chars": 632,
    "preview": "package com.msy.plus.service.impl;\n\nimport com.msy.plus.mapper.DepartmentMapper;\nimport com.msy.plus.entity.Department;\n"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/impl/DictionaryContentsServiceImpl.java",
    "chars": 875,
    "preview": "package com.msy.plus.service.impl;\n\nimport com.msy.plus.mapper.DictionaryContentsMapper;\nimport com.msy.plus.entity.Dict"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/impl/DictionaryDetailsServiceImpl.java",
    "chars": 923,
    "preview": "package com.msy.plus.service.impl;\n\nimport com.msy.plus.entity.DictionaryContents;\nimport com.msy.plus.mapper.Dictionary"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/impl/EmployeeServiceImpl.java",
    "chars": 1636,
    "preview": "package com.msy.plus.service.impl;\n\nimport com.msy.plus.entity.EmployeeDetail;\nimport com.msy.plus.entity.EmployeeWithRo"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/impl/PermissionServiceImpl.java",
    "chars": 632,
    "preview": "package com.msy.plus.service.impl;\n\nimport com.msy.plus.mapper.PermissionMapper;\nimport com.msy.plus.entity.Permission;\n"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/impl/RoleServiceImpl.java",
    "chars": 1953,
    "preview": "package com.msy.plus.service.impl;\n\nimport com.msy.plus.core.response.ResultCode;\nimport com.msy.plus.core.service.Abstr"
  },
  {
    "path": "back/src/main/java/com/msy/plus/service/impl/UserDetailsServiceImpl.java",
    "chars": 1454,
    "preview": "package com.msy.plus.service.impl;\n\nimport com.msy.plus.core.exception.UsernameNotFoundException2;\nimport com.msy.plus.e"
  },
  {
    "path": "back/src/main/java/com/msy/plus/util/AssertUtils.java",
    "chars": 939,
    "preview": "package com.msy.plus.util;\n\nimport com.msy.plus.core.exception.ServiceException;\nimport com.msy.plus.core.response.Resul"
  },
  {
    "path": "back/src/main/java/com/msy/plus/util/ContextUtils.java",
    "chars": 640,
    "preview": "package com.msy.plus.util;\n\nimport org.springframework.web.context.request.RequestContextHolder;\nimport org.springframew"
  },
  {
    "path": "back/src/main/java/com/msy/plus/util/DateUtils.java",
    "chars": 6160,
    "preview": "package com.msy.plus.util;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\nimport java.time.format.DateTime"
  },
  {
    "path": "back/src/main/java/com/msy/plus/util/FileUtils.java",
    "chars": 3620,
    "preview": "package com.msy.plus.util;\n\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.IOException;\nimport java"
  },
  {
    "path": "back/src/main/java/com/msy/plus/util/IdCardUtils.java",
    "chars": 5187,
    "preview": "package com.msy.plus.util;\n\nimport lombok.extern.slf4j.Slf4j;\n\nimport javax.validation.constraints.NotBlank;\nimport java"
  },
  {
    "path": "back/src/main/java/com/msy/plus/util/IdUtils.java",
    "chars": 984,
    "preview": "package com.msy.plus.util;\n\nimport org.apache.commons.codec.binary.Base64;\nimport org.apache.commons.lang3.RandomStringU"
  },
  {
    "path": "back/src/main/java/com/msy/plus/util/IpUtils.java",
    "chars": 4033,
    "preview": "package com.msy.plus.util;\n\nimport com.alibaba.fastjson.JSON;\nimport com.alibaba.fastjson.JSONObject;\nimport org.springf"
  },
  {
    "path": "back/src/main/java/com/msy/plus/util/JsonUtils.java",
    "chars": 1248,
    "preview": "package com.msy.plus.util;\n\nimport com.alibaba.fastjson.JSON;\nimport com.alibaba.fastjson.serializer.SimplePropertyPreFi"
  },
  {
    "path": "back/src/main/java/com/msy/plus/util/RedisUtils.java",
    "chars": 10093,
    "preview": "package com.msy.plus.util;\n\nimport org.springframework.data.redis.core.RedisTemplate;\nimport org.springframework.stereot"
  },
  {
    "path": "back/src/main/java/com/msy/plus/util/UrlUtils.java",
    "chars": 599,
    "preview": "package com.msy.plus.util;\n\nimport javax.servlet.ServletRequest;\nimport javax.servlet.http.HttpServletRequest;\n\n/**\n * U"
  },
  {
    "path": "back/src/main/resources/META-INF/spring-devtools.yml",
    "chars": 209,
    "preview": "# devtools 热重启导致 mapper 出错的解决\n# https://github.com/abel533/MyBatis-Spring-Boot#spring-devtools-%E9%85%8D%E7%BD%AE\nrestar"
  },
  {
    "path": "back/src/main/resources/META-INF/swagger3.yml",
    "chars": 430,
    "preview": "application:\n  # 项目名称\n  name: APIs doc\n  # 项目版本信息\n  version: 1.0\n  # 项目描述信息\n  description: RESTFul APIs\n  # 项目许可\n  licen"
  },
  {
    "path": "back/src/main/resources/application-dev.yml",
    "chars": 2668,
    "preview": "server:\n  port: 80\n\nspring:\n  devtools:\n    restart:\n      # 修改代码后自动重启\n      enabled: true\n  servlet:\n    multipart:\n   "
  },
  {
    "path": "back/src/main/resources/application-test.yml",
    "chars": 20,
    "preview": "server:\n  port: 8082"
  },
  {
    "path": "back/src/main/resources/application.yml",
    "chars": 2075,
    "preview": "spring:\n  profiles:\n    # 激活的配置\n    active: dev\n  # 终端彩色输出信息\n  output.ansi.enabled: ALWAYS\n  resources:\n    # 不映射工程中的静态资"
  },
  {
    "path": "back/src/main/resources/banner.txt",
    "chars": 819,
    "preview": "////////////////////////////////////////\n//                                    //\n//         ::                         "
  },
  {
    "path": "back/src/main/resources/mapper/AccountMapper.xml",
    "chars": 1807,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/"
  },
  {
    "path": "back/src/main/resources/mapper/CustomerFollowUpHistoryMapper.xml",
    "chars": 1948,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/"
  },
  {
    "path": "back/src/main/resources/mapper/CustomerHandoverMapper.xml",
    "chars": 1932,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/"
  },
  {
    "path": "back/src/main/resources/mapper/CustomerManagerMapper.xml",
    "chars": 4827,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/"
  },
  {
    "path": "back/src/main/resources/mapper/DepartmentMapper.xml",
    "chars": 528,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/"
  },
  {
    "path": "back/src/main/resources/mapper/DictionaryContentsMapper.xml",
    "chars": 945,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/"
  },
  {
    "path": "back/src/main/resources/mapper/DictionaryDetailsMapper.xml",
    "chars": 942,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/"
  },
  {
    "path": "back/src/main/resources/mapper/EmployeeMapper.xml",
    "chars": 3505,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/"
  },
  {
    "path": "back/src/main/resources/mapper/PermissionMapper.xml",
    "chars": 544,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/"
  },
  {
    "path": "back/src/main/resources/mapper/RoleMapper.xml",
    "chars": 2509,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/"
  },
  {
    "path": "back/src/main/resources/rsa/private-key.pem",
    "chars": 522,
    "preview": "-----BEGIN PRIVATE KEY-----\nMIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEArD4P1yMYRsS4YSEb\nB7V3LQs/+6MrTbAdnlF8CdangeD"
  },
  {
    "path": "back/src/main/resources/rsa/public-key.pem",
    "chars": 182,
    "preview": "-----BEGIN PUBLIC KEY-----\nMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKw+D9cjGEbEuGEhGwe1dy0LP/ujK02w\nHZ5RfAnWp4Hg/PYEa6fbM/DLrSNb"
  },
  {
    "path": "back/src/test/java/CodeGenerator.java",
    "chars": 12271,
    "preview": "import com.google.common.base.CaseFormat;\nimport freemarker.template.TemplateExceptionHandler;\nimport org.apache.commons"
  },
  {
    "path": "back/src/test/java/JasyptStringEncryptor.java",
    "chars": 1116,
    "preview": "import com.msy.plus.Application;\nimport org.jasypt.encryption.StringEncryptor;\nimport org.junit.Test;\nimport org.junit.r"
  },
  {
    "path": "back/src/test/java/PasswordEncryptor.java",
    "chars": 881,
    "preview": "import com.msy.plus.Application;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.springframework.bean"
  },
  {
    "path": "back/src/test/java/RsaEncryptor.java",
    "chars": 1893,
    "preview": "import com.msy.plus.core.rsa.RsaUtils;\nimport org.junit.Assert;\nimport org.junit.Test;\nimport org.springframework.util.B"
  },
  {
    "path": "back/src/test/java/com/msy/plus/AccountControllerTest.java",
    "chars": 2459,
    "preview": "package com.msy.plus;\n\nimport com.msy.plus.dto.AccountDTO;\nimport com.msy.plus.dto.AccountLoginDTO;\nimport org.junit.Fix"
  },
  {
    "path": "back/src/test/java/com/msy/plus/BaseControllerTest.java",
    "chars": 3792,
    "preview": "package com.msy.plus;\n\nimport com.alibaba.fastjson.JSON;\nimport com.msy.plus.core.response.Result;\nimport com.msy.plus.f"
  },
  {
    "path": "back/src/test/java/com/msy/plus/WithCustomSecurityContextFactory.java",
    "chars": 1266,
    "preview": "package com.msy.plus;\n\nimport com.msy.plus.service.impl.UserDetailsServiceImpl;\nimport org.springframework.security.auth"
  },
  {
    "path": "back/src/test/java/com/msy/plus/WithCustomUser.java",
    "chars": 437,
    "preview": "package com.msy.plus;\n\nimport org.springframework.security.test.context.support.WithSecurityContext;\n\nimport java.lang.a"
  },
  {
    "path": "back/src/test/java/com/msy/plus/util/JsonUtilsTest.java",
    "chars": 1424,
    "preview": "package com.msy.plus.util;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.msy.plus.entity.AccountDO;\nimport org.jun"
  },
  {
    "path": "back/src/test/resources/generator/template/controller-restful.ftl",
    "chars": 2795,
    "preview": "package ${basePackage}.controller;\n\nimport ${basePackage}.core.response.Result;\nimport ${basePackage}.core.response.Resu"
  },
  {
    "path": "back/src/test/resources/generator/template/controller.ftl",
    "chars": 2561,
    "preview": "package ${basePackage}.controller;\n\nimport ${basePackage}.core.response.Result;\nimport ${basePackage}.core.response.Resu"
  },
  {
    "path": "back/src/test/resources/generator/template/service-impl.ftl",
    "chars": 735,
    "preview": "package ${basePackage}.service.impl;\n\nimport ${basePackage}.mapper.${modelNameUpperCamel}Mapper;\nimport ${basePackage}.e"
  },
  {
    "path": "back/src/test/resources/generator/template/service.ftl",
    "chars": 266,
    "preview": "package ${basePackage}.service;\n\nimport ${basePackage}.entity.${modelNameUpperCamel};\nimport ${basePackage}.core.service"
  },
  {
    "path": "back/src/test/resources/sql/dev/account.sql",
    "chars": 2667,
    "preview": "-- MySQL dump 10.16  Distrib 10.1.34-MariaDB, for Linux (x86_64)\n--\n-- Host: localhost    Database: seedling_dev\n-- ----"
  },
  {
    "path": "back/src/test/resources/sql/dev/account_role.sql",
    "chars": 2362,
    "preview": "-- MySQL dump 10.16  Distrib 10.1.34-MariaDB, for Linux (x86_64)\n--\n-- Host: localhost    Database: seedling_dev\n-- ----"
  },
  {
    "path": "back/src/test/resources/sql/dev/role.sql",
    "chars": 2057,
    "preview": "-- MySQL dump 10.16  Distrib 10.1.34-MariaDB, for Linux (x86_64)\n--\n-- Host: localhost    Database: seedling_dev\n-- ----"
  },
  {
    "path": "back/src/test/rest-test/upload.http",
    "chars": 637,
    "preview": "// https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html\nPOST http://0.0.0.0:8080/account/token\nAc"
  },
  {
    "path": "front/.github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 834,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the b"
  },
  {
    "path": "front/.github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 595,
    "preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
  },
  {
    "path": "front/.gitignore",
    "chars": 261,
    "preview": ".DS_Store\nnode_modules/\ndist/\nadmindb/\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n/test/unit/coverage/\n/test/e2e/rep"
  },
  {
    "path": "front/LICENSE",
    "chars": 1062,
    "preview": "MIT License\n\nCopyright (c) 2018 iczer\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof t"
  },
  {
    "path": "front/README.en-US.md",
    "chars": 3076,
    "preview": "[简体中文](./README.md) | English\n<h1 align=\"center\">Vue Antd Admin</h1>\n\n<div align=\"center\">\n  \n[Ant Design Pro](https://g"
  },
  {
    "path": "front/README.md",
    "chars": 2970,
    "preview": "简体中文 | [English](./README.en-US.md)\n<h1 align=\"center\">Vue Antd Admin</h1>\n\n<div align=\"center\">\n  \n[Ant Design Pro](htt"
  },
  {
    "path": "front/babel.config.js",
    "chars": 235,
    "preview": "const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)\n\nconst plugins = []\nif (IS_PROD) {\n  plugins.push("
  },
  {
    "path": "front/docs/.vuepress/components/Alert.vue",
    "chars": 797,
    "preview": "<template>\n  <div class=\"alert\" :style=\"`top: ${top}px`\">\n    <slot></slot>\n  </div>\n</template>\n\n<script>\n  export defa"
  },
  {
    "path": "front/docs/.vuepress/components/Color.vue",
    "chars": 690,
    "preview": "<template>\n  <div :data-clipboard-text=\"color\" class=\"color\" @click=\"onClick\" :style=\"`background-color:${color}`\" />\n</"
  },
  {
    "path": "front/docs/.vuepress/components/ColorList.vue",
    "chars": 281,
    "preview": "<template>\n  <div>\n    <color class=\"color\" :key=\"index\" v-for=\"(color, index) in colors\" :color=\"color\" ></color>\n  </d"
  },
  {
    "path": "front/docs/.vuepress/config.js",
    "chars": 1422,
    "preview": "module.exports = {\n  title: 'Vue Antd Admin',\n  description: 'Vue Antd Admin',\n  base: '/vue-antd-admin-docs/',\n  head: "
  },
  {
    "path": "front/docs/.vuepress/plugins/alert/Alert.vue",
    "chars": 799,
    "preview": "<template>\n  <div class=\"alert\" :style=\"`top: ${top}px`\">\n    <slot></slot>\n  </div>\n</template>\n\n<script>\n  export defa"
  },
  {
    "path": "front/docs/.vuepress/plugins/alert/alertMixin.js",
    "chars": 1007,
    "preview": "import Alert from './Alert'\n\nconst AlertMixin = {\n  install(Vue) {\n    Vue.mixin({\n      methods: {\n        $alert(messa"
  },
  {
    "path": "front/docs/.vuepress/plugins/alert/clientRootMixin.js",
    "chars": 68,
    "preview": "export default {\n  updated() {\n    this.$page.alert.top = 100\n  }\n}\n"
  },
  {
    "path": "front/docs/.vuepress/plugins/alert/enhanceApp.js",
    "chars": 90,
    "preview": "import AlertMixin from './alertMixin'\n\nexport default ({Vue}) => {\n  Vue.use(AlertMixin)\n}"
  },
  {
    "path": "front/docs/.vuepress/plugins/alert/index.js",
    "chars": 295,
    "preview": "const path = require('path')\n\nmodule.exports = (options, ctx) => {\n  return {\n    clientRootMixin: path.resolve(__dirnam"
  },
  {
    "path": "front/docs/.vuepress/styles/index.styl",
    "chars": 218,
    "preview": ".custom-block.tip{\n  border-color: #1890ff\n}\n.theme-default-content code .token.inserted{\n  color: #60bd90;\n}\n//.custom-"
  },
  {
    "path": "front/docs/.vuepress/styles/palette.styl",
    "chars": 45,
    "preview": "$accentColor = #1890ff\n$contentWidth = 940px\n"
  },
  {
    "path": "front/docs/README.md",
    "chars": 430,
    "preview": "---\ntitle: 首页\nhome: true\nheroImage: /logo.png\nheroText: Vue Antd Admin\ntagline: 开箱即用的中台前端/设计解决方案\nactionText: 快速上手 →\nacti"
  },
  {
    "path": "front/docs/advance/README.md",
    "chars": 35,
    "preview": "---\ntitle: 进阶\nlang: zn-CN\n---\n# 进阶\n"
  },
  {
    "path": "front/docs/advance/api.md",
    "chars": 872,
    "preview": "---\ntitle: 全局API\nlang: zn-CN\n---\n# 全局API\n我们提供了一些全局Api,在日常功能开发中或许会有帮助,它们均被绑定到了页面组件或子组件实例上。  \n在组件内可以直接通过`this.$[apiName]`的"
  },
  {
    "path": "front/docs/advance/async.md",
    "chars": 7584,
    "preview": "---\ntitle: 异步路由和菜单\nlang: zn-CN\n---\n# 异步路由和菜单\n在现实业务中,存在这样的场景,系统的路由和菜单会根据用户的角色变化而变化,或者路由菜单根据用户的权限动态生成。我们为此准备了一套完整的异步加载方案,\n"
  },
  {
    "path": "front/docs/advance/authority.md",
    "chars": 5784,
    "preview": "---\ntitle: 权限管理\nlang: zn-CN\n---\n# 权限管理\n权限控制是中后台系统中常见的需求之一,你可以利用 Vue Antd Admin 提供的权限控制脚手架,实现一些基本的权限控制功能。\n## 角色和权限\n通常情况下有"
  },
  {
    "path": "front/docs/advance/chart.md",
    "chars": 78,
    "preview": "---\ntitle: 图表\nlang: zn-CN\n---\n# 图表\n\n### 作者还没来得及编辑该页面,如果你感兴趣,可以点击下方链接,帮助作者完善此页\n"
  },
  {
    "path": "front/docs/advance/error.md",
    "chars": 82,
    "preview": "---\ntitle: 错误处理\nlang: zn-CN\n---\n# 错误处理\n\n### 作者还没来得及编辑该页面,如果你感兴趣,可以点击下方链接,帮助作者完善此页\n"
  },
  {
    "path": "front/docs/advance/guard.md",
    "chars": 2539,
    "preview": "---\ntitle: 路由守卫\nlang: zn-CN\n---\n# 路由守卫\nVue Antd Admin 使用 vue-router 实现路由导航功能,因此可以为路由配置一些守卫。  \n我们统一把导航守卫配置在 router/guards"
  },
  {
    "path": "front/docs/advance/i18n.md",
    "chars": 2436,
    "preview": "---\ntitle: 国际化\nlang: zn-CN\n---\n# 国际化\nvue-antd-admin 采用 [vue-i18n](https://kazupon.github.io/vue-i18n/) 插件来实现国际化,该项目已经内置并"
  },
  {
    "path": "front/docs/advance/interceptors.md",
    "chars": 3269,
    "preview": "---\ntitle: 拦截器配置\nlang: zn-CN\n---\n# 拦截器配置\nVue Antd Admin 基于 aixos 封装了 http 通信功能,我们可以为 http 请求响应配置一些拦截器。拦截器统一配置在 /utils/ax"
  },
  {
    "path": "front/docs/advance/login.md",
    "chars": 1853,
    "preview": "---\ntitle: 登录认证\nlang: zn-CN\n---\n# 登录认证\nVue Antd Admin 使用 js-cookie.js 管理用户的 token,结合 axios 配置,可以为每个请求头加上 token 信息。\n\n## t"
  },
  {
    "path": "front/docs/advance/skill.md",
    "chars": 90,
    "preview": "---\ntitle: 108个小技巧\nlang: zn-CN\n---\n# 108个小技巧\n\n## 自定义菜单icon\n## 隐藏页面标题\n## 关闭页签API\n## 权限校验PI\n"
  }
]

// ... and 183 more files (download for full content)

About this extraction

This page contains the full source code of the moshuying/project-3-crm GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 383 files (13.9 MB), approximately 247.0k tokens, and a symbol index with 814 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!