jiangping
2023-09-28 35baa39723180e0de2350b5b2287b1846dabaf58
分模块
已添加37个文件
已重命名412个文件
已修改2个文件
已复制11个文件
已删除3个文件
3877 ■■■■ 文件已修改
server/.gitignore 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/pom.xml 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/PlatformApplication.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/BaseController.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/ActionLogController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/AdController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/AliBillController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/AliBillDetailController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/BikeRepairController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/BikesController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/HolidaysController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/LocksController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/MemberController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/MemberRidesController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/PricingDetailController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/PricingParamController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/RefundController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/RentSiteController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/SitesController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/TransactionsController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/WxBillController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/business/WxBillDetailController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/common/CaptchaController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/common/PublicController.java 327 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/system/SystemController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/system/SystemDataPermissionController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/system/SystemDepartmentController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/system/SystemDictController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/system/SystemDictDataController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/system/SystemLoginLogController.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/system/SystemMenuController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/system/SystemMonitorController.java 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/system/SystemPermissionController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/system/SystemPositionController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/system/SystemRoleController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/system/SystemTraceLogController.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/api/system/SystemUserController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/config/shiro/ShiroAuthFilter.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/config/shiro/ShiroCache.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/config/shiro/ShiroCacheManager.java 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/config/shiro/ShiroConfig.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/config/shiro/ShiroCredentialsMatcher.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/config/shiro/ShiroRealm.java 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/config/shiro/ShiroSessionDAO.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/config/shiro/ShiroSessionManager.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/config/shiro/ShiroSessionSerializer.java 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/config/shiro/ShiroToken.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/config/shiro/ShiroTokenManager.java 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/config/swagger/SwaggerConfig.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/config/swagger/SwaggerInterceptor.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/config/swagger/SwaggerInterceptorConfig.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/java/com/doumee/task/ScheduleTool.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/platform/src/main/resources/application.yml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/pom.xml 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/award.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/award_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.action_log.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.ad.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.ali_bill.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.ali_bill_detail.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.award.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.bike_repair.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.bikes.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.campus.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.category.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.classes.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.contest.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.contest_course.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.course.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.declare_done.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.favorite.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.favorite_problem.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.holidays.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.lesson.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.locks.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.member.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.member_rides.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.paper.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.paper_problem.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.paper_rank.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.pricing_detail.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.pricing_param.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.problem.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.problem_score.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.problem_score_submission.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.problem_tags.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.refund.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.rent_site.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.sites.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.student_learn_lesson.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.submission.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.teacher_have_lesson.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.transactions.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.user.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.user_choose_class.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.user_contest.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.user_integral.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.wx_bill.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/business.wx_bill_detail.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/campus.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/category.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/class.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/classes.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/classes_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/contest.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/contest_course.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/course.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.award_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.campus_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.category_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.classes_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.contest_course_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.contest_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.course_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.favorite_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.favorite_problem_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.lesson_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.paper_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.paper_problem_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.paper_rank_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.problem_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.problem_score_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.problem_score_submission_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.problem_tags_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.student_learn_lesson_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.submission_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.teacher_have_lesson_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.user_choose_class_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.user_contest_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/ext.user_integral_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/favorite.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/favorite_problem.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/lesson.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/paper.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/paper_problem.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/paper_rank.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/problem.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/problem_ext.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/problem_score.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/problem_score_submission.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/problem_tags.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/student_learn_lesson.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/submission.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/system.system_user.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/teacher_have_lesson.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/transactions.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/user.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/user_choose_class.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/user_contest.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/db/user_integral.permissions.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/doc/init.sql 补丁 | 查看 | 原始文档 | blame | 历史
server/services/pom.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/Main.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/SystemDataPermissionBiz.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/SystemDepartmentBiz.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/SystemDictBiz.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/SystemDictDataBiz.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/SystemMenuBiz.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/SystemPermissionBiz.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/SystemPositionBiz.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/SystemRoleBiz.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/SystemUserBiz.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/impl/SystemDataPermissionBizImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/impl/SystemDepartmentBizImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/impl/SystemDictBizImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/impl/SystemDictDataBizImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/impl/SystemMenuBizImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/impl/SystemPermissionBizImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/impl/SystemPositionBizImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/impl/SystemRoleBizImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/biz/system/impl/SystemUserBizImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/config/handler/GlobalExceptionHandler.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/config/mybatis/MyBatisInterceptor.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/config/mybatis/MyBatisPlusConfig.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/config/mybatis/SpringUtils.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/config/redis/RedisConfig.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/config/redis/RedisValueDefaultSerializer.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/Jwt/JwtPayLoad.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/Jwt/JwtTokenUtil.java 176 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/Jwt/WebMvcConfig.java 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/annotation/LoginRequired.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/annotation/excel/ExcelColumn.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/annotation/excel/ExcelDataHandlerAdapter.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/annotation/pr/PreventRepeat.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/annotation/pr/PreventRepeatAdapter.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/annotation/pr/PreventRepeatDefaultHandler.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/annotation/pr/PreventRepeatInterceptor.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/annotation/pr/PreventRepeatInterceptorConfig.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/annotation/trace/Trace.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/annotation/trace/TraceInterceptor.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/annotation/trace/TraceInterceptorConfig.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/annotation/trace/TraceStatus.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/annotation/trace/TraceType.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/aware/DataPermissionAware.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/aware/DataPermissionMapping.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/aware/DefaultDataPermissionAware.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/cache/LocalCache.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/constants/Constants.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/constants/DataPermissionConstants.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/constants/ExceptionLevel.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/constants/OperaType.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/constants/ResponseStatus.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/exception/BusinessException.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/exception/UnSafeSessionException.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/filter/DoumeeFilter.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/model/ApiResponse.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/model/LoginUserInfo.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/model/PageData.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/model/PageWrap.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/model/api/WebLoginUserInfo.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/servlet/ServletDuplicateInputStream.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/servlet/ServletDuplicateOutputStream.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/servlet/ServletDuplicateRequestWrapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/servlet/ServletDuplicateResponseWrapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/servlet/ServletRewriteFilter.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/Base64Util.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/CompressUtil.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/Date.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/DateUtil.java 252 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/EncryptUtil.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/FileDigest.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/FtpUtil.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/Html2Text.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/Http.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/HttpUtil.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/ID.java 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/Location.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/Monitor.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/MyBatisPlus.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/Secure.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/Server.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/Sha1Util.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/UserClient.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/Utils.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/aliyun/ALiYunUtil.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/monitor/CPU.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/monitor/Disk.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/monitor/JVM.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/monitor/Memory.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/redis/RedisConverter.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/redis/RedisUtil.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/utils/redis/model/SubmissionTotalTime.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/wx/AccessToken.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/wx/SendWxMessage.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/wx/TemplateData.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/wx/WxMiniConfig.java 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/wx/WxMiniUtilService.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/wx/WxMsgVO.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/core/wx/WxPayProperties.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/ActionLogMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/AdMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/AliBillDetailMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/AliBillMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/BikeRepairMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/BikesMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/HolidaysMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/LocksMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/MemberMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/MemberRidesMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/PricingDetailMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/PricingParamMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/RefundMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/RentSiteMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/SitesMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/TransactionsMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/WxBillDetailMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/WxBillMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/ActionLog.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/Ad.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/AliBill.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/AliBillDetail.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/BikeRepair.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/Bikes.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/Holidays.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/Locks.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/Member.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/MemberRides.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/PricingDetail.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/PricingParam.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/Refund.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/RentSite.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/Sites.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/Transactions.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/WxBill.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/model/WxBillDetail.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/web/request/ForgetPasswordRequest.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/web/request/PageRequest.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/web/request/RegisterRequest.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/web/request/UpdMemberRequest.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/web/request/UpdPasswordRequest.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/web/request/WxPhoneRequest.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/web/response/AccountResponse.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/business/web/response/UserResponse.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemDataPermissionMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemDepartmentMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemDepartmentUserMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemDictDataMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemDictMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemLoginLogMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemMenuMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemPermissionMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemPositionMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemPositionUserMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemRoleMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemRoleMenuMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemRolePermissionMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemTraceLogMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemUserMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/SystemUserRoleMapper.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/CreateRoleMenuDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/CreateRolePermissionDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/CreateSystemUserDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/CreateUserRoleDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/LoginDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemDepartmentDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemDictDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemDictDataDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemLoginLogDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemPermissionDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemRoleDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemTraceLogDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemUserDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/ResetSystemUserPwdDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/UpdatePwdDto.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/UpdateSystemMenuSortDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/dto/WebLoginDTO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemDataPermission.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemDepartment.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemDepartmentUser.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemDict.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemDictData.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemLoginLog.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemMenu.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemPermission.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemPosition.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemPositionUser.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemRole.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemRoleMenu.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemRolePermission.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemTraceLog.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemUser.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/model/SystemUserRole.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/vo/SystemDataPermissionListVO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/vo/SystemDepartmentListVO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/vo/SystemDictDataListVO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/vo/SystemDictListVO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/vo/SystemMenuListVO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/vo/SystemMenuNodeVO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/vo/SystemPermissionListVO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/vo/SystemPositionListVO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/vo/SystemRoleListVO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/dao/system/vo/SystemUserListVO.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/aware/DepartmentDataPermissionAware.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/aware/PositionDataPermissionAware.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/ActionLogService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/AdService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/AliBillDetailService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/AliBillService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/BikeRepairService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/BikesService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/HolidaysService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/LocksService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/MemberRidesService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/MemberService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/PricingDetailService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/PricingParamService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/RefundService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/RentSiteService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/SitesService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/TransactionsService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/WxBillDetailService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/WxBillService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/ActionLogServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/AdServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/AliBillDetailServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/AliBillServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/BikeRepairServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/BikesServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/HolidaysServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/LocksServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/MemberRidesServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/PricingDetailServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/PricingParamServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/RefundServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/RentSiteServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/SitesServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/TransactionsServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/WxBillDetailServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/business/impl/WxBillServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/common/CaptchaService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/proxy/CacheProxy.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemDataPermissionService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemDepartmentService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemDepartmentUserService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemDictDataService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemDictService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemLoginLogService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemLoginService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemMenuService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemPermissionService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemPositionService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemPositionUserService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemRoleMenuService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemRolePermissionService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemRoleService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemTraceLogService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemUserRoleService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/SystemUserService.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemDataPermissionServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemDepartmentServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemDepartmentUserServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemDictServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemLoginLogServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemLoginServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemMenuServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemPermissionServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemPositionServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemPositionUserServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemRoleMenuServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemRolePermissionServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemRoleServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemTraceLogServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemUserRoleServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/java/com/doumee/service/system/impl/SystemUserServiceImpl.java 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/application-dev.yml 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/application-pro.yml 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/application-test.yml 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/banner.txt 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/logback-spring.xml 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/mappers/SystemDataPermissionMapper.xml 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/mappers/SystemDepartmentMapper.xml 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/mappers/SystemDictDataMapper.xml 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/mappers/SystemDictMapper.xml 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/mappers/SystemMenuMapper.xml 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/mappers/SystemPermissionMapper.xml 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/mappers/SystemPositionMapper.xml 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/mappers/SystemRoleMapper.xml 补丁 | 查看 | 原始文档 | blame | 历史
server/services/src/main/resources/mappers/SystemUserMapper.xml 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/com/doumee/api/BaseController.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/com/doumee/api/common/PublicController.java 477 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/src/main/java/com/doumee/config/shiro/ShiroRedisSessionDAO.java 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/pom.xml 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/InterfaceApplication.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/Main.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/api/BaseController.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/api/common/CaptchaController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/api/common/PublicController.java 324 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/api/web/AccountApi.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/api/web/ApiController.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/config/shiro/ShiroAuthFilter.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/config/shiro/ShiroCache.java 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/config/shiro/ShiroCacheManager.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/config/shiro/ShiroConfig.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/config/shiro/ShiroCredentialsMatcher.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/config/shiro/ShiroRealm.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/config/shiro/ShiroSessionDAO.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/config/shiro/ShiroSessionManager.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/config/shiro/ShiroTokenManager.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/config/swagger/SwaggerConfig.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/config/swagger/SwaggerInterceptor.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/java/com/doumee/config/swagger/SwaggerInterceptorConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/web/src/main/resources/application.yml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/.gitignore
@@ -1,7 +1,7 @@
coderd.json
target/
*.iml
log/
service/log/
#idea
.idea
*.iws
@@ -15,7 +15,7 @@
# Log file
*.log
log/
service/log/
logs
.DS_Store
tmp
server/platform/pom.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.doumee</groupId>
        <artifactId>parkbike</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>
    <artifactId>platform</artifactId>
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencies>
        <dependency>
            <groupId>com.doumee</groupId>
            <artifactId>services</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
    </dependencies>
    <build>
        <finalName>platform</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <fork>true</fork>
                    <mainClass>com.doumee.PlatformApplication</mainClass>
                    <layout>ZIP</layout>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
server/platform/src/main/java/com/doumee/PlatformApplication.java
ÎļþÃû´Ó server/src/main/java/com/doumee/Application.java ÐÞ¸Ä
@@ -5,23 +5,20 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;
/**
 * å¯åŠ¨ç±»
 * @author Eva.Caesar Liu
 * @date 2022/03/15 09:54
 * @date 2023/02/14 11:14
 */
@Slf4j
@SpringBootApplication
@EnableAsync
@MapperScan("com.doumee.dao")
public class Application {
@EnableAsync
public class PlatformApplication {
    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(Application.class);
        ApplicationContext context = SpringApplication.run(PlatformApplication.class);
        context.getEnvironment();
    }
}
server/platform/src/main/java/com/doumee/api/BaseController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
package com.doumee.api;
import com.doumee.core.model.LoginUserInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
/**
 * Controller基类
 * @author Eva.Caesar Liu
 * @date 2023/02/14 11:14
 */
@Slf4j
public class BaseController {
    /**
     * èŽ·å–å½“å‰ç™»å½•ç”¨æˆ·
     * @author Eva.Caesar Liu
     * @date 2023/02/14 11:14
     */
    protected LoginUserInfo getLoginUser () {
        return (LoginUserInfo)SecurityUtils.getSubject().getPrincipal();
    }
    /**
     * èŽ·å–ID集合
     *
     * @param ids ä½¿ç”¨","隔开的多个ID
     * @return List<Integer>
     */
    protected List<Integer> getIdList (String ids) {
        String [] idArray = ids.split(",");
        List<Integer> idList = new ArrayList<>();
        for (String id : idArray) {
            idList.add(Integer.valueOf(id));
        }
        return idList;
    }
    /**
     * èŽ·å–æ–‡ä»¶å­—èŠ‚æµ
     *
     * @param is è¾“入流
     * @return ByteArrayOutputStream
     */
    protected ByteArrayOutputStream getOutputStream (InputStream is) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        byte[] bs = new byte[is.available()];
        int len;
        while ((len = is.read(bs)) != -1) {
            baos.write(bs, 0, len);
        }
        return baos;
    }
}
server/platform/src/main/java/com/doumee/api/business/ActionLogController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/ActionLogController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.ActionLog;
import com.doumee.service.business.ActionLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/AdController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/AdController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.Ad;
import com.doumee.service.business.AdService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/AliBillController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/AliBillController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.AliBill;
import com.doumee.service.business.AliBillService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/AliBillDetailController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/AliBillDetailController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.AliBillDetail;
import com.doumee.service.business.AliBillDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/BikeRepairController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/BikeRepairController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.BikeRepair;
import com.doumee.service.business.BikeRepairService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/BikesController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/BikesController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.Bikes;
import com.doumee.service.business.BikesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/HolidaysController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/HolidaysController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.Holidays;
import com.doumee.service.business.HolidaysService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/LocksController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/LocksController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.Locks;
import com.doumee.service.business.LocksService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/MemberController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/MemberController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.Member;
import com.doumee.service.business.MemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/MemberRidesController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/MemberRidesController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.MemberRides;
import com.doumee.service.business.MemberRidesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/PricingDetailController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/PricingDetailController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.PricingDetail;
import com.doumee.service.business.PricingDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/PricingParamController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/PricingParamController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.PricingParam;
import com.doumee.service.business.PricingParamService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/RefundController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/RefundController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.Refund;
import com.doumee.service.business.RefundService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/RentSiteController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/RentSiteController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.RentSite;
import com.doumee.service.business.RentSiteService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/SitesController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/SitesController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.Sites;
import com.doumee.service.business.SitesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/TransactionsController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/TransactionsController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.Transactions;
import com.doumee.service.business.TransactionsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/WxBillController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/WxBillController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.WxBill;
import com.doumee.service.business.WxBillService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/business/WxBillDetailController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/business/WxBillDetailController.java ÐÞ¸Ä
@@ -4,17 +4,17 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.WxBillDetail;
import com.doumee.service.business.WxBillDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
server/platform/src/main/java/com/doumee/api/common/CaptchaController.java
copy from server/src/main/java/com/doumee/api/common/CaptchaController.java copy to server/platform/src/main/java/com/doumee/api/common/CaptchaController.java
Îļþ´Ó server/src/main/java/com/doumee/api/common/CaptchaController.java ¸´ÖÆ
@@ -13,7 +13,7 @@
/**
 * @author Eva.Caesar Liu
 * @date 2022/03/15 09:54
 * @date 2023/02/14 11:14
 */
@Api(tags = "图片验证码接口")
@Trace(exclude = true)
@@ -26,7 +26,7 @@
    /**
     * @author Eva.Caesar Liu
     * @date 2022/03/15 09:54
     * @date 2023/02/14 11:14
     */
    @ApiOperation("获取图片验证码")
    @GetMapping("/captcha")
server/platform/src/main/java/com/doumee/api/common/PublicController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,327 @@
package com.doumee.api.common;
import com.alibaba.fastjson.JSONObject;
import com.doumee.api.BaseController;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.constants.Constants;
import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.aliyun.ALiYunUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.UUID;
/**
 * @author Eva.Caesar Liu
 * @date 2023/02/14 11:14
 */
@Api(tags = "公共接口")
@Trace(exclude = true)
@RestController
@RequestMapping("/public")
@Slf4j
public class PublicController extends BaseController {
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
    @ApiOperation(value = "上传", notes = "上传", httpMethod = "POST", position = 6)
    @ApiImplicitParams({
        @ApiImplicitParam(name = "folder", value = "文件夹", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class),
    })
    @PostMapping(value = "/upload", headers = "content-type=multipart/form-data")
    public void uploadMobile(String folder, HttpServletRequest request, HttpServletResponse response) throws Exception {
        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
        upload(multipartRequest, response, folder + "/",
            systemDictDataBiz.queryByCode(Constants.OSS,Constants.BUCKETNAME).getCode(),
            systemDictDataBiz.queryByCode(Constants.OSS,Constants.ACCESS_ID).getCode(),
            systemDictDataBiz.queryByCode(Constants.OSS,Constants.ACCESS_KEY).getCode(),
            systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode(),
            systemDictDataBiz.queryByCode(Constants.OSS,Constants.ENDPOINT).getCode());
    }
    @ApiOperation(value = "上传图片", notes = "上传图片", httpMethod = "POST", position = 6)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "folder", value = "文件夹", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class),
    })
    @PostMapping(value = "/uploadPicture", headers = "content-type=multipart/form-data")
    public void uploadPicture(String folder, HttpServletRequest request, HttpServletResponse response) throws Exception {
        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
        Iterator<String> fileNames = multipartRequest.getFileNames();
        Map<String, Object> context = new HashMap<>();
        while (fileNames.hasNext()){
            MultipartFile file = multipartRequest.getFile(fileNames.next());
            String fileName = file.getOriginalFilename();
            String suffix = fileName.substring(fileName.lastIndexOf("."));
            if ( !StringUtils.equalsIgnoreCase(suffix, ".jpg") || !StringUtils.equalsIgnoreCase(suffix, ".png")) {
                context.put("code", 0);
                context.put("message", "对不起,文件格式上传有误!");
            }
        }
        upload(multipartRequest, response, folder + "/",
                systemDictDataBiz.queryByCode(Constants.OSS,Constants.BUCKETNAME).getCode(),
                systemDictDataBiz.queryByCode(Constants.OSS,Constants.ACCESS_ID).getCode(),
                systemDictDataBiz.queryByCode(Constants.OSS,Constants.ACCESS_KEY).getCode(),
                systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode(),
                systemDictDataBiz.queryByCode(Constants.OSS,Constants.ENDPOINT).getCode());
    }
    public void upload(HttpServletRequest request, HttpServletResponse response, String folder, String bucketName,
        String access_id, String access_key, String resourcePath, String endpoint) throws Exception {
        response.setCharacterEncoding("UTF-8");
        response.setContentType("text/html;charset=UTF-8");
        Map<String, Object> context = new HashMap<>();
        CommonsMultipartResolver multipartResovler = new CommonsMultipartResolver();
        if (multipartResovler.isMultipart(request)) {
            MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
            Iterator<String> it = multipartRequest.getFileNames();
            while (it.hasNext()) {
                MultipartFile file = multipartRequest.getFile((String) it.next());// file
                // multipartRequest.getFile((String)
                // it.next());
                if (file != null) {
                    // 1、上传到服务器临时文件夹
                    String uploadFileName = file.getOriginalFilename();
                    String originname = uploadFileName;
                    if (originname.lastIndexOf("/") >= 0) {
                        originname = originname.substring(originname.lastIndexOf("/") + 1);
                    }
                    String nfix = "";// åŽç¼€å
                    if (StringUtils.isNotBlank(uploadFileName)) {
                        nfix = uploadFileName.substring(uploadFileName.lastIndexOf("."));
                    }
                    if (StringUtils.equalsIgnoreCase(nfix, ".exe")) {
                        context.put("code", 4000);
                        context.put("message", "对不起,文件格式\".exe\"上传有误!");
                        return;
                    }
                    if (StringUtils.equalsIgnoreCase(nfix, ".dll")) {
                        context.put("code", 4000);
                        context.put("message", "对不起,文件格式\".dll\"上传有误!");
                        return;
                    }
                    String nowDate = DateUtil.getNowShortDate();// å½“前时间(年月日)
                    String fileName = UUID.randomUUID().toString() + nfix;
                    String tempFileName =  nowDate + "/" + fileName;
                    String key = folder + tempFileName;// æ–‡ä»¶å
                    ALiYunUtil obs = new ALiYunUtil(endpoint,access_id, access_key);
                    if (obs.uploadOnlineObject(file.getInputStream(),bucketName, key,null)) {
                        // ç§»åŠ¨æˆåŠŸ,返回文件名
                        // sendSuccessMessage(response, resourcePath+key);
                        context.put("success", true);
                        context.put("code", 200);
                        context.put("errno",0);
                        JSONObject fileJSON = new JSONObject();
                        fileJSON.put("url", resourcePath + key);
                        fileJSON.put("imgaddr", tempFileName);
                        fileJSON.put("imgname", fileName);
                        fileJSON.put("originname", originname);
                        context.put("data",fileJSON);
                        context.put("message","请求成功");
                        writerJson(response, context);
                        return;
                    } else {
                        // ç§»åŠ¨å¤±è´¥
                        context.put("code", 0);
                        context.put("message", "上传失败");
                        writerJson(response, context);
                        return;
                    }
                }
            }
        }
        context.put("code", 0);
        context.put("message", "上传失败");
        context.put("errno",0);
        writerJson(response, context);
        return;
    }
    public static void writerJson(HttpServletResponse response, Object object) {
        response.setContentType("application/json");
        writer(response, JSONObject.toJSONString(object));
    }
    private static void writer(HttpServletResponse response, String str) {
        try {
            StringBuffer result = new StringBuffer();
            //设置页面不缓存
            response.setHeader("Pragma", "No-cache");
            response.setHeader("Cache-Control", "no-cache");
            response.setCharacterEncoding("UTF-8");
            PrintWriter out = null;
            out = response.getWriter();
            out.print(str);
            out.flush();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    @ApiOperation(value = "上传", notes = "上传", httpMethod = "POST", position = 6)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "folder", value = "文件夹", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class),
    })
    @PostMapping(value = "/uploadLocal", headers = "content-type=multipart/form-data")
    public void uploadLocal(String folder, HttpServletRequest request, HttpServletResponse response) throws Exception {
        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
        // CommonsMultipartFile files = (CommonsMultipartFile) multipartRequest.getFile("filedata");
        uploadFileLocal(multipartRequest,  folder+ "/", response,
                systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.IMG_DIR).getCode() ,
                systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FILE_DIR).getCode());
    }
    public void uploadFileLocal(HttpServletRequest request, String folder, HttpServletResponse response, String rootPath,String dir) throws Exception {
        response.setCharacterEncoding("UTF-8");
        response.setContentType("text/html;charset=UTF-8");
        CommonsMultipartResolver multipartResovler = new CommonsMultipartResolver();
        Map<String, Object> context = new HashMap<>();
        if (multipartResovler.isMultipart(request)) {
            MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
            Iterator<String> it = multipartRequest.getFileNames();
            while (it.hasNext()) {
                MultipartFile file = multipartRequest.getFile((String) it.next());// file
                // =
                // (CommonsMultipartFile)
                // multipartRequest.getFile((String)
                // it.next());
                if (file != null) {
                    if (file.getSize() > 200 * 1024 * 1024L) {
                        context.put("code", 4000);
                        context.put("message", "上传文件过大");
                        return;
                    }
                    System.out.println(file.getOriginalFilename());
                    if (file.getOriginalFilename() == null) {
                        context.put("code", 4000);
                        context.put("message", "文件名不可为空");
                        return;
                    }
                    /*
                     * if(file.getOriginalFilename().contains(",")||file.getOriginalFilename().
                     * contains(" ")){ sendFailureMessage(response,"文件名称有误,不可含有逗号等特殊字符"); }
                     */
                    String nowDate = DateUtil.getNowShortDate();
                    folder += nowDate + "/";
                    String strDirPath = rootPath + folder;
                    File dirPath = new File(strDirPath);
                    if (!dirPath.exists()) {
                        dirPath.mkdirs();
                    }
                    String uploadFileName = file.getOriginalFilename();
                    String x = UUID.randomUUID().toString().replace("-", "")
                            + uploadFileName.substring(uploadFileName.lastIndexOf("."));
                    String fileName = folder + x;
                    String fileNames = nowDate + "/" + x;
                    uploadFileName = uploadFileName.replace(" ", "");
                    uploadFileName = uploadFileName.replace(",", ",");
                    uploadFileName = uploadFileName.replaceAll(",", "-");
                    System.err.println("R:" + fileName);
                    String fileAndPath = dir + fileName;
                    System.err.println("A:" + fileAndPath);
                    // åˆ¤æ–­å¦‚果临时目录中存在相同名称的文件先删除,在上传
                    File tempFile = new File(rootPath + fileName);
                    if (tempFile.isFile() && tempFile.exists()) {
                        tempFile.getAbsoluteFile().delete();
                    }
                    // ä¸Šä¼ åˆ°æœåŠ¡å™¨ä¸´æ—¶æ–‡ä»¶å¤¹
                    file.transferTo(tempFile);
                    // è½¬ç§»åˆ°FTP服务器
                    String nfix = "";
                    if (null != uploadFileName) {
                        nfix = uploadFileName.substring(uploadFileName.lastIndexOf("."));
                    }
                    if (StringUtils.equalsIgnoreCase(nfix, ".exe")) {
                        context.put("code", 4000);
                        context.put("message", "对不起,文件格式\".exe\"上传有误!");
                        return;
                    }
                    if (StringUtils.equalsIgnoreCase(nfix, ".dll")) {
                        context.put("code", 4000);
                        context.put("message", "对不起,文件格式\".dll\"上传有误!");
                        return;
                    }
                    String remoteName = fileName;
                    String remoteFileName = fileAndPath;
             /*       Map map = new HashMap();
                    map.put("url", remoteFileName);
                    map.put("alt", uploadFileName);
                    map.put("href", remoteFileName);
                    List maps = Arrays.asList(remoteFileName);*/
                    if (true) {
                        // å…³é—­FTP流
                        // ç§»åŠ¨æˆåŠŸ,返回文件名
                        /*context.put("error", 0);
                        context.put("url", remoteFileName);
                        context.put("fullurl", remoteFileName);
                        context.put("fname", uploadFileName);
                        context.put("data", maps);
                        context.put("halfurl", fileNames);*/
                        context.put("success", true);
                        context.put("code", 200);
                        context.put("errno",0);
                        JSONObject fileJSON = new JSONObject();
                        fileJSON.put("url", remoteFileName);
                        fileJSON.put("imgaddr", fileNames);
                        fileJSON.put("imgname", uploadFileName);
                        fileJSON.put("originname", uploadFileName);
                        context.put("data",fileJSON);
                        context.put("message","请求成功");
                        writerJson(response, context);
                        return;
                    } else {
                        // ç§»åŠ¨å¤±è´¥
                        context.put("code", 0);
                        context.put("message", "上传失败");
                        writerJson(response, context);
                    }
                }
                context.put("code", 0);
                context.put("message", "上传失败");
                writerJson(response, context);
                return;
            }
        }
        context.put("code", 0);
        context.put("message", "上传失败");
        writerJson(response, context);
        return;
    }
}
server/platform/src/main/java/com/doumee/api/system/SystemController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/system/SystemController.java ÐÞ¸Ä
@@ -4,7 +4,6 @@
import com.doumee.biz.system.SystemUserBiz;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.LoginUserInfo;
server/platform/src/main/java/com/doumee/api/system/SystemDataPermissionController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/system/SystemDataPermissionController.java ÐÞ¸Ä
@@ -14,7 +14,7 @@
import com.doumee.service.system.SystemDataPermissionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
server/platform/src/main/java/com/doumee/api/system/SystemDepartmentController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/system/SystemDepartmentController.java ÐÞ¸Ä
@@ -4,8 +4,8 @@
import com.doumee.biz.system.SystemDepartmentBiz;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.constants.OperaType;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.system.dto.QuerySystemUserDTO;
server/platform/src/main/java/com/doumee/api/system/SystemDictController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/system/SystemDictController.java ÐÞ¸Ä
@@ -4,8 +4,8 @@
import com.doumee.biz.system.SystemDictBiz;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.constants.Constants;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.constants.OperaType;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.system.dto.QuerySystemDictDTO;
@@ -87,7 +87,6 @@
    public ApiResponse<PageData<SystemDictListVO>> findPage (@RequestBody PageWrap<QuerySystemDictDTO> pageWrap) {
        return ApiResponse.success(systemDictService.findPage(pageWrap));
    }
    @ApiOperation("科目列表")
    @GetMapping("/subjectAndTypeList")
server/platform/src/main/java/com/doumee/api/system/SystemDictDataController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/system/SystemDictDataController.java ÐÞ¸Ä
@@ -3,8 +3,8 @@
import com.doumee.api.BaseController;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.constants.OperaType;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.system.dto.QuerySystemDictDataDTO;
server/platform/src/main/java/com/doumee/api/system/SystemLoginLogController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/system/SystemLoginLogController.java ÐÞ¸Ä
@@ -10,9 +10,12 @@
import com.doumee.service.system.SystemLoginLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
server/platform/src/main/java/com/doumee/api/system/SystemMenuController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/system/SystemMenuController.java ÐÞ¸Ä
@@ -3,8 +3,8 @@
import com.doumee.api.BaseController;
import com.doumee.biz.system.SystemMenuBiz;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.constants.OperaType;
import com.doumee.core.model.ApiResponse;
import com.doumee.dao.system.dto.UpdateSystemMenuSortDTO;
import com.doumee.dao.system.model.SystemMenu;
import com.doumee.dao.system.vo.SystemMenuListVO;
server/platform/src/main/java/com/doumee/api/system/SystemMonitorController.java
server/platform/src/main/java/com/doumee/api/system/SystemPermissionController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/system/SystemPermissionController.java ÐÞ¸Ä
@@ -4,8 +4,8 @@
import com.doumee.biz.system.SystemPermissionBiz;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.constants.Constants;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.constants.OperaType;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.system.dto.QuerySystemPermissionDTO;
server/platform/src/main/java/com/doumee/api/system/SystemPositionController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/system/SystemPositionController.java ÐÞ¸Ä
@@ -5,8 +5,8 @@
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.constants.Constants;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.constants.OperaType;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.system.dto.QuerySystemUserDTO;
server/platform/src/main/java/com/doumee/api/system/SystemRoleController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/system/SystemRoleController.java ÐÞ¸Ä
@@ -4,8 +4,8 @@
import com.doumee.biz.system.SystemRoleBiz;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.constants.Constants;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.constants.OperaType;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.system.dto.CreateRoleMenuDTO;
server/platform/src/main/java/com/doumee/api/system/SystemTraceLogController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/system/SystemTraceLogController.java ÐÞ¸Ä
@@ -11,7 +11,10 @@
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
server/platform/src/main/java/com/doumee/api/system/SystemUserController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/system/SystemUserController.java ÐÞ¸Ä
@@ -4,8 +4,8 @@
import com.doumee.biz.system.SystemUserBiz;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.constants.OperaType;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.LoginUserInfo;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
@@ -126,4 +126,12 @@
        return ApiResponse.success(getLoginUser());
    }
}
server/platform/src/main/java/com/doumee/config/shiro/ShiroAuthFilter.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
package com.doumee.config.shiro;
import com.alibaba.fastjson.JSON;
import com.doumee.core.model.ApiResponse;
import org.apache.shiro.web.filter.authc.FormAuthenticationFilter;
import org.springframework.http.HttpStatus;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponse;
/**
 * Shiro认证过滤器,处理未认证情况的响应
 * @author Eva.Caesar Liu
 * @date 2023/04/17 12:11
 */
public class ShiroAuthFilter extends FormAuthenticationFilter {
        @Override
        protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
            HttpServletResponse servletResponse = (HttpServletResponse) response;
            servletResponse.setHeader("content-type", "application/json;charset=UTF-8");
            servletResponse.getWriter().write(JSON.toJSONString(ApiResponse.failed(HttpStatus.UNAUTHORIZED.value(), "未登录或登录信息已过期")));
            return Boolean.FALSE;
        }
}
server/platform/src/main/java/com/doumee/config/shiro/ShiroCache.java
ÎļþÃû´Ó server/src/main/java/com/doumee/config/shiro/ShiroCache.java ÐÞ¸Ä
@@ -29,7 +29,7 @@
@Component
public class ShiroCache implements Cache<Object, Serializable> {
    private String keyPrefix = "";
    private String keyPrefix = "ProSelect";
    @Resource(name="sessionRedisTemplate")
    private RedisTemplate<Object, Serializable> redisTemplate;
@@ -64,7 +64,11 @@
        if (key == null) {
            return null;
        }
        redisTemplate.opsForValue().set(getKey(key), value, timeout, TimeUnit.SECONDS);
        try {
            redisTemplate.opsForValue().set(getKey(key), value, timeout, TimeUnit.SECONDS);
        }catch (Exception e){
        }
        return value;
    }
server/platform/src/main/java/com/doumee/config/shiro/ShiroCacheManager.java
server/platform/src/main/java/com/doumee/config/shiro/ShiroConfig.java
ÎļþÃû´Ó server/src/main/java/com/doumee/config/shiro/ShiroConfig.java ÐÞ¸Ä
@@ -88,19 +88,40 @@
        shiroFilterFactoryBean.setSecurityManager(securityManager);
        Map<String, String> map = new LinkedHashMap<>();
        // è·¯å¾„拦截配置
        map.put("/web/user/login", "anon");
        map.put("/public/uploadRichText", "anon");
        // è·¯å¾„拦截配置
//        map.put("/system/dictData/companyUserRules","anon");
//        map.put("/system/login", "anon");
//        map.put("/system/logout", "anon");
//        map.put("/common/captcha", "anon");
//        map.put("/business/areas/*", "anon");
//        map.put("/public/uploadPicture","anon");
//        map.put("/public/uploadLocal","anon");
        map.put("/system/dictData/companyUserRules","anon");
        map.put("/system/login", "anon");
        map.put("/system/logout", "anon");
        map.put("/system/loginH5", "anon");
        map.put("/common/captcha", "anon");
        //放行 scratch æŽ¥å£
        map.put("/web/scratch/**", "anon");
        map.put("/business/areas/*", "anon");
        map.put("/public/uploadPicture","anon");
        map.put("/public/uploadLocal","anon");
//        map.put("/business/company/register", "anon");
//        map.put("/business/labels/page","anon");
//        map.put("/business/*/list","anon");
//        map.put("/business/goods/goodsPage","anon");
//        map.put("/business/goods/h5Image","anon");
//        map.put("/business/goods/export","anon");
//        map.put("/business/goods/listForH5","anon");
        // - æ”¾è¡Œswagger
        map.put("/doc.html", "anon");
        map.put("/webjars/**", "anon");
        map.put("/swagger-resources/**", "anon");
        map.put("/v2/api-docs/**", "anon");
        // - å…¶ä»–接口统一拦截
        map.put("/**", "authc");
        shiroFilterFactoryBean.setFilterChainDefinitionMap(map);
server/platform/src/main/java/com/doumee/config/shiro/ShiroCredentialsMatcher.java
copy from server/src/main/java/com/doumee/config/shiro/ShiroCredentialsMatcher.java copy to server/platform/src/main/java/com/doumee/config/shiro/ShiroCredentialsMatcher.java
Îļþ´Ó server/src/main/java/com/doumee/config/shiro/ShiroCredentialsMatcher.java ¸´ÖÆ
@@ -19,7 +19,6 @@
 */
@Component
public class ShiroCredentialsMatcher extends HashedCredentialsMatcher {
    @Lazy
    @Autowired
    private SystemUserService systemUserService;
@@ -34,6 +33,12 @@
        if (systemUser == null) {
            return Boolean.FALSE;
        }
//        if(usernamePasswordToken.getDdLogin()){
//            return Boolean.TRUE;
//        }
//        if(usernamePasswordToken.getWxLogin()){
//            return Boolean.TRUE;
//        }
        // åŠ å¯†å¯†ç 
        String pwd = Utils.Secure.encryptPassword(new String(usernamePasswordToken.getPassword()), systemUser.getSalt());
        // æ¯”较密码
server/platform/src/main/java/com/doumee/config/shiro/ShiroRealm.java
ÎļþÃû´Ó server/src/main/java/com/doumee/config/shiro/ShiroRealm.java ÐÞ¸Ä
@@ -1,15 +1,17 @@
package com.doumee.config.shiro;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.constants.Constants;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.LoginUserInfo;
import com.doumee.core.constants.Constants;
import com.doumee.core.utils.DateUtil;
import com.doumee.dao.system.model.SystemPermission;
import com.doumee.dao.system.model.SystemRole;
import com.doumee.dao.system.model.SystemUser;
import com.doumee.service.system.SystemDataPermissionService;
import com.doumee.service.system.SystemPermissionService;
import com.doumee.service.system.SystemRoleService;
import com.doumee.service.system.SystemUserService;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
@@ -22,6 +24,7 @@
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.List;
/**
@@ -34,14 +37,14 @@
    @Lazy
    @Autowired
    private SystemDataPermissionService systemDataPermissionService;
    @Lazy
    @Autowired
    private SystemUserService systemUserService;
    @Lazy
    @Autowired
    private SystemRoleService systemRoleService;
    @Lazy
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
    @Lazy
    @Autowired
@@ -68,7 +71,7 @@
     * @date 2022/03/15 09:54
     */
    @Override
    protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException {
    protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException{
        // èŽ·å–ç”¨æˆ·å
        String username = authenticationToken.getPrincipal().toString();
        // æ ¹æ®ç”¨æˆ·åæŸ¥è¯¢ç”¨æˆ·å¯¹è±¡
@@ -76,15 +79,13 @@
        queryDto.setUsername(username);
        queryDto.setDeleted(Constants.ZERO);
        SystemUser user = systemUserService.findOne(queryDto);
        if (user == null) {
            return null;
        if(user == null){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,账号或密码不正确!");
        }
            // èŽ·å–ç™»å½•ç”¨æˆ·ä¿¡æ¯
        List<SystemRole>       roles = systemRoleService.findByUserId(user.getId());
        List<SystemPermission>     permissions = systemPermissionService.findByUserId(user.getId());
        String imgPath = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()+systemDictDataBiz.queryByCode(Constants.FILES_DIR,Constants.AVATAR_FILE).getCode();
        LoginUserInfo userInfo = LoginUserInfo.from(user, imgPath,roles, permissions);
        // èŽ·å–ç™»å½•ç”¨æˆ·ä¿¡æ¯
        List<SystemRole> roles = systemRoleService.findByUserId(user.getId());
        List<SystemPermission> permissions = systemPermissionService.findByUserId(user.getId());
        LoginUserInfo userInfo = LoginUserInfo.from(user, roles, permissions);
        // éªŒè¯ç”¨æˆ·
        return new SimpleAuthenticationInfo(userInfo, user.getPassword(), this.getName());
    }
server/platform/src/main/java/com/doumee/config/shiro/ShiroSessionDAO.java
copy from server/src/main/java/com/doumee/config/shiro/ShiroSessionDAO.java copy to server/platform/src/main/java/com/doumee/config/shiro/ShiroSessionDAO.java
Îļþ´Ó server/src/main/java/com/doumee/config/shiro/ShiroSessionDAO.java ¸´ÖÆ
@@ -10,7 +10,10 @@
import org.springframework.stereotype.Component;
import java.io.Serializable;
import java.util.*;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
/**
 * è‡ªå®šä¹‰Shiro SessionDAO,将会话信息存入缓存中
@@ -27,7 +30,7 @@
    @Autowired
    private ShiroCache shiroCache;
    private int expireTime = 60 * 60 * 3;
    private int expireTime = 60 * 60 * 24;
    @Autowired
    private ShiroTokenManager shiroTokenManager;
server/platform/src/main/java/com/doumee/config/shiro/ShiroSessionManager.java
ÎļþÃû´Ó server/src/main/java/com/doumee/config/shiro/ShiroSessionManager.java ÐÞ¸Ä
@@ -65,7 +65,6 @@
        }
        return sessionId;
    }
    @Override
    public boolean isServletContainerSessions() {
        return false;
server/platform/src/main/java/com/doumee/config/shiro/ShiroSessionSerializer.java
server/platform/src/main/java/com/doumee/config/shiro/ShiroToken.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,54 @@
package com.doumee.config.shiro;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.springframework.stereotype.Component;
/**
 * è‡ªå®šä¹‰Token ï¼Œå¤„理认证和权限
 * @author Eva.Caesar Liu
 * @date 2022/04/18 18:12
 */
@Component
public class ShiroToken extends UsernamePasswordToken {
    /**
     * å…¬å¸ID
     */
    Integer companyId;
    Boolean isDdLogin;
    Boolean isWxLogin;
    public ShiroToken() {
    }
    public ShiroToken(Integer companyId, String username, String password, boolean isDdLogin, boolean isWxLogin) {
        super(username,  password, false, (String)null);
        this.companyId = companyId;
        this.isDdLogin = isDdLogin;
        this.isWxLogin = isWxLogin;
    }
    public Boolean getDdLogin() {
        return isDdLogin;
    }
    public void setDdLogin(Boolean ddLogin) {
        isDdLogin = ddLogin;
    }
    public Boolean getWxLogin() {
        return isWxLogin;
    }
    public void setWxLogin(Boolean wxLogin) {
        isWxLogin = wxLogin;
    }
    public Integer getCompanyId() {
        return companyId;
    }
    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }
}
server/platform/src/main/java/com/doumee/config/shiro/ShiroTokenManager.java
server/platform/src/main/java/com/doumee/config/swagger/SwaggerConfig.java
ÎļþÃû´Ó server/src/main/java/com/doumee/config/swagger/SwaggerConfig.java ÐÞ¸Ä
@@ -46,11 +46,10 @@
                .version(version)
                .build();
    }
    @Bean
    public Docket getDocket() {
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(this.getApiInfo()).groupName("【管理端接口API】")
                .apiInfo(this.getApiInfo()).groupName("【系统管理接口API】")
                .host(host)
                .select()
                .apis( basePackage("com.doumee.api.system;com.doumee.api.business;"))
@@ -59,19 +58,17 @@
                .paths(PathSelectors.any())
                .build();
    }
    @Bean
    public Docket getDocket2() {
    public Docket getDocket1() {
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(this.getApiInfo()).groupName("【公共接口API】")
                .host(host)
                .select()
                .apis( basePackage("com.doumee.api.common"))
                // è®¾ç½®éœ€è¦è¢«æ‰«æçš„类,这里设置为添加了@Api注解的类
            .apiInfo(this.getApiInfo()).groupName("【公共接口API】")
            .host(host)
            .select()
            .apis( basePackage("com.doumee.api.common"))
            // è®¾ç½®éœ€è¦è¢«æ‰«æçš„类,这里设置为添加了@Api注解的类
//                .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
                .paths(PathSelectors.any())
                .build();
            .paths(PathSelectors.any())
            .build();
    }
    /**
     * é‡å†™basePackage方法,使能够实现多包访问,复制贴上去
server/platform/src/main/java/com/doumee/config/swagger/SwaggerInterceptor.java
ÎļþÃû´Ó server/src/main/java/com/doumee/config/swagger/SwaggerInterceptor.java ÐÞ¸Ä
@@ -1,4 +1,5 @@
package com.doumee.config.swagger;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
@@ -12,7 +13,7 @@
/**
 * Swagger拦截器
 * @author Eva.Caesar Liu
 * @date 2022/03/15 09:54
 * @date 2022/04/18 18:12
 */
@Slf4j
@Component
server/platform/src/main/java/com/doumee/config/swagger/SwaggerInterceptorConfig.java
ÎļþÃû´Ó server/src/main/java/com/doumee/config/swagger/SwaggerInterceptorConfig.java ÐÞ¸Ä
@@ -8,14 +8,13 @@
/**
 * Swagger拦截器配置
 * @author Eva.Caesar Liu
 * @date 2022/03/15 09:54
 * @date 2022/04/18 18:12
 */
@Configuration
public class SwaggerInterceptorConfig implements WebMvcConfigurer {
    @Autowired
    private SwaggerInterceptor swaggerInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(swaggerInterceptor).addPathPatterns("/swagger-ui.html", "/doc.html");
server/platform/src/main/java/com/doumee/task/ScheduleTool.java
ÎļþÃû´Ó server/src/main/java/com/doumee/task/ScheduleTool.java ÐÞ¸Ä
@@ -15,7 +15,7 @@
 */
@Component
@EnableScheduling
public class ScheduleTool  {
public class ScheduleTool {
server/platform/src/main/resources/application.yml
ÎļþÃû´Ó server/src/main/resources/application.yml ÐÞ¸Ä
@@ -7,7 +7,7 @@
spring:
#  application:
#    name: tielangtou
#    name: parkbike
  profiles:
    active: dev
  # JSON返回配置
@@ -56,4 +56,7 @@
  # æŒ‡å®šä½¿ç”¨çš„æ•°æ®åº“数据库
  helperDialect: postgresql
  # reasonable:分页合理化参数,默认值为false。当该参数设置为 true æ—¶ï¼ŒpageNum<=0 æ—¶ä¼šæŸ¥è¯¢ç¬¬ä¸€é¡µï¼Œ         pageNum>pages(超过总数时),会查询最后一页。默认false æ—¶ï¼Œç›´æŽ¥æ ¹æ®å‚数进行查询。
  reasonable: true
  reasonable: true
# WEB服务器配置
server:
  port: 10012
server/pom.xml
@@ -3,13 +3,18 @@
         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.parkbike</groupId>
  <groupId>com.doumee</groupId>
  <artifactId>parkbike</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <packaging>jar</packaging>
  <packaging>pom</packaging>
  <name>parkbike</name>
  <description></description>
  <modules>
    <module>platform</module>
    <module>web</module>
    <module>services</module>
  </modules>
  <parent>
    <groupId>org.springframework.boot</groupId>
@@ -31,8 +36,15 @@
    <jna.version>5.7.0</jna.version>
    <poi.version>5.0.0</poi.version>
    <okhttp.version>3.14.2</okhttp.version>
    <!-- jwtToken -->
    <jjwt.version>0.9.1</jjwt.version>
    <!-- hutool å·¥å…·ç›¸å…³-->
    <hutool.version>5.5.8</hutool.version>
    <!-- å¾®ä¿¡å°ç¨‹åº -->
    <weixin-java-miniapp.version>4.1.0</weixin-java-miniapp.version>
    <!-- å¾®ä¿¡æ”¯ä»˜ -->
    <weixin-java-pay.version>4.1.0</weixin-java-pay.version>
  </properties>
  <dependencies>
@@ -256,6 +268,19 @@
      <artifactId>commons-net</artifactId>
      <version>3.8.0</version>
    </dependency>
    <!-- WeChat å°ç¨‹åº -->
    <dependency>
      <groupId>com.github.binarywang</groupId>
      <artifactId>weixin-java-miniapp</artifactId>
      <version>${weixin-java-miniapp.version}</version>
    </dependency>
    <!-- WeChat æ”¯ä»˜ -->
    <dependency>
      <groupId>com.github.binarywang</groupId>
      <artifactId>weixin-java-pay</artifactId>
      <version>${weixin-java-pay.version}</version>
    </dependency>
  </dependencies>
  <build>
server/services/db/award.permissions.sql
server/services/db/award_ext.permissions.sql
server/services/db/business.action_log.permissions.sql
server/services/db/business.ad.permissions.sql
server/services/db/business.ali_bill.permissions.sql
server/services/db/business.ali_bill_detail.permissions.sql
server/services/db/business.award.permissions.sql
server/services/db/business.bike_repair.permissions.sql
server/services/db/business.bikes.permissions.sql
server/services/db/business.campus.permissions.sql
server/services/db/business.category.permissions.sql
server/services/db/business.classes.permissions.sql
server/services/db/business.contest.permissions.sql
server/services/db/business.contest_course.permissions.sql
server/services/db/business.course.permissions.sql
server/services/db/business.declare_done.permissions.sql
server/services/db/business.favorite.permissions.sql
server/services/db/business.favorite_problem.permissions.sql
server/services/db/business.holidays.permissions.sql
server/services/db/business.lesson.permissions.sql
server/services/db/business.locks.permissions.sql
server/services/db/business.member.permissions.sql
server/services/db/business.member_rides.permissions.sql
server/services/db/business.paper.permissions.sql
server/services/db/business.paper_problem.permissions.sql
server/services/db/business.paper_rank.permissions.sql
server/services/db/business.pricing_detail.permissions.sql
server/services/db/business.pricing_param.permissions.sql
server/services/db/business.problem.permissions.sql
server/services/db/business.problem_score.permissions.sql
server/services/db/business.problem_score_submission.permissions.sql
server/services/db/business.problem_tags.permissions.sql
server/services/db/business.refund.permissions.sql
server/services/db/business.rent_site.permissions.sql
server/services/db/business.sites.permissions.sql
server/services/db/business.student_learn_lesson.permissions.sql
server/services/db/business.submission.permissions.sql
server/services/db/business.teacher_have_lesson.permissions.sql
server/services/db/business.transactions.permissions.sql
server/services/db/business.user.permissions.sql
server/services/db/business.user_choose_class.permissions.sql
server/services/db/business.user_contest.permissions.sql
server/services/db/business.user_integral.permissions.sql
server/services/db/business.wx_bill.permissions.sql
server/services/db/business.wx_bill_detail.permissions.sql
server/services/db/campus.permissions.sql
server/services/db/category.permissions.sql
server/services/db/class.permissions.sql
server/services/db/classes.permissions.sql
server/services/db/classes_ext.permissions.sql
server/services/db/contest.permissions.sql
server/services/db/contest_course.permissions.sql
server/services/db/course.permissions.sql
server/services/db/ext.award_ext.permissions.sql
server/services/db/ext.campus_ext.permissions.sql
server/services/db/ext.category_ext.permissions.sql
server/services/db/ext.classes_ext.permissions.sql
server/services/db/ext.contest_course_ext.permissions.sql
server/services/db/ext.contest_ext.permissions.sql
server/services/db/ext.course_ext.permissions.sql
server/services/db/ext.favorite_ext.permissions.sql
server/services/db/ext.favorite_problem_ext.permissions.sql
server/services/db/ext.lesson_ext.permissions.sql
server/services/db/ext.paper_ext.permissions.sql
server/services/db/ext.paper_problem_ext.permissions.sql
server/services/db/ext.paper_rank_ext.permissions.sql
server/services/db/ext.problem_ext.permissions.sql
server/services/db/ext.problem_score_ext.permissions.sql
server/services/db/ext.problem_score_submission_ext.permissions.sql
server/services/db/ext.problem_tags_ext.permissions.sql
server/services/db/ext.student_learn_lesson_ext.permissions.sql
server/services/db/ext.submission_ext.permissions.sql
server/services/db/ext.teacher_have_lesson_ext.permissions.sql
server/services/db/ext.user_choose_class_ext.permissions.sql
server/services/db/ext.user_contest_ext.permissions.sql
server/services/db/ext.user_integral_ext.permissions.sql
server/services/db/favorite.permissions.sql
server/services/db/favorite_problem.permissions.sql
server/services/db/lesson.permissions.sql
server/services/db/paper.permissions.sql
server/services/db/paper_problem.permissions.sql
server/services/db/paper_rank.permissions.sql
server/services/db/problem.permissions.sql
server/services/db/problem_ext.permissions.sql
server/services/db/problem_score.permissions.sql
server/services/db/problem_score_submission.permissions.sql
server/services/db/problem_tags.permissions.sql
server/services/db/student_learn_lesson.permissions.sql
server/services/db/submission.permissions.sql
server/services/db/system.system_user.permissions.sql
server/services/db/teacher_have_lesson.permissions.sql
server/services/db/transactions.permissions.sql
server/services/db/user.permissions.sql
server/services/db/user_choose_class.permissions.sql
server/services/db/user_contest.permissions.sql
server/services/db/user_integral.permissions.sql
server/services/doc/init.sql
server/services/pom.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
<?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.doumee</groupId>
    <artifactId>services</artifactId>
    <version>1.0-SNAPSHOT</version>
    <parent>
        <groupId>com.doumee</groupId>
        <artifactId>parkbike</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>
</project>
server/services/src/main/java/com/doumee/Main.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
package com.doumee;
public class Main {
    public static void main(String[] args) {
        System.out.println("Hello world!");
    }
}
server/services/src/main/java/com/doumee/biz/system/SystemDataPermissionBiz.java
server/services/src/main/java/com/doumee/biz/system/SystemDepartmentBiz.java
server/services/src/main/java/com/doumee/biz/system/SystemDictBiz.java
server/services/src/main/java/com/doumee/biz/system/SystemDictDataBiz.java
server/services/src/main/java/com/doumee/biz/system/SystemMenuBiz.java
server/services/src/main/java/com/doumee/biz/system/SystemPermissionBiz.java
server/services/src/main/java/com/doumee/biz/system/SystemPositionBiz.java
server/services/src/main/java/com/doumee/biz/system/SystemRoleBiz.java
server/services/src/main/java/com/doumee/biz/system/SystemUserBiz.java
server/services/src/main/java/com/doumee/biz/system/impl/SystemDataPermissionBizImpl.java
server/services/src/main/java/com/doumee/biz/system/impl/SystemDepartmentBizImpl.java
server/services/src/main/java/com/doumee/biz/system/impl/SystemDictBizImpl.java
server/services/src/main/java/com/doumee/biz/system/impl/SystemDictDataBizImpl.java
server/services/src/main/java/com/doumee/biz/system/impl/SystemMenuBizImpl.java
server/services/src/main/java/com/doumee/biz/system/impl/SystemPermissionBizImpl.java
server/services/src/main/java/com/doumee/biz/system/impl/SystemPositionBizImpl.java
server/services/src/main/java/com/doumee/biz/system/impl/SystemRoleBizImpl.java
server/services/src/main/java/com/doumee/biz/system/impl/SystemUserBizImpl.java
server/services/src/main/java/com/doumee/config/handler/GlobalExceptionHandler.java
server/services/src/main/java/com/doumee/config/mybatis/MyBatisInterceptor.java
server/services/src/main/java/com/doumee/config/mybatis/MyBatisPlusConfig.java
server/services/src/main/java/com/doumee/config/mybatis/SpringUtils.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,69 @@
package com.doumee.config.mybatis;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
/**
 * NOTICE: NEVER USE IT WHEN REGISTERING A SPRING BEAN.
 *
 * @author Guang YANG
 */
@Component
public class SpringUtils implements ApplicationContextAware {
    private static ApplicationContext CTX;
    public static ApplicationContext get() {
        return CTX;
    }
    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        CTX = applicationContext;
    }
    /**
     * å‘容器中动态添加Bean
     *
     * @param ctx
     * @param beanName
     * @param beanClass
     */
    public static void addBean(ApplicationContext ctx, String beanName, Class beanClass) {
        BeanDefinitionRegistry beanDefReg = (DefaultListableBeanFactory)ctx.getAutowireCapableBeanFactory();
        BeanDefinitionBuilder beanDefBuilder = BeanDefinitionBuilder.genericBeanDefinition(beanClass);
        BeanDefinition beanDef = beanDefBuilder.getBeanDefinition();
        if (!beanDefReg.containsBeanDefinition(beanName)) {
            beanDefReg.registerBeanDefinition(beanName, beanDef);
        }
    }
    /**
     * ä»Žå®¹å™¨ä¸­ç§»é™¤Bean
     *
     * @param ctx
     * @param beanName
     */
   public static void removeBean(ApplicationContext ctx, String beanName) {
        BeanDefinitionRegistry beanDefReg = (DefaultListableBeanFactory) ctx.getAutowireCapableBeanFactory();
        beanDefReg.getBeanDefinition(beanName);
        beanDefReg.removeBeanDefinition(beanName);
    }
    /**
     * éåŽ†è¾“å‡ºæ‰€æœ‰Bean的信息
     */
    static void showAllBeans(ApplicationContext ctx) {
        //遍历
        for (String name : ctx.getBeanDefinitionNames()) {
            System.out.println("name:" + name + ",class:" + ctx.getBean(name).getClass());
        }
    }
}
server/services/src/main/java/com/doumee/config/redis/RedisConfig.java
server/services/src/main/java/com/doumee/config/redis/RedisValueDefaultSerializer.java
server/services/src/main/java/com/doumee/core/Jwt/JwtPayLoad.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.doumee.core.Jwt;
import io.swagger.models.auth.In;
import lombok.Data;
import java.util.HashMap;
import java.util.Map;
/**
 * jwt的第二部分
 *
 * @author fengshuonan
 * @Date 2019/7/20 20:45
 */
@Data
public class JwtPayLoad {
    /**
     * ç”¨æˆ·id
     */
    private Integer memberId;
    private long expire;
    public JwtPayLoad() {
    }
    public JwtPayLoad(Integer memberId) {
        this.memberId = memberId;
    }
    /**
     * payload转化为map形式
     *
     * @author fengshuonan
     * @Date 2019/7/20 20:50
     */
    public Map<String, Object> toMap() {
        HashMap<String, Object> map = new HashMap<>();
        map.put("memberId", this.memberId);
        return map;
    }
    /**
     * payload转化为map形式
     *
     * @author fengshuonan
     * @Date 2019/7/20 20:50
     */
    public static JwtPayLoad toBean(Map<String, Object> map) {
        if (map == null || map.size() == 0) {
            return new JwtPayLoad();
        } else {
            JwtPayLoad jwtPayLoad = new JwtPayLoad();
            jwtPayLoad.setMemberId((Integer) map.get("memberId"));
            return jwtPayLoad;
        }
    }
}
server/services/src/main/java/com/doumee/core/Jwt/JwtTokenUtil.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,176 @@
/**
 * Copyright 2018-2020 stylefeng & fengshuonan (sn93@qq.com)
 * <p>
 * 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
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * 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.
 */
package com.doumee.core.Jwt;
import io.jsonwebtoken.*;
import org.apache.commons.lang3.StringUtils;
import java.util.Date;
import java.util.Map;
/**
 * <p>后台系统jwt token工具类</p>
 * <pre>
 *     jwt的claim里一般包含以下几种数据:
 *         1. iss -- token的发行者
 *         2. sub -- è¯¥JWT所面向的用户
 *         3. aud -- æŽ¥æ”¶è¯¥JWT的一方
 *         4. exp -- token的失效时间
 *         5. nbf -- åœ¨æ­¤æ—¶é—´æ®µä¹‹å‰,不会被处理
 *         6. iat -- jwt发布时间
 *         7. jti -- jwt唯一标识,防止重复使用
 * </pre>
 *
 * @author fengshuonan
 * @Date 2017/8/25 10:59
 */
public class JwtTokenUtil {
    //Header åç§°
    public static final String HEADER_KEY = "token";
    //取值名称
    public static final String UserId_Name = "AppUserId";
    //加密密钥
    private final static String jwtSecret = "MhAjU9poLf8ko54K25XBDtonaL33vtt1";
    //过期时间(s) 86400L=1天 604800L=7天
    private static final long expire = 86400L;
    /**
     * ç”Ÿæˆtoken,根据userId和默认过期时间
     */
    public static String generateToken(JwtPayLoad jwtPayLoad) {
        Long expiredSeconds = getExpireSeconds();
        final Date expirationDate = new Date(System.currentTimeMillis() + expiredSeconds * 1000);
        return generateToken(jwtPayLoad.getMemberId(), expirationDate, jwtPayLoad.toMap());
    }
    /**
     * éªŒè¯token是否失效
     */
    public static Boolean isTokenExpired(String token) {
        try {
            final Date expiration = getExpirationDateFromToken(token);
            return expiration.before(new Date());
        } catch (ExpiredJwtException expiredJwtException) {
            return true;
        }
    }
    /**
     * ç”Ÿæˆtoken,根据userId和默认过期时间
     */
    public static String generateTokenOld(JwtPayLoad jwtPayLoad) {
        Long expiredSeconds = getExpireSeconds();
        final Date expirationDate = new Date(System.currentTimeMillis() + expiredSeconds * 1000);
        return generateToken(jwtPayLoad.getMemberId(), expirationDate, jwtPayLoad.toMap());
    }
    /**
     * èŽ·å–jwt的payload部分
     */
    public static JwtPayLoad getJwtPayLoad(String token) {
        Claims claimFromToken = getClaimFromToken(token);
        return JwtPayLoad.toBean(claimFromToken);
    }
    /**
     * è§£æžtoken是否正确(true-正确, false-错误)
     */
    public static Boolean checkToken(String token) {
        try {
            String jwtSecret = getJwtSecret();
            Jwts.parser().setSigningKey(jwtSecret).parseClaimsJws(token).getBody();
            return true;
        } catch (JwtException e) {
            return false;
        }
    }
    /**
     * éªŒè¯token是否失效
     */
    public static Boolean isTokenExpiredOld(String token) {
        try {
            final Date expiration = getExpirationDateFromToken(token);
            return expiration.before(new Date());
        } catch (ExpiredJwtException expiredJwtException) {
            return true;
        }
    }
    // ä»Žtoken中获取用户ID
    public static String getUserId(String token){
        return getClaimFromToken(token).getSubject();
    }
    /**
     * èŽ·å–jwt失效时间
     */
    public static Date getExpirationDateFromToken(String token) {
        return getClaimFromToken(token).getExpiration();
    }
    /**
     * ç”Ÿæˆtoken,根据userId和过期时间
     */
    public static String generateToken(Integer userId, Date exppiredDate, Map<String, Object> claims) {
        final Date createdDate = new Date();
        String secret = getJwtSecret();
        if (claims == null) {
            return Jwts.builder()
                    .setSubject(userId.toString())
                    .setIssuedAt(createdDate)
                    .setExpiration(exppiredDate)
                    .signWith(SignatureAlgorithm.HS512, secret)
                    .compact();
        } else {
            return Jwts.builder()
                    .setClaims(claims)
                    .setSubject(userId.toString())
                    .setIssuedAt(createdDate)
                    .setExpiration(exppiredDate)
                    .signWith(SignatureAlgorithm.HS512, secret)
                    .compact();
        }
    }
    /**
     * èŽ·å–jwt的payload部分
     */
    public static Claims getClaimFromToken(String token) {
        if (StringUtils.isBlank(token)) {
            throw new IllegalArgumentException("token参数为空!");
        }
        String jwtSecret = getJwtSecret();
        return Jwts.parser().setSigningKey(jwtSecret).parseClaimsJws(token).getBody();
    }
    /**
     * èŽ·å–ç³»ç»Ÿåœ°å¯†é’¥
     */
    private static String getJwtSecret() {
        return jwtSecret;
    }
    /**
     * èŽ·å–ç³»ç»Ÿåœ°å¯†é’¥è¿‡æœŸæ—¶é—´ï¼ˆå•ä½ï¼šç§’ï¼‰
     */
    private static Long getExpireSeconds() {
        return expire;
    }
}
server/services/src/main/java/com/doumee/core/Jwt/WebMvcConfig.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,111 @@
package com.doumee.core.Jwt;
import com.doumee.core.annotation.LoginRequired;
import com.doumee.core.constants.Constants;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import io.jsonwebtoken.JwtException;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.lang.reflect.Method;
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
    @Autowired
    private JdbcTemplate dao;
    /**
     * æ·»åŠ æ‹¦æˆªå™¨
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //API接口JwtToken拦截器
        HandlerInterceptor TokenInterceptor = new HandlerInterceptor() {
            @Override
            public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
                // å¦‚果不是映射到方法直接通过
                if (!(handler instanceof HandlerMethod)) {
                    return true;
                }
                HandlerMethod handlerMethod = (HandlerMethod) handler;
                Class<?> beanType = handlerMethod.getBeanType();
//                Method method = handlerMethod.getMethod();
                // æœ‰ @LoginRequired æ³¨è§£ï¼Œéœ€è¦ç™»å½•认证
                if (beanType.isAnnotationPresent(LoginRequired.class)) {
                    //获取token
                    String token = request.getHeader(JwtTokenUtil.HEADER_KEY);  // ä»Ž http è¯·æ±‚头中取出 token
                    if (StringUtils.isNotBlank(token)) {
                        checkLogin(request,response);
                    } else {
                        throw new BusinessException(ResponseStatus.BE_OVERDUE.getCode(),"未登录");
                    }
                }else if (handlerMethod.hasMethodAnnotation(LoginRequired.class)){
                    //获取token
                    String token = request.getHeader(JwtTokenUtil.HEADER_KEY);  // ä»Ž http è¯·æ±‚头中取出 token
                    if (StringUtils.isNotBlank(token)) {
                        checkLogin(request,response);
                    } else {
                        throw new BusinessException(ResponseStatus.BE_OVERDUE.getCode(),"未登录");
                    }
                }
                return true;
            }
        };
        registry.addInterceptor(TokenInterceptor).addPathPatterns("/web/**");
    }
    public Boolean checkLogin(HttpServletRequest request, HttpServletResponse response){
        String token = request.getHeader(JwtTokenUtil.HEADER_KEY);
        try {
            //判断Token是否超时
            boolean expiration = JwtTokenUtil.isTokenExpired(token);
            if (expiration) {
                throw new BusinessException(ResponseStatus.TOKEN_EXCEED_TIME.getCode(),"长时间未操作,请重新登录");
            }
            //获取账号ID
            Integer memberId = JwtTokenUtil.getJwtPayLoad(token).getMemberId();
            Integer isDeleted = dao.queryForObject(" select COALESCE(ISDELETED,1)  from `member` where id  = ?", Integer.class, memberId);
            if(isDeleted== Constants.ONE){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"用户已删除,请联系管理员");
            }
            Integer isForbidden = dao.queryForObject(" select COALESCE(STATUS,1)  from `member` where id  = ?", Integer.class, memberId);
            if(isForbidden== Constants.ONE){
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"用户已禁用,请联系管理员");
            }
            Integer count = dao.queryForObject("select count(1) from `member` where id  = ?", Integer.class, memberId);
            if (count != null && count > 0) {
                request.setAttribute(JwtTokenUtil.UserId_Name, memberId);
                return true;
            }else{
                throw new BusinessException(ResponseStatus.BE_OVERDUE.getCode(),"用户信息出错");
            }
        } catch (IllegalArgumentException | JwtException e) {
            throw new BusinessException(ResponseStatus.BE_OVERDUE.getCode(),"未登录");
        }
    }
    @Bean
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
}
server/services/src/main/java/com/doumee/core/annotation/LoginRequired.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
package com.doumee.core.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.METHOD,ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface LoginRequired {
}
server/services/src/main/java/com/doumee/core/annotation/excel/ExcelColumn.java
ÎļþÃû´Ó server/src/main/java/com/doumee/core/annotation/excel/ExcelColumn.java ÐÞ¸Ä
@@ -48,22 +48,22 @@
    /**
     * å­—体颜色
     */
    IndexedColors color () default IndexedColors.BLACK;
    IndexedColors color() default IndexedColors.BLACK;
    /**
     * å­—体大小(像素)
     */
    short fontSize () default 12;
    short fontSize() default 12;
    /**
     * ç²—体
     */
    boolean bold () default false;
    boolean bold() default false;
    /**
     * æ–œä½“
     */
    boolean italic () default false;
    boolean italic() default false;
    /**
     * å€¼æ˜ å°„,如0=女;1=男
server/services/src/main/java/com/doumee/core/annotation/excel/ExcelDataHandlerAdapter.java
server/services/src/main/java/com/doumee/core/annotation/excel/ExcelExporter.java
server/services/src/main/java/com/doumee/core/annotation/pr/PreventRepeat.java
server/services/src/main/java/com/doumee/core/annotation/pr/PreventRepeatAdapter.java
server/services/src/main/java/com/doumee/core/annotation/pr/PreventRepeatDefaultHandler.java
server/services/src/main/java/com/doumee/core/annotation/pr/PreventRepeatInterceptor.java
server/services/src/main/java/com/doumee/core/annotation/pr/PreventRepeatInterceptorConfig.java
server/services/src/main/java/com/doumee/core/annotation/trace/Trace.java
ÎļþÃû´Ó server/src/main/java/com/doumee/core/annotation/trace/Trace.java ÐÞ¸Ä
@@ -40,5 +40,5 @@
    /**
     * æ˜¯å¦è®°å½•请求结果
     */
    boolean withRequestResult () default true;
    boolean withRequestResult() default true;
}
server/services/src/main/java/com/doumee/core/annotation/trace/TraceInterceptor.java
server/services/src/main/java/com/doumee/core/annotation/trace/TraceInterceptorConfig.java
server/services/src/main/java/com/doumee/core/annotation/trace/TraceStatus.java
server/services/src/main/java/com/doumee/core/annotation/trace/TraceType.java
server/services/src/main/java/com/doumee/core/aware/DataPermissionAware.java
server/services/src/main/java/com/doumee/core/aware/DataPermissionMapping.java
ÎļþÃû´Ó server/src/main/java/com/doumee/core/aware/DataPermissionMapping.java ÐÞ¸Ä
@@ -32,5 +32,5 @@
    /**
     * æ³¨å…¥è‡ªå®šä¹‰æ•°æ®å‚æ•°
     */
    boolean injectCustomData () default false;
    boolean injectCustomData() default false;
}
server/services/src/main/java/com/doumee/core/aware/DefaultDataPermissionAware.java
server/services/src/main/java/com/doumee/core/cache/LocalCache.java
server/services/src/main/java/com/doumee/core/constants/Constants.java
ÎļþÃû´Ó server/src/main/java/com/doumee/core/constants/Constants.java ÐÞ¸Ä
@@ -22,7 +22,10 @@
  public static final String TRUE = "t";
  public static final String FALSE = "f";
  public static final String TOKEN ="TOKEN" ;
  public static String REDIS_DEBUG_STR="test_";
    public static final String SYSTEM ="SYSTEM" ;
    public static final String IMG_DIR = "IMG_DIR";
    public static final String FILE_DIR ="FILE_DIR" ;
    public static String REDIS_DEBUG_STR="test_";
  /**
   * æ•°æ®æƒé™èŒƒå›´ï¼š0只看自己;1只看自己所在校区;2看全部校区;3看指定校区(多选)
server/services/src/main/java/com/doumee/core/constants/DataPermissionConstants.java
server/services/src/main/java/com/doumee/core/constants/ExceptionLevel.java
server/services/src/main/java/com/doumee/core/constants/OperaType.java
server/services/src/main/java/com/doumee/core/constants/ResponseStatus.java
ÎļþÃû´Ó server/src/main/java/com/doumee/core/constants/ResponseStatus.java ÐÞ¸Ä
@@ -1,5 +1,6 @@
package com.doumee.core.constants;
import javafx.scene.input.KeyCodeCombination;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -27,6 +28,7 @@
    MASSIVE_REQUEST(5101, "请求过于频繁,请5秒后重试!"),
    NOT_ALLOWED(5110, "不允许的操作"),
    BE_OVERDUE(5112, "未登录"),
    TOKEN_EXCEED_TIME(5113, "登陆已过期"),
    ;
    private int code;
server/services/src/main/java/com/doumee/core/exception/BusinessException.java
server/services/src/main/java/com/doumee/core/exception/UnSafeSessionException.java
server/services/src/main/java/com/doumee/core/filter/DoumeeFilter.java
server/services/src/main/java/com/doumee/core/model/ApiResponse.java
ÎļþÃû´Ó server/src/main/java/com/doumee/core/model/ApiResponse.java ÐÞ¸Ä
@@ -2,6 +2,7 @@
import com.alibaba.fastjson.JSONObject;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.dao.business.web.response.AccountResponse;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
server/services/src/main/java/com/doumee/core/model/LoginUserInfo.java
ÎļþÃû´Ó server/src/main/java/com/doumee/core/model/LoginUserInfo.java ÐÞ¸Ä
@@ -48,14 +48,13 @@
    private List<String> permissions;
    public static LoginUserInfo from(SystemUser user,String imgPath, List<SystemRole> roles, List<SystemPermission> permissions) {
    public static LoginUserInfo from(SystemUser user, List<SystemRole> roles, List<SystemPermission> permissions) {
        if (user == null) {
            return null;
        }
        // æ‹·è´ç”¨æˆ·ä¿¡æ¯
        LoginUserInfo loginUserInfo = new LoginUserInfo();
        BeanUtils.copyProperties(user, loginUserInfo);
        loginUserInfo.setAvatar(Constants.formatImgPath(loginUserInfo.getAvatar(),imgPath));
        loginUserInfo.setLast_login(DateUtil.getPlusTime2(user.getLastLogin()));
        loginUserInfo.setReal_name(user.getRealname());
        loginUserInfo.setStatus(user.getStatus());
server/services/src/main/java/com/doumee/core/model/PageData.java
server/services/src/main/java/com/doumee/core/model/PageWrap.java
server/services/src/main/java/com/doumee/core/model/api/WebLoginUserInfo.java
server/services/src/main/java/com/doumee/core/servlet/ServletDuplicateInputStream.java
server/services/src/main/java/com/doumee/core/servlet/ServletDuplicateOutputStream.java
server/services/src/main/java/com/doumee/core/servlet/ServletDuplicateRequestWrapper.java
server/services/src/main/java/com/doumee/core/servlet/ServletDuplicateResponseWrapper.java
server/services/src/main/java/com/doumee/core/servlet/ServletRewriteFilter.java
server/services/src/main/java/com/doumee/core/utils/Base64Util.java
server/services/src/main/java/com/doumee/core/utils/CompressUtil.java
server/services/src/main/java/com/doumee/core/utils/Date.java
server/services/src/main/java/com/doumee/core/utils/DateUtil.java
ÎļþÃû´Ó server/src/main/java/com/doumee/core/utils/DateUtil.java ÐÞ¸Ä
@@ -40,12 +40,12 @@
    public DateUtil() {
    }
    public static java.util.Date StringToDate2(String DATE) {
    public static Date StringToDate2(String DATE) {
        if(StringUtils.isBlank(DATE)){
            return null;
        }
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        java.util.Date dt1 = null;
        Date dt1 = null;
        try {
            dt1 = df.parse(DATE);
        } catch (Exception exception) {
@@ -60,7 +60,7 @@
     * @return String
     * @throws Exception
     */
    public static String getDateLong(java.util.Date date) {
    public static String getDateLong(Date date) {
        String nowDate = "";
        try {
            if (date != null)
@@ -72,7 +72,7 @@
        }
    }
    public static String getDateLongSlash(java.util.Date date) {
    public static String getDateLongSlash(Date date) {
        String nowDate = "";
        try {
            if (date != null)
@@ -93,7 +93,7 @@
     *            æ ¼å¼ä¸ºyyyy-MM-dd
     * @return int
     */
    public static long getBetweenHours(java.util.Date fromDate, java.util.Date toDate) {
    public static long getBetweenHours(Date fromDate, Date toDate) {
        long m_intervalday = 0;// åˆå§‹åŒ–时间间隔的值为0
        // ä½¿ç”¨çš„æ—¶é—´æ ¼å¼ä¸ºyyyy-MM-dd
        try {
@@ -112,7 +112,7 @@
     * @return String
     * @throws Exception
     */
    public static String getDateShortPoint(java.util.Date date) {
    public static String getDateShortPoint(Date date) {
        String nowDate = "";
        try {
            if (date != null)
@@ -124,7 +124,7 @@
        }
    }
    public static int getDateNum(java.util.Date date) {
    public static int getDateNum(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        try {
@@ -141,7 +141,7 @@
     * @return String
     * @throws Exception
     */
    public static String getDateLongCn(java.util.Date date) {
    public static String getDateLongCn(Date date) {
        String nowDate = "";
        try {
            if (date != null)
@@ -158,7 +158,7 @@
     * @return String
     * @throws Exception
     */
    public static String getDateMD(java.util.Date date) {
    public static String getDateMD(Date date) {
        String nowDate = "";
        try {
            if (date != null)
@@ -176,7 +176,7 @@
     * @return String
     * @throws Exception
     */
    public static String getDateShortLongTimeCn(java.util.Date date) {
    public static String getDateShortLongTimeCn(Date date) {
        String nowDate = "";
        try {
            if (date != null)
@@ -194,7 +194,7 @@
     * @return String
     * @throws Exception
     */
    public static String getDateUS(java.util.Date date) {
    public static String getDateUS(Date date) {
        String nowDate = "";
        try {
            if (date != null)
@@ -212,7 +212,7 @@
     * @return String
     * @throws Exception
     */
    public static String getDateUSShort(java.util.Date date) {
    public static String getDateUSShort(Date date) {
        String nowDate = "";
        try {
            if (date != null)
@@ -231,12 +231,12 @@
     * @param format
     * @return String
     */
    public static String getFomartDate(java.util.Date date, String format) {
    public static String getFomartDate(Date date, String format) {
        try {
            return new SimpleDateFormat(format, Locale.UK).format(date);
        } catch (Exception e) {
            e.printStackTrace();
            return (date == null) ? new java.util.Date().toString() : date.toString();
            return (date == null) ? new Date().toString() : date.toString();
        }
    }
@@ -250,7 +250,7 @@
        String nowTime = "";
        try {
            java.sql.Date date = null;
            date = new java.sql.Date(new java.util.Date().getTime());
            date = new java.sql.Date(new Date().getTime());
            nowTime = sdfLongTime.format(date);
            return nowTime;
        } catch (Exception e) {
@@ -264,7 +264,7 @@
     * @return String
     * @throws Exception
     */
    public static String getHourMinute(java.util.Date date) throws Exception {
    public static String getHourMinute(Date date) throws Exception {
        String nowTime = "";
        try {
            if (date != null) {
@@ -286,7 +286,7 @@
        String nowDate = "";
        try {
            java.sql.Date date = null;
            date = new java.sql.Date(new java.util.Date().getTime());
            date = new java.sql.Date(new Date().getTime());
            nowDate = sdfShort.format(date);
            return nowDate;
        } catch (Exception e) {
@@ -304,7 +304,7 @@
        String nowDate = "";
        try {
            java.sql.Date date = null;
            date = new java.sql.Date(new java.util.Date().getTime());
            date = new java.sql.Date(new Date().getTime());
            nowDate = sdfLong.format(date);
            return nowDate;
        } catch (Exception e) {
@@ -322,7 +322,7 @@
        String nowDate = "";
        try {
            java.sql.Date date = null;
            date = new java.sql.Date(new java.util.Date().getTime());
            date = new java.sql.Date(new Date().getTime());
            nowDate = sdfLongTimePlus.format(date);
            return nowDate;
        } catch (Exception e) {
@@ -336,7 +336,7 @@
     * @return String
     * @throws Exception
     */
    public static String getPlusTime(java.util.Date date) throws Exception {
    public static String getPlusTime(Date date) throws Exception {
        if (date == null)
            return null;
        try {
@@ -353,7 +353,7 @@
     * @return String
     * @throws Exception
     */
    public static String getPlusTime2(java.util.Date date) {
    public static String getPlusTime2(Date date) {
        if (date == null)
            return "";
@@ -376,7 +376,7 @@
        String nowDate = "";
        try {
            java.sql.Date date = null;
            date = new java.sql.Date(new java.util.Date().getTime());
            date = new java.sql.Date(new Date().getTime());
            nowDate = sdfLongTimePlusMill.format(date);
            return nowDate;
        } catch (Exception e) {
@@ -488,7 +488,7 @@
     * @return String
     * @throws Exception
     */
    public static String getPlusTimeSecond(java.util.Date date) throws Exception {
    public static String getPlusTimeSecond(Date date) throws Exception {
        if (date == null)
            return null;
        try {
@@ -538,7 +538,7 @@
     *            æ—¥æœŸ
     * @return yyyy格式的年份
     */
    public static int convertDateToYear(java.util.Date date) {
    public static int convertDateToYear(Date date) {
        SimpleDateFormat df = new SimpleDateFormat("yyyy", new DateFormatSymbols());
        return Integer.parseInt(df.format(date));
    }
@@ -550,7 +550,7 @@
     *            æ—¥æœŸ
     * @return yyyyMM格式的年月字符串
     */
    public static String convertDateToYearMonth(java.util.Date d) {
    public static String convertDateToYearMonth(Date d) {
        SimpleDateFormat df = new SimpleDateFormat("yyyyMM", new DateFormatSymbols());
        return df.format(d);
    }
@@ -562,7 +562,7 @@
     *            æ—¥æœŸ
     * @return yyyyMMdd格式的年月日字符串
     */
    public static String convertDateToYearMonthDay(java.util.Date d) {
    public static String convertDateToYearMonthDay(Date d) {
        SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd", new DateFormatSymbols());
        return df.format(d);
    }
@@ -574,7 +574,7 @@
     *            æ—¥æœŸ
     * @return yyyy格式的年份
     */
    public static String convertDateToMonth(java.util.Date d) {
    public static String convertDateToMonth(Date d) {
        SimpleDateFormat df = new SimpleDateFormat("MM", new DateFormatSymbols());
        return df.format(d);
    }
@@ -585,7 +585,7 @@
     *            æ—¥æœŸ
     * @return yyyy格式的年份
     */
    public static String convertDateToDay(java.util.Date d) {
    public static String convertDateToDay(Date d) {
        SimpleDateFormat df = new SimpleDateFormat("dd", new DateFormatSymbols());
        return df.format(d);
    }
@@ -596,7 +596,7 @@
     *            æ—¥æœŸ
     * @return HH格式的小时
     */
    public static String convertDateToHour(java.util.Date d) {
    public static String convertDateToHour(Date d) {
        SimpleDateFormat df = new SimpleDateFormat("HH", new DateFormatSymbols());
        return df.format(d);
    }
@@ -608,7 +608,7 @@
     *            æ—¥æœŸ
     * @return mm格式的分钟
     */
    public static String convertDateToMinute(java.util.Date d) {
    public static String convertDateToMinute(Date d) {
        SimpleDateFormat df = new SimpleDateFormat("mm", new DateFormatSymbols());
        return df.format(d);
    }
@@ -618,11 +618,11 @@
     *
     * @return å½“前日期,java.util.Date类型
     */
    public static java.util.Date getCurrentDate() {
    public static Date getCurrentDate() {
        Calendar cal = Calendar.getInstance();
        // String currentDate = null;
        java.util.Date d = cal.getTime();
        Date d = cal.getTime();
        return d;
    }
@@ -632,11 +632,11 @@
     *
     * @return å½“前日期,java.util.Date类型
     */
    public static java.util.Date getCurrentDateDelay() {
    public static Date getCurrentDateDelay() {
        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.SECOND, 1);
        // String currentDate = null;
        java.util.Date d = cal.getTime();
        Date d = cal.getTime();
        return d;
    }
@@ -862,7 +862,7 @@
     * @return è½¬æ¢å¾—到的日期
     */
    @SuppressWarnings("unchecked")
    public static java.util.Date stringToDate(String strDate, String oracleFormat) {
    public static Date stringToDate(String strDate, String oracleFormat) {
        if (strDate == null)
            return null;
        Hashtable<Integer, String> h = new Hashtable<Integer, String>();
@@ -941,7 +941,7 @@
        }
        SimpleDateFormat df = new SimpleDateFormat(javaFormat);
        java.util.Date myDate = new java.util.Date();
        Date myDate = new Date();
        try {
            myDate = df.parse(strDate);
        } catch (Exception e) {
@@ -952,9 +952,9 @@
        return myDate;
    }
    public static java.util.Date StringToDate(String DATE1) {
    public static Date StringToDate(String DATE1) {
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        java.util.Date dt1 = null;
        Date dt1 = null;
        try {
            dt1 = df.parse(DATE1);
        } catch (Exception exception) {
@@ -972,7 +972,7 @@
     *            - æŒ‡å®šæ—¥æœŸæ ¼å¼ï¼Œæ ¼å¼çš„写法为Oracle格式
     * @return æŒ‰æŒ‡å®šçš„æ—¥æœŸæ ¼å¼è½¬æ¢åŽçš„æ—¥æœŸå­—符串
     */
    public static String dateToString(java.util.Date d, String format) {
    public static String dateToString(Date d, String format) {
        if (d == null)
            return "";
        Hashtable<Integer, String> h = new Hashtable<Integer, String>();
@@ -1063,7 +1063,7 @@
     *            - æŒ‡å®šæ—¥æœŸæ ¼å¼ï¼Œæ ¼å¼çš„写法为Oracle格式
     * @return æŒ‰æŒ‡å®šçš„æ—¥æœŸæ ¼å¼è½¬æ¢åŽçš„æ—¥æœŸå­—符串
     */
    public static String getDate(java.util.Date d, String format) {
    public static String getDate(Date d, String format) {
        if (d == null)
            return "";
        Hashtable<Integer, String> h = new Hashtable<Integer, String>();
@@ -1227,7 +1227,7 @@
     *            å°çš„æ—¥æœŸ
     * @return newDate-oldDate相差的天数
     */
    public static int daysBetweenDates(java.util.Date newDate, java.util.Date oldDate) {
    public static int daysBetweenDates(Date newDate, Date oldDate) {
        long days = 0;
        try {
            long nDay = 0;
@@ -1250,7 +1250,7 @@
        return (int) days;
    }
    public static int daysBetweenDates11(java.util.Date newDate, java.util.Date oldDate) {
    public static int daysBetweenDates11(Date newDate, Date oldDate) {
        int days = 0;
        Calendar calo = Calendar.getInstance();
        Calendar caln = Calendar.getInstance();
@@ -1281,7 +1281,7 @@
     *            ç›¸å·®çš„天数
     * @return date加上intBetween天后的日期
     */
    public static java.util.Date getDateBetween(java.util.Date date, int intBetween) {
    public static Date getDateBetween(Date date, int intBetween) {
        Calendar calo = Calendar.getInstance();
        calo.setTime(date);
        calo.add(Calendar.DATE, intBetween);
@@ -1299,8 +1299,8 @@
     *            è¿”回日期的格式
     * @return date加上intBetween天后的日期
     */
    public static String getDateBetween_String(java.util.Date date, int intBetween, String strFromat) {
        java.util.Date dateOld = getDateBetween(date, intBetween);
    public static String getDateBetween_String(Date date, int intBetween, String strFromat) {
        Date dateOld = getDateBetween(date, intBetween);
        return getDate(dateOld, strFromat);
    }
@@ -1461,7 +1461,7 @@
     *            æ—¥æœŸ
     * @return æ ¼å¼åŒ–后的字符串
     */
    public static String getOracleFormatDateStr(java.util.Date date) {
    public static String getOracleFormatDateStr(Date date) {
        return getDate(date, "YYYY-MM-DD HH24:MI:SS");
    }
@@ -1590,7 +1590,7 @@
     *            å¹´æœˆç±»åž‹çš„字符串
     * @return String
     */
    public static String getYear(java.util.Date date) {
    public static String getYear(Date date) {
        if (null == date)
        {
            return "";
@@ -1664,7 +1664,7 @@
     *            å¢žåŠ çš„æœˆä»½
     * @return date åŠ ä¸ŠintBetween月数后的日期
     */
    public static java.util.Date increaseMonth(java.util.Date date, int intBetween) {
    public static Date increaseMonth(Date date, int intBetween) {
        Calendar calo = Calendar.getInstance();
        calo.setTime(date);
        calo.add(Calendar.MONTH, intBetween);
@@ -1680,7 +1680,7 @@
     *            å¢žåŠ çš„å¤©æ•°
     * @return date åŠ ä¸ŠintBetween天数后的日期
     */
    public static java.util.Date increaseDay(java.util.Date date, int intBetween) {
    public static Date increaseDay(Date date, int intBetween) {
        if (date == null) {
            return null;
        }
@@ -1699,7 +1699,7 @@
     *            å¢žåŠ çš„å¹´æ•°
     * @return date加上intBetween年数后的日期
     */
    public static java.util.Date increaseYear(java.util.Date date, int intBetween) {
    public static Date increaseYear(Date date, int intBetween) {
        Calendar calo = Calendar.getInstance();
        calo.setTime(date);
        calo.add(Calendar.YEAR, intBetween);
@@ -1718,7 +1718,7 @@
     */
    public static int compareDate(String str1, String str2) {
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        java.util.Date date1 = null, date2 = null;
        Date date1 = null, date2 = null;
        try {
            date1 = formatter.parse(str1);
            date2 = formatter.parse(str2);
@@ -1738,7 +1738,7 @@
     * @return int negative integer, zero, or a positive integer as str1 is less
     *         than, equal to, or greater than str2
     */
    public static int compareDate(java.util.Date date1, java.util.Date date2) {
    public static int compareDate(Date date1, Date date2) {
        if (date1 == null && date2 == null) {
            return 0;
        }
@@ -1752,7 +1752,7 @@
        return date2.compareTo(date1);
    }
    public static int compare_date(java.util.Date dt1, java.util.Date dt2, java.util.Date dtime) {
    public static int compare_date(Date dt1, Date dt2, Date dtime) {
        try {
            if (dtime.compareTo(dt1) >= 0 && dt2.compareTo(dtime) >= 0) {
                return 1;
@@ -1765,14 +1765,14 @@
        return 0;
    }
    public static int compareDate(String str1, java.util.Date date2) {
        java.util.Date date1 = getDateByString(str1);
    public static int compareDate(String str1, Date date2) {
        Date date1 = getDateByString(str1);
        return date1.compareTo(date2);
    }
    public static int compareDate(String format, String str1, java.util.Date date2) {
    public static int compareDate(String format, String str1, Date date2) {
        java.util.Date date1 = null;
        Date date1 = null;
        try {
            date1 = fromStringToDate(format, str1);
        } catch (ParseException e) {
@@ -1830,7 +1830,7 @@
     * @return String æ ¼å¼åŒ–的日期字符串
     */
    public static String getToday() {
        java.util.Date cDate = new java.util.Date();
        Date cDate = new Date();
        SimpleDateFormat cSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        return cSimpleDateFormat.format(cDate);
    }
@@ -1841,7 +1841,7 @@
     * @return String æ ¼å¼åŒ–的日期字符串
     */
    public static String getYesterday() {
        java.util.Date cDate = new java.util.Date();
        Date cDate = new Date();
        cDate.setTime(cDate.getTime() - 24 * 3600 * 1000);
        SimpleDateFormat cSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        return cSimpleDateFormat.format(cDate);
@@ -1853,7 +1853,7 @@
     * @return String æ ¼å¼åŒ–的日期字符串
     */
    public static String getTomorrow() {
        java.util.Date cDate = new java.util.Date();
        Date cDate = new Date();
        cDate.setTime(cDate.getTime() + 24 * 3600 * 1000);
        SimpleDateFormat cSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        return cSimpleDateFormat.format(cDate);
@@ -2114,7 +2114,7 @@
        return szTime;
    }
    public static String getFormattedDateUtil(java.util.Date dtDate, String strFormatTo) {
    public static String getFormattedDateUtil(Date dtDate, String strFormatTo) {
        if (dtDate == null) {
            return "";
        }
@@ -2142,8 +2142,8 @@
        // ä½¿ç”¨çš„æ—¶é—´æ ¼å¼ä¸ºyyyy-MM-dd
        SimpleDateFormat m_simpledateformat = new SimpleDateFormat("yyyy-MM-dd");
        try {
            java.util.Date fromDate = m_simpledateformat.parse(strFromDate);
            java.util.Date toDate = m_simpledateformat.parse(strToDate);
            Date fromDate = m_simpledateformat.parse(strFromDate);
            Date toDate = m_simpledateformat.parse(strToDate);
            m_intervalday = toDate.getTime() - fromDate.getTime();// è®¡ç®—所得为微秒数
            m_intervalday = m_intervalday / 1000 / 60 / 60 / 24;// è®¡ç®—所得的天数
@@ -2222,13 +2222,13 @@
     * before midnight. If a null day is passed in, a new Date is created.
     * midnight (00m 00h 00s)
     */
    public static java.util.Date getEndOfDay(java.util.Date day) {
    public static Date getEndOfDay(Date day) {
        return getEndOfDay(day, Calendar.getInstance());
    }
    public static java.util.Date getEndOfDay(java.util.Date day, Calendar cal) {
    public static Date getEndOfDay(Date day, Calendar cal) {
        if (day == null)
            day = new java.util.Date();
            day = new Date();
        cal.setTime(day);
        cal.set(Calendar.HOUR_OF_DAY, cal.getMaximum(Calendar.HOUR_OF_DAY));
        cal.set(Calendar.MINUTE, cal.getMaximum(Calendar.MINUTE));
@@ -2243,7 +2243,7 @@
     * after midnight. If a null day is passed in, a new Date is created.
     * midnight (00m 00h 00s)
     */
    public static java.util.Date getStartOfDay(java.util.Date day) {
    public static Date getStartOfDay(Date day) {
        return getStartOfDay(day, Calendar.getInstance());
    }
@@ -2252,9 +2252,9 @@
     * after midnight. If a null day is passed in, a new Date is created.
     * midnight (00m 00h 00s)
     */
    public static java.util.Date getStartOfDay(java.util.Date day, Calendar cal) {
    public static Date getStartOfDay(Date day, Calendar cal) {
        if (day == null)
            day = new java.util.Date();
            day = new Date();
        cal.setTime(day);
        cal.set(Calendar.HOUR_OF_DAY, cal.getMinimum(Calendar.HOUR_OF_DAY));
        cal.set(Calendar.MINUTE, cal.getMinimum(Calendar.MINUTE));
@@ -2268,10 +2268,10 @@
     * the day. If a null day is passed in, a new Date is created. nnoon (00m
     * 12h 00s)
     */
    public static java.util.Date getNoonOfDay(java.util.Date day, Calendar cal) {
    public static Date getNoonOfDay(Date day, Calendar cal) {
        if (day == null)
        {
            day = new java.util.Date();
            day = new Date();
        }
        cal.setTime(day);
        cal.set(Calendar.HOUR_OF_DAY, 12);
@@ -2288,9 +2288,9 @@
     *            String æ—¥æœŸå­—符串
     * @return java.util.Date æ—¥æœŸå¯¹è±¡
     */
    public static java.util.Date getDateFromString(String strDate) {
    public static Date getDateFromString(String strDate) {
        if (StringUtils.isEmpty(strDate)) {
            return new java.util.Date(System.currentTimeMillis());
            return new Date(System.currentTimeMillis());
        }
        try {
            return sdfLongTimePlus.parse(strDate);
@@ -2300,7 +2300,7 @@
    }
    // -----------------------------------------------------------------------
    public static java.util.Date parseFromFormats(String aValue) {
    public static Date parseFromFormats(String aValue) {
        if (StringUtils.isEmpty(aValue))
            return null;
@@ -2310,7 +2310,7 @@
            return null;
        // iterate over the array and parse
        java.util.Date myDate = null;
        Date myDate = null;
        for (int i = 0; i < formats.length; i++) {
            try {
                myDate = DateUtil.parse(aValue, formats[i]);
@@ -2333,7 +2333,7 @@
        }
        // call the regular Date formatter
        java.util.Date myDate = DateUtil.parseFromFormats(aValue);
        Date myDate = DateUtil.parseFromFormats(aValue);
        if (myDate != null)
        {
            return new Timestamp(myDate.getTime());
@@ -2355,7 +2355,7 @@
     * the passed-in format. Returns an empty string if the date or the format
     * is null.
     **/
    public static String format(java.util.Date aDate, SimpleDateFormat aFormat) {
    public static String format(Date aDate, SimpleDateFormat aFormat) {
        if (aDate == null || aFormat == null) {
            return "";
        }
@@ -2389,7 +2389,7 @@
     * string is null or empty or if the format is null. The string must match
     * the format.
     **/
    public static java.util.Date parse(String aValue, SimpleDateFormat aFormat) throws ParseException {
    public static Date parse(String aValue, SimpleDateFormat aFormat) throws ParseException {
        if (StringUtils.isEmpty(aValue) || aFormat == null) {
            return null;
        }
@@ -2402,7 +2402,7 @@
     * Returns true if endDate is after startDate or if startDate equals endDate
     * or if they are the same date. Returns false if either value is null.
     **/
    public static boolean isValidDateRange(java.util.Date startDate, java.util.Date endDate) {
    public static boolean isValidDateRange(Date startDate, Date endDate) {
        return isValidDateRange(startDate, endDate, true);
    }
@@ -2412,7 +2412,7 @@
     * endDate. Returns false if either value is null. If equalOK, returns true
     * if the dates are equal.
     **/
    public static boolean isValidDateRange(java.util.Date startDate, java.util.Date endDate, boolean equalOK) {
    public static boolean isValidDateRange(Date startDate, Date endDate, boolean equalOK) {
        // false if either value is null
        if (startDate == null || endDate == null) {
            return false;
@@ -2453,13 +2453,13 @@
    // -----------------------------------------------------------------------
    // convenience method
    public static String defaultTimestamp(java.util.Date date) {
    public static String defaultTimestamp(Date date) {
        return DateUtil.format(date, DateUtil.defaultTimestampFormat());
    }
    // -----------------------------------------------------------------------
    // convenience method
    public static String defaultDate(java.util.Date date) {
    public static String defaultDate(Date date) {
        return DateUtil.format(date, DateUtil.defaultDateFormat());
    }
@@ -2471,19 +2471,19 @@
    // -----------------------------------------------------------------------
    // convenience method returns long friendly formatted timestamp
    public static String friendlyTimestamp(java.util.Date date) {
    public static String friendlyTimestamp(Date date) {
        return DateUtil.format(date, DateUtil.friendlyTimestampFormat());
    }
    // -----------------------------------------------------------------------
    // convenience method returns long friendly formatted timestamp
    public static String format8chars(java.util.Date date) {
    public static String format8chars(Date date) {
        return DateUtil.format(date, mFormat8chars);
    }
    // -----------------------------------------------------------------------
    // convenience method returns long friendly formatted timestamp
    public static String formatIso8601Day(java.util.Date date) {
    public static String formatIso8601Day(Date date) {
        return DateUtil.format(date, mFormatIso8601Day);
    }
@@ -2493,18 +2493,18 @@
        return DateUtil.format(calendar.getTime(), mFormatIso8601Day);
    }
    public static String formatTradeEasy(java.util.Date date) {
    public static String formatTradeEasy(Date date) {
        return DateUtil.format(date, mFormatTradeEasy);
    }
    // add by huyanzhi
    public static String formatTradeEasyProduct(java.util.Date date) {
    public static String formatTradeEasyProduct(Date date) {
        return DateUtil.format(date, mFormatTradeEasyProduct);
    }
    //
    public static String formatFormatTradeEasyMMddyyyy(java.util.Date date) {
    public static String formatFormatTradeEasyMMddyyyy(Date date) {
        return DateUtil.format(date, mFormatTradeEasyMMddyyyy);
    }
@@ -2515,17 +2515,17 @@
    }
    // -----------------------------------------------------------------------
    public static String formatRfc822(java.util.Date date) {
    public static String formatRfc822(Date date) {
        return DateUtil.format(date, mFormatRfc822);
    }
    public static String formatExpire(java.util.Date date) {
    public static String formatExpire(Date date) {
        return DateUtil.format(date, mFormatExpire);
    }
    // -----------------------------------------------------------------------
    // This is a hack, but it seems to work
    public static String formatIso8601(java.util.Date date) {
    public static String formatIso8601(Date date) {
        if (date == null)
            return "";
@@ -2548,7 +2548,7 @@
    // -----------------------------------------------------------------------
    // convenience method using minimal date format
    public static String minimalDate(java.util.Date date) {
    public static String minimalDate(Date date) {
        return DateUtil.format(date, DateUtil.minimalDateFormat());
    }
@@ -2560,7 +2560,7 @@
    }
    // -----------------------------------------------------------------------
    public static String fullDate(java.util.Date date) {
    public static String fullDate(Date date) {
        return DateUtil.format(date, DateUtil.fullDateFormat());
    }
@@ -2583,18 +2583,18 @@
    /**
     * Format the date using the "friendly" date format.
     */
    public static String friendlyDate(java.util.Date date, boolean minimalFormat) {
    public static String friendlyDate(Date date, boolean minimalFormat) {
        return DateUtil.format(date, DateUtil.friendlyDateFormat(minimalFormat));
    }
    // -----------------------------------------------------------------------
    // convenience method
    public static String friendlyDate(java.util.Date date) {
    public static String friendlyDate(Date date) {
        return DateUtil.format(date, DateUtil.friendlyDateFormat(true));
    }
    public static java.util.Date parseFormatIso8601Date(String date) throws Exception {
        java.util.Date returnDate = null;
    public static Date parseFormatIso8601Date(String date) throws Exception {
        Date returnDate = null;
        try {
            returnDate = mFormatIso8601Day.parse(date);
        } catch (Exception e) {
@@ -2609,7 +2609,7 @@
        String Sdate = "";
        try {
            GregorianCalendar grc = new GregorianCalendar();
            grc.setTime(new java.util.Date(date));
            grc.setTime(new Date(date));
            if (type.equals("D")) {
                grc.add(GregorianCalendar.DATE, into);
            } else if (type.equals("M")) {
@@ -2632,7 +2632,7 @@
            date = date.replaceAll("-", "/");
            date = date.substring(0, date.length() - 2);
            GregorianCalendar grc = new GregorianCalendar();
            grc.setTime(new java.util.Date(date));
            grc.setTime(new Date(date));
            grc.add(GregorianCalendar.DATE, Integer.parseInt(into));
            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
            Sdate = new String(formatter.format(grc.getTime()));
@@ -2642,7 +2642,7 @@
        return Sdate;
    }
    public static String formatDate(java.util.Date date, String pattern) {
    public static String formatDate(Date date, String pattern) {
        if (date == null) {
            return null;
        }
@@ -2662,7 +2662,7 @@
            date = date.replaceAll("-", "/");
            date = date.substring(0, date.length() - 2);
            GregorianCalendar grc = new GregorianCalendar();
            grc.setTime(new java.util.Date(date));
            grc.setTime(new Date(date));
            grc.add(GregorianCalendar.DATE, Integer.parseInt(into));
            Sdate = new String(mFormatExpire.format(grc.getTime()));
        } catch (Exception e) {
@@ -2674,10 +2674,10 @@
    public static String addDayToStringDate(String formate, String strDate, String days) {
        String stringDate = null;
        try {
            java.util.Date date = fromStringToDate(formate, strDate);
            Date date = fromStringToDate(formate, strDate);
            long now = date.getTime() + (long) Integer.parseInt(days) * DAY_IN_MILLISECOND;
            stringDate = getFomartDate(new java.util.Date(now), formate);
            stringDate = getFomartDate(new Date(now), formate);
        } catch (ParseException e) {
@@ -2687,13 +2687,13 @@
        return stringDate;
    }
    public static java.util.Date addDayToStringDate2(String formate, String strDate, String days) {
        java.util.Date date = null;
    public static Date addDayToStringDate2(String formate, String strDate, String days) {
        Date date = null;
        try {
            date = fromStringToDate(formate, strDate);
            long now = date.getTime() + (long) Integer.parseInt(days) * DAY_IN_MILLISECOND;
            date = new java.util.Date(now);
            date = new Date(now);
        } catch (ParseException e) {
@@ -2703,17 +2703,17 @@
        return date;
    }
    public static java.util.Date dateDayAdd(java.util.Date date, int days) {
    public static Date dateDayAdd(Date date, int days) {
        long now = date.getTime() + (long) days * DAY_IN_MILLISECOND;
        return new java.util.Date(now);
        return new Date(now);
    }
    /**
     *
     * å­—符串形式转化为Date类型 String类型按照format格式转为Date类型
     **/
    public static java.util.Date fromStringToDate(String format, String dateTime) throws ParseException {
        java.util.Date date = null;
    public static Date fromStringToDate(String format, String dateTime) throws ParseException {
        Date date = null;
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        date = sdf.parse(dateTime);
        return date;
@@ -2723,7 +2723,7 @@
     *
     * å­—符串形式转化为Date类型 String类型按照format格式转为Date类型
     **/
    public static java.util.Date fromStringToDate(java.util.Date date) throws ParseException {
    public static Date fromStringToDate(Date date) throws ParseException {
        return sdfLongTimePlus.parse(sdfLongTimePlus.format(date));
    }
@@ -2745,7 +2745,7 @@
     * @param date
     * @return
     */
    public static Integer getTimeFormatIntger(java.util.Date date) {
    public static Integer getTimeFormatIntger(Date date) {
        if (date == null) {
            return 0;
        }
@@ -2754,7 +2754,7 @@
        return Integer.valueOf(nowTime);
    }
    public static String getNowDayStr(java.util.Date date) {
    public static String getNowDayStr(Date date) {
        if (date == null) {
            return "";
        }
@@ -2776,7 +2776,7 @@
     */
    public static String toDayToStr(String format) {
        try {
            java.util.Date now = new java.util.Date();
            Date now = new Date();
            return DateToStr(now, format) + " " + getWeekOfDate(now);
        } catch (Exception e) {
            System.out.println("Date è½¬ String ç±»åž‹å¤±è´¥: " + e);
@@ -2792,7 +2792,7 @@
     * @author zhangyong
     * @return String
     */
    public static String DateToStr(java.util.Date date, String format) {
    public static String DateToStr(Date date, String format) {
        try {
            SimpleDateFormat sdf = new SimpleDateFormat(format);
            return sdf.format(date);
@@ -2809,9 +2809,9 @@
     * @param date
     *            date, int days
     */
    public static java.util.Date dateAddDays(java.util.Date date, int days) {
    public static Date dateAddDays(Date date, int days) {
        long now = date.getTime() + (long) days * DAY_IN_MILLISECOND;
        return new java.util.Date(now);
        return new Date(now);
    }
    /**
@@ -2820,7 +2820,7 @@
     * @param date
     *            date,String fFormatStr eg:yyyy-MM-dd HH:mm:ss
     */
    public static String dateTypeToString(java.util.Date date, String fFormatStr) {
    public static String dateTypeToString(Date date, String fFormatStr) {
        // yyyy-MM-dd HH:mm:ss
        SimpleDateFormat dateformat = new SimpleDateFormat(fFormatStr);
        String strDate = dateformat.format(date);
@@ -2834,7 +2834,7 @@
     * @获取当前的系统时间,并按照固定的格式初始话
     */
    public static String getStringOfNowDate(String fFormatStr) {
        String nowDateString = dateTypeToString(new java.util.Date(), fFormatStr);
        String nowDateString = dateTypeToString(new Date(), fFormatStr);
        return nowDateString;
    }
@@ -2842,7 +2842,7 @@
     * @ author zhangyong @ èŽ·å–å½“æœˆçš„ç¬¬ä¸€å¤©ï¼Œ2009-05-01
     */
    public static String getStringOfFirstDayInMonth() {
        java.util.Date date = new java.util.Date();
        Date date = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
        String temp = sdf.format(date);
        String firstDayInMoth = "";
@@ -2858,7 +2858,7 @@
     * @param dt
     * @return å½“前日期是星期几
     */
    public static String getWeekOfDate(java.util.Date dt) {
    public static String getWeekOfDate(Date dt) {
        String[] weekDays = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
        Calendar cal = Calendar.getInstance();
        cal.setTime(dt);
@@ -2878,7 +2878,7 @@
     * @param dt
     * @return
     */
    public static int getWeekNumOfDate(java.util.Date dt) {
    public static int getWeekNumOfDate(Date dt) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(dt);
@@ -2889,7 +2889,7 @@
        return w;
    }
    public static Long twoDaysBetween(java.util.Date beginDate, java.util.Date endDate) throws ParseException {
    public static Long twoDaysBetween(Date beginDate, Date endDate) throws ParseException {
        long minute = (endDate.getTime() - beginDate.getTime()) / (60 * 1000);
        return minute;
    }
@@ -2899,9 +2899,9 @@
     *
     * @return
     */
    public static java.util.Date initDateByTwoMonthAgo() {
    public static Date initDateByTwoMonthAgo() {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new java.util.Date());
        calendar.setTime(new Date());
        calendar.set(Calendar.DAY_OF_MONTH, 1);
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
@@ -2915,7 +2915,7 @@
     *
     * @return
     */
    public static java.util.Date addDaysToDate(Date date, int days) {
    public static Date addDaysToDate(Date date, int days) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.add(Calendar.DATE, days);//
server/services/src/main/java/com/doumee/core/utils/EncryptUtil.java
server/services/src/main/java/com/doumee/core/utils/FileDigest.java
server/services/src/main/java/com/doumee/core/utils/FtpUtil.java
server/services/src/main/java/com/doumee/core/utils/Html2Text.java
server/services/src/main/java/com/doumee/core/utils/Http.java
server/services/src/main/java/com/doumee/core/utils/HttpUtil.java
server/services/src/main/java/com/doumee/core/utils/ID.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,89 @@
package com.doumee.core.utils;
import org.apache.logging.log4j.util.Strings;
import java.util.UUID;
/**
 * A utility to generate id using various strategies.
 *
 * @author Guang YANG
 * @version 1.0
 */
public class ID {
  private static final SnowflakeIdGenerator snowflake = new SnowflakeIdGenerator(0);
  /**
   * Generate a random guid string of 32 byte.
   */
  public static String nextGUID() {
    return UUID.randomUUID().toString().replace("-", Strings.EMPTY).toUpperCase();
  }
  /**
   * Generate a random uuid string of 36 byte.
   */
  public static String nextUUID() {
    return UUID.randomUUID().toString();
  }
  /**
   * Generate a long number of 20 bit which is monotonically increasing by each call.
   */
  public static long nextSnowflakeId() {
    return snowflake.nextId();
  }
  public static class SnowflakeIdGenerator {
    private final long workerIdBits = 10L;
    private final long maxWorkerId = -1L ^ (-1L << workerIdBits);
    private final long sequenceBits = 12L;
    private final long workerIdShift = sequenceBits;
    private final long timestampLeftShift = sequenceBits + workerIdBits;
    private final long sequenceMask = -1L ^ (-1L << sequenceBits);
    private long workerId;
    private long sequence = 0L;
    private long lastTimestamp = -1L;
    public SnowflakeIdGenerator(long workerId) {
      if (workerId > maxWorkerId || workerId < 0) {
        throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", maxWorkerId));
      }
      this.workerId = workerId;
    }
    public synchronized long nextId() {
      long timestamp = System.currentTimeMillis();
      if (timestamp < lastTimestamp) {
        throw new RuntimeException(String.format("Clock moved backwards.  Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
      }
      if (lastTimestamp == timestamp) {
        sequence = (sequence + 1) & sequenceMask;
        if (sequence == 0) {
          timestamp = tilNextMillis(lastTimestamp);
        }
      } else {
        sequence = 0L;
      }
      lastTimestamp = timestamp;
      return (timestamp << timestampLeftShift) | (workerId << workerIdShift) | sequence;
    }
    protected long tilNextMillis(long lastTimestamp) {
      long timestamp = System.currentTimeMillis();
      while (timestamp <= lastTimestamp) {
        timestamp = System.currentTimeMillis();
      }
      return timestamp;
    }
  }
}
server/services/src/main/java/com/doumee/core/utils/Location.java
server/services/src/main/java/com/doumee/core/utils/Monitor.java
server/services/src/main/java/com/doumee/core/utils/MyBatisPlus.java
server/services/src/main/java/com/doumee/core/utils/Secure.java
server/services/src/main/java/com/doumee/core/utils/Server.java
server/services/src/main/java/com/doumee/core/utils/Sha1Util.java
server/services/src/main/java/com/doumee/core/utils/UserClient.java
server/services/src/main/java/com/doumee/core/utils/Utils.java
server/services/src/main/java/com/doumee/core/utils/aliyun/ALiYunUtil.java
server/services/src/main/java/com/doumee/core/utils/monitor/CPU.java
server/services/src/main/java/com/doumee/core/utils/monitor/Disk.java
server/services/src/main/java/com/doumee/core/utils/monitor/JVM.java
server/services/src/main/java/com/doumee/core/utils/monitor/Memory.java
server/services/src/main/java/com/doumee/core/utils/redis/RedisConverter.java
server/services/src/main/java/com/doumee/core/utils/redis/RedisUtil.java
server/services/src/main/java/com/doumee/core/utils/redis/model/SubmissionTotalTime.java
server/services/src/main/java/com/doumee/core/wx/AccessToken.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
package com.doumee.core.wx;
import lombok.Data;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2022/12/7 17:26
 */
@Data
public class AccessToken {
    private String accessToken;
    //过期时间 å½“前系统时间+微信传来的过期时间
    private Long expiresTime;
    public AccessToken(String accessToken, String expiresIn) {
        this.accessToken = accessToken;
        this.expiresTime = System.currentTimeMillis()+Integer.parseInt(expiresIn)*1000;
    }
    /**
     * åˆ¤æ–­token是否过期
     * @return
     */
    public boolean isExpired(){
        return System.currentTimeMillis()>expiresTime;
    }
}
server/services/src/main/java/com/doumee/core/wx/SendWxMessage.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
package com.doumee.core.wx;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.dao.system.model.SystemUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2022/12/7 17:27
 */
@Service
@Slf4j
public class SendWxMessage {
    private static String programUrl = "packagesMine/meetingDetails/meetingDetails?id=";
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
}
server/services/src/main/java/com/doumee/core/wx/TemplateData.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
package com.doumee.core.wx;
import lombok.Data;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2022/12/7 17:28
 */
@Data
public class TemplateData {
    private String value;
    public TemplateData(String value) {
        this.value = value;
    }
}
server/services/src/main/java/com/doumee/core/wx/WxMiniConfig.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,91 @@
package com.doumee.core.wx;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
import com.doumee.config.mybatis.SpringUtils;
import com.github.binarywang.wxpay.service.WxPayService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import javax.annotation.PostConstruct;
/**
 * å¾®ä¿¡å°ç¨‹åºç»„ä»¶
 */
@Configuration
public class WxMiniConfig {
    /********微信小程序服务**********/
    public static WxMaService wxMaService;
    /********微信小程序支付**********/
    public static WxPayService wxPayService;
    /********微信APP支付**********/
    public static WxPayService wxAppPayService;
    @Autowired
    private WxPayProperties wxPayProperties;
    public static WxMiniConfig me() {
        return SpringUtils.get().getBean(WxMiniConfig.class);
    }
    @PostConstruct
    void init() {
        this.load_WxMaService();
//        this.load_wxPayService();
//        this.load_wxAppPayService();
    }
    /**
     * åˆå§‹åŒ–微信小程序
     */
    public void load_WxMaService() {
        WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
        config.setAppid(StringUtils.trimToNull(wxPayProperties.getAppId()));
        config.setSecret(StringUtils.trimToNull(wxPayProperties.getAppSecret()));
        config.setMsgDataFormat("JSON");
        //config.setToken("");
        //config.setAesKey("");
        WxMaService wxMaService = new WxMaServiceImpl();
        wxMaService.setWxMaConfig(config);
        this.wxMaService = wxMaService;
    }
    /**
     * åˆå§‹åŒ–微信小程序支付
     */
//    public void load_wxPayService() {
//        WxPayConfig payConfig = new WxPayConfig();
//        payConfig.setTradeType(WxPayConstants.TradeType.JSAPI);
//        payConfig.setSignType(WxPayConstants.SignType.MD5);
//        payConfig.setAppId(StringUtils.trimToNull(wxPayProperties.getAppId()));
//        payConfig.setMchId(StringUtils.trimToNull(wxPayProperties.getMchId()));
//        payConfig.setMchKey(StringUtils.trimToNull(wxPayProperties.getMchKey()));
//        payConfig.setKeyPath(StringUtils.trimToNull(wxPayProperties.getKeyPath()));
//        payConfig.setNotifyUrl(StringUtils.trimToNull(wxPayProperties.getNotifyUrl()));
//        WxPayService wxPayService = new WxPayServiceImpl();
//        wxPayService.setConfig(payConfig);
//        this.wxPayService = wxPayService;
//    }
//    /**
//     * åˆå§‹åŒ–App支付
//     */
//    public void load_wxAppPayService() {
//        WxPayConfig payConfig = new WxPayConfig();
//        payConfig.setTradeType(WxPayConstants.TradeType.APP);
//        payConfig.setSignType(WxPayConstants.SignType.MD5);
//        payConfig.setAppId("");
//        payConfig.setMchId(StringUtils.trimToNull(sysDictService.getSysDictValue(SysDictEnum.WX_MINI_MchId.getCode())));
//        payConfig.setMchKey(StringUtils.trimToNull(sysDictService.getSysDictValue(SysDictEnum.WX_MINI_MchKey.getCode())));
//        payConfig.setKeyPath(StringUtils.trimToNull(sysDictService.getSysDictValue(SysDictEnum.WX_MINI_KeyPath.getCode())));
//        payConfig.setNotifyUrl(StringUtils.trimToNull(sysDictService.getSysDictValue(SysDictEnum.WX_MINI_NotifyUrl.getCode())));
//        WxPayService wxPayService = new WxPayServiceImpl();
//        wxPayService.setConfig(payConfig);
//        this.wxAppPayService = wxPayService;
//    }
}
server/services/src/main/java/com/doumee/core/wx/WxMiniUtilService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,53 @@
package com.doumee.core.wx;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.utils.ID;
import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest;
import com.github.binarywang.wxpay.bean.request.WxPayRefundRequest;
import com.github.binarywang.wxpay.bean.result.WxPayRefundResult;
import com.github.binarywang.wxpay.exception.WxPayException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
/**
 * å¾®ä¿¡å°ç¨‹åº-公共方法
 */
@Service
@Slf4j
public class WxMiniUtilService {
    /**
     * è®¢å•微信退款
     * orderNo:商户订单号
     * totalPrice:订单总金额
     * refundPrice;退款金额
     */
    @Transactional(rollbackFor = Exception.class)
    public static String wxRefund(String orderNo, BigDecimal totalPrice, BigDecimal refundPrice) {
        try {
            // å‘送退款请求
            String refNum = ID.nextGUID();
            WxPayRefundRequest request = new WxPayRefundRequest();
            request.setOutTradeNo(orderNo);
            request.setOutRefundNo(refNum);
           // request.setTotalFee(2);
          //  request.setRefundFee(1);
            request.setTotalFee(BaseWxPayRequest.yuanToFen(totalPrice.toString()));
            request.setRefundFee(BaseWxPayRequest.yuanToFen(refundPrice.toString()));
            WxPayRefundResult response = WxMiniConfig.wxPayService.refund(request);
            if ("SUCCESS".equals(response.getReturnCode()) && "SUCCESS".equals(response.getResultCode())) {
                return refNum;
            } else {
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),response.getErrCode() + response.getErrCodeDes());
            }
        } catch (WxPayException e) {
            e.printStackTrace();
        }
        throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"退款发生异常请联系管理员");
    }
}
server/services/src/main/java/com/doumee/core/wx/WxMsgVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
package com.doumee.core.wx;
import lombok.Data;
import java.util.Map;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2022/12/7 17:27
 */
@Data
public class WxMsgVO {
    //用户openId
    private String touser;
    //模版id
    private String template_id;
    //推送文字
    private Map<String , TemplateData> data;
    //跳转路径 ï¼Œé»˜è®¤è·³è½¬åˆ°å°ç¨‹åºé¦–页
    private String page="pages/index/index";
}
server/services/src/main/java/com/doumee/core/wx/WxPayProperties.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,48 @@
package com.doumee.core.wx;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2023/3/22 18:04
 */
@Component
@ConfigurationProperties(prefix = "wx.pay")
@Data
public class WxPayProperties {
    /**
     * AppID
     */
    private String appId;
    /**
     * AppSecret
     */
    private String appSecret;
    /**
     * å¾®ä¿¡å•†æˆ·å·
     */
    private String mchId;
    /**
     * æ”¯ä»˜API密钥
     */
    private String mchKey;
    /**
     * æ”¯ä»˜å›žè°ƒåœ°å€
     */
    private String notifyUrl;
    /**
     * æ”¯ä»˜è¯ä¹¦(p12)
     */
    private String keyPath;
}
server/services/src/main/java/com/doumee/dao/business/ActionLogMapper.java
server/services/src/main/java/com/doumee/dao/business/AdMapper.java
server/services/src/main/java/com/doumee/dao/business/AliBillDetailMapper.java
server/services/src/main/java/com/doumee/dao/business/AliBillMapper.java
server/services/src/main/java/com/doumee/dao/business/BikeRepairMapper.java
server/services/src/main/java/com/doumee/dao/business/BikesMapper.java
server/services/src/main/java/com/doumee/dao/business/HolidaysMapper.java
server/services/src/main/java/com/doumee/dao/business/LocksMapper.java
server/services/src/main/java/com/doumee/dao/business/MemberMapper.java
server/services/src/main/java/com/doumee/dao/business/MemberRidesMapper.java
server/services/src/main/java/com/doumee/dao/business/PricingDetailMapper.java
server/services/src/main/java/com/doumee/dao/business/PricingParamMapper.java
server/services/src/main/java/com/doumee/dao/business/RefundMapper.java
server/services/src/main/java/com/doumee/dao/business/RentSiteMapper.java
server/services/src/main/java/com/doumee/dao/business/SitesMapper.java
server/services/src/main/java/com/doumee/dao/business/TransactionsMapper.java
server/services/src/main/java/com/doumee/dao/business/WxBillDetailMapper.java
server/services/src/main/java/com/doumee/dao/business/WxBillMapper.java
server/services/src/main/java/com/doumee/dao/business/model/ActionLog.java
server/services/src/main/java/com/doumee/dao/business/model/Ad.java
server/services/src/main/java/com/doumee/dao/business/model/AliBill.java
server/services/src/main/java/com/doumee/dao/business/model/AliBillDetail.java
server/services/src/main/java/com/doumee/dao/business/model/BikeRepair.java
server/services/src/main/java/com/doumee/dao/business/model/Bikes.java
server/services/src/main/java/com/doumee/dao/business/model/Holidays.java
server/services/src/main/java/com/doumee/dao/business/model/Locks.java
server/services/src/main/java/com/doumee/dao/business/model/Member.java
server/services/src/main/java/com/doumee/dao/business/model/MemberRides.java
server/services/src/main/java/com/doumee/dao/business/model/PricingDetail.java
server/services/src/main/java/com/doumee/dao/business/model/PricingParam.java
server/services/src/main/java/com/doumee/dao/business/model/Refund.java
server/services/src/main/java/com/doumee/dao/business/model/RentSite.java
server/services/src/main/java/com/doumee/dao/business/model/Sites.java
server/services/src/main/java/com/doumee/dao/business/model/Transactions.java
server/services/src/main/java/com/doumee/dao/business/model/WxBill.java
server/services/src/main/java/com/doumee/dao/business/model/WxBillDetail.java
server/services/src/main/java/com/doumee/dao/business/web/request/ForgetPasswordRequest.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
package com.doumee.dao.business.web.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2023/6/27 17:07
 */
@Data
@ApiModel("小程序忘记密码业务")
public class ForgetPasswordRequest {
    @ApiModelProperty(value = "手机号",example = "1")
    private String mobile;
    @ApiModelProperty(value = "验证码",example = "1")
    private String code;
    @ApiModelProperty(value = "新密码",example = "1")
    private String newPassword;
}
server/services/src/main/java/com/doumee/dao/business/web/request/PageRequest.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,38 @@
package com.doumee.dao.business.web.request;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
@ApiModel("分页请求")
public class PageRequest implements Serializable {
  @ApiModelProperty("当前页")
  private long current = 1;
  @ApiModelProperty("页码")
  private long size = 20;
  public long getCurrent() {
    return current;
  }
  public void setCurrent(long current) {
    this.current = current;
  }
  public long getSize() {
    return size;
  }
  public void setSize(long size) {
    this.size = size;
  }
  public <T> Page<T> toPage() {
    return new Page<>(current, size);
  }
}
server/services/src/main/java/com/doumee/dao/business/web/request/RegisterRequest.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
package com.doumee.dao.business.web.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2023/6/25 14:52
 */
@Data
public class RegisterRequest {
    @NotEmpty(message = "手机号 ä¸èƒ½ä¸ºç©º")
    @ApiModelProperty(value = "mobile")
    private String mobile;
    @NotEmpty(message = "验证码 ä¸èƒ½ä¸ºç©º")
    @ApiModelProperty(value = "code")
    private String code;
    @NotEmpty(message = "密码 ä¸èƒ½ä¸ºç©º")
    @ApiModelProperty(value = "password")
    private String password;
}
server/services/src/main/java/com/doumee/dao/business/web/request/UpdMemberRequest.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,38 @@
package com.doumee.dao.business.web.request;
import com.doumee.core.utils.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2023/6/25 16:45
 */
@Data
public class UpdMemberRequest {
    @ApiModelProperty(value = "头像")
    private String imgurl;
    @ApiModelProperty(value = "昵称")
    private String nickname;
    @ApiModelProperty(value = "真实姓名")
    private String name;
    @ApiModelProperty(value = "性别")
    private Integer sex;
    @ApiModelProperty(value = "生日")
    private String birthday;
    private Integer id;
}
server/services/src/main/java/com/doumee/dao/business/web/request/UpdPasswordRequest.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
package com.doumee.dao.business.web.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2023/6/27 17:07
 */
@Data
@ApiModel("小程序修改密码业务")
public class UpdPasswordRequest {
    @ApiModelProperty(value = "用户主键",example = "1")
    private Integer memberId;
    @ApiModelProperty(value = "验证码",example = "1")
    private String code;
    @ApiModelProperty(value = "新密码",example = "1")
    private String newPassword;
}
server/services/src/main/java/com/doumee/dao/business/web/request/WxPhoneRequest.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
package com.doumee.dao.business.web.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2023/3/23 9:50
 */
@Data
@ApiModel("微信授权手机号请求类")
public class WxPhoneRequest implements Serializable {
    @NotEmpty(message = "encryptedData ä¸èƒ½ä¸ºç©º")
    @ApiModelProperty(value = "encryptedData")
    private String encryptedData;
    @NotEmpty(message = "iv ä¸èƒ½ä¸ºç©º")
    @ApiModelProperty(value = "iv")
    private String iv;
    @NotEmpty(message = "sessionKey ä¸èƒ½ä¸ºç©º")
    @ApiModelProperty(value = "sessionKey")
    private String sessionKey;
    @NotEmpty(message = "openId ä¸èƒ½ä¸ºç©º")
    @ApiModelProperty(value = "openId")
    private String openId;
}
server/services/src/main/java/com/doumee/dao/business/web/response/AccountResponse.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
package com.doumee.dao.business.web.response;
import com.doumee.dao.system.model.SystemUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2023/3/23 9:25
 */
@Data
@ApiModel("登录返回类")
public class AccountResponse implements Serializable {
    @ApiModelProperty(value = "用户token")
    private String token;
    @ApiModelProperty(value = "用户信息")
    private UserResponse userResponse;
}
server/services/src/main/java/com/doumee/dao/business/web/response/UserResponse.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
package com.doumee.dao.business.web.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2023/3/23 9:25
 */
@Data
@ApiModel("查询用户返回类")
public class UserResponse {
    @ApiModelProperty(value = "用户主键")
    private Integer id;
    @ApiModelProperty(value = "姓名")
    private String name;
    @ApiModelProperty(value = "手机号")
    private String mobile;
    @ApiModelProperty(value = "昵称")
    private String nickname;
    @ApiModelProperty(value = "头像")
    private String imgurl;
    @ApiModelProperty(value = "头像前缀")
    private String prefixUrl;
    @ApiModelProperty(value = "微信openid")
    private String openid;
    @ApiModelProperty(value = "性别")
    private Integer sex;
}
server/services/src/main/java/com/doumee/dao/system/SystemDataPermissionMapper.java
server/services/src/main/java/com/doumee/dao/system/SystemDepartmentMapper.java
server/services/src/main/java/com/doumee/dao/system/SystemDepartmentUserMapper.java
server/services/src/main/java/com/doumee/dao/system/SystemDictDataMapper.java
server/services/src/main/java/com/doumee/dao/system/SystemDictMapper.java
server/services/src/main/java/com/doumee/dao/system/SystemLoginLogMapper.java
server/services/src/main/java/com/doumee/dao/system/SystemMenuMapper.java
server/services/src/main/java/com/doumee/dao/system/SystemPermissionMapper.java
server/services/src/main/java/com/doumee/dao/system/SystemPositionMapper.java
server/services/src/main/java/com/doumee/dao/system/SystemPositionUserMapper.java
server/services/src/main/java/com/doumee/dao/system/SystemRoleMapper.java
server/services/src/main/java/com/doumee/dao/system/SystemRoleMenuMapper.java
server/services/src/main/java/com/doumee/dao/system/SystemRolePermissionMapper.java
server/services/src/main/java/com/doumee/dao/system/SystemTraceLogMapper.java
server/services/src/main/java/com/doumee/dao/system/SystemUserMapper.java
server/services/src/main/java/com/doumee/dao/system/SystemUserRoleMapper.java
server/services/src/main/java/com/doumee/dao/system/dto/CreateRoleMenuDTO.java
server/services/src/main/java/com/doumee/dao/system/dto/CreateRolePermissionDTO.java
server/services/src/main/java/com/doumee/dao/system/dto/CreateSystemUserDTO.java
server/services/src/main/java/com/doumee/dao/system/dto/CreateUserRoleDTO.java
server/services/src/main/java/com/doumee/dao/system/dto/LoginDTO.java
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemDepartmentDTO.java
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemDictDTO.java
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemDictDataDTO.java
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemLoginLogDTO.java
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemPermissionDTO.java
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemRoleDTO.java
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemTraceLogDTO.java
server/services/src/main/java/com/doumee/dao/system/dto/QuerySystemUserDTO.java
server/services/src/main/java/com/doumee/dao/system/dto/ResetSystemUserPwdDTO.java
server/services/src/main/java/com/doumee/dao/system/dto/UpdatePwdDto.java
server/services/src/main/java/com/doumee/dao/system/dto/UpdateSystemMenuSortDTO.java
server/services/src/main/java/com/doumee/dao/system/dto/WebLoginDTO.java
server/services/src/main/java/com/doumee/dao/system/model/SystemDataPermission.java
server/services/src/main/java/com/doumee/dao/system/model/SystemDepartment.java
server/services/src/main/java/com/doumee/dao/system/model/SystemDepartmentUser.java
server/services/src/main/java/com/doumee/dao/system/model/SystemDict.java
server/services/src/main/java/com/doumee/dao/system/model/SystemDictData.java
server/services/src/main/java/com/doumee/dao/system/model/SystemLoginLog.java
server/services/src/main/java/com/doumee/dao/system/model/SystemMenu.java
server/services/src/main/java/com/doumee/dao/system/model/SystemPermission.java
server/services/src/main/java/com/doumee/dao/system/model/SystemPosition.java
server/services/src/main/java/com/doumee/dao/system/model/SystemPositionUser.java
server/services/src/main/java/com/doumee/dao/system/model/SystemRole.java
server/services/src/main/java/com/doumee/dao/system/model/SystemRoleMenu.java
server/services/src/main/java/com/doumee/dao/system/model/SystemRolePermission.java
server/services/src/main/java/com/doumee/dao/system/model/SystemTraceLog.java
server/services/src/main/java/com/doumee/dao/system/model/SystemUser.java
server/services/src/main/java/com/doumee/dao/system/model/SystemUserRole.java
server/services/src/main/java/com/doumee/dao/system/vo/SystemDataPermissionListVO.java
server/services/src/main/java/com/doumee/dao/system/vo/SystemDepartmentListVO.java
server/services/src/main/java/com/doumee/dao/system/vo/SystemDictDataListVO.java
server/services/src/main/java/com/doumee/dao/system/vo/SystemDictListVO.java
server/services/src/main/java/com/doumee/dao/system/vo/SystemMenuListVO.java
server/services/src/main/java/com/doumee/dao/system/vo/SystemMenuNodeVO.java
server/services/src/main/java/com/doumee/dao/system/vo/SystemPermissionListVO.java
server/services/src/main/java/com/doumee/dao/system/vo/SystemPositionListVO.java
server/services/src/main/java/com/doumee/dao/system/vo/SystemRoleListVO.java
server/services/src/main/java/com/doumee/dao/system/vo/SystemUserListVO.java
server/services/src/main/java/com/doumee/service/aware/DepartmentDataPermissionAware.java
server/services/src/main/java/com/doumee/service/aware/PositionDataPermissionAware.java
server/services/src/main/java/com/doumee/service/business/ActionLogService.java
server/services/src/main/java/com/doumee/service/business/AdService.java
server/services/src/main/java/com/doumee/service/business/AliBillDetailService.java
server/services/src/main/java/com/doumee/service/business/AliBillService.java
server/services/src/main/java/com/doumee/service/business/BikeRepairService.java
server/services/src/main/java/com/doumee/service/business/BikesService.java
server/services/src/main/java/com/doumee/service/business/HolidaysService.java
server/services/src/main/java/com/doumee/service/business/LocksService.java
server/services/src/main/java/com/doumee/service/business/MemberRidesService.java
server/services/src/main/java/com/doumee/service/business/MemberService.java
ÎļþÃû´Ó server/src/main/java/com/doumee/service/business/MemberService.java ÐÞ¸Ä
@@ -3,6 +3,10 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.Member;
import com.doumee.dao.business.web.request.RegisterRequest;
import com.doumee.dao.business.web.response.AccountResponse;
import com.doumee.dao.business.web.response.UserResponse;
import java.util.List;
/**
@@ -94,4 +98,17 @@
     * @return long
     */
    long count(Member member);
    AccountResponse userRegister(RegisterRequest registerRequest);
    void wxEmpower(String code, String memberId);
    /**
     * æ‹‰å–登录
     * @param code
     * @param userId
     */
    AccountResponse wxLogin(String code);
    UserResponse getUserInfo(String memberId);
}
server/services/src/main/java/com/doumee/service/business/PricingDetailService.java
server/services/src/main/java/com/doumee/service/business/PricingParamService.java
server/services/src/main/java/com/doumee/service/business/RefundService.java
server/services/src/main/java/com/doumee/service/business/RentSiteService.java
server/services/src/main/java/com/doumee/service/business/SitesService.java
server/services/src/main/java/com/doumee/service/business/TransactionsService.java
server/services/src/main/java/com/doumee/service/business/WxBillDetailService.java
server/services/src/main/java/com/doumee/service/business/WxBillService.java
server/services/src/main/java/com/doumee/service/business/impl/ActionLogServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/AdServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/AliBillDetailServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/AliBillServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/BikeRepairServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/BikesServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/HolidaysServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/LocksServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/MemberRidesServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
ÎļþÃû´Ó server/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java ÐÞ¸Ä
@@ -1,20 +1,33 @@
package com.doumee.service.business.impl;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.MemberMapper;
import com.doumee.dao.business.model.Member;
import com.doumee.service.business.MemberService;
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.doumee.core.Jwt.JwtPayLoad;
import com.doumee.core.Jwt.JwtTokenUtil;
import com.doumee.core.constants.Constants;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Utils;
import com.doumee.core.wx.WxMiniConfig;
import com.doumee.dao.business.MemberMapper;
import com.doumee.dao.business.model.Member;
import com.doumee.dao.business.web.request.RegisterRequest;
import com.doumee.dao.business.web.response.AccountResponse;
import com.doumee.dao.business.web.response.UserResponse;
import com.doumee.service.business.MemberService;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
import java.util.Objects;
/**
 * ç”¨æˆ·ä¿¡æ¯è¡¨Service实现
@@ -177,4 +190,78 @@
        QueryWrapper<Member> wrapper = new QueryWrapper<>(member);
        return memberMapper.selectCount(wrapper);
    }
    @Override
    public AccountResponse userRegister(RegisterRequest registerRequest){
        return  new AccountResponse();
    }
    /**
     * æ‹‰å–微信授权
     * @param code
     * @param userId
     */
    @Override
    public void wxEmpower(String code,String userId){
        Member member = memberMapper.selectById(userId);
        if(Objects.isNull(member)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到账户信息");
        }
        try {
            //获取微信敏感数据
            WxMaJscode2SessionResult session = WxMiniConfig.wxMaService.getUserService().getSessionInfo(code);
            String openId = session.getOpenid();
            if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isBlank(openId)) {
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"获取openid失败!请联系管理员");
            }
            member.setOpenid(openId);
            memberMapper.updateById(member);
            memberMapper.update(null,
                    new UpdateWrapper<Member>()
                            .set("openId",null)
                            .eq("openId",openId)
                            .ne("id",member.getId()));
        } catch (WxErrorException e) {
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"微信登录异常!请联系管理员");
        }
    }
    @Override
    public AccountResponse wxLogin(String code) {
        try {
            //获取微信敏感数据
            WxMaJscode2SessionResult session = WxMiniConfig.wxMaService.getUserService().getSessionInfo(code);
            String openId = session.getOpenid();
            if (com.baomidou.mybatisplus.core.toolkit.StringUtils.isBlank(openId)) {
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "获取openid失败!请联系管理员");
            }
            Member member = memberMapper.selectOne(new QueryWrapper<Member>().eq("OPENID", openId).eq("ISDELETED", Constants.ZERO).last("limit 1"));
            AccountResponse accountResponse = new AccountResponse();
            if (Objects.isNull(member)) {
                return accountResponse;
            }
            memberMapper.updateById(member);
            UserResponse userResponse = getUserInfo(member.getId());
            JwtPayLoad payLoad = new JwtPayLoad(userResponse.getId());
            accountResponse.setToken(JwtTokenUtil.generateToken(payLoad));
            accountResponse.setUserResponse(userResponse);
            return accountResponse;
        } catch (WxErrorException e) {
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "微信登录异常!请联系管理员");
        }
    }
    @Override
    public UserResponse getUserInfo(String id) {
        Member member = memberMapper.selectById(id);
        UserResponse userResponse = new UserResponse();
        BeanUtils.copyProperties(member,userResponse);
        userResponse.setMobile(member.getPhone());
        return userResponse;
    }
}
server/services/src/main/java/com/doumee/service/business/impl/PricingDetailServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/PricingParamServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/RefundServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/RentSiteServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/SitesServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/TransactionsServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/WxBillDetailServiceImpl.java
server/services/src/main/java/com/doumee/service/business/impl/WxBillServiceImpl.java
server/services/src/main/java/com/doumee/service/common/CaptchaService.java
server/services/src/main/java/com/doumee/service/proxy/CacheProxy.java
server/services/src/main/java/com/doumee/service/system/SystemDataPermissionService.java
server/services/src/main/java/com/doumee/service/system/SystemDepartmentService.java
server/services/src/main/java/com/doumee/service/system/SystemDepartmentUserService.java
server/services/src/main/java/com/doumee/service/system/SystemDictDataService.java
server/services/src/main/java/com/doumee/service/system/SystemDictService.java
server/services/src/main/java/com/doumee/service/system/SystemLoginLogService.java
server/services/src/main/java/com/doumee/service/system/SystemLoginService.java
server/services/src/main/java/com/doumee/service/system/SystemMenuService.java
server/services/src/main/java/com/doumee/service/system/SystemPermissionService.java
server/services/src/main/java/com/doumee/service/system/SystemPositionService.java
server/services/src/main/java/com/doumee/service/system/SystemPositionUserService.java
server/services/src/main/java/com/doumee/service/system/SystemRoleMenuService.java
server/services/src/main/java/com/doumee/service/system/SystemRolePermissionService.java
server/services/src/main/java/com/doumee/service/system/SystemRoleService.java
server/services/src/main/java/com/doumee/service/system/SystemTraceLogService.java
server/services/src/main/java/com/doumee/service/system/SystemUserRoleService.java
server/services/src/main/java/com/doumee/service/system/SystemUserService.java
server/services/src/main/java/com/doumee/service/system/impl/SystemDataPermissionServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemDepartmentServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemDepartmentUserServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemDictServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemLoginLogServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemLoginServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemMenuServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemPermissionServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemPositionServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemPositionUserServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemRoleMenuServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemRolePermissionServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemRoleServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemTraceLogServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemUserRoleServiceImpl.java
server/services/src/main/java/com/doumee/service/system/impl/SystemUserServiceImpl.java
server/services/src/main/resources/application-dev.yml
ÎļþÃû´Ó server/src/main/resources/application-dev.yml ÐÞ¸Ä
@@ -1,7 +1,3 @@
# WEB服务器配置
server:
  port: 10012
spring:
  # æ•°æ®æºé…ç½®
  datasource:
@@ -43,3 +39,19 @@
  enabled: true
  # ç¦ç”¨swagger时的重定向地址
  redirect-uri: /
########################微信支付相关配置########################
wx:
  pay:
    appId: wx6b8c6d9df01fbe1e
    appSecret: 8ae8fbe2e4b9866439a87d64a42b9214
    mchId: 1229817002
    mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM
    notifyUrl: https://dmtest.ahapp.net/martempo_interface/web/api/wxPayNotify
    keyPath: /usr/local/apiclient_cert.p12
tencent:
  map:
    remoteHost: https://apis.map.qq.com
    appKey: 3AYBZ-I5R3V-2BVP3-UWBDQ-ETBM5-B2BBQ
server/services/src/main/resources/application-pro.yml
server/services/src/main/resources/application-test.yml
server/services/src/main/resources/banner.txt
server/services/src/main/resources/logback-spring.xml
server/services/src/main/resources/mappers/SystemDataPermissionMapper.xml
server/services/src/main/resources/mappers/SystemDepartmentMapper.xml
server/services/src/main/resources/mappers/SystemDictDataMapper.xml
server/services/src/main/resources/mappers/SystemDictMapper.xml
server/services/src/main/resources/mappers/SystemMenuMapper.xml
server/services/src/main/resources/mappers/SystemPermissionMapper.xml
server/services/src/main/resources/mappers/SystemPositionMapper.xml
server/services/src/main/resources/mappers/SystemRoleMapper.xml
server/services/src/main/resources/mappers/SystemUserMapper.xml
server/src/main/java/com/doumee/api/BaseController.java
ÎļþÒÑɾ³ý
server/src/main/java/com/doumee/api/common/PublicController.java
ÎļþÒÑɾ³ý
server/src/main/java/com/doumee/config/shiro/ShiroRedisSessionDAO.java
ÎļþÒÑɾ³ý
server/web/pom.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.doumee</groupId>
        <artifactId>parkbike</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>
    <artifactId>web</artifactId>
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencies>
        <dependency>
            <groupId>com.doumee</groupId>
            <artifactId>services</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
    </dependencies>
    <build>
        <finalName>web</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <fork>true</fork>
                    <mainClass>com.doumee.InterfaceApplication</mainClass>
                    <layout>ZIP</layout>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
server/web/src/main/java/com/doumee/InterfaceApplication.java
copy from server/src/main/java/com/doumee/Application.java copy to server/web/src/main/java/com/doumee/InterfaceApplication.java
Îļþ´Ó server/src/main/java/com/doumee/Application.java ¸´ÖÆ
@@ -5,23 +5,21 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;
/**
 * å¯åŠ¨ç±»
 * @author Eva.Caesar Liu
 * @date 2022/03/15 09:54
 * @date 2023/03/21 14:49
 */
@Slf4j
@SpringBootApplication
@EnableAsync
@MapperScan("com.doumee.dao")
public class Application {
public class InterfaceApplication {
    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(Application.class);
        ApplicationContext context = SpringApplication.run(InterfaceApplication.class);
        context.getEnvironment();
    }
}
server/web/src/main/java/com/doumee/Main.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
package com.doumee;
public class Main {
    public static void main(String[] args) {
        System.out.println("Hello world!");
    }
}
server/web/src/main/java/com/doumee/api/BaseController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
package com.doumee.api;
import com.doumee.core.model.LoginUserInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
/**
 * Controller基类
 * @author Eva.Caesar Liu
 * @date 2023/03/21 14:49
 */
@Slf4j
public class BaseController {
    /**
     * èŽ·å–å½“å‰ç™»å½•ç”¨æˆ·
     * @author Eva.Caesar Liu
     * @date 2023/03/21 14:49
     */
    protected LoginUserInfo getLoginUser () {
        return (LoginUserInfo)SecurityUtils.getSubject().getPrincipal();
    }
}
server/web/src/main/java/com/doumee/api/common/CaptchaController.java
ÎļþÃû´Ó server/src/main/java/com/doumee/api/common/CaptchaController.java ÐÞ¸Ä
@@ -13,7 +13,7 @@
/**
 * @author Eva.Caesar Liu
 * @date 2022/03/15 09:54
 * @date 2023/03/21 14:49
 */
@Api(tags = "图片验证码接口")
@Trace(exclude = true)
@@ -26,7 +26,7 @@
    /**
     * @author Eva.Caesar Liu
     * @date 2022/03/15 09:54
     * @date 2023/03/21 14:49
     */
    @ApiOperation("获取图片验证码")
    @GetMapping("/captcha")
server/web/src/main/java/com/doumee/api/common/PublicController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,324 @@
package com.doumee.api.common;
import com.alibaba.fastjson.JSONObject;
import com.doumee.api.BaseController;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.constants.Constants;
import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.aliyun.ALiYunUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.UUID;
/**
 * @author Eva.Caesar Liu
 * @date 2023/02/14 11:14
 */
@Api(tags = "公共接口")
@Trace(exclude = true)
@RestController
@RequestMapping("/public")
@Slf4j
public class PublicController extends BaseController {
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
    @ApiOperation(value = "上传", notes = "上传", httpMethod = "POST", position = 6)
    @ApiImplicitParams({
        @ApiImplicitParam(name = "folder", value = "文件夹", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class),
    })
    @PostMapping(value = "/upload", headers = "content-type=multipart/form-data")
    public void uploadMobile(String folder, HttpServletRequest request, HttpServletResponse response) throws Exception {
        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
        upload(multipartRequest, response, folder + "/",
            systemDictDataBiz.queryByCode(Constants.OSS,Constants.BUCKETNAME).getCode(),
            systemDictDataBiz.queryByCode(Constants.OSS,Constants.ACCESS_ID).getCode(),
            systemDictDataBiz.queryByCode(Constants.OSS,Constants.ACCESS_KEY).getCode(),
            systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode(),
            systemDictDataBiz.queryByCode(Constants.OSS,Constants.ENDPOINT).getCode());
    }
    @ApiOperation(value = "上传图片", notes = "上传图片", httpMethod = "POST", position = 6)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "folder", value = "文件夹", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class),
    })
    @PostMapping(value = "/uploadPicture", headers = "content-type=multipart/form-data")
    public void uploadPicture(String folder, HttpServletRequest request, HttpServletResponse response) throws Exception {
        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
        Iterator<String> fileNames = multipartRequest.getFileNames();
        Map<String, Object> context = new HashMap<>();
        while (fileNames.hasNext()){
            MultipartFile file = multipartRequest.getFile(fileNames.next());
            String fileName = file.getOriginalFilename();
            String suffix = fileName.substring(fileName.lastIndexOf("."));
            if ( !StringUtils.equalsIgnoreCase(suffix, ".jpg") || !StringUtils.equalsIgnoreCase(suffix, ".png")) {
                context.put("code", 0);
                context.put("message", "对不起,文件格式上传有误!");
            }
        }
        upload(multipartRequest, response, folder + "/",
                systemDictDataBiz.queryByCode(Constants.OSS,Constants.BUCKETNAME).getCode(),
                systemDictDataBiz.queryByCode(Constants.OSS,Constants.ACCESS_ID).getCode(),
                systemDictDataBiz.queryByCode(Constants.OSS,Constants.ACCESS_KEY).getCode(),
                systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode(),
                systemDictDataBiz.queryByCode(Constants.OSS,Constants.ENDPOINT).getCode());
    }
    public void upload(HttpServletRequest request, HttpServletResponse response, String folder, String bucketName,
        String access_id, String access_key, String resourcePath, String endpoint) throws Exception {
        response.setCharacterEncoding("UTF-8");
        response.setContentType("text/html;charset=UTF-8");
        Map<String, Object> context = new HashMap<>();
        CommonsMultipartResolver multipartResovler = new CommonsMultipartResolver();
        if (multipartResovler.isMultipart(request)) {
            MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
            Iterator<String> it = multipartRequest.getFileNames();
            while (it.hasNext()) {
                MultipartFile file = multipartRequest.getFile((String) it.next());// file
                // multipartRequest.getFile((String)
                // it.next());
                if (file != null) {
                    // 1、上传到服务器临时文件夹
                    String uploadFileName = file.getOriginalFilename();
                    String originname = uploadFileName;
                    if (originname.lastIndexOf("/") >= 0) {
                        originname = originname.substring(originname.lastIndexOf("/") + 1);
                    }
                    String nfix = "";// åŽç¼€å
                    if (StringUtils.isNotBlank(uploadFileName)) {
                        nfix = uploadFileName.substring(uploadFileName.lastIndexOf("."));
                    }
                    if (StringUtils.equalsIgnoreCase(nfix, ".exe")) {
                        context.put("code", 4000);
                        context.put("message", "对不起,文件格式\".exe\"上传有误!");
                        return;
                    }
                    if (StringUtils.equalsIgnoreCase(nfix, ".dll")) {
                        context.put("code", 4000);
                        context.put("message", "对不起,文件格式\".dll\"上传有误!");
                        return;
                    }
                    String nowDate = DateUtil.getNowShortDate();// å½“前时间(年月日)
                    String fileName = UUID.randomUUID().toString() + nfix;
                    String tempFileName = nowDate + "/" + fileName;
                    String key = folder + tempFileName;// æ–‡ä»¶å
                    ALiYunUtil obs = new ALiYunUtil(endpoint,access_id, access_key);
                    if (obs.uploadOnlineObject(file.getInputStream(),bucketName, key,null)) {
                        // ç§»åŠ¨æˆåŠŸ,返回文件名
                        // sendSuccessMessage(response, resourcePath+key);
                        context.put("success", true);
                        context.put("code", 200);
                        context.put("errno",0);
                        JSONObject fileJSON = new JSONObject();
                        fileJSON.put("url", resourcePath + key);
                        fileJSON.put("imgaddr", tempFileName);
                        fileJSON.put("imgname", fileName);
                        fileJSON.put("originname", originname);
                        context.put("data",fileJSON);
                        context.put("message","请求成功");
                        writerJson(response, context);
                        return;
                    } else {
                        // ç§»åŠ¨å¤±è´¥
                        context.put("code", 0);
                        context.put("message", "上传失败");
                        writerJson(response, context);
                        return;
                    }
                }
            }
        }
        context.put("code", 0);
        context.put("message", "上传失败");
        context.put("errno",0);
        writerJson(response, context);
        return;
    }
    public static void writerJson(HttpServletResponse response, Object object) {
        response.setContentType("application/json");
        writer(response, JSONObject.toJSONString(object));
    }
    private static void writer(HttpServletResponse response, String str) {
        try {
            StringBuffer result = new StringBuffer();
            //设置页面不缓存
            response.setHeader("Pragma", "No-cache");
            response.setHeader("Cache-Control", "no-cache");
            response.setCharacterEncoding("UTF-8");
            PrintWriter out = null;
            out = response.getWriter();
            out.print(str);
            out.flush();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    @ApiOperation(value = "上传服务器本地", notes = "上传服务器本地", httpMethod = "POST", position = 6)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "folder", value = "文件夹", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class),
    })
    @PostMapping(value = "/uploadLocal", headers = "content-type=multipart/form-data")
    public void uploadLocal(String folder, HttpServletRequest request, HttpServletResponse response) throws Exception {
        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
        // CommonsMultipartFile files = (CommonsMultipartFile) multipartRequest.getFile("filedata");
        uploadFileLocal(multipartRequest,  folder+ "/", response,
                systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.IMG_DIR).getCode() ,
                systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FILE_DIR).getCode());
    }
    public void uploadFileLocal(HttpServletRequest request, String folder, HttpServletResponse response, String rootPath,String dir) throws Exception {
        response.setCharacterEncoding("UTF-8");
        response.setContentType("text/html;charset=UTF-8");
        CommonsMultipartResolver multipartResovler = new CommonsMultipartResolver();
        Map<String, Object> context = new HashMap<>();
        if (multipartResovler.isMultipart(request)) {
            MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
            Iterator<String> it = multipartRequest.getFileNames();
            while (it.hasNext()) {
                MultipartFile file = multipartRequest.getFile((String) it.next());// file
                // =
                // (CommonsMultipartFile)
                // multipartRequest.getFile((String)
                // it.next());
                if (file != null) {
                    if (file.getSize() > 200 * 1024 * 1024L) {
                        context.put("code", 4000);
                        context.put("message", "上传文件过大");
                        return;
                    }
                    System.out.println(file.getOriginalFilename());
                    if (file.getOriginalFilename() == null) {
                        context.put("code", 4000);
                        context.put("message", "文件名不可为空");
                        return;
                    }
                    /*
                     * if(file.getOriginalFilename().contains(",")||file.getOriginalFilename().
                     * contains(" ")){ sendFailureMessage(response,"文件名称有误,不可含有逗号等特殊字符"); }
                     */
                    String nowDate = DateUtil.getNowShortDate();
                    folder += nowDate + "/";
                    String strDirPath = rootPath + folder;
                    File dirPath = new File(strDirPath);
                    if (!dirPath.exists()) {
                        dirPath.mkdirs();
                    }
                    String uploadFileName = file.getOriginalFilename();
                    String x = UUID.randomUUID().toString().replace("-", "")
                            + uploadFileName.substring(uploadFileName.lastIndexOf("."));
                    String fileName = folder + x;
                    String fileNames = nowDate + "/" + x;
                    uploadFileName = uploadFileName.replace(" ", "");
                    uploadFileName = uploadFileName.replace(",", ",");
                    uploadFileName = uploadFileName.replaceAll(",", "-");
                    System.err.println("R:" + fileName);
                    String fileAndPath = dir + fileName;
                    System.err.println("A:" + fileAndPath);
                    // åˆ¤æ–­å¦‚果临时目录中存在相同名称的文件先删除,在上传
                    File tempFile = new File(rootPath + fileName);
                    if (tempFile.isFile() && tempFile.exists()) {
                        tempFile.getAbsoluteFile().delete();
                    }
                    // ä¸Šä¼ åˆ°æœåŠ¡å™¨ä¸´æ—¶æ–‡ä»¶å¤¹
                    file.transferTo(tempFile);
                    // è½¬ç§»åˆ°FTP服务器
                    String nfix = "";
                    if (null != uploadFileName) {
                        nfix = uploadFileName.substring(uploadFileName.lastIndexOf("."));
                    }
                    if (StringUtils.equalsIgnoreCase(nfix, ".exe")) {
                        context.put("code", 4000);
                        context.put("message", "对不起,文件格式\".exe\"上传有误!");
                        return;
                    }
                    if (StringUtils.equalsIgnoreCase(nfix, ".dll")) {
                        context.put("code", 4000);
                        context.put("message", "对不起,文件格式\".dll\"上传有误!");
                        return;
                    }
                    String remoteName = fileName;
                    String remoteFileName = fileAndPath;
             /*       Map map = new HashMap();
                    map.put("url", remoteFileName);
                    map.put("alt", uploadFileName);
                    map.put("href", remoteFileName);
                    List maps = Arrays.asList(remoteFileName);*/
                    if (true) {
                        // å…³é—­FTP流
                        // ç§»åŠ¨æˆåŠŸ,返回文件名
                        /*context.put("error", 0);
                        context.put("url", remoteFileName);
                        context.put("fullurl", remoteFileName);
                        context.put("fname", uploadFileName);
                        context.put("data", maps);
                        context.put("halfurl", fileNames);*/
                        context.put("success", true);
                        context.put("code", 200);
                        context.put("errno",0);
                        JSONObject fileJSON = new JSONObject();
                        fileJSON.put("url", remoteFileName);
                        fileJSON.put("imgaddr", fileNames);
                        fileJSON.put("imgname", uploadFileName);
                        fileJSON.put("originname", uploadFileName);
                        context.put("data",fileJSON);
                        context.put("message","请求成功");
                        writerJson(response, context);
                        return;
                    } else {
                        // ç§»åŠ¨å¤±è´¥
                        context.put("code", 0);
                        context.put("message", "上传失败");
                        writerJson(response, context);
                    }
                }
                context.put("code", 0);
                context.put("message", "上传失败");
                writerJson(response, context);
                return;
            }
        }
        context.put("code", 0);
        context.put("message", "上传失败");
        writerJson(response, context);
        return;
    }
}
server/web/src/main/java/com/doumee/api/web/AccountApi.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,86 @@
package com.doumee.api.web;
import com.doumee.core.annotation.LoginRequired;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
import com.doumee.dao.business.web.request.RegisterRequest;
import com.doumee.dao.business.web.response.AccountResponse;
import com.doumee.dao.business.web.response.UserResponse;
import com.doumee.service.business.MemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2023/5/5 16:02
 */
@Api(tags = "1、登录业务")
@Trace(exclude = true)
@RestController
@RequestMapping("/web/account")
@Slf4j
public class AccountApi extends ApiController{
    @Autowired
    private MemberService memberService;
    @ApiOperation(value = "用户注册", notes = "小程序端")
    @PostMapping("/userRegister")
    public ApiResponse<AccountResponse> userRegister(@RequestBody RegisterRequest registerRequest) {
        return  ApiResponse.success("操作成功",memberService.userRegister(registerRequest));
    }
    @Trace
    @LoginRequired
    @ApiOperation(value = "微信授权(登录后)", notes = "小程序端")
    @GetMapping("/wxEmpower")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "String", name = "code", value = "微信code", required = true)
    })
    public ApiResponse wxEmpower(@RequestParam String code) {
        memberService.wxEmpower(code,getMemberId());
        return  ApiResponse.success("操作成功");
    }
    @Trace
    @ApiOperation(value = "微信授权", notes = "小程序端")
    @GetMapping("/wxLogin")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "String", name = "code", value = "微信code", required = true)
    })
    public ApiResponse<AccountResponse> wxLogin(@RequestParam String code) {
        return  ApiResponse.success("操作成功",memberService.wxLogin(code));
    }
    @LoginRequired
    @ApiOperation(value = "获取用户信息", notes = "小程序端")
    @GetMapping("/getUserInfo")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true),
    })
    public ApiResponse<UserResponse> getUserInfo() {
        UserResponse userResponse = memberService.getUserInfo(getMemberId());
        return  ApiResponse.success("查询成功",userResponse);
    }
}
server/web/src/main/java/com/doumee/api/web/ApiController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
package com.doumee.api.web;
import com.doumee.core.Jwt.JwtTokenUtil;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.dao.business.web.response.UserResponse;
import com.doumee.service.business.MemberService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
 * Controller基类
 * @author Eva.Caesar Liu
 * @date 2022/03/15 09:54
 */
@Slf4j
@Service
public class ApiController {
    @Autowired
    public MemberService memberService;
    /**
     * å¾—到request对象
     *
     * @return
     */
    public HttpServletRequest getRequest() {
        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
        return request;
    }
    /**
     * èŽ·å–ç”¨æˆ·ID
     *
     * @return
     */
    protected String getMemberId() {
        Object obj = this.getRequest().getAttribute(JwtTokenUtil.UserId_Name);
        return obj != null ? (String) obj : null;
    }
    /**
     * èŽ·å–ç™»å½•ç”¨æˆ·å¯¹è±¡ä¿¡æ¯
     * @return
     */
    protected UserResponse getUserResponse(){
        Object obj = this.getRequest().getAttribute(JwtTokenUtil.UserId_Name);
        if(obj != null){
            return memberService.getUserInfo((String) obj);
        }
        return null;
    }
}
server/web/src/main/java/com/doumee/config/shiro/ShiroAuthFilter.java
ÎļþÃû´Ó server/src/main/java/com/doumee/config/shiro/ShiroAuthFilter.java ÐÞ¸Ä
@@ -12,7 +12,7 @@
/**
 * Shiro认证过滤器,处理未认证情况的响应
 * @author Eva.Caesar Liu
 * @date 2023/04/17 12:11
 * @date 2023/03/21 14:49
 */
public class ShiroAuthFilter extends FormAuthenticationFilter {
server/web/src/main/java/com/doumee/config/shiro/ShiroCache.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,113 @@
package com.doumee.config.shiro;
import com.doumee.service.proxy.CacheProxy;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Set;
/**
 * Shiro缓存
 * @author Eva.Caesar Liu
 * @date 2023/03/21 14:49
 */
@Scope(value = "prototype")
@Slf4j
@Component
public class ShiroCache implements Cache<Object, Serializable> {
    private String keyPrefix = "";
    @Autowired
    private CacheProxy<Object, Serializable> cacheProxy;
    public ShiroCache () {
        log.debug("ShiroCache: new, keyPrefix = [" + keyPrefix + "]");
    }
    public ShiroCache(String keyPrefix) {
        log.debug("ShiroCache: new, keyPrefix = [" + keyPrefix + "]");
        this.keyPrefix = keyPrefix;
    }
    @Override
    public Serializable get(Object key) throws CacheException {
        if (key == null) {
            return null;
        }
        return cacheProxy.get(getKey(key));
    }
    @Override
    public Serializable put(Object key, Serializable value) throws CacheException {
        if (key == null) {
            return null;
        }
        cacheProxy.put(getKey(key), value);
        return value;
    }
    public Serializable put(Object key, Serializable value, int timeout) throws CacheException {
        if (key == null) {
            return null;
        }
        cacheProxy.put(getKey(key), value, timeout);
        return value;
    }
    @Override
    public void clear() throws CacheException {
        Set<Object> keys = this.keys();
        cacheProxy.remove(keys);
    }
    @Override
    public int size() {
        return this.keys().size();
    }
    @Override
    public Set<Object> keys() {
        Set<Object> keys = cacheProxy.keys(keyPrefix + "*");
        if (CollectionUtils.isEmpty(keys)) {
            return Collections.emptySet();
        }
        return keys;
    }
    @Override
    public Collection<Serializable> values() {
        Collection<Serializable> values = new ArrayList<>();
        Set<Object> keys = this.keys();
        if (CollectionUtils.isEmpty(keys)) {
            return values;
        }
        for (Object k : keys) {
            values.add(cacheProxy.get(k));
        }
        return values;
    }
    @Override
    public Serializable remove(Object key) throws CacheException {
        if (key == null) {
            return null;
        }
        Serializable value = this.get(getKey(key));
        cacheProxy.remove(getKey(key));
        return value;
    }
    private Object getKey (Object key) {
        return (key instanceof String ? (this.keyPrefix + key) : key);
    }
}
server/web/src/main/java/com/doumee/config/shiro/ShiroCacheManager.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
package com.doumee.config.shiro;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.apache.shiro.cache.CacheManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
/**
 * è‡ªå®šä¹‰Shiro CacheManager
 * @author Eva.Caesar Liu
 * @date 2023/03/21 14:49
 */
@Slf4j
@Component
public class ShiroCacheManager implements CacheManager {
    private final ConcurrentMap<String, Cache> caches = new ConcurrentHashMap();
    private static ApplicationContext applicationContext;
    @Override
    public <K, V> Cache<K, V> getCache(String name) throws CacheException {
        log.debug("get cache, name=" + name);
        Cache cache = this.caches.get(name);
        if (cache == null) {
            cache = applicationContext.getBean(ShiroCache.class, "shiro:cache:");
            this.caches.put(name, cache);
        }
        return cache;
    }
    @Autowired
    public void setApplicationContext (ApplicationContext applicationContext) {
        if (ShiroCacheManager.applicationContext == null) {
            ShiroCacheManager.applicationContext = applicationContext;
        }
    }
}
server/web/src/main/java/com/doumee/config/shiro/ShiroConfig.java
copy from server/src/main/java/com/doumee/config/shiro/ShiroConfig.java copy to server/web/src/main/java/com/doumee/config/shiro/ShiroConfig.java
Îļþ´Ó server/src/main/java/com/doumee/config/shiro/ShiroConfig.java ¸´ÖÆ
@@ -10,19 +10,16 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import javax.servlet.Filter;
import java.io.Serializable;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
/**
 * Shiro配置
 * @author Eva.Caesar Liu
 * @date 2023/04/17 12:11
 * @date 2023/03/21 14:49
 */
@Configuration
public class ShiroConfig {
@@ -42,20 +39,6 @@
    @Autowired
    private ShiroRealm shiroRealm;
    @Bean("sessionRedisTemplate")
    public RedisTemplate<Object, Serializable> sessionRedisTemplate(RedisConnectionFactory redisConnectionFactory) {
        RedisTemplate<Object, Serializable> redisTemplate = new RedisTemplate<>();
        redisTemplate.setConnectionFactory(redisConnectionFactory);
        // é»˜è®¤åºåˆ—化方式
        redisTemplate.setDefaultSerializer(new StringRedisSerializer());
        // å€¼åºåˆ—化方式
        ShiroSessionSerializer serializer = new ShiroSessionSerializer();
        redisTemplate.setValueSerializer(serializer);
        redisTemplate.setHashValueSerializer(serializer);
        redisTemplate.afterPropertiesSet();
        return redisTemplate;
    }
    @Bean
    public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator() {
        DefaultAdvisorAutoProxyCreator autoProxyCreator = new DefaultAdvisorAutoProxyCreator();
@@ -67,9 +50,6 @@
    public SessionManager sessionManager() {
        ShiroSessionManager sessionManager = new ShiroSessionManager();
        sessionManager.setSessionDAO(shiroSessionDAO);
        sessionManager.setGlobalSessionTimeout(sessionExpireTime*1000);
        // åˆ é™¤å¤±æ•ˆçš„session
        sessionManager.setDeleteInvalidSessions(true);
        return sessionManager;
    }
@@ -88,14 +68,12 @@
        shiroFilterFactoryBean.setSecurityManager(securityManager);
        Map<String, String> map = new LinkedHashMap<>();
        // è·¯å¾„拦截配置
        map.put("/web/user/login", "anon");
        map.put("/public/uploadRichText", "anon");
        map.put("/system/login", "anon");
        map.put("/system/logout", "anon");
        map.put("/common/captcha", "anon");
        //放行 scratch æŽ¥å£
        map.put("/web/scratch/**", "anon");
        map.put("/web/**", "anon");
        //文件上传取消拦截
        map.put("/public/**", "anon");
        // - æ”¾è¡Œswagger
        map.put("/doc.html", "anon");
        map.put("/webjars/**", "anon");
server/web/src/main/java/com/doumee/config/shiro/ShiroCredentialsMatcher.java
ÎļþÃû´Ó server/src/main/java/com/doumee/config/shiro/ShiroCredentialsMatcher.java ÐÞ¸Ä
@@ -15,7 +15,7 @@
/**
 * Shiro密码比对处理
 * @author Eva.Caesar Liu
 * @date 2023/04/17 12:11
 * @date 2023/03/21 14:49
 */
@Component
public class ShiroCredentialsMatcher extends HashedCredentialsMatcher {
server/web/src/main/java/com/doumee/config/shiro/ShiroRealm.java
copy from server/src/main/java/com/doumee/config/shiro/ShiroRealm.java copy to server/web/src/main/java/com/doumee/config/shiro/ShiroRealm.java
Îļþ´Ó server/src/main/java/com/doumee/config/shiro/ShiroRealm.java ¸´ÖÆ
@@ -1,6 +1,5 @@
package com.doumee.config.shiro;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.constants.Constants;
import com.doumee.core.model.LoginUserInfo;
import com.doumee.dao.system.model.SystemPermission;
@@ -9,7 +8,6 @@
import com.doumee.service.system.SystemPermissionService;
import com.doumee.service.system.SystemRoleService;
import com.doumee.service.system.SystemUserService;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
@@ -27,7 +25,7 @@
/**
 * è‡ªå®šä¹‰Realm,处理认证和权限
 * @author Eva.Caesar Liu
 * @date 2022/03/15 09:54
 * @date 2023/03/21 14:49
 */
@Component
public class ShiroRealm extends AuthorizingRealm {
@@ -39,9 +37,6 @@
    @Lazy
    @Autowired
    private SystemRoleService systemRoleService;
    @Lazy
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
    @Lazy
    @Autowired
@@ -50,7 +45,7 @@
    /**
     * æƒé™å¤„理
     * @author Eva.Caesar Liu
     * @date 2022/03/15 09:54
     * @date 2023/03/21 14:49
     */
    @Override
    protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
@@ -65,7 +60,7 @@
    /**
     * è®¤è¯å¤„理
     * @author Eva.Caesar Liu
     * @date 2022/03/15 09:54
     * @date 2023/03/21 14:49
     */
    @Override
    protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException {
@@ -79,12 +74,10 @@
        if (user == null) {
            return null;
        }
            // èŽ·å–ç™»å½•ç”¨æˆ·ä¿¡æ¯
        List<SystemRole>       roles = systemRoleService.findByUserId(user.getId());
        List<SystemPermission>     permissions = systemPermissionService.findByUserId(user.getId());
        String imgPath = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode()+systemDictDataBiz.queryByCode(Constants.FILES_DIR,Constants.AVATAR_FILE).getCode();
        LoginUserInfo userInfo = LoginUserInfo.from(user, imgPath,roles, permissions);
        // èŽ·å–ç™»å½•ç”¨æˆ·ä¿¡æ¯
        List<SystemRole> roles = systemRoleService.findByUserId(user.getId());
        List<SystemPermission> permissions = systemPermissionService.findByUserId(user.getId());
        LoginUserInfo userInfo = LoginUserInfo.from(user, roles, permissions);
        // éªŒè¯ç”¨æˆ·
        return new SimpleAuthenticationInfo(userInfo, user.getPassword(), this.getName());
    }
server/web/src/main/java/com/doumee/config/shiro/ShiroSessionDAO.java
ÎļþÃû´Ó server/src/main/java/com/doumee/config/shiro/ShiroSessionDAO.java ÐÞ¸Ä
@@ -10,12 +10,15 @@
import org.springframework.stereotype.Component;
import java.io.Serializable;
import java.util.*;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
/**
 * è‡ªå®šä¹‰Shiro SessionDAO,将会话信息存入缓存中
 * @author Eva.Caesar Liu
 * @date 2023/04/17 12:11
 * @date 2023/03/21 14:49
 */
@Data
@Slf4j
@@ -27,7 +30,7 @@
    @Autowired
    private ShiroCache shiroCache;
    private int expireTime = 60 * 60 * 3;
    private int expireTime = 1800;
    @Autowired
    private ShiroTokenManager shiroTokenManager;
server/web/src/main/java/com/doumee/config/shiro/ShiroSessionManager.java
copy from server/src/main/java/com/doumee/config/shiro/ShiroSessionManager.java copy to server/web/src/main/java/com/doumee/config/shiro/ShiroSessionManager.java
Îļþ´Ó server/src/main/java/com/doumee/config/shiro/ShiroSessionManager.java ¸´ÖÆ
@@ -19,7 +19,7 @@
/**
 * è‡ªå®šä¹‰ä¼šè¯ç®¡ç†å™¨
 * @author Eva.Caesar Liu
 * @date 2023/04/17 12:11
 * @date 2023/03/21 14:49
 */
@Slf4j
public class ShiroSessionManager extends DefaultSessionManager implements WebSessionManager {
server/web/src/main/java/com/doumee/config/shiro/ShiroTokenManager.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
package com.doumee.config.shiro;
import com.doumee.core.exception.UnSafeSessionException;
import org.springframework.stereotype.Component;
import java.util.UUID;
/**
 * é»˜è®¤Token管理器
 * @author Eva.Caesar Liu
 * @date 2023/03/21 14:49
 */
@Component
public class ShiroTokenManager {
    String build() {
        return UUID.randomUUID().toString();
    }
    void check(String token) throws UnSafeSessionException {
        if (token == null || token.length() != 36) {
            throw new UnSafeSessionException();
        }
    }
}
server/web/src/main/java/com/doumee/config/swagger/SwaggerConfig.java
copy from server/src/main/java/com/doumee/config/swagger/SwaggerConfig.java copy to server/web/src/main/java/com/doumee/config/swagger/SwaggerConfig.java
Îļþ´Ó server/src/main/java/com/doumee/config/swagger/SwaggerConfig.java ¸´ÖÆ
@@ -8,12 +8,17 @@
import org.springframework.context.annotation.Configuration;
import springfox.documentation.RequestHandler;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.service.Parameter;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.oas.annotations.EnableOpenApi;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
/**
@@ -46,32 +51,39 @@
                .version(version)
                .build();
    }
    @Bean
    public Docket getDocket() {
    public Docket getDocket3() {
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(this.getApiInfo()).groupName("【管理端接口API】")
                .apiInfo(this.getApiInfo()).groupName("【小程序接口API】")
                .host(host)
                .select()
                .apis( basePackage("com.doumee.api.system;com.doumee.api.business;"))
                .apis( basePackage("com.doumee.api.web"))
                // è®¾ç½®éœ€è¦è¢«æ‰«æçš„类,这里设置为添加了@Api注解的类
//                .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
                .paths(PathSelectors.any())
                .build();
                .build()
                .globalOperationParameters(this.getParameterList());
    }
    private List<Parameter> getParameterList() {
        ParameterBuilder tokenPar = new ParameterBuilder();
        List<Parameter> pars = new ArrayList<>();
        tokenPar.name("token").description("令牌").modelRef(new ModelRef("string")).defaultValue("设置token默认值").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
        pars.add(tokenPar.build());
        return  pars;
    }
    @Bean
    public Docket getDocket2() {
    public Docket getDocket1() {
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(this.getApiInfo()).groupName("【公共接口API】")
                .host(host)
                .select()
                .apis( basePackage("com.doumee.api.common"))
                // è®¾ç½®éœ€è¦è¢«æ‰«æçš„类,这里设置为添加了@Api注解的类
            .apiInfo(this.getApiInfo()).groupName("【公共接口API】")
            .host(host)
            .select()
            .apis( basePackage("com.doumee.api.common"))
            // è®¾ç½®éœ€è¦è¢«æ‰«æçš„类,这里设置为添加了@Api注解的类
//                .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
                .paths(PathSelectors.any())
                .build();
            .paths(PathSelectors.any())
            .build();
    }
    /**
     * é‡å†™basePackage方法,使能够实现多包访问,复制贴上去
server/web/src/main/java/com/doumee/config/swagger/SwaggerInterceptor.java
copy from server/src/main/java/com/doumee/config/swagger/SwaggerInterceptor.java copy to server/web/src/main/java/com/doumee/config/swagger/SwaggerInterceptor.java
Îļþ´Ó server/src/main/java/com/doumee/config/swagger/SwaggerInterceptor.java ¸´ÖÆ
@@ -1,4 +1,5 @@
package com.doumee.config.swagger;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
@@ -12,7 +13,7 @@
/**
 * Swagger拦截器
 * @author Eva.Caesar Liu
 * @date 2022/03/15 09:54
 * @date 2022/04/18 18:12
 */
@Slf4j
@Component
server/web/src/main/java/com/doumee/config/swagger/SwaggerInterceptorConfig.java
copy from server/src/main/java/com/doumee/config/swagger/SwaggerInterceptorConfig.java copy to server/web/src/main/java/com/doumee/config/swagger/SwaggerInterceptorConfig.java
Îļþ´Ó server/src/main/java/com/doumee/config/swagger/SwaggerInterceptorConfig.java ¸´ÖÆ
@@ -8,7 +8,7 @@
/**
 * Swagger拦截器配置
 * @author Eva.Caesar Liu
 * @date 2022/03/15 09:54
 * @date 2022/04/18 18:12
 */
@Configuration
public class SwaggerInterceptorConfig implements WebMvcConfigurer {
server/web/src/main/resources/application.yml
copy from server/src/main/resources/application.yml copy to server/web/src/main/resources/application.yml
Îļþ´Ó server/src/main/resources/application.yml ¸´ÖÆ
@@ -7,7 +7,7 @@
spring:
#  application:
#    name: tielangtou
#    name: parkbike
  profiles:
    active: dev
  # JSON返回配置
@@ -56,4 +56,8 @@
  # æŒ‡å®šä½¿ç”¨çš„æ•°æ®åº“数据库
  helperDialect: postgresql
  # reasonable:分页合理化参数,默认值为false。当该参数设置为 true æ—¶ï¼ŒpageNum<=0 æ—¶ä¼šæŸ¥è¯¢ç¬¬ä¸€é¡µï¼Œ         pageNum>pages(超过总数时),会查询最后一页。默认false æ—¶ï¼Œç›´æŽ¥æ ¹æ®å‚数进行查询。
  reasonable: true
  reasonable: true
  # WEB服务器配置
  server:
    port: 10013