├── .gitignore ├── CHANGE.md ├── LICENSE ├── README.md ├── assembly.xml ├── maven-version-rules.xml ├── pom.xml ├── script ├── assembly.xml ├── deploy.xml └── startup.sh ├── src └── site │ └── site.xml ├── weixin4j-base ├── .gitignore ├── CHANGE.md ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── foxinmy │ │ │ └── weixin4j │ │ │ ├── api │ │ │ ├── BaseApi.java │ │ │ ├── CashApi.java │ │ │ ├── CouponApi.java │ │ │ ├── CustomsApi.java │ │ │ ├── MchApi.java │ │ │ ├── PayApi.java │ │ │ └── README.md │ │ │ ├── cache │ │ │ ├── CacheCreator.java │ │ │ ├── CacheManager.java │ │ │ ├── CacheStorager.java │ │ │ ├── Cacheable.java │ │ │ ├── FileCacheStorager.java │ │ │ ├── MemcacheCacheStorager.java │ │ │ ├── MemoryCacheStorager.java │ │ │ ├── README.md │ │ │ ├── RedisCacheStorager.java │ │ │ └── RedisClusterCacheStorager.java │ │ │ ├── exception │ │ │ └── WeixinException.java │ │ │ ├── http │ │ │ ├── AbstractHttpClient.java │ │ │ ├── AbstractHttpResponse.java │ │ │ ├── ContentType.java │ │ │ ├── HTTP.java │ │ │ ├── HeaderValueFormatter.java │ │ │ ├── HttpClient.java │ │ │ ├── HttpClientException.java │ │ │ ├── HttpHeaders.java │ │ │ ├── HttpMessage.java │ │ │ ├── HttpMethod.java │ │ │ ├── HttpParams.java │ │ │ ├── HttpRequest.java │ │ │ ├── HttpResponse.java │ │ │ ├── HttpStatus.java │ │ │ ├── HttpVersion.java │ │ │ ├── MimeType.java │ │ │ ├── SimpleHttpClient.java │ │ │ ├── SimpleHttpResponse.java │ │ │ ├── URLParameter.java │ │ │ ├── apache │ │ │ │ ├── content │ │ │ │ │ ├── AbstractContentBody.java │ │ │ │ │ ├── ByteArrayBody.java │ │ │ │ │ ├── ContentBody.java │ │ │ │ │ ├── FileBody.java │ │ │ │ │ ├── InputStreamBody.java │ │ │ │ │ └── StringBody.java │ │ │ │ └── mime │ │ │ │ │ ├── AbstractMultipartForm.java │ │ │ │ │ ├── FormBodyPart.java │ │ │ │ │ ├── FormBodyPartBuilder.java │ │ │ │ │ ├── Header.java │ │ │ │ │ ├── HttpBrowserCompatibleMultipart.java │ │ │ │ │ ├── HttpMultipart.java │ │ │ │ │ ├── HttpMultipartMode.java │ │ │ │ │ ├── HttpRFC6532Multipart.java │ │ │ │ │ ├── HttpStrictMultipart.java │ │ │ │ │ ├── MIME.java │ │ │ │ │ ├── MinimalField.java │ │ │ │ │ ├── MultipartEntity.java │ │ │ │ │ ├── MultipartEntityBuilder.java │ │ │ │ │ └── MultipartFormEntity.java │ │ │ ├── entity │ │ │ │ ├── ByteArrayEntity.java │ │ │ │ ├── FileEntity.java │ │ │ │ ├── FormUrlEntity.java │ │ │ │ ├── HttpEntity.java │ │ │ │ └── StringEntity.java │ │ │ ├── factory │ │ │ │ ├── HttpClientFactory.java │ │ │ │ └── SimpleHttpClientFactory.java │ │ │ ├── message │ │ │ │ ├── AbstractMessageConverter.java │ │ │ │ ├── JsonMessageConverter.java │ │ │ │ ├── MessageConverter.java │ │ │ │ └── XmlMessageConverter.java │ │ │ ├── support │ │ │ │ ├── apache3 │ │ │ │ │ ├── HttpComponent3.java │ │ │ │ │ ├── HttpComponent3Factory.java │ │ │ │ │ └── HttpComponent3Response.java │ │ │ │ ├── apache4 │ │ │ │ │ ├── HttpComponent4.java │ │ │ │ │ ├── HttpComponent4Factory.java │ │ │ │ │ ├── HttpComponent4_1.java │ │ │ │ │ ├── HttpComponent4_1Factory.java │ │ │ │ │ ├── HttpComponent4_1Response.java │ │ │ │ │ ├── HttpComponent4_2.java │ │ │ │ │ ├── HttpComponent4_2Factory.java │ │ │ │ │ └── HttpComponent4_2Response.java │ │ │ │ ├── netty │ │ │ │ │ ├── Netty4HttpClient.java │ │ │ │ │ ├── Netty4HttpClientFactory.java │ │ │ │ │ └── Netty4HttpResponse.java │ │ │ │ └── okhttp │ │ │ │ │ ├── OkHttpClient2.java │ │ │ │ │ ├── OkHttpClient2Factory.java │ │ │ │ │ ├── OkHttpClient3.java │ │ │ │ │ ├── OkHttpClient3Factory.java │ │ │ │ │ ├── OkHttpClientFactory.java │ │ │ │ │ ├── OkHttpResponse2.java │ │ │ │ │ └── OkHttpResponse3.java │ │ │ └── weixin │ │ │ │ ├── ApiResult.java │ │ │ │ ├── WeixinRequestExecutor.java │ │ │ │ ├── WeixinResponse.java │ │ │ │ └── XmlResult.java │ │ │ ├── jssdk │ │ │ ├── JSSDKAPI.java │ │ │ └── JSSDKConfigurator.java │ │ │ ├── logging │ │ │ ├── AbstractInternalLogger.java │ │ │ ├── FormattingTuple.java │ │ │ ├── InternalLogLevel.java │ │ │ ├── InternalLogger.java │ │ │ ├── InternalLoggerFactory.java │ │ │ ├── JdkLogger.java │ │ │ ├── JdkLoggerFactory.java │ │ │ ├── MessageFormatter.java │ │ │ ├── Slf4JLogger.java │ │ │ └── Slf4JLoggerFactory.java │ │ │ ├── model │ │ │ ├── Button.java │ │ │ ├── Token.java │ │ │ ├── WeixinAccount.java │ │ │ ├── WeixinPayAccount.java │ │ │ ├── card │ │ │ │ ├── CardCoupon.java │ │ │ │ ├── CardCoupons.java │ │ │ │ ├── CardInfo.java │ │ │ │ ├── CardItem.java │ │ │ │ ├── CardQR.java │ │ │ │ ├── CashCoupon.java │ │ │ │ ├── CouponAdvanceInfo.java │ │ │ │ ├── CouponBaseInfo.java │ │ │ │ ├── DiscountCoupon.java │ │ │ │ ├── GeneralCoupon.java │ │ │ │ ├── GiftCard.java │ │ │ │ ├── GiftCardOrder.java │ │ │ │ ├── GiftCardPage.java │ │ │ │ ├── GiftCoupon.java │ │ │ │ ├── GrouponCoupon.java │ │ │ │ ├── MemCardBonusRule.java │ │ │ │ ├── MemCardCustomField.java │ │ │ │ ├── MemberCard.java │ │ │ │ ├── MemberInitInfo.java │ │ │ │ ├── MemberUpdateInfo.java │ │ │ │ ├── MemberUserForm.java │ │ │ │ ├── MemberUserInfo.java │ │ │ │ ├── PageTheme.java │ │ │ │ ├── PicItem.java │ │ │ │ └── VoucherCard.java │ │ │ ├── media │ │ │ │ ├── MediaCounter.java │ │ │ │ ├── MediaDownloadResult.java │ │ │ │ ├── MediaItem.java │ │ │ │ ├── MediaRecord.java │ │ │ │ └── MediaUploadResult.java │ │ │ ├── paging │ │ │ │ ├── Pageable.java │ │ │ │ ├── Pagedata.java │ │ │ │ └── Sort.java │ │ │ └── qr │ │ │ │ ├── QRParameter.java │ │ │ │ └── QRResult.java │ │ │ ├── payment │ │ │ ├── JsPayNotify.java │ │ │ ├── PayBaseInfo.java │ │ │ ├── PayPackage.java │ │ │ ├── PayRequest.java │ │ │ ├── README.md │ │ │ ├── WeixinPayProxy.java │ │ │ ├── coupon │ │ │ │ ├── CouponDetail.java │ │ │ │ ├── CouponResult.java │ │ │ │ ├── CouponStock.java │ │ │ │ ├── OrderCouponInfo.java │ │ │ │ └── RefundCouponInfo.java │ │ │ └── mch │ │ │ │ ├── APPPayRequest.java │ │ │ │ ├── AbstractPayRequest.java │ │ │ │ ├── CorpPayment.java │ │ │ │ ├── CorpPaymentRecord.java │ │ │ │ ├── CorpPaymentResult.java │ │ │ │ ├── CustomsOrder.java │ │ │ │ ├── CustomsOrderRecord.java │ │ │ │ ├── CustomsOrderResult.java │ │ │ │ ├── JSAPIPayRequest.java │ │ │ │ ├── MICROPayRequest.java │ │ │ │ ├── MchPayPackage.java │ │ │ │ ├── MchPayRequest.java │ │ │ │ ├── MerchantResult.java │ │ │ │ ├── MerchantTradeResult.java │ │ │ │ ├── NATIVEPayRequest.java │ │ │ │ ├── NativePayNotify.java │ │ │ │ ├── NativePayResponse.java │ │ │ │ ├── OpenIdResult.java │ │ │ │ ├── Order.java │ │ │ │ ├── PrePay.java │ │ │ │ ├── Redpacket.java │ │ │ │ ├── RedpacketRecord.java │ │ │ │ ├── RedpacketRisk.java │ │ │ │ ├── RedpacketSendResult.java │ │ │ │ ├── RefundDetail.java │ │ │ │ ├── RefundRecord.java │ │ │ │ ├── RefundResult.java │ │ │ │ ├── SceneInfoApp.java │ │ │ │ ├── SceneInfoStore.java │ │ │ │ ├── SettlementRecord.java │ │ │ │ └── WAPPayRequest.java │ │ │ ├── sign │ │ │ ├── AbstractWeixinSignature.java │ │ │ ├── WeixinPaymentSignature.java │ │ │ └── WeixinSignature.java │ │ │ ├── token │ │ │ ├── PerTicketManager.java │ │ │ ├── TicketManager.java │ │ │ ├── TokenCreator.java │ │ │ └── TokenManager.java │ │ │ ├── tuple │ │ │ ├── Article.java │ │ │ ├── Card.java │ │ │ ├── ChatTuple.java │ │ │ ├── File.java │ │ │ ├── Image.java │ │ │ ├── MassTuple.java │ │ │ ├── MpArticle.java │ │ │ ├── MpNews.java │ │ │ ├── MpVideo.java │ │ │ ├── Music.java │ │ │ ├── News.java │ │ │ ├── NotifyTuple.java │ │ │ ├── README.md │ │ │ ├── Text.java │ │ │ ├── TextCard.java │ │ │ ├── Tuple.java │ │ │ ├── Video.java │ │ │ └── Voice.java │ │ │ ├── type │ │ │ ├── BankType.java │ │ │ ├── ButtonType.java │ │ │ ├── CredentialType.java │ │ │ ├── CurrencyType.java │ │ │ ├── CustomsCity.java │ │ │ ├── CustomsSatus.java │ │ │ ├── Gender.java │ │ │ ├── IdQuery.java │ │ │ ├── IdType.java │ │ │ ├── MediaType.java │ │ │ ├── QRType.java │ │ │ ├── SignType.java │ │ │ ├── TarType.java │ │ │ ├── TicketType.java │ │ │ ├── TradeState.java │ │ │ ├── TradeType.java │ │ │ ├── Week.java │ │ │ ├── card │ │ │ │ ├── ActivateCommonField.java │ │ │ │ ├── ActivateFormFieldType.java │ │ │ │ ├── CardCodeType.java │ │ │ │ ├── CardColor.java │ │ │ │ ├── CardStatus.java │ │ │ │ ├── CardType.java │ │ │ │ ├── FieldNameType.java │ │ │ │ ├── SubCardType.java │ │ │ │ └── UserCardStatus.java │ │ │ └── mch │ │ │ │ ├── BillType.java │ │ │ │ ├── CorpPaymentCheckNameType.java │ │ │ │ ├── CouponStatus.java │ │ │ │ ├── CouponStockStatus.java │ │ │ │ ├── CouponStockType.java │ │ │ │ ├── CouponType.java │ │ │ │ ├── RedpacketSceneType.java │ │ │ │ ├── RedpacketSendType.java │ │ │ │ ├── RedpacketStatus.java │ │ │ │ ├── RedpacketType.java │ │ │ │ ├── RefundAccountType.java │ │ │ │ ├── RefundChannel.java │ │ │ │ ├── RefundStatus.java │ │ │ │ └── RefundType.java │ │ │ ├── util │ │ │ ├── ByteArrayBuffer.java │ │ │ ├── CharArrayBuffer.java │ │ │ ├── Consts.java │ │ │ ├── DateUtil.java │ │ │ ├── DigestUtil.java │ │ │ ├── FileUtil.java │ │ │ ├── HexUtil.java │ │ │ ├── IOUtil.java │ │ │ ├── LinkedCaseInsensitiveMap.java │ │ │ ├── MapUtil.java │ │ │ ├── MultiValueMap.java │ │ │ ├── NameValue.java │ │ │ ├── ObjectId.java │ │ │ ├── RandomUtil.java │ │ │ ├── ReflectionUtil.java │ │ │ ├── RegexUtil.java │ │ │ ├── SerializationUtils.java │ │ │ ├── SettableFuture.java │ │ │ ├── StringUtil.java │ │ │ ├── URLEncodingUtil.java │ │ │ ├── Weixin4jConfigUtil.java │ │ │ └── WeixinErrorUtil.java │ │ │ └── xml │ │ │ ├── ListWrapper.java │ │ │ ├── ListsuffixResult.java │ │ │ ├── ListsuffixResultDeserializer.java │ │ │ ├── ListsuffixResultSerializer.java │ │ │ └── XmlStream.java │ └── resources │ │ └── com │ │ └── foxinmy │ │ └── weixin4j │ │ ├── http │ │ └── weixin │ │ │ └── error.xml │ │ ├── payment │ │ └── weixin.properties │ │ └── weixin4j.properties │ └── test │ └── java │ └── com │ └── foxinmy │ └── weixin4j │ ├── api │ └── MchApiTest.java │ ├── base │ └── test │ │ ├── CashTest.java │ │ ├── CouponTest.java │ │ ├── PayTest.java │ │ └── http │ │ ├── Apache3HttpClientTest.java │ │ ├── Apache4_1HttpClientTest.java │ │ ├── Apache4_2HttpClientTest.java │ │ ├── HttpClientTest.java │ │ ├── NettyHttpClientTest.java │ │ ├── OkHttp2ClinetTest.java │ │ ├── OkHttp3ClinetTest.java │ │ └── SimpleHttpTest.java │ └── util │ └── ConstsTest.java ├── weixin4j-coverage └── pom.xml ├── weixin4j-example ├── .gitignore ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── foxinmy │ │ └── weixin4j │ │ └── example │ │ ├── controller │ │ └── IndexController.java │ │ └── server │ │ ├── Weixin4jServerStartup.java │ │ ├── Weixin4jServerStartupListener.java │ │ └── handler │ │ ├── ChatMessageHandler.java │ │ ├── CustomMessageHandler.java │ │ ├── HelloMessageHandler.java │ │ ├── SubscribeMessageHandler.java │ │ ├── TextMessageHandler.java │ │ └── VoiceMessageHandler.java │ ├── resources │ ├── spring-bean.xml │ ├── spring-servlet.xml │ ├── spring-weixin4j-proxy.xml │ ├── spring-weixin4j-server.xml │ └── weixin4j.properties │ ├── script │ ├── assembly.xml │ └── startup.sh │ └── webapp │ ├── WEB-INF │ ├── view │ │ ├── index.jsp │ │ └── taglibs.jsp │ └── web.xml │ └── static │ └── layui │ ├── css │ ├── global.css │ ├── layui.css │ ├── mobile.css │ └── modules │ │ ├── code.css │ │ ├── laydate │ │ ├── icon.png │ │ └── laydate.css │ │ └── layer │ │ ├── default │ │ ├── icon-ext.png │ │ ├── icon.png │ │ ├── loading-0.gif │ │ ├── loading-1.gif │ │ └── loading-2.gif │ │ └── layer.css │ ├── font │ ├── iconfont.eot │ ├── iconfont.svg │ ├── iconfont.ttf │ └── iconfont.woff │ ├── images │ └── face │ │ ├── 0.gif │ │ ├── 1.gif │ │ ├── 10.gif │ │ ├── 11.gif │ │ ├── 12.gif │ │ ├── 13.gif │ │ ├── 14.gif │ │ ├── 15.gif │ │ ├── 16.gif │ │ ├── 17.gif │ │ ├── 18.gif │ │ ├── 19.gif │ │ ├── 2.gif │ │ ├── 20.gif │ │ ├── 21.gif │ │ ├── 22.gif │ │ ├── 23.gif │ │ ├── 24.gif │ │ ├── 25.gif │ │ ├── 26.gif │ │ ├── 27.gif │ │ ├── 28.gif │ │ ├── 29.gif │ │ ├── 3.gif │ │ ├── 30.gif │ │ ├── 31.gif │ │ ├── 32.gif │ │ ├── 33.gif │ │ ├── 34.gif │ │ ├── 35.gif │ │ ├── 36.gif │ │ ├── 37.gif │ │ ├── 38.gif │ │ ├── 39.gif │ │ ├── 4.gif │ │ ├── 40.gif │ │ ├── 41.gif │ │ ├── 42.gif │ │ ├── 43.gif │ │ ├── 44.gif │ │ ├── 45.gif │ │ ├── 46.gif │ │ ├── 47.gif │ │ ├── 48.gif │ │ ├── 49.gif │ │ ├── 5.gif │ │ ├── 50.gif │ │ ├── 51.gif │ │ ├── 52.gif │ │ ├── 53.gif │ │ ├── 54.gif │ │ ├── 55.gif │ │ ├── 56.gif │ │ ├── 57.gif │ │ ├── 58.gif │ │ ├── 59.gif │ │ ├── 6.gif │ │ ├── 60.gif │ │ ├── 61.gif │ │ ├── 62.gif │ │ ├── 63.gif │ │ ├── 64.gif │ │ ├── 65.gif │ │ ├── 66.gif │ │ ├── 67.gif │ │ ├── 68.gif │ │ ├── 69.gif │ │ ├── 7.gif │ │ ├── 70.gif │ │ ├── 71.gif │ │ ├── 8.gif │ │ └── 9.gif │ ├── lay │ ├── dest │ │ └── layui.all.js │ ├── lib │ │ └── jquery.js │ └── modules │ │ ├── code.js │ │ ├── element.js │ │ ├── flow.js │ │ ├── form.js │ │ ├── laydate.js │ │ ├── layedit.js │ │ ├── layer.js │ │ ├── laypage.js │ │ ├── laytpl.js │ │ ├── tree.js │ │ ├── upload.js │ │ └── util.js │ └── layui.js ├── weixin4j-mp ├── .gitignore ├── CHANGE.md ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── foxinmy │ │ │ └── weixin4j │ │ │ └── mp │ │ │ ├── WeixinComponentProxy.java │ │ │ ├── WeixinProxy.java │ │ │ ├── api │ │ │ ├── CardApi.java │ │ │ ├── CommentApi.java │ │ │ ├── ComponentApi.java │ │ │ ├── CustomApi.java │ │ │ ├── DataApi.java │ │ │ ├── GroupApi.java │ │ │ ├── HelperApi.java │ │ │ ├── MassApi.java │ │ │ ├── MediaApi.java │ │ │ ├── MenuApi.java │ │ │ ├── MpApi.java │ │ │ ├── NotifyApi.java │ │ │ ├── OauthApi.java │ │ │ ├── PayOldApi.java │ │ │ ├── QrApi.java │ │ │ ├── README.md │ │ │ ├── ShakeAroundApi.java │ │ │ ├── TagApi.java │ │ │ ├── TmplApi.java │ │ │ ├── UserApi.java │ │ │ ├── cacert.pem │ │ │ └── weixin.properties │ │ │ ├── component │ │ │ ├── WeixinComponentPreCodeCreator.java │ │ │ ├── WeixinComponentTokenCreator.java │ │ │ └── WeixinTokenComponentCreator.java │ │ │ ├── datacube │ │ │ ├── ArticleDatacube1.java │ │ │ ├── ArticleDatacube2.java │ │ │ ├── ArticleDatacubeShare.java │ │ │ ├── ArticleSummary.java │ │ │ ├── ArticleTotal.java │ │ │ ├── InterfaceSummary.java │ │ │ ├── UpstreamMsg.java │ │ │ ├── UpstreamMsgDist.java │ │ │ └── UserSummary.java │ │ │ ├── message │ │ │ ├── NotifyMessage.java │ │ │ └── TemplateMessage.java │ │ │ ├── model │ │ │ ├── ArticleComment.java │ │ │ ├── AuthorizerOption.java │ │ │ ├── AutoReplySetting.java │ │ │ ├── ChangeOpenidResult.java │ │ │ ├── Comment.java │ │ │ ├── ComponentAuthorizer.java │ │ │ ├── ComponentAuthorizerToken.java │ │ │ ├── Following.java │ │ │ ├── Group.java │ │ │ ├── KfAccount.java │ │ │ ├── KfChatRecord.java │ │ │ ├── KfOnlineAccount.java │ │ │ ├── KfSession.java │ │ │ ├── Menu.java │ │ │ ├── MenuMatchRule.java │ │ │ ├── MenuSetting.java │ │ │ ├── OauthToken.java │ │ │ ├── SemQuery.java │ │ │ ├── SemResult.java │ │ │ ├── Tag.java │ │ │ ├── TemplateMessageInfo.java │ │ │ ├── User.java │ │ │ ├── WeixinMpAccount.java │ │ │ └── shakearound │ │ │ │ ├── Device.java │ │ │ │ ├── DeviceAuditState.java │ │ │ │ └── ShakeUserInfo.java │ │ │ ├── oldpayment │ │ │ ├── ApiResultV2.java │ │ │ ├── NativePayNotifyV2.java │ │ │ ├── NativePayResponseV2.java │ │ │ ├── OrderV2.java │ │ │ ├── PayFeedback.java │ │ │ ├── PayPackageV2.java │ │ │ ├── PayWarn.java │ │ │ ├── RefundDetailV2.java │ │ │ ├── RefundRecordV2.java │ │ │ ├── RefundResultV2.java │ │ │ ├── WeixinOldPayAccount.java │ │ │ └── WeixinOldPaymentSignature.java │ │ │ ├── token │ │ │ ├── WeixinTicketCreator.java │ │ │ └── WeixinTokenCreator.java │ │ │ └── type │ │ │ ├── AutomatchMode.java │ │ │ ├── AutoreplyMode.java │ │ │ ├── ClientPlatformType.java │ │ │ ├── CustomRecordOperCode.java │ │ │ ├── DatacubeType.java │ │ │ ├── DatacuteCountIntervalType.java │ │ │ ├── FaceSize.java │ │ │ ├── IndustryType.java │ │ │ ├── KfInviteStatus.java │ │ │ ├── KfOnlineStatus.java │ │ │ ├── Lang.java │ │ │ ├── SemCategory.java │ │ │ ├── ShareSourceType.java │ │ │ ├── URLConsts.java │ │ │ └── UserSourceType.java │ └── resources │ │ └── weixin4j.properties │ └── test │ └── java │ └── com │ └── foxinmy │ └── weixin4j │ └── mp │ └── test │ ├── CardTest.java │ ├── CustomTest.java │ ├── DataApiTest.java │ ├── GroupTest.java │ ├── HelpTest.java │ ├── HelperTest.java │ ├── MassTest.java │ ├── MediaTest.java │ ├── MemberCardTest.java │ ├── MenuTest.java │ ├── NotifyTest.java │ ├── PayTest.java │ ├── QRTest.java │ ├── SemanticTest.java │ ├── TagTest.java │ ├── TemplateTest.java │ ├── TokenTest.java │ ├── UserTest.java │ ├── WeixinProxyTest.java │ └── XmlstreamTest.java ├── weixin4j-pay ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── foxinmy │ │ │ └── weixin4j │ │ │ └── pay │ │ │ ├── PayPackageBuilder.java │ │ │ ├── README.md │ │ │ ├── WeixinPayProxy.java │ │ │ ├── api │ │ │ ├── CashApi.java │ │ │ ├── CouponApi.java │ │ │ ├── CustomsApi.java │ │ │ ├── MchApi.java │ │ │ ├── PayApi.java │ │ │ └── ProfitSharingApi.java │ │ │ ├── model │ │ │ └── WeixinPayAccount.java │ │ │ ├── payment │ │ │ ├── JsPayNotify.java │ │ │ ├── PayBaseInfo.java │ │ │ ├── PayPackage.java │ │ │ ├── PayRequest.java │ │ │ ├── coupon │ │ │ │ ├── CouponDetail.java │ │ │ │ ├── CouponResult.java │ │ │ │ ├── CouponStock.java │ │ │ │ ├── OrderCouponInfo.java │ │ │ │ └── RefundCouponInfo.java │ │ │ ├── face │ │ │ │ ├── PayfaceAuthinfo.java │ │ │ │ └── PayfaceAuthinfoRequest.java │ │ │ └── mch │ │ │ │ ├── APPPayRequest.java │ │ │ │ ├── AbstractPayRequest.java │ │ │ │ ├── CorpPayment.java │ │ │ │ ├── CorpPaymentRecord.java │ │ │ │ ├── CorpPaymentResult.java │ │ │ │ ├── CustomsOrder.java │ │ │ │ ├── CustomsOrderRecord.java │ │ │ │ ├── CustomsOrderResult.java │ │ │ │ ├── JSAPIPayRequest.java │ │ │ │ ├── MICROPayRequest.java │ │ │ │ ├── MchPayPackage.java │ │ │ │ ├── MchPayRequest.java │ │ │ │ ├── MerchantResult.java │ │ │ │ ├── MerchantTradeResult.java │ │ │ │ ├── NATIVEPayRequest.java │ │ │ │ ├── NativePayNotify.java │ │ │ │ ├── NativePayResponse.java │ │ │ │ ├── OpenIdResult.java │ │ │ │ ├── Order.java │ │ │ │ ├── PrePay.java │ │ │ │ ├── Redpacket.java │ │ │ │ ├── RedpacketRecord.java │ │ │ │ ├── RedpacketRisk.java │ │ │ │ ├── RedpacketSendResult.java │ │ │ │ ├── RefundDetail.java │ │ │ │ ├── RefundRecord.java │ │ │ │ ├── RefundResult.java │ │ │ │ ├── SceneInfo.java │ │ │ │ ├── SceneInfoApp.java │ │ │ │ ├── SceneInfoStore.java │ │ │ │ ├── SettlementRecord.java │ │ │ │ └── WAPPayRequest.java │ │ │ ├── profitsharing │ │ │ ├── ProfitId.java │ │ │ ├── ProfitSharingRequest.java │ │ │ ├── ProfitSharingResult.java │ │ │ ├── ProfitSharingReturnRequest.java │ │ │ ├── ProfitSharingReturnResult.java │ │ │ ├── Receiver.java │ │ │ ├── ReceiverProfit.java │ │ │ ├── ReceiverProfitResult.java │ │ │ ├── ReceiverRequest.java │ │ │ └── ReceiverResult.java │ │ │ ├── sign │ │ │ ├── AbstractWeixinSignature.java │ │ │ ├── WeixinPaymentSignature.java │ │ │ └── WeixinSignature.java │ │ │ └── type │ │ │ ├── BankType.java │ │ │ ├── CredentialType.java │ │ │ ├── CurrencyType.java │ │ │ ├── CustomsCity.java │ │ │ ├── CustomsSatus.java │ │ │ ├── IdQuery.java │ │ │ ├── IdType.java │ │ │ ├── ProfitIdType.java │ │ │ ├── SignType.java │ │ │ ├── TarType.java │ │ │ ├── TradeState.java │ │ │ ├── TradeType.java │ │ │ ├── mch │ │ │ ├── BillType.java │ │ │ ├── CorpPaymentCheckNameType.java │ │ │ ├── CouponStatus.java │ │ │ ├── CouponStockStatus.java │ │ │ ├── CouponStockType.java │ │ │ ├── CouponType.java │ │ │ ├── RedpacketSceneType.java │ │ │ ├── RedpacketSendType.java │ │ │ ├── RedpacketStatus.java │ │ │ ├── RedpacketType.java │ │ │ ├── RefundAccountType.java │ │ │ ├── RefundChannel.java │ │ │ ├── RefundStatus.java │ │ │ └── RefundType.java │ │ │ └── profitsharing │ │ │ ├── ReceiverType.java │ │ │ ├── RelationType.java │ │ │ └── ReturnAccountType.java │ └── resources │ │ ├── com │ │ └── foxinmy │ │ │ └── weixin4j │ │ │ └── pay │ │ │ └── weixin.properties │ │ └── weixin4j.properties │ └── test │ └── java │ └── com │ └── foxinmy │ └── weixin4j │ └── pay │ └── test │ ├── PayApiExample.java │ ├── TestDepositPay.java │ ├── TestGetPayFaceAuthInfo.java │ ├── TestHmacSHA256Sign.java │ └── TestProfitSharingApi.java ├── weixin4j-qy ├── .gitignore ├── CHANGE.md ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── foxinmy │ │ │ └── weixin4j │ │ │ └── qy │ │ │ ├── WeixinProxy.java │ │ │ ├── WeixinSuiteProxy.java │ │ │ ├── api │ │ │ ├── AgentApi.java │ │ │ ├── BatchApi.java │ │ │ ├── ChatApi.java │ │ │ ├── HelperApi.java │ │ │ ├── MediaApi.java │ │ │ ├── MenuApi.java │ │ │ ├── NotifyApi.java │ │ │ ├── OauthApi.java │ │ │ ├── PartyApi.java │ │ │ ├── ProviderApi.java │ │ │ ├── QyApi.java │ │ │ ├── README.md │ │ │ ├── SuiteApi.java │ │ │ ├── TagApi.java │ │ │ ├── UserApi.java │ │ │ └── weixin.properties │ │ │ ├── jssdk │ │ │ ├── JSSDKContactConfigurator.java │ │ │ └── JSSDKContactParameter.java │ │ │ ├── message │ │ │ ├── ChatMessage.java │ │ │ ├── CustomeMessage.java │ │ │ └── NotifyMessage.java │ │ │ ├── model │ │ │ ├── AgentInfo.java │ │ │ ├── AgentOverview.java │ │ │ ├── AgentSetter.java │ │ │ ├── BatchResult.java │ │ │ ├── Callback.java │ │ │ ├── ChatInfo.java │ │ │ ├── ChatMute.java │ │ │ ├── Contacts.java │ │ │ ├── CorpInfo.java │ │ │ ├── IdParameter.java │ │ │ ├── OUserInfo.java │ │ │ ├── Party.java │ │ │ ├── PrivilegeInfo.java │ │ │ ├── PrivilegeLevel.java │ │ │ ├── Tag.java │ │ │ ├── User.java │ │ │ └── WeixinQyAccount.java │ │ │ ├── suite │ │ │ ├── WeixinSuitePreCodeCreator.java │ │ │ ├── WeixinSuiteTokenCreator.java │ │ │ └── WeixinTokenSuiteCreator.java │ │ │ ├── token │ │ │ ├── WeixinProviderTokenCreator.java │ │ │ ├── WeixinTicketCreator.java │ │ │ └── WeixinTokenCreator.java │ │ │ └── type │ │ │ ├── AgentAuthType.java │ │ │ ├── BatchStatus.java │ │ │ ├── BatchType.java │ │ │ ├── ChatType.java │ │ │ ├── CorpType.java │ │ │ ├── CorporateType.java │ │ │ ├── InviteType.java │ │ │ ├── KfType.java │ │ │ ├── LoginTargetType.java │ │ │ ├── LoginUserType.java │ │ │ ├── ReportLocationType.java │ │ │ ├── URLConsts.java │ │ │ └── UserStatus.java │ └── resources │ │ └── weixin4j.properties │ └── test │ └── java │ └── com │ └── foxinmy │ └── weixin4j │ └── qy │ └── test │ ├── AgentTest.java │ ├── BatchTest.java │ ├── ChatTest.java │ ├── HelperTest.java │ ├── MediaTest.java │ ├── MenuTest.java │ ├── NotifyTest.java │ ├── PartyTest.java │ ├── TagTest.java │ ├── TokenTest.java │ └── UserTest.java ├── weixin4j-server ├── .gitignore ├── CHANGE.md ├── README.md ├── deploy.xml ├── pom.xml └── src │ ├── main │ ├── assembly.xml │ ├── java │ │ └── com │ │ │ └── foxinmy │ │ │ └── weixin4j │ │ │ ├── base64 │ │ │ ├── Base64.java │ │ │ └── BaseNCodec.java │ │ │ ├── dispatcher │ │ │ ├── BeanFactory.java │ │ │ ├── DefaultMessageMatcher.java │ │ │ ├── MessageHandlerExecutor.java │ │ │ ├── WeixinMessageDispatcher.java │ │ │ ├── WeixinMessageKey.java │ │ │ └── WeixinMessageMatcher.java │ │ │ ├── handler │ │ │ ├── DebugMessageHandler.java │ │ │ ├── MessageHandlerAdapter.java │ │ │ ├── MultipleMessageHandlerAdapter.java │ │ │ └── WeixinMessageHandler.java │ │ │ ├── interceptor │ │ │ ├── MessageInterceptorAdapter.java │ │ │ └── WeixinMessageInterceptor.java │ │ │ ├── listener │ │ │ └── AbstractWeixinServerStartupListener.java │ │ │ ├── message │ │ │ ├── ImageMessage.java │ │ │ ├── LinkMessage.java │ │ │ ├── LocationMessage.java │ │ │ ├── README.md │ │ │ ├── TextMessage.java │ │ │ ├── VideoMessage.java │ │ │ ├── VoiceMessage.java │ │ │ └── event │ │ │ │ ├── EventMessage.java │ │ │ │ ├── LocationEventMessage.java │ │ │ │ ├── MenuEventMessage.java │ │ │ │ ├── MenuLocationEventMessage.java │ │ │ │ ├── MenuPhotoEventMessage.java │ │ │ │ ├── MenuScanEventMessage.java │ │ │ │ └── README.md │ │ │ ├── mp │ │ │ ├── component │ │ │ │ ├── ComponentEventType.java │ │ │ │ └── ComponentMessage.java │ │ │ └── event │ │ │ │ ├── KfCloseEventMessage.java │ │ │ │ ├── KfCreateEventMessage.java │ │ │ │ ├── KfSwitchEventMessage.java │ │ │ │ ├── MassEventMessage.java │ │ │ │ ├── ScanEventMessage.java │ │ │ │ ├── ScribeEventMessage.java │ │ │ │ ├── TemplatesendjobfinishMessage.java │ │ │ │ ├── VerifyExpireEventMessage.java │ │ │ │ └── VerifyFailEventMessage.java │ │ │ ├── qy │ │ │ ├── chat │ │ │ │ ├── ChatEventType.java │ │ │ │ ├── ChatItem.java │ │ │ │ ├── ChatReceiver.java │ │ │ │ ├── ChatType.java │ │ │ │ └── WeixinChatMessage.java │ │ │ ├── event │ │ │ │ ├── BatchjobresultMessage.java │ │ │ │ ├── EnterAgentEventMessage.java │ │ │ │ └── ScribeEventMessage.java │ │ │ └── suite │ │ │ │ ├── SuiteEventType.java │ │ │ │ └── SuiteMessage.java │ │ │ ├── request │ │ │ ├── WeixinMessage.java │ │ │ └── WeixinRequest.java │ │ │ ├── response │ │ │ ├── BlankResponse.java │ │ │ ├── ImageResponse.java │ │ │ ├── MusicResponse.java │ │ │ ├── NewsResponse.java │ │ │ ├── SingleResponse.java │ │ │ ├── TextResponse.java │ │ │ ├── TransferCustomerResponse.java │ │ │ ├── VideoResponse.java │ │ │ ├── VoiceResponse.java │ │ │ └── WeixinResponse.java │ │ │ ├── socket │ │ │ ├── README.md │ │ │ ├── SingleResponseEncoder.java │ │ │ ├── WeixinMessageDecoder.java │ │ │ ├── WeixinMessageTransfer.java │ │ │ ├── WeixinRequestHandler.java │ │ │ ├── WeixinResponseEncoder.java │ │ │ └── WeixinServerInitializer.java │ │ │ ├── spring │ │ │ └── SpringBeanFactory.java │ │ │ ├── startup │ │ │ └── WeixinServerBootstrap.java │ │ │ ├── type │ │ │ ├── AccountType.java │ │ │ ├── AgentType.java │ │ │ ├── EncryptType.java │ │ │ ├── EventType.java │ │ │ └── MessageType.java │ │ │ ├── util │ │ │ ├── AesToken.java │ │ │ ├── ClassUtil.java │ │ │ ├── HexUtil.java │ │ │ ├── HttpUtil.java │ │ │ ├── MessageUtil.java │ │ │ ├── PKCS7Encoder.java │ │ │ └── ServerToolkits.java │ │ │ └── xml │ │ │ ├── EncryptMessageHandler.java │ │ │ └── MessageTransferHandler.java │ └── startup.sh │ └── test │ └── java │ └── com │ └── foxinmy │ └── weixin4j │ └── server │ ├── ext │ └── SuiteMessageHandler.java │ └── test │ ├── EncryptMessageTest.java │ ├── EventMessageRequestTest.java │ ├── MessagePush.java │ ├── MessageRequestTest.java │ └── MessageServerStartup.java ├── weixin4j-serverX ├── .gitignore ├── README.md ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── zone │ └── weixin4j │ ├── annotation │ ├── WxMessageHandler.java │ └── WxMessageInterceptor.java │ ├── base64 │ ├── Base64.java │ └── BaseNCodec.java │ ├── controller │ └── WxController.java │ ├── dispatcher │ ├── DefaultMessageMatcher.java │ ├── MessageHandlerExecutor.java │ ├── WeixinMessageDispatcher.java │ ├── WeixinMessageKey.java │ └── WeixinMessageMatcher.java │ ├── exception │ ├── HttpResponseException.java │ ├── MessageInterceptorException.java │ └── WeixinException.java │ ├── handler │ ├── DebugMessageHandler.java │ ├── MessageHandlerAdapter.java │ ├── MultipleMessageHandlerAdapter.java │ └── WeixinMessageHandler.java │ ├── interceptor │ ├── MessageInterceptorAdapter.java │ └── WeixinMessageInterceptor.java │ ├── message │ ├── ImageMessage.java │ ├── LinkMessage.java │ ├── LocationMessage.java │ ├── README.md │ ├── TextMessage.java │ ├── VideoMessage.java │ ├── VoiceMessage.java │ └── event │ │ ├── EventMessage.java │ │ ├── LocationEventMessage.java │ │ ├── MenuEventMessage.java │ │ ├── MenuLocationEventMessage.java │ │ ├── MenuPhotoEventMessage.java │ │ ├── MenuScanEventMessage.java │ │ └── README.md │ ├── mp │ ├── component │ │ ├── ComponentEventType.java │ │ └── ComponentMessage.java │ └── event │ │ ├── KfCloseEventMessage.java │ │ ├── KfCreateEventMessage.java │ │ ├── KfSwitchEventMessage.java │ │ ├── MassEventMessage.java │ │ ├── ScanEventMessage.java │ │ ├── ScribeEventMessage.java │ │ ├── TemplatesendjobfinishMessage.java │ │ ├── VerifyExpireEventMessage.java │ │ └── VerifyFailEventMessage.java │ ├── qy │ ├── chat │ │ ├── ChatEventType.java │ │ ├── ChatItem.java │ │ ├── ChatReceiver.java │ │ ├── ChatType.java │ │ └── WeixinChatMessage.java │ ├── event │ │ ├── BatchjobresultMessage.java │ │ ├── EnterAgentEventMessage.java │ │ └── ScribeEventMessage.java │ └── suite │ │ ├── SuiteEventType.java │ │ └── SuiteMessage.java │ ├── request │ ├── WeixinMessage.java │ └── WeixinRequest.java │ ├── response │ ├── BlankResponse.java │ ├── ImageResponse.java │ ├── MusicResponse.java │ ├── NewsResponse.java │ ├── SingleResponse.java │ ├── TextResponse.java │ ├── TransferCustomerResponse.java │ ├── VideoResponse.java │ ├── VoiceResponse.java │ └── WeixinResponse.java │ ├── service │ ├── WeiXin4jContextAware.java │ ├── WxService.java │ ├── context │ │ └── WeiXin4jContextAwareImpl.java │ └── impl │ │ └── WxServiceImpl.java │ ├── socket │ ├── README.md │ ├── WeixinMessageTransfer.java │ └── WeixinResponseEncoder.java │ ├── spring │ ├── PropertyTokenGenerater.java │ └── TokenGenerater.java │ ├── type │ ├── AccountType.java │ ├── AgentType.java │ ├── EncryptType.java │ ├── EventType.java │ └── MessageType.java │ ├── util │ ├── AesToken.java │ ├── ClassUtil.java │ ├── HexUtil.java │ ├── MessageUtil.java │ ├── PKCS7Encoder.java │ └── ServerToolkits.java │ └── xml │ ├── EncryptMessageHandler.java │ └── MessageTransferHandler.java └── weixin4j-wxa ├── pom.xml └── src ├── main ├── java │ └── com │ │ └── foxinmy │ │ └── weixin4j │ │ └── wxa │ │ ├── AESUtils.java │ │ ├── WXBizDataCrypt.java │ │ ├── WeixinAppFacade.java │ │ ├── api │ │ ├── AddTemplateParameter.java │ │ ├── Color.java │ │ ├── CustomMessageAdapters.java │ │ ├── CustomMessageApi.java │ │ ├── LoginApi.java │ │ ├── QrCodeApi.java │ │ ├── SecCheckApi.java │ │ ├── SubscribeMessageApi.java │ │ ├── SubscribeMessageParameter.java │ │ ├── TemplateApi.java │ │ ├── TemplateListResult.java │ │ ├── TemplateMessageApi.java │ │ ├── TemplateMessageParameter.java │ │ ├── TemplateResult.java │ │ ├── TokenManagerApi.java │ │ ├── WxaApi.java │ │ ├── WxaApiAsyncResult.java │ │ ├── WxaApiResult.java │ │ ├── WxaCodeParameter.java │ │ ├── WxaCodeUnlimitParameter.java │ │ ├── WxaQrCodeParameter.java │ │ └── package-info.java │ │ ├── model │ │ ├── Session.java │ │ ├── custommessage │ │ │ ├── Command.java │ │ │ ├── CustomMessage.java │ │ │ ├── Image.java │ │ │ ├── Link.java │ │ │ ├── MiniProgramPage.java │ │ │ ├── Text.java │ │ │ └── package-info.java │ │ ├── package-info.java │ │ ├── subscribemessage │ │ │ ├── ParameterType.java │ │ │ └── package-info.java │ │ └── template │ │ │ ├── Keyword.java │ │ │ ├── Template.java │ │ │ └── package-info.java │ │ └── package-info.java └── resources │ └── com │ └── foxinmy │ └── weixin4j │ └── wxa │ └── api │ └── weixin.properties ├── site ├── markdown │ └── index.md └── site.xml └── test ├── java └── com │ └── foxinmy │ └── weixin4j │ └── wxa │ ├── WXBizDataCryptTest.java │ ├── api │ ├── AddTemplateParameterTest.java │ ├── CustomMessageAdaptersTest.java │ ├── TemplateListResultTest.java │ ├── TemplateMessageParameterTest.java │ ├── TemplateResultTest.java │ ├── WxaApiTest.java │ ├── WxaCodeParameterTest.java │ ├── WxaCodeUnlimitParameterTest.java │ └── WxaQrCodeParameterTest.java │ └── model │ ├── SessionTest.java │ └── custommessage │ └── CommandTest.java └── resources └── com └── foxinmy └── weixin4j └── wxa └── api ├── Template.json ├── TemplateList.json └── TemplateListInLibrary.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Mobile Tools for Java (J2ME) 2 | .mtj.tmp/ 3 | 4 | # Package Files # 5 | *.jar 6 | *.war 7 | *.ear 8 | 9 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 10 | hs_err_pid* 11 | 12 | *~ 13 | 14 | # eclipse ignore 15 | .settings/ 16 | .project 17 | .classpath 18 | /.tomcatplugin 19 | 20 | # idea ignore 21 | /.idea 22 | *.iml 23 | 24 | # maven ignore 25 | target/ 26 | 27 | # other ignore 28 | *.log 29 | *.tmp 30 | Thumbs.db 31 | /target/ 32 | weixin4j-future 33 | .DS_Store 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The Apache License 2 | 3 | Copyright (c) 2014 jinyu 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. -------------------------------------------------------------------------------- /assembly.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | full 7 | 8 | jar 9 | 10 | false 11 | 12 | 13 | target/classes 14 | / 15 | 16 | /** 17 | 18 | 19 | *.properties 20 | *.xml 21 | 22 | 23 | 24 | 25 | 26 | true 27 | 28 | com.foxinmy:weixin4j-base 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /maven-version-rules.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | .*(-|\.)(alpha|Alpha|ALPHA|beta|Beta|BETA|rc|RC).* 9 | 10 | 11 | 12 | 13 | .*-alpha[\.\-].* 14 | .*-b[0-9]+ 15 | 16 | 17 | 18 | 19 | .*-b.* 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/site/site.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | org.apache.maven.skins 7 | maven-fluido-skin 8 | 1.9 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | true 18 | true 19 | true 20 | pull-right 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /weixin4j-base/.gitignore: -------------------------------------------------------------------------------- 1 | # Mobile Tools for Java (J2ME) 2 | .mtj.tmp/ 3 | 4 | # Package Files # 5 | *.jar 6 | *.war 7 | *.ear 8 | 9 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 10 | hs_err_pid* 11 | 12 | *~ 13 | 14 | # eclipse ignore 15 | *.settings/* 16 | /.project 17 | /.classpath 18 | /.tomcatplugin 19 | 20 | # idea ignore 21 | /.idea 22 | *.iml 23 | 24 | # maven ignore 25 | target/* 26 | 27 | # other ignore 28 | *.log 29 | *.tmp 30 | Thumbs.db 31 | /target/ 32 | .DS_Store 33 | /target/ 34 | /target/ 35 | -------------------------------------------------------------------------------- /weixin4j-base/README.md: -------------------------------------------------------------------------------- 1 | weixin4j-base 2 | ============= 3 | 4 | 微信开发基础工程 5 | -------------- 6 | 7 | 功能列表 8 | ------- 9 | 10 | `Token的实现` 11 | 12 | `通用消息实体` 13 | 14 | `HttpClient的实现` 15 | 16 | `微信支付的实现` 17 | 18 | [如何使用](https://github.com/foxinmy/weixin4j/wiki) 19 | --------- 20 | 21 | [更新LOG](./CHANGE.md) 22 | --------------------- 23 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/api/README.md: -------------------------------------------------------------------------------- 1 | * CashApi `现金红包API` 2 | 3 | * CouponApi `优惠券API` 4 | 5 | * PayApi `微信支付API` 6 | 7 | * CustomsApi `报关接口` -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/cache/CacheCreator.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.cache; 2 | 3 | import com.foxinmy.weixin4j.exception.WeixinException; 4 | 5 | /** 6 | * Cache的创建 7 | * 8 | * @className CacheCreator 9 | * @author jinyu(foxinmy@gmail.com) 10 | * @date 2016年5月24日 11 | * @since JDK 1.6 12 | * @see 13 | */ 14 | public interface CacheCreator { 15 | /** 16 | * CacheKey 17 | * 18 | * @return 19 | */ 20 | public String key(); 21 | 22 | /** 23 | * 创建Cache 24 | * 25 | * @throws WeixinException 26 | * @return 缓存对象 27 | */ 28 | public T create() throws WeixinException; 29 | } 30 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/cache/CacheStorager.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.cache; 2 | 3 | /** 4 | * Cache的存储 5 | * 6 | * @className CacheStorager 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2015年6月22日 9 | * @since JDK 1.6 10 | * @see 11 | */ 12 | public interface CacheStorager { 13 | /** 14 | * 考虑到临界情况,实际缓存的有效时间减去该毫秒数(60秒) 15 | */ 16 | long CUTMS = 60 * 1000l; 17 | 18 | /** 19 | * 所有的缓存KEY 20 | */ 21 | String ALLKEY = "weixin4j_cache_keys"; 22 | 23 | /** 24 | * 查找缓存中的对象 25 | * 26 | * @param key 27 | * 缓存key 28 | * @return 缓存对象 29 | */ 30 | T lookup(String key); 31 | 32 | /** 33 | * 缓存新的对象 34 | * 35 | * @param key 36 | * 缓存key 37 | * 38 | * @param cache 39 | * 将要缓存的对象 40 | */ 41 | void caching(String key, T cache); 42 | 43 | /** 44 | * 移除缓存对象 45 | * 46 | * @param key 47 | * 缓存key 48 | * @return 移除的对象 49 | */ 50 | T evict(String key); 51 | 52 | /** 53 | * 清除所有缓存对象(请慎重) 54 | * 55 | */ 56 | void clear(); 57 | } 58 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/cache/Cacheable.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.cache; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * 可缓存的对象 7 | * 8 | * @className Cacheable 9 | * @author jinyu(foxinmy@gmail.com) 10 | * @date 2016年5月26日 11 | * @since JDK 1.6 12 | * @see 13 | */ 14 | public interface Cacheable extends Serializable { 15 | /** 16 | * 过期时间(单位:毫秒),值小于0时视为永不过期 17 | * 18 | * @return 缓存过期时间 19 | */ 20 | public long getExpires(); 21 | 22 | /** 23 | * 创建时间(单位:毫秒) 24 | * 25 | * @return 缓存对象创建时间 26 | */ 27 | public long getCreateTime(); 28 | } 29 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/cache/README.md: -------------------------------------------------------------------------------- 1 | ### CACHE的实现 2 | 3 | * CacheCreator 负责创建新的缓存对象 4 | 5 | * CacheStorager 负责查找已缓存的对象或者缓存新的对象 6 | 7 | * TokenManager 负责对缓存对象的管理(屏蔽细节) 8 | 9 | * FileCacheStorager 是系统默认的缓存存储策略实现 10 | 11 | * Redis(Cluster)CacheStorager 使用redis保存缓存对象(需要自行添加客户端包,[jedis](https://github.com/xetorthio/jedis)) 12 | 13 | * MemcacheCacheStorager 使用memcache保存缓存对象(需要自行添加客户端包,[Memcached-Java-Client](https://github.com/gwhalin/Memcached-Java-Client)) 14 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/http/AbstractHttpResponse.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.http; 2 | 3 | import java.io.ByteArrayInputStream; 4 | import java.io.InputStream; 5 | 6 | /** 7 | * 8 | * @className AbstractHttpResponse 9 | * @author jinyu(foxinmy@gmail.com) 10 | * @date 2015年9月7日 11 | * @since JDK 1.6 12 | * @see 13 | */ 14 | public abstract class AbstractHttpResponse implements HttpResponse { 15 | protected final static String KEEP_ALIVE = "keep-alive"; 16 | private final byte[] content; 17 | 18 | public AbstractHttpResponse(byte[] content) { 19 | this.content = content; 20 | } 21 | 22 | @Override 23 | public byte[] getContent() { 24 | return content; 25 | } 26 | 27 | @Override 28 | public InputStream getBody() { 29 | return content != null ? new ByteArrayInputStream(content) : null; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/http/HttpClientException.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.http; 2 | 3 | 4 | public class HttpClientException extends Exception { 5 | 6 | private static final long serialVersionUID = -1760373205801759702L; 7 | 8 | /** 9 | * Construct a new instance of {@code HttpClientException} with the given 10 | * message. 11 | * 12 | * @param msg 13 | * the message 14 | */ 15 | public HttpClientException(String msg) { 16 | super(msg); 17 | } 18 | 19 | /** 20 | * Construct a new instance of {@code HttpClientException} with the given 21 | * message and exception. 22 | * 23 | * @param msg 24 | * the message 25 | * @param ex 26 | * the exception 27 | */ 28 | public HttpClientException(String msg, Throwable ex) { 29 | super(msg, ex); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/http/HttpMessage.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.http; 2 | 3 | /** 4 | * HTTP messages consist of requests from client to server and responses from 5 | * server to client. 6 | * 7 | * @className HttpMessage 8 | * @author jinyu(foxinmy@gmail.com) 9 | * @date 2015年5月29日 10 | * @since JDK 1.6 11 | * @see 12 | */ 13 | public interface HttpMessage { 14 | /** 15 | * HTTP报头 16 | * 17 | * @return 18 | */ 19 | HttpHeaders getHeaders(); 20 | } 21 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/http/HttpMethod.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.http; 2 | 3 | /** 4 | * 请求方法 5 | * 6 | * @className HttpMethod 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2015年5月29日 9 | * @since JDK 1.6 10 | * @see 11 | */ 12 | public enum HttpMethod { 13 | GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE, CONNECT 14 | } 15 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/http/HttpResponse.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.http; 2 | 3 | import java.io.InputStream; 4 | 5 | /** 6 | * HTTP 响应 7 | * 8 | * @className HttpResponse 9 | * @author jinyu(foxinmy@gmail.com) 10 | * @date 2015年5月30日 11 | * @since JDK 1.6 12 | * @see 13 | */ 14 | public interface HttpResponse extends HttpMessage { 15 | /** 16 | * HTTP协议 17 | * 18 | * @return 19 | */ 20 | HttpVersion getProtocol(); 21 | 22 | /** 23 | * 响应状态 24 | * 25 | * @return 26 | */ 27 | HttpStatus getStatus(); 28 | /** 29 | * 响应内容 30 | * 31 | * @return 32 | */ 33 | InputStream getBody(); 34 | 35 | /** 36 | * 响应内容 37 | * 38 | * @return 39 | */ 40 | byte[] getContent(); 41 | 42 | /** 43 | * 释放资源 44 | */ 45 | void close(); 46 | } 47 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/http/URLParameter.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.http; 2 | 3 | import com.foxinmy.weixin4j.util.Consts; 4 | import com.foxinmy.weixin4j.util.NameValue; 5 | import com.foxinmy.weixin4j.util.URLEncodingUtil; 6 | 7 | /** 8 | * 键值对参数 9 | * 10 | * @className UrlParameter 11 | * @author jinyu(foxinmy@gmail.com) 12 | * @date 2015年5月29日 13 | * @since JDK 1.6 14 | * @see 15 | */ 16 | public class URLParameter extends NameValue { 17 | 18 | private static final long serialVersionUID = -115491642760990655L; 19 | 20 | public URLParameter(String name, String value) { 21 | super(name, value); 22 | } 23 | 24 | public String encoding() { 25 | return String.format("%s=%s", 26 | URLEncodingUtil.encoding(getName(), Consts.UTF_8, true), 27 | URLEncodingUtil.encoding(getValue(), Consts.UTF_8, true)); 28 | } 29 | 30 | @Override 31 | public String toString() { 32 | return String.format("[URLParameter name=%s, value=%s]", getName(), 33 | getValue()); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/http/entity/HttpEntity.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.http.entity; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.io.OutputStream; 6 | 7 | import com.foxinmy.weixin4j.http.ContentType; 8 | 9 | public interface HttpEntity { 10 | 11 | ContentType getContentType(); 12 | 13 | long getContentLength(); 14 | 15 | InputStream getContent() throws IOException; 16 | 17 | void writeTo(OutputStream outstream) throws IOException; 18 | } 19 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/http/factory/SimpleHttpClientFactory.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.http.factory; 2 | 3 | import com.foxinmy.weixin4j.http.HttpClient; 4 | import com.foxinmy.weixin4j.http.HttpParams; 5 | import com.foxinmy.weixin4j.http.SimpleHttpClient; 6 | 7 | /** 8 | * HttpURLConnection的简单实现 9 | * 10 | * @className SimpleHttpClientFactory 11 | * @author jinyu(foxinmy@gmail.com) 12 | * @date 2015年8月12日 13 | * @since JDK 1.6 14 | * @see com.foxinmy.weixin4j.http.SimpleHttpClient 15 | */ 16 | public class SimpleHttpClientFactory extends HttpClientFactory { 17 | 18 | @Override 19 | public HttpClient newInstance(HttpParams params) { 20 | return new SimpleHttpClient(params); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/http/support/okhttp/OkHttpClientFactory.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.http.support.okhttp; 2 | 3 | import com.foxinmy.weixin4j.http.HttpClient; 4 | import com.foxinmy.weixin4j.http.HttpParams; 5 | import com.foxinmy.weixin4j.http.factory.HttpClientFactory; 6 | 7 | /** 8 | * 使用OkHttp 9 | * 10 | * @className OkHttpClientFactory 11 | * @author jinyu(foxinmy@gmail.com) 12 | * @date 2016年7月25日 13 | * @since JDK 1.6 14 | */ 15 | public class OkHttpClientFactory extends HttpClientFactory { 16 | private static HttpClientFactory okHttpClientFactory; 17 | static { 18 | try { 19 | okHttpClientFactory = new OkHttpClient3Factory(); 20 | } catch (Throwable e1) { 21 | try { 22 | okHttpClientFactory = new OkHttpClient2Factory(); 23 | } catch (Throwable e2) { 24 | throw new RuntimeException(e2); 25 | } 26 | } 27 | } 28 | 29 | @Override 30 | public HttpClient newInstance(HttpParams params) { 31 | return okHttpClientFactory.newInstance(params); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/model/WeixinAccount.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.model; 2 | 3 | import java.io.Serializable; 4 | 5 | import com.alibaba.fastjson.annotation.JSONCreator; 6 | import com.alibaba.fastjson.annotation.JSONField; 7 | 8 | /** 9 | * 微信账号信息 10 | * 11 | * @className WeixinAccount 12 | * @author jinyu(foxinmy@gmail.com) 13 | * @date 2014年11月18日 14 | * @since JDK 1.6 15 | * @see 16 | */ 17 | public class WeixinAccount implements Serializable { 18 | 19 | private static final long serialVersionUID = -6001008896414323534L; 20 | 21 | /** 22 | * 唯一的身份标识 23 | */ 24 | private final String id; 25 | /** 26 | * 调用接口的密钥 27 | */ 28 | private final String secret; 29 | 30 | @JSONCreator 31 | public WeixinAccount(@JSONField(name = "id") String id, 32 | @JSONField(name = "secret") String secret) { 33 | this.id = id; 34 | this.secret = secret; 35 | } 36 | 37 | public String getId() { 38 | return id; 39 | } 40 | 41 | public String getSecret() { 42 | return secret; 43 | } 44 | 45 | @Override 46 | public String toString() { 47 | return "id=" + id + ", secret=" + secret; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/model/card/GiftCardOrder.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.model.card; 2 | 3 | /** 4 | * 礼品卡销售订单信息 5 | * 6 | * @author kit (kit.li@qq.com) 7 | */ 8 | public class GiftCardOrder { 9 | private String orderId; 10 | private String pageId; 11 | } 12 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/model/card/GiftCoupon.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.model.card; 2 | 3 | import com.alibaba.fastjson.annotation.JSONField; 4 | import com.foxinmy.weixin4j.type.card.CardType; 5 | 6 | /** 7 | * 兑换券 8 | * 9 | * @className GifCoupon 10 | * @author jinyu(foxinmy@gmail.com) 11 | * @date 2016年8月4日 12 | * @since JDK 1.6 13 | */ 14 | public class GiftCoupon extends CardCoupon { 15 | /** 16 | * 兑换说明 17 | */ 18 | @JSONField(name = "gift") 19 | private final String explain; 20 | 21 | /** 22 | * 构造兑换券 23 | * 24 | * @param couponBaseInfo 25 | * 基础信息 26 | * @param explain 27 | * 兑换说明 如:可兑换音乐木盒一个。 28 | */ 29 | public GiftCoupon(CouponBaseInfo couponBaseInfo, String explain) { 30 | super(couponBaseInfo); 31 | this.explain = explain; 32 | } 33 | 34 | public String getExplain() { 35 | return explain; 36 | } 37 | 38 | @JSONField(serialize = false) 39 | @Override 40 | public CardType getCardType() { 41 | return CardType.GIFT; 42 | } 43 | 44 | @Override 45 | public String toString() { 46 | return "GiftCoupon [explain=" + explain + ", " + super.toString() + "]"; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/payment/mch/AbstractPayRequest.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.payment.mch; 2 | 3 | import com.foxinmy.weixin4j.model.WeixinPayAccount; 4 | import com.foxinmy.weixin4j.sign.WeixinPaymentSignature; 5 | import com.foxinmy.weixin4j.sign.WeixinSignature; 6 | 7 | @Deprecated 8 | public abstract class AbstractPayRequest implements MchPayRequest { 9 | 10 | private final String prePayId; 11 | private final WeixinPayAccount paymentAccount; 12 | protected final WeixinSignature weixinSignature; 13 | 14 | public AbstractPayRequest(String prePayId, WeixinPayAccount paymentAccount) { 15 | this.prePayId = prePayId; 16 | this.paymentAccount = paymentAccount; 17 | this.weixinSignature = new WeixinPaymentSignature(paymentAccount.getPaySignKey()); 18 | } 19 | 20 | @Override 21 | public String getPrePayId() { 22 | return this.prePayId; 23 | } 24 | 25 | @Override 26 | public WeixinPayAccount getPaymentAccount() { 27 | return this.paymentAccount; 28 | } 29 | } -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/sign/AbstractWeixinSignature.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.sign; 2 | 3 | import com.foxinmy.weixin4j.util.MapUtil; 4 | 5 | /** 6 | * 微信签名 7 | * 8 | * @className AbstractWeixinSignature 9 | * @author jinyu(foxinmy@gmail.com) 10 | * @date 2016年3月26日 11 | * @since JDK 1.6 12 | * @see 13 | * @deprecated 迁移到子模块weixin4j-pay 14 | */ 15 | @Deprecated 16 | public abstract class AbstractWeixinSignature implements WeixinSignature { 17 | /** 18 | * 是否编码 19 | * 20 | * @return 默认false不进行编码 21 | */ 22 | @Override 23 | public boolean encoder() { 24 | return false; 25 | } 26 | 27 | /** 28 | * 是否转换小写 29 | * 30 | * @return 默认false不转换小写 31 | */ 32 | @Override 33 | public boolean lowerCase() { 34 | return false; 35 | } 36 | 37 | /** 38 | * 拼接字符串 39 | * 40 | * @param obj 41 | * @return 42 | */ 43 | protected StringBuilder join(Object obj) { 44 | return new StringBuilder(MapUtil.toJoinString(obj, encoder(), 45 | lowerCase())); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/sign/WeixinPaymentSignature.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.sign; 2 | 3 | import com.foxinmy.weixin4j.type.SignType; 4 | import com.foxinmy.weixin4j.util.DigestUtil; 5 | 6 | /** 7 | * 微信支付签名实现 8 | * 9 | * @className WeixinPaymentSignature 10 | * @author jinyu(foxinmy@gmail.com) 11 | * @date 2016年3月26日 12 | * @since JDK 1.6 13 | * @see 支付签名说明 15 | * @deprecated 迁移到子模块weixin4j-pay 16 | */ 17 | @Deprecated 18 | public class WeixinPaymentSignature extends AbstractWeixinSignature { 19 | /** 20 | * 支付密钥 21 | */ 22 | private final String paySignKey; 23 | 24 | public WeixinPaymentSignature(String paySignKey) { 25 | this.paySignKey = paySignKey; 26 | } 27 | 28 | @Override 29 | public SignType getSignType() { 30 | return SignType.MD5; 31 | } 32 | 33 | @Override 34 | public String sign(Object obj) { 35 | StringBuilder sb = join(obj).append("&key=").append(paySignKey); 36 | return DigestUtil.MD5(sb.toString()).toUpperCase(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/sign/WeixinSignature.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.sign; 2 | 3 | import com.foxinmy.weixin4j.type.SignType; 4 | 5 | /** 6 | * 微信签名 7 | * 8 | * @className WeixinSignature 9 | * @author jinyu(foxinmy@gmail.com) 10 | * @date 2016年3月26日 11 | * @since JDK 1.6 12 | * @see 13 | * @deprecated 迁移到子模块weixin4j-pay 14 | */ 15 | @Deprecated 16 | public interface WeixinSignature { 17 | /** 18 | * 是否编码 19 | * 20 | * @return 21 | */ 22 | public boolean encoder(); 23 | 24 | /** 25 | * 是否转换小写 26 | * 27 | * @return 28 | */ 29 | public boolean lowerCase(); 30 | 31 | /** 32 | * 签名类型 33 | * 34 | * @return 35 | */ 36 | public SignType getSignType(); 37 | 38 | /** 39 | * 签名 40 | * 41 | * @param obj 42 | * @return 43 | */ 44 | public String sign(Object obj); 45 | } 46 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/token/PerTicketManager.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.token; 2 | 3 | import com.foxinmy.weixin4j.cache.CacheStorager; 4 | import com.foxinmy.weixin4j.model.Token; 5 | 6 | /** 7 | * 第三方应用永久授权码的存取 8 | * 9 | * @className PerTicketManager 10 | * @author jinyu(foxinmy@gmail.com) 11 | * @date 2015年6月22日 12 | * @since JDK 1.6 13 | */ 14 | public class PerTicketManager extends TicketManager { 15 | 16 | private final String authAppId; 17 | 18 | public PerTicketManager(String authAppId, String thirdId, 19 | String thirdSecret, CacheStorager cacheStorager) { 20 | super(thirdId, thirdSecret, cacheStorager); 21 | this.authAppId = authAppId; 22 | } 23 | 24 | /** 25 | * 获取永久授权码的key 26 | * 27 | * @return 28 | */ 29 | @Override 30 | public String getCacheKey() { 31 | return String.format("%sthird_party_percode_ticket_%s_%s", 32 | TokenCreator.CACHEKEY_PREFIX, getThirdId(), authAppId); 33 | } 34 | 35 | public String getAuthAppId() { 36 | return authAppId; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/tuple/ChatTuple.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.tuple; 2 | 3 | /** 4 | * 企业号会话消息元件 5 | * 6 | * @className ChatTuple 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2015年8月1日 9 | * @since JDK 1.6 10 | * @see com.foxinmy.weixin4j.tuple.Text 11 | * @see com.foxinmy.weixin4j.tuple.Image 12 | * @see com.foxinmy.weixin4j.tuple.File 13 | */ 14 | public interface ChatTuple extends Tuple { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/tuple/MassTuple.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.tuple; 2 | 3 | 4 | /** 5 | * 群发消息元件 6 | * 7 | * @className MassTuple 8 | * @author jinyu(foxinmy@gmail.com) 9 | * @date 2014年11月22日 10 | * @since JDK 1.6 11 | * @see com.foxinmy.weixin4j.tuple.Text 12 | * @see com.foxinmy.weixin4j.tuple.Image 13 | * @see com.foxinmy.weixin4j.tuple.Voice 14 | * @see com.foxinmy.weixin4j.tuple.MpVideo 15 | * @see com.foxinmy.weixin4j.tuple.MpNews 16 | * @see com.foxinmy.weixin4j.tuple.Card 17 | */ 18 | public interface MassTuple extends Tuple { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/tuple/NotifyTuple.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.tuple; 2 | 3 | /** 4 | * 客服消息元件 5 | * 6 | * @className NotifyTuple 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2014年11月22日 9 | * @since JDK 1.6 10 | * @see com.foxinmy.weixin4j.tuple.Text 11 | * @see com.foxinmy.weixin4j.tuple.Image 12 | * @see com.foxinmy.weixin4j.tuple.Voice 13 | * @see com.foxinmy.weixin4j.tuple.Video 14 | * @see com.foxinmy.weixin4j.tuple.Music 15 | * @see com.foxinmy.weixin4j.tuple.File 16 | * @see com.foxinmy.weixin4j.tuple.News 17 | * @see com.foxinmy.weixin4j.tuple.MpNews 18 | */ 19 | public interface NotifyTuple extends Tuple { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/tuple/README.md: -------------------------------------------------------------------------------- 1 | 不同的消息类型中的消息对象 2 | 3 | [被动消息](http://mp.weixin.qq.com/wiki/14/89b871b5466b19b3efa4ada8e577d45e.html) 4 | 5 | [客服消息](http://mp.weixin.qq.com/wiki/1/70a29afed17f56d537c833f89be979c9.html#.E5.AE.A2.E6.9C.8D.E6.8E.A5.E5.8F.A3-.E5.8F.91.E6.B6.88.E6.81.AF) 6 | 7 | [群发消息](http://mp.weixin.qq.com/wiki/15/5380a4e6f02f2ffdc7981a8ed7a40753.html) 8 | 9 | [模板消息](http://mp.weixin.qq.com/wiki/17/304c1885ea66dbedf7dc170d84999a9d.html) -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/tuple/Text.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.tuple; 2 | 3 | import com.alibaba.fastjson.annotation.JSONCreator; 4 | import com.alibaba.fastjson.annotation.JSONField; 5 | 6 | /** 7 | * 文本对象 8 | *

9 | * 可用于「客服消息」「群发消息」及企业号的「聊天消息」 10 | *

11 | * 12 | * @className Text 13 | * @author jinyu(foxinmy@gmail.com) 14 | * @date 2014年9月29日 15 | * @since JDK 1.6 16 | * @see 17 | */ 18 | public class Text implements MassTuple, NotifyTuple, ChatTuple { 19 | 20 | private static final long serialVersionUID = 520050144519064503L; 21 | 22 | @Override 23 | public String getMessageType() { 24 | return "text"; 25 | } 26 | 27 | /** 28 | * 内容 29 | */ 30 | private String content; 31 | 32 | @JSONCreator 33 | public Text(@JSONField(name = "content") String content) { 34 | this.content = content; 35 | } 36 | 37 | public String getContent() { 38 | return content; 39 | } 40 | 41 | @Override 42 | public String toString() { 43 | return "Text [content=" + content + "]"; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/tuple/Tuple.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.tuple; 2 | 3 | import java.io.Serializable; 4 | 5 | import javax.xml.bind.annotation.XmlTransient; 6 | 7 | /** 8 | * 消息元件 9 | * 10 | * @className Tuple 11 | * @author jinyu(foxinmy@gmail.com) 12 | * @date 2015年4月19日 13 | * @since JDK 1.6 14 | * @see 15 | */ 16 | public interface Tuple extends Serializable { 17 | 18 | /** 19 | * 消息类型 20 | * 21 | * @return 22 | */ 23 | @XmlTransient 24 | public String getMessageType(); 25 | } 26 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/tuple/Voice.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.tuple; 2 | 3 | import com.alibaba.fastjson.annotation.JSONCreator; 4 | import com.alibaba.fastjson.annotation.JSONField; 5 | 6 | /** 7 | * 语音对象 8 | *

9 | * 可用于「客服消息」「群发消息」 10 | *

11 | * 12 | * @className Voice 13 | * @author jinyu(foxinmy@gmail.com) 14 | * @date 2014年9月29日 15 | * @since JDK 1.6 16 | * @see 17 | */ 18 | public class Voice extends Image implements NotifyTuple { 19 | 20 | private static final long serialVersionUID = 8853054484809101524L; 21 | 22 | @Override 23 | public String getMessageType() { 24 | return "voice"; 25 | } 26 | 27 | @JSONCreator 28 | public Voice(@JSONField(name = "mediaId") String mediaId) { 29 | super(mediaId); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/CredentialType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type; 2 | 3 | /** 4 | * 证件类型 5 | * 6 | * @className CredentialType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2016年3月27日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum CredentialType { 15 | IDCARD("身份证"); 16 | CredentialType(String name) { 17 | this.name = name; 18 | } 19 | 20 | private String name; 21 | 22 | public String getName() { 23 | return this.name; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/CurrencyType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type; 2 | 3 | /** 4 | * 币种 5 | * 6 | * @className CurrencyType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2014年11月2日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum CurrencyType { 15 | CNY("人民币"), HKD("港元"), TWD("台币"), EUR("欧元"), USD("美元"), GBP("英镑"), JPY("日元"), CAD( 16 | "加拿大元"), AUD("澳大利亚元"), NZD("新西兰元"), KRW("韩元"), THB("泰铢"); 17 | 18 | private String desc; 19 | 20 | CurrencyType(String desc) { 21 | this.desc = desc; 22 | } 23 | 24 | public String getDesc() { 25 | return desc; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/CustomsCity.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type; 2 | 3 | /** 4 | * 海关 5 | * 6 | * @className CustomsCity 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2016年3月27日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum CustomsCity { 15 | NO("无需上报海关"), GUANGZHOU("广州"), HANGZHOU("杭州"), NINGBO("宁波"), ZHENGZHOU_BS( 16 | "郑州(保税物流中心)"), CHONGQING("重庆"), XIAN("西安"), SHANGHAI("上海"), ZHENGZHOU_ZH( 17 | "郑州(综保区)"); 18 | 19 | private String name; 20 | 21 | CustomsCity(String name) { 22 | this.name = name; 23 | } 24 | 25 | public String getName() { 26 | return this.name; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/CustomsSatus.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type; 2 | 3 | /** 4 | * 报关状态 5 | * 6 | * @className CustomsSatus 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2016年3月27日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum CustomsSatus { 15 | UNDECLARED("未申报"), SUBMITTED("申报已提交"), PROCESSING("申报中"), SUCCESS("申报成功"), FAIL( 16 | "申报失败"), EXCEPT("海关接口异常"); 17 | private String sate; 18 | 19 | CustomsSatus(String sate) { 20 | this.sate = sate; 21 | } 22 | 23 | public String getSate() { 24 | return this.sate; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/Gender.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type; 2 | 3 | /** 4 | * 用户性别 5 | * 6 | * @className Gender 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2014年11月5日 9 | * @since JDK 1.6 10 | * @see 11 | */ 12 | public enum Gender { 13 | /** 14 | * 男 15 | */ 16 | male, 17 | /** 18 | * 女 19 | */ 20 | female, 21 | /** 22 | * 未知 23 | */ 24 | unknown; 25 | } 26 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/IdQuery.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * ID查询 7 | * 8 | * @className IdQuery 9 | * @author jinyu(foxinmy@gmail.com) 10 | * @date 2014年11月1日 11 | * @since JDK 1.6 12 | * @see 13 | * @deprecated 迁移到子模块weixin4j-pay 14 | */ 15 | @Deprecated 16 | public class IdQuery implements Serializable { 17 | 18 | private static final long serialVersionUID = -5273675987521807370L; 19 | /** 20 | * id值 21 | */ 22 | private String id; 23 | /** 24 | * id类型 25 | * 26 | * @see com.foxinmy.weixin4j.type.IdType 27 | */ 28 | private IdType type; 29 | 30 | public IdQuery(String id, IdType idType) { 31 | this.id = id; 32 | this.type = idType; 33 | } 34 | 35 | public String getId() { 36 | return id; 37 | } 38 | 39 | public IdType getType() { 40 | return type; 41 | } 42 | 43 | @Override 44 | public String toString() { 45 | return String.format("%s=%s", type.getName(), id); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/IdType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type; 2 | 3 | /** 4 | * ID类型 5 | * 6 | * @className IdType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2014年11月1日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum IdType { 15 | /** 16 | * 微信退款单号 17 | */ 18 | REFUNDID("refund_id"), 19 | /** 20 | * 微信订单号 21 | */ 22 | TRANSACTIONID("transaction_id"), 23 | /** 24 | * 商户订单号 25 | */ 26 | TRADENO("out_trade_no"), 27 | /** 28 | * 商户退款号 29 | */ 30 | REFUNDNO("out_refund_no"), 31 | /** 32 | * 商户子订单号 33 | */ 34 | SUBORDERNO("sub_order_no"), 35 | /** 36 | * 微信子订单号 37 | */ 38 | SUBORDERID("sub_order_id"); 39 | private String name; 40 | 41 | IdType(String name) { 42 | this.name = name; 43 | } 44 | 45 | public String getName() { 46 | return name; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/QRType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type; 2 | 3 | /** 4 | * 二维码类型 5 | * 6 | * @className QRType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2014年11月4日 9 | * @since JDK 1.6 10 | * @see 11 | */ 12 | public enum QRType { 13 | /** 14 | * 临时二维码 15 | */ 16 | QR_SCENE, 17 | /** 18 | * 永久二维码(场景值为数字范围在1-100000之间) 19 | */ 20 | QR_LIMIT_SCENE, 21 | /** 22 | * 永久二维码(场景值为字符串长度在1-64之间) 23 | */ 24 | QR_LIMIT_STR_SCENE, 25 | /** 26 | * 卡券二维码:单个卡券 27 | */ 28 | QR_CARD, 29 | /** 30 | * 临时的字符串参数值 31 | */ 32 | QR_STR_SCENE, 33 | /** 34 | * 卡券二维码:多个卡券 35 | */ 36 | QR_MULTIPLE_CARD; 37 | } 38 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/SignType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type; 2 | 3 | /** 4 | * 签名类型 5 | * 6 | * @className SignType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2014年11月5日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum SignType { 15 | SHA1, MD5, HMAC$SHA256 16 | } 17 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/TarType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type; 2 | 3 | /** 4 | * 压缩类型 5 | * 6 | * @className TarType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2016年12月21日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum TarType { 15 | GZIP 16 | } 17 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/TicketType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type; 2 | 3 | /** 4 | * 票据类型(一般用于JSSDK 5 | * 6 | * @className TicketType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2015年12月25日 9 | * @since JDK 1.7 10 | * @see 11 | */ 12 | public enum TicketType { 13 | /** 14 | * jsapi 15 | */ 16 | jsapi, 17 | /** 18 | * 公众平台-卡券 19 | */ 20 | wx_card, 21 | /** 22 | * 企业号-选取联系人 23 | */ 24 | contact; 25 | } 26 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/TradeState.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type; 2 | 3 | /** 4 | * 交易状态 5 | * 6 | * @className TradeState 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2014年11月2日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum TradeState { 15 | /** 16 | * 支付成功 17 | */ 18 | SUCCESS, 19 | /** 20 | * 转入退款 21 | */ 22 | REFUND, 23 | /** 24 | * 未支付 25 | */ 26 | NOTPAY, 27 | /** 28 | * 已关闭 29 | */ 30 | CLOSED, 31 | /** 32 | * 已撤销 33 | */ 34 | REVOKED, 35 | /** 36 | * 用户支付中 37 | */ 38 | USERPAYING, 39 | /** 40 | * 未支付(输入密码或 确认支付超时) 41 | */ 42 | NOPAY, 43 | /** 44 | * 支付失败(其他 原因,如银行返回失败) 45 | */ 46 | PAYERROR; 47 | } 48 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/TradeType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type; 2 | 3 | /** 4 | * 微信支付类型 5 | * 6 | * @className TradeType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2014年10月21日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到weixin4j-pay子模块 12 | */ 13 | @Deprecated 14 | public enum TradeType { 15 | /** 16 | * JS支付 17 | */ 18 | JSAPI, 19 | /** 20 | * 刷卡支付 21 | */ 22 | MICROPAY, 23 | /** 24 | * 扫码支付 25 | */ 26 | NATIVE, 27 | /** 28 | * APP支付 29 | */ 30 | APP, 31 | /** 32 | * WAP支付 33 | */ 34 | MWEB; 35 | } 36 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/Week.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type; 2 | 3 | /** 4 | * 星期 5 | * 6 | * @className Week 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2016年8月5日 9 | * @since JDK 1.6 10 | */ 11 | public enum Week { 12 | MONDAY("周一"), TUESDAY("周二"), WEDNESDAY("周三"), THURSDAY("周四"), FRIDAY("周五"), SATURDAY( 13 | "周六"), SUNDAY("周日"); 14 | private String desc; 15 | 16 | Week(String desc) { 17 | this.desc = desc; 18 | } 19 | 20 | public String getDesc() { 21 | return desc; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/card/ActivateFormFieldType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.card; 2 | 3 | /** 4 | * 激活form表单字段类型 5 | * 6 | * @auther: Feng Yapeng 7 | * @since: 2016/12/20 15:34 8 | */ 9 | public enum ActivateFormFieldType { 10 | 11 | FORM_FIELD_RADIO,/*自定义单选 */ 12 | 13 | FORM_FIELD_SELECT,/*自定义选择项 */ 14 | 15 | FORM_FIELD_CHECK_BOX,/*自定义多选*/; 16 | } 17 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/card/CardCodeType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.card; 2 | 3 | /** 4 | * 卡券码型 5 | * 6 | * @className CardCodeType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2016年8月4日 9 | * @since JDK 1.7 10 | */ 11 | public enum CardCodeType { 12 | /** 13 | * 文本 14 | */ 15 | CODE_TYPE_TEXT, 16 | /** 17 | * 一维码 18 | */ 19 | CODE_TYPE_BARCODE, 20 | /** 21 | * 二维码 22 | */ 23 | CODE_TYPE_QRCODE, 24 | /** 25 | * 二维码无code显示 26 | */ 27 | CODE_TYPE_ONLY_QRCODE, 28 | /** 29 | * 一维码无code显示 30 | */ 31 | CODE_TYPE_ONLY_BARCODE, 32 | /** 33 | * 不显示code和条形码类型 34 | */ 35 | CODE_TYPE_NONE; 36 | } 37 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/card/CardStatus.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.card; 2 | 3 | /** 4 | * 会员卡的状态 5 | * 6 | * @auther: Feng Yapeng 7 | * @since: 2016/12/19 11:39 8 | */ 9 | public enum CardStatus { 10 | 11 | /** 12 | * 待审核; 13 | */ 14 | CARD_STATUS_NOT_VERIFY, 15 | 16 | /** 17 | * 审核失败 18 | */ 19 | CARD_STATUS_VERIFY_FAIL, 20 | 21 | /** 22 | * 通过审核 23 | */ 24 | CARD_STATUS_VERIFY_OK, 25 | 26 | /** 27 | * 卡券被商户删除 28 | */ 29 | CARD_STATUS_DELETE, 30 | 31 | /** 32 | * 在公众平台投放过的卡券 33 | */ 34 | CARD_STATUS_DISPATCH; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/card/CardType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.card; 2 | 3 | /** 4 | * 卡券类型 5 | * 6 | * @className CardType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2016年4月4日 9 | * @since JDK 1.6 10 | * @see 11 | */ 12 | public enum CardType { 13 | /** 14 | * 团购券 15 | */ 16 | GROUPON, 17 | /** 18 | * 代金券 19 | */ 20 | CASH, 21 | /** 22 | * 折扣券 23 | */ 24 | DISCOUNT, 25 | /** 26 | * 兑换券 27 | */ 28 | GIFT, 29 | /** 30 | * 优惠券 31 | */ 32 | GENERAL_COUPON, 33 | 34 | /** 35 | * 会员卡 36 | */ 37 | MEMBER_CARD, 38 | 39 | /** 40 | * 通用(礼品)卡 41 | */ 42 | GENERAL_CARD 43 | } 44 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/card/FieldNameType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.card; 2 | 3 | /** 4 | * 会员信息类目半自定义名称 5 | * 6 | * @auther: Feng Yapeng 7 | * @since: 2016/12/15 10:37 8 | */ 9 | public enum FieldNameType { 10 | /** 11 | * 等级 12 | */ 13 | FIELD_NAME_TYPE_LEVEL, 14 | /** 15 | * 优惠券 16 | */ 17 | FIELD_NAME_TYPE_COUPON, 18 | /** 19 | * 印花 20 | */ 21 | FIELD_NAME_TYPE_STAMP, 22 | /** 23 | * 折扣 24 | */ 25 | FIELD_NAME_TYPE_DISCOUNT, 26 | /** 27 | * 成就 28 | */ 29 | FIELD_NAME_TYPE_ACHIEVEMEN, 30 | /** 31 | * 里程 32 | */ 33 | FIELD_NAME_TYPE_MILEAGE, 34 | /** 35 | * 集点 36 | */ 37 | FIELD_NAME_TYPE_SET_POINTS, 38 | /** 39 | * 次数 40 | */ 41 | FIELD_NAME_TYPE_TIMS; 42 | } 43 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/card/SubCardType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.card; 2 | 3 | /** 4 | * 礼品卡类型 5 | * 6 | * @className SubCardType 7 | * @author kit(kit.li@qq.com) 8 | * @date 2018年10月23日 9 | */ 10 | public enum SubCardType { 11 | /** 12 | * 礼品卡 13 | */ 14 | GIFT_CARD, 15 | /** 16 | * 兑换卡 17 | */ 18 | VOUCHER 19 | } 20 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/card/UserCardStatus.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.card; 2 | 3 | /** 4 | * 用户的会员卡状态 5 | * 6 | * @auther: Feng Yapeng 7 | * @since: 2016/12/21 11:42 8 | */ 9 | public enum UserCardStatus { 10 | 11 | NORMAL,//正常 12 | EXPIRE,//已过期 13 | GIFTING,// 转赠中 14 | GIFT_SUCC,// 转赠成功 15 | GIFT_TIMEOUT,// 转赠超时 16 | DELETE,//已删除 17 | UNAVAILABLE,//已失效 18 | ; 19 | } 20 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/mch/BillType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.mch; 2 | 3 | /** 4 | * 对账单类型 5 | * 6 | * @className BillType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2014年10月31日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum BillType { 15 | /** 16 | * 全部 17 | */ 18 | ALL(0), 19 | /** 20 | * 成功订单 21 | */ 22 | SUCCESS(1), 23 | /** 24 | * 退款订单 25 | */ 26 | REFUND(2); 27 | private int val; 28 | 29 | BillType(int val) { 30 | this.val = val; 31 | } 32 | 33 | public int getVal() { 34 | return val; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/mch/CorpPaymentCheckNameType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.mch; 2 | 3 | /** 4 | * 企业付款检查收款人姓名的策略 5 | * 6 | * @className CorpPaymentCheckNameType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2015年4月1日 9 | * @since JDK 1.6 10 | * @see 11 | */ 12 | @Deprecated 13 | public enum CorpPaymentCheckNameType { 14 | /** 15 | * 不校验真实姓名 16 | */ 17 | NO_CHECK, 18 | /** 19 | * 强校验真实姓名(未实名认证的用户会校验失败,无法转账) 20 | */ 21 | FORCE_CHECK, 22 | /** 23 | * 针对已实名认证的用户才校验真实姓名(未实名认证用户不校验,可以转账成功) 24 | */ 25 | OPTION_CHECK; 26 | } 27 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/mch/CouponStatus.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.mch; 2 | 3 | /** 4 | * 代金券状态 5 | * 6 | * @className CouponStatus 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2015年3月27日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum CouponStatus { 15 | /** 16 | * 已激活 17 | */ 18 | ACTIVATED(2), 19 | /** 20 | * 已锁定 21 | */ 22 | LOCKED(4), 23 | /** 24 | * 已实扣 25 | */ 26 | USED(8); 27 | private int val; 28 | 29 | CouponStatus(int val) { 30 | this.val = val; 31 | } 32 | 33 | public int getVal() { 34 | return val; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/mch/CouponStockStatus.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.mch; 2 | 3 | /** 4 | * 代金券批次状态 5 | * 6 | * @className CouponStockStatus 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2015年3月27日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum CouponStockStatus { 15 | /** 16 | * 未激活 17 | */ 18 | INACTIVE(1), 19 | /** 20 | * 审批中 21 | */ 22 | APPROVAL_PROCESS(2), 23 | /** 24 | * 已激活 25 | */ 26 | ACTIVATED(4), 27 | /** 28 | * 已作废 29 | */ 30 | SUPERSEDED(8), 31 | /** 32 | * 中止发放 33 | */ 34 | SUSPEND(16); 35 | private int val; 36 | 37 | CouponStockStatus(int val) { 38 | this.val = val; 39 | } 40 | 41 | public int getVal() { 42 | return val; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/mch/CouponStockType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.mch; 2 | 3 | /** 4 | * 代金券批次类型 5 | * 6 | * @className CouponStockType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2015年3月27日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum CouponStockType { 15 | /** 16 | * 批量型 17 | */ 18 | BATCH(1), 19 | /** 20 | * 触发型 21 | */ 22 | TRIGGER(2); 23 | private int val; 24 | 25 | CouponStockType(int val) { 26 | this.val = val; 27 | } 28 | 29 | public int getVal() { 30 | return val; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/mch/CouponType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.mch; 2 | 3 | /** 4 | * 代金券类型 5 | * 6 | * @className CouponType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2015年3月27日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum CouponType { 15 | /** 16 | * 使用无门槛 17 | */ 18 | NO_THRESHOLD(1), 19 | /** 20 | * 使用有门槛 21 | */ 22 | HAS_THRESHOLD(2), 23 | /** 24 | * 门槛叠加 25 | */ 26 | THRESHOLD_PLUS(3), 27 | 28 | /** 29 | * 充值代金券 30 | */ 31 | CASH(-1), 32 | /** 33 | * 非充值代金券 34 | */ 35 | NO_CASH(-2); 36 | private int val; 37 | 38 | CouponType(int val) { 39 | this.val = val; 40 | } 41 | 42 | public int getVal() { 43 | return val; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/mch/RedpacketSceneType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.mch; 2 | 3 | /** 4 | * 发放红包使用场景 5 | * 6 | * @className RedpacketSceneType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2017年1月4日 9 | * @since JDK 1.6 10 | * @deprecated 迁移到子模块weixin4j-pay 11 | */ 12 | @Deprecated 13 | public enum RedpacketSceneType { 14 | /** 15 | * 商品促销 16 | */ 17 | PRODUCT_1, 18 | /** 19 | * 抽奖 20 | */ 21 | PRODUCT_2, 22 | /** 23 | * 虚拟物品兑奖 24 | */ 25 | PRODUCT_3, 26 | /** 27 | * 企业内部福利 28 | */ 29 | PRODUCT_4, 30 | /** 31 | * 渠道分润 32 | */ 33 | PRODUCT_5, 34 | /** 35 | * 保险回馈 36 | */ 37 | PRODUCT_6, 38 | /** 39 | * 彩票派奖 40 | */ 41 | PRODUCT_7, 42 | /** 43 | * 税务刮奖 44 | */ 45 | PRODUCT_8 46 | } 47 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/mch/RedpacketSendType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.mch; 2 | 3 | /** 4 | * 红包发放类型 5 | * 6 | * @className RedpacketSendType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2015年6月4日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum RedpacketSendType { 15 | /** 16 | * 通过API接口发放 17 | */ 18 | API, 19 | /** 20 | * 通过上传文件方式发放 21 | */ 22 | UPLOAD, 23 | /** 24 | * 通过活动方式发放 25 | */ 26 | ACTIVITY; 27 | } 28 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/mch/RedpacketStatus.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.mch; 2 | 3 | /** 4 | * 红包状态 5 | * @className RedpacketStatus 6 | * @author jinyu(foxinmy@gmail.com) 7 | * @date 2015年6月4日 8 | * @since JDK 1.6 9 | * @see 10 | * @deprecated 迁移到子模块weixin4j-pay 11 | */ 12 | @Deprecated 13 | public enum RedpacketStatus { 14 | /** 15 | * 发放中 16 | */ 17 | SENDING, 18 | /** 19 | * 已发放待领取 20 | */ 21 | SENT, 22 | /** 23 | * 发放失败 24 | */ 25 | FAILED, 26 | /** 27 | * 已领取 28 | */ 29 | RECEIVED, 30 | /** 31 | * 已退款 32 | */ 33 | REFUND; 34 | } 35 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/mch/RedpacketType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.mch; 2 | 3 | /** 4 | * 红包类型 5 | * 6 | * @className RedpacketType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2015年6月4日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum RedpacketType { 15 | /** 16 | * 裂变红包 17 | */ 18 | GROUP, 19 | /** 20 | * 普通红包 21 | */ 22 | NORMAL; 23 | } 24 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/mch/RefundAccountType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.mch; 2 | 3 | /** 4 | * 退款资金来源 5 | * @className RefundAccountType 6 | * @author jinyu(foxinmy@gmail.com) 7 | * @date 2016年12月12日 8 | * @deprecated 迁移到子模块weixin4j-pay 9 | */ 10 | @Deprecated 11 | public enum RefundAccountType { 12 | /** 13 | * ---未结算资金退款(默认使用未结算资金退款) 14 | */ 15 | REFUND_SOURCE_UNSETTLED_FUNDS, 16 | /** 17 | * ---可用余额退款 18 | */ 19 | REFUND_SOURCE_RECHARGE_FUNDS 20 | } 21 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/mch/RefundChannel.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.mch; 2 | 3 | /** 4 | * 退款渠道 5 | * 6 | * @className RefundChannel 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2014年11月6日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum RefundChannel { 15 | /** 16 | * 原路退款 17 | */ 18 | ORIGINAL, 19 | /** 20 | * 退回到余额 21 | */ 22 | BALANCE, 23 | /** 24 | * 财付通 25 | */ 26 | TENPAY, 27 | /** 28 | * 银行 29 | */ 30 | BANK, 31 | /** 32 | * 原账户异常退到其他余额账户 33 | */ 34 | OTHER_BALANCE, 35 | /** 36 | * 原银行卡异常退到其他银行卡 37 | */ 38 | OTHER_BANKCARD 39 | } 40 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/mch/RefundStatus.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.mch; 2 | 3 | /** 4 | * 退款状态 5 | * 6 | * @className RefundStatus 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2014年11月2日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum RefundStatus { 15 | /** 16 | * 退款成功 17 | */ 18 | SUCCESS, 19 | /** 20 | * 退款失败 21 | */ 22 | FAIL, 23 | /** 24 | * 退款处理中 25 | */ 26 | PROCESSING, 27 | /** 28 | * 未确定,需要商户 原退款单号重新发起 29 | */ 30 | NOTSURE, 31 | /** 32 | * 转入代发,退款到银行发现用户的卡作废或者冻结了,导致原路退款银行卡失败,资金回流到商户的现金帐号,需要商户人工干预,通过线下或者财付通转 33 | * 账的方式进行退款。 34 | */ 35 | CHANGE; 36 | } 37 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/type/mch/RefundType.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.type.mch; 2 | 3 | /** 4 | * 退款类型 5 | * 6 | * @className RefundType 7 | * @author jinyu(foxinmy@gmail.com) 8 | * @date 2014年12月31日 9 | * @since JDK 1.6 10 | * @see 11 | * @deprecated 迁移到子模块weixin4j-pay 12 | */ 13 | @Deprecated 14 | public enum RefundType { 15 | /** 16 | * 1:商户号余额退款; 17 | */ 18 | BALANCE(1), 19 | /** 20 | * 2:现金帐号 退款; 21 | */ 22 | CASH(2), 23 | /** 24 | * 3:优先商户号退款,若商户号余额不足, 再做现金帐号退款。 使用 2 或 3 时,需联系财 付通开通此功能 25 | */ 26 | BOTH(3); 27 | 28 | private int val; 29 | 30 | RefundType(int val) { 31 | this.val = val; 32 | } 33 | 34 | public int getVal() { 35 | return val; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/util/NameValue.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.util; 2 | 3 | import java.io.Serializable; 4 | 5 | import com.alibaba.fastjson.annotation.JSONCreator; 6 | import com.alibaba.fastjson.annotation.JSONField; 7 | 8 | /** 9 | * name-value 10 | * 11 | * @className NameValue 12 | * @author jinyu(foxinmy@gmail.com) 13 | * @date 2015年3月29日 14 | * @since JDK 1.6 15 | * @see 16 | */ 17 | public class NameValue implements Serializable { 18 | 19 | private static final long serialVersionUID = -348620146718819093L; 20 | private String name; 21 | private String value; 22 | 23 | @JSONCreator 24 | public NameValue(@JSONField(name = "name") String name, 25 | @JSONField(name = "value") String value) { 26 | this.name = name; 27 | this.value = value; 28 | } 29 | 30 | public String getName() { 31 | return name; 32 | } 33 | 34 | public String getValue() { 35 | return value; 36 | } 37 | 38 | @Override 39 | public String toString() { 40 | return "NameValue [name=" + name + ", value=" + value + "]"; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/util/RegexUtil.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.util; 2 | 3 | import java.util.regex.Matcher; 4 | import java.util.regex.Pattern; 5 | 6 | /** 7 | * 正则表达式工具类 8 | * 9 | * @className RegexUtil 10 | * @author jinyu(foxinmy@gmail.com) 11 | * @date 2015年12月8日 12 | * @since JDK 1.7 13 | * @see 14 | */ 15 | public final class RegexUtil { 16 | /** 17 | * Content-disposition 中的 filename提取正则 18 | */ 19 | private static final Pattern FILENAME_RGX = Pattern 20 | .compile("(?<=filename=\").*?(?=\")"); 21 | 22 | /** 23 | * 从 Content-disposition提取文件名 24 | * 25 | * @param contentDisposition 26 | * @return 27 | */ 28 | public static String regexFileNameFromContentDispositionHeader( 29 | String contentDisposition) { 30 | if (StringUtil.isBlank(contentDisposition)) { 31 | return null; 32 | } 33 | Matcher filenameMatcher = FILENAME_RGX.matcher(contentDisposition); 34 | return filenameMatcher.find() ? filenameMatcher.group() : null; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/xml/ListWrapper.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.xml; 2 | 3 | import java.io.Serializable; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import javax.xml.bind.annotation.XmlAnyElement; 8 | 9 | public class ListWrapper implements Serializable { 10 | 11 | private static final long serialVersionUID = 7550802632983954221L; 12 | 13 | private List items; 14 | 15 | public ListWrapper() { 16 | items = new ArrayList(); 17 | } 18 | 19 | @XmlAnyElement(lax = true) 20 | public List getItems() { 21 | return items; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/java/com/foxinmy/weixin4j/xml/ListsuffixResult.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.xml; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * 对$n结尾的节点注解 10 | * 11 | * @className ListsuffixResult 12 | * @author jinyu(foxinmy@gmail.com) 13 | * @date 2015年6月15日 14 | * @since JDK 1.6 15 | * @see 16 | */ 17 | @Target(ElementType.FIELD) 18 | @Retention(RetentionPolicy.RUNTIME) 19 | public @interface ListsuffixResult { 20 | String[] value() default { "(_\\d)$" }; 21 | } 22 | -------------------------------------------------------------------------------- /weixin4j-base/src/main/resources/com/foxinmy/weixin4j/weixin4j.properties: -------------------------------------------------------------------------------- 1 | weixin4j.name=weixin4j 2 | weixin4j.version=${project.version} 3 | -------------------------------------------------------------------------------- /weixin4j-base/src/test/java/com/foxinmy/weixin4j/api/MchApiTest.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.api; 2 | 3 | import static org.junit.Assert.assertNotNull; 4 | 5 | import org.junit.Test; 6 | 7 | import com.foxinmy.weixin4j.model.WeixinPayAccount; 8 | 9 | public class MchApiTest { 10 | 11 | @Test 12 | public void testWeixinBundle() { 13 | MchApi mchApi = new MchApi(new WeixinPayAccount(null, null, null)); 14 | assertNotNull(mchApi.weixinBundle()); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /weixin4j-base/src/test/java/com/foxinmy/weixin4j/base/test/http/Apache3HttpClientTest.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.base.test.http; 2 | 3 | import com.foxinmy.weixin4j.http.factory.HttpClientFactory; 4 | import com.foxinmy.weixin4j.http.support.apache3.HttpComponent3Factory; 5 | 6 | /** 7 | * Apache3 for http test 8 | * 9 | * @className Apache3HttpClientTest 10 | * @author jinyu(foxinmy@gmail.com) 11 | * @date 2016年7月28日 12 | * @since JDK 1.6 13 | */ 14 | public class Apache3HttpClientTest extends HttpClientTest { 15 | 16 | @Override 17 | protected HttpClientFactory createHttpFactory() { 18 | return new HttpComponent3Factory(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /weixin4j-base/src/test/java/com/foxinmy/weixin4j/base/test/http/Apache4_1HttpClientTest.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.base.test.http; 2 | 3 | import com.foxinmy.weixin4j.http.factory.HttpClientFactory; 4 | import com.foxinmy.weixin4j.http.support.apache4.HttpComponent4_1Factory; 5 | 6 | /** 7 | * Apache4 for http test 8 | * @className Apache4HttpClientTest 9 | * @author jinyu(foxinmy@gmail.com) 10 | * @date 2016年7月28日 11 | * @since JDK 1.6 12 | */ 13 | public class Apache4_1HttpClientTest extends HttpClientTest { 14 | 15 | @Override 16 | protected HttpClientFactory createHttpFactory() { 17 | return new HttpComponent4_1Factory(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /weixin4j-base/src/test/java/com/foxinmy/weixin4j/base/test/http/Apache4_2HttpClientTest.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.base.test.http; 2 | 3 | import com.foxinmy.weixin4j.http.factory.HttpClientFactory; 4 | import com.foxinmy.weixin4j.http.support.apache4.HttpComponent4_2Factory; 5 | 6 | /** 7 | * Apache4 for http test 8 | * @className Apache4HttpClientTest 9 | * @author jinyu(foxinmy@gmail.com) 10 | * @date 2016年7月28日 11 | * @since JDK 1.6 12 | */ 13 | public class Apache4_2HttpClientTest extends HttpClientTest { 14 | 15 | @Override 16 | protected HttpClientFactory createHttpFactory() { 17 | return new HttpComponent4_2Factory(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /weixin4j-base/src/test/java/com/foxinmy/weixin4j/base/test/http/NettyHttpClientTest.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.base.test.http; 2 | 3 | import com.foxinmy.weixin4j.http.factory.HttpClientFactory; 4 | import com.foxinmy.weixin4j.http.support.netty.Netty4HttpClientFactory; 5 | 6 | /** 7 | * Netty for http test 8 | * @className NettyHttpClientTest 9 | * @author jinyu(foxinmy@gmail.com) 10 | * @date 2016年7月28日 11 | * @since JDK 1.6 12 | */ 13 | public class NettyHttpClientTest extends HttpClientTest { 14 | 15 | @Override 16 | protected HttpClientFactory createHttpFactory() { 17 | return new Netty4HttpClientFactory(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /weixin4j-base/src/test/java/com/foxinmy/weixin4j/base/test/http/OkHttp2ClinetTest.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.base.test.http; 2 | 3 | import com.foxinmy.weixin4j.http.factory.HttpClientFactory; 4 | import com.foxinmy.weixin4j.http.support.okhttp.OkHttpClient2Factory; 5 | 6 | /** 7 | * OkHttp for test 8 | * 9 | * @className OkHttpClinetTest 10 | * @author jinyu(foxinmy@gmail.com) 11 | * @date 2016年7月28日 12 | * @since JDK 1.6 13 | */ 14 | public class OkHttp2ClinetTest extends HttpClientTest { 15 | @Override 16 | protected HttpClientFactory createHttpFactory() { 17 | return new OkHttpClient2Factory(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /weixin4j-base/src/test/java/com/foxinmy/weixin4j/base/test/http/OkHttp3ClinetTest.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.base.test.http; 2 | 3 | import com.foxinmy.weixin4j.http.factory.HttpClientFactory; 4 | import com.foxinmy.weixin4j.http.support.okhttp.OkHttpClient3Factory; 5 | 6 | /** 7 | * OkHttp for test 8 | * 9 | * @className OkHttpClinetTest 10 | * @author jinyu(foxinmy@gmail.com) 11 | * @date 2016年7月28日 12 | * @since JDK 1.6 13 | */ 14 | public class OkHttp3ClinetTest extends HttpClientTest { 15 | @Override 16 | protected HttpClientFactory createHttpFactory() { 17 | return new OkHttpClient3Factory(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /weixin4j-base/src/test/java/com/foxinmy/weixin4j/base/test/http/SimpleHttpTest.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.base.test.http; 2 | 3 | import com.foxinmy.weixin4j.http.factory.HttpClientFactory; 4 | import com.foxinmy.weixin4j.http.factory.SimpleHttpClientFactory; 5 | 6 | /** 7 | * SimpleClient for test 8 | * @className SimpleHttpTest 9 | * @author jinyu(foxinmy@gmail.com) 10 | * @date 2016年7月28日 11 | * @since JDK 1.6 12 | */ 13 | public class SimpleHttpTest extends HttpClientTest { 14 | 15 | @Override 16 | protected HttpClientFactory createHttpFactory() { 17 | return new SimpleHttpClientFactory(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /weixin4j-base/src/test/java/com/foxinmy/weixin4j/util/ConstsTest.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.util; 2 | 3 | import static org.junit.Assert.assertEquals; 4 | import static org.junit.Assert.assertFalse; 5 | 6 | import org.junit.Test; 7 | 8 | public class ConstsTest { 9 | 10 | @Test 11 | public void test() { 12 | assertEquals("weixin4j", Consts.WEIXIN4J); 13 | assertFalse(Consts.VERSION.equals("${project.version}")); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /weixin4j-example/.gitignore: -------------------------------------------------------------------------------- 1 | # Mobile Tools for Java (J2ME) 2 | .mtj.tmp/ 3 | 4 | # Package Files # 5 | *.jar 6 | *.war 7 | *.ear 8 | 9 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 10 | hs_err_pid* 11 | 12 | *~ 13 | 14 | # eclipse ignore 15 | *.settings/* 16 | /.project 17 | /.classpath 18 | /.tomcatplugin 19 | 20 | # idea ignore 21 | /.idea 22 | *.iml 23 | 24 | # maven ignore 25 | target/* 26 | 27 | # other ignore 28 | *.log 29 | *.tmp 30 | Thumbs.db 31 | /target/ 32 | .DS_Store 33 | bin 34 | /target/ 35 | /target/ 36 | /target/ 37 | -------------------------------------------------------------------------------- /weixin4j-example/src/main/java/com/foxinmy/weixin4j/example/controller/IndexController.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.example.controller; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Controller; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | 7 | import com.foxinmy.weixin4j.mp.WeixinProxy; 8 | 9 | @Controller 10 | @RequestMapping("") 11 | public class IndexController { 12 | @Autowired 13 | private WeixinProxy weixinProxy; 14 | 15 | @RequestMapping 16 | public String index() { 17 | return "index"; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /weixin4j-example/src/main/java/com/foxinmy/weixin4j/example/server/handler/ChatMessageHandler.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.example.server.handler; 2 | 3 | import java.util.Set; 4 | 5 | import com.foxinmy.weixin4j.handler.WeixinMessageHandler; 6 | import com.foxinmy.weixin4j.qy.chat.WeixinChatMessage; 7 | import com.foxinmy.weixin4j.request.WeixinMessage; 8 | import com.foxinmy.weixin4j.request.WeixinRequest; 9 | import com.foxinmy.weixin4j.response.BlankResponse; 10 | import com.foxinmy.weixin4j.response.WeixinResponse; 11 | 12 | public class ChatMessageHandler implements WeixinMessageHandler { 13 | 14 | @Override 15 | public boolean canHandle(WeixinRequest request, WeixinMessage message, Set nodeNames) { 16 | return nodeNames.contains("PackageId"); 17 | } 18 | 19 | @Override 20 | public WeixinResponse doHandle(WeixinRequest request, WeixinMessage message) { 21 | WeixinChatMessage chatMessage = null; // 转换为实体 22 | return BlankResponse.global; 23 | } 24 | 25 | @Override 26 | public int weight() { 27 | return 0; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /weixin4j-example/src/main/java/com/foxinmy/weixin4j/example/server/handler/SubscribeMessageHandler.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.example.server.handler; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | import com.foxinmy.weixin4j.handler.MessageHandlerAdapter; 6 | import com.foxinmy.weixin4j.mp.event.ScribeEventMessage; 7 | import com.foxinmy.weixin4j.request.WeixinRequest; 8 | import com.foxinmy.weixin4j.response.TextResponse; 9 | import com.foxinmy.weixin4j.response.WeixinResponse; 10 | 11 | /** 12 | * 处理关注消息 13 | * 14 | * @className SubscribeMessageHandler 15 | * @author jinyu(foxinmy@gmail.com) 16 | * @date 2015年12月3日 17 | * @since JDK 1.6 18 | */ 19 | @Component 20 | public class SubscribeMessageHandler extends MessageHandlerAdapter { 21 | 22 | @Override 23 | public WeixinResponse doHandle0(ScribeEventMessage message) { 24 | return new TextResponse("欢迎关注~"); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /weixin4j-example/src/main/java/com/foxinmy/weixin4j/example/server/handler/TextMessageHandler.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.example.server.handler; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | import com.foxinmy.weixin4j.handler.MessageHandlerAdapter; 6 | import com.foxinmy.weixin4j.message.TextMessage; 7 | import com.foxinmy.weixin4j.request.WeixinRequest; 8 | import com.foxinmy.weixin4j.response.TextResponse; 9 | import com.foxinmy.weixin4j.response.WeixinResponse; 10 | 11 | /** 12 | * 文本消息处理 13 | * 14 | * @className TextMessageHandler 15 | * @author jinyu(foxinmy@gmail.com) 16 | * @date 2015年11月18日 17 | * @since JDK 1.6 18 | */ 19 | @Component 20 | public class TextMessageHandler extends MessageHandlerAdapter { 21 | @Override 22 | public WeixinResponse doHandle0(TextMessage message) { 23 | return new TextResponse("收到了文本消息"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /weixin4j-example/src/main/java/com/foxinmy/weixin4j/example/server/handler/VoiceMessageHandler.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.example.server.handler; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | import com.foxinmy.weixin4j.handler.MessageHandlerAdapter; 6 | import com.foxinmy.weixin4j.message.VoiceMessage; 7 | import com.foxinmy.weixin4j.request.WeixinRequest; 8 | import com.foxinmy.weixin4j.response.TextResponse; 9 | import com.foxinmy.weixin4j.response.WeixinResponse; 10 | 11 | /** 12 | * 只处理语音消息 13 | * 14 | * @className VoiceMessageHandler 15 | * @author jinyu(foxinmy@gmail.com) 16 | * @date 2015年11月18日 17 | * @since JDK 1.6 18 | */ 19 | @Component 20 | public class VoiceMessageHandler extends MessageHandlerAdapter { 21 | 22 | @Override 23 | public WeixinResponse doHandle0(VoiceMessage message) { 24 | /** 25 | * 返回一段文字给用户 26 | */ 27 | return new TextResponse("你讲了一句话"); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /weixin4j-example/src/main/resources/spring-bean.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /weixin4j-example/src/main/resources/spring-weixin4j-server.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /weixin4j-example/src/main/script/assembly.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | bin 7 | 8 | zip 9 | 10 | 11 | 12 | 13 | io.netty:netty-all 14 | com.foxinmy:weixin4j-server 15 | com.foxinmy:weixin4j-example 16 | 17 | true 18 | /lib 19 | 20 | 21 | 22 | 23 | src/main/script 24 | / 25 | 26 | *.sh 27 | *.bat 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/WEB-INF/view/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ include file="/WEB-INF/view/taglibs.jsp"%> 4 | 5 | 6 | 7 | 8 | 10 | weixin4j 11 | 12 | 13 | 14 | 15 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/WEB-INF/view/taglibs.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> 4 | 5 | -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.1 经典模块化前端框架@LGPL www.layui.com By 贤心 */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #ddd;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:30px;line-height:30px;border-bottom:1px solid #ddd}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #ddd;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/css/modules/laydate/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/css/modules/laydate/icon.png -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/font/iconfont.eot -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/font/iconfont.woff -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/0.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/1.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/10.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/11.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/12.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/13.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/14.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/15.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/16.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/17.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/18.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/19.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/2.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/20.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/21.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/22.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/23.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/24.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/25.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/26.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/27.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/28.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/29.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/3.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/30.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/31.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/32.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/33.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/34.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/35.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/36.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/37.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/38.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/39.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/4.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/40.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/41.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/42.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/43.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/44.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/45.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/46.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/47.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/48.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/49.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/5.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/50.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/51.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/52.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/53.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/54.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/55.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/56.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/57.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/58.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/59.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/6.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/60.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/61.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/62.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/63.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/64.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/65.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/66.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/67.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/68.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/69.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/7.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/70.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/71.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/8.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxinmy/weixin4j/f1dca9c6b8c7306bf6cca0ea7251830e5d67c8aa/weixin4j-example/src/main/webapp/static/layui/images/face/9.gif -------------------------------------------------------------------------------- /weixin4j-example/src/main/webapp/static/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.1 经典模块化前端框架 LGPL license By www.layui.com */ 2 | ;layui.define("jquery",function(l){"use strict";var o=layui.jquery,i={fixbar:function(l){l=l||{},l.bgcolor=l.bgcolor?"background-color:"+l.bgcolor:"";var i,a,c="layui-fixbar-top",t=[l.bar1===!0?"":l.bar1,l.bar2===!0?"":l.bar2,""],r=o(['
    ',l.bar1?'
  • '+t[0]+"
  • ":"",l.bar2?'
  • '+t[1]+"
  • ":"",'
  • '+t[2]+"
  • ","
"].join("")),e=r.find("."+c),s=function(){var i=o(document).scrollTop();i>=(l.showHeight||200)?a||(e.show(),a=1):a&&(e.hide(),a=0)};o(".layui-fixbar")[0]||("object"==typeof l.css&&r.css(l.css),o("body").append(r),s(),r.find("li").on("click",function(){var i=o(this),a=i.attr("lay-type");"top"===a&&o("html,body").animate({scrollTop:0},200),l.click&&l.click.call(this,a)}),o(document).on("scroll",function(){i&&clearTimeout(i),i=setTimeout(function(){s()},100)}))}};l("util",i)}); -------------------------------------------------------------------------------- /weixin4j-mp/.gitignore: -------------------------------------------------------------------------------- 1 | # Mobile Tools for Java (J2ME) 2 | .mtj.tmp/ 3 | 4 | # Package Files # 5 | *.jar 6 | *.war 7 | *.ear 8 | 9 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 10 | hs_err_pid* 11 | 12 | *~ 13 | 14 | # eclipse ignore 15 | *.settings/* 16 | /.project 17 | /.classpath 18 | /.tomcatplugin 19 | 20 | # idea ignore 21 | /.idea 22 | *.iml 23 | 24 | # maven ignore 25 | target/* 26 | 27 | # other ignore 28 | *.log 29 | *.tmp 30 | Thumbs.db 31 | /target/ 32 | .DS_Store 33 | /target/ 34 | /target/ 35 | -------------------------------------------------------------------------------- /weixin4j-mp/README.md: -------------------------------------------------------------------------------- 1 | weixin4j-mp 2 | =========== 3 | 4 | [微信公众平台](http://mp.weixin.qq.com/wiki)开发工具包 5 | ---------------------------------------------------- 6 | 7 | 功能列表 8 | ------- 9 | 10 | * CustomApi `多客服API` 11 | 12 | * DataApi `数据统计API` 13 | 14 | * GroupApi `分组管理API` 15 | 16 | * HelperApi `辅助API` 17 | 18 | * MassApi `群发消息API` 19 | 20 | * MediaApi `上传/下载媒体文件API` 21 | 22 | * MenuApi `底部菜单API` 23 | 24 | * NotifyApi `客服消息API` 25 | 26 | * OauthApi `oauth授权API` 27 | 28 | * Pay2Api `V2支付API` 29 | 30 | * QrApi `二维码API` 31 | 32 | * TmplApi `模板消息API` 33 | 34 | * UserApi `用户管理API` 35 | 36 | * TagApi `用户标签管理API` 37 | 38 | * ComponentApi `第三方组件API` 39 | 40 | * CardApi `卡券API` 41 | 42 | * CommentApi `评论API` 43 | 44 | [如何使用](https://github.com/foxinmy/weixin4j/wiki) 45 | --------- 46 | 47 | [更新LOG](./CHANGE.md) 48 | ---------------------- -------------------------------------------------------------------------------- /weixin4j-mp/src/main/java/com/foxinmy/weixin4j/mp/api/MpApi.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.mp.api; 2 | 3 | import java.util.ResourceBundle; 4 | 5 | import com.foxinmy.weixin4j.api.BaseApi; 6 | 7 | /** 8 | * 微信公众平台API 9 | * 10 | * @className MpApi 11 | * @author jinyu(foxinmy@gmail.com) 12 | * @date 2014年9月26日 13 | * @since JDK 1.6 14 | * @see com.foxinmy.weixin4j.api.BaseApi 15 | * @see api文档 16 | */ 17 | public class MpApi extends BaseApi { 18 | 19 | private final static ResourceBundle WEIXIN_BUNDLE; 20 | 21 | static { 22 | WEIXIN_BUNDLE = ResourceBundle 23 | .getBundle("com/foxinmy/weixin4j/mp/api/weixin"); 24 | } 25 | 26 | @Override 27 | protected ResourceBundle weixinBundle() { 28 | return WEIXIN_BUNDLE; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /weixin4j-mp/src/main/java/com/foxinmy/weixin4j/mp/api/README.md: -------------------------------------------------------------------------------- 1 | * CustomApi `多客服API` 2 | 3 | * DataApi `数据统计API` 4 | 5 | * GroupApi `分组管理API` 6 | 7 | * HelperApi `辅助API` 8 | 9 | * MassApi `群发消息API` 10 | 11 | * MediaApi `上传/下载媒体文件API` 12 | 13 | * MenuApi `底部菜单API` 14 | 15 | * NotifyApi `客服消息API` 16 | 17 | * OauthApi `oauth授权API` 18 | 19 | * Pay2Api `原V2支付API` 20 | 21 | * QrApi `二维码API` 22 | 23 | * TmplApi `模板消息API` 24 | 25 | * UserApi `用户管理API` 26 | 27 | * TagApi `用户标签管理API` 28 | 29 | * ComponentApi `第三方组件API` 30 | 31 | * CardApi `卡券API` 32 | 33 | * CommentApi `评论API` -------------------------------------------------------------------------------- /weixin4j-mp/src/main/java/com/foxinmy/weixin4j/mp/model/MenuSetting.java: -------------------------------------------------------------------------------- 1 | package com.foxinmy.weixin4j.mp.model; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | 6 | import com.foxinmy.weixin4j.model.Button; 7 | 8 | /** 9 | * 自定义菜单配置 10 | * 11 | * @className MenuSetting 12 | * @author jinyu(foxinmy@gmail.com) 13 | * @date 2015年4月14日 14 | * @since JDK 1.6 15 | * @see 16 | */ 17 | public class MenuSetting implements Serializable { 18 | 19 | private static final long serialVersionUID = 2461505572495855830L; 20 | 21 | /** 22 | * 菜单是否开启 23 | */ 24 | private boolean isMenuOpen; 25 | /** 26 | * 菜单列表 27 | */ 28 | private List