├── doc └── jenkins安装与运用.pdf ├── imgs ├── 20190625172030.png ├── 20190625174804.png ├── 20190625175224.png ├── 20190625175549.png ├── 20190625175639.png ├── 20190625175735.png ├── 20190625175815.png ├── 20190625175909.png ├── 4AB893CF-8AAE-4a49-A961-B6D153644027.png └── FEA1CAF8-3738-423e-A031-CCC39E2AF0EC.png ├── xmfcn-spring-cloud-zuul ├── README.md ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ └── bootstrap.yml │ │ └── java │ │ │ └── com │ │ │ └── cn │ │ │ └── xmf │ │ │ └── zuul │ │ │ ├── ZuulApplication.java │ │ │ ├── sys │ │ │ ├── MessageService.java │ │ │ └── KafKaProducerService.java │ │ │ ├── config │ │ │ └── CorsConfig.java │ │ │ └── filter │ │ │ └── GatedLaunchFilter.java │ └── test │ │ └── java │ │ └── com │ │ └── cn │ │ └── xmf │ │ └── zuul │ │ └── ZuulApplicationTests.java ├── stop.sh ├── start.sh └── pom.xml ├── xmfcn-spring-cloud-job-admin ├── src │ └── main │ │ ├── resources │ │ ├── application.yml │ │ ├── static │ │ │ ├── plugins │ │ │ │ ├── layer │ │ │ │ │ └── skin │ │ │ │ │ │ └── default │ │ │ │ │ │ ├── icon.png │ │ │ │ │ │ ├── icon-ext.png │ │ │ │ │ │ ├── loading-0.gif │ │ │ │ │ │ ├── loading-1.gif │ │ │ │ │ │ └── loading-2.gif │ │ │ │ ├── ionicons-2.0.1 │ │ │ │ │ └── fonts │ │ │ │ │ │ ├── ionicons.eot │ │ │ │ │ │ ├── ionicons.ttf │ │ │ │ │ │ └── ionicons.woff │ │ │ │ ├── font-awesome-4.5.0 │ │ │ │ │ └── fonts │ │ │ │ │ │ ├── FontAwesome.otf │ │ │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ │ └── codemirror │ │ │ │ │ └── addon │ │ │ │ │ └── hint │ │ │ │ │ └── show-hint.css │ │ │ ├── adminlte │ │ │ │ ├── plugins │ │ │ │ │ ├── iCheck │ │ │ │ │ │ └── square │ │ │ │ │ │ │ ├── red.png │ │ │ │ │ │ │ ├── aero.png │ │ │ │ │ │ │ ├── blue.png │ │ │ │ │ │ │ ├── green.png │ │ │ │ │ │ │ ├── grey.png │ │ │ │ │ │ │ ├── pink.png │ │ │ │ │ │ │ ├── aero@2x.png │ │ │ │ │ │ │ ├── blue@2x.png │ │ │ │ │ │ │ ├── green@2x.png │ │ │ │ │ │ │ ├── grey@2x.png │ │ │ │ │ │ │ ├── orange.png │ │ │ │ │ │ │ ├── pink@2x.png │ │ │ │ │ │ │ ├── purple.png │ │ │ │ │ │ │ ├── red@2x.png │ │ │ │ │ │ │ ├── square.png │ │ │ │ │ │ │ ├── yellow.png │ │ │ │ │ │ │ ├── orange@2x.png │ │ │ │ │ │ │ ├── purple@2x.png │ │ │ │ │ │ │ ├── square@2x.png │ │ │ │ │ │ │ └── yellow@2x.png │ │ │ │ │ └── datatables │ │ │ │ │ │ ├── images │ │ │ │ │ │ ├── sort_asc.png │ │ │ │ │ │ ├── sort_both.png │ │ │ │ │ │ ├── sort_desc.png │ │ │ │ │ │ ├── sort_asc_disabled.png │ │ │ │ │ │ └── sort_desc_disabled.png │ │ │ │ │ │ └── bootstrap-table-zh-cn.js │ │ │ │ ├── bootstrap │ │ │ │ │ ├── fonts │ │ │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ │ │ └── datatables │ │ │ │ │ │ └── locale │ │ │ │ │ │ ├── bootstrap-table-zh-CN.min.js │ │ │ │ │ │ ├── bootstrap-table-eu-EU.min.js │ │ │ │ │ │ ├── bootstrap-table-zh-CN.js │ │ │ │ │ │ └── bootstrap-table-eu-EU.js │ │ │ │ └── dist │ │ │ │ │ └── css │ │ │ │ │ └── google-local │ │ │ │ │ └── fonts │ │ │ │ │ ├── M2Jd71oPJhLKp0zdtTvoM40tgx99jmYGv_xzYuwd1rU.woff2 │ │ │ │ │ ├── M2Jd71oPJhLKp0zdtTvoM7YHq4FgHI02B8rPccK0FJQ.woff2 │ │ │ │ │ ├── M2Jd71oPJhLKp0zdtTvoMxgy2Fsj5sj3EzlXpqVXRKo.woff2 │ │ │ │ │ ├── ODelI1aHBYDBqgeIAH2zlC2Q8seG17bfDXYR_jUsrzg.woff2 │ │ │ │ │ ├── ODelI1aHBYDBqgeIAH2zlNOAHFN6BivSraYkjhveRHY.woff2 │ │ │ │ │ ├── ODelI1aHBYDBqgeIAH2zlNV_2ngZ8dMf8fLgjYEouxg.woff2 │ │ │ │ │ ├── fpTVHK8qsXbIeTHTrnQH6CzM2XYAq8cDhaXsrN8WXcA.woff2 │ │ │ │ │ ├── fpTVHK8qsXbIeTHTrnQH6E78GtRp3lhchupCJNw8t58.woff2 │ │ │ │ │ ├── fpTVHK8qsXbIeTHTrnQH6GQKuzMuncr0JB710wa2dPI.woff2 │ │ │ │ │ ├── fpTVHK8qsXbIeTHTrnQH6Lpx497t94oDua8KfAL9f-E.woff2 │ │ │ │ │ ├── fpTVHK8qsXbIeTHTrnQH6MAjkyiewWYrWZc50I8hK7I.woff2 │ │ │ │ │ ├── fpTVHK8qsXbIeTHTrnQH6OXKTZYPNtG1yMB_YJSqlic.woff2 │ │ │ │ │ ├── toadOcfmlt9b38dHJxOBGCOFnW3Jk0f09zW_Yln67Ac.woff2 │ │ │ │ │ ├── toadOcfmlt9b38dHJxOBGClYwVOhDRq2vbpGRTZ7bbs.woff2 │ │ │ │ │ ├── toadOcfmlt9b38dHJxOBGDRVvBvQIc1z78c__uoBcyI.woff2 │ │ │ │ │ ├── toadOcfmlt9b38dHJxOBGD_j0nMiB9fPhg_k1wdK2h0.woff2 │ │ │ │ │ ├── toadOcfmlt9b38dHJxOBGDovqjS_dXPZszO_XltPdNg.woff2 │ │ │ │ │ ├── toadOcfmlt9b38dHJxOBGEo0As1BFRXtCDhS66znb_k.woff2 │ │ │ │ │ ├── toadOcfmlt9b38dHJxOBGFKFh1TDTPrUZWzVp6FtpG8.woff2 │ │ │ │ │ ├── toadOcfmlt9b38dHJxOBGFxe-GPfKKFmiXaJ_Q0GFr8.woff2 │ │ │ │ │ ├── toadOcfmlt9b38dHJxOBGOode0-EuMkY--TSyExeINg.woff2 │ │ │ │ │ └── ODelI1aHBYDBqgeIAH2zlNOAHFN6BivSraYkjhveRHY[0].woff2 │ │ │ ├── js │ │ │ │ ├── user.menu.tree.js │ │ │ │ └── kafka.index.js │ │ │ └── treeview │ │ │ │ └── bootstrap-treeview.css │ │ ├── freemarker.properties │ │ ├── template │ │ │ ├── common │ │ │ │ ├── common.exception.ftl │ │ │ │ └── common-error.ftl │ │ │ └── help.ftl │ │ └── bootstrap.yml │ │ └── java │ │ └── com │ │ └── cn │ │ └── xmf │ │ └── job │ │ └── admin │ │ ├── core │ │ ├── route │ │ │ ├── strategy │ │ │ │ ├── ExecutorRouteFirst.java │ │ │ │ ├── ExecutorRouteLast.java │ │ │ │ ├── ExecutorRouteRandom.java │ │ │ │ └── ExecutorRouteRound.java │ │ │ └── ExecutorRouter.java │ │ ├── util │ │ │ └── FtlUtil.java │ │ ├── trigger │ │ │ └── TriggerTypeEnum.java │ │ ├── jobbean │ │ │ └── RemoteHttpJobBean.java │ │ └── model │ │ │ ├── XxlJobRegistry.java │ │ │ └── XxlJobLogGlue.java │ │ ├── job │ │ └── dao │ │ │ ├── XxlJobLogGlueDao.java │ │ │ ├── XxlJobGroupDao.java │ │ │ ├── XxlJobRegistryDao.java │ │ │ └── XxlJobInfoDao.java │ │ ├── config │ │ ├── WebConfig.java │ │ └── XxlJobAdminConfig.java │ │ ├── common │ │ └── PermissionInterceptor.java │ │ ├── sys │ │ ├── MessageService.java │ │ └── KafKaProducerService.java │ │ ├── JobAdminApplication.java │ │ ├── role │ │ ├── model │ │ │ ├── JobMenuRole.java │ │ │ └── JobRole.java │ │ └── dao │ │ │ ├── JobRoleDao.java │ │ │ └── JobMenuRoleDao.java │ │ ├── code │ │ ├── model │ │ │ └── CodeTable.java │ │ └── dao │ │ │ └── CodeSchemeDao.java │ │ ├── menu │ │ └── model │ │ │ └── JobMenu.java │ │ ├── redis │ │ └── RedisController.java │ │ └── user │ │ └── dao │ │ └── JobUserDao.java ├── README.md ├── stop.sh └── start.sh ├── xmfcn-spring-cloud-job-service ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ └── bootstrap.yml │ │ └── java │ │ │ └── com │ │ │ └── cn │ │ │ └── xmf │ │ │ └── job │ │ │ ├── JobServiceApplication.java │ │ │ └── sys │ │ │ ├── MessageService.java │ │ │ └── KafKaProducerService.java │ └── test │ │ └── java │ │ └── com │ │ └── cn │ │ └── xmf │ │ └── job │ │ └── JobServiceApplicationTests.java ├── stop.sh ├── start.sh └── pom.xml ├── xmfcn-spring-cloud-wechat-api ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ └── bootstrap.yml │ │ └── java │ │ │ └── com │ │ │ └── cn │ │ │ └── xmf │ │ │ └── api │ │ │ ├── WeChatApiApplication.java │ │ │ ├── prize │ │ │ └── service │ │ │ │ ├── UserPrizeHelperService.java │ │ │ │ └── WinnersListHelperService.java │ │ │ ├── meet │ │ │ └── service │ │ │ │ └── MeetingHelperService.java │ │ │ ├── invit │ │ │ └── service │ │ │ │ └── InvitationHelperService.java │ │ │ ├── sys │ │ │ └── rpc │ │ │ │ ├── MessageService.java │ │ │ │ └── KafKaProducerService.java │ │ │ ├── user │ │ │ └── controller │ │ │ │ └── LogController.java │ │ │ └── comment │ │ │ └── service │ │ │ └── CommentHelperService.java │ └── test │ │ └── java │ │ └── com │ │ └── cn │ │ └── xmf │ │ └── api │ │ └── WeChatApiApplicationTests.java ├── stop.sh ├── start.sh └── pom.xml ├── xmfcn-spring-cloud-sys-base-service ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ └── bootstrap.yml │ │ └── java │ │ │ └── com │ │ │ └── cn │ │ │ └── xmf │ │ │ └── service │ │ │ ├── model │ │ │ ├── dingtalk │ │ │ │ ├── ActionButtonStyle.java │ │ │ │ ├── ActionCardAction.java │ │ │ │ ├── FeedCardMessageItem.java │ │ │ │ └── SendResult.java │ │ │ └── MailAuthenticator.java │ │ │ ├── enums │ │ │ └── MailServerType.java │ │ │ ├── db │ │ │ └── DruidStatController.java │ │ │ ├── SystemBaseServiceApplication.java │ │ │ └── dict │ │ │ └── dao │ │ │ └── DictDao.java │ └── test │ │ └── java │ │ └── com │ │ └── cn │ │ └── xmf │ │ └── service │ │ └── SystemServiceApplicationTests.java ├── README.md ├── stop.sh └── start.sh ├── xmfcn-spring-cloud-job-kafka-service ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ └── bootstrap.yml │ │ └── java │ │ │ └── com │ │ │ └── cn │ │ │ └── xmf │ │ │ └── job │ │ │ ├── JobKafkaServiceApplication.java │ │ │ ├── kafka │ │ │ └── IKafkaReader.java │ │ │ ├── sys │ │ │ ├── MessageService.java │ │ │ ├── KafKaProducerService.java │ │ │ └── ElasticsearchService.java │ │ │ └── config │ │ │ └── KafkaBean.java │ └── test │ │ └── java │ │ └── com │ │ └── cn │ │ └── xmf │ │ └── job │ │ └── JobKafkaServiceApplicationTests.java ├── README.md ├── stop.sh ├── start.sh └── pom.xml ├── xmfcn-spring-cloud-sys-kafka-service ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ └── bootstrap.yml │ │ └── java │ │ │ └── com │ │ │ └── cn │ │ │ └── xmf │ │ │ └── service │ │ │ ├── SystemKafkaServiceApplication.java │ │ │ └── sys │ │ │ └── MessageService.java │ └── test │ │ └── java │ │ └── com │ │ └── cn │ │ └── xmf │ │ └── service │ │ └── SystemServiceApplicationTests.java ├── README.md ├── stop.sh └── start.sh ├── xmfcn-spring-cloud-sys-redis-service ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ └── bootstrap.yml │ │ └── java │ │ │ └── com │ │ │ └── cn │ │ │ └── xmf │ │ │ └── service │ │ │ ├── SystemRedisServiceApplication.java │ │ │ └── sys │ │ │ └── MessageService.java │ └── test │ │ └── java │ │ └── com │ │ └── cn │ │ └── xmf │ │ └── service │ │ └── SystemServiceApplicationTests.java ├── README.md ├── stop.sh └── start.sh ├── xmfcn-spring-cloud-sys-elasticsearch-service ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ └── bootstrap.yml │ │ └── java │ │ │ └── com │ │ │ └── cn │ │ │ └── xmf │ │ │ └── service │ │ │ ├── SystemElasticsearchServiceApplication.java │ │ │ └── sys │ │ │ └── MessageService.java │ └── test │ │ └── java │ │ └── com │ │ └── cn │ │ └── xmf │ │ └── service │ │ └── SystemServiceApplicationTests.java ├── README.md ├── stop.sh └── start.sh ├── xmfcn-spring-cloud-wechat-service ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ └── bootstrap.yml │ │ └── java │ │ │ └── com │ │ │ └── cn │ │ │ └── xmf │ │ │ └── service │ │ │ ├── WeChatServiceApplication.java │ │ │ ├── sys │ │ │ ├── MessageService.java │ │ │ └── KafKaProducerService.java │ │ │ ├── user │ │ │ └── dao │ │ │ │ └── UserDao.java │ │ │ ├── photo │ │ │ └── dao │ │ │ │ └── PhotoDao.java │ │ │ ├── music │ │ │ └── dao │ │ │ │ └── MusicDao.java │ │ │ ├── meet │ │ │ └── dao │ │ │ │ └── MeetingDao.java │ │ │ ├── comment │ │ │ └── dao │ │ │ │ └── CommentDao.java │ │ │ └── prize │ │ │ └── dao │ │ │ ├── UserPrizeDao.java │ │ │ └── WinnersListDao.java │ └── test │ │ └── java │ │ └── com │ │ └── cn │ │ └── xmf │ │ └── service │ │ └── UserServiceApplicationTests.java ├── stop.sh └── start.sh ├── xmfcn-spring-cloud-common └── src │ └── main │ └── java │ └── com │ └── cn │ └── xmf │ ├── enums │ ├── DingMessageType.java │ ├── MailContentType.java │ └── MessageType.java │ ├── model │ ├── ding │ │ └── Message.java │ ├── msg │ │ └── Message.java │ ├── wx │ │ ├── CommentDomm.java │ │ ├── UserPrize.java │ │ └── Music.java │ └── es │ │ └── EsPage.java │ ├── base │ ├── request │ │ └── WapperedOutputStream.java │ ├── model │ │ ├── ResultCodeMessage.java │ │ └── RetData.java │ └── Interface │ │ └── SysCommon.java │ ├── util │ ├── ConstantUtil.java │ ├── ImageUtil.java │ └── M5Util.java │ └── config │ └── ServiceSecurity.java ├── xmfcn-spring-cloud-job-core └── src │ └── main │ └── java │ └── com │ └── cn │ └── xmf │ └── job │ └── core │ ├── enums │ ├── RegistryConfig.java │ └── ExecutorBlockStrategyEnum.java │ ├── handler │ ├── annotation │ │ └── JobHandler.java │ ├── impl │ │ └── GlueJobHandler.java │ └── IJobHandler.java │ ├── util │ ├── DateUtil.java │ └── ShardingUtil.java │ ├── rpc │ └── codec │ │ └── RpcResponse.java │ ├── biz │ ├── ExecutorBiz.java │ ├── AdminBiz.java │ └── model │ │ ├── LogResult.java │ │ ├── ReturnT.java │ │ ├── HandleCallbackParam.java │ │ └── RegistryParam.java │ └── glue │ └── GlueTypeEnum.java └── README.md /doc/jenkins安装与运用.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/doc/jenkins安装与运用.pdf -------------------------------------------------------------------------------- /imgs/20190625172030.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/imgs/20190625172030.png -------------------------------------------------------------------------------- /imgs/20190625174804.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/imgs/20190625174804.png -------------------------------------------------------------------------------- /imgs/20190625175224.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/imgs/20190625175224.png -------------------------------------------------------------------------------- /imgs/20190625175549.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/imgs/20190625175549.png -------------------------------------------------------------------------------- /imgs/20190625175639.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/imgs/20190625175639.png -------------------------------------------------------------------------------- /imgs/20190625175735.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/imgs/20190625175735.png -------------------------------------------------------------------------------- /imgs/20190625175815.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/imgs/20190625175815.png -------------------------------------------------------------------------------- /imgs/20190625175909.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/imgs/20190625175909.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-zuul/README.md: -------------------------------------------------------------------------------- 1 | ## 一、工程职责: 2 | 3 | 1、通过微服务统一网关服务。 4 | 5 | 2、负责请求接收和服务转发,提供请求鉴权、请求限流、请求数据收集等。 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | #不用配置中心的时候可以使用这个文件读取本地dev和prod文件 2 | #spring: 3 | # profiles: 4 | # active: dev -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-service/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | #不用配置中心的时候可以使用这个文件读取本地dev和prod文件 2 | #spring: 3 | # profiles: 4 | # active: dev -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-api/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | #不用配置中心的时候可以使用这个文件读取本地dev和prod文件 2 | #spring: 3 | # profiles: 4 | # active: dev -------------------------------------------------------------------------------- /xmfcn-spring-cloud-zuul/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | #不用配置中心的时候可以使用这个文件读取本地dev和prod文件 2 | #spring: 3 | # profiles: 4 | # active: dev 5 | -------------------------------------------------------------------------------- /imgs/4AB893CF-8AAE-4a49-A961-B6D153644027.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/imgs/4AB893CF-8AAE-4a49-A961-B6D153644027.png -------------------------------------------------------------------------------- /imgs/FEA1CAF8-3738-423e-A031-CCC39E2AF0EC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/imgs/FEA1CAF8-3738-423e-A031-CCC39E2AF0EC.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-base-service/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | #不用配置中心的时候可以使用这个文件读取本地dev和prod文件 2 | #spring: 3 | # profiles: 4 | # active: dev -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-kafka-service/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | #不用配置中心的时候可以使用这个文件读取本地dev和prod文件 2 | #spring: 3 | # profiles: 4 | # active: dev -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-kafka-service/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | #不用配置中心的时候可以使用这个文件读取本地dev和prod文件 2 | #spring: 3 | # profiles: 4 | # active: dev -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-redis-service/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | #不用配置中心的时候可以使用这个文件读取本地dev和prod文件 2 | #spring: 3 | # profiles: 4 | # active: dev -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-elasticsearch-service/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | #不用配置中心的时候可以使用这个文件读取本地dev和prod文件 2 | #spring: 3 | # profiles: 4 | # active: dev -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-service/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | #不用配置中心的时候可以使用这个文件读取本地dev和prod文件 2 | #spring: 3 | # profiles: 4 | # active: dev 5 | 6 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-base-service/README.md: -------------------------------------------------------------------------------- 1 | ## 一、工程职责: 2 | 3 | 1、负责提供系统相关的基础数据功能,包括字典数据、钉钉消息、邮件、短信等。 4 | 5 | 2、此工程为其他所有系统工程和业务工程提供基础能力辅助。此工程也可以加入缓存等功能,看业务需求而定。 6 | 7 | ## 一、拆分原因: 8 | 9 | 1、单独拆分sys-service 工程提供基础数据服务,连接数据库。 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/layer/skin/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/layer/skin/default/icon.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/red.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/aero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/aero.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/blue.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/green.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/grey.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/pink.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/layer/skin/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/layer/skin/default/icon-ext.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/layer/skin/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/layer/skin/default/loading-0.gif -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/layer/skin/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/layer/skin/default/loading-1.gif -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/layer/skin/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/layer/skin/default/loading-2.gif -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/aero@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/aero@2x.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/blue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/blue@2x.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/green@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/green@2x.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/grey@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/grey@2x.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/orange.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/pink@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/pink@2x.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/purple.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/red@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/red@2x.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/square.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/yellow.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/ionicons-2.0.1/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/ionicons-2.0.1/fonts/ionicons.eot -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/ionicons-2.0.1/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/ionicons-2.0.1/fonts/ionicons.ttf -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/ionicons-2.0.1/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/ionicons-2.0.1/fonts/ionicons.woff -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-service/src/test/java/com/cn/xmf/service/UserServiceApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service; 2 | 3 | //@RunWith(SpringRunner.class) 4 | //@SpringBootTest 5 | public class UserServiceApplicationTests { 6 | 7 | 8 | } 9 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/orange@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/orange@2x.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/purple@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/purple@2x.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/square@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/square@2x.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/yellow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/yellow@2x.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-base-service/src/test/java/com/cn/xmf/service/SystemServiceApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service; 2 | 3 | //@RunWith(SpringRunner.class) 4 | //@SpringBootTest 5 | public class SystemServiceApplicationTests { 6 | 7 | 8 | } 9 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-kafka-service/src/test/java/com/cn/xmf/service/SystemServiceApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service; 2 | 3 | //@RunWith(SpringRunner.class) 4 | //@SpringBootTest 5 | public class SystemServiceApplicationTests { 6 | 7 | 8 | } 9 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-redis-service/src/test/java/com/cn/xmf/service/SystemServiceApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service; 2 | 3 | //@RunWith(SpringRunner.class) 4 | //@SpringBootTest 5 | public class SystemServiceApplicationTests { 6 | 7 | 8 | } 9 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/datatables/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/datatables/images/sort_asc.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/datatables/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/datatables/images/sort_both.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/datatables/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/datatables/images/sort_desc.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/font-awesome-4.5.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/font-awesome-4.5.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-elasticsearch-service/src/test/java/com/cn/xmf/service/SystemServiceApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service; 2 | 3 | //@RunWith(SpringRunner.class) 4 | //@SpringBootTest 5 | public class SystemServiceApplicationTests { 6 | 7 | 8 | } 9 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/datatables/images/sort_asc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/datatables/images/sort_asc_disabled.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/datatables/images/sort_desc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/datatables/images/sort_desc_disabled.png -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/font-awesome-4.5.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/font-awesome-4.5.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/font-awesome-4.5.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/font-awesome-4.5.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/font-awesome-4.5.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/font-awesome-4.5.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/font-awesome-4.5.0/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/font-awesome-4.5.0/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-kafka-service/README.md: -------------------------------------------------------------------------------- 1 | ## 一、工程职责: 2 | 3 | 1、kafka生产者角色,负责接收并进行消息存储功能。 4 | 5 | 2、支持单一条消息入kafka,也支持批量消息入kafka功能。减少rpc请求 6 | 7 | 3、此工程为其他业务功能提供kafka消息存储功能。此工程也可以加入缓存等其他功能,看业务需求而定。 8 | 9 | ## 一、拆分原因: 10 | 11 | 1、仅仅提供kafka消息存储服务,且访问量可能比较大,特别是在系统日志收集发送队列这类功能。 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-elasticsearch-service/README.md: -------------------------------------------------------------------------------- 1 | ## 一、工程职责: 2 | 3 | 1、负责ES相关的基础能力服务,包括ES映射,索引创建、删除、数据存储,数据搜索、数据统计等。 4 | 5 | 2、支持单一条消息入ES,也支持批量消息入ES功能。减少rpc请求。 6 | 7 | 2、此工程为其他业务功能提供数据存储和搜索能力。此工程也可以加入缓存等其他功能,看业务需求而定。 8 | 9 | ## 一、拆分原因: 10 | 11 | 1、仅仅提供ES相关的服务,且访问量可能比较大,特别是在系统日志存储这个方向。 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-zuul/src/test/java/com/cn/xmf/zuul/ZuulApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.zuul; 2 | 3 | //@RunWith(SpringRunner.class) 4 | //@SpringBootTest 5 | public class ZuulApplicationTests { 6 | 7 | // @Test 8 | public void contextLoads() { 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/enums/DingMessageType.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.enums; 2 | 3 | /** 4 | * 钉钉消息类型 5 | */ 6 | public enum DingMessageType { 7 | 8 | /** 9 | * 文本 10 | */ 11 | TEXT, 12 | /** 13 | * Markdown 14 | */ 15 | MARKDWON, 16 | } 17 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/enums/MailContentType.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.enums; 2 | 3 | /** 4 | * 内容类型 5 | */ 6 | public enum MailContentType { 7 | /** 8 | * text 内容 9 | */ 10 | MAIL_TEXT, 11 | /** 12 | * html 内容 13 | */ 14 | MAIL_HTML 15 | } 16 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/README.md: -------------------------------------------------------------------------------- 1 | ## 一、工程职责: 2 | 3 | 1、负责普通任务的调度、任务管理、任务调度日志、任务调度报表相关功能。 4 | 5 | 2、负责系统职责相关功能,包括用户管理、角色管理、菜单管理等。 6 | 7 | 3、负责ES相关的展示功能,提供日志搜索、日志分析报表、线程池监控报表等。 8 | 9 | 4、提供监控功能,入Redis运行监控等。 10 | 11 | 5、其他需要界面交互相关的功能 12 | 13 | ## 二、拆分原因: 14 | 15 | 1、提供用户交互界面,管理任务调度、日志报表、数据监控等相关功能。 16 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-kafka-service/README.md: -------------------------------------------------------------------------------- 1 | ## 一、工程职责: 2 | 3 | 1、负责kafka相关的消息消费任务。 4 | 5 | 2、不对外提供服务能力,需要依赖于其他系统工程或者业务工程。 6 | 7 | ## 二、拆分原因: 8 | 9 | 1、单独拆除这个job工程是因为kafka相关的消费任务与普通的定时任务调度任务并不相同。 10 | 11 | 2、减少对kafka的依赖,如果柔和在一起,如果不想使用kafka处理任务,则需要删除一些配置和代码。 12 | 13 | 3、单一职责,每个服务都应该着力解决一个问题,而非很多个问题。职责比较清晰。 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/M2Jd71oPJhLKp0zdtTvoM40tgx99jmYGv_xzYuwd1rU.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/M2Jd71oPJhLKp0zdtTvoM40tgx99jmYGv_xzYuwd1rU.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/M2Jd71oPJhLKp0zdtTvoM7YHq4FgHI02B8rPccK0FJQ.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/M2Jd71oPJhLKp0zdtTvoM7YHq4FgHI02B8rPccK0FJQ.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/M2Jd71oPJhLKp0zdtTvoMxgy2Fsj5sj3EzlXpqVXRKo.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/M2Jd71oPJhLKp0zdtTvoMxgy2Fsj5sj3EzlXpqVXRKo.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/ODelI1aHBYDBqgeIAH2zlC2Q8seG17bfDXYR_jUsrzg.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/ODelI1aHBYDBqgeIAH2zlC2Q8seG17bfDXYR_jUsrzg.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/ODelI1aHBYDBqgeIAH2zlNOAHFN6BivSraYkjhveRHY.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/ODelI1aHBYDBqgeIAH2zlNOAHFN6BivSraYkjhveRHY.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/ODelI1aHBYDBqgeIAH2zlNV_2ngZ8dMf8fLgjYEouxg.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/ODelI1aHBYDBqgeIAH2zlNV_2ngZ8dMf8fLgjYEouxg.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/fpTVHK8qsXbIeTHTrnQH6CzM2XYAq8cDhaXsrN8WXcA.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/fpTVHK8qsXbIeTHTrnQH6CzM2XYAq8cDhaXsrN8WXcA.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/fpTVHK8qsXbIeTHTrnQH6E78GtRp3lhchupCJNw8t58.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/fpTVHK8qsXbIeTHTrnQH6E78GtRp3lhchupCJNw8t58.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/fpTVHK8qsXbIeTHTrnQH6GQKuzMuncr0JB710wa2dPI.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/fpTVHK8qsXbIeTHTrnQH6GQKuzMuncr0JB710wa2dPI.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/fpTVHK8qsXbIeTHTrnQH6Lpx497t94oDua8KfAL9f-E.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/fpTVHK8qsXbIeTHTrnQH6Lpx497t94oDua8KfAL9f-E.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/fpTVHK8qsXbIeTHTrnQH6MAjkyiewWYrWZc50I8hK7I.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/fpTVHK8qsXbIeTHTrnQH6MAjkyiewWYrWZc50I8hK7I.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/fpTVHK8qsXbIeTHTrnQH6OXKTZYPNtG1yMB_YJSqlic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/fpTVHK8qsXbIeTHTrnQH6OXKTZYPNtG1yMB_YJSqlic.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGCOFnW3Jk0f09zW_Yln67Ac.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGCOFnW3Jk0f09zW_Yln67Ac.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGClYwVOhDRq2vbpGRTZ7bbs.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGClYwVOhDRq2vbpGRTZ7bbs.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGDRVvBvQIc1z78c__uoBcyI.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGDRVvBvQIc1z78c__uoBcyI.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGD_j0nMiB9fPhg_k1wdK2h0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGD_j0nMiB9fPhg_k1wdK2h0.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGDovqjS_dXPZszO_XltPdNg.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGDovqjS_dXPZszO_XltPdNg.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGEo0As1BFRXtCDhS66znb_k.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGEo0As1BFRXtCDhS66znb_k.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGFKFh1TDTPrUZWzVp6FtpG8.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGFKFh1TDTPrUZWzVp6FtpG8.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGFxe-GPfKKFmiXaJ_Q0GFr8.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGFxe-GPfKKFmiXaJ_Q0GFr8.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGOode0-EuMkY--TSyExeINg.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/toadOcfmlt9b38dHJxOBGOode0-EuMkY--TSyExeINg.woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/model/ding/Message.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.model.ding; 2 | 3 | /** 4 | * Created by dustin on 2017/3/17. 5 | */ 6 | public interface Message { 7 | 8 | /** 9 | * 返回消息的Json格式字符串 10 | * 11 | * @return 消息的Json格式字符串 12 | */ 13 | String toJsonString(); 14 | } 15 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/ODelI1aHBYDBqgeIAH2zlNOAHFN6BivSraYkjhveRHY[0].woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airufei/xmfcn-spring-cloud/HEAD/xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/dist/css/google-local/fonts/ODelI1aHBYDBqgeIAH2zlNOAHFN6BivSraYkjhveRHY[0].woff2 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/freemarker.properties: -------------------------------------------------------------------------------- 1 | template_update_delay=0 2 | default_encoding=UTF-8 3 | output_encoding=UTF-8 4 | locale=zh_CN 5 | number_format=0.########## 6 | date_format=yyyy-MM-dd 7 | time_format=HH:mm:ss 8 | datetime_format=yyyy-MM-dd HH:mm:s 9 | classic_compatible=true 10 | template_exception_handler=ignore -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-redis-service/README.md: -------------------------------------------------------------------------------- 1 | ## 一、工程职责: 2 | 3 | 1、Redis相关的功能服务,负责Redis缓存相关功能,全局ID统一分配功能,分布式锁功能和其他Redis支持的功能。 4 | 5 | 2、支持单条消息缓存暂不支持批量消息缓存 6 | 7 | 3、此工程为其他业务功能提供Redis相关的。 8 | 9 | ## 一、拆分原因: 10 | 11 | 1、仅仅提供Redis相关的服务功能,且访问量可能比较大,特别是缓存和分布式锁相关的功能,调用端应该尽量减少RPC请求,减缓服务压力。 12 | 增加服务节点的数量可以提高服务能力,当然,这还取决于Redis本身的能力。 13 | 14 | 2、提供分布式锁实现 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/enums/MessageType.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.enums; 2 | 3 | /** 4 | * 消息类型 5 | */ 6 | public enum MessageType { 7 | /** 8 | * 短信消息 9 | */ 10 | SMSMESSAGE, 11 | /** 12 | * 钉钉消息 13 | */ 14 | DINGMESSAGE, 15 | /** 16 | * 邮件消息 17 | */ 18 | MAILMESSAGE, 19 | } 20 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-base-service/src/main/java/com/cn/xmf/service/model/dingtalk/ActionButtonStyle.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.model.dingtalk; 2 | 3 | /** 4 | * Created by dustin on 2017/3/19. 5 | */ 6 | public enum ActionButtonStyle { 7 | /** 8 | * HORIZONTAL 9 | */ 10 | HORIZONTAL, 11 | /** 12 | * VERTICAL 13 | */ 14 | VERTICAL 15 | } 16 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-core/src/main/java/com/cn/xmf/job/core/enums/RegistryConfig.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.core.enums; 2 | 3 | /** 4 | * Created by xuxueli on 17/5/10. 5 | */ 6 | public class RegistryConfig { 7 | 8 | public static final int BEAT_TIMEOUT = 30; 9 | public static final int DEAD_TIMEOUT = BEAT_TIMEOUT * 3; 10 | 11 | public enum RegistType{ EXECUTOR, ADMIN } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-api/src/test/java/com/cn/xmf/api/WeChatApiApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.api; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class WeChatApiApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-base-service/src/main/java/com/cn/xmf/service/enums/MailServerType.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.enums; 2 | 3 | /** 4 | * 邮箱类型 5 | */ 6 | public enum MailServerType { 7 | /** 8 | * 163邮箱 9 | */ 10 | MAIL_163, 11 | /** 12 | * 126邮箱 13 | */ 14 | MAIL_126, 15 | /** 16 | * qq 邮箱 17 | */ 18 | MAIL_QQ, 19 | /** 20 | * outlook邮箱 21 | */ 22 | MAIL_AUOLOOK, 23 | /** 24 | * gmail 邮箱 25 | */ 26 | MAIL_GMAIL 27 | } 28 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-zuul/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | tput sc 4 | echo -n 请等待: 5 | 6 | count=0 7 | 8 | while true 9 | do 10 | PIDS=$(ps -ef|grep java|grep xmfcn-spring-cloud-zuul-1.1.1.jar|grep -v grep|awk '{print $2}') 11 | if [ "$PIDS" == "" ]; then 12 | tput rc 13 | tput ed 14 | echo "服务已停止!" 15 | break 16 | else 17 | kill $PIDS 18 | let count++ 19 | sleep 1 20 | tput rc 21 | tput ed 22 | echo -n "$count"秒 23 | fi 24 | done -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | tput sc 4 | echo -n 请等待: 5 | 6 | count=0 7 | 8 | while true 9 | do 10 | PIDS=$(ps -ef|grep java|grep xmfcn-spring-cloud-job-admin-1.1.1.jar|grep -v grep|awk '{print $2}') 11 | if [ "$PIDS" == "" ]; then 12 | tput rc 13 | tput ed 14 | echo "服务已停止!" 15 | break 16 | else 17 | kill $PIDS 18 | let count++ 19 | sleep 1 20 | tput rc 21 | tput ed 22 | echo -n "$count"秒 23 | fi 24 | done -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-service/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | tput sc 4 | echo -n 请等待: 5 | 6 | count=0 7 | 8 | while true 9 | do 10 | PIDS=$(ps -ef|grep java|grep xmfcn-spring-cloud-job-service-1.1.1.jar|grep -v grep|awk '{print $2}') 11 | if [ "$PIDS" == "" ]; then 12 | tput rc 13 | tput ed 14 | echo "服务已停止!" 15 | break 16 | else 17 | kill $PIDS 18 | let count++ 19 | sleep 1 20 | tput rc 21 | tput ed 22 | echo -n "$count"秒 23 | fi 24 | done -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-api/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | tput sc 4 | echo -n 请等待: 5 | 6 | count=0 7 | 8 | while true 9 | do 10 | PIDS=$(ps -ef|grep java|grep xmfcn-spring-cloud-wechat-service-1.1.1.jar|grep -v grep|awk '{print $2}') 11 | if [ "$PIDS" == "" ]; then 12 | tput rc 13 | tput ed 14 | echo "服务已停止!" 15 | break 16 | else 17 | kill $PIDS 18 | let count++ 19 | sleep 1 20 | tput rc 21 | tput ed 22 | echo -n "$count"秒 23 | fi 24 | done -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-service/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | tput sc 4 | echo -n 请等待: 5 | 6 | count=0 7 | 8 | while true 9 | do 10 | PIDS=$(ps -ef|grep java|grep xmfcn-spring-cloud-wechat-service-1.1.1.jar|grep -v grep|awk '{print $2}') 11 | if [ "$PIDS" == "" ]; then 12 | tput rc 13 | tput ed 14 | echo "服务已停止!" 15 | break 16 | else 17 | kill $PIDS 18 | let count++ 19 | sleep 1 20 | tput rc 21 | tput ed 22 | echo -n "$count"秒 23 | fi 24 | done -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-kafka-service/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | tput sc 4 | echo -n 请等待: 5 | 6 | count=0 7 | 8 | while true 9 | do 10 | PIDS=$(ps -ef|grep java|grep xmfcn-spring-cloud-job-kafka-service-1.1.1.jar|grep -v grep|awk '{print $2}') 11 | if [ "$PIDS" == "" ]; then 12 | tput rc 13 | tput ed 14 | echo "服务已停止!" 15 | break 16 | else 17 | kill $PIDS 18 | let count++ 19 | sleep 1 20 | tput rc 21 | tput ed 22 | echo -n "$count"秒 23 | fi 24 | done -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-kafka-service/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | tput sc 4 | echo -n 请等待: 5 | 6 | count=0 7 | 8 | while true 9 | do 10 | PIDS=$(ps -ef|grep java|grep xmfcn-spring-cloud-sys-kafka-service-1.1.1.jar|grep -v grep|awk '{print $2}') 11 | if [ "$PIDS" == "" ]; then 12 | tput rc 13 | tput ed 14 | echo "服务已停止!" 15 | break 16 | else 17 | kill $PIDS 18 | let count++ 19 | sleep 1 20 | tput rc 21 | tput ed 22 | echo -n "$count"秒 23 | fi 24 | done -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-redis-service/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | tput sc 4 | echo -n 请等待: 5 | 6 | count=0 7 | 8 | while true 9 | do 10 | PIDS=$(ps -ef|grep java|grep xmfcn-spring-cloud-sys-redis-service-1.1.1.jar|grep -v grep|awk '{print $2}') 11 | if [ "$PIDS" == "" ]; then 12 | tput rc 13 | tput ed 14 | echo "服务已停止!" 15 | break 16 | else 17 | kill $PIDS 18 | let count++ 19 | sleep 1 20 | tput rc 21 | tput ed 22 | echo -n "$count"秒 23 | fi 24 | done -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-base-service/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | tput sc 4 | echo -n 请等待: 5 | 6 | count=0 7 | 8 | while true 9 | do 10 | PIDS=$(ps -ef|grep java|grep xmfcn-spring-cloud-sys-elasticsearch-service-1.1.1.jar|grep -v grep|awk '{print $2}') 11 | if [ "$PIDS" == "" ]; then 12 | tput rc 13 | tput ed 14 | echo "服务已停止!" 15 | break 16 | else 17 | kill $PIDS 18 | let count++ 19 | sleep 1 20 | tput rc 21 | tput ed 22 | echo -n "$count"秒 23 | fi 24 | done -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-elasticsearch-service/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | tput sc 4 | echo -n 请等待: 5 | 6 | count=0 7 | 8 | while true 9 | do 10 | PIDS=$(ps -ef|grep java|grep xmfcn-spring-cloud-sys-elasticsearch-service-1.1.1.jar|grep -v grep|awk '{print $2}') 11 | if [ "$PIDS" == "" ]; then 12 | tput rc 13 | tput ed 14 | echo "服务已停止!" 15 | break 16 | else 17 | kill $PIDS 18 | let count++ 19 | sleep 1 20 | tput rc 21 | tput ed 22 | echo -n "$count"秒 23 | fi 24 | done -------------------------------------------------------------------------------- /xmfcn-spring-cloud-zuul/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -m 4 | 5 | if [ `whoami` != "root" ];then 6 | echo "请使用root用户执行!" 7 | exit 1 8 | else 9 | PIDS=$(ps -ef | grep java | grep xmfcn-spring-cloud-zuul-1.1.1.jar | grep -v grep | awk '{print $2}') 10 | 11 | if [ "$PIDS" == "" ]; then 12 | nohup java -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -Xms500m -Xmx500m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC -jar xmfcn-spring-cloud-zuul-1.1.1.jar --spring.profiles.active=prod& 13 | sleep 1 14 | tail -f nohup.out 15 | else 16 | echo "服务正在运行中,不要重复启动!" 17 | fi 18 | fi -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -m 4 | 5 | if [ `whoami` != "root" ];then 6 | echo "请使用root用户执行!" 7 | exit 1 8 | else 9 | PIDS=$(ps -ef | grep java | grep xmfcn-spring-cloud-job-admin-1.1.1.jar | grep -v grep | awk '{print $2}') 10 | 11 | if [ "$PIDS" == "" ]; then 12 | nohup java -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -Xms500m -Xmx500m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC -jar xmfcn-spring-cloud-job-admin-1.1.1.jar --spring.profiles.active=prod& 13 | sleep 1 14 | tail -f nohup.out 15 | else 16 | echo "服务正在运行中,不要重复启动!" 17 | fi 18 | fi -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-api/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -m 4 | 5 | if [ `whoami` != "root" ];then 6 | echo "请使用root用户执行!" 7 | exit 1 8 | else 9 | PIDS=$(ps -ef | grep java | grep xmfcn-spring-cloud-wechat-api-1.1.1.jar | grep -v grep | awk '{print $2}') 10 | 11 | if [ "$PIDS" == "" ]; then 12 | nohup java -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -Xms500m -Xmx500m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC -jar xmfcn-spring-cloud-wechat-api-1.1.1.jar --spring.profiles.active=prod& 13 | sleep 1 14 | tail -f nohup.out 15 | else 16 | echo "服务正在运行中,不要重复启动!" 17 | fi 18 | fi -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-service/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -m 4 | 5 | if [ `whoami` != "root" ];then 6 | echo "请使用root用户执行!" 7 | exit 1 8 | else 9 | PIDS=$(ps -ef | grep java | grep xmfcn-spring-cloud-job-service-1.1.1.jar | grep -v grep | awk '{print $2}') 10 | 11 | if [ "$PIDS" == "" ]; then 12 | nohup java -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -Xms500m -Xmx500m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC -jar xmfcn-spring-cloud-job-service-1.1.1.jar --spring.profiles.active=prod& 13 | sleep 1 14 | tail -f nohup.out 15 | else 16 | echo "服务正在运行中,不要重复启动!" 17 | fi 18 | fi -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-base-service/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -m 4 | 5 | if [ `whoami` != "root" ];then 6 | echo "请使用root用户执行!" 7 | exit 1 8 | else 9 | PIDS=$(ps -ef | grep java | grep xmfcn-spring-cloud-sys-service-1.1.1.jar | grep -v grep | awk '{print $2}') 10 | 11 | if [ "$PIDS" == "" ]; then 12 | nohup java -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -Xms500m -Xmx500m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC -jar xmfcn-spring-cloud-sys-service-1.1.1.jar --spring.profiles.active=prod& 13 | sleep 1 14 | tail -f nohup.out 15 | else 16 | echo "服务正在运行中,不要重复启动!" 17 | fi 18 | fi -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-core/src/main/java/com/cn/xmf/job/core/handler/annotation/JobHandler.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.core.handler.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * annotation for job handler 11 | * @author 2016-5-17 21:06:49 12 | */ 13 | @Target({ElementType.TYPE}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Inherited 16 | public @interface JobHandler { 17 | 18 | String value() default ""; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-service/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -m 4 | 5 | if [ `whoami` != "root" ];then 6 | echo "请使用root用户执行!" 7 | exit 1 8 | else 9 | PIDS=$(ps -ef | grep java | grep xmfcn-spring-cloud-wechat-service-1.1.1.jar | grep -v grep | awk '{print $2}') 10 | 11 | if [ "$PIDS" == "" ]; then 12 | nohup java -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -Xms500m -Xmx500m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC -jar xmfcn-spring-cloud-wechat-service-1.1.1.jar --spring.profiles.active=prod& 13 | sleep 1 14 | tail -f nohup.out 15 | else 16 | echo "服务正在运行中,不要重复启动!" 17 | fi 18 | fi -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-kafka-service/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -m 4 | 5 | if [ `whoami` != "root" ];then 6 | echo "请使用root用户执行!" 7 | exit 1 8 | else 9 | PIDS=$(ps -ef | grep java | grep xmfcn-spring-cloud-job-kafka-service-1.1.1.jar | grep -v grep | awk '{print $2}') 10 | 11 | if [ "$PIDS" == "" ]; then 12 | nohup java -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -Xms500m -Xmx500m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC -jar xmfcn-spring-cloud-job-kafka-service-1.1.1.jar --spring.profiles.active=prod& 13 | sleep 1 14 | tail -f nohup.out 15 | else 16 | echo "服务正在运行中,不要重复启动!" 17 | fi 18 | fi -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-kafka-service/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -m 4 | 5 | if [ `whoami` != "root" ];then 6 | echo "请使用root用户执行!" 7 | exit 1 8 | else 9 | PIDS=$(ps -ef | grep java | grep xmfcn-spring-cloud-sys-kafka-service-1.1.1.jar | grep -v grep | awk '{print $2}') 10 | 11 | if [ "$PIDS" == "" ]; then 12 | nohup java -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -Xms500m -Xmx500m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC -jar xmfcn-spring-cloud-sys-kafka-service-1.1.1.jar --spring.profiles.active=prod& 13 | sleep 1 14 | tail -f nohup.out 15 | else 16 | echo "服务正在运行中,不要重复启动!" 17 | fi 18 | fi -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-redis-service/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -m 4 | 5 | if [ `whoami` != "root" ];then 6 | echo "请使用root用户执行!" 7 | exit 1 8 | else 9 | PIDS=$(ps -ef | grep java | grep xmfcn-spring-cloud-sys-redis-service-1.1.1.jar | grep -v grep | awk '{print $2}') 10 | 11 | if [ "$PIDS" == "" ]; then 12 | nohup java -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -Xms500m -Xmx500m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC -jar xmfcn-spring-cloud-sys-redis-service-1.1.1.jar --spring.profiles.active=prod& 13 | sleep 1 14 | tail -f nohup.out 15 | else 16 | echo "服务正在运行中,不要重复启动!" 17 | fi 18 | fi -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-api/src/main/java/com/cn/xmf/api/WeChatApiApplication.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.api; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 6 | import org.springframework.cloud.openfeign.EnableFeignClients; 7 | 8 | @SpringBootApplication 9 | @EnableDiscoveryClient 10 | @EnableFeignClients 11 | public class WeChatApiApplication { 12 | 13 | public static void main(String[] args) { 14 | SpringApplication.run(WeChatApiApplication.class, args); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-elasticsearch-service/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -m 4 | 5 | if [ `whoami` != "root" ];then 6 | echo "请使用root用户执行!" 7 | exit 1 8 | else 9 | PIDS=$(ps -ef | grep java | grep xmfcn-spring-cloud-sys-elasticsearch-service-1.1.1.jar | grep -v grep | awk '{print $2}') 10 | 11 | if [ "$PIDS" == "" ]; then 12 | nohup java -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -Xms500m -Xmx500m -Xmn256m -Xss256k -XX:SurvivorRatio=8 -XX:+UseConcMarkSweepGC -jar xmfcn-spring-cloud-sys-elasticsearch-service-1.1.1.jar --spring.profiles.active=prod& 13 | sleep 1 14 | tail -f nohup.out 15 | else 16 | echo "服务正在运行中,不要重复启动!" 17 | fi 18 | fi -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/core/route/strategy/ExecutorRouteFirst.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.core.route.strategy; 2 | 3 | import com.cn.xmf.job.admin.core.route.ExecutorRouter; 4 | import com.cn.xmf.job.core.biz.model.ReturnT; 5 | import com.cn.xmf.job.core.biz.model.TriggerParam; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by xuxueli on 17/3/10. 11 | */ 12 | public class ExecutorRouteFirst extends ExecutorRouter { 13 | 14 | @Override 15 | public ReturnT route(TriggerParam triggerParam, List addressList){ 16 | return new ReturnT(addressList.get(0)); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-service/src/test/java/com/cn/xmf/job/JobServiceApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.boot.test.context.SpringBootTest; 7 | import org.springframework.core.env.Environment; 8 | import org.springframework.test.context.junit4.SpringRunner; 9 | 10 | @RunWith(SpringRunner.class) 11 | @SpringBootTest 12 | public class JobServiceApplicationTests { 13 | 14 | 15 | @Autowired 16 | private Environment environment; 17 | 18 | @Test 19 | public void contextLoads() { 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-kafka-service/src/test/java/com/cn/xmf/job/JobKafkaServiceApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.boot.test.context.SpringBootTest; 7 | import org.springframework.core.env.Environment; 8 | import org.springframework.test.context.junit4.SpringRunner; 9 | 10 | @RunWith(SpringRunner.class) 11 | @SpringBootTest 12 | public class JobKafkaServiceApplicationTests { 13 | 14 | 15 | @Autowired 16 | private Environment environment; 17 | 18 | @Test 19 | public void contextLoads() { 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/core/route/strategy/ExecutorRouteLast.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.core.route.strategy; 2 | 3 | import com.cn.xmf.job.admin.core.route.ExecutorRouter; 4 | import com.cn.xmf.job.core.biz.model.ReturnT; 5 | import com.cn.xmf.job.core.biz.model.TriggerParam; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by xuxueli on 17/3/10. 11 | */ 12 | public class ExecutorRouteLast extends ExecutorRouter { 13 | 14 | @Override 15 | public ReturnT route(TriggerParam triggerParam, List addressList) { 16 | return new ReturnT(addressList.get(addressList.size()-1)); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/job/dao/XxlJobLogGlueDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.job.dao; 2 | 3 | import com.cn.xmf.job.admin.core.model.XxlJobLogGlue; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * job user for glue 10 | * @author xuxueli 2016-5-19 18:04:56 11 | */ 12 | public interface XxlJobLogGlueDao { 13 | 14 | public int save(XxlJobLogGlue xxlJobLogGlue); 15 | 16 | public List findByJobId(@Param("jobId") int jobId); 17 | 18 | public int removeOld(@Param("jobId") int jobId, @Param("limit") int limit); 19 | 20 | public int deleteByJobId(@Param("jobId") int jobId); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-service/src/main/java/com/cn/xmf/job/JobServiceApplication.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 6 | import org.springframework.cloud.openfeign.EnableFeignClients; 7 | 8 | /** 9 | * 任务处理 10 | * @author rufei.cn 11 | */ 12 | @SpringBootApplication 13 | @EnableDiscoveryClient 14 | @EnableFeignClients 15 | public class JobServiceApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(JobServiceApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-zuul/src/main/java/com/cn/xmf/zuul/ZuulApplication.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.zuul; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 6 | import org.springframework.cloud.netflix.zuul.EnableZuulProxy; 7 | import org.springframework.cloud.openfeign.EnableFeignClients; 8 | 9 | /** 10 | */ 11 | @SpringBootApplication 12 | @EnableZuulProxy 13 | @EnableFeignClients 14 | @EnableDiscoveryClient 15 | public class ZuulApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(ZuulApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-base-service/src/main/java/com/cn/xmf/service/db/DruidStatController.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.db; 2 | 3 | import com.alibaba.druid.stat.DruidStatManagerFacade; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | @RestController 8 | @RequestMapping(value = "/server/dict/") 9 | public class DruidStatController { 10 | @RequestMapping("druid") 11 | public Object druidStat() { 12 | // DruidStatManagerFacade#getDataSourceStatDataList 该方法可以获取所有数据源的监控数据,除此之外 DruidStatManagerFacade 还提供了一些其他方法,你可以按需选择使用。 13 | return DruidStatManagerFacade.getInstance().getDataSourceStatDataList(); 14 | } 15 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-kafka-service/src/main/java/com/cn/xmf/job/JobKafkaServiceApplication.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 6 | import org.springframework.cloud.openfeign.EnableFeignClients; 7 | 8 | /** 9 | * 任务处理 10 | * 11 | * @author rufei.cn 12 | */ 13 | @SpringBootApplication 14 | @EnableDiscoveryClient 15 | @EnableFeignClients 16 | public class JobKafkaServiceApplication { 17 | 18 | public static void main(String[] args) { 19 | SpringApplication.run(JobKafkaServiceApplication.class, args); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/job/dao/XxlJobGroupDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.job.dao; 2 | 3 | import com.cn.xmf.job.admin.core.model.XxlJobGroup; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by xuxueli on 16/9/30. 10 | */ 11 | public interface XxlJobGroupDao { 12 | 13 | public List findAll(); 14 | 15 | public List findByAddressType(@Param("addressType") int addressType); 16 | 17 | public int save(XxlJobGroup xxlJobGroup); 18 | 19 | public int update(XxlJobGroup xxlJobGroup); 20 | 21 | public int remove(@Param("id") int id); 22 | 23 | public XxlJobGroup load(@Param("id") int id); 24 | } 25 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-kafka-service/src/main/java/com/cn/xmf/service/SystemKafkaServiceApplication.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 6 | import org.springframework.cloud.openfeign.EnableFeignClients; 7 | 8 | /** 9 | * The type Service application. 10 | */ 11 | @SpringBootApplication 12 | @EnableDiscoveryClient 13 | @EnableFeignClients 14 | public class SystemKafkaServiceApplication { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(SystemKafkaServiceApplication.class, args); 18 | } 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-redis-service/src/main/java/com/cn/xmf/service/SystemRedisServiceApplication.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 6 | import org.springframework.cloud.openfeign.EnableFeignClients; 7 | 8 | /** 9 | * The type Service application. 10 | * 11 | */ 12 | @SpringBootApplication 13 | @EnableDiscoveryClient 14 | @EnableFeignClients 15 | public class SystemRedisServiceApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SystemRedisServiceApplication.class, args); 19 | } 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-base-service/src/main/java/com/cn/xmf/service/model/MailAuthenticator.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.model; 2 | 3 | import javax.mail.Authenticator; 4 | import javax.mail.PasswordAuthentication; 5 | 6 | /** 7 | * 密码验证 8 | */ 9 | public class MailAuthenticator extends Authenticator { 10 | String userName = null; 11 | String password = null; 12 | 13 | public MailAuthenticator() { 14 | } 15 | 16 | public MailAuthenticator(String username, String password) { 17 | this.userName = username; 18 | this.password = password; 19 | } 20 | 21 | @Override 22 | protected PasswordAuthentication getPasswordAuthentication() { 23 | return new PasswordAuthentication(userName, password); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/core/route/ExecutorRouter.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.core.route; 2 | 3 | import com.cn.xmf.job.core.biz.model.ReturnT; 4 | import com.cn.xmf.job.core.biz.model.TriggerParam; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Created by xuxueli on 17/3/10. 12 | */ 13 | public abstract class ExecutorRouter { 14 | protected static Logger logger = LoggerFactory.getLogger(ExecutorRouter.class); 15 | 16 | /** 17 | * route address 18 | * 19 | * @param addressList 20 | * @return ReturnT.content=address 21 | */ 22 | public abstract ReturnT route(TriggerParam triggerParam, List addressList); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-elasticsearch-service/src/main/java/com/cn/xmf/service/SystemElasticsearchServiceApplication.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 6 | import org.springframework.cloud.openfeign.EnableFeignClients; 7 | 8 | /** 9 | * The type Service application. 10 | */ 11 | @SpringBootApplication 12 | @EnableDiscoveryClient 13 | @EnableFeignClients 14 | public class SystemElasticsearchServiceApplication { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(SystemElasticsearchServiceApplication.class, args); 18 | } 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/core/util/FtlUtil.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.core.util; 2 | 3 | import freemarker.ext.beans.BeansWrapper; 4 | import freemarker.template.TemplateHashModel; 5 | 6 | /** 7 | * ftl util 8 | * 9 | * @author xuxueli 2018-01-17 20:37:48 10 | */ 11 | public class FtlUtil { 12 | 13 | public static TemplateHashModel generateStaticModel(String packageName) { 14 | try { 15 | BeansWrapper wrapper = BeansWrapper.getDefaultInstance(); 16 | TemplateHashModel staticModels = wrapper.getStaticModels(); 17 | TemplateHashModel fileStatics = (TemplateHashModel) staticModels.get(packageName); 18 | return fileStatics; 19 | } catch (Exception e) { 20 | 21 | } 22 | return null; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-base-service/src/main/java/com/cn/xmf/service/model/dingtalk/ActionCardAction.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.model.dingtalk; 2 | 3 | /** 4 | * Created by dustin on 2017/3/19. 5 | */ 6 | public class ActionCardAction { 7 | private String title; 8 | private String actionUrl; 9 | 10 | public ActionCardAction(String text, String actionUrl) { 11 | this.title = text; 12 | this.actionUrl = actionUrl; 13 | } 14 | 15 | public String getTitle() { 16 | return title; 17 | } 18 | 19 | public void setTitle(String title) { 20 | this.title = title; 21 | } 22 | 23 | public String getActionUrl() { 24 | return actionUrl; 25 | } 26 | 27 | public void setActionUrl(String actionUrl) { 28 | this.actionUrl = actionUrl; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/core/route/strategy/ExecutorRouteRandom.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.core.route.strategy; 2 | 3 | import com.cn.xmf.job.admin.core.route.ExecutorRouter; 4 | import com.cn.xmf.job.core.biz.model.ReturnT; 5 | import com.cn.xmf.job.core.biz.model.TriggerParam; 6 | 7 | import java.util.List; 8 | import java.util.Random; 9 | 10 | /** 11 | * Created by xuxueli on 17/3/10. 12 | */ 13 | public class ExecutorRouteRandom extends ExecutorRouter { 14 | 15 | private static Random localRandom = new Random(); 16 | 17 | @Override 18 | public ReturnT route(TriggerParam triggerParam, List addressList) { 19 | String address = addressList.get(localRandom.nextInt(addressList.size())); 20 | return new ReturnT(address); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/core/trigger/TriggerTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.core.trigger; 2 | 3 | import com.cn.xmf.job.admin.core.util.I18nUtil; 4 | 5 | /** 6 | * trigger type enum 7 | * 8 | * @author xuxueli 2018-09-16 04:56:41 9 | */ 10 | public enum TriggerTypeEnum { 11 | 12 | MANUAL(I18nUtil.getString("jobconf_trigger_type_manual")), 13 | CRON(I18nUtil.getString("jobconf_trigger_type_cron")), 14 | RETRY(I18nUtil.getString("jobconf_trigger_type_retry")), 15 | PARENT(I18nUtil.getString("jobconf_trigger_type_parent")), 16 | API(I18nUtil.getString("jobconf_trigger_type_api")); 17 | 18 | private TriggerTypeEnum(String title){ 19 | this.title = title; 20 | } 21 | private String title; 22 | public String getTitle() { 23 | return title; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-base-service/src/main/java/com/cn/xmf/service/model/dingtalk/FeedCardMessageItem.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.model.dingtalk; 2 | 3 | /** 4 | * Created by dustin on 2017/3/19. 5 | */ 6 | public class FeedCardMessageItem { 7 | private String title; 8 | private String picUrl; 9 | private String messageUrl; 10 | 11 | public String getMessageUrl() { 12 | return messageUrl; 13 | } 14 | 15 | public void setMessageUrl(String messageUrl) { 16 | this.messageUrl = messageUrl; 17 | } 18 | 19 | public String getTitle() { 20 | return title; 21 | } 22 | 23 | public void setTitle(String title) { 24 | this.title = title; 25 | } 26 | 27 | public String getPicUrl() { 28 | return picUrl; 29 | } 30 | 31 | public void setPicUrl(String picUrl) { 32 | this.picUrl = picUrl; 33 | } 34 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/config/WebConfig.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; 6 | 7 | /** 8 | * web 配置 9 | * @author rufei.cn 10 | * @date 2018-8-23 17:47 11 | *

Title: com.cn.xmf.job.admin.config

12 | *

13 | */ 14 | @Configuration 15 | public class WebConfig extends WebMvcConfigurerAdapter { 16 | 17 | @Override 18 | public void addInterceptors(InterceptorRegistry registry) { 19 | //注册自定义拦截器,添加拦截路径和排除拦截路径 20 | //registry.addInterceptor(new PermissionInterceptor()).addPathPatterns("/**"); 21 | registry.addInterceptor(new JobAdminInterceptor()).addPathPatterns("/**"); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/plugins/codemirror/addon/hint/show-hint.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-hints { 2 | position: absolute; 3 | z-index: 10; 4 | overflow: hidden; 5 | list-style: none; 6 | 7 | margin: 0; 8 | padding: 2px; 9 | 10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 13 | border-radius: 3px; 14 | border: 1px solid silver; 15 | 16 | background: white; 17 | font-size: 90%; 18 | font-family: monospace; 19 | 20 | max-height: 20em; 21 | overflow-y: auto; 22 | } 23 | 24 | .CodeMirror-hint { 25 | margin: 0; 26 | padding: 0 4px; 27 | border-radius: 2px; 28 | max-width: 19em; 29 | overflow: hidden; 30 | white-space: pre; 31 | color: black; 32 | cursor: pointer; 33 | } 34 | 35 | li.CodeMirror-hint-active { 36 | background: #08f; 37 | color: white; 38 | } 39 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/bootstrap/datatables/locale/bootstrap-table-zh-CN.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * bootstrap-table - v1.12.1 - 2018-03-12 3 | * https://github.com/wenzhixin/bootstrap-table 4 | * Copyright (c) 2018 zhixin wen 5 | * Licensed MIT License 6 | */ 7 | !function(a){"use strict";a.fn.bootstrapTable.locales["zh-CN"]={formatLoadingMessage:function(){return"正在努力地加载数据中,请稍候……"},formatRecordsPerPage:function(a){return"每页显示 "+a+" 条记录"},formatShowingRows:function(a,b,c){return"显示第 "+a+" 到第 "+b+" 条记录,总共 "+c+" 条记录"},formatSearch:function(){return"搜索"},formatNoMatches:function(){return"没有找到匹配的记录"},formatPaginationSwitch:function(){return"隐藏/显示分页"},formatRefresh:function(){return"刷新"},formatToggle:function(){return"切换"},formatColumns:function(){return"列"},formatExport:function(){return"导出数据"},formatClearFilters:function(){return"清空过滤"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["zh-CN"])}(jQuery); -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-kafka-service/src/main/java/com/cn/xmf/job/kafka/IKafkaReader.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.kafka; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.cn.xmf.base.model.RetData; 5 | import org.apache.kafka.clients.consumer.ConsumerRecord; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * kafka消费数据接口 11 | * 12 | * @author rufei.cn 13 | * @version 2019-05-19 14 | */ 15 | public interface IKafkaReader { 16 | 17 | /** 18 | * 获取kafka数据,执行业务操作 19 | * 20 | * @param partitionRecords 数据集 21 | * @param topic 主题 22 | * @author rufei 23 | * @return 24 | */ 25 | RetData executeList(List> partitionRecords, String topic); 26 | 27 | /** 28 | * 获取kafka数据,执行业务操作 29 | * 30 | * @param jsonObject 31 | * @author rufei 32 | * @return 33 | */ 34 | RetData execute(JSONObject jsonObject); 35 | } 36 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/config/XxlJobAdminConfig.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.config; 2 | 3 | import org.springframework.beans.factory.InitializingBean; 4 | import org.springframework.beans.factory.annotation.Value; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | /** 8 | * xxl-job config 9 | * 10 | * @author xuxueli 2017-04-28 11 | */ 12 | @Configuration 13 | public class XxlJobAdminConfig implements InitializingBean { 14 | 15 | 16 | @Value("${xmf.job.i18n}") 17 | private String i18n; 18 | 19 | private static XxlJobAdminConfig adminConfig = null; 20 | 21 | public static XxlJobAdminConfig getAdminConfig() { 22 | return adminConfig; 23 | } 24 | 25 | @Override 26 | public void afterPropertiesSet() { 27 | adminConfig = this; 28 | } 29 | 30 | 31 | public String getI18n() { 32 | return i18n; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/template/common/common.exception.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Error 6 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |

System Error

25 |

${exceptionMsg}

26 | Back 27 |

28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-core/src/main/java/com/cn/xmf/job/core/handler/impl/GlueJobHandler.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.core.handler.impl; 2 | 3 | import com.cn.xmf.job.core.biz.model.ReturnT; 4 | import com.cn.xmf.job.core.handler.IJobHandler; 5 | import com.cn.xmf.job.core.log.XxlJobLogger; 6 | 7 | /** 8 | * glue job handler 9 | * @author xuxueli 2016-5-19 21:05:45 10 | */ 11 | public class GlueJobHandler extends IJobHandler { 12 | 13 | private long glueUpdatetime; 14 | private IJobHandler jobHandler; 15 | public GlueJobHandler(IJobHandler jobHandler, long glueUpdatetime) { 16 | this.jobHandler = jobHandler; 17 | this.glueUpdatetime = glueUpdatetime; 18 | } 19 | public long getGlueUpdatetime() { 20 | return glueUpdatetime; 21 | } 22 | 23 | @Override 24 | public ReturnT execute(String param) throws Exception { 25 | XxlJobLogger.log("----------- glue.version:"+ glueUpdatetime +" -----------"); 26 | return jobHandler.execute(param); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-service/src/main/java/com/cn/xmf/service/WeChatServiceApplication.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 7 | import org.springframework.cloud.openfeign.EnableFeignClients; 8 | import org.springframework.transaction.annotation.EnableTransactionManagement; 9 | 10 | /** 11 | * The type Service application. 12 | * 13 | */ 14 | @SpringBootApplication 15 | @EnableDiscoveryClient 16 | @EnableTransactionManagement// 开启事务 17 | @EnableFeignClients 18 | @MapperScan(basePackages="com.cn.xmf.service.*.dao")// 扫面mybatis Mapper包 19 | public class WeChatServiceApplication { 20 | 21 | public static void main(String[] args) { 22 | SpringApplication.run(WeChatServiceApplication.class, args); 23 | } 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/bootstrap/datatables/locale/bootstrap-table-eu-EU.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * bootstrap-table - v1.12.1 - 2018-03-12 3 | * https://github.com/wenzhixin/bootstrap-table 4 | * Copyright (c) 2018 zhixin wen 5 | * Licensed MIT License 6 | */ 7 | !function(a){"use strict";a.fn.bootstrapTable.locales["eu-EU"]={formatLoadingMessage:function(){return"Itxaron mesedez..."},formatRecordsPerPage:function(a){return a+" emaitza orriko."},formatShowingRows:function(a,b,c){return c+" erregistroetatik "+a+"etik "+b+"erakoak erakusten."},formatSearch:function(){return"Bilatu"},formatNoMatches:function(){return"Ez da emaitzarik aurkitu"},formatPaginationSwitch:function(){return"Ezkutatu/Erakutsi orrikatzea"},formatRefresh:function(){return"Eguneratu"},formatToggle:function(){return"Ezkutatu/Erakutsi"},formatColumns:function(){return"Zutabeak"},formatAllRows:function(){return"Guztiak"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["eu-EU"])}(jQuery); -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-base-service/src/main/java/com/cn/xmf/service/SystemBaseServiceApplication.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 7 | import org.springframework.cloud.openfeign.EnableFeignClients; 8 | import org.springframework.transaction.annotation.EnableTransactionManagement; 9 | 10 | /** 11 | * The type Service application. 12 | */ 13 | @SpringBootApplication 14 | @EnableDiscoveryClient 15 | @EnableTransactionManagement// 开启事务 16 | @EnableFeignClients 17 | @MapperScan(basePackages = "com.cn.xmf.service.*.dao")// 扫面mybatis Mapper包 18 | public class SystemBaseServiceApplication { 19 | 20 | public static void main(String[] args) { 21 | SpringApplication.run(SystemBaseServiceApplication.class, args); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-core/src/main/java/com/cn/xmf/job/core/util/DateUtil.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.core.util; 2 | 3 | import java.text.ParseException; 4 | import java.text.SimpleDateFormat; 5 | import java.util.Date; 6 | 7 | /** 8 | * date util 9 | * 10 | * @author xuxueli 2018-08-19 01:24:11 11 | */ 12 | public class DateUtil { 13 | private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; 14 | 15 | private static ThreadLocal threadLocal = new ThreadLocal() { 16 | @Override 17 | protected synchronized SimpleDateFormat initialValue() { 18 | //return super.initialValue(); 19 | return new SimpleDateFormat(DATE_FORMAT); 20 | } 21 | }; 22 | 23 | public static String format(Date date) { 24 | return threadLocal.get().format(date); 25 | } 26 | 27 | public static Date parse(String textDate) throws ParseException { 28 | return threadLocal.get().parse(textDate); 29 | } 30 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/base/request/WapperedOutputStream.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.base.request; 2 | 3 | import javax.servlet.ServletOutputStream; 4 | import javax.servlet.WriteListener; 5 | import java.io.ByteArrayOutputStream; 6 | import java.io.IOException; 7 | 8 | public class WapperedOutputStream extends ServletOutputStream { 9 | private ByteArrayOutputStream bos = null; 10 | 11 | public WapperedOutputStream(ByteArrayOutputStream stream) 12 | throws IOException { 13 | bos = stream; 14 | } 15 | 16 | @Override 17 | public void write(int b) throws IOException { 18 | bos.write(b); 19 | } 20 | 21 | @Override 22 | public void write(byte[] b) throws IOException { 23 | bos.write(b, 0, b.length); 24 | } 25 | 26 | @Override 27 | public boolean isReady() { 28 | return false; 29 | } 30 | 31 | @Override 32 | public void setWriteListener(WriteListener writeListener) { 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-core/src/main/java/com/cn/xmf/job/core/rpc/codec/RpcResponse.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.core.rpc.codec; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * response 7 | * @author xuxueli 2015-10-29 19:39:54 8 | */ 9 | public class RpcResponse implements Serializable{ 10 | private static final long serialVersionUID = 1L; 11 | 12 | private String error; 13 | private Object result; 14 | 15 | public boolean isError() { 16 | return error != null; 17 | } 18 | 19 | public String getError() { 20 | return error; 21 | } 22 | 23 | public void setError(String error) { 24 | this.error = error; 25 | } 26 | 27 | public Object getResult() { 28 | return result; 29 | } 30 | 31 | public void setResult(Object result) { 32 | this.result = result; 33 | } 34 | 35 | @Override 36 | public String toString() { 37 | return "NettyResponse [error=" + error 38 | + ", result=" + result + "]"; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/common/PermissionInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.common; 2 | 3 | import com.cn.xmf.job.admin.core.util.CookieUtil; 4 | import com.cn.xmf.util.StringUtil; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | 9 | /** 10 | * 权限拦截, 简易版 11 | * 12 | * @author xuxueli 2015-12-12 18:09:04 13 | */ 14 | public class PermissionInterceptor { 15 | 16 | 17 | 18 | private static final String LOGIN_IDENTITY_KEY = "XXL_JOB_LOGIN_IDENTITY"; 19 | private static final String LOGIN_IDENTITY_TOKEN=StringUtil.getUuId(); 20 | 21 | public static boolean login(HttpServletResponse response, boolean ifRemember) { 22 | // do login 23 | CookieUtil.set(response, LOGIN_IDENTITY_KEY, LOGIN_IDENTITY_TOKEN, ifRemember); 24 | return true; 25 | } 26 | public static void logout(HttpServletRequest request, HttpServletResponse response) { 27 | CookieUtil.remove(request, response, LOGIN_IDENTITY_KEY); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-api/src/main/java/com/cn/xmf/api/prize/service/UserPrizeHelperService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.api.prize.service; 2 | 3 | import com.cn.xmf.api.prize.rpc.UserPrizeService; 4 | import com.cn.xmf.model.wx.UserPrize; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | /** 10 | * UserPrizeHelperService(奖品信息辅助类) 11 | * @author rufei.cn 12 | * @version 2020-01-02 13 | */ 14 | @Service 15 | @SuppressWarnings("all") 16 | public class UserPrizeHelperService { 17 | 18 | private static Logger logger = LoggerFactory.getLogger(UserPrizeHelperService.class); 19 | @Autowired 20 | private UserPrizeService userPrizeService; 21 | 22 | /** 23 | * 获取单条数据 24 | * @param userPrize 25 | * @author rufei.cn 26 | * @return 27 | */ 28 | public UserPrize getUserPrize(UserPrize userPrize) 29 | { 30 | return userPrizeService.getUserPrize(userPrize); 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-zuul/src/main/java/com/cn/xmf/zuul/sys/MessageService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.zuul.sys; 2 | 3 | 4 | import com.cn.xmf.base.model.RetData; 5 | import com.cn.xmf.model.msg.Message; 6 | import org.springframework.cloud.openfeign.FeignClient; 7 | import org.springframework.http.MediaType; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | 11 | 12 | /** 13 | * MessageService(综合消息发送服务) 14 | * @author rufei.cn 15 | * @version 2017-12-21 16 | */ 17 | @SuppressWarnings("all") 18 | 19 | @FeignClient(value = "${base-service.sys-service}")// 配置远程服务名以及自定义权限验证配置 20 | @RequestMapping("/server/message/")// 配置远程服务路径 21 | public interface MessageService { 22 | /** 23 | * sendMessage(消息发送(包括邮件、短信、钉钉等) 24 | * 25 | * @param message 26 | * @return 27 | */ 28 | @RequestMapping(value = "sendMessage", consumes = MediaType.APPLICATION_JSON_VALUE) 29 | public RetData sendMessage(@RequestBody Message message); 30 | } 31 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-service/src/main/java/com/cn/xmf/job/sys/MessageService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.sys; 2 | 3 | 4 | import com.cn.xmf.base.model.RetData; 5 | import com.cn.xmf.model.msg.Message; 6 | import org.springframework.cloud.openfeign.FeignClient; 7 | import org.springframework.http.MediaType; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | 11 | 12 | /** 13 | * MessageService(综合消息发送服务) 14 | * @author rufei.cn 15 | * @version 2017-12-21 16 | */ 17 | @SuppressWarnings("all") 18 | 19 | @FeignClient(value = "${base-service.sys-service}")// 配置远程服务名以及自定义权限验证配置 20 | @RequestMapping("/server/message/")// 配置远程服务路径 21 | public interface MessageService { 22 | /** 23 | * sendMessage(消息发送(包括邮件、短信、钉钉等) 24 | * 25 | * @param message 26 | * @return 27 | */ 28 | @RequestMapping(value = "sendMessage", consumes = MediaType.APPLICATION_JSON_VALUE) 29 | public RetData sendMessage(@RequestBody Message message); 30 | } 31 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-api/src/main/java/com/cn/xmf/api/meet/service/MeetingHelperService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.api.meet.service; 2 | 3 | import com.cn.xmf.api.meet.rpc.MeetingService; 4 | import com.cn.xmf.model.wx.Meeting; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | /** 11 | * MeetingHelperService(参会人员信息登记辅助类) 12 | * 13 | * @author rufen.cn 14 | * @version 2019-10-26 15 | */ 16 | @Service 17 | @SuppressWarnings("all") 18 | public class MeetingHelperService { 19 | 20 | private static Logger logger = LoggerFactory.getLogger(MeetingHelperService.class); 21 | @Autowired 22 | private MeetingService meetingService; 23 | 24 | /** 25 | * 获取单条数据 26 | * 27 | * @param meeting 28 | * @return 29 | * @author rufen.cn 30 | */ 31 | public Meeting getMeeting(Meeting meeting) { 32 | return meetingService.getMeeting(meeting); 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-kafka-service/src/main/java/com/cn/xmf/job/sys/MessageService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.sys; 2 | 3 | 4 | import com.cn.xmf.base.model.RetData; 5 | import com.cn.xmf.model.msg.Message; 6 | import org.springframework.cloud.openfeign.FeignClient; 7 | import org.springframework.http.MediaType; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | 11 | 12 | /** 13 | * MessageService(综合消息发送服务) 14 | * @author rufei.cn 15 | * @version 2017-12-21 16 | */ 17 | @SuppressWarnings("all") 18 | 19 | @FeignClient(value = "${base-service.sys-service}")// 配置远程服务名以及自定义权限验证配置 20 | @RequestMapping("/server/message/")// 配置远程服务路径 21 | public interface MessageService { 22 | /** 23 | * sendMessage(消息发送(包括邮件、短信、钉钉等) 24 | * 25 | * @param message 26 | * @return 27 | */ 28 | @RequestMapping(value = "sendMessage", consumes = MediaType.APPLICATION_JSON_VALUE) 29 | public RetData sendMessage(@RequestBody Message message); 30 | } 31 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-api/src/main/java/com/cn/xmf/api/invit/service/InvitationHelperService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.api.invit.service; 2 | 3 | import com.cn.xmf.api.invit.rpc.InvitationService; 4 | import com.cn.xmf.model.wx.Invitation; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | /** 10 | * Invitation Service(邀请函辅助类) 11 | * @author rufei.cn 12 | * @version 2019-10-26 13 | */ 14 | @Service 15 | @SuppressWarnings("all") 16 | public class InvitationHelperService { 17 | 18 | private static Logger logger = LoggerFactory.getLogger(InvitationHelperService.class); 19 | @Autowired 20 | private InvitationService invitationService; 21 | 22 | /** 23 | * 获取单条数据 24 | * @param invitation 25 | * @author rufei.cn 26 | * @return 27 | */ 28 | public Invitation getSignleInvitation(Invitation invitation) 29 | { 30 | return invitationService.getInvitation(invitation); 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-api/src/main/java/com/cn/xmf/api/sys/rpc/MessageService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.api.sys.rpc; 2 | 3 | 4 | import com.cn.xmf.base.model.RetData; 5 | import com.cn.xmf.model.msg.Message; 6 | import org.springframework.cloud.openfeign.FeignClient; 7 | import org.springframework.http.MediaType; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | 11 | 12 | /** 13 | * MessageService(综合消息发送服务) 14 | * @author rufei.cn 15 | * @version 2017-12-21 16 | */ 17 | @SuppressWarnings("all") 18 | 19 | @FeignClient(value = "${base-service.sys-service}")// 配置远程服务名以及自定义权限验证配置 20 | @RequestMapping("/server/message/")// 配置远程服务路径 21 | public interface MessageService { 22 | /** 23 | * sendMessage(消息发送(包括邮件、短信、钉钉等) 24 | * 25 | * @param message 26 | * @return 27 | */ 28 | @RequestMapping(value = "sendMessage", consumes = MediaType.APPLICATION_JSON_VALUE) 29 | public RetData sendMessage(@RequestBody Message message); 30 | } 31 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-zuul/src/main/java/com/cn/xmf/zuul/sys/KafKaProducerService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.zuul.sys; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import org.springframework.cloud.openfeign.FeignClient; 5 | import org.springframework.http.MediaType; 6 | import org.springframework.web.bind.annotation.RequestBody; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | 9 | /** 10 | * kafka生产者 11 | * 12 | * @Author rufei.cn 13 | * @version 2019-05-09 14 | */ 15 | @FeignClient(value = "${base-service:sys-service}")// 配置远程服务名以及自定义权限验证配置 16 | @RequestMapping("/server/kafka/")// 配置远程服务路径 17 | @SuppressWarnings("all") 18 | public interface KafKaProducerService { 19 | 20 | /** 21 | * 发送kafka数据 22 | * 23 | * topic 主题 必填 24 | * key 数据key 选填 25 | * value 数据主体 必填 26 | * @param jsonObject 27 | * @return 28 | */ 29 | @RequestMapping(value = "sendKafka", consumes = MediaType.APPLICATION_JSON_VALUE) 30 | public boolean sendKafka(@RequestBody JSONObject jsonObject); 31 | } 32 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/sys/MessageService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.sys; 2 | 3 | 4 | import com.cn.xmf.base.model.RetData; 5 | import com.cn.xmf.model.msg.Message; 6 | import org.springframework.cloud.openfeign.FeignClient; 7 | import org.springframework.http.MediaType; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | 11 | 12 | /** 13 | * MessageService(综合消息发送服务) 14 | * @author rufei.cn 15 | * @version 2017-12-21 16 | */ 17 | @SuppressWarnings("all") 18 | 19 | @FeignClient(value = "${base-service.sys-service}")// 配置远程服务名以及自定义权限验证配置 20 | @RequestMapping("/server/message/")// 配置远程服务路径 21 | public interface MessageService { 22 | /** 23 | * sendMessage(消息发送(包括邮件、短信、钉钉等) 24 | * 25 | * @param message 26 | * @return 27 | */ 28 | @RequestMapping(value = "sendMessage", consumes = MediaType.APPLICATION_JSON_VALUE) 29 | public RetData sendMessage(@RequestBody Message message); 30 | } 31 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-service/src/main/java/com/cn/xmf/job/sys/KafKaProducerService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.sys; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import org.springframework.cloud.openfeign.FeignClient; 5 | import org.springframework.http.MediaType; 6 | import org.springframework.web.bind.annotation.RequestBody; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | 9 | /** 10 | * kafka生产者 11 | * 12 | * @Author rufei.cn 13 | * @version 2019-05-09 14 | */ 15 | @FeignClient(value = "${base-service:kafka-service}")// 配置远程服务名以及自定义权限验证配置 16 | @RequestMapping("/server/kafka/")// 配置远程服务路径 17 | @SuppressWarnings("all") 18 | public interface KafKaProducerService { 19 | 20 | /** 21 | * 发送kafka数据 22 | * 23 | * topic 主题 必填 24 | * key 数据key 选填 25 | * value 数据主体 必填 26 | * @param jsonObject 27 | * @return 28 | */ 29 | @RequestMapping(value = "sendKafka", consumes = MediaType.APPLICATION_JSON_VALUE) 30 | public boolean sendKafka(@RequestBody JSONObject jsonObject); 31 | } 32 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-service/src/main/java/com/cn/xmf/service/sys/MessageService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.sys; 2 | 3 | 4 | import com.cn.xmf.base.model.RetData; 5 | import com.cn.xmf.model.msg.Message; 6 | import org.springframework.cloud.openfeign.FeignClient; 7 | import org.springframework.http.MediaType; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | 11 | 12 | /** 13 | * MessageService(综合消息发送服务) 14 | * @author rufei.cn 15 | * @version 2017-12-21 16 | */ 17 | @SuppressWarnings("all") 18 | 19 | @FeignClient(value = "${base-service.sys-service}")// 配置远程服务名以及自定义权限验证配置 20 | @RequestMapping("/server/message/")// 配置远程服务路径 21 | public interface MessageService { 22 | /** 23 | * sendMessage(消息发送(包括邮件、短信、钉钉等) 24 | * 25 | * @param message 26 | * @return 27 | */ 28 | @RequestMapping(value = "sendMessage", consumes = MediaType.APPLICATION_JSON_VALUE) 29 | public RetData sendMessage(@RequestBody Message message); 30 | } 31 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-kafka-service/src/main/java/com/cn/xmf/service/sys/MessageService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.sys; 2 | 3 | 4 | import com.cn.xmf.base.model.RetData; 5 | import com.cn.xmf.model.msg.Message; 6 | import org.springframework.cloud.openfeign.FeignClient; 7 | import org.springframework.http.MediaType; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | 11 | 12 | /** 13 | * MessageService(综合消息发送服务) 14 | * @author rufei.cn 15 | * @version 2017-12-21 16 | */ 17 | @SuppressWarnings("all") 18 | 19 | @FeignClient(value = "${base-service.sys-service}")// 配置远程服务名以及自定义权限验证配置 20 | @RequestMapping("/server/message/")// 配置远程服务路径 21 | public interface MessageService { 22 | /** 23 | * sendMessage(消息发送(包括邮件、短信、钉钉等) 24 | * 25 | * @param message 26 | * @return 27 | */ 28 | @RequestMapping(value = "sendMessage", consumes = MediaType.APPLICATION_JSON_VALUE) 29 | public RetData sendMessage(@RequestBody Message message); 30 | } 31 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-redis-service/src/main/java/com/cn/xmf/service/sys/MessageService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.sys; 2 | 3 | 4 | import com.cn.xmf.base.model.RetData; 5 | import com.cn.xmf.model.msg.Message; 6 | import org.springframework.cloud.openfeign.FeignClient; 7 | import org.springframework.http.MediaType; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | 11 | 12 | /** 13 | * MessageService(综合消息发送服务) 14 | * @author rufei.cn 15 | * @version 2017-12-21 16 | */ 17 | @SuppressWarnings("all") 18 | 19 | @FeignClient(value = "${base-service.sys-service}")// 配置远程服务名以及自定义权限验证配置 20 | @RequestMapping("/server/message/")// 配置远程服务路径 21 | public interface MessageService { 22 | /** 23 | * sendMessage(消息发送(包括邮件、短信、钉钉等) 24 | * 25 | * @param message 26 | * @return 27 | */ 28 | @RequestMapping(value = "sendMessage", consumes = MediaType.APPLICATION_JSON_VALUE) 29 | public RetData sendMessage(@RequestBody Message message); 30 | } 31 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-api/src/main/java/com/cn/xmf/api/sys/rpc/KafKaProducerService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.api.sys.rpc; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import org.springframework.cloud.openfeign.FeignClient; 5 | import org.springframework.http.MediaType; 6 | import org.springframework.web.bind.annotation.RequestBody; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | 9 | /** 10 | * kafka生产者 11 | * 12 | * @Author rufei.cn 13 | * @version 2019-05-09 14 | */ 15 | @FeignClient(value = "${base-service.sys-service}")// 配置远程服务名以及自定义权限验证配置 16 | @RequestMapping("/server/kafka/")// 配置远程服务路径 17 | @SuppressWarnings("all") 18 | public interface KafKaProducerService { 19 | 20 | /** 21 | * 发送kafka数据 22 | * 23 | * topic 主题 必填 24 | * key 数据key 选填 25 | * value 数据主体 必填 26 | * @param jsonObject 27 | * @return 28 | */ 29 | @RequestMapping(value = "sendKafka", consumes = MediaType.APPLICATION_JSON_VALUE) 30 | public boolean sendKafka(@RequestBody JSONObject jsonObject); 31 | } 32 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/sys/KafKaProducerService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.sys; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import org.springframework.cloud.openfeign.FeignClient; 5 | import org.springframework.http.MediaType; 6 | import org.springframework.web.bind.annotation.RequestBody; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | 9 | /** 10 | * kafka生产者 11 | * 12 | * @Author rufei.cn 13 | * @version 2019-05-09 14 | */ 15 | @FeignClient(value = "${base-service:kafka-service}")// 配置远程服务名以及自定义权限验证配置 16 | @RequestMapping("/server/kafka/")// 配置远程服务路径 17 | @SuppressWarnings("all") 18 | public interface KafKaProducerService { 19 | 20 | /** 21 | * 发送kafka数据 22 | * 23 | * topic 主题 必填 24 | * key 数据key 选填 25 | * value 数据主体 必填 26 | * @param jsonObject 27 | * @return 28 | */ 29 | @RequestMapping(value = "sendKafka", consumes = MediaType.APPLICATION_JSON_VALUE) 30 | public boolean sendKafka(@RequestBody JSONObject jsonObject); 31 | } 32 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-kafka-service/src/main/java/com/cn/xmf/job/sys/KafKaProducerService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.sys; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import org.springframework.cloud.openfeign.FeignClient; 5 | import org.springframework.http.MediaType; 6 | import org.springframework.web.bind.annotation.RequestBody; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | 9 | /** 10 | * kafka生产者 11 | * 12 | * @Author rufei.cn 13 | * @version 2019-05-09 14 | */ 15 | @FeignClient(value = "${base-service:kafka-service}")// 配置远程服务名以及自定义权限验证配置 16 | @RequestMapping("/server/kafka/")// 配置远程服务路径 17 | @SuppressWarnings("all") 18 | public interface KafKaProducerService { 19 | 20 | /** 21 | * 发送kafka数据 22 | * 23 | * topic 主题 必填 24 | * key 数据key 选填 25 | * value 数据主体 必填 26 | * @param jsonObject 27 | * @return 28 | */ 29 | @RequestMapping(value = "sendKafka", consumes = MediaType.APPLICATION_JSON_VALUE) 30 | public boolean sendKafka(@RequestBody JSONObject jsonObject); 31 | } 32 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-elasticsearch-service/src/main/java/com/cn/xmf/service/sys/MessageService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.sys; 2 | 3 | 4 | import com.cn.xmf.base.model.RetData; 5 | import com.cn.xmf.model.msg.Message; 6 | import org.springframework.cloud.openfeign.FeignClient; 7 | import org.springframework.http.MediaType; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | 11 | 12 | /** 13 | * MessageService(综合消息发送服务) 14 | * @author rufei.cn 15 | * @version 2017-12-21 16 | */ 17 | @SuppressWarnings("all") 18 | 19 | @FeignClient(value = "${base-service.sys-service}")// 配置远程服务名以及自定义权限验证配置 20 | @RequestMapping("/server/message/")// 配置远程服务路径 21 | public interface MessageService { 22 | /** 23 | * sendMessage(消息发送(包括邮件、短信、钉钉等) 24 | * 25 | * @param message 26 | * @return 27 | */ 28 | @RequestMapping(value = "sendMessage", consumes = MediaType.APPLICATION_JSON_VALUE) 29 | public RetData sendMessage(@RequestBody Message message); 30 | } 31 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-service/src/main/java/com/cn/xmf/service/sys/KafKaProducerService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.sys; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import org.springframework.cloud.openfeign.FeignClient; 5 | import org.springframework.http.MediaType; 6 | import org.springframework.web.bind.annotation.RequestBody; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | 9 | /** 10 | * kafka生产者 11 | * 12 | * @Author rufei.cn 13 | * @version 2019-05-09 14 | */ 15 | @FeignClient(value = "${base-service:sys-service}")// 配置远程服务名以及自定义权限验证配置 16 | @RequestMapping("/server/kafka/")// 配置远程服务路径 17 | @SuppressWarnings("all") 18 | public interface KafKaProducerService { 19 | 20 | /** 21 | * 发送kafka数据 22 | * 23 | * topic 主题 必填 24 | * key 数据key 选填 25 | * value 数据主体 必填 26 | * @param jsonObject 27 | * @return 28 | */ 29 | @RequestMapping(value = "sendKafka", consumes = MediaType.APPLICATION_JSON_VALUE) 30 | public boolean sendKafka(@RequestBody JSONObject jsonObject); 31 | } 32 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/base/model/ResultCodeMessage.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.base.model; 2 | 3 | /** 4 | * 消息编码和消息内容 5 | */ 6 | public class ResultCodeMessage { 7 | 8 | 9 | public static int NO_LOGIN = 201;// 未登录 10 | public static int SUCCESS = 200;// 成功 11 | public static int NO_DATA = 202;//暂时无数据 12 | public static int PARMS_ERROR = 400;//参数错误 13 | public static int UNAUTHORIZED = 403;//未授权 14 | public static int DATA_ERROR = 440;//数据错误 15 | public static int FAILURE = 500;// 失败 16 | 17 | public static String NO_LOGIN_MESSAGE = "未登录";// 未登录 18 | public static String UNAUTHORIZED_MESSAGE = "访问未授权";// 未登录 19 | public static String SUCCESS_MESSAGE = "成功";// 成功 20 | public static String FAILURE_MESSAGE = "失败";// 失败 21 | public static String EXCEPTION_MESSAGE = "服务器繁忙,请稍后再试";// 服务器繁忙,请稍后再试 22 | public static String PARMS_ERROR_MESSAGE = "参数错误";//参数错误 23 | public static String DATA_ERROR_MESSAGE = "数据错误";//数据错误 24 | public static String NO_DATA_MESSAGE = "暂时无数据";//暂时无数据 25 | 26 | } 27 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/JobAdminApplication.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 7 | import org.springframework.cloud.openfeign.EnableFeignClients; 8 | import org.springframework.context.annotation.EnableAspectJAutoProxy; 9 | import org.springframework.transaction.annotation.EnableTransactionManagement; 10 | 11 | /** 12 | * 任务处理 13 | * @authorairufei 14 | */ 15 | @SpringBootApplication 16 | @EnableDiscoveryClient 17 | @EnableTransactionManagement// 开启事务 18 | @EnableAspectJAutoProxy//开启AOP 19 | @MapperScan(basePackages="com.cn.xmf.job.admin.*.dao")// 扫面mybatis Mapper包 20 | @EnableFeignClients 21 | public class JobAdminApplication { 22 | 23 | public static void main(String[] args) { 24 | SpringApplication.run(JobAdminApplication.class, args); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/base/model/RetData.java: -------------------------------------------------------------------------------- 1 | 2 | package com.cn.xmf.base.model; 3 | 4 | 5 | public class RetData { 6 | private int code = ResultCodeMessage.PARMS_ERROR; 7 | private String message= ResultCodeMessage.PARMS_ERROR_MESSAGE; 8 | private Object data; 9 | 10 | 11 | public Object getData() { 12 | return data; 13 | } 14 | 15 | public void setData(Object data) { 16 | this.data = data; 17 | } 18 | 19 | public String getMessage() { 20 | return message; 21 | } 22 | 23 | public void setMessage(String message) { 24 | this.message = message; 25 | } 26 | 27 | public int getCode() { 28 | return code; 29 | } 30 | 31 | public void setCode(int code) { 32 | this.code = code; 33 | } 34 | 35 | @Override 36 | public String toString() { 37 | return "RetData{" + 38 | "code=" + code + 39 | ", message='" + message + '\'' + 40 | ", data=" + data + 41 | '}'; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/util/ConstantUtil.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.util; 2 | 3 | /** 4 | * 常量类 5 | */ 6 | @SuppressWarnings("all") 7 | public class ConstantUtil { 8 | 9 | /** 10 | * 缓存前缀相关 11 | */ 12 | public static final String CACHE_SYS_BASE_DATA_ = "sys_base_data";//缓存前缀 13 | 14 | public static final String CACHE_KEY_PREFIX_MENU_="cache_key_prefix_menu_"; 15 | 16 | /** 17 | * kafka主题相关 18 | */ 19 | public static final String XMF_KAFKA_TOPIC_LOG="xmf_kafka_topic_log";//系统日志 20 | 21 | /** 22 | * 字典类型相关 23 | */ 24 | public static final String DICT_TYPE_CONFIG_KAFKA="dict_type_kafka_config";//kafka连接配置 25 | public static final String DICT_TYPE_BASE_CONFIG ="dict_type_base_config" ;//基础配置类型 26 | public static final String DICT_TYPE_SYS_NAME="dict_type_sys_name" ;//系统名称组 27 | 28 | /** 29 | * ES相关 30 | */ 31 | public static final String ES_SYS_LOG_INDEX ="xmfcn_sys_log_index";//索引名称 32 | public static final String ES_SYS_LOG_TYPE ="xmfcn_sys_log_type";//文档类型(Type) 33 | } 34 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/js/user.menu.tree.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | var pageType = "left_menu";//"left_menu"; 3 | getSysMenudata(pageType); 4 | }); 5 | 6 | function getSysMenudata(pageType) { 7 | $.ajax({ 8 | type: "POST", 9 | contentType: 'application/json;charset=utf-8', //设置请求头信息 10 | url: base_url + "/jobMenu/getTreeList?pageType=" + pageType, 11 | async: false,//异步为true 12 | dataType: "json", 13 | success: function (data) { 14 | initMeunTree(data) 15 | } 16 | }); 17 | } 18 | 19 | function initMeunTree(data) { 20 | console.log(data); 21 | $('#treeview').treeview({ 22 | data: data, // data is not optional 23 | levels: 2,//默认打开的级别 24 | icon: "glyphicon glyphicon-stop", 25 | selectedIcon: "glyphicon glyphicon-stop", 26 | collapseIcon: "glyphicon glyphicon-minus", 27 | expandIcon: "glyphicon glyphicon-plus", 28 | showCheckbox: false, 29 | multiSelect: false, 30 | enableLinks: true, 31 | }); 32 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-api/src/main/java/com/cn/xmf/api/prize/service/WinnersListHelperService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.api.prize.service; 2 | 3 | import com.cn.xmf.api.prize.rpc.WinnersListService; 4 | import com.cn.xmf.model.wx.WinnersList; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | /** 11 | * WinnersListHelperService(获奖名单辅助类) 12 | * 13 | * @author rufei.cn 14 | * @version 2020-01-02 15 | */ 16 | @Service 17 | @SuppressWarnings("all") 18 | public class WinnersListHelperService { 19 | 20 | private static Logger logger = LoggerFactory.getLogger(WinnersListHelperService.class); 21 | @Autowired 22 | private WinnersListService winnersListService; 23 | 24 | /** 25 | * 获取单条数据 26 | * 27 | * @param winnersList 28 | * @return 29 | * @author rufei.cn 30 | */ 31 | public WinnersList getWinnersList(WinnersList winnersList) { 32 | return winnersListService.getWinnersList(winnersList); 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-core/src/main/java/com/cn/xmf/job/core/enums/ExecutorBlockStrategyEnum.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.core.enums; 2 | 3 | /** 4 | * Created by xuxueli on 17/5/9. 5 | */ 6 | public enum ExecutorBlockStrategyEnum { 7 | 8 | SERIAL_EXECUTION("Serial execution"), 9 | /**CONCURRENT_EXECUTION("并行"),*/ 10 | DISCARD_LATER("Discard Later"), 11 | COVER_EARLY("Cover Early"); 12 | 13 | private String title; 14 | private ExecutorBlockStrategyEnum (String title) { 15 | this.title = title; 16 | } 17 | 18 | public void setTitle(String title) { 19 | this.title = title; 20 | } 21 | public String getTitle() { 22 | return title; 23 | } 24 | 25 | public static ExecutorBlockStrategyEnum match(String name, ExecutorBlockStrategyEnum defaultItem) { 26 | if (name != null) { 27 | for (ExecutorBlockStrategyEnum item:ExecutorBlockStrategyEnum.values()) { 28 | if (item.name().equals(name)) { 29 | return item; 30 | } 31 | } 32 | } 33 | return defaultItem; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/util/ImageUtil.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.util; 2 | 3 | import java.util.Random; 4 | 5 | public class ImageUtil { 6 | 7 | /** 8 | * 获取随机颜色代码 9 | * @return 10 | */ 11 | public static String getRandColorCode() { 12 | //红色 13 | String red; 14 | //绿色 15 | String green; 16 | //蓝色 17 | String blue; 18 | //生成随机对象 19 | Random random = new Random(); 20 | //生成红色颜色代码 21 | red = Integer.toHexString(random.nextInt(256)).toUpperCase(); 22 | //生成绿色颜色代码 23 | green = Integer.toHexString(random.nextInt(256)).toUpperCase(); 24 | //生成蓝色颜色代码 25 | blue = Integer.toHexString(random.nextInt(256)).toUpperCase(); 26 | //判断红色代码的位数 27 | red = red.length() == 1 ? "0" + red : red; 28 | //判断绿色代码的位数 29 | green = green.length() == 1 ? "0" + green : green; 30 | //判断蓝色代码的位数 31 | blue = blue.length() == 1 ? "0" + blue : blue; 32 | //生成十六进制颜色值 33 | String color = "#" + red + green + blue; 34 | return color; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: job-admin 4 | profiles: 5 | active: dev 6 | main: 7 | allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册 8 | 9 | #nacos 注册中心和配置中心 10 | --- 11 | spring: 12 | profiles: dev 13 | cloud: 14 | nacos: 15 | discovery: 16 | server-addr: 172.17.143.99:8848 17 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 18 | config: 19 | server-addr: 172.17.143.99:8848 20 | file-extension: yml 21 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 22 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 23 | 24 | --- 25 | spring: 26 | profiles: prod 27 | cloud: 28 | nacos: 29 | discovery: 30 | server-addr: 172.17.143.99:8848 31 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 32 | config: 33 | server-addr: 172.17.143.99:8848 34 | file-extension: yml 35 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 36 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-service/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: job-service 4 | profiles: 5 | active: dev 6 | main: 7 | allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册 8 | 9 | #nacos 注册中心和配置中心 10 | --- 11 | spring: 12 | profiles: dev 13 | cloud: 14 | nacos: 15 | discovery: 16 | server-addr: 172.17.143.99:8848 17 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 18 | config: 19 | server-addr: 172.17.143.99:8848 20 | file-extension: yml 21 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 22 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 23 | 24 | --- 25 | spring: 26 | profiles: prod 27 | cloud: 28 | nacos: 29 | discovery: 30 | server-addr: 172.17.143.99:8848 31 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 32 | config: 33 | server-addr: 172.17.143.99:8848 34 | file-extension: yml 35 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 36 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-zuul/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | # 2 | spring: 3 | application: 4 | name: base-zuul 5 | profiles: 6 | active: dev 7 | main: 8 | allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册 9 | 10 | #nacos 注册中心和配置中心 11 | --- 12 | spring: 13 | profiles: dev 14 | cloud: 15 | nacos: 16 | discovery: 17 | server-addr: 172.17.143.99:8848 18 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 19 | config: 20 | server-addr: 172.17.143.99:8848 21 | file-extension: yml 22 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 23 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 24 | 25 | --- 26 | spring: 27 | profiles: prod 28 | cloud: 29 | nacos: 30 | discovery: 31 | server-addr: 172.17.143.99:8848 32 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 33 | config: 34 | server-addr: 172.17.143.99:8848 35 | file-extension: yml 36 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 37 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-kafka-service/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: job-kafka 4 | profiles: 5 | active: dev 6 | main: 7 | allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册 8 | 9 | #nacos 注册中心和配置中心 10 | --- 11 | spring: 12 | profiles: dev 13 | cloud: 14 | nacos: 15 | discovery: 16 | server-addr: 172.17.143.99:8848 17 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 18 | config: 19 | server-addr: 172.17.143.99:8848 20 | file-extension: yml 21 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 22 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 23 | 24 | --- 25 | spring: 26 | profiles: prod 27 | cloud: 28 | nacos: 29 | discovery: 30 | server-addr: 172.17.143.99:8848 31 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 32 | config: 33 | server-addr: 172.17.143.99:8848 34 | file-extension: yml 35 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 36 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-redis-service/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: redis-service 4 | profiles: 5 | active: dev 6 | main: 7 | allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册 8 | 9 | #nacos 注册中心和配置中心 10 | --- 11 | spring: 12 | profiles: dev 13 | cloud: 14 | nacos: 15 | discovery: 16 | server-addr: 172.17.143.99:8848 17 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 18 | config: 19 | server-addr: 172.17.143.99:8848 20 | file-extension: yml 21 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 22 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 23 | 24 | --- 25 | spring: 26 | profiles: prod 27 | cloud: 28 | nacos: 29 | discovery: 30 | server-addr: 172.17.143.99:8848 31 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 32 | config: 33 | server-addr: 172.17.143.99:8848 34 | file-extension: yml 35 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 36 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-elasticsearch-service/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: elasticsearch-service 4 | profiles: 5 | active: dev 6 | main: 7 | allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册 8 | 9 | #nacos 注册中心和配置中心 10 | --- 11 | spring: 12 | profiles: dev 13 | cloud: 14 | nacos: 15 | discovery: 16 | server-addr: 172.17.143.99:8848 17 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 18 | config: 19 | server-addr: 172.17.143.99:8848 20 | file-extension: yml 21 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 22 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 23 | 24 | --- 25 | spring: 26 | profiles: prod 27 | cloud: 28 | nacos: 29 | discovery: 30 | server-addr: 172.17.143.99:8848 31 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 32 | config: 33 | server-addr: 172.17.143.99:8848 34 | file-extension: yml 35 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 36 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-kafka-service/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: kafka-service 4 | profiles: 5 | active: dev 6 | main: 7 | allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册 8 | 9 | #nacos 注册中心和配置中心 10 | --- 11 | spring: 12 | profiles: dev # 测试环境 13 | cloud: 14 | nacos: 15 | discovery: 16 | server-addr: 172.17.143.99:8848 17 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 18 | config: 19 | server-addr: 172.17.143.99:8848 20 | file-extension: yml 21 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 22 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 23 | 24 | --- 25 | spring: 26 | profiles: prod # 生产环境 27 | cloud: 28 | nacos: 29 | discovery: 30 | server-addr: 172.17.143.99:8848 31 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 32 | config: 33 | server-addr: 172.17.143.99:8848 34 | file-extension: yml 35 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 36 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-core/src/main/java/com/cn/xmf/job/core/handler/IJobHandler.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.core.handler; 2 | 3 | import com.cn.xmf.job.core.biz.model.ReturnT; 4 | 5 | /** 6 | * job handler 7 | * 8 | * @author xuxueli 2015-12-19 19:06:38 9 | */ 10 | public abstract class IJobHandler { 11 | 12 | 13 | /** success */ 14 | public static final ReturnT SUCCESS = new ReturnT(200, null); 15 | /** fail */ 16 | public static final ReturnT FAIL = new ReturnT(500, null); 17 | /** fail timeout */ 18 | public static final ReturnT FAIL_TIMEOUT = new ReturnT(502, null); 19 | 20 | 21 | /** 22 | * execute handler, invoked when executor receives a scheduling request 23 | * 24 | * @param param 25 | * @return 26 | * @throws Exception 27 | */ 28 | public abstract ReturnT execute(String param) throws Exception; 29 | 30 | 31 | /** 32 | * init handler, invoked when JobThread init 33 | */ 34 | public void init() { 35 | // TODO 36 | } 37 | 38 | 39 | /** 40 | * destroy handler, invoked when JobThread destroy 41 | */ 42 | public void destroy() { 43 | // TODO 44 | } 45 | 46 | 47 | } 48 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-core/src/main/java/com/cn/xmf/job/core/biz/ExecutorBiz.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.core.biz; 2 | 3 | import com.cn.xmf.job.core.biz.model.LogResult; 4 | import com.cn.xmf.job.core.biz.model.ReturnT; 5 | import com.cn.xmf.job.core.biz.model.TriggerParam; 6 | 7 | /** 8 | * Created by xuxueli on 17/3/1. 9 | */ 10 | public interface ExecutorBiz { 11 | 12 | /** 13 | * beat 14 | * @return 15 | */ 16 | public ReturnT beat(); 17 | 18 | /** 19 | * idle beat 20 | * 21 | * @param jobId 22 | * @return 23 | */ 24 | public ReturnT idleBeat(int jobId); 25 | 26 | /** 27 | * kill 28 | * @param jobId 29 | * @return 30 | */ 31 | public ReturnT kill(int jobId); 32 | 33 | /** 34 | * log 35 | * @param logDateTim 36 | * @param logId 37 | * @param fromLineNum 38 | * @return 39 | */ 40 | public ReturnT log(long logDateTim, int logId, int fromLineNum); 41 | 42 | /** 43 | * run 44 | * @param triggerParam 45 | * @return 46 | */ 47 | public ReturnT run(TriggerParam triggerParam); 48 | 49 | } 50 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-api/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: wechat-api 4 | profiles: 5 | active: dev 6 | main: 7 | allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册 8 | #nacos 注册中心和配置中心 9 | logging: 10 | level: 11 | nacos: error 12 | --- 13 | spring: 14 | profiles: dev 15 | cloud: 16 | nacos: 17 | discovery: 18 | server-addr: 172.17.143.99:8848 19 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 20 | config: 21 | server-addr: 172.17.143.99:8848 22 | file-extension: yml 23 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 24 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 25 | 26 | --- 27 | spring: 28 | profiles: prod # 29 | cloud: 30 | nacos: 31 | discovery: 32 | server-addr: 172.17.143.99:8848 33 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 34 | config: 35 | server-addr: 172.17.143.99:8848 36 | file-extension: yml 37 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml 38 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-base-service/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: sys-service 4 | profiles: 5 | active: dev 6 | main: 7 | allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册 8 | 9 | #nacos 注册中心和配置中心 10 | --- 11 | spring: 12 | profiles: dev 13 | cloud: 14 | nacos: 15 | discovery: 16 | server-addr: 172.17.143.99:8848 17 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 18 | config: 19 | server-addr: 172.17.143.99:8848 20 | file-extension: yml 21 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml,common-db-cooxin.yml 22 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 23 | 24 | --- 25 | spring: 26 | profiles: prod 27 | cloud: 28 | nacos: 29 | discovery: 30 | server-addr: 172.17.143.99:8848 31 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 32 | config: 33 | server-addr: 172.17.143.99:8848 34 | file-extension: yml 35 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml,common-db-cooxin.yml 36 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-service/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: wechat-service 4 | profiles: 5 | active: dev 6 | main: 7 | allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册 8 | 9 | #nacos 注册中心和配置中心 10 | --- 11 | spring: 12 | profiles: dev 13 | cloud: 14 | nacos: 15 | discovery: 16 | server-addr: 172.17.143.99:8848 17 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 18 | config: 19 | server-addr: 172.17.143.99:8848 20 | file-extension: yml 21 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml,common-db-cooxin.yml 22 | namespace: d2b21e7b-b14a-4d03-8b95-c759b36de49e 23 | 24 | --- 25 | spring: 26 | profiles: prod 27 | cloud: 28 | nacos: 29 | discovery: 30 | server-addr: 172.17.143.99:8848 31 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 32 | config: 33 | server-addr: 172.17.143.99:8848 34 | file-extension: yml 35 | shared-dataids: ${spring.application.name}.yml,common-ribbon-hystrix-logs.yml,common-db-cooxin.yml 36 | namespace: be84543a-2ced-4aa5-8248-5048c497b0f3 -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/role/model/JobMenuRole.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.role.model; 2 | 3 | import com.cn.xmf.base.model.BaseEntitys; 4 | 5 | import java.util.Date; 6 | import java.math.BigDecimal; 7 | 8 | /** 9 | * 角色菜单关系Entity 10 | * 11 | * @author rufei.cn 12 | * @version 2018-12-19 13 | */ 14 | public class JobMenuRole extends BaseEntitys { 15 | 16 | private static final long serialVersionUID = 1L; 17 | private Long roleId; // 角色ID 18 | private String roleCode; // 角色Code 19 | 20 | private Long menuId; // 菜单ID 21 | 22 | 23 | public JobMenuRole() { 24 | 25 | } 26 | 27 | public Long getRoleId() { 28 | return roleId; 29 | } 30 | 31 | public void setRoleId(Long roleId) { 32 | this.roleId = roleId; 33 | } 34 | 35 | public Long getMenuId() { 36 | return menuId; 37 | } 38 | 39 | public void setMenuId(Long menuId) { 40 | this.menuId = menuId; 41 | } 42 | 43 | public String getRoleCode() { 44 | return roleCode; 45 | } 46 | 47 | public void setRoleCode(String roleCode) { 48 | this.roleCode = roleCode; 49 | } 50 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/code/model/CodeTable.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.code.model; 2 | 3 | import com.cn.xmf.base.model.BaseEntitys; 4 | 5 | import java.util.Date; 6 | import java.math.BigDecimal; 7 | 8 | /** 9 | * 数据表信息Entity 10 | * 11 | * @author rufei.cn 12 | * @version 2018-12-10 13 | */ 14 | public class CodeTable extends BaseEntitys { 15 | 16 | private static final long serialVersionUID = 1L; 17 | private String name; // 名称 18 | 19 | private String comments; // 描述 20 | 21 | private String className; // 实体类名称 22 | 23 | 24 | public CodeTable() { 25 | 26 | } 27 | 28 | 29 | public String getName() { 30 | return name; 31 | } 32 | 33 | public void setName(String name) { 34 | this.name = name; 35 | } 36 | 37 | public String getComments() { 38 | return comments; 39 | } 40 | 41 | public void setComments(String comments) { 42 | this.comments = comments; 43 | } 44 | 45 | public String getClassName() { 46 | return className; 47 | } 48 | 49 | public void setClassName(String className) { 50 | this.className = className; 51 | } 52 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-core/src/main/java/com/cn/xmf/job/core/biz/AdminBiz.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.core.biz; 2 | 3 | import com.cn.xmf.job.core.biz.model.HandleCallbackParam; 4 | import com.cn.xmf.job.core.biz.model.RegistryParam; 5 | import com.cn.xmf.job.core.biz.model.ReturnT; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @author xuxueli 2017-07-27 21:52:49 11 | */ 12 | public interface AdminBiz { 13 | 14 | public static final String MAPPING = "/api"; 15 | 16 | 17 | // ---------------------- callback ---------------------- 18 | 19 | /** 20 | * callback 21 | * 22 | * @param callbackParamList 23 | * @return 24 | */ 25 | public ReturnT callback(List callbackParamList); 26 | 27 | 28 | // ---------------------- registry ---------------------- 29 | 30 | /** 31 | * registry 32 | * 33 | * @param registryParam 34 | * @return 35 | */ 36 | public ReturnT registry(RegistryParam registryParam); 37 | 38 | /** 39 | * registry remove 40 | * 41 | * @param registryParam 42 | * @return 43 | */ 44 | public ReturnT registryRemove(RegistryParam registryParam); 45 | 46 | } 47 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/role/model/JobRole.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.role.model; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.cn.xmf.base.model.BaseEntitys; 5 | import com.cn.xmf.job.admin.menu.model.JobMenu; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * 角色数据Entity 11 | * 12 | * @author rufei.cn 13 | * @version 2018-12-19 14 | */ 15 | public class JobRole extends BaseEntitys { 16 | 17 | private static final long serialVersionUID = 1L; 18 | private String name; // 角色名称 19 | private String roleCode; // 角色代码 20 | private List list;//菜单数据 21 | 22 | public JobRole() { 23 | 24 | } 25 | 26 | public String getName() { 27 | return name; 28 | } 29 | 30 | public void setName(String name) { 31 | this.name = name; 32 | } 33 | 34 | public String getRoleCode() { 35 | return roleCode; 36 | } 37 | 38 | public void setRoleCode(String roleCode) { 39 | this.roleCode = roleCode; 40 | } 41 | 42 | public List getList() { 43 | return list; 44 | } 45 | 46 | public void setList(List list) { 47 | this.list = list; 48 | } 49 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/job/dao/XxlJobRegistryDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.job.dao; 2 | 3 | import com.cn.xmf.job.admin.core.model.XxlJobRegistry; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by xuxueli on 16/9/30. 10 | */ 11 | public interface XxlJobRegistryDao { 12 | 13 | public int removeDead(@Param("timeout") int timeout); 14 | 15 | public List findAll(@Param("timeout") int timeout); 16 | 17 | public int registryUpdate(@Param("registryGroup") String registryGroup, 18 | @Param("registryKey") String registryKey, 19 | @Param("registryValue") String registryValue); 20 | 21 | public int registrySave(@Param("registryGroup") String registryGroup, 22 | @Param("registryKey") String registryKey, 23 | @Param("registryValue") String registryValue); 24 | 25 | public int registryDelete(@Param("registryGroup") String registGroup, 26 | @Param("registryKey") String registryKey, 27 | @Param("registryValue") String registryValue); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/template/common/common-error.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <#import "/common/common.macro.ftl" as netCommon> 5 | <@netCommon.commonStyle /> 6 | 7 | 8 | 错误页面 9 | 10 | sidebar-collapse"> 11 |
12 | 13 | <@netCommon.commonHeader /> 14 | 15 | <@netCommon.commonLeft/> 16 | 17 | 18 |
19 |
20 |

错误信息

21 |
22 |
23 |
${errorMsg}
24 |
25 |
26 | 返回首页 27 |
28 |
29 | 30 | 31 | <@netCommon.commonFooter /> 32 |
33 | <@netCommon.commonScript /> 34 | 35 | 36 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/job/dao/XxlJobInfoDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.job.dao; 2 | 3 | import com.cn.xmf.job.admin.core.model.XxlJobInfo; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | import java.util.List; 7 | 8 | 9 | /** 10 | * job info 11 | * @author xuxueli 2016-1-12 18:03:45 12 | */ 13 | public interface XxlJobInfoDao { 14 | 15 | public List pageList(@Param("offset") int offset, 16 | @Param("pagesize") int pagesize, 17 | @Param("jobGroup") int jobGroup, 18 | @Param("jobDesc") String jobDesc, 19 | @Param("executorHandler") String executorHandler); 20 | public int pageListCount(@Param("offset") int offset, 21 | @Param("pagesize") int pagesize, 22 | @Param("jobGroup") int jobGroup, 23 | @Param("jobDesc") String jobDesc, 24 | @Param("executorHandler") String executorHandler); 25 | 26 | public int save(XxlJobInfo info); 27 | 28 | public XxlJobInfo loadById(@Param("id") int id); 29 | 30 | public int update(XxlJobInfo item); 31 | 32 | public int delete(@Param("id") int id); 33 | 34 | public List getJobsByGroup(@Param("jobGroup") int jobGroup); 35 | 36 | public int findAllCount(); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-core/src/main/java/com/cn/xmf/job/core/util/ShardingUtil.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.core.util; 2 | 3 | /** 4 | * sharding vo 5 | * @author xuxueli 2017-07-25 21:26:38 6 | */ 7 | public class ShardingUtil { 8 | 9 | private static InheritableThreadLocal contextHolder = new InheritableThreadLocal(); 10 | 11 | public static class ShardingVO { 12 | 13 | private int index; // sharding index 14 | private int total; // sharding total 15 | 16 | public ShardingVO(int index, int total) { 17 | this.index = index; 18 | this.total = total; 19 | } 20 | 21 | public int getIndex() { 22 | return index; 23 | } 24 | 25 | public void setIndex(int index) { 26 | this.index = index; 27 | } 28 | 29 | public int getTotal() { 30 | return total; 31 | } 32 | 33 | public void setTotal(int total) { 34 | this.total = total; 35 | } 36 | } 37 | 38 | public static void setShardingVo(ShardingVO shardingVo){ 39 | contextHolder.set(shardingVo); 40 | } 41 | 42 | public static ShardingVO getShardingVo(){ 43 | return contextHolder.get(); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/base/Interface/SysCommon.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.base.Interface; 2 | 3 | import com.cn.xmf.enums.MessageType; 4 | 5 | import java.util.List; 6 | 7 | public interface SysCommon { 8 | /** 9 | * sendDingTalkMessage(发送钉钉消息) 10 | * 11 | * @param method 发送消息的方法 12 | * @param parms 方法参数 13 | * @param retData 方法返回值 14 | * @param msg 消息内容 15 | * @param t 类信息 16 | */ 17 | void sendDingTalkMessage(String method, Object parms, Object retData, Object msg, Class t); 18 | 19 | /** 20 | * sendMessage(综合消息发送) 21 | * 22 | * @param messageType 消息类型 23 | * @param title 标题 24 | * @param content 内容 25 | * @param list 收件人 26 | */ 27 | void sendMessage(MessageType messageType, String title, Object content, List list); 28 | 29 | /** 30 | * 获取字典数据 31 | * 32 | * @param dictType 33 | * @param dictKey 34 | * @return 35 | */ 36 | String getDictValue(String dictType, String dictKey); 37 | 38 | /** 39 | * sendKafka(发送数据到kafka) 40 | * 41 | * @param topic 42 | * @param key 43 | * @param value 44 | * @return 45 | */ 46 | boolean sendKafka(String topic, String key, Object value); 47 | } 48 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/model/msg/Message.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.model.msg; 2 | 3 | import com.cn.xmf.enums.MessageType; 4 | import org.apache.commons.lang3.builder.ToStringBuilder; 5 | 6 | /** 7 | * 消息数据 8 | */ 9 | public class Message { 10 | 11 | private String title; 12 | private MessageType messageType; 13 | private String messageContent; 14 | 15 | public String getTitle() { 16 | return title; 17 | } 18 | 19 | public void setTitle(String title) { 20 | this.title = title; 21 | } 22 | 23 | public MessageType getMessageType() { 24 | return messageType; 25 | } 26 | 27 | public void setMessageType(MessageType messageType) { 28 | this.messageType = messageType; 29 | } 30 | 31 | public String getMessageContent() { 32 | return messageContent; 33 | } 34 | 35 | public void setMessageContent(String messageContent) { 36 | this.messageContent = messageContent; 37 | } 38 | 39 | @Override 40 | public String toString() { 41 | return new ToStringBuilder(this) 42 | .append("title", title) 43 | .append("messageType", messageType) 44 | .append("messageContent", messageContent) 45 | .toString(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/treeview/bootstrap-treeview.css: -------------------------------------------------------------------------------- 1 | /* ========================================================= 2 | * bootstrap-treeview.css v1.2.0 3 | * ========================================================= 4 | * Copyright 2013 Jonathan Miles 5 | * Project URL : http://www.jondmiles.com/bootstrap-treeview 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ========================================================= */ 19 | 20 | .treeview .list-group-item { 21 | cursor: pointer; 22 | } 23 | 24 | .treeview span.indent { 25 | margin-left: 10px; 26 | margin-right: 10px; 27 | } 28 | 29 | .treeview span.icon { 30 | width: 12px; 31 | margin-right: 5px; 32 | } 33 | 34 | .treeview .node-disabled { 35 | color: silver; 36 | cursor: not-allowed; 37 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-base-service/src/main/java/com/cn/xmf/service/model/dingtalk/SendResult.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.model.dingtalk; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | 8 | /** 9 | * Created by dustin on 2017/3/17. 10 | */ 11 | public class SendResult { 12 | private boolean isSuccess; 13 | private Integer errorCode; 14 | private String errorMsg; 15 | 16 | public boolean isSuccess() { 17 | return isSuccess; 18 | } 19 | 20 | public void setIsSuccess(boolean isSuccess) { 21 | this.isSuccess = isSuccess; 22 | } 23 | 24 | public Integer getErrorCode() { 25 | return errorCode; 26 | } 27 | 28 | public void setErrorCode(Integer errorCode) { 29 | this.errorCode = errorCode; 30 | } 31 | 32 | public String getErrorMsg() { 33 | return errorMsg; 34 | } 35 | 36 | public void setErrorMsg(String errorMsg) { 37 | this.errorMsg = errorMsg; 38 | } 39 | 40 | @Override 41 | public String toString(){ 42 | Map items = new HashMap(); 43 | items.put("errorCode", errorCode); 44 | items.put("errorMsg", errorMsg); 45 | items.put("isSuccess", isSuccess); 46 | return JSON.toJSONString(items); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/core/jobbean/RemoteHttpJobBean.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.core.jobbean; 2 | 3 | import com.cn.xmf.job.admin.core.thread.JobTriggerPoolHelper; 4 | import com.cn.xmf.job.admin.core.trigger.TriggerTypeEnum; 5 | import com.cn.xmf.job.admin.core.util.I18nUtil; 6 | import org.quartz.JobExecutionContext; 7 | import org.quartz.JobExecutionException; 8 | import org.quartz.JobKey; 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | import org.springframework.scheduling.quartz.QuartzJobBean; 12 | 13 | /** 14 | * http job bean 15 | * “@DisallowConcurrentExecution” diable concurrent, thread size can not be only one, better given more 16 | * @author xuxueli 2015-12-17 18:20:34 17 | */ 18 | //@DisallowConcurrentExecution 19 | public class RemoteHttpJobBean extends QuartzJobBean { 20 | private static Logger logger = LoggerFactory.getLogger(RemoteHttpJobBean.class); 21 | 22 | @Override 23 | protected void executeInternal(JobExecutionContext context) 24 | throws JobExecutionException { 25 | 26 | // load jobId 27 | JobKey jobKey = context.getTrigger().getJobKey(); 28 | Integer jobId = Integer.valueOf(jobKey.getName()); 29 | // trigger 30 | //XxlJobTrigger.trigger(jobId); 31 | JobTriggerPoolHelper.trigger(jobId, TriggerTypeEnum.CRON, -1, null, null); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-zuul/src/main/java/com/cn/xmf/zuul/config/CorsConfig.java: -------------------------------------------------------------------------------- 1 | 2 | package com.cn.xmf.zuul.config; 3 | 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.web.cors.CorsConfiguration; 7 | import org.springframework.web.cors.UrlBasedCorsConfigurationSource; 8 | import org.springframework.web.filter.CorsFilter; 9 | 10 | 11 | /** 12 | * CorsConfig:(解决跨域问题) 13 | * @author: airufei 14 | * @date:2017/12/22 19:35 15 | * @return: 16 | */ 17 | 18 | @Configuration 19 | public class CorsConfig { 20 | @Bean 21 | public CorsFilter corsFilter() { 22 | final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); 23 | final CorsConfiguration config = new CorsConfiguration(); 24 | config.setAllowCredentials(true); // 允许cookies跨域 25 | config.setAllowCredentials(true); // 跨域session共享 26 | config.addAllowedOrigin("*");// #允许向该服务器提交请求的URI,*表示全部允许,在SpringMVC中,如果设成*,会自动转成当前请求头中的Origin 27 | config.addAllowedHeader("*");// #允许访问的头信息,*表示全部 28 | config.setMaxAge(18000L);// 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了 29 | config.addAllowedMethod("*");// 允许提交请求的方法,*表示全部允许 30 | source.registerCorsConfiguration("/**", config); 31 | return new CorsFilter(source); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/model/wx/CommentDomm.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.model.wx; 2 | 3 | import com.cn.xmf.util.ImageUtil; 4 | import org.apache.commons.lang3.RandomUtils; 5 | import org.apache.commons.lang3.builder.ToStringBuilder; 6 | 7 | /** 8 | * 弹幕 9 | */ 10 | public class CommentDomm extends Comment { 11 | /** 12 | * 距离顶部的距离 13 | */ 14 | private int top=RandomUtils.nextInt(5, 40); 15 | 16 | /** 17 | * 弹幕距离时间 18 | */ 19 | private int time=RandomUtils.nextInt(5, 15); 20 | 21 | /** 22 | * 弹幕字体颜色 23 | */ 24 | private String color= ImageUtil.getRandColorCode(); 25 | 26 | public double getTop() { 27 | return top; 28 | } 29 | 30 | public void setTop(int top) { 31 | this.top = top; 32 | } 33 | 34 | public int getTime() { 35 | return time; 36 | } 37 | 38 | public void setTime(int time) { 39 | this.time = time; 40 | } 41 | 42 | public String getColor() { 43 | return color; 44 | } 45 | 46 | public void setColor(String color) { 47 | this.color = color; 48 | } 49 | 50 | @Override 51 | public String toString() { 52 | return new ToStringBuilder(this) 53 | .append("top", top) 54 | .append("time", time) 55 | .append("color", color) 56 | .toString(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-service/src/main/java/com/cn/xmf/service/user/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.user.dao; 2 | 3 | 4 | import com.cn.xmf.model.wx.User; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | /** 10 | * 微信用户DAO接口 11 | * @author rufei 12 | * @version 2018-07-09 13 | */ 14 | @SuppressWarnings("all") 15 | public interface UserDao { 16 | 17 | /** 18 | * 删除数据(逻辑删除) 19 | * @param question 20 | * @return 21 | */ 22 | public void delete(long id); 23 | /** 24 | * 单条数据增加 25 | * @param user 26 | * @return 27 | */ 28 | public void add(User user); 29 | 30 | /** 31 | * 批量数据增加 32 | * @param user 33 | * @return 34 | */ 35 | public void addTrainRecordBatch(List list); 36 | 37 | /** 38 | * 获取单条数据 39 | * @param id 40 | * @return 41 | */ 42 | public User getWxUserById(long id); 43 | 44 | /** 45 | * 修改单条数据 46 | * @param id 47 | * @return 48 | */ 49 | public void updateById(User user); 50 | 51 | /** 52 | * 获取分页数据 53 | * @param map 54 | * @return 55 | */ 56 | public List getList(Map map); 57 | 58 | 59 | /** 60 | * 获取集合数据,不带分页 61 | * @param map 62 | * @return 63 | */ 64 | public List getWxUserList(User user); 65 | 66 | /** 67 | * 获取分页记录总数 68 | * @param map 69 | * @return 70 | */ 71 | public Integer getTotalCount(Map map); 72 | 73 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/core/model/XxlJobRegistry.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.core.model; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * Created by xuxueli on 16/9/30. 7 | */ 8 | public class XxlJobRegistry { 9 | 10 | private Integer id; 11 | private String registryGroup; 12 | private String registryKey; 13 | private String registryValue; 14 | private Date updateTime; 15 | 16 | public Integer getId() { 17 | return id; 18 | } 19 | 20 | public void setId(Integer id) { 21 | this.id = id; 22 | } 23 | 24 | public String getRegistryGroup() { 25 | return registryGroup; 26 | } 27 | 28 | public void setRegistryGroup(String registryGroup) { 29 | this.registryGroup = registryGroup; 30 | } 31 | 32 | public String getRegistryKey() { 33 | return registryKey; 34 | } 35 | 36 | public void setRegistryKey(String registryKey) { 37 | this.registryKey = registryKey; 38 | } 39 | 40 | public String getRegistryValue() { 41 | return registryValue; 42 | } 43 | 44 | public void setRegistryValue(String registryValue) { 45 | this.registryValue = registryValue; 46 | } 47 | 48 | public Date getUpdateTime() { 49 | return updateTime; 50 | } 51 | 52 | public void setUpdateTime(Date updateTime) { 53 | this.updateTime = updateTime; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-kafka-service/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | com.cn.xmf 8 | xmfcn-spring-cloud 9 | 1.1.1 10 | ../ 11 | 12 | 13 | xmfcn-spring-cloud-job-kafka 14 | 1.1.1 15 | jar 16 | 17 | xmfcn-spring-cloud-job-kafka 18 | xmfcn-spring-cloud-job-kafka 19 | 20 | 21 | 22 | xmf.cn.common 23 | ${xmfcn.common.version} 24 | xmfcn-spring-cloud-common 25 | 26 | 27 | 28 | 29 | 30 | 31 | maven-compiler-plugin 32 | 33 | ${java.version} 34 | UTF-8 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-api/src/main/java/com/cn/xmf/api/user/controller/LogController.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.api.user.controller; 2 | 3 | 4 | import com.cn.xmf.base.model.ResultCodeMessage; 5 | import com.cn.xmf.base.model.RetData; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import javax.servlet.http.HttpServletRequest; 12 | 13 | /** 14 | * UserController(用户信息) 15 | * 16 | * @author rufei.cn 17 | * @version 2018-09-16 18 | */ 19 | 20 | @RestController 21 | @RequestMapping(value = "/log") 22 | @SuppressWarnings("all") 23 | public class LogController { 24 | private static Logger logger = LoggerFactory.getLogger(LogController.class); 25 | 26 | /** 27 | * getList:(获取用户信息分页查询接口) 28 | * 29 | * @param request 30 | * @param parms 31 | * @return 32 | * @author rufei.cn 33 | */ 34 | @RequestMapping("upLog") 35 | public RetData upLog(HttpServletRequest request) { 36 | RetData retData = new RetData(); 37 | String logContent = request.getParameter("logContent"); 38 | logger.info("<====================wechat_log=================>={}",logContent); 39 | retData.setCode(ResultCodeMessage.SUCCESS); 40 | retData.setMessage(ResultCodeMessage.SUCCESS_MESSAGE); 41 | return retData; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/config/ServiceSecurity.java: -------------------------------------------------------------------------------- 1 | /** 2 | package com.cn.xmf.common.config; 3 | 4 | import org.springframework.beans.factory.annotation.Value; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; 7 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; 8 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; 9 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; 10 | 11 | */ 12 | /** 13 | *当前服务安全密码验证 14 | *//** 15 | 16 | @EnableWebSecurity 17 | @Configuration 18 | public class ServiceSecurity extends WebSecurityConfigurerAdapter { 19 | 20 | 21 | @Value("${users.admin.name}") 22 | private String adminName; 23 | @Value("${users.admin.password}") 24 | private String adminPassword; 25 | 26 | 27 | @Override 28 | protected void configure(HttpSecurity http) throws Exception { 29 | http.csrf().disable(); 30 | http.authorizeRequests().anyRequest().authenticated().and().httpBasic(); 31 | } 32 | 33 | 34 | @Override 35 | protected void configure(AuthenticationManagerBuilder auth) throws Exception { 36 | auth.inMemoryAuthentication().withUser(adminName).password(adminPassword).roles("admin");// 管理员 37 | } 38 | 39 | } 40 | */ 41 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/js/kafka.index.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | //验证保存数据并且提交 3 | var addModalValidate = $("#addModal .form").validate({ 4 | errorElement: 'span', 5 | errorClass: 'help-block', 6 | focusInvalid: true, 7 | submitHandler: function (form) { 8 | $.post(base_url + "/kafka/send", $("#addModal .form").serialize(), function (data, status) { 9 | if (data.code == 200) { 10 | //$('#addModal').modal('hide'); 11 | layer.open({ 12 | title: I18n.system_tips, 13 | btn: [I18n.system_ok], 14 | content: (data.msg || I18n.system_add_fail), 15 | icon: '1' 16 | }); 17 | } else { 18 | layer.open({ 19 | title: I18n.system_tips, 20 | btn: [I18n.system_ok], 21 | content: (data.msg || I18n.system_add_fail), 22 | icon: '2' 23 | }); 24 | } 25 | }); 26 | } 27 | }); 28 | //重置编辑页面数据 29 | $("#addModal").on('hide.bs.modal', function () { 30 | $("#addModal .form")[0].reset(); 31 | addModalValidate.resetForm(); 32 | $("#addModal .form .form-group").removeClass("has-error"); 33 | $(".remote_panel").show(); // remote 34 | 35 | }); 36 | }); -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-core/src/main/java/com/cn/xmf/job/core/biz/model/LogResult.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.core.biz.model; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by xuxueli on 17/3/23. 7 | */ 8 | public class LogResult implements Serializable { 9 | private static final long serialVersionUID = 42L; 10 | 11 | public LogResult(int fromLineNum, int toLineNum, String logContent, boolean isEnd) { 12 | this.fromLineNum = fromLineNum; 13 | this.toLineNum = toLineNum; 14 | this.logContent = logContent; 15 | this.isEnd = isEnd; 16 | } 17 | 18 | private int fromLineNum; 19 | private int toLineNum; 20 | private String logContent; 21 | private boolean isEnd; 22 | 23 | public int getFromLineNum() { 24 | return fromLineNum; 25 | } 26 | 27 | public void setFromLineNum(int fromLineNum) { 28 | this.fromLineNum = fromLineNum; 29 | } 30 | 31 | public int getToLineNum() { 32 | return toLineNum; 33 | } 34 | 35 | public void setToLineNum(int toLineNum) { 36 | this.toLineNum = toLineNum; 37 | } 38 | 39 | public String getLogContent() { 40 | return logContent; 41 | } 42 | 43 | public void setLogContent(String logContent) { 44 | this.logContent = logContent; 45 | } 46 | 47 | public boolean isEnd() { 48 | return isEnd; 49 | } 50 | 51 | public void setEnd(boolean end) { 52 | isEnd = end; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | com.cn.xmf 8 | xmfcn-spring-cloud 9 | 1.1.1 10 | ../ 11 | 12 | 13 | xmfcn-spring-cloud-wechat-api 14 | 1.1.1 15 | jar 16 | xmfcn-spring-cloud-wechat-api 17 | xmfcn-spring-cloud-wechat-api 18 | 19 | 20 | 21 | xmf.cn.common 22 | ${xmfcn.common.version} 23 | xmfcn-spring-cloud-common 24 | 25 | 26 | 27 | 28 | 29 | 30 | maven-compiler-plugin 31 | 32 | ${java.version} 33 | UTF-8 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-core/src/main/java/com/cn/xmf/job/core/biz/model/ReturnT.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.core.biz.model; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * common return 7 | * @author xuxueli 2015-12-4 16:32:31 8 | * @param 9 | */ 10 | public class ReturnT implements Serializable { 11 | public static final long serialVersionUID = 42L; 12 | 13 | public static final int SUCCESS_CODE = 200; 14 | public static final int FAIL_CODE = 500; 15 | 16 | public static final ReturnT SUCCESS = new ReturnT(null); 17 | public static final ReturnT FAIL = new ReturnT(FAIL_CODE, null); 18 | 19 | private int code; 20 | private String msg; 21 | private T content; 22 | 23 | public ReturnT(){} 24 | public ReturnT(int code, String msg) { 25 | this.code = code; 26 | this.msg = msg; 27 | } 28 | public ReturnT(T content) { 29 | this.code = SUCCESS_CODE; 30 | this.content = content; 31 | } 32 | 33 | public int getCode() { 34 | return code; 35 | } 36 | public void setCode(int code) { 37 | this.code = code; 38 | } 39 | public String getMsg() { 40 | return msg; 41 | } 42 | public void setMsg(String msg) { 43 | this.msg = msg; 44 | } 45 | public T getContent() { 46 | return content; 47 | } 48 | public void setContent(T content) { 49 | this.content = content; 50 | } 51 | 52 | @Override 53 | public String toString() { 54 | return "ReturnT [code=" + code + ", msg=" + msg + ", content=" + content + "]"; 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/model/wx/UserPrize.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.model.wx; 2 | 3 | import com.cn.xmf.base.model.BaseEntitys; 4 | import org.apache.commons.lang3.builder.ToStringBuilder; 5 | 6 | /** 7 | * 奖品信息Entity 8 | * 9 | * @author rufei.cn 10 | * @version 2020-01-02 11 | */ 12 | public class UserPrize extends BaseEntitys { 13 | 14 | private static final long serialVersionUID = 1L; 15 | /** 16 | * 类型 17 | */ 18 | private String type; 19 | 20 | /** 21 | * 奖品名称 22 | */ 23 | private String name; 24 | 25 | /** 26 | * 图片 27 | */ 28 | private String imgUrl; 29 | 30 | 31 | public UserPrize() { 32 | 33 | } 34 | 35 | 36 | public String getType() { 37 | return type; 38 | } 39 | 40 | public void setType(String type) { 41 | this.type = type; 42 | } 43 | 44 | 45 | public String getName() { 46 | return name; 47 | } 48 | 49 | public void setName(String name) { 50 | this.name = name; 51 | } 52 | 53 | 54 | public String getImgUrl() { 55 | return imgUrl; 56 | } 57 | 58 | public void setImgUrl(String imgUrl) { 59 | this.imgUrl = imgUrl; 60 | } 61 | 62 | 63 | @Override 64 | public String toString() { 65 | return new ToStringBuilder(this) 66 | .append("type", type) 67 | .append("name", name) 68 | .append("imgUrl", imgUrl) 69 | .toString(); 70 | } 71 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/util/M5Util.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Project Name:CooxinPro 3 | * File Name:M5Util.java 4 | * Package Name:com.cn.cooxin.util 5 | * Date:2017年2月13日下午10:45:54 6 | * Copyright (c) 2017, hukailee@163.com All Rights Reserved. 7 | */ 8 | 9 | package com.cn.xmf.util; 10 | 11 | import org.slf4j.Logger; 12 | import org.slf4j.LoggerFactory; 13 | 14 | import java.math.BigInteger; 15 | import java.security.MessageDigest; 16 | 17 | /** 18 | * ClassName:M5Util (MD5加密) 19 | * Date: 2017年2月13日 下午10:45:54 20 | * @author rufei 21 | * @Version 1.0 22 | * @see 23 | */ 24 | @SuppressWarnings("all") 25 | public class M5Util { 26 | private static Logger logger = LoggerFactory.getLogger(M5Util.class); 27 | 28 | /** 29 | * 对字符串md5加密 30 | * 31 | * @param str 32 | * @return 33 | * @throws Exception 34 | */ 35 | public static String getMd5(String str) throws Exception { 36 | try { 37 | // 生成一个MD5加密计算摘要 38 | MessageDigest md = MessageDigest.getInstance("MD5"); 39 | // 计算md5函数 40 | md.update(str.getBytes()); 41 | // digest()最后确定返回md5 hash值,返回值为8为字符串。因为md5 hash值是16位的hex值,实际上就是8位的字符 42 | // BigInteger函数则将8位的字符串转换成16位hex值,用字符串来表示;得到字符串形式的hash值 43 | return new BigInteger(1, md.digest()).toString(16); 44 | } catch (Exception e) { 45 | logger.error(StringUtil.getExceptionMsg(e)); 46 | throw new Exception("MD5加密出现错误"); 47 | } 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/plugins/datatables/bootstrap-table-zh-cn.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bootstrap Table Chinese translation 3 | * Author: Zhixin Wen 4 | */ 5 | (function ($) { 6 | 'use strict'; 7 | $.fn.bootstrapTable.locales['zh-CN'] = { 8 | formatLoadingMessage: function () { 9 | return '正在努力地加载数据中,请稍候……'; 10 | }, 11 | formatRecordsPerPage: function (pageNumber) { 12 | return '每页显示 ' + pageNumber + ' 条记录'; 13 | }, 14 | formatShowingRows: function (pageFrom, pageTo, totalRows) { 15 | return '显示第 ' + pageFrom + ' 到第 ' + pageTo + ' 条记录,总共 ' + totalRows + ' 条记录'; 16 | }, 17 | formatSearch: function () { 18 | return '搜索'; 19 | }, 20 | formatNoMatches: function () { 21 | return '没有找到匹配的记录'; 22 | }, 23 | formatPaginationSwitch: function () { 24 | return '隐藏/显示分页'; 25 | }, 26 | formatRefresh: function () { 27 | return '刷新'; 28 | }, 29 | formatToggle: function () { 30 | return '切换'; 31 | }, 32 | formatColumns: function () { 33 | return '列'; 34 | }, 35 | formatExport: function () { 36 | return '导出数据'; 37 | }, 38 | formatClearFilters: function () { 39 | return '清空过滤'; 40 | } 41 | }; 42 | $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']); 43 | 44 | })(jQuery); -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/model/es/EsPage.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.model.es; 2 | 3 | import org.apache.commons.lang3.builder.ToStringBuilder; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * ES 分页参数集 9 | * @Author rufei.cn 10 | * @see 11 | */ 12 | public class EsPage implements Serializable { 13 | public int pageNo; 14 | public int startIndex; 15 | public int pageSize; 16 | public int totalCount; 17 | 18 | public int getPageNo() { 19 | return pageNo; 20 | } 21 | 22 | public void setPageNo(int pageNo) { 23 | this.pageNo = pageNo; 24 | } 25 | 26 | public int getStartIndex() { 27 | return startIndex; 28 | } 29 | 30 | public void setStartIndex(int startIndex) { 31 | this.startIndex = startIndex; 32 | } 33 | 34 | public int getPageSize() { 35 | return pageSize; 36 | } 37 | 38 | public void setPageSize(int pageSize) { 39 | this.pageSize = pageSize; 40 | } 41 | 42 | public int getTotalCount() { 43 | return totalCount; 44 | } 45 | 46 | public void setTotalCount(int totalCount) { 47 | this.totalCount = totalCount; 48 | } 49 | 50 | @Override 51 | public String toString() { 52 | return new ToStringBuilder(this) 53 | .append("pageNo", pageNo) 54 | .append("startIndex", startIndex) 55 | .append("pageSize", pageSize) 56 | .append("totalCount", totalCount) 57 | .toString(); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/bootstrap/datatables/locale/bootstrap-table-zh-CN.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bootstrap Table Chinese translation 3 | * Author: Zhixin Wen 4 | */ 5 | (function ($) { 6 | 'use strict'; 7 | 8 | $.fn.bootstrapTable.locales['zh-CN'] = { 9 | formatLoadingMessage: function () { 10 | return '正在努力地加载数据中,请稍候……'; 11 | }, 12 | formatRecordsPerPage: function (pageNumber) { 13 | return '每页显示 ' + pageNumber + ' 条记录'; 14 | }, 15 | formatShowingRows: function (pageFrom, pageTo, totalRows) { 16 | return '显示第 ' + pageFrom + ' 到第 ' + pageTo + ' 条记录,总共 ' + totalRows + ' 条记录'; 17 | }, 18 | formatSearch: function () { 19 | return '搜索'; 20 | }, 21 | formatNoMatches: function () { 22 | return '没有找到匹配的记录'; 23 | }, 24 | formatPaginationSwitch: function () { 25 | return '隐藏/显示分页'; 26 | }, 27 | formatRefresh: function () { 28 | return '刷新'; 29 | }, 30 | formatToggle: function () { 31 | return '切换'; 32 | }, 33 | formatColumns: function () { 34 | return '列'; 35 | }, 36 | formatExport: function () { 37 | return '导出数据'; 38 | }, 39 | formatClearFilters: function () { 40 | return '清空过滤'; 41 | } 42 | }; 43 | 44 | $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']); 45 | 46 | })(jQuery); 47 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-core/src/main/java/com/cn/xmf/job/core/glue/GlueTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.core.glue; 2 | 3 | /** 4 | * Created by xuxueli on 17/4/26. 5 | */ 6 | public enum GlueTypeEnum { 7 | 8 | BEAN("BEAN", false, null, null), 9 | GLUE_GROOVY("GLUE(Java)", false, null, null), 10 | GLUE_SHELL("GLUE(Shell)", true, "bash", ".sh"), 11 | GLUE_PYTHON("GLUE(Python)", true, "python", ".py"), 12 | GLUE_PHP("GLUE(PHP)", true, "php", ".php"), 13 | GLUE_NODEJS("GLUE(Nodejs)", true, "node", ".js"), 14 | GLUE_POWERSHELL("GLUE(PowerShell)", true, "powershell ", ".ps1"); 15 | 16 | private String desc; 17 | private boolean isScript; 18 | private String cmd; 19 | private String suffix; 20 | 21 | private GlueTypeEnum(String desc, boolean isScript, String cmd, String suffix) { 22 | this.desc = desc; 23 | this.isScript = isScript; 24 | this.cmd = cmd; 25 | this.suffix = suffix; 26 | } 27 | 28 | public String getDesc() { 29 | return desc; 30 | } 31 | 32 | public boolean isScript() { 33 | return isScript; 34 | } 35 | 36 | public String getCmd() { 37 | return cmd; 38 | } 39 | 40 | public String getSuffix() { 41 | return suffix; 42 | } 43 | 44 | public static GlueTypeEnum match(String name){ 45 | for (GlueTypeEnum item: GlueTypeEnum.values()) { 46 | if (item.name().equals(name)) { 47 | return item; 48 | } 49 | } 50 | return null; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/core/route/strategy/ExecutorRouteRound.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.core.route.strategy; 2 | 3 | import com.cn.xmf.job.admin.core.route.ExecutorRouter; 4 | import com.cn.xmf.job.core.biz.model.ReturnT; 5 | import com.cn.xmf.job.core.biz.model.TriggerParam; 6 | 7 | import java.util.List; 8 | import java.util.Random; 9 | import java.util.concurrent.ConcurrentHashMap; 10 | 11 | /** 12 | * Created by xuxueli on 17/3/10. 13 | */ 14 | public class ExecutorRouteRound extends ExecutorRouter { 15 | 16 | private static ConcurrentHashMap routeCountEachJob = new ConcurrentHashMap(); 17 | private static long CACHE_VALID_TIME = 0; 18 | private static int count(int jobId) { 19 | // cache clear 20 | if (System.currentTimeMillis() > CACHE_VALID_TIME) { 21 | routeCountEachJob.clear(); 22 | CACHE_VALID_TIME = System.currentTimeMillis() + 1000*60*60*24; 23 | } 24 | 25 | // count++ 26 | Integer count = routeCountEachJob.get(jobId); 27 | count = (count==null || count>1000000)?(new Random().nextInt(100)):++count; // 初始化时主动Random一次,缓解首次压力 28 | routeCountEachJob.put(jobId, count); 29 | return count; 30 | } 31 | 32 | @Override 33 | public ReturnT route(TriggerParam triggerParam, List addressList) { 34 | String address = addressList.get(count(triggerParam.getJobId())%addressList.size()); 35 | return new ReturnT(address); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-kafka-service/src/main/java/com/cn/xmf/job/config/KafkaBean.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.config; 2 | 3 | import com.cn.xmf.job.common.SysCommonService; 4 | import org.apache.kafka.clients.consumer.KafkaConsumer; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.core.env.Environment; 9 | import org.springframework.stereotype.Component; 10 | 11 | /** 12 | * kafka 消费者和生产者配置 13 | * 14 | * @author rufei.cn 15 | * @version 2019-05-19 16 | */ 17 | @Component 18 | @SuppressWarnings("all") 19 | public class KafkaBean { 20 | 21 | private static final Logger logger = LoggerFactory.getLogger(KafkaBean.class); 22 | @Autowired 23 | private SysCommonService sysCommonService; 24 | @Autowired 25 | private KafkaConfig kafkaConfig; 26 | @Autowired 27 | private Environment environment; 28 | 29 | /** 30 | * 获取kafka 消费者 31 | * 32 | * @return the consumer instance 33 | */ 34 | public KafkaConsumer getKafkaConsumer(String topic) { 35 | KafkaConsumer kafkaConsumer = null; 36 | try { 37 | kafkaConsumer = new KafkaConsumer<>(kafkaConfig.initConsumerProp(topic)); 38 | } catch (Exception e) { 39 | logger.error("获取kafka 消费者异常======e={}", e); 40 | sysCommonService.sendDingTalkMessage("KafkaBean.getKafkaProducer()", null, null, "获取kafka 消费者失败", getClass()); 41 | } 42 | return kafkaConsumer; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/static/adminlte/bootstrap/datatables/locale/bootstrap-table-eu-EU.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bootstrap Table Basque (Basque Country) translation 3 | * Author: Iker Ibarguren Berasaluze 4 | */ 5 | (function ($) { 6 | 'use strict'; 7 | 8 | $.fn.bootstrapTable.locales['eu-EU'] = { 9 | formatLoadingMessage: function () { 10 | return 'Itxaron mesedez...'; 11 | }, 12 | formatRecordsPerPage: function (pageNumber) { 13 | return pageNumber + ' emaitza orriko.'; 14 | }, 15 | formatShowingRows: function (pageFrom, pageTo, totalRows) { 16 | return totalRows + ' erregistroetatik ' + pageFrom + 'etik ' + pageTo +'erakoak erakusten.'; 17 | }, 18 | formatSearch: function () { 19 | return 'Bilatu'; 20 | }, 21 | formatNoMatches: function () { 22 | return 'Ez da emaitzarik aurkitu'; 23 | }, 24 | formatPaginationSwitch: function () { 25 | return 'Ezkutatu/Erakutsi orrikatzea'; 26 | }, 27 | formatRefresh: function () { 28 | return 'Eguneratu'; 29 | }, 30 | formatToggle: function () { 31 | return 'Ezkutatu/Erakutsi'; 32 | }, 33 | formatColumns: function () { 34 | return 'Zutabeak'; 35 | }, 36 | formatAllRows: function () { 37 | return 'Guztiak'; 38 | } 39 | }; 40 | 41 | $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['eu-EU']); 42 | 43 | })(jQuery); 44 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-sys-base-service/src/main/java/com/cn/xmf/service/dict/dao/DictDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.dict.dao; 2 | 3 | import com.cn.xmf.model.dict.Dict; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * 数据字典表DAO接口 10 | * 11 | * @author 数据字典表 12 | * @version 2017-11-23 13 | */ 14 | @SuppressWarnings("all") 15 | public interface DictDao { 16 | 17 | /** 18 | * 删除数据(逻辑删除) 19 | * 20 | * @param question 21 | * @return 22 | */ 23 | public void delete(Long id); 24 | 25 | /** 26 | * 单条数据增加 27 | * 28 | * @param dict 29 | * @return 30 | */ 31 | public void add(Dict dict); 32 | 33 | /** 34 | * 批量数据增加 35 | * 36 | * @param dict 37 | * @return 38 | */ 39 | public void addTrainRecordBatch(List list); 40 | 41 | /** 42 | * 获取单条数据 43 | * 44 | * @param id 45 | * @return 46 | */ 47 | public Dict getDictById(Long id); 48 | 49 | /** 50 | * 修改单条数据 51 | * 52 | * @param id 53 | * @return 54 | */ 55 | public void updateById(Dict dict); 56 | 57 | /** 58 | * 获取分页数据 59 | * 60 | * @param map 61 | * @return 62 | */ 63 | public List getList(Map map); 64 | 65 | 66 | /** 67 | * 获取集合数据,不带分页 68 | * 69 | * @param map 70 | * @return 71 | */ 72 | public List getDictList(Dict dict); 73 | 74 | /** 75 | * 获取分页记录总数 76 | * 77 | * @param map 78 | * @return 79 | */ 80 | public Integer getTotalCount(Map map); 81 | 82 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-service/src/main/java/com/cn/xmf/service/photo/dao/PhotoDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.photo.dao; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.cn.xmf.model.wx.Photo; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | /** 9 | * 微信照片DAO接口 10 | * @author rufei 11 | * @version 2019-10-11 12 | */ 13 | @SuppressWarnings("all") 14 | public interface PhotoDao { 15 | 16 | /** 17 | * 删除数据(逻辑删除) 18 | * @param question 19 | * @return 20 | */ 21 | public void delete(long id); 22 | /** 23 | * 单条数据增加 24 | * @param photo 25 | * @return 26 | */ 27 | public void add(Photo photo); 28 | 29 | /** 30 | * 批量数据增加 31 | * @param photo 32 | * @return 33 | */ 34 | public void addTrainRecordBatch(List list); 35 | 36 | /** 37 | * 根据ID获取单条数据 38 | * @param id 39 | * @return 40 | */ 41 | public Photo getWxPhotoById(long id); 42 | 43 | /** 44 | * 修改单条数据 45 | * @param id 46 | * @return 47 | */ 48 | public void updateById(Photo photo); 49 | 50 | /** 51 | * 获取分页数据 52 | * @param map 53 | * @return 54 | */ 55 | public List getList(JSONObject map); 56 | 57 | 58 | /** 59 | * 获取集合数据,不带分页 60 | * @param map 61 | * @return 62 | */ 63 | public List getWxPhotoList(Photo photo); 64 | 65 | /** 66 | * 获取单条数据 67 | * @param map 68 | * @return 69 | */ 70 | public Photo getSignleWxPhoto(Photo photo); 71 | 72 | /** 73 | * 获取分页记录总数 74 | * @param map 75 | * @return 76 | */ 77 | public Integer getTotalCount(Map map); 78 | 79 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-service/src/main/java/com/cn/xmf/service/music/dao/MusicDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.music.dao; 2 | 3 | 4 | import java.util.List; 5 | import java.util.Map; 6 | import com.alibaba.fastjson.JSONObject; 7 | import com.cn.xmf.model.wx.Music; 8 | 9 | /** 10 | * 微信音乐DAO接口 11 | * @author rufei.cn 12 | * @version 2019-10-21 13 | */ 14 | @SuppressWarnings("all") 15 | public interface MusicDao { 16 | 17 | /** 18 | * 删除数据(逻辑删除) 19 | * @param question 20 | * @return 21 | */ 22 | public void delete(long id); 23 | /** 24 | * 单条数据增加 25 | * @param music 26 | * @return 27 | */ 28 | public void add(Music music); 29 | 30 | /** 31 | * 批量数据增加 32 | * @param music 33 | * @return 34 | */ 35 | public void addTrainRecordBatch(List list); 36 | 37 | /** 38 | * 根据ID获取单条数据 39 | * @param id 40 | * @return 41 | */ 42 | public Music getMusicById(long id); 43 | 44 | /** 45 | * 修改单条数据 46 | * @param id 47 | * @return 48 | */ 49 | public void updateById(Music music); 50 | 51 | /** 52 | * 获取分页数据 53 | * @param map 54 | * @return 55 | */ 56 | public List getList(JSONObject map); 57 | 58 | 59 | /** 60 | * 获取集合数据,不带分页 61 | * @param map 62 | * @return 63 | */ 64 | public List getMusicList(Music music); 65 | 66 | /** 67 | * 获取单条数据 68 | * @param map 69 | * @return 70 | */ 71 | public Music getSignleMusic(Music music); 72 | 73 | /** 74 | * 获取分页记录总数 75 | * @param map 76 | * @return 77 | */ 78 | public Integer getTotalCount(Map map); 79 | 80 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-core/src/main/java/com/cn/xmf/job/core/biz/model/HandleCallbackParam.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.core.biz.model; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by xuxueli on 17/3/2. 7 | */ 8 | public class HandleCallbackParam implements Serializable { 9 | private static final long serialVersionUID = 42L; 10 | 11 | private int logId; 12 | private long logDateTim; 13 | 14 | private ReturnT executeResult; 15 | 16 | public HandleCallbackParam(){} 17 | public HandleCallbackParam(int logId, long logDateTim, ReturnT executeResult) { 18 | this.logId = logId; 19 | this.logDateTim = logDateTim; 20 | this.executeResult = executeResult; 21 | } 22 | 23 | public int getLogId() { 24 | return logId; 25 | } 26 | 27 | public void setLogId(int logId) { 28 | this.logId = logId; 29 | } 30 | 31 | public long getLogDateTim() { 32 | return logDateTim; 33 | } 34 | 35 | public void setLogDateTim(long logDateTim) { 36 | this.logDateTim = logDateTim; 37 | } 38 | 39 | public ReturnT getExecuteResult() { 40 | return executeResult; 41 | } 42 | 43 | public void setExecuteResult(ReturnT executeResult) { 44 | this.executeResult = executeResult; 45 | } 46 | 47 | @Override 48 | public String toString() { 49 | return "HandleCallbackParam{" + 50 | "logId=" + logId + 51 | ", logDateTim=" + logDateTim + 52 | ", executeResult=" + executeResult + 53 | '}'; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/menu/model/JobMenu.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.menu.model; 2 | 3 | import com.cn.xmf.base.model.BaseEntitys; 4 | 5 | import java.util.Date; 6 | import java.math.BigDecimal; 7 | import java.util.List; 8 | 9 | /** 10 | * job-菜单Entity 11 | * 12 | * @author rufei.cn 13 | * @version 2018-10-10 14 | */ 15 | public class JobMenu extends BaseEntitys { 16 | 17 | private static final long serialVersionUID = 1L; 18 | private String name; // 菜单名称 19 | 20 | private String url; // 菜单地址 21 | 22 | private Integer isbutton; // 是否button按钮 0不是 1是 23 | 24 | private Long fid; // 父级菜单ID 25 | 26 | private Integer level; // 菜单等级 27 | 28 | 29 | public JobMenu() { 30 | 31 | } 32 | 33 | 34 | public String getName() { 35 | return name; 36 | } 37 | 38 | public void setName(String name) { 39 | this.name = name; 40 | } 41 | 42 | public String getUrl() { 43 | return url; 44 | } 45 | 46 | public void setUrl(String url) { 47 | this.url = url; 48 | } 49 | 50 | public Integer getIsbutton() { 51 | return isbutton; 52 | } 53 | 54 | public void setIsbutton(Integer isbutton) { 55 | this.isbutton = isbutton; 56 | } 57 | 58 | public Long getFid() { 59 | return fid; 60 | } 61 | 62 | public void setFid(Long fid) { 63 | this.fid = fid; 64 | } 65 | 66 | public Integer getLevel() { 67 | return level; 68 | } 69 | 70 | public void setLevel(Integer level) { 71 | this.level = level; 72 | } 73 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/role/dao/JobRoleDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.role.dao; 2 | 3 | import com.cn.xmf.job.admin.role.model.*; 4 | import java.util.List; 5 | import java.util.Map; 6 | import com.alibaba.fastjson.JSONObject; 7 | /** 8 | * 角色数据DAO接口 9 | * @author rufei.cn 10 | * @version 2018-12-19 11 | */ 12 | @SuppressWarnings("all") 13 | public interface JobRoleDao { 14 | 15 | /** 16 | * 删除数据(逻辑删除) 17 | * @param question 18 | * @return 19 | */ 20 | public void delete(long id); 21 | /** 22 | * 单条数据增加 23 | * @param jobRole 24 | * @return 25 | */ 26 | public void add(JobRole jobRole); 27 | 28 | /** 29 | * 批量数据增加 30 | * @param jobRole 31 | * @return 32 | */ 33 | public void addTrainRecordBatch(List list); 34 | 35 | /** 36 | * 根据ID获取单条数据 37 | * @param id 38 | * @return 39 | */ 40 | public JobRole getJobRoleById(long id); 41 | 42 | /** 43 | * 修改单条数据 44 | * @param id 45 | * @return 46 | */ 47 | public void updateById(JobRole jobRole); 48 | 49 | /** 50 | * 获取分页数据 51 | * @param map 52 | * @return 53 | */ 54 | public List getList(JSONObject map); 55 | 56 | 57 | /** 58 | * 获取集合数据,不带分页 59 | * @param map 60 | * @return 61 | */ 62 | public List getJobRoleList(JobRole jobRole); 63 | 64 | /** 65 | * 获取单条数据 66 | * @param map 67 | * @return 68 | */ 69 | public JobRole getSignleJobRole(JobRole jobRole); 70 | 71 | /** 72 | * 获取分页记录总数 73 | * @param map 74 | * @return 75 | */ 76 | public Integer getTotalCount(Map map); 77 | 78 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-service/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | com.cn.xmf 8 | xmfcn-spring-cloud 9 | 1.1.1 10 | ../ 11 | 12 | 13 | xmfcn-spring-cloud-job-service 14 | 1.1.1 15 | jar 16 | 17 | xmfcn-spring-cloud-job-service 18 | xmfcn-spring-cloud-job-service 19 | 20 | 21 | 22 | xmf.cn.common 23 | ${xmfcn.common.version} 24 | xmfcn-spring-cloud-common 25 | 26 | 27 | com.cn.xmf 28 | xmfcn-spring-cloud-job-core 29 | ${job.core.version} 30 | 31 | 32 | 33 | 34 | 35 | 36 | maven-compiler-plugin 37 | 38 | ${java.version} 39 | UTF-8 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-api/src/main/java/com/cn/xmf/api/comment/service/CommentHelperService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.api.comment.service; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.cn.xmf.model.wx.Comment; 5 | import com.cn.xmf.model.wx.CommentDomm; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.stereotype.Service; 9 | 10 | import java.util.ArrayList; 11 | import java.util.List; 12 | 13 | /** 14 | * 辅助类 15 | */ 16 | @Service 17 | @SuppressWarnings("all") 18 | public class CommentHelperService { 19 | 20 | private static Logger logger = LoggerFactory.getLogger(CommentHelperService.class); 21 | 22 | /** 23 | * 数据转换 24 | * 25 | * @param list 26 | * @return 27 | */ 28 | public List getCommentDommList(List list, JSONObject param) { 29 | List newList = new ArrayList<>(); 30 | if (list == null || list.size() <= 0) { 31 | return newList; 32 | } 33 | if (param == null || param.size() <= 0) { 34 | return newList; 35 | } 36 | for (Comment item : list) { 37 | CommentDomm domm = new CommentDomm(); 38 | domm.setId(item.getId()); 39 | domm.setBizId(item.getBizId()); 40 | domm.setOpenId(item.getOpenId()); 41 | domm.setContent(item.getContent()); 42 | domm.setPhotoUrl(item.getPhotoUrl()); 43 | domm.setNickName(item.getNickName()); 44 | domm.setCreatetimestr(item.getCreatetimestr()); 45 | newList.add(domm); 46 | } 47 | return newList; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-service/src/main/java/com/cn/xmf/service/meet/dao/MeetingDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.meet.dao; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | import com.alibaba.fastjson.JSONObject; 6 | import com.cn.xmf.model.wx.Meeting; 7 | 8 | /** 9 | * 参会人员信息登记DAO接口 10 | * @author rufen.cn 11 | * @version 2019-10-26 12 | */ 13 | @SuppressWarnings("all") 14 | public interface MeetingDao { 15 | 16 | /** 17 | * 删除数据(逻辑删除) 18 | * @param question 19 | * @return 20 | */ 21 | public void delete(long id); 22 | /** 23 | * 单条数据增加 24 | * @param meeting 25 | * @return 26 | */ 27 | public void add(Meeting meeting); 28 | 29 | /** 30 | * 批量数据增加 31 | * @param meeting 32 | * @return 33 | */ 34 | public void addTrainRecordBatch(List list); 35 | 36 | /** 37 | * 根据ID获取单条数据 38 | * @param id 39 | * @return 40 | */ 41 | public Meeting getMeetingById(long id); 42 | 43 | /** 44 | * 修改单条数据 45 | * @param id 46 | * @return 47 | */ 48 | public void updateById(Meeting meeting); 49 | 50 | /** 51 | * 获取分页数据 52 | * @param map 53 | * @return 54 | */ 55 | public List getList(JSONObject map); 56 | 57 | 58 | /** 59 | * 获取集合数据,不带分页 60 | * @param map 61 | * @return 62 | */ 63 | public List getMeetingList(Meeting meeting); 64 | 65 | /** 66 | * 获取单条数据 67 | * @param map 68 | * @return 69 | */ 70 | public Meeting getSignleMeeting(Meeting meeting); 71 | 72 | /** 73 | * 获取分页记录总数 74 | * @param map 75 | * @return 76 | */ 77 | public Integer getTotalCount(Map map); 78 | 79 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/redis/RedisController.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.redis; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.cn.xmf.job.admin.common.SysCommonService; 5 | import com.cn.xmf.job.admin.menu.service.JobMenuService; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.ui.Model; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | 13 | import javax.servlet.http.HttpServletRequest; 14 | import java.util.Map; 15 | import java.util.Set; 16 | 17 | /** 18 | * RedisController(redis-运行信息) 19 | * 20 | * @author rufei.cn 21 | * @version 2018-10-17 22 | */ 23 | @Controller 24 | @RequestMapping("/redis") 25 | @SuppressWarnings("all") 26 | public class RedisController { 27 | 28 | private static Logger logger = LoggerFactory.getLogger(JobMenuService.class); 29 | @Autowired 30 | private SysCommonService sysCommonService; 31 | 32 | @RequestMapping 33 | public String index(HttpServletRequest request, Model model) { 34 | JSONObject redisInfo = sysCommonService.getRedisInfo(); 35 | JSONObject jsonObject =null; 36 | if(redisInfo!=null) 37 | { 38 | jsonObject=redisInfo.getJSONObject("info"); 39 | } 40 | Set> entries =null; 41 | if(jsonObject!=null) 42 | { 43 | entries = jsonObject.entrySet(); 44 | } 45 | model.addAttribute("list", entries); 46 | return "redis/redis-index"; 47 | } 48 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/resources/template/help.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <#import "/common/common.macro.ftl" as netCommon> 5 | <@netCommon.commonStyle /> 6 | ${I18n.admin_name} 7 | 8 | sidebar-collapse "> 9 |
10 | 11 | <@netCommon.commonHeader /> 12 | 13 | <@netCommon.commonLeft "help" /> 14 | 15 | 16 |
17 | 18 |
19 |

${I18n.job_help}

20 |
21 | 22 | 23 |
24 |
25 |

${I18n.admin_name_full}

26 |
27 |

28 | Github     29 | 30 |

31 | ${I18n.job_help_document} 32 |

33 | 34 |

35 |

36 |
37 |
38 | 39 |
40 | 41 | 42 | 43 | <@netCommon.commonFooter /> 44 |
45 | <@netCommon.commonScript /> 46 | 47 | 48 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/user/dao/JobUserDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.user.dao; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.cn.xmf.job.admin.user.model.JobUser; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | /** 10 | * 调度系统用户DAO接口 11 | * @author rufei.cn 12 | * @version 2018-09-18 13 | */ 14 | @SuppressWarnings("all") 15 | public interface JobUserDao { 16 | 17 | /** 18 | * 删除数据(逻辑删除) 19 | * @param question 20 | * @return 21 | */ 22 | public void delete(long id); 23 | /** 24 | * 单条数据增加 25 | * @param jobUser 26 | * @return 27 | */ 28 | public void add(JobUser jobUser); 29 | 30 | /** 31 | * 批量数据增加 32 | * @param jobUser 33 | * @return 34 | */ 35 | public void addTrainRecordBatch(List list); 36 | 37 | /** 38 | * 根据ID获取单条数据 39 | * @param id 40 | * @return 41 | */ 42 | public JobUser getJobUserById(long id); 43 | 44 | /** 45 | * 修改单条数据 46 | * @param id 47 | * @return 48 | */ 49 | public void updateById(JobUser jobUser); 50 | 51 | /** 52 | * 获取分页数据 53 | * @param map 54 | * @return 55 | */ 56 | public List getList(JSONObject map); 57 | 58 | 59 | /** 60 | * 获取集合数据,不带分页 61 | * @param map 62 | * @return 63 | */ 64 | public List getJobUserList(JobUser jobUser); 65 | 66 | /** 67 | * 获取单条数据 68 | * @param map 69 | * @return 70 | */ 71 | public JobUser getSignleJobUser(JobUser jobUser); 72 | 73 | /** 74 | * 获取分页记录总数 75 | * @param map 76 | * @return 77 | */ 78 | public Integer getTotalCount(Map map); 79 | 80 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-kafka-service/src/main/java/com/cn/xmf/job/sys/ElasticsearchService.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.sys; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.cn.xmf.base.model.RetData; 5 | import com.cn.xmf.model.es.EsModel; 6 | import org.springframework.cloud.openfeign.FeignClient; 7 | import org.springframework.http.MediaType; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | 11 | import java.util.List; 12 | 13 | /** 14 | * ElasticsearchService(ES服务) 15 | * 16 | * @author rufei.cn 17 | * @version 2019-05-19 18 | */ 19 | @FeignClient(value = "${base-service:elasticsearch-service}")// 配置远程服务名以及自定义权限验证配置 20 | @RequestMapping("/server/es/")// 配置远程服务路径 21 | @SuppressWarnings("all") 22 | public interface ElasticsearchService { 23 | 24 | /** 25 | * 保存单条数据到ES 26 | * 27 | * @param message 28 | * @return 29 | */ 30 | @RequestMapping(value = "save", consumes = MediaType.APPLICATION_JSON_VALUE) 31 | public RetData save(@RequestBody EsModel es); 32 | 33 | /** 34 | * 保存集合数据到ES 35 | * 36 | * @param message 37 | * @return 38 | */ 39 | @RequestMapping(value = "saveBatch", consumes = MediaType.APPLICATION_JSON_VALUE) 40 | public RetData saveBatch(@RequestBody EsModel es); 41 | 42 | 43 | /** 44 | * search根据 关键词查询ES信息 45 | * 46 | * @param EsModel es 47 | * keywords 查询关键词 48 | * highlights 高亮词 49 | * @return 50 | */ 51 | @RequestMapping(value = "search", consumes = MediaType.APPLICATION_JSON_VALUE) 52 | public List search(@RequestBody EsModel es); 53 | } 54 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-service/src/main/java/com/cn/xmf/service/comment/dao/CommentDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.comment.dao; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.cn.xmf.model.wx.Comment; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | /** 10 | * 微信留言DAO接口 11 | * @author rufei.cn 12 | * @version 2019-10-15 13 | */ 14 | @SuppressWarnings("all") 15 | public interface CommentDao { 16 | 17 | /** 18 | * 删除数据(逻辑删除) 19 | * @param question 20 | * @return 21 | */ 22 | public void delete(long id); 23 | /** 24 | * 单条数据增加 25 | * @param comment 26 | * @return 27 | */ 28 | public void add(Comment comment); 29 | 30 | /** 31 | * 批量数据增加 32 | * @param comment 33 | * @return 34 | */ 35 | public void addTrainRecordBatch(List list); 36 | 37 | /** 38 | * 根据ID获取单条数据 39 | * @param id 40 | * @return 41 | */ 42 | public Comment getWxUserMessageById(long id); 43 | 44 | /** 45 | * 修改单条数据 46 | * @param id 47 | * @return 48 | */ 49 | public void updateById(Comment comment); 50 | 51 | /** 52 | * 获取分页数据 53 | * @param map 54 | * @return 55 | */ 56 | public List getList(JSONObject map); 57 | 58 | 59 | /** 60 | * 获取集合数据,不带分页 61 | * @param map 62 | * @return 63 | */ 64 | public List getWxUserMessageList(Comment comment); 65 | 66 | /** 67 | * 获取单条数据 68 | * @param map 69 | * @return 70 | */ 71 | public Comment getSignleWxUserMessage(Comment comment); 72 | 73 | /** 74 | * 获取分页记录总数 75 | * @param map 76 | * @return 77 | */ 78 | public Integer getTotalCount(Map map); 79 | 80 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-core/src/main/java/com/cn/xmf/job/core/biz/model/RegistryParam.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.core.biz.model; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by xuxueli on 2017-05-10 20:22:42 7 | */ 8 | public class RegistryParam implements Serializable { 9 | private static final long serialVersionUID = 42L; 10 | 11 | private String registGroup; 12 | private String registryKey; 13 | private String registryValue; 14 | 15 | public RegistryParam(){} 16 | public RegistryParam(String registGroup, String registryKey, String registryValue) { 17 | this.registGroup = registGroup; 18 | this.registryKey = registryKey; 19 | this.registryValue = registryValue; 20 | } 21 | 22 | public String getRegistGroup() { 23 | return registGroup; 24 | } 25 | 26 | public void setRegistGroup(String registGroup) { 27 | this.registGroup = registGroup; 28 | } 29 | 30 | public String getRegistryKey() { 31 | return registryKey; 32 | } 33 | 34 | public void setRegistryKey(String registryKey) { 35 | this.registryKey = registryKey; 36 | } 37 | 38 | public String getRegistryValue() { 39 | return registryValue; 40 | } 41 | 42 | public void setRegistryValue(String registryValue) { 43 | this.registryValue = registryValue; 44 | } 45 | 46 | @Override 47 | public String toString() { 48 | return "RegistryParam{" + 49 | "registGroup='" + registGroup + '\'' + 50 | ", registryKey='" + registryKey + '\'' + 51 | ", registryValue='" + registryValue + '\'' + 52 | '}'; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/core/model/XxlJobLogGlue.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.core.model; 2 | 3 | /** 4 | * xxl-job log for glue, used to track job code process 5 | * @author xuxueli 2016-5-19 17:57:46 6 | */ 7 | public class XxlJobLogGlue { 8 | 9 | private Integer id; 10 | private int jobId; // 任务主键ID 11 | private String glueType; // GLUE类型 #com.cn.xmf.job.core.glue.GlueTypeEnum 12 | private String glueSource; 13 | private String glueRemark; 14 | private String addTime; 15 | private String updateTime; 16 | 17 | public Integer getId() { 18 | return id; 19 | } 20 | 21 | public void setId(Integer id) { 22 | this.id = id; 23 | } 24 | 25 | public int getJobId() { 26 | return jobId; 27 | } 28 | 29 | public void setJobId(int jobId) { 30 | this.jobId = jobId; 31 | } 32 | 33 | public String getGlueType() { 34 | return glueType; 35 | } 36 | 37 | public void setGlueType(String glueType) { 38 | this.glueType = glueType; 39 | } 40 | 41 | public String getGlueSource() { 42 | return glueSource; 43 | } 44 | 45 | public void setGlueSource(String glueSource) { 46 | this.glueSource = glueSource; 47 | } 48 | 49 | public String getGlueRemark() { 50 | return glueRemark; 51 | } 52 | 53 | public void setGlueRemark(String glueRemark) { 54 | this.glueRemark = glueRemark; 55 | } 56 | 57 | public String getAddTime() { 58 | return addTime; 59 | } 60 | 61 | public void setAddTime(String addTime) { 62 | this.addTime = addTime; 63 | } 64 | 65 | public String getUpdateTime() { 66 | return updateTime; 67 | } 68 | 69 | public void setUpdateTime(String updateTime) { 70 | this.updateTime = updateTime; 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-service/src/main/java/com/cn/xmf/service/prize/dao/UserPrizeDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.prize.dao; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.cn.xmf.model.wx.UserPrize; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | /** 10 | * 奖品信息DAO接口 11 | * @author rufei.cn 12 | * @version 2020-01-02 13 | */ 14 | @SuppressWarnings("all") 15 | public interface UserPrizeDao { 16 | 17 | /** 18 | * 删除数据(逻辑删除) 19 | * @param question 20 | * @return 21 | */ 22 | public void delete(long id); 23 | /** 24 | * 单条数据增加 25 | * @param userPrize 26 | * @return 27 | */ 28 | public void add(UserPrize userPrize); 29 | 30 | /** 31 | * 批量数据增加 32 | * @param userPrize 33 | * @return 34 | */ 35 | public void addTrainRecordBatch(List list); 36 | 37 | /** 38 | * 根据ID获取单条数据 39 | * @param id 40 | * @return 41 | */ 42 | public UserPrize getUserPrizeById(long id); 43 | 44 | /** 45 | * 修改单条数据 46 | * @param id 47 | * @return 48 | */ 49 | public void updateById(UserPrize userPrize); 50 | 51 | /** 52 | * 获取分页数据 53 | * @param map 54 | * @return 55 | */ 56 | public List getList(JSONObject map); 57 | 58 | 59 | /** 60 | * 获取集合数据,不带分页 61 | * @param map 62 | * @return 63 | */ 64 | public List getUserPrizeList(UserPrize userPrize); 65 | 66 | /** 67 | * 获取单条数据 68 | * @param map 69 | * @return 70 | */ 71 | public UserPrize getSignleUserPrize(UserPrize userPrize); 72 | 73 | /** 74 | * 获取分页记录总数 75 | * @param map 76 | * @return 77 | */ 78 | public Integer getTotalCount(Map map); 79 | 80 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/code/dao/CodeSchemeDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.code.dao; 2 | 3 | import com.cn.xmf.job.admin.code.model.*; 4 | import java.util.List; 5 | import java.util.Map; 6 | import com.alibaba.fastjson.JSONObject; 7 | /** 8 | * 代码生成方案DAO接口 9 | * @author rufei.cn 10 | * @version 2018-12-10 11 | */ 12 | @SuppressWarnings("all") 13 | public interface CodeSchemeDao { 14 | 15 | /** 16 | * 删除数据(逻辑删除) 17 | * @param question 18 | * @return 19 | */ 20 | public void delete(long id); 21 | /** 22 | * 单条数据增加 23 | * @param codeScheme 24 | * @return 25 | */ 26 | public void add(CodeScheme codeScheme); 27 | 28 | /** 29 | * 批量数据增加 30 | * @param codeScheme 31 | * @return 32 | */ 33 | public void addTrainRecordBatch(List list); 34 | 35 | /** 36 | * 根据ID获取单条数据 37 | * @param id 38 | * @return 39 | */ 40 | public CodeScheme getCodeSchemeById(long id); 41 | 42 | /** 43 | * 修改单条数据 44 | * @param id 45 | * @return 46 | */ 47 | public void updateById(CodeScheme codeScheme); 48 | 49 | /** 50 | * 获取分页数据 51 | * @param map 52 | * @return 53 | */ 54 | public List getList(JSONObject map); 55 | 56 | 57 | /** 58 | * 获取集合数据,不带分页 59 | * @param map 60 | * @return 61 | */ 62 | public List getCodeSchemeList(CodeScheme codeScheme); 63 | 64 | /** 65 | * 获取单条数据 66 | * @param map 67 | * @return 68 | */ 69 | public CodeScheme getSignleCodeScheme(CodeScheme codeScheme); 70 | 71 | /** 72 | * 获取分页记录总数 73 | * @param map 74 | * @return 75 | */ 76 | public Integer getTotalCount(Map map); 77 | 78 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-zuul/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | com.cn.xmf 8 | xmfcn-spring-cloud 9 | 1.1.1 10 | ../ 11 | 12 | 13 | xmfcn-spring-cloud-zuul 14 | 1.1.1 15 | jar 16 | 17 | xmfcn-spring-cloud-zuul 18 | xmfcn-spring-cloud-zuul 19 | 20 | 21 | xmf.cn.common 22 | ${xmfcn.common.version} 23 | xmfcn-spring-cloud-common 24 | 25 | 26 | org.springframework.cloud 27 | spring-cloud-starter-netflix-zuul 28 | 29 | 30 | 31 | 32 | 33 | 34 | maven-compiler-plugin 35 | 36 | ${java.version} 37 | UTF-8 38 | 39 | 40 | 41 | org.springframework.boot 42 | spring-boot-maven-plugin 43 | 44 | true 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-job-admin/src/main/java/com/cn/xmf/job/admin/role/dao/JobMenuRoleDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.job.admin.role.dao; 2 | 3 | import com.cn.xmf.job.admin.role.model.*; 4 | import java.util.List; 5 | import java.util.Map; 6 | import com.alibaba.fastjson.JSONObject; 7 | /** 8 | * 角色菜单关系DAO接口 9 | * @author rufei.cn 10 | * @version 2018-12-19 11 | */ 12 | @SuppressWarnings("all") 13 | public interface JobMenuRoleDao { 14 | 15 | /** 16 | * 删除数据(逻辑删除) 17 | * @param question 18 | * @return 19 | */ 20 | public void delete(long roleId); 21 | /** 22 | * 单条数据增加 23 | * @param jobMenuRole 24 | * @return 25 | */ 26 | public void add(JobMenuRole jobMenuRole); 27 | 28 | /** 29 | * 批量数据增加 30 | * @param jobMenuRole 31 | * @return 32 | */ 33 | public void addTrainRecordBatch(List list); 34 | 35 | /** 36 | * 根据ID获取单条数据 37 | * @param id 38 | * @return 39 | */ 40 | public JobMenuRole getJobMenuRoleById(long id); 41 | 42 | /** 43 | * 修改单条数据 44 | * @param id 45 | * @return 46 | */ 47 | public void updateById(JobMenuRole jobMenuRole); 48 | 49 | /** 50 | * 获取分页数据 51 | * @param map 52 | * @return 53 | */ 54 | public List getList(JSONObject map); 55 | 56 | 57 | /** 58 | * 获取集合数据,不带分页 59 | * @param map 60 | * @return 61 | */ 62 | public List getJobMenuRoleList(JobMenuRole jobMenuRole); 63 | 64 | /** 65 | * 获取单条数据 66 | * @param map 67 | * @return 68 | */ 69 | public JobMenuRole getSignleJobMenuRole(JobMenuRole jobMenuRole); 70 | 71 | /** 72 | * 获取分页记录总数 73 | * @param map 74 | * @return 75 | */ 76 | public Integer getTotalCount(Map map); 77 | 78 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-wechat-service/src/main/java/com/cn/xmf/service/prize/dao/WinnersListDao.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.service.prize.dao; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | import com.alibaba.fastjson.JSONObject; 6 | import com.cn.xmf.model.wx.WinnersList; 7 | 8 | /** 9 | * 获奖名单DAO接口 10 | * @author rufei.cn 11 | * @version 2020-01-02 12 | */ 13 | @SuppressWarnings("all") 14 | public interface WinnersListDao { 15 | 16 | /** 17 | * 删除数据(逻辑删除) 18 | * @param question 19 | * @return 20 | */ 21 | public void delete(long id); 22 | /** 23 | * 单条数据增加 24 | * @param winnersList 25 | * @return 26 | */ 27 | public void add(WinnersList winnersList); 28 | 29 | /** 30 | * 批量数据增加 31 | * @param winnersList 32 | * @return 33 | */ 34 | public void addTrainRecordBatch(List list); 35 | 36 | /** 37 | * 根据ID获取单条数据 38 | * @param id 39 | * @return 40 | */ 41 | public WinnersList getWinnersListById(long id); 42 | 43 | /** 44 | * 修改单条数据 45 | * @param id 46 | * @return 47 | */ 48 | public void updateById(WinnersList winnersList); 49 | 50 | /** 51 | * 获取分页数据 52 | * @param map 53 | * @return 54 | */ 55 | public List getList(JSONObject map); 56 | 57 | 58 | /** 59 | * 获取集合数据,不带分页 60 | * @param map 61 | * @return 62 | */ 63 | public List getWinnersListList(WinnersList winnersList); 64 | 65 | /** 66 | * 获取单条数据 67 | * @param map 68 | * @return 69 | */ 70 | public WinnersList getSignleWinnersList(WinnersList winnersList); 71 | 72 | /** 73 | * 获取分页记录总数 74 | * @param map 75 | * @return 76 | */ 77 | public Integer getTotalCount(Map map); 78 | 79 | } -------------------------------------------------------------------------------- /xmfcn-spring-cloud-common/src/main/java/com/cn/xmf/model/wx/Music.java: -------------------------------------------------------------------------------- 1 | package com.cn.xmf.model.wx; 2 | 3 | import com.cn.xmf.base.model.BaseEntitys; 4 | import org.apache.commons.lang3.builder.ToStringBuilder; 5 | 6 | /** 7 | * 微信音乐Entity 8 | * 9 | * @author rufei.cn 10 | * @version 2019-10-21 11 | */ 12 | public class Music extends BaseEntitys { 13 | 14 | private static final long serialVersionUID = 1L; 15 | /** 16 | * 类型 17 | */ 18 | private String type; 19 | 20 | /** 21 | * 音乐名称 22 | */ 23 | private String title; 24 | 25 | /** 26 | * 音乐地址 27 | */ 28 | private String url; 29 | 30 | /** 31 | * // 存储地址 32 | */ 33 | private String path; 34 | 35 | public Music() { 36 | 37 | } 38 | 39 | 40 | public String getType() { 41 | return type; 42 | } 43 | 44 | public void setType(String type) { 45 | this.type = type; 46 | } 47 | 48 | public String getTitle() { 49 | return title; 50 | } 51 | 52 | public void setTitle(String title) { 53 | this.title = title; 54 | } 55 | 56 | public String getUrl() { 57 | return url; 58 | } 59 | 60 | public void setUrl(String url) { 61 | this.url = url; 62 | } 63 | 64 | public String getPath() { 65 | return path; 66 | } 67 | 68 | public void setPath(String path) { 69 | this.path = path; 70 | } 71 | 72 | @Override 73 | public String toString() { 74 | return new ToStringBuilder(this) 75 | .append("type", type) 76 | .append("title", title) 77 | .append("url", url) 78 | .append("path", path) 79 | .toString(); 80 | } 81 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # 结构图 3 | ![img](https://github.com/airufei/xmfcn-spring-cloud/blob/master/imgs/4AB893CF-8AAE-4a49-A961-B6D153644027.png) 4 | 5 | ## 1、详细文档请点击:https://github.com/airufei/xmfcn-spring-cloud/wiki/%E9%A6%96%E9%A1%B5 6 | 7 | ## 2、欢迎留言讨论:https://github.com/airufei/xmfcn-spring-cloud/issues/1 8 | 9 | ## 3、项目jar包启动方式: ./start.sh 项目停止:./stop.sh 10 | 11 | ## 4、项目docker启动方式: ./docker_run.sh 12 | 13 | ## 5、项目当前改用了nacos作为注册中心,去除了earuka。主要是nacos既有服务注册发现功能,也有配置中心功能,使用起来相对方便。 14 | 15 | ## 6、[新版代码生成工具(spring-boot-xcode)请点击](https://github.com/airufei/spring-boot-xcode) 16 | 17 | ## 7、nacos注册中心改eureka注册中心,eureka版本请移至[xmfcn-spring-cloud-eureka](https://github.com/airufei/xmfcn-spring-cloud-eureka) 18 | 19 | nacos版本改eureka 比较简单,只需要删除bootstrap.yml,把application.yml注释放开就行了 20 | 21 | ## 8、微服务springcloud交流QQ群:908936554 22 | 23 | # job-admin系统的部分功能截图 24 | 1、登录界面 25 | ![img](https://github.com/airufei/xmfcn-spring-cloud/blob/master/imgs/20190625172030.png) 26 | 27 | 2、任务管理界面 28 | ![img](https://github.com/airufei/xmfcn-spring-cloud/blob/master/imgs/20190625175639.png) 29 | 30 | 3、任务日志界面 31 | ![img](https://github.com/airufei/xmfcn-spring-cloud/blob/master/imgs/20190625175549.png) 32 | 33 | 4、系统日志搜索界面 34 | ![img](https://github.com/airufei/xmfcn-spring-cloud/blob/master/imgs/20190625174804.png) 35 | 36 | 5、日志跨系统追踪 37 | ![img](https://github.com/airufei/xmfcn-spring-cloud/blob/master/imgs/FEA1CAF8-3738-423e-A031-CCC39E2AF0EC.png) 38 | 39 | 6、系统日志报表界面 40 | ![img](https://github.com/airufei/xmfcn-spring-cloud/blob/master/imgs/20190625175224.png) 41 | 42 | 7、Redis运行状态界面 43 | ![img](https://github.com/airufei/xmfcn-spring-cloud/blob/master/imgs/20190625175735.png) 44 | 45 | 8、数据字典界面 46 | ![img](https://github.com/airufei/xmfcn-spring-cloud/blob/master/imgs/20190625175815.png) 47 | -------------------------------------------------------------------------------- /xmfcn-spring-cloud-zuul/src/main/java/com/cn/xmf/zuul/filter/GatedLaunchFilter.java: -------------------------------------------------------------------------------- 1 | /** 2 | package com.cn.xmf.zuul.filter; 3 | 4 | import com.netflix.zuul.ZuulFilter; 5 | import com.netflix.zuul.context.RequestContext; 6 | import io.jmnarloch.spring.cloud.ribbon.support.RibbonFilterContextHolder; 7 | import org.springframework.cloud.netflix.zuul.filters.support.FilterConstants; 8 | 9 | */ 10 | /** 11 | * 金丝雀发布过滤器(灰度发布) 12 | * 13 | *//** 14 | 15 | public class GatedLaunchFilter extends ZuulFilter { 16 | @Override 17 | public String filterType() { 18 | return FilterConstants.PRE_TYPE; 19 | } 20 | 21 | @Override 22 | public int filterOrder() { 23 | return 4; 24 | } 25 | 26 | @Override 27 | public boolean shouldFilter() { 28 | // 根据之前的过滤器结果处理,若前一个过滤器失败,则该过滤器直接跳过 29 | RequestContext requestContext = RequestContext.getCurrentContext(); 30 | Boolean isSuccess = (Boolean) requestContext.get("isSuccess"); 31 | if (isSuccess != null && !isSuccess) { 32 | return false; 33 | } 34 | return true; 35 | } 36 | 37 | @Override 38 | public Object run() { 39 | RequestContext requestContext = RequestContext.getCurrentContext(); 40 | String accessToken = requestContext.getRequest().getParameter("token"); 41 | // 灰度发布示例 42 | RibbonFilterContextHolder.clearCurrentContext(); 43 | // 路由规则判断示例 44 | if (accessToken.equals("1234567890")) { 45 | RibbonFilterContextHolder.getCurrentContext().add("gated-launch", "true"); 46 | } else { 47 | RibbonFilterContextHolder.getCurrentContext().add("gated-launch", "false"); 48 | } 49 | requestContext.set("isSuccess", true);// 设值,让下一个Filter看到上一个Filter的状态 50 | return null; 51 | } 52 | } 53 | */ 54 | --------------------------------------------------------------------------------