├── web
└── src
│ └── main
│ ├── resources
│ ├── logo
│ │ └── logo.png
│ ├── static
│ │ ├── logo
│ │ │ └── logo.png
│ │ └── login.html
│ ├── application-dev.yml
│ ├── authentication.properties
│ └── banner.txt
│ └── java
│ └── com
│ └── lvyx
│ ├── config
│ ├── MybatisConfiguration.java
│ └── CORSConfiguration.java
│ ├── controller
│ ├── ResultErrorController.java
│ └── ExceptionController.java
│ ├── factory
│ └── MyExceptionFactory.java
│ └── CommunitySystemApplication.java
├── README.assets
├── image-20220520092400574.png
├── image-20220520092443256.png
├── image-20220520092500386.png
├── image-20220520095827473.png
├── image-20220520095847313.png
├── image-20220520095911506.png
├── image-20220520100032968.png
├── image-20220520100050022.png
└── image-20220520100110473.png
├── commons
├── src
│ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── lvyx
│ │ │ │ └── commons
│ │ │ │ ├── utils
│ │ │ │ ├── LQrCodeUtils.java
│ │ │ │ ├── ApplicationContextUtils.java
│ │ │ │ ├── CaptchaUtils.java
│ │ │ │ ├── LSerializeUtils.java
│ │ │ │ ├── ShiroUtils.java
│ │ │ │ └── BaseEntityUtil.java
│ │ │ │ ├── annotation
│ │ │ │ ├── service
│ │ │ │ │ ├── LogService.java
│ │ │ │ │ └── impl
│ │ │ │ │ │ └── LogServiceImpl.java
│ │ │ │ ├── mapper
│ │ │ │ │ └── LogMapper.java
│ │ │ │ ├── logger
│ │ │ │ │ └── LLogger.java
│ │ │ │ └── entity
│ │ │ │ │ └── Log.java
│ │ │ │ ├── pojo
│ │ │ │ ├── RoleVo.java
│ │ │ │ ├── QrCodeInfo.java
│ │ │ │ └── ShiroUser.java
│ │ │ │ ├── encrypt_decrypt
│ │ │ │ ├── LEncryptDecrypt.java
│ │ │ │ └── factory
│ │ │ │ │ ├── service
│ │ │ │ │ ├── LEncryptDecryptService.java
│ │ │ │ │ └── impl
│ │ │ │ │ │ ├── RSAEncryptDecryptServiceImpl.java
│ │ │ │ │ │ └── AESEncryptDecryptServiceImpl.java
│ │ │ │ │ └── LEncryptDecryptFactory.java
│ │ │ │ ├── config
│ │ │ │ ├── CommunityProperties.java
│ │ │ │ ├── SysRedisProperties.java
│ │ │ │ ├── SystemProperties.java
│ │ │ │ └── SysRedisConfig.java
│ │ │ │ ├── exception
│ │ │ │ ├── LException.java
│ │ │ │ ├── LMailException.java
│ │ │ │ └── LExceException.java
│ │ │ │ ├── enums
│ │ │ │ ├── CaptchaNameEnum.java
│ │ │ │ ├── ResourceTypeEnum.java
│ │ │ │ ├── ShiroTokenEnum.java
│ │ │ │ ├── ResultEnum.java
│ │ │ │ ├── SexTypeEnum.java
│ │ │ │ ├── BooleanTypeEnum.java
│ │ │ │ ├── ExamineStatusEnum.java
│ │ │ │ ├── ExceptionTypeEnum.java
│ │ │ │ ├── QrCodeColorEnum.java
│ │ │ │ ├── AddressStatusEnum.java
│ │ │ │ ├── SystemCacheEnum.java
│ │ │ │ ├── ShiroResultEnum.java
│ │ │ │ ├── UserTypeEnum.java
│ │ │ │ ├── ResultCodeEnum.java
│ │ │ │ ├── ShiroEnum.java
│ │ │ │ ├── RoleTypeEnum.java
│ │ │ │ └── ShiroCacheEnum.java
│ │ │ │ ├── QrCodeFactory
│ │ │ │ ├── QrCodeBase.java
│ │ │ │ ├── GreenQrCode.java
│ │ │ │ ├── GrayQrCode.java
│ │ │ │ ├── RedQrCode.java
│ │ │ │ ├── QrCodeFactory.java
│ │ │ │ └── YellowQrCode.java
│ │ │ │ ├── result
│ │ │ │ ├── impl
│ │ │ │ │ ├── ErrorResult.java
│ │ │ │ │ └── SuccessResult.java
│ │ │ │ └── Result.java
│ │ │ │ └── CommonsUrls.java
│ │ └── resources
│ │ │ └── mapper
│ │ │ └── annotation
│ │ │ └── LogMapper.xml
│ └── test
│ │ └── java
│ │ └── com
│ │ └── lvyx
│ │ └── commons
│ │ └── AESTest.java
└── pom.xml
├── community
├── src
│ └── main
│ │ ├── resources
│ │ └── mapper
│ │ │ ├── CommunityLayerMapper.xml
│ │ │ ├── CommunityInAndOutMapper.xml
│ │ │ ├── CommunityBuildingMapper.xml
│ │ │ ├── CommunityTemperatureRegistrationMapper.xml
│ │ │ ├── CommunityHouseholdMapper.xml
│ │ │ ├── CommunityGreyCodeMapper.xml
│ │ │ ├── CommunityRedCodeMapper.xml
│ │ │ ├── CommunityGreenCodeMapper.xml
│ │ │ ├── CommunityYellowCodeMapper.xml
│ │ │ └── CommunityExceptionMapper.xml
│ │ └── java
│ │ └── com
│ │ └── lvyx
│ │ └── community
│ │ ├── mapper
│ │ ├── CommunityLayerMapper.java
│ │ ├── CommunityInAndOutMapper.java
│ │ ├── CommunityBuildingMapper.java
│ │ ├── CommunityTemperatureRegistrationMapper.java
│ │ ├── CommunityRedCodeMapper.java
│ │ ├── CommunityGreyCodeMapper.java
│ │ ├── CommunityYellowCodeMapper.java
│ │ ├── CommunityGreenCodeMapper.java
│ │ ├── CommunityHouseholdMapper.java
│ │ ├── CommunityExceptionMapper.java
│ │ ├── CommunityUnitMapper.java
│ │ ├── CommunityHouseholdUserMapper.java
│ │ └── CommunityPeriodMapper.java
│ │ ├── controller
│ │ ├── CommunityGreyCodeController.java
│ │ ├── CommunityRedCodeController.java
│ │ ├── CommunityGreenCodeController.java
│ │ ├── CommunityYellowCodeController.java
│ │ └── CommunityInAndOutController.java
│ │ ├── vo
│ │ ├── HouseholdUserVo.java
│ │ ├── UserHouseholdVo.java
│ │ ├── PeriodVo.java
│ │ ├── ComprehensiveVo.java
│ │ ├── CascadeVo.java
│ │ ├── UnitVo.java
│ │ ├── BuildingVo.java
│ │ ├── LayerVo.java
│ │ ├── HouseholdVo.java
│ │ ├── PeriodInfoVo.java
│ │ ├── InfoVo.java
│ │ ├── AddressVo.java
│ │ └── ExceptionVo.java
│ │ ├── bo
│ │ ├── QueryExceptionBo.java
│ │ └── QueryUserHouseholdBo.java
│ │ ├── service
│ │ ├── CommunityInAndOutService.java
│ │ ├── CommunityLayerService.java
│ │ ├── CommunityHouseholdService.java
│ │ ├── CommunityGreyCodeService.java
│ │ ├── CommunityRedCodeService.java
│ │ ├── CommunityYellowCodeService.java
│ │ ├── CommunityUnitService.java
│ │ ├── CommunityExceptionService.java
│ │ ├── CommunityBuildingService.java
│ │ ├── CommunityTemperatureRegistrationService.java
│ │ └── impl
│ │ │ └── CommunityLayerServiceImpl.java
│ │ └── entity
│ │ ├── CommunityPeriod.java
│ │ ├── CommunityLayer.java
│ │ ├── CommunityUnit.java
│ │ ├── CommunityBuilding.java
│ │ └── CommunityHousehold.java
└── pom.xml
├── author
├── src
│ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── lvyx
│ │ │ └── author
│ │ │ ├── controller
│ │ │ ├── ResourceController.java
│ │ │ ├── UserRoleController.java
│ │ │ └── RoleResourceController.java
│ │ │ ├── shiro
│ │ │ ├── config
│ │ │ │ ├── ShiroProperties.java
│ │ │ │ ├── JWTProperties.java
│ │ │ │ └── ShiroRedisProperties.java
│ │ │ ├── utils
│ │ │ │ ├── ShiroUserUtils.java
│ │ │ │ └── PropertiesUtil.java
│ │ │ ├── pojo
│ │ │ │ └── SimpleToken.java
│ │ │ ├── core
│ │ │ │ ├── ShiroDbRealm.java
│ │ │ │ └── impl
│ │ │ │ │ └── ShiroSessionManager.java
│ │ │ ├── cache
│ │ │ │ └── service
│ │ │ │ │ └── SimpleMapCacheService.java
│ │ │ ├── filter
│ │ │ │ ├── JwtRolesFilter.java
│ │ │ │ └── JwtPermsFilter.java
│ │ │ └── bridge
│ │ │ │ └── UserBridgeService.java
│ │ │ ├── vo
│ │ │ ├── CommunityResourceVo.java
│ │ │ ├── LoginInfoVO.java
│ │ │ └── CommunityRoleVo.java
│ │ │ ├── mapper
│ │ │ ├── UserRoleMapper.java
│ │ │ ├── UserMapper.java
│ │ │ ├── ResourceMapper.java
│ │ │ ├── RoleResourceMapper.java
│ │ │ └── RoleMapper.java
│ │ │ ├── bo
│ │ │ ├── AddRoleBo.java
│ │ │ ├── QueryUserListBo.java
│ │ │ ├── LoginBO.java
│ │ │ ├── QueryUserBo.java
│ │ │ └── RegisterBO.java
│ │ │ ├── service
│ │ │ ├── RoleResourceService.java
│ │ │ ├── ResourceService.java
│ │ │ └── UserRoleService.java
│ │ │ └── entity
│ │ │ ├── UserRole.java
│ │ │ ├── RoleResource.java
│ │ │ └── Role.java
│ │ └── resources
│ │ └── mapper
│ │ ├── UserRoleMapper.xml
│ │ ├── ResourceMapper.xml
│ │ └── RoleResourceMapper.xml
└── pom.xml
└── mail
├── src
└── main
│ ├── java
│ └── com
│ │ └── lvyx
│ │ └── mail
│ │ ├── controller
│ │ └── CommunityMessageEmailController.java
│ │ ├── vo
│ │ ├── UserMessageVo.java
│ │ └── MessageVo.java
│ │ ├── mapper
│ │ ├── CommunityMessageMapper.java
│ │ └── CommunityMessageEmailMapper.java
│ │ ├── MailUrls.java
│ │ ├── service
│ │ ├── CommunityMessageEmailService.java
│ │ ├── CommunityMessageService.java
│ │ └── impl
│ │ │ └── CommunityMessageEmailServiceImpl.java
│ │ ├── bo
│ │ └── BaseSenderMessageBo.java
│ │ └── entity
│ │ └── CommunityMessage.java
│ └── resources
│ └── mapper
│ ├── CommunityMessageEmailMapper.xml
│ └── CommunityMessageMapper.xml
└── pom.xml
/web/src/main/resources/logo/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvyuanx/CommunitySystem/HEAD/web/src/main/resources/logo/logo.png
--------------------------------------------------------------------------------
/README.assets/image-20220520092400574.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvyuanx/CommunitySystem/HEAD/README.assets/image-20220520092400574.png
--------------------------------------------------------------------------------
/README.assets/image-20220520092443256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvyuanx/CommunitySystem/HEAD/README.assets/image-20220520092443256.png
--------------------------------------------------------------------------------
/README.assets/image-20220520092500386.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvyuanx/CommunitySystem/HEAD/README.assets/image-20220520092500386.png
--------------------------------------------------------------------------------
/README.assets/image-20220520095827473.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvyuanx/CommunitySystem/HEAD/README.assets/image-20220520095827473.png
--------------------------------------------------------------------------------
/README.assets/image-20220520095847313.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvyuanx/CommunitySystem/HEAD/README.assets/image-20220520095847313.png
--------------------------------------------------------------------------------
/README.assets/image-20220520095911506.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvyuanx/CommunitySystem/HEAD/README.assets/image-20220520095911506.png
--------------------------------------------------------------------------------
/README.assets/image-20220520100032968.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvyuanx/CommunitySystem/HEAD/README.assets/image-20220520100032968.png
--------------------------------------------------------------------------------
/README.assets/image-20220520100050022.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvyuanx/CommunitySystem/HEAD/README.assets/image-20220520100050022.png
--------------------------------------------------------------------------------
/README.assets/image-20220520100110473.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvyuanx/CommunitySystem/HEAD/README.assets/image-20220520100110473.png
--------------------------------------------------------------------------------
/web/src/main/resources/static/logo/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lvyuanx/CommunitySystem/HEAD/web/src/main/resources/static/logo/logo.png
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/utils/LQrCodeUtils.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.utils;
2 |
3 | /**
4 | *
5 | * 二维码生成工具类
6 | *
7 | *
8 | * @author lvyx
9 | * @since 2022-04-05 21:27:46
10 | */
11 | public class LQrCodeUtils {
12 |
13 |
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/commons/src/main/resources/mapper/annotation/LogMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/community/src/main/resources/mapper/CommunityLayerMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/community/src/main/resources/mapper/CommunityInAndOutMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/community/src/main/resources/mapper/CommunityBuildingMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/community/src/main/resources/mapper/CommunityTemperatureRegistrationMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/web/src/main/java/com/lvyx/config/MybatisConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 |
5 | /**
6 | *
7 | * mybatis配置
8 | *
9 | *
10 | * @author lvyx
11 | * @since 2022-02-07 13:57:13
12 | */
13 | @Configuration
14 | public class MybatisConfiguration {
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/annotation/service/LogService.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.annotation.service;
2 |
3 | import com.lvyx.commons.annotation.entity.Log;
4 | import com.baomidou.mybatisplus.extension.service.IService;
5 |
6 | /**
7 | *
8 | * 日志表 服务类
9 | *
10 | *
11 | * @author lvyx
12 | * @since 2021-12-23
13 | */
14 | public interface LogService extends IService {
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/web/src/main/resources/application-dev.yml:
--------------------------------------------------------------------------------
1 | lvyx:
2 | system:
3 | active: "test"
4 | file-path: "D:/CommunitySystem"
5 | spring:
6 | datasource:
7 | url: jdbc:mysql://localhost:3306/l_community?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
8 | username: root
9 | password: root
10 | driver-class-name: com.mysql.cj.jdbc.Driver
11 | type: com.alibaba.druid.pool.DruidDataSource
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/controller/ResourceController.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.controller;
2 |
3 |
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 |
6 | import org.springframework.web.bind.annotation.RestController;
7 |
8 | /**
9 | *
10 | * 资源表 前端控制器
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2021-12-23
15 | */
16 | @RestController
17 | @RequestMapping("/resource")
18 | public class ResourceController {
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/controller/UserRoleController.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.controller;
2 |
3 |
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 |
6 | import org.springframework.web.bind.annotation.RestController;
7 |
8 | /**
9 | *
10 | * 用户角色关联表 前端控制器
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2021-12-23
15 | */
16 | @RestController
17 | @RequestMapping("/user-role")
18 | public class UserRoleController {
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/annotation/mapper/LogMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.annotation.mapper;
2 |
3 | import com.lvyx.commons.annotation.entity.Log;
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * 日志表 Mapper 接口
10 | *
11 | *
12 | * @author lvyx
13 | * @since 2021-12-23
14 | */
15 | @Mapper
16 | public interface LogMapper extends BaseMapper {
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/controller/RoleResourceController.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.controller;
2 |
3 |
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 |
6 | import org.springframework.web.bind.annotation.RestController;
7 |
8 | /**
9 | *
10 | * 角色资源关联表 前端控制器
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2021-12-23
15 | */
16 | @RestController
17 | @RequestMapping("/role-resource")
18 | public class RoleResourceController {
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/mapper/CommunityLayerMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.mapper;
2 |
3 | import com.lvyx.community.entity.CommunityLayer;
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * 小区-层 Mapper 接口
10 | *
11 | *
12 | * @author lvyx
13 | * @since 2022-02-01
14 | */
15 | @Mapper
16 | public interface CommunityLayerMapper extends BaseMapper {
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/controller/CommunityGreyCodeController.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.controller;
2 |
3 |
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 |
6 | import org.springframework.web.bind.annotation.RestController;
7 |
8 | /**
9 | *
10 | * 灰码用户关联表 前端控制器
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-02-13
15 | */
16 | @RestController
17 | @RequestMapping("/community-grey-code")
18 | public class CommunityGreyCodeController {
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/controller/CommunityRedCodeController.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.controller;
2 |
3 |
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 |
6 | import org.springframework.web.bind.annotation.RestController;
7 |
8 | /**
9 | *
10 | * 红码用户关联表 前端控制器
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-02-13
15 | */
16 | @RestController
17 | @RequestMapping("/community-red-code")
18 | public class CommunityRedCodeController {
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/mapper/CommunityInAndOutMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.mapper;
2 |
3 | import com.lvyx.community.entity.CommunityInAndOut;
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * 小区-进出登记表 Mapper 接口
10 | *
11 | *
12 | * @author lvyx
13 | * @since 2022-02-13
14 | */
15 | @Mapper
16 | public interface CommunityInAndOutMapper extends BaseMapper {
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/mail/src/main/java/com/lvyx/mail/controller/CommunityMessageEmailController.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.mail.controller;
2 |
3 |
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 |
6 | import org.springframework.web.bind.annotation.RestController;
7 |
8 | /**
9 | *
10 | * 社区邮件信息表 前端控制器
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-05-01
15 | */
16 | @RestController
17 | @RequestMapping("/community-message-email")
18 | public class CommunityMessageEmailController {
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/controller/CommunityGreenCodeController.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.controller;
2 |
3 |
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 |
6 | import org.springframework.web.bind.annotation.RestController;
7 |
8 | /**
9 | *
10 | * 绿码用户关联表 前端控制器
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-02-13
15 | */
16 | @RestController
17 | @RequestMapping("/community-green-code")
18 | public class CommunityGreenCodeController {
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/controller/CommunityYellowCodeController.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.controller;
2 |
3 |
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 |
6 | import org.springframework.web.bind.annotation.RestController;
7 |
8 | /**
9 | *
10 | * 黄码用户关联表 前端控制器
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-03-20
15 | */
16 | @RestController
17 | @RequestMapping("/community-yellow-code")
18 | public class CommunityYellowCodeController {
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/mapper/CommunityBuildingMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.mapper;
2 |
3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 | import com.lvyx.community.entity.CommunityBuilding;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * 小区-栋 Mapper 接口
10 | *
11 | *
12 | * @author lvyx
13 | * @since 2022-02-01
14 | */
15 | @Mapper
16 | public interface CommunityBuildingMapper extends BaseMapper {
17 |
18 |
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/mapper/CommunityTemperatureRegistrationMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.mapper;
2 |
3 | import com.lvyx.community.entity.CommunityTemperatureRegistration;
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 |
7 | /**
8 | *
9 | * 小区-体温登记表 Mapper 接口
10 | *
11 | *
12 | * @author lvyx
13 | * @since 2022-02-13
14 | */
15 | @Mapper
16 | public interface CommunityTemperatureRegistrationMapper extends BaseMapper {
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/mapper/CommunityRedCodeMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.mapper;
2 |
3 | import com.lvyx.community.entity.CommunityRedCode;
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 | import org.apache.ibatis.annotations.Param;
7 |
8 | /**
9 | *
10 | * 红码用户关联表 Mapper 接口
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-02-13
15 | */
16 | @Mapper
17 | public interface CommunityRedCodeMapper extends BaseMapper {
18 | int selectCountByUintId(@Param("unitId") String unitId);
19 | }
20 |
--------------------------------------------------------------------------------
/mail/src/main/java/com/lvyx/mail/vo/UserMessageVo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.mail.vo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import java.io.Serializable;
7 |
8 | /**
9 | *
10 | * 用户邮件信息vo
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-05-01 15:26:45
15 | */
16 | @Data
17 | public class UserMessageVo implements Serializable {
18 |
19 | @ApiModelProperty("用户id")
20 | private String userId;
21 |
22 | @ApiModelProperty("用户邮件地址")
23 | private String email;
24 |
25 | @ApiModelProperty("用户真实姓名")
26 | private String realName;
27 | }
28 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/mapper/CommunityGreyCodeMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.mapper;
2 |
3 | import com.lvyx.community.entity.CommunityGreyCode;
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 | import org.apache.ibatis.annotations.Param;
7 |
8 | /**
9 | *
10 | * 灰码用户关联表 Mapper 接口
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-02-13
15 | */
16 | @Mapper
17 | public interface CommunityGreyCodeMapper extends BaseMapper {
18 | int selectCountByUintId(@Param("unitId") String unitId);
19 | }
20 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/mapper/CommunityYellowCodeMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.mapper;
2 |
3 | import com.lvyx.community.entity.CommunityYellowCode;
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 | import org.apache.ibatis.annotations.Param;
7 |
8 | /**
9 | *
10 | * 黄码用户关联表 Mapper 接口
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-03-20
15 | */
16 | @Mapper
17 | public interface CommunityYellowCodeMapper extends BaseMapper {
18 | int selectCountByUintId(@Param("unitId") String unitId);
19 | }
20 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/shiro/config/ShiroProperties.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.shiro.config;
2 |
3 | import lombok.Data;
4 | import org.springframework.boot.context.properties.ConfigurationProperties;
5 | import org.springframework.stereotype.Component;
6 |
7 | /**
8 | *
9 | * shiro配置类
10 | *
11 | *
12 | * @author lvyx
13 | * @since 2022-01-13 14:22:54
14 | */
15 | @Data
16 | @Component
17 | @ConfigurationProperties(prefix = "lvyx.shiro")
18 | public class ShiroProperties {
19 |
20 | /**
21 | * 在线人数
22 | * @since 2022/1/13 14:24
23 | **/
24 | private Integer online = 1;
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/vo/CommunityResourceVo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.vo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import java.io.Serializable;
7 |
8 | /**
9 | *
10 | * 社区资源vo
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-05-05 00:49:41
15 | */
16 | @Data
17 | public class CommunityResourceVo implements Serializable {
18 |
19 | @ApiModelProperty("资源id")
20 | private String resourceId;
21 |
22 | @ApiModelProperty("社区期id")
23 | private String parentId;
24 |
25 | @ApiModelProperty("社区期名称")
26 | private String periodName;
27 | }
28 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/mapper/CommunityGreenCodeMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.mapper;
2 |
3 | import com.lvyx.community.entity.CommunityGreenCode;
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 | import org.apache.ibatis.annotations.Param;
7 |
8 | /**
9 | *
10 | * 绿码用户关联表 Mapper 接口
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-02-13
15 | */
16 | @Mapper
17 | public interface CommunityGreenCodeMapper extends BaseMapper {
18 |
19 | int selectCountByUintId(@Param("unitId") String unitId);
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/mapper/CommunityHouseholdMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.mapper;
2 |
3 | import com.lvyx.community.entity.CommunityHousehold;
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 | import org.apache.ibatis.annotations.Param;
7 |
8 | /**
9 | *
10 | * 小区-户 Mapper 接口
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-02-01
15 | */
16 | @Mapper
17 | public interface CommunityHouseholdMapper extends BaseMapper {
18 |
19 | String findPeriodIByHouseholdId(@Param("householdId") String householdId);
20 | }
21 |
--------------------------------------------------------------------------------
/mail/src/main/resources/mapper/CommunityMessageEmailMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
13 |
14 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/mapper/UserRoleMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.mapper;
2 |
3 | import com.lvyx.author.entity.UserRole;
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 | import org.apache.ibatis.annotations.Param;
7 |
8 | import java.util.List;
9 |
10 | /**
11 | *
12 | * 用户角色关联表 Mapper 接口
13 | *
14 | *
15 | * @author lvyx
16 | * @since 2021-12-23
17 | */
18 | @Mapper
19 | public interface UserRoleMapper extends BaseMapper {
20 |
21 | List findUserRole(@Param("userId") String userId, @Param("label") String label);
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/annotation/service/impl/LogServiceImpl.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.annotation.service.impl;
2 |
3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4 | import com.lvyx.commons.annotation.entity.Log;
5 | import com.lvyx.commons.annotation.mapper.LogMapper;
6 | import com.lvyx.commons.annotation.service.LogService;
7 | import org.springframework.stereotype.Service;
8 |
9 | /**
10 | *
11 | * 日志表 服务实现类
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2021-12-23
16 | */
17 | @Service
18 | public class LogServiceImpl extends ServiceImpl implements LogService {
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/web/src/main/java/com/lvyx/controller/ResultErrorController.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.controller;
2 |
3 | import com.lvyx.commons.result.Result;
4 | import org.apache.shiro.authz.AuthorizationException;
5 | import org.springframework.web.bind.annotation.RequestMapping;
6 | import org.springframework.web.bind.annotation.RestController;
7 |
8 | /**
9 | *
10 | * 返回异常控制器
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2021-12-28 16:16:08
15 | */
16 | @RestController
17 | public class ResultErrorController {
18 |
19 | @RequestMapping("/shiroError")
20 | public void error(){
21 | throw new AuthorizationException();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/web/src/main/resources/static/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 登录
6 |
7 |
8 |
9 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/bo/AddRoleBo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.bo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import java.util.List;
7 |
8 | /**
9 | *
10 | * 添加管理角色Bo
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-05-04 23:29:33
15 | */
16 | @Data
17 | public class AddRoleBo {
18 |
19 | @ApiModelProperty("角色id")
20 | private String roleId;
21 |
22 | @ApiModelProperty("角色名称")
23 | private String roleName;
24 |
25 | @ApiModelProperty("角色描述")
26 | private String description;
27 |
28 | @ApiModelProperty("期id")
29 | private List periodIds;
30 | }
31 |
--------------------------------------------------------------------------------
/author/src/main/resources/mapper/UserRoleMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/pojo/RoleVo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.pojo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import java.io.Serializable;
7 |
8 | /**
9 | *
10 | * 角色vo
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-02-06 16:09:04
15 | */
16 | @Data
17 | public class RoleVo implements Serializable {
18 |
19 | @ApiModelProperty("主键")
20 | private String id;
21 |
22 | @ApiModelProperty("角色名称")
23 | private String roleName;
24 |
25 | @ApiModelProperty("角色标识")
26 | private String label;
27 |
28 | @ApiModelProperty("角色描述")
29 | private String description;
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/vo/HouseholdUserVo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.vo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import java.io.Serializable;
7 |
8 | /**
9 | *
10 | * 居民VO
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-02-06 16:09:04
15 | */
16 | @Data
17 | public class HouseholdUserVo implements Serializable {
18 |
19 | @ApiModelProperty("主键")
20 | private String id;
21 |
22 | @ApiModelProperty("户Id")
23 | private String householdId;
24 |
25 | @ApiModelProperty("用户")
26 | private String userId;
27 |
28 | @ApiModelProperty("排序")
29 | private Integer sortNo;
30 | }
31 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/vo/UserHouseholdVo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.vo;
2 |
3 | import com.lvyx.commons.pojo.ShiroUser;
4 | import io.swagger.annotations.ApiModelProperty;
5 | import lombok.Data;
6 | import lombok.EqualsAndHashCode;
7 |
8 | import java.io.Serializable;
9 |
10 | /**
11 | *
12 | * 用户房间信息
13 | *
14 | *
15 | * @author lvyx
16 | * @since 2022-04-25 21:38:17
17 | */
18 | @EqualsAndHashCode(callSuper = true)
19 | @Data
20 | public class UserHouseholdVo extends AddressVo implements Serializable {
21 |
22 | @ApiModelProperty("用户信息")
23 | private ShiroUser user;
24 |
25 | @ApiModelProperty("人员类型")
26 | private String roleTypeName;
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/vo/PeriodVo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.vo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import java.io.Serializable;
7 | import java.util.List;
8 |
9 | /**
10 | *
11 | * 期VO
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2022-02-06 16:09:04
16 | */
17 | @Data
18 | public class PeriodVo implements Serializable {
19 |
20 | @ApiModelProperty("主键")
21 | private String id;
22 |
23 | @ApiModelProperty("第几期")
24 | private String periodNumber;
25 |
26 | @ApiModelProperty("排序")
27 | private Integer sortNo;
28 |
29 | @ApiModelProperty("栋")
30 | private List buildingVoList;
31 | }
32 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/vo/LoginInfoVO.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.vo;
2 |
3 |
4 | import com.lvyx.commons.pojo.ShiroUser;
5 | import io.swagger.annotations.ApiModel;
6 | import io.swagger.annotations.ApiModelProperty;
7 | import lombok.Data;
8 |
9 | import java.io.Serializable;
10 |
11 | /**
12 | *
13 | * 登录信息返回结果封装
14 | *
15 | *
16 | * @author lvyx
17 | * @since 2022-01-15 17:40:07
18 | */
19 | @ApiModel(value="LogInfoVO对象", description="登录用户数据")
20 | @Data
21 | public class LoginInfoVO implements Serializable {
22 |
23 |
24 | @ApiModelProperty("登录token的id")
25 | private String token;
26 |
27 |
28 | @ApiModelProperty("登录的用户信息")
29 | private ShiroUser shiroUser;
30 |
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/mapper/UserMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.mapper;
2 |
3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 | import com.lvyx.author.bo.QueryUserListBo;
5 | import com.lvyx.author.entity.User;
6 | import com.lvyx.community.vo.UserHouseholdVo;
7 | import org.apache.ibatis.annotations.Mapper;
8 | import org.apache.ibatis.annotations.Param;
9 |
10 | import java.util.List;
11 |
12 | /**
13 | *
14 | * 用户表 Mapper 接口
15 | *
16 | *
17 | * @author lvyx
18 | * @since 2021-12-23
19 | */
20 | @Mapper
21 | public interface UserMapper extends BaseMapper {
22 |
23 | List listByUser(@Param("user") User user);
24 |
25 | List findUserList(QueryUserListBo user);
26 | }
27 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/encrypt_decrypt/LEncryptDecrypt.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.encrypt_decrypt;
2 |
3 | import java.lang.annotation.*;
4 |
5 | /**
6 | * 自动加密解密注解
7 | * @author lvyx
8 | * @since 2021/12/9 19:10
9 | **/
10 | @Documented
11 | @Inherited
12 | @Target({ ElementType.TYPE,ElementType.FIELD })
13 | @Retention(RetentionPolicy.RUNTIME)
14 | public @interface LEncryptDecrypt {
15 |
16 | /**
17 | * 加密
18 | * @return boolean
19 | * @author lvyx
20 | * @since 2021/12/9 19:52
21 | **/
22 | boolean encrypt() default true;
23 |
24 | /**
25 | * 解密
26 | * @return boolean
27 | * @author lvyx
28 | * @since 2021/12/9 19:53
29 | **/
30 | boolean dencrypt() default true;
31 | }
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/config/CommunityProperties.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.config;
2 |
3 | import lombok.Data;
4 | import org.springframework.boot.context.properties.ConfigurationProperties;
5 | import org.springframework.stereotype.Component;
6 |
7 | /**
8 | *
9 | * 社区配置类
10 | *
11 | *
12 | * @author lvyx
13 | * @since 2022-04-28 14:23:05
14 | */
15 | @Component
16 | @ConfigurationProperties(
17 | prefix = "lvyx.community"
18 | )
19 | @Data
20 | public class CommunityProperties {
21 |
22 | /**
23 | * 异常体温
24 | */
25 | private String abnormalBodyTemperature = "37.5";
26 |
27 | /**
28 | * 连续健康天数节点(超过此节点,则认为是健康)
29 | */
30 | private Integer consecutiveDays = 7;
31 |
32 |
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/vo/ComprehensiveVo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.vo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import java.io.Serializable;
7 | import java.util.List;
8 |
9 | /**
10 | *
11 | * 综合信息VO
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2022-02-06 16:09:04
16 | */
17 | @Data
18 | public class ComprehensiveVo implements Serializable {
19 |
20 |
21 | @ApiModelProperty("栋id")
22 | private String buildingId;
23 |
24 | @ApiModelProperty("栋名称")
25 | private String buildingNumber;
26 |
27 | @ApiModelProperty("栋名称")
28 | private Integer sortNo;
29 |
30 | @ApiModelProperty("户信息")
31 | private List unitVoList;
32 |
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/vo/CascadeVo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.vo;
2 |
3 | import io.swagger.annotations.ApiModel;
4 | import io.swagger.annotations.ApiModelProperty;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | /**
10 | *
11 | * 级联选择结构
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2022-02-08 06:00:13
16 | */
17 | @Data
18 | @ApiModel(value = "CascadeVo对象", description = "级联选择对象")
19 | public class CascadeVo {
20 |
21 | @ApiModelProperty("显示内容")
22 | private String text;
23 |
24 | @ApiModelProperty("内容ID")
25 | private String value;
26 |
27 | @ApiModelProperty("排序")
28 | private String sortNo;
29 |
30 | @ApiModelProperty("下级结构")
31 | private List children;
32 | }
33 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/encrypt_decrypt/factory/service/LEncryptDecryptService.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.encrypt_decrypt.factory.service;
2 |
3 | /**
4 | *
5 | * RSA加密解密服务
6 | *
7 | *
8 | * @author lvyx
9 | * @since 2021-12-10 13:20:32
10 | */
11 | public interface LEncryptDecryptService {
12 |
13 | /**
14 | * 加密
15 | * @param content 被加密字符串
16 | * @return java.lang.String 加密后字符串
17 | * @author lvyx
18 | * @since 2021/12/10 13:24
19 | **/
20 | String encrypt(String content);
21 |
22 | /**
23 | * 解密
24 | * @param content 加密的字符串
25 | * @return java.lang.String 原字符串
26 | * @author lvyx
27 | * @since 2021/12/10 13:25
28 | **/
29 | String decrypt(String content);
30 | }
31 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/vo/UnitVo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.vo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import java.io.Serializable;
7 | import java.util.List;
8 |
9 | /**
10 | *
11 | * 单元VO
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2022-02-06 16:09:04
16 | */
17 | @Data
18 | public class UnitVo implements Serializable {
19 |
20 | @ApiModelProperty("主键")
21 | private String id;
22 |
23 | @ApiModelProperty("栋Id")
24 | private String buildingId;
25 |
26 | @ApiModelProperty("单元")
27 | private String unitNumber;
28 |
29 | @ApiModelProperty("排序")
30 | private Integer sortNo;
31 |
32 | @ApiModelProperty("层")
33 | private List layerVoList;
34 | }
35 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/bo/QueryExceptionBo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.bo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import java.io.Serializable;
7 | import java.util.List;
8 |
9 | /**
10 | *
11 | * 查询异常请求参数封装
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2022-05-02 15:03:50
16 | */
17 | @Data
18 | public class QueryExceptionBo implements Serializable {
19 |
20 | @ApiModelProperty("用户名称")
21 | private String userName;
22 |
23 | @ApiModelProperty("异常状态(0:未开始,1:处理中,2:已结束)")
24 | private Integer status;
25 |
26 | @ApiModelProperty("异常类型(0:体温异常,1:其他异常)")
27 | private Integer exceptionType;
28 |
29 | @ApiModelProperty("期主键")
30 | private List periodIds;
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/mail/src/main/java/com/lvyx/mail/mapper/CommunityMessageMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.mail.mapper;
2 |
3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 | import com.lvyx.mail.entity.CommunityMessage;
5 | import com.lvyx.mail.vo.MessageVo;
6 | import org.apache.ibatis.annotations.Mapper;
7 | import org.apache.ibatis.annotations.Param;
8 |
9 | import java.util.List;
10 |
11 | /**
12 | *
13 | * 社区消息 Mapper 接口
14 | *
15 | *
16 | * @author lvyx
17 | * @since 2022-04-30
18 | */
19 | @Mapper
20 | public interface CommunityMessageMapper extends BaseMapper {
21 |
22 | List findListMessageVo(@Param("userId") String userId, @Param("isEmail") Integer isEmail, @Param("isEnable") Integer isEnable, @Param("title") String title);
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/vo/BuildingVo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.vo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import java.io.Serializable;
7 | import java.util.List;
8 |
9 | /**
10 | *
11 | * 栋VO
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2022-02-06 16:09:04
16 | */
17 | @Data
18 | public class BuildingVo implements Serializable {
19 |
20 | @ApiModelProperty("主键")
21 | private String id;
22 |
23 | @ApiModelProperty("期Id")
24 | private String periodId;
25 |
26 | @ApiModelProperty("第几栋")
27 | private String buildingNumber;
28 |
29 | @ApiModelProperty("排序")
30 | private Integer sortNo;
31 |
32 | @ApiModelProperty("单元")
33 | private List unitVoList;
34 | }
35 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/vo/LayerVo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.vo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import java.io.Serializable;
7 | import java.util.List;
8 |
9 | /**
10 | *
11 | * 层VO
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2022-02-06 16:09:04
16 | */
17 | @Data
18 | public class LayerVo implements Serializable {
19 |
20 | @ApiModelProperty("主键")
21 | private String id;
22 |
23 | @ApiModelProperty("单元Id")
24 | private String unitId;
25 |
26 | @ApiModelProperty("层")
27 | private String layerNumber;
28 |
29 | @ApiModelProperty("排序")
30 | private Integer sortNo;
31 |
32 | @ApiModelProperty("户")
33 | private List householdVoList;
34 | }
35 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/service/CommunityInAndOutService.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.service;
2 |
3 | import com.baomidou.mybatisplus.extension.service.IService;
4 | import com.lvyx.community.entity.CommunityInAndOut;
5 | import org.springframework.transaction.annotation.Transactional;
6 |
7 | /**
8 | *
9 | * 小区-进出登记表 服务类
10 | *
11 | *
12 | * @author lvyx
13 | * @since 2022-02-13
14 | */
15 | public interface CommunityInAndOutService extends IService {
16 |
17 | /**
18 | * 添加社区进出登记
19 | * @param communityInAndOut 社区进出登记信息
20 | * @author lvyx
21 | * @since 2022/4/20 10:12
22 | **/
23 | @Transactional(rollbackFor = Exception.class)
24 | void addCommunityInAndOut(CommunityInAndOut communityInAndOut);
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/shiro/config/JWTProperties.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.shiro.config;
2 |
3 | import lombok.Data;
4 | import org.springframework.boot.context.properties.ConfigurationProperties;
5 | import org.springframework.stereotype.Component;
6 |
7 | /**
8 | *
9 | * jwt令牌配置
10 | *
11 | *
12 | * @author lvyx
13 | * @since 2022-01-14 09:25:25
14 | */
15 | @Data
16 | @Component
17 | @ConfigurationProperties(prefix = "lvyx.shiro.jwt")
18 | public class JWTProperties {
19 |
20 | /**
21 | * 签名密码
22 | * @since 2022/1/14 9:26
23 | **/
24 | private String hexEncodedSecretKey = "helloworld-community-system";
25 |
26 | /**
27 | * 是否仅仅使用jwt令牌一种方式登录
28 | * @since 2022/1/14 16:55
29 | **/
30 | private boolean isOnlyJwt = true;
31 | }
32 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/vo/HouseholdVo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.vo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import java.io.Serializable;
7 | import java.util.List;
8 |
9 | /**
10 | *
11 | * 户VO
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2022-02-06 16:09:04
16 | */
17 | @Data
18 | public class HouseholdVo implements Serializable {
19 |
20 | @ApiModelProperty("主键")
21 | private String id;
22 |
23 | @ApiModelProperty("层Id")
24 | private String layerId;
25 |
26 | @ApiModelProperty("户")
27 | private String householdNumber;
28 |
29 | @ApiModelProperty("排序")
30 | private Integer sortNo;
31 |
32 | @ApiModelProperty("用户")
33 | private List householdUserVoList;
34 | }
35 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/mapper/ResourceMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.mapper;
2 |
3 | import com.lvyx.author.entity.Resource;
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 | import org.apache.ibatis.annotations.Mapper;
6 | import org.apache.ibatis.annotations.Param;
7 |
8 | import java.util.List;
9 |
10 | /**
11 | *
12 | * 资源表 Mapper 接口
13 | *
14 | *
15 | * @author lvyx
16 | * @since 2021-12-23
17 | */
18 | @Mapper
19 | public interface ResourceMapper extends BaseMapper {
20 |
21 | /**
22 | * 根据用户id查询用户拥有的资源ids
23 | * @param userId 用户id
24 | * @return java.util.List
25 | * @author lvyx
26 | * @since 2021/12/24 9:37
27 | **/
28 | List getResourcesByUserId(@Param("userId") String userId);
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/exception/LException.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.exception;
2 |
3 | /**
4 | *
5 | * 自定义异常
6 | *
7 | *
8 | * @author lvyx
9 | * @since 2022-05-01 17:39:20
10 | */
11 | public class LException extends Exception {
12 |
13 | public LException() {
14 | super();
15 | }
16 |
17 | public LException(String message) {
18 | super(message);
19 | }
20 |
21 | public LException(String message, Throwable cause) {
22 | super(message, cause);
23 | }
24 |
25 | public LException(Throwable cause) {
26 | super(cause);
27 | }
28 |
29 | protected LException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
30 | super(message, cause, enableSuppression, writableStackTrace);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/vo/PeriodInfoVo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.vo;
2 |
3 | import io.swagger.annotations.ApiModel;
4 | import io.swagger.annotations.ApiModelProperty;
5 | import lombok.Data;
6 |
7 | import java.io.Serializable;
8 | import java.util.List;
9 |
10 | /**
11 | *
12 | * 社区详情
13 | *
14 | *
15 | * @author lvyx
16 | * @since 2022-02-06 16:22:53
17 | */
18 | @ApiModel(value = "期详情", description = "期详情")
19 | @Data
20 | public class PeriodInfoVo implements Serializable {
21 |
22 | @ApiModelProperty("栋Id")
23 | private String buildingId;
24 |
25 | @ApiModelProperty("栋")
26 | private String buildingNumber;
27 |
28 | @ApiModelProperty("排序")
29 | private Integer sortNo;
30 |
31 | @ApiModelProperty("单元详情")
32 | private List infoVoList;
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/mail/src/main/java/com/lvyx/mail/MailUrls.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.mail;
2 |
3 | /**
4 | *
5 | * 邮件请求地址
6 | *
7 | *
8 | * @author lvyx
9 | * @since 2022-04-30 21:22:22
10 | */
11 | public class MailUrls {
12 |
13 | /**
14 | * 邮件模块跟请求路径
15 | * @since 2021/12/30 13:56
16 | **/
17 | public final static String PACKAGE_URL = "/mail";
18 |
19 | /**
20 | * 社区-期 地址控制
21 | * @author lvyx
22 | * @since 2021/12/30 13:59
23 | **/
24 | public static class MessageCtrls{
25 | public static final String BASE_URL = PACKAGE_URL + "/message";
26 | public static final String SENDER_SIMPLE_MAIL = "/sendSimpleMessage";
27 | public static final String FIND_MESSAGE = "/findMessage";
28 | public static final String READ_MESSAGE = "/readMessage";
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/vo/CommunityRoleVo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.vo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import java.io.Serializable;
7 | import java.util.List;
8 |
9 | /**
10 | *
11 | * 社区角色
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2022-05-05 00:36:36
16 | */
17 | @Data
18 | public class CommunityRoleVo implements Serializable {
19 |
20 | @ApiModelProperty("角色id")
21 | private String roleId;
22 |
23 | @ApiModelProperty("角色名称")
24 | private String RoleName;
25 |
26 | @ApiModelProperty("角色描述")
27 | private String description;
28 |
29 | @ApiModelProperty("期名称(多个期名称间用,分割)")
30 | private String periodNameStr;
31 |
32 | @ApiModelProperty("资源列表")
33 | private List communityResourceVoList;
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/exception/LMailException.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.exception;
2 |
3 | /**
4 | *
5 | * 自定义邮件异常
6 | *
7 | *
8 | * @author lvyx
9 | * @since 2022-05-01 17:39:20
10 | */
11 | public class LMailException extends Exception {
12 |
13 | public LMailException() {
14 | super();
15 | }
16 |
17 | public LMailException(String message) {
18 | super(message);
19 | }
20 |
21 | public LMailException(String message, Throwable cause) {
22 | super(message, cause);
23 | }
24 |
25 | public LMailException(Throwable cause) {
26 | super(cause);
27 | }
28 |
29 | protected LMailException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
30 | super(message, cause, enableSuppression, writableStackTrace);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/exception/LExceException.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.exception;
2 |
3 | /**
4 | *
5 | * 自定义社区异常异常
6 | *
7 | *
8 | * @author lvyx
9 | * @since 2022-05-01 17:39:20
10 | */
11 | public class LExceException extends Exception {
12 |
13 | public LExceException() {
14 | super();
15 | }
16 |
17 | public LExceException(String message) {
18 | super(message);
19 | }
20 |
21 | public LExceException(String message, Throwable cause) {
22 | super(message, cause);
23 | }
24 |
25 | public LExceException(Throwable cause) {
26 | super(cause);
27 | }
28 |
29 | protected LExceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
30 | super(message, cause, enableSuppression, writableStackTrace);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/mail/src/main/java/com/lvyx/mail/service/CommunityMessageEmailService.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.mail.service;
2 |
3 | import com.lvyx.mail.entity.CommunityMessageEmail;
4 | import com.baomidou.mybatisplus.extension.service.IService;
5 | import com.lvyx.mail.vo.UserMessageVo;
6 |
7 | import java.util.List;
8 |
9 | /**
10 | *
11 | * 社区邮件信息表 服务类
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2022-05-01
16 | */
17 | public interface CommunityMessageEmailService extends IService {
18 |
19 | /**
20 | * 查询用户的邮件信息
21 | * @param userIds 用户ids
22 | * @return java.util.List
23 | * @author lvyx
24 | * @since 2022/5/1 15:29
25 | **/
26 | List findByUserIds(List userIds);
27 |
28 | void updateEmailIsEnable(String emailId, Integer isEnable);
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/bo/QueryUserListBo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.bo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import java.io.Serializable;
7 | import java.util.List;
8 |
9 | /**
10 | *
11 | * 查询用户房间信息实体
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2022-04-25 21:44:43
16 | */
17 | @Data
18 | public class QueryUserListBo implements Serializable {
19 |
20 | @ApiModelProperty("用户主键")
21 | private String userId;
22 |
23 | @ApiModelProperty("用户名")
24 | private String searchName;
25 |
26 | @ApiModelProperty("页面状态")
27 | private Integer status;
28 |
29 | @ApiModelProperty("是否启用用户信息")
30 | private Integer isEnableUser;
31 |
32 | @ApiModelProperty("是否启用房间信息")
33 | private Integer isEnableHouseHold;
34 |
35 | @ApiModelProperty("期主键")
36 | private List periodIds;
37 |
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/mapper/CommunityExceptionMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.mapper;
2 |
3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 | import com.lvyx.community.bo.QueryExceptionBo;
5 | import com.lvyx.community.entity.CommunityException;
6 | import com.lvyx.community.vo.ExceptionVo;
7 | import org.apache.ibatis.annotations.Mapper;
8 |
9 | import java.util.List;
10 |
11 | /**
12 | *
13 | * 社区异常表 Mapper 接口
14 | *
15 | *
16 | * @author lvyx
17 | * @since 2022-05-02
18 | */
19 | @Mapper
20 | public interface CommunityExceptionMapper extends BaseMapper {
21 |
22 | /**
23 | * 查询异常信息
24 | * @param queryExceptionBo 查询条件
25 | * @return com.lvyx.community.vo.ExceptionVo
26 | * @author lvyx
27 | * @since 2022/5/2 15:52
28 | **/
29 | List findList(QueryExceptionBo queryExceptionBo);
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/enums/CaptchaNameEnum.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.enums;
2 |
3 | /**
4 | *
5 | * shiro 缓存枚举
6 | *
7 | *
8 | * @author lvyx
9 | * @date 2021-12-31 09:59:24
10 | */
11 | public enum CaptchaNameEnum {
12 |
13 | /**
14 | * 登录验证码
15 | * @since 2021/12/31 10:08
16 | **/
17 | LOGIN_CAPTCHA(":login_captcha"),
18 |
19 | ;
20 |
21 |
22 | private final String value;
23 |
24 | CaptchaNameEnum(String value){
25 | this.value = value;
26 | }
27 |
28 | public static String isSuccessEnum(String value){
29 | CaptchaNameEnum[] array = values();
30 | for(CaptchaNameEnum arr: array){
31 | if(arr.value.equals(value)){
32 | return arr.value;
33 | }
34 | }
35 | return null;
36 | }
37 |
38 | public String getValue() {
39 | return value;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/mail/src/main/java/com/lvyx/mail/mapper/CommunityMessageEmailMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.mail.mapper;
2 |
3 | import com.lvyx.mail.entity.CommunityMessageEmail;
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 | import com.lvyx.mail.vo.UserMessageVo;
6 | import org.apache.ibatis.annotations.Mapper;
7 | import org.apache.ibatis.annotations.Param;
8 |
9 | import java.util.List;
10 |
11 | /**
12 | *
13 | * 社区邮件信息表 Mapper 接口
14 | *
15 | *
16 | * @author lvyx
17 | * @since 2022-05-01
18 | */
19 | @Mapper
20 | public interface CommunityMessageEmailMapper extends BaseMapper {
21 |
22 | /**
23 | * 查询用户的邮件信息
24 | * @param userIds 用户ids
25 | * @return java.util.List
26 | * @author lvyx
27 | * @since 2022/5/1 15:29
28 | **/
29 | List findByUserIds(@Param("userIds") List userIds);
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/annotation/logger/LLogger.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.annotation.logger;
2 |
3 | import java.lang.annotation.*;
4 |
5 | /**
6 | *
7 | * 自定日志注解
8 | * 使用说明:
9 | * 1. 该注解用于Controller层,进行日志的记录与存储
10 | * 2. 请自行创建T_L_LOG数据表用户存储日志内容
11 | * 3. 如果捕获了异常,日志注解将无法记录错误信息
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2021-12-02 13:47:53
16 | */
17 | @Target(ElementType.METHOD)
18 | @Retention(RetentionPolicy.RUNTIME)
19 | @Documented
20 | public @interface LLogger {
21 | /**
22 | * 方法注释
23 | * @return java.lang.String
24 | * @author lvyx
25 | * @since 2021/12/3 15:34
26 | **/
27 | String description();
28 |
29 | /**
30 | * 形参注释
31 | * 注意:形参注释的顺序与个数必须与方法的形参一一对应
32 | * @return java.lang.String[]
33 | * @author lvyx
34 | * @since 2021/12/3 15:34
35 | **/
36 | String[] params() default {};
37 | }
38 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/QrCodeFactory/QrCodeBase.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.QrCodeFactory;
2 |
3 | import com.lvyx.commons.config.SystemProperties;
4 | import com.lvyx.commons.utils.ApplicationContextUtils;
5 |
6 | import java.awt.image.BufferedImage;
7 | import java.util.Map;
8 |
9 | /**
10 | *
11 | * QrCode基类
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2022-04-05 21:29:11
16 | */
17 | public abstract class QrCodeBase {
18 |
19 | protected final SystemProperties systemProperties;
20 |
21 | public QrCodeBase() {
22 | systemProperties = ApplicationContextUtils.getBean(SystemProperties.class);
23 | }
24 |
25 | /**
26 | * 创建二维码
27 | * @param resultMap 二维码携带的信息
28 | * @return java.awt.image.BufferedImage
29 | * @author lvyx
30 | * @since 2022/4/24 19:52
31 | **/
32 | public abstract BufferedImage createQrCode(Map resultMap);
33 | }
34 |
--------------------------------------------------------------------------------
/mail/src/main/java/com/lvyx/mail/bo/BaseSenderMessageBo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.mail.bo;
2 |
3 | import io.swagger.annotations.ApiModel;
4 | import io.swagger.annotations.ApiModelProperty;
5 | import lombok.Data;
6 |
7 | import java.io.Serializable;
8 | import java.util.List;
9 |
10 | /**
11 | *
12 | * 邮件发送,请求参数
13 | *
14 | *
15 | * @author lvyx
16 | * @since 2022-05-01 15:13:21
17 | */
18 | @Data
19 | @ApiModel(value = "BaseSenderMailBo对象", description = "邮件发送,请求参数")
20 | public class BaseSenderMessageBo implements Serializable {
21 |
22 | @ApiModelProperty("消息发送者")
23 | private String from;
24 |
25 | @ApiModelProperty("是否邮件发送")
26 | private Integer isSenderEmail;
27 |
28 | @ApiModelProperty("消息接收者")
29 | private List to;
30 |
31 | @ApiModelProperty("消息内容")
32 | private String content;
33 |
34 | @ApiModelProperty("消息主题")
35 | private String subject;
36 |
37 |
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/service/CommunityLayerService.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.service;
2 |
3 | import com.baomidou.mybatisplus.extension.service.IService;
4 | import com.lvyx.community.entity.CommunityLayer;
5 |
6 | import java.util.List;
7 |
8 | /**
9 | *
10 | * 小区-层 服务类
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-02-01
15 | */
16 | public interface CommunityLayerService extends IService {
17 |
18 | /**
19 | * 添加层信息
20 | * @param layer 层信息
21 | * @return CommunityBuilding
22 | * @author lvyx
23 | * @since 2022/2/4 15:31
24 | **/
25 | CommunityLayer add(CommunityLayer layer);
26 |
27 | /**
28 | * 查询层
29 | * @param parentId 父级id
30 | * @return java.util.List
31 | * @author lvyx
32 | * @since 2022/2/4 17:05
33 | **/
34 | List find(String parentId);
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/mapper/CommunityUnitMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.mapper;
2 |
3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 | import com.lvyx.community.entity.CommunityUnit;
5 | import com.lvyx.community.vo.UnitVo;
6 | import org.apache.ibatis.annotations.Mapper;
7 | import org.apache.ibatis.annotations.Param;
8 |
9 | import java.util.List;
10 |
11 | /**
12 | *
13 | * 小区-单元 Mapper 接口
14 | *
15 | *
16 | * @author lvyx
17 | * @since 2022-02-01
18 | */
19 | @Mapper
20 | public interface CommunityUnitMapper extends BaseMapper {
21 |
22 | /**
23 | * 根据栋id查询社区信息
24 | * @param buildingId 栋Id
25 | * @return java.util.List
26 | * @author lvyx
27 | * @since 2022/2/7 16:10
28 | **/
29 | List findInfo(@Param("buildingId") String buildingId);
30 |
31 | int selectUnitIdUserCount(@Param("unitId") String unitId);
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/bo/LoginBO.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.bo;
2 |
3 | import io.swagger.annotations.ApiModel;
4 | import io.swagger.annotations.ApiModelProperty;
5 | import lombok.Data;
6 |
7 | /**
8 | *
9 | * 用户登录参数
10 | *
11 | *
12 | * @author lvyx
13 | * @since 2021-12-28 10:25:23
14 | */
15 | @Data
16 | @ApiModel("用户登录参数")
17 | public class LoginBO {
18 |
19 | @ApiModelProperty(value = "用户名", required = true)
20 | private String username;
21 |
22 | @ApiModelProperty(value = "密码", required = true)
23 | private String password;
24 |
25 | @ApiModelProperty(value = "验证码", required = true)
26 | private String captcha;
27 |
28 | @ApiModelProperty(value = "是否记住我", required = true)
29 | private Boolean rememberFlag;
30 |
31 | @ApiModelProperty(value = "验证码Id", required = true)
32 | private String captchaId;
33 |
34 | @ApiModelProperty(value = "系统编码")
35 | private String systemCode;
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/result/impl/ErrorResult.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.result.impl;
2 |
3 | import com.lvyx.commons.enums.ResultEnum;
4 | import com.lvyx.commons.result.Result;
5 |
6 | /**
7 | *
8 | * 异常结果统一封装类
9 | *
10 | *
11 | * @author lvyx
12 | * @since 2021-12-28 09:40:16
13 | */
14 | public class ErrorResult extends Result {
15 | public ErrorResult(){
16 | super(ResultEnum.ERROR.getCode(), ResultEnum.ERROR.getValue());
17 | }
18 |
19 | public ErrorResult(String message){
20 | super(ResultEnum.ERROR.getCode(), message);
21 | }
22 |
23 | public ErrorResult(Integer code, String message){
24 | super(code, message);
25 | }
26 |
27 | public ErrorResult(Integer code, String message, T data){
28 | super(code, message, data);
29 | }
30 |
31 | public ErrorResult(T data){
32 | super(ResultEnum.ERROR.getCode(), ResultEnum.ERROR.getValue(), data);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/pojo/QrCodeInfo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.pojo;
2 |
3 | import io.swagger.annotations.ApiModel;
4 | import io.swagger.annotations.ApiModelProperty;
5 | import lombok.Data;
6 |
7 | import java.io.Serializable;
8 |
9 | /**
10 | *
11 | * 二维码信息
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2022-04-24 19:38:54
16 | */
17 | @Data
18 | @ApiModel( value = "二维码信息对象", description = "二维码信息对象" )
19 | public class QrCodeInfo implements Serializable {
20 |
21 | @ApiModelProperty(value = "主键")
22 | private String id;
23 |
24 | @ApiModelProperty(value = "二维码类型")
25 | private String codeType;
26 |
27 | @ApiModelProperty(value = "二维码类型名称")
28 | private String codeTypeName;
29 |
30 | @ApiModelProperty(value = "用户id")
31 | private String userId;
32 |
33 | @ApiModelProperty(value = "用户名称")
34 | private String userName;
35 |
36 | @ApiModelProperty(value = "联系方式")
37 | private String mobile;
38 |
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/shiro/utils/ShiroUserUtils.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.shiro.utils;
2 |
3 | import cn.hutool.core.util.ObjectUtil;
4 | import com.lvyx.commons.pojo.ShiroUser;
5 | import com.lvyx.commons.utils.ShiroUtils;
6 | import org.apache.shiro.SecurityUtils;
7 | import org.apache.shiro.util.ThreadContext;
8 |
9 | /**
10 | *
11 | * shiro用户工具类
12 | *
13 | *
14 | * @author lvyx
15 | * @since 2022-01-13 13:53:46
16 | */
17 | public class ShiroUserUtils extends ShiroUtils {
18 |
19 | /**
20 | * 得到shiroUser对象
21 | * @return com.lvyx.author.shiro.pojo.ShiroUser
22 | * @author lvyx
23 | * @since 2022/1/13 13:55
24 | **/
25 | public static ShiroUser getShiroUser(){
26 | if (ObjectUtil.isNotEmpty(ThreadContext.getSubject()) && ObjectUtil.isNotEmpty(ThreadContext.getSubject().getPrincipal())){
27 | return (ShiroUser)SecurityUtils.getSubject().getPrincipal();
28 | }
29 | return null;
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/result/Result.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.result;
2 |
3 | import io.swagger.annotations.ApiModel;
4 | import io.swagger.annotations.ApiModelProperty;
5 | import lombok.AllArgsConstructor;
6 | import lombok.Data;
7 | import lombok.NoArgsConstructor;
8 |
9 | import java.io.Serializable;
10 |
11 | /**
12 | *
13 | * 统一返回结果抽象类
14 | *
15 | *
16 | * @author lvyx
17 | * @date 2021-12-28 09:31:50
18 | */
19 | @ApiModel(
20 | value = "数据返回封装",
21 | description = "数据返回封装"
22 | )
23 | @Data
24 | @AllArgsConstructor
25 | @NoArgsConstructor
26 | public abstract class Result implements Serializable {
27 | @ApiModelProperty("状态编码")
28 | private Integer code;
29 |
30 | @ApiModelProperty("提示信息")
31 | private String message;
32 |
33 | @ApiModelProperty("返回结果")
34 | private T data;
35 |
36 | public Result(Integer code, String message){
37 | this.code = code;
38 | this.message = message;
39 | }
40 |
41 | }
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/enums/ResourceTypeEnum.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.enums;
2 |
3 | /**
4 | *
5 | * 资源类型枚举
6 | *
7 | *
8 | * @author lvyx
9 | * @date 2021-12-31 09:59:24
10 | */
11 | public enum ResourceTypeEnum {
12 |
13 | /**
14 | * 功能
15 | * @since 2021/12/31 10:08
16 | **/
17 | FUNCTION("function", "功能"),
18 |
19 | /**
20 | * 社区
21 | * @since 2021/12/31 10:08
22 | **/
23 | COMMUNITY("community", "社区资源"),
24 |
25 |
26 | ;
27 |
28 |
29 | private final String value;
30 | private final String name;
31 |
32 | ResourceTypeEnum(String value, String name) {
33 | this.value = value;
34 | this.name = name;
35 | }
36 |
37 | ResourceTypeEnum(String value) {
38 | this.value = value;
39 | this.name = null;
40 | }
41 |
42 | public String getValue() {
43 | return value;
44 | }
45 |
46 | public String getName() {
47 | return name;
48 | }
49 | }
--------------------------------------------------------------------------------
/community/src/main/resources/mapper/CommunityHouseholdMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
18 |
19 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/shiro/pojo/SimpleToken.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.shiro.pojo;
2 |
3 | import lombok.Data;
4 | import lombok.EqualsAndHashCode;
5 | import org.apache.shiro.authc.UsernamePasswordToken;
6 |
7 |
8 | /**
9 | * 自定义token
10 | * @author lvyx
11 | * @since 2021/12/23 19:44
12 | **/
13 | @Data
14 | @EqualsAndHashCode(callSuper = true)
15 | public class SimpleToken extends UsernamePasswordToken {
16 |
17 | /** serialVersionUID */
18 | private static final long serialVersionUID = -4849823851197352099L;
19 |
20 | private String tokenType;
21 |
22 | private String quickPassword;
23 |
24 |
25 | public SimpleToken(String tokenType, String username,String password) {
26 | super(username,password);
27 | this.tokenType = tokenType;
28 | }
29 |
30 | public SimpleToken(String tokenType, String username,String password,String quickPassword) {
31 | super(username,password);
32 | this.tokenType = tokenType;
33 | this.quickPassword = quickPassword;
34 | }
35 |
36 |
37 | }
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/mapper/RoleResourceMapper.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.mapper;
2 |
3 | import com.lvyx.author.entity.RoleResource;
4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 | import com.lvyx.author.vo.CommunityResourceVo;
6 | import org.apache.ibatis.annotations.Mapper;
7 | import org.apache.ibatis.annotations.Param;
8 |
9 | import java.util.List;
10 |
11 | /**
12 | *
13 | * 角色资源关联表 Mapper 接口
14 | *
15 | *
16 | * @author lvyx
17 | * @since 2021-12-23
18 | */
19 | @Mapper
20 | public interface RoleResourceMapper extends BaseMapper {
21 |
22 | List findUserPeriodId(@Param("userId") String userId);
23 |
24 | /**
25 | * 查询社区角色资源信息,根据角色id查询
26 | *
27 | * @param roleId 角色id
28 | * @return java.util.List
29 | * @author lvyx
30 | * @since 2022/5/13 20:30
31 | **/
32 | List findCommunityResourceByRoleId(@Param("roleId") String roleId);
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/enums/ShiroTokenEnum.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons.enums;
2 |
3 | /**
4 | *
5 | * shiro 缓存枚举
6 | *
7 | *
8 | * @author lvyx
9 | * @date 2021-12-31 09:59:24
10 | */
11 | public enum ShiroTokenEnum {
12 |
13 | /**
14 | * 请求头中携带token的名称
15 | * @since 2021/12/31 10:08
16 | **/
17 | AUTHORIZATION("L-TOKEN"),
18 |
19 | /**
20 | * 自定义注入资源名称
21 | * @since 2021/12/31 10:08
22 | **/
23 | REFERENCED_SESSION_ID_SOURCE("Stateless request"),
24 |
25 | ;
26 |
27 |
28 | private final String value;
29 |
30 | ShiroTokenEnum(String value){
31 | this.value = value;
32 | }
33 |
34 | public static String isSuccessEnum(String value){
35 | ShiroTokenEnum[] array = values();
36 | for(ShiroTokenEnum arr: array){
37 | if(arr.value.equals(value)){
38 | return arr.value;
39 | }
40 | }
41 | return null;
42 | }
43 |
44 | public String getValue() {
45 | return value;
46 | }
47 | }
--------------------------------------------------------------------------------
/community/src/main/java/com/lvyx/community/service/CommunityHouseholdService.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.community.service;
2 |
3 | import com.baomidou.mybatisplus.extension.service.IService;
4 | import com.lvyx.community.entity.CommunityHousehold;
5 |
6 | import java.util.List;
7 |
8 | /**
9 | *
10 | * 小区-户 服务类
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-02-01
15 | */
16 | public interface CommunityHouseholdService extends IService {
17 |
18 |
19 | /**
20 | * 添加层信息
21 | * @param household 层信息
22 | * @return CommunityBuilding
23 | * @author lvyx
24 | * @since 2022/2/4 15:31
25 | **/
26 | CommunityHousehold add(CommunityHousehold household);
27 |
28 | /**
29 | * 查询层
30 | * @param parentId 父级id
31 | * @return java.util.List
32 | * @author lvyx
33 | * @since 2022/2/4 17:05
34 | **/
35 | List find(String parentId);
36 |
37 | String findPeriodIByHouseholdId(String householdId);
38 |
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/commons/src/main/java/com/lvyx/commons/CommonsUrls.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.commons;
2 |
3 | /**
4 | *
5 | * 公共模块请求地址
6 | *
7 | *
8 | * @author lvyx
9 | * @since 2021-12-30 13:54:57
10 | */
11 | public class CommonsUrls {
12 |
13 | /**
14 | * 公共模块跟请求路径
15 | * @since 2021/12/30 13:56
16 | **/
17 | public final static String PACKAGE_URL = "/commons";
18 |
19 | /**
20 | * 验证码请求地址控制
21 | * @author lvyx
22 | * @since 2021/12/30 13:59
23 | **/
24 | public static class CaptchaCtrls{
25 | public static final String BASE_URL = PACKAGE_URL + "/captcha";
26 | public static final String DEFAULT_CAPTCHA = "/default";
27 | }
28 |
29 | /**
30 | * 文件流控制器
31 | * @author lvyx
32 | * @since 2021/12/30 13:59
33 | **/
34 | public static class FileCtrls{
35 | public static final String BASE_URL = PACKAGE_URL + "/file";
36 | public static final String GET_IMAGE_FOR_PATH = "/getImageForPath";
37 | public static final String FILE_UPLOAD = "/fileUpload";
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/author/src/main/java/com/lvyx/author/bo/QueryUserBo.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.author.bo;
2 |
3 | import io.swagger.annotations.ApiModelProperty;
4 | import lombok.Data;
5 |
6 | import java.io.Serializable;
7 |
8 | /**
9 | *
10 | * 查询用户房间信息实体
11 | *
12 | *
13 | * @author lvyx
14 | * @since 2022-04-25 21:44:43
15 | */
16 | @Data
17 | public class QueryUserBo implements Serializable {
18 |
19 | @ApiModelProperty("用户主键")
20 | private String userId;
21 |
22 | @ApiModelProperty("用户名")
23 | private String userName;
24 |
25 | @ApiModelProperty("用户电话号码")
26 | private String userMobile;
27 |
28 | @ApiModelProperty("是否启用(未启用表示待审核状态,启用表示审核通过状态)")
29 | private String isEnable;
30 |
31 | @ApiModelProperty("期主键")
32 | private String periodId;
33 |
34 | @ApiModelProperty("栋主键")
35 | private String buildingId;
36 |
37 | @ApiModelProperty("单元主键")
38 | private String unitId;
39 |
40 | @ApiModelProperty("层主键")
41 | private String layerId;
42 |
43 | @ApiModelProperty("房间主键")
44 | private String householdId;
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/web/src/main/java/com/lvyx/controller/ExceptionController.java:
--------------------------------------------------------------------------------
1 | package com.lvyx.controller;
2 |
3 |
4 | import com.lvyx.commons.result.Result;
5 | import com.lvyx.factory.MyExceptionFactory;
6 | import org.springframework.web.bind.annotation.ExceptionHandler;
7 | import org.springframework.web.bind.annotation.RestControllerAdvice;
8 |
9 | import javax.servlet.http.HttpServletRequest;
10 |
11 | /**
12 | *
13 | * 全局异常处理器
14 | *
15 | *
16 | * @author lvyx
17 | * @since 2021-12-09 11:00:53
18 | */
19 | @RestControllerAdvice
20 | public class ExceptionController {
21 |
22 |
23 | /**
24 | * 全局异常处理
25 | * @param request request上下文
26 | * @param e 异常信息
27 | * @return com.lvyx.shiro_boot02.vo.Result
28 | * @author lvyx
29 | * @since 2021/12/9 11:03
30 | **/
31 | @ExceptionHandler(Exception.class)
32 | public Result