├── src └── main │ ├── resources │ ├── static │ │ ├── images │ │ │ ├── logo.png │ │ │ └── favicon.png │ │ ├── css │ │ │ └── font │ │ │ │ ├── iconfont.eot │ │ │ │ ├── iconfont.ttf │ │ │ │ ├── iconfont.woff │ │ │ │ ├── adminThemes.ttf │ │ │ │ ├── adminthemes-webfont.eot │ │ │ │ ├── adminthemes-webfont.ttf │ │ │ │ ├── adminthemes-webfont.woff │ │ │ │ └── adminthemes-webfont.woff2 │ │ ├── layui │ │ │ ├── font │ │ │ │ ├── iconfont.eot │ │ │ │ ├── iconfont.ttf │ │ │ │ ├── iconfont.woff │ │ │ │ └── iconfont.woff2 │ │ │ ├── images │ │ │ │ └── face │ │ │ │ │ ├── 0.gif │ │ │ │ │ ├── 1.gif │ │ │ │ │ ├── 10.gif │ │ │ │ │ ├── 11.gif │ │ │ │ │ ├── 12.gif │ │ │ │ │ ├── 13.gif │ │ │ │ │ ├── 14.gif │ │ │ │ │ ├── 15.gif │ │ │ │ │ ├── 16.gif │ │ │ │ │ ├── 17.gif │ │ │ │ │ ├── 18.gif │ │ │ │ │ ├── 19.gif │ │ │ │ │ ├── 2.gif │ │ │ │ │ ├── 20.gif │ │ │ │ │ ├── 21.gif │ │ │ │ │ ├── 22.gif │ │ │ │ │ ├── 23.gif │ │ │ │ │ ├── 24.gif │ │ │ │ │ ├── 25.gif │ │ │ │ │ ├── 26.gif │ │ │ │ │ ├── 27.gif │ │ │ │ │ ├── 28.gif │ │ │ │ │ ├── 29.gif │ │ │ │ │ ├── 3.gif │ │ │ │ │ ├── 30.gif │ │ │ │ │ ├── 31.gif │ │ │ │ │ ├── 32.gif │ │ │ │ │ ├── 33.gif │ │ │ │ │ ├── 34.gif │ │ │ │ │ ├── 35.gif │ │ │ │ │ ├── 36.gif │ │ │ │ │ ├── 37.gif │ │ │ │ │ ├── 38.gif │ │ │ │ │ ├── 39.gif │ │ │ │ │ ├── 4.gif │ │ │ │ │ ├── 40.gif │ │ │ │ │ ├── 41.gif │ │ │ │ │ ├── 42.gif │ │ │ │ │ ├── 43.gif │ │ │ │ │ ├── 44.gif │ │ │ │ │ ├── 45.gif │ │ │ │ │ ├── 46.gif │ │ │ │ │ ├── 47.gif │ │ │ │ │ ├── 48.gif │ │ │ │ │ ├── 49.gif │ │ │ │ │ ├── 5.gif │ │ │ │ │ ├── 50.gif │ │ │ │ │ ├── 51.gif │ │ │ │ │ ├── 52.gif │ │ │ │ │ ├── 53.gif │ │ │ │ │ ├── 54.gif │ │ │ │ │ ├── 55.gif │ │ │ │ │ ├── 56.gif │ │ │ │ │ ├── 57.gif │ │ │ │ │ ├── 58.gif │ │ │ │ │ ├── 59.gif │ │ │ │ │ ├── 6.gif │ │ │ │ │ ├── 60.gif │ │ │ │ │ ├── 61.gif │ │ │ │ │ ├── 62.gif │ │ │ │ │ ├── 63.gif │ │ │ │ │ ├── 64.gif │ │ │ │ │ ├── 65.gif │ │ │ │ │ ├── 66.gif │ │ │ │ │ ├── 67.gif │ │ │ │ │ ├── 68.gif │ │ │ │ │ ├── 69.gif │ │ │ │ │ ├── 7.gif │ │ │ │ │ ├── 70.gif │ │ │ │ │ ├── 71.gif │ │ │ │ │ ├── 8.gif │ │ │ │ │ └── 9.gif │ │ │ ├── css │ │ │ │ └── modules │ │ │ │ │ ├── layer │ │ │ │ │ └── default │ │ │ │ │ │ ├── icon.png │ │ │ │ │ │ ├── icon-ext.png │ │ │ │ │ │ ├── loading-0.gif │ │ │ │ │ │ ├── loading-1.gif │ │ │ │ │ │ └── loading-2.gif │ │ │ │ │ └── code.css │ │ │ └── lay │ │ │ │ └── modules │ │ │ │ ├── code.js │ │ │ │ ├── laytpl.js │ │ │ │ ├── flow.js │ │ │ │ ├── rate.js │ │ │ │ └── util.js │ │ └── js │ │ │ ├── login.js │ │ │ ├── home.js │ │ │ └── menu.js │ ├── mapper │ │ ├── CustomUserDao.xml │ │ ├── AppTemplateDao.xml │ │ ├── AdminRoleDao.xml │ │ ├── MenuDao.xml │ │ ├── AdminUserDao.xml │ │ ├── GtAliasDao.xml │ │ └── MsgPushDao.xml │ ├── templates │ │ ├── error │ │ │ └── 404.html │ │ ├── login.html │ │ └── home.html │ ├── generatorConfig.xml │ └── log4j2-spring.xml │ └── java │ └── com │ └── jielin │ └── message │ ├── dto │ ├── SmsBean.java │ ├── PageData.java │ ├── TemplateMsgResult.java │ ├── MenuDto.java │ ├── ParamDto.java │ ├── ResponsePackDto.java │ ├── WechatMpTemplateMsg.java │ ├── ResponseDto.java │ └── WechatTemplateMsg.java │ ├── util │ ├── constant │ │ ├── AppMsgConstant.java │ │ ├── MailConstant.java │ │ ├── DingMsgConstant.java │ │ ├── WsConstant.java │ │ └── MsgConstant.java │ ├── version │ │ ├── annotation │ │ │ └── ApiVersion.java │ │ └── config │ │ │ ├── ApiVersionCondition.java │ │ │ └── CustomRequestMappingHandlerMapping.java │ ├── enums │ │ ├── ResponseStatusEnum.java │ │ ├── UserTypeEnum.java │ │ ├── DingMsgTypeEnum.java │ │ ├── SendMsgResultEnum.java │ │ ├── WsDataEnum.java │ │ ├── PushTypeEnum.java │ │ ├── OperateTypeEnum.java │ │ └── ThirdActionEnum.java │ ├── HttpEntityUtil.java │ ├── SortUtil.java │ ├── task │ │ └── RetryPushMsgTask.java │ ├── sms │ │ ├── EncryptUtil.java │ │ ├── DateUtil.java │ │ └── CcopHttpClient.java │ └── WebLogAspect.java │ ├── websocket │ ├── pojo │ │ ├── SocketResponse.java │ │ ├── AdminHeaderContent.java │ │ └── AdminAlertContent.java │ ├── config │ │ ├── CustomWebSocketPrincipal.java │ │ ├── SecuritySocketConfig.java │ │ ├── WebSocketPushInterceptor.java │ │ ├── WebSocketConfig.java │ │ └── CustomHandshakeHandler.java │ └── WebSocketService.java │ ├── config │ ├── JgPushConfig.java │ ├── ThirdApiConfig.java │ ├── AccessWhiteListConfig.java │ ├── ApolloListenerConfig.java │ ├── UniPushConfig.java │ ├── WebSecurityConfig.java │ ├── DingtalkConfig.java │ ├── WebMvcConfig.java │ ├── YunTXSmsConfig.java │ ├── AppPushConfig.java │ ├── WeChatConfig.java │ └── RabbitConfig.java │ ├── dao │ ├── mongo │ │ ├── MsgPrepareSendLogDao.java │ │ ├── TemplateDao.java │ │ ├── BaseDao.java │ │ └── MessageSendLogDao.java │ └── mysql │ │ ├── CustomUserDao.java │ │ ├── AppTemplateDao.java │ │ ├── AdminRoleDao.java │ │ ├── AdminUserDao.java │ │ ├── MenuDao.java │ │ ├── MsgPushDao.java │ │ ├── GtAliasDao.java │ │ ├── OptionDao.java │ │ ├── MsgThirdDao.java │ │ ├── OperateDao.java │ │ ├── MsgPlatformDao.java │ │ ├── UniappDao.java │ │ └── MsgUserDao.java │ ├── po │ ├── AppTemplatePo.java │ ├── MenuPo.java │ ├── GtAliasPo.java │ ├── AuthMemberPo.java │ ├── MsgPushPo.java │ ├── AdminRolePo.java │ ├── AdminUserPo.java │ ├── MsgPrepareSendLog.java │ ├── Template.java │ └── MessageSendLog.java │ ├── controller │ ├── LogController.java │ ├── TemplateController.java │ ├── MainController.java │ ├── SynMsgPushController.java │ ├── ProducerController.java │ ├── MsgSendController.java │ └── SettingController.java │ ├── service │ ├── ProducerService.java │ ├── MenuService.java │ └── PlatformService.java │ ├── synpush │ ├── app │ │ ├── AppMsgPushHandler.java │ │ ├── UniPush │ │ │ └── GtBindingInfo.java │ │ ├── AppMsgPush.java │ │ └── Jpush │ │ │ ├── JgPushHandler.java │ │ │ └── JgPushDeviceHandler.java │ ├── system │ │ └── SystemMsgPush.java │ └── MsgPush.java │ ├── JielinMessageApplication.java │ ├── security │ └── Sha1PasswordEncoder.java │ └── interceptor │ └── AccessInterceptor.java ├── Dockerfile ├── .gitignore └── README.md /src/main/resources/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/images/logo.png -------------------------------------------------------------------------------- /src/main/resources/static/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/images/favicon.png -------------------------------------------------------------------------------- /src/main/resources/static/css/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/css/font/iconfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/css/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/css/font/iconfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/css/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/css/font/iconfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/css/font/adminThemes.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/css/font/adminThemes.ttf -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/font/iconfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/font/iconfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/font/iconfont.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/0.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/1.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/10.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/11.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/12.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/13.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/14.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/15.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/16.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/17.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/18.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/19.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/2.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/20.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/21.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/22.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/23.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/24.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/25.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/26.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/27.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/28.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/29.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/3.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/30.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/31.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/32.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/33.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/34.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/35.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/36.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/37.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/38.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/39.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/4.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/40.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/41.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/42.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/43.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/44.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/45.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/46.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/47.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/48.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/49.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/5.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/50.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/51.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/52.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/53.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/54.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/55.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/56.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/57.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/58.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/59.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/6.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/60.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/61.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/62.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/63.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/64.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/65.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/66.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/67.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/68.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/69.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/7.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/70.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/71.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/8.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/images/face/9.gif -------------------------------------------------------------------------------- /src/main/resources/static/css/font/adminthemes-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/css/font/adminthemes-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/css/font/adminthemes-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/css/font/adminthemes-webfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/css/font/adminthemes-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/css/font/adminthemes-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/css/font/adminthemes-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/css/font/adminthemes-webfont.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaolongUp/jielin-message/HEAD/src/main/resources/static/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/dto/SmsBean.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class SmsBean { 7 | 8 | private Boolean isSuccess; 9 | private String message; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/util/constant/AppMsgConstant.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.util.constant; 2 | 3 | /** 4 | * app推送参数 5 | */ 6 | public class AppMsgConstant { 7 | 8 | //消息类型 9 | public static final String APP_PUSH_TO_ALL = "appPushToAll"; 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/static/js/login.js: -------------------------------------------------------------------------------- 1 | 2 | 'use strict'; 3 | layui.use(['jquery'],function(){ 4 | window.jQuery = window.$ = layui.jquery; 5 | 6 | $(".layui-canvs").width($(window).width()); 7 | $(".layui-canvs").height($(window).height()); 8 | 9 | }); 10 | 11 | $(function() { 12 | 13 | }); 14 | 15 | 16 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM java:8-jre 2 | MAINTAINER rankin qin 3 | 4 | RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone 5 | 6 | ADD ./target/jielin-message.jar /app/application.jar 7 | CMD ["java", "-Xmx200m", "-jar", "/app/application.jar", "--spring.profiles.active=prod"] 8 | 9 | EXPOSE 8887 10 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/dto/PageData.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.dto; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.util.List; 8 | 9 | @Data 10 | @NoArgsConstructor 11 | @AllArgsConstructor 12 | public class PageData { 13 | 14 | private Long total; 15 | 16 | private List data; 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/websocket/pojo/SocketResponse.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.websocket.pojo; 2 | 3 | public class SocketResponse { 4 | private T responseMessage; 5 | 6 | public SocketResponse(T responseMessage) { 7 | this.responseMessage = responseMessage; 8 | } 9 | 10 | public T getResponseMessage() { 11 | return responseMessage; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/util/version/annotation/ApiVersion.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.util.version.annotation; 2 | 3 | import java.lang.annotation.*; 4 | 5 | @Target({ElementType.METHOD, ElementType.TYPE}) 6 | @Retention(RetentionPolicy.RUNTIME) 7 | @Documented 8 | public @interface ApiVersion { 9 | 10 | /** 11 | * 标识版本号,从1开始 12 | */ 13 | int value() default 1; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/dto/TemplateMsgResult.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.dto; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 微信公众号发送模版消息返回结果 7 | * 8 | * @author yxl 9 | */ 10 | @Data 11 | public class TemplateMsgResult { 12 | 13 | // 消息id(发送模板消息) 14 | private String msgid; 15 | 16 | //返回状态码 0为成功 17 | private int errcode; 18 | 19 | //错误信息 20 | private String errmsg; 21 | } 22 | -------------------------------------------------------------------------------- /src/main/resources/mapper/CustomUserDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/config/JgPushConfig.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.config; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import org.springframework.stereotype.Component; 6 | 7 | /** 8 | * 极光推送配置文件 9 | * 10 | * @author yxl 11 | */ 12 | @Component 13 | @Getter 14 | @Setter 15 | public class JgPushConfig { 16 | 17 | //appKey 18 | private String appKey; 19 | 20 | //密钥 21 | private String masterSecret; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/config/ThirdApiConfig.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.config; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | @Configuration 9 | @ConfigurationProperties(prefix = "third") 10 | @Getter 11 | @Setter 12 | public class ThirdApiConfig { 13 | 14 | private String jlWebApiUrl; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/dao/mongo/MsgPrepareSendLogDao.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.dao.mongo; 2 | 3 | import com.jielin.message.po.MsgPrepareSendLog; 4 | import org.springframework.data.mongodb.core.MongoTemplate; 5 | import org.springframework.stereotype.Repository; 6 | 7 | @Repository 8 | public class MsgPrepareSendLogDao extends BaseDao { 9 | 10 | public MsgPrepareSendLogDao(MongoTemplate mongoTemplate) { 11 | super(mongoTemplate); 12 | } 13 | } -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/po/AppTemplatePo.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.po; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | @Data 8 | public class AppTemplatePo implements Serializable { 9 | 10 | private static final long serialVersionUID = 1L; 11 | 12 | private Integer id; 13 | 14 | //操作类型 15 | private Integer operateType; 16 | 17 | //推送标题 18 | private String title; 19 | 20 | //推送内容 21 | private String content; 22 | 23 | } -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/po/MenuPo.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.po; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | @Data 8 | public class MenuPo implements Serializable { 9 | 10 | private Integer id; 11 | 12 | //名称 13 | private String name; 14 | 15 | //展示图标 16 | private String icon; 17 | 18 | //访问地址 19 | private String url; 20 | 21 | //父节点 22 | private Integer parent; 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | } -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/po/GtAliasPo.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.po; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | @Data 8 | public class GtAliasPo implements Serializable { 9 | 10 | private Integer id; 11 | 12 | //个推cid 13 | private String cid; 14 | 15 | //别名 16 | private String alias; 17 | 18 | //app类型。悦姐app,客户app,悦所等 19 | private String appType; 20 | 21 | //电话号码 22 | private String phone; 23 | 24 | private static final long serialVersionUID = 1L; 25 | 26 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | 33 | 34 | #Log file 35 | *.log 36 | 37 | # JRebel 38 | rebel.xml -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/controller/LogController.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.controller; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.ResponseBody; 6 | 7 | /** 8 | * 日志controller 9 | * 10 | * @author yxl 11 | */ 12 | @Controller 13 | @RequestMapping("/log") 14 | public class LogController { 15 | 16 | //获取错误日志 17 | @RequestMapping 18 | @ResponseBody 19 | public void getErrorLog(){ 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/util/enums/ResponseStatusEnum.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.util.enums; 2 | 3 | /** 4 | * 返回状态枚举值 5 | * @author Virgil 6 | */ 7 | public enum ResponseStatusEnum { 8 | /** 调用成功 */ 9 | OK(0), 10 | /** 服务器处理异常 */ 11 | SERVER_ERROR(1), 12 | /** 数据库访问异常 */ 13 | DB_ERROR(2), 14 | /** 未登陆状态不能访问 */ 15 | TOKEN_INVALID(3); 16 | 17 | private int value; 18 | 19 | ResponseStatusEnum(int value) { 20 | this.value = value; 21 | } 22 | 23 | public int value() { 24 | return this.value; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/dao/mysql/CustomUserDao.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.dao.mysql; 2 | 3 | import org.apache.ibatis.annotations.Param; 4 | import org.springframework.cache.annotation.CacheConfig; 5 | import org.springframework.cache.annotation.Cacheable; 6 | import org.springframework.stereotype.Repository; 7 | 8 | /** 9 | * 查询客户信息 10 | */ 11 | @Repository 12 | @CacheConfig(cacheNames = "customUser") 13 | public interface CustomUserDao { 14 | 15 | @Cacheable(key = "#root.methodName+':'+#phone") 16 | Integer selectUserIdByPhone(@Param("phone") String phone); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/util/HttpEntityUtil.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.util; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.http.HttpEntity; 5 | import org.springframework.http.HttpHeaders; 6 | import org.springframework.http.MediaType; 7 | 8 | public class HttpEntityUtil { 9 | 10 | public static HttpEntity getHttpEntity(Object o) { 11 | HttpHeaders headers = new HttpHeaders(); 12 | headers.add("Content-Type", MediaType.APPLICATION_JSON_VALUE); 13 | return new HttpEntity<>(o, headers); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/util/enums/UserTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.util.enums; 2 | 3 | public enum UserTypeEnum { 4 | 5 | PROVIDER("provider","悦姐"), 6 | CUSTOMER_ORDER("customer_order","订单系统用户"); 7 | 8 | //类型 9 | private String type; 10 | 11 | //描述 12 | private String desc; 13 | 14 | UserTypeEnum(String type, String desc) { 15 | this.type = type; 16 | this.desc = desc; 17 | } 18 | 19 | public String getType() { 20 | return type; 21 | } 22 | 23 | public String getDesc() { 24 | return desc; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/dao/mysql/AppTemplateDao.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.dao.mysql; 2 | 3 | import com.jielin.message.po.AppTemplatePo; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.springframework.cache.annotation.CacheConfig; 6 | import org.springframework.cache.annotation.Cacheable; 7 | import org.springframework.stereotype.Repository; 8 | 9 | @Repository 10 | @CacheConfig(cacheNames = "appTemplate") 11 | public interface AppTemplateDao { 12 | 13 | @Cacheable(key = "#root.methodName+':'+#type.toString()") 14 | AppTemplatePo selectByType(@Param("type") Integer type); 15 | 16 | } -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/dao/mysql/AdminRoleDao.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.dao.mysql; 2 | 3 | import com.jielin.message.po.AdminRolePo; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.springframework.cache.annotation.CacheConfig; 6 | import org.springframework.cache.annotation.Cacheable; 7 | import org.springframework.stereotype.Repository; 8 | 9 | @Repository 10 | @CacheConfig(cacheNames = "adminRole") 11 | public interface AdminRoleDao { 12 | 13 | //根据id查找用户权限 14 | @Cacheable(key = "#root.methodName+':'+#id.toString()") 15 | AdminRolePo selectByPrimaryKey(@Param("id") Integer id); 16 | } -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/dao/mysql/AdminUserDao.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.dao.mysql; 2 | 3 | import com.jielin.message.po.AdminUserPo; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.springframework.cache.annotation.CacheConfig; 6 | import org.springframework.cache.annotation.Cacheable; 7 | import org.springframework.stereotype.Repository; 8 | 9 | @Repository 10 | @CacheConfig(cacheNames = "adminUser") 11 | public interface AdminUserDao { 12 | 13 | //查找用户 14 | @Cacheable(key = "#root.methodName+':'+#userName") 15 | AdminUserPo findUserByUsername(@Param("userName") String userName); 16 | 17 | } -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/util/enums/DingMsgTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.util.enums; 2 | 3 | public enum DingMsgTypeEnum { 4 | 5 | TEXT("text", "文本"), 6 | 7 | IMAGE("image", "图片"), 8 | 9 | LINK("link", "链接"), 10 | 11 | CARD("action_card", "卡片"); 12 | 13 | private String type; 14 | 15 | private String desc; 16 | 17 | DingMsgTypeEnum(String type, String desc) { 18 | this.type = type; 19 | this.desc = desc; 20 | } 21 | 22 | public String getType() { 23 | return type; 24 | } 25 | 26 | public String getDesc() { 27 | return desc; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/util/enums/SendMsgResultEnum.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.util.enums; 2 | 3 | public enum SendMsgResultEnum { 4 | SENDING(0, "投递中"), 5 | SUCCESS(1, "消费成功"), 6 | ENQUEUE_FAIL(2, "投递失败"), 7 | CONSUME_FAIL(3, "消费失败"); 8 | 9 | private Integer status; 10 | 11 | private String desc; 12 | 13 | SendMsgResultEnum(Integer status, String desc) { 14 | this.status = status; 15 | this.desc = desc; 16 | } 17 | 18 | public Integer getStatus() { 19 | return status; 20 | } 21 | 22 | 23 | public String getDesc() { 24 | return desc; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/websocket/pojo/AdminHeaderContent.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.websocket.pojo; 2 | 3 | 4 | import com.jielin.message.util.enums.WsDataEnum; 5 | import lombok.Data; 6 | 7 | /** 8 | * jielin_web_admin系统头部展示信息 9 | */ 10 | @Data 11 | public class AdminHeaderContent { 12 | 13 | private int type = WsDataEnum.ADMIN_DATA_HEADER.getType(); 14 | 15 | /** 16 | * 待审批请假数量 17 | */ 18 | private long leaveWaitApproval; 19 | 20 | /** 21 | * 今日待排单数量 22 | */ 23 | private long waitSchedule; 24 | 25 | /** 26 | * 异常订单数量(溢出订单) 27 | */ 28 | private long overflowOrder; 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/websocket/config/CustomWebSocketPrincipal.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.websocket.config; 2 | 3 | import java.security.Principal; 4 | 5 | /** 6 | * 自定义{@link java.security.Principal} 7 | * 当选择对单一用户进行浏览器消息推送时需要使用该用户信息 8 | */ 9 | public class CustomWebSocketPrincipal implements Principal { 10 | 11 | /** 12 | * 系统名称+用户id,例如:web-admin240(前期只使用了用户id) 13 | */ 14 | private String userName; 15 | 16 | public CustomWebSocketPrincipal(String userName) { 17 | this.userName = userName; 18 | } 19 | 20 | @Override 21 | public String getName() { 22 | return userName; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/dao/mysql/MenuDao.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.dao.mysql; 2 | 3 | import com.jielin.message.po.MenuPo; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.springframework.cache.annotation.CacheConfig; 6 | import org.springframework.cache.annotation.Cacheable; 7 | import org.springframework.stereotype.Repository; 8 | 9 | import java.util.List; 10 | 11 | @Repository 12 | @CacheConfig(cacheNames = "Menu") 13 | public interface MenuDao { 14 | 15 | @Cacheable(key = "#root.methodName") 16 | List selectAllParent(); 17 | 18 | @Cacheable(key = "#root.methodName+':'+#parentId") 19 | List selectAllChild(@Param("parentId") Integer parentId); 20 | 21 | } -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/service/ProducerService.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.service; 2 | 3 | import com.jielin.message.dto.ParamDto; 4 | import com.jielin.message.util.MessageSendAsync; 5 | import com.jielin.message.util.constant.MsgConstant; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | 10 | /** 11 | * rabbitMq生产者,测试通过生产者生成消息 12 | * 13 | * @author yxl 14 | */ 15 | @Service 16 | public class ProducerService { 17 | 18 | @Autowired 19 | private MessageSendAsync messageSendAsync; 20 | 21 | public void send(ParamDto paramDto) { 22 | messageSendAsync.sendMsg("", MsgConstant.PUSH_MSG, paramDto); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/po/AuthMemberPo.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.po; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | import java.util.Date; 7 | 8 | @Data 9 | public class AuthMemberPo implements Serializable { 10 | 11 | private static final long serialVersionUID = 1L; 12 | 13 | private Integer id; 14 | 15 | private String openid; 16 | 17 | private String platform; 18 | 19 | private Date updateTime; 20 | 21 | private String token; 22 | 23 | private Date tokenExptime; 24 | 25 | private Integer customId; 26 | 27 | private Byte customType; 28 | 29 | private Date bindTime; 30 | 31 | private String remark; 32 | 33 | private String nickname; 34 | 35 | } -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/synpush/app/AppMsgPushHandler.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.synpush.app; 2 | 3 | import com.jielin.message.dto.ParamDto; 4 | import com.jielin.message.po.OperatePo; 5 | 6 | import java.net.URISyntaxException; 7 | 8 | /** 9 | * app推送处理的handler接口 10 | * 11 | * @author yxl 12 | */ 13 | public interface AppMsgPushHandler { 14 | 15 | // 推送消息给所有的用户 16 | public boolean sendPushAll(ParamDto paramDto, OperatePo operatePo) throws Exception; 17 | 18 | //推送通知给单一用户 19 | public boolean sendPushToSingle(ParamDto paramDto, OperatePo operatePo) throws Exception; 20 | 21 | //获取需要推送消息的接收人的信息 22 | public T getReceiverBindingInfo(ParamDto paramDto, OperatePo operatePo) throws URISyntaxException; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/synpush/app/UniPush/GtBindingInfo.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.synpush.app.UniPush; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | import java.io.Serializable; 7 | import java.util.Date; 8 | 9 | @Data 10 | @Accessors(chain = true) 11 | public class GtBindingInfo implements Serializable { 12 | 13 | private Integer id; 14 | 15 | //个推cid 16 | private String cid; 17 | 18 | //别名 19 | private String alias; 20 | 21 | //app类型。悦姐app,客户app,悦所等 22 | private String appType; 23 | 24 | //电话号码 25 | private String phone; 26 | 27 | //是否登录 28 | private byte isLogin; 29 | 30 | //创建时间 31 | private Date createTime; 32 | 33 | //更新时间 34 | private Date updateTime; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/util/enums/WsDataEnum.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.util.enums; 2 | 3 | public enum WsDataEnum { 4 | 5 | ADMIN_DATA_HEADER(0,"后台管理系统头信息"), 6 | 7 | ADMIN_DATA_ALERT(1,"后台管理系统弹出框信息"); 8 | 9 | //类型 10 | private Integer type; 11 | 12 | //描述 13 | private String desc; 14 | 15 | WsDataEnum(Integer type,String desc){ 16 | this.type = type; 17 | this.desc = desc; 18 | } 19 | 20 | public Integer getType() { 21 | return type; 22 | } 23 | 24 | public void setType(Integer type) { 25 | this.type = type; 26 | } 27 | 28 | public String getDesc() { 29 | return desc; 30 | } 31 | 32 | public void setDesc(String desc) { 33 | this.desc = desc; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/websocket/config/SecuritySocketConfig.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.websocket.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; 5 | import org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer; 6 | 7 | @Configuration 8 | public class SecuritySocketConfig extends AbstractSecurityWebSocketMessageBrokerConfigurer { 9 | 10 | protected boolean sameOriginDisabled() { 11 | return true; 12 | } 13 | 14 | protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) { 15 | messages.simpDestMatchers("/app/**").permitAll();//permitAll(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/JielinMessageApplication.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message; 2 | 3 | import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; 4 | import org.mybatis.spring.annotation.MapperScan; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import org.springframework.retry.annotation.EnableRetry; 8 | import org.springframework.scheduling.annotation.EnableScheduling; 9 | 10 | @SpringBootApplication 11 | @MapperScan("com.jielin.message.dao.mysql") 12 | @EnableRetry 13 | @EnableApolloConfig 14 | @EnableScheduling 15 | public class JielinMessageApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(JielinMessageApplication.class, args); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/po/MsgPushPo.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.po; 2 | 3 | import lombok.Data; 4 | import lombok.NoArgsConstructor; 5 | 6 | import java.io.Serializable; 7 | 8 | @Data 9 | @NoArgsConstructor 10 | public class MsgPushPo implements Serializable { 11 | 12 | private static final long serialVersionUID = 1L; 13 | 14 | private Integer id; 15 | 16 | //描述 17 | private String dsc; 18 | 19 | //操作类型 20 | private Integer operateType; 21 | 22 | //推送类型 23 | private Integer optionValue; 24 | 25 | //平台类型 26 | private Integer platform; 27 | 28 | //用户类型 29 | private String userType; 30 | 31 | //优先级 32 | private Integer priority; 33 | 34 | //是否启用 35 | private Boolean enable; 36 | 37 | //当前推送成功后下一个推送规则是否需要继续 38 | private Boolean nextStop; 39 | 40 | } -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/po/AdminRolePo.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.po; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * 登录用户角色 9 | * 10 | * @author yxl 11 | */ 12 | @Data 13 | public class AdminRolePo implements Serializable { 14 | 15 | private static final long serialVersionUID = 1L; 16 | 17 | private Integer id; 18 | 19 | private String name; 20 | 21 | private String description; 22 | 23 | private Integer parent; 24 | 25 | private Boolean enabled; 26 | 27 | private Integer priority; 28 | 29 | private Integer sortOrder; 30 | 31 | public AdminRolePo() { 32 | this.name = ""; 33 | this.description = ""; 34 | this.parent = 0; 35 | this.enabled = true; 36 | this.priority = 0; 37 | this.sortOrder = 0; 38 | } 39 | } -------------------------------------------------------------------------------- /src/main/resources/static/js/home.js: -------------------------------------------------------------------------------- 1 | layui.config({ 2 | base: './js/' 3 | }).extend({ //设定模块别名 4 | menu: 'menu', 5 | admin: 'admin' 6 | }); 7 | layui.use(['jquery','admin', 'menu'], function () { 8 | var $ = layui.jquery, 9 | menu = layui.menu, 10 | admin = layui.admin; 11 | $(function () { 12 | // 左侧导航区域(可配合layui已有的垂直导航) 13 | $.ajax({ 14 | url: contextPath + "menu", 15 | type: 'get', 16 | dataType: 'json', 17 | success: function(res) { 18 | menu.getJsonMenu(res); 19 | }, 20 | error: function(){ 21 | layer.alert("系统异常,请联系管理员", function () { 22 | //退出 23 | window.location.href = "/logout"; 24 | }); 25 | } 26 | }); 27 | }); 28 | }); -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/dao/mysql/MsgPushDao.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.dao.mysql; 2 | 3 | import com.jielin.message.po.MsgPushPo; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.springframework.stereotype.Repository; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * 消息推送的配置项 11 | * 12 | * @author yxl 13 | */ 14 | @Repository 15 | public interface MsgPushDao { 16 | 17 | List selectEnableByCondition(@Param("operateType") Integer operateType, 18 | @Param("platform") Integer platform, @Param("userType") String userType); 19 | 20 | List selectAll(); 21 | 22 | List selectAllByCondition(MsgPushPo msgPushPo); 23 | 24 | int deleteById(@Param("id") Integer id); 25 | 26 | int addRecord(MsgPushPo msgPushPo); 27 | 28 | int updateRecord(MsgPushPo msgPushPo); 29 | } -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/util/constant/MailConstant.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.util.constant; 2 | 3 | /** 4 | * @author yxl 5 | * @description 邮件常量类 6 | * @date 2021/7/7 4:38 下午 7 | * @since jdk1.8 8 | */ 9 | public class MailConstant { 10 | 11 | /** 12 | * 发件人 13 | */ 14 | public static final String SEND_FROM = "ping@yueguanjia.com"; 15 | 16 | /** 17 | * 收件人 18 | */ 19 | public static final String FROM_TO = "formTo"; 20 | 21 | /** 22 | * 收件人 23 | */ 24 | public static final String SEND_TO = "sendTo"; 25 | 26 | /** 27 | * 邮件参数 28 | */ 29 | public static final String MAIL_PARAMS = "mailParams"; 30 | 31 | /** 32 | * 邮件主题 33 | */ 34 | public static final String SUBJECT = "subject"; 35 | 36 | /** 37 | * 发送内容 38 | */ 39 | public static final String CONTENT = "content"; 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/synpush/system/SystemMsgPush.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.synpush.system; 2 | 3 | import com.jielin.message.dto.ParamDto; 4 | import com.jielin.message.po.OperatePo; 5 | import com.jielin.message.synpush.MsgPush; 6 | import lombok.extern.slf4j.Slf4j; 7 | import org.springframework.stereotype.Component; 8 | 9 | import static com.jielin.message.util.enums.PushTypeEnum.SYSTEM_PUSH; 10 | 11 | /** 12 | * 系统内部消息推送 13 | */ 14 | @Component("systemMsgPush") 15 | @Slf4j 16 | public class SystemMsgPush extends MsgPush { 17 | @Override 18 | public boolean pushMsg(ParamDto paramDto, OperatePo operatePo) throws Exception { 19 | super.insertMsgSendLog(paramDto, operatePo.getOperateName(), SYSTEM_PUSH, true, "消息内部推送!"); 20 | return true; 21 | } 22 | 23 | @Override 24 | public boolean supports(Integer handlerType) { 25 | return SYSTEM_PUSH.getType() == handlerType; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/controller/TemplateController.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.controller; 2 | 3 | 4 | import com.jielin.message.dao.mongo.TemplateDao; 5 | import com.jielin.message.dto.ResponseDto; 6 | import com.jielin.message.po.Template; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.PostMapping; 9 | import org.springframework.web.bind.annotation.RequestBody; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | @RestController 14 | @RequestMapping("/template") 15 | public class TemplateController { 16 | 17 | @Autowired 18 | private TemplateDao templateDao; 19 | 20 | @PostMapping("/") 21 | public ResponseDto addTemplate(@RequestBody Template template) { 22 | templateDao.insert(template); 23 | return new ResponseDto(); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/websocket/pojo/AdminAlertContent.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.websocket.pojo; 2 | 3 | 4 | import com.jielin.message.util.enums.WsDataEnum; 5 | import lombok.Data; 6 | 7 | /** 8 | * jielin_web_admin系统请假弹出框展示信息 9 | */ 10 | @Data 11 | public class AdminAlertContent { 12 | 13 | private int type = WsDataEnum.ADMIN_DATA_ALERT.getType(); 14 | 15 | /** 16 | * 请假id 17 | */ 18 | private Integer leaveId; 19 | 20 | /** 21 | * 申请人 22 | */ 23 | private String leaveUser; 24 | 25 | /** 26 | * 请假起始时间 27 | */ 28 | private String leaveStartTime; 29 | 30 | /** 31 | * 请假结束时间 32 | */ 33 | private String leaveEndTime; 34 | 35 | /** 36 | * 请假理由 37 | */ 38 | private String leaveReason; 39 | 40 | /** 41 | * 影响订单数 42 | */ 43 | private int affectOrders; 44 | 45 | /** 46 | * 影响周期定 47 | */ 48 | private int affectOrderPackage; 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/dto/MenuDto.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.dto; 2 | 3 | import com.jielin.message.po.MenuPo; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | /** 12 | * 操作的tabMenu数据 13 | */ 14 | @Data 15 | @NoArgsConstructor 16 | public class MenuDto implements Serializable { 17 | 18 | private Integer id; 19 | 20 | //名称 21 | private String name; 22 | 23 | //展示图标 24 | private String icon; 25 | 26 | //访问地址 27 | private String url; 28 | 29 | //子节点 30 | private List children; 31 | 32 | public MenuDto(MenuPo menuPo){ 33 | this.id = menuPo.getId(); 34 | this.name = menuPo.getName(); 35 | this.icon = menuPo.getIcon(); 36 | this.url = menuPo.getUrl(); 37 | this.children = new ArrayList<>(); 38 | } 39 | 40 | private static final long serialVersionUID = 1L; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/util/constant/DingMsgConstant.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.util.constant; 2 | 3 | //推送参数中钉钉的参数key 4 | public class DingMsgConstant { 5 | 6 | //消息类型 7 | public static final String DING_MSG_TYPE = "dingMsgType"; 8 | 9 | //钉钉文本消息的内容 10 | public static final String DING_MSG_CONTENT = "dingMsgContent"; 11 | 12 | //mediaId 13 | public static final String DING_MEDIA_ID = "dingMediaId"; 14 | 15 | //mediaId 16 | public static final String DING_LINK_TITLE = "dingLinkTitle"; 17 | 18 | public static final String DING_LINK_TEXT = "dingLinkText"; 19 | 20 | public static final String DING_LINK_MESSAGE_URL = "dingLinkMessageUrl"; 21 | 22 | public static final String DING_LINK_PIC_URL = "dingLinkPicUrl"; 23 | 24 | public static final String DING_CARD_BTN_TITLE = "dingCardBtnTitle"; 25 | 26 | public static final String DING_CARD_ACTION_URL = "dingCardActionUrl"; 27 | 28 | public static final String DING_CARD_TITLE = "dingCardTitle"; 29 | } 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 操作文档 2 | 3 | ## 准备工作 4 | ### 1.需要初始化mysql数据库(init.sql) 5 | * jl_msg_operate(操作类型表,例如:下单成功通知服务人员) 6 | * jl_msg_option(推送类型表,例如:app推送,短线推送) 7 | * jl_msg_platform(消息所属平台表) 8 | * jl_msg_push(操作推送类型表,具体某个操作的某种推送方式) 9 | * jl_msg_uniapp(uniapp数据库配置信息) 10 | ### 2.mongodb数据库(mongo_init.txt) 11 | * jl_msg_template(各种推送方式的模版数据) 12 | 13 | ## 消息队列和推送方式说明 14 | **整个消息系统采用的是异步消费的形式推送所有的需要推送的信息,也可使用同步接口去推送数据** 15 | 此次使用的消息队列为rabbitmq,下单操作的推送队列名称为:**push_msg**, 16 | 推送方式有以下几种,更多的推送方式,请继承**MsgPush**抽象类 17 | 18 | - 微信公众号 19 | - 微信小程序 20 | - 短线推送 21 | + 手机app(极光推送,个推推送,其他的推送方式请实现**AppMsgPushHandler**接口) 22 | * 离线推送 23 | * 在线推送 24 | 25 | 26 | 部门之间的推送数据采用的是钉钉推送,消息队列的名称为:**ding_push_msg** 27 | 28 | ## 流程说明 29 | 需要推送消息的系统需要接入rabbitmq的生产者,生产消息 30 | 31 | ```flow 32 | product=>start: 消息生产者 33 | mq=>operation: rabbitmq 34 | costomer=>operation: 消息推送系统 35 | cond=>condition: 是否需要推送数据 Yes or No? 36 | handler=>operation: 各种推送的实现 37 | e=>end: 推送结束 38 | 39 | product->mq->costomer->cond 40 | cond(yes)->handler 41 | cond(no)->costomer 42 | handler->e 43 | ``` -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.5 MIT License By https://www.layui.com */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/config/AccessWhiteListConfig.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.config; 2 | 3 | import lombok.Getter; 4 | import org.apache.commons.lang3.StringUtils; 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | /** 12 | * 同步推送调用接口时的白名单限制 13 | * 14 | * @author yxl 15 | */ 16 | @Configuration 17 | @ConfigurationProperties(prefix = "white") 18 | @Getter 19 | public class AccessWhiteListConfig { 20 | 21 | private List access = new ArrayList<>(); 22 | 23 | //查看调用该接口的ip是否有权限调用 24 | public final boolean canAccess(String remoteIp) { 25 | boolean result = false; 26 | if (StringUtils.isBlank(remoteIp)) { 27 | return result; 28 | } 29 | for (String ip : this.access) { 30 | if (remoteIp.equals(ip)) { 31 | result = true; 32 | break; 33 | } 34 | } 35 | return result; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/resources/templates/error/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 404--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | 19 | 20 |
21 |
22 | 23 |

我勒个去,页面被外星人挟持了!

24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/po/AdminUserPo.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.po; 2 | 3 | import lombok.Data; 4 | import lombok.NoArgsConstructor; 5 | 6 | import java.io.Serializable; 7 | import java.util.Date; 8 | 9 | /** 10 | * 登录用户 11 | * 12 | * @author yxl 13 | */ 14 | @Data 15 | @NoArgsConstructor 16 | public class AdminUserPo implements Serializable { 17 | 18 | private static final long serialVersionUID = 1L; 19 | 20 | private Integer id; 21 | 22 | private String username; 23 | 24 | private String email; 25 | 26 | private String password; 27 | 28 | private Date createTime; 29 | 30 | private Date lastLoginTime; 31 | 32 | private String lastLoginIp; 33 | 34 | private Integer role; 35 | 36 | private Byte status; 37 | 38 | private Integer org; 39 | 40 | private String lastLoginLocation; 41 | 42 | private String remark; 43 | 44 | private String phone; 45 | 46 | private String province; 47 | 48 | private String city; 49 | 50 | private String district; 51 | 52 | private Boolean enabled; 53 | 54 | private Date updateTime; 55 | 56 | 57 | } -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/po/MsgPrepareSendLog.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.po; 2 | 3 | 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import lombok.experimental.Accessors; 7 | import org.springframework.data.mongodb.core.mapping.Document; 8 | 9 | import java.io.Serializable; 10 | import java.util.Date; 11 | import java.util.List; 12 | 13 | @Data 14 | @Accessors(chain = true) 15 | @Document(collection = "jl_msg_prepare_send_log") 16 | @NoArgsConstructor 17 | public class MsgPrepareSendLog implements Serializable { 18 | private static final long serialVersionUID = 1L; 19 | 20 | //唯一标识 21 | private String _id; 22 | 23 | //业务系统的消息唯一标实,用来查询消息是否投递成功 24 | private String msgId; 25 | 26 | //消息的唯一标识 27 | private String correlationId; 28 | 29 | //手机号 30 | private String phone; 31 | 32 | //插入时间 33 | private Date operateTime = new Date(); 34 | 35 | //操作类型 36 | private Integer operateType; 37 | 38 | //推送类型 39 | private List pushTypeList; 40 | 41 | //推送参数 42 | private String params; 43 | 44 | //其他信息 45 | private String msg; 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/controller/MainController.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.controller; 2 | 3 | import com.jielin.message.dto.MenuDto; 4 | import com.jielin.message.dto.ResponseDto; 5 | import com.jielin.message.service.MenuService; 6 | import lombok.extern.slf4j.Slf4j; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.GetMapping; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | * 登录登出以及主页的控制器 16 | * 17 | * @author yxl 18 | */ 19 | @Controller 20 | @Slf4j 21 | public class MainController { 22 | 23 | @Autowired 24 | private MenuService menuService; 25 | 26 | @GetMapping("/login") 27 | public String login() { 28 | return "login"; 29 | } 30 | 31 | @GetMapping("/home") 32 | public String home() { 33 | return "home"; 34 | } 35 | 36 | @GetMapping("/menu") 37 | @ResponseBody 38 | public ResponseDto> getMenu() { 39 | return menuService.getAll(); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/util/enums/PushTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.util.enums; 2 | 3 | /** 4 | * 推送的类型枚举 5 | * 6 | * @author yxl 7 | */ 8 | public enum PushTypeEnum { 9 | 10 | NO_PUSH(0, "不推送"), 11 | SMS_PUSH(1, "短信推送"), 12 | WX_GZH_PUSH(2, "微信公众号推送"), 13 | APP_PUSH(3, "app推送"), 14 | WX_MP_PUSH(4, "微信小程序推送"), 15 | DING_PUSH(5, "钉钉推送"), 16 | SYSTEM_PUSH(6, "系统内部推送"), 17 | WEBSOCKET_PUSH(7, "websocket推送"), 18 | Mail_PUSH(8, "邮件推送"); 19 | 20 | //类型 21 | private int type; 22 | 23 | //描述 24 | private String desc; 25 | 26 | PushTypeEnum(int type, String desc) { 27 | this.type = type; 28 | this.desc = desc; 29 | } 30 | 31 | public int getType() { 32 | return type; 33 | } 34 | 35 | public String getDesc() { 36 | return desc; 37 | } 38 | 39 | public static PushTypeEnum valueOf(Integer pushType) { 40 | for (PushTypeEnum value : PushTypeEnum.values()) { 41 | if (value.getType() == pushType) { 42 | return value; 43 | } 44 | } 45 | throw new IllegalArgumentException("错误参数"); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/code.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.5.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

'+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/controller/SynMsgPushController.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.controller; 2 | 3 | import com.jielin.message.dto.ParamDto; 4 | import com.jielin.message.dto.ResponseDto; 5 | import com.jielin.message.service.SynMsgPushService; 6 | import lombok.extern.slf4j.Slf4j; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.PostMapping; 10 | import org.springframework.web.bind.annotation.RequestBody; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.ResponseBody; 13 | 14 | /** 15 | * 同步推送调用的接口 16 | * 17 | * @author yxl 18 | */ 19 | @Controller 20 | @RequestMapping("/push") 21 | @Slf4j 22 | public class SynMsgPushController { 23 | 24 | @Autowired 25 | private SynMsgPushService synMsgPushService; 26 | 27 | @PostMapping(value = "/syn", produces = {"application/json;charset=UTF-8"}) 28 | @ResponseBody 29 | public ResponseDto synPush(@RequestBody ParamDto paramDto) { 30 | Boolean push = synMsgPushService.push(paramDto); 31 | return new ResponseDto<>(push); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/dto/ParamDto.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.dto; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.NotNull; 8 | import java.io.Serializable; 9 | import java.util.Map; 10 | 11 | /** 12 | * 推送消息发送时需要的参数 13 | * 14 | * @author yxl 15 | */ 16 | @Data 17 | @Accessors(chain = true) 18 | public class ParamDto implements Serializable { 19 | 20 | private static final long serialVersionUID = 1L; 21 | 22 | //用户id 23 | private Integer userId; 24 | 25 | //来自哪个平台(悦管家平台,悦所平台等) 26 | @NotNull(message = "所属平台不能为空,默认悦管家平台为0") 27 | private Integer platform; 28 | 29 | //需要发送的推送的类型(OperateTypeEnum) 30 | @NotNull(message = "操作类型不能为空") 31 | private Integer operateType; 32 | 33 | //需要推送的数据到哪个手机号 34 | @NotBlank(message = "用户手机号不能为空") 35 | private String phoneNumber; 36 | 37 | //用户类型 38 | private String userType; 39 | 40 | //各系统生成的唯一消息标实 41 | private String msgId; 42 | 43 | //消息的唯一标识(消息队列生成的全局唯一) 44 | private String correlationId; 45 | 46 | //入队时间 47 | private Long queuedTime; 48 | 49 | //需要的参数 50 | private Map params; 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/websocket/WebSocketService.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.websocket; 2 | 3 | import com.jielin.message.websocket.pojo.SocketResponse; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.messaging.simp.SimpMessagingTemplate; 6 | import org.springframework.stereotype.Service; 7 | 8 | import java.util.List; 9 | 10 | @Service 11 | public class WebSocketService { 12 | 13 | @Autowired 14 | private SimpMessagingTemplate template; 15 | 16 | /** 17 | * 广播 18 | * 发给所有在线用户 19 | */ 20 | public void sendMsg(SocketResponse msg) { 21 | template.convertAndSend("/user/240/msg", msg); 22 | } 23 | 24 | /** 25 | * 发送给指定用户组 26 | * 27 | * @param users 用户列表 28 | * @param msg 消息 29 | */ 30 | public void send2Users(List users, SocketResponse msg) { 31 | users.forEach(userName -> template.convertAndSendToUser(userName, "/msg", msg)); 32 | } 33 | 34 | /** 35 | * 给指定的单一用户发送消息 36 | * 37 | * @param user 用户名称 38 | * @param msg 消息体 39 | */ 40 | public void send2User(String user, SocketResponse msg) { 41 | template.convertAndSendToUser(user, "/msg", msg); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/jielin/message/dao/mongo/TemplateDao.java: -------------------------------------------------------------------------------- 1 | package com.jielin.message.dao.mongo; 2 | 3 | 4 | import com.jielin.message.po.Template; 5 | import org.springframework.cache.annotation.CacheConfig; 6 | import org.springframework.cache.annotation.Cacheable; 7 | import org.springframework.data.mongodb.core.MongoTemplate; 8 | import org.springframework.data.mongodb.core.query.Criteria; 9 | import org.springframework.data.mongodb.core.query.Query; 10 | import org.springframework.stereotype.Repository; 11 | 12 | /** 13 | * 模版参数存在mongo当中 14 | * 15 | * @author yxl 16 | */ 17 | @Repository 18 | @CacheConfig(cacheNames = "Template") 19 | public class TemplateDao extends BaseDao