├── README.md ├── coupon_customer_part ├── .gitignore ├── .idea │ ├── caches │ │ ├── build_file_checksums.ser │ │ └── gradle_models.ser │ ├── compiler.xml │ ├── copyright │ │ └── profiles_settings.xml │ ├── encodings.xml │ ├── gradle.xml │ ├── misc.xml │ ├── modules.xml │ ├── runConfigurations.xml │ └── vcs.xml ├── README.md ├── app │ ├── .gitignore │ ├── build.gradle │ ├── libs │ │ ├── BaiduLBS_Android.jar │ │ ├── MobCommons-2016.1201.1839.jar │ │ ├── MobTools-2016.1201.1839.jar │ │ ├── SMSSDK-2.1.3.aar │ │ ├── SMSSDKGUI-2.1.3.aar │ │ ├── achartengine-1.1.0.jar │ │ ├── arm64-v8a │ │ │ ├── libBaiduMapSDK_base_v4_3_0.so │ │ │ └── liblocSDK7a.so │ │ ├── armeabi-v7a │ │ │ ├── libBaiduMapSDK_base_v4_3_0.so │ │ │ └── liblocSDK7a.so │ │ ├── armeabi │ │ │ ├── libBaiduMapSDK_base_v4_3_0.so │ │ │ └── liblocSDK7a.so │ │ ├── x86 │ │ │ ├── libBaiduMapSDK_base_v4_3_0.so │ │ │ └── liblocSDK7a.so │ │ └── x86_64 │ │ │ ├── libBaiduMapSDK_base_v4_3_0.so │ │ │ └── liblocSDK7a.so │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── babara │ │ │ └── coupon_customer_part │ │ │ └── ExampleInstrumentedTest.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── babara │ │ │ │ └── coupon_customer_part │ │ │ │ ├── Fragment │ │ │ │ ├── FirstPageFragment.java │ │ │ │ ├── LeftWalletFragment.java │ │ │ │ ├── MyFragment.java │ │ │ │ ├── NearbyMerchantFragment.java │ │ │ │ ├── RightWalletFragment.java │ │ │ │ ├── ScanCodePayFragment.java │ │ │ │ └── WalletFragment.java │ │ │ │ ├── activity │ │ │ │ ├── ConfirmPayActivity.java │ │ │ │ ├── HelpActivity.java │ │ │ │ ├── LoginActivity.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── MyAccountActivity.java │ │ │ │ ├── PasswordSettingActivity.java │ │ │ │ ├── PayCouponActivity.java │ │ │ │ ├── PresentActivity.java │ │ │ │ ├── RegisterActivity.java │ │ │ │ └── TestActivity.java │ │ │ │ ├── pojo │ │ │ │ ├── CouponItem.java │ │ │ │ └── NearbyMerchantItem.java │ │ │ │ ├── utils │ │ │ │ ├── AsyncResponse.java │ │ │ │ ├── CheckableLinearLayout.java │ │ │ │ ├── CouponAdapter.java │ │ │ │ ├── CouponConfirmAdapter.java │ │ │ │ ├── CyclicGraphView.java │ │ │ │ ├── HttpTaskForJsonTool.java │ │ │ │ ├── HttpTaskTool.java │ │ │ │ ├── NearbyMerchantAdapter.java │ │ │ │ ├── PanelDountChart.java │ │ │ │ ├── PresentCouponAdapter.java │ │ │ │ ├── UrlManager.java │ │ │ │ └── XChartCalc.java │ │ │ │ └── zxing │ │ │ │ ├── activity │ │ │ │ └── CaptureActivity.java │ │ │ │ ├── camera │ │ │ │ ├── AutoFocusManager.java │ │ │ │ ├── CameraConfigurationManager.java │ │ │ │ ├── CameraManager.java │ │ │ │ ├── PreviewCallback.java │ │ │ │ └── open │ │ │ │ │ └── OpenCameraInterface.java │ │ │ │ ├── decode │ │ │ │ ├── DecodeFormatManager.java │ │ │ │ ├── DecodeHandler.java │ │ │ │ └── DecodeThread.java │ │ │ │ ├── encoding │ │ │ │ └── EncodingUtils.java │ │ │ │ └── utils │ │ │ │ ├── BeepManager.java │ │ │ │ ├── CaptureActivityHandler.java │ │ │ │ └── InactivityTimer.java │ │ └── res │ │ │ ├── drawable │ │ │ ├── qr_code_bg.9.png │ │ │ ├── scan_line.png │ │ │ ├── shadow.png │ │ │ ├── tab_circulate_bg.xml │ │ │ ├── tab_circulate_image.xml │ │ │ ├── tab_circulate_text.xml │ │ │ ├── tab_menu_bg.xml │ │ │ ├── tab_menu_image.xml │ │ │ ├── tab_menu_text.xml │ │ │ ├── tab_my_bg.xml │ │ │ ├── tab_my_image.xml │ │ │ └── tab_my_text.xml │ │ │ ├── layout │ │ │ ├── activity_capture.xml │ │ │ ├── activity_confirm_pay.xml │ │ │ ├── activity_help.xml │ │ │ ├── activity_login.xml │ │ │ ├── activity_main.xml │ │ │ ├── activity_my_account.xml │ │ │ ├── activity_password_setting.xml │ │ │ ├── activity_pay_coupon.xml │ │ │ ├── activity_present.xml │ │ │ ├── activity_register.xml │ │ │ ├── activity_test.xml │ │ │ ├── coupon_item.xml │ │ │ ├── fragment_firstpage.xml │ │ │ ├── fragment_left_wallet.xml │ │ │ ├── fragment_my.xml │ │ │ ├── fragment_nearby_merchant.xml │ │ │ ├── fragment_right_wallet.xml │ │ │ ├── fragment_scan_code_pay.xml │ │ │ ├── fragment_wallet.xml │ │ │ ├── nearby_merchant_item.xml │ │ │ └── total_coupon_item.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── circulate.png │ │ │ ├── heart.png │ │ │ ├── ic_launcher.png │ │ │ ├── item.png │ │ │ ├── login.png │ │ │ ├── main_page.png │ │ │ ├── my.png │ │ │ ├── nonet.png │ │ │ ├── plus.png │ │ │ ├── redbaghaha.jpg │ │ │ └── rightbar3.png │ │ │ ├── mipmap-mdpi │ │ │ ├── a001.png │ │ │ ├── a002.png │ │ │ ├── a003.png │ │ │ ├── a005.png │ │ │ ├── a039.png │ │ │ ├── a040.png │ │ │ ├── a041.png │ │ │ ├── a042.png │ │ │ ├── backbar.png │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── mainbg.png │ │ │ ├── mainbg2.png │ │ │ └── mainbg3.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── mainbg4.png │ │ │ ├── raw │ │ │ └── beep.ogg │ │ │ ├── values-w820dp │ │ │ ├── dimens.xml │ │ │ └── ids.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── example │ │ └── babara │ │ └── coupon_customer_part │ │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── coupon_git ├── .DS_Store ├── .gitignore ├── pom.xml └── src │ ├── .DS_Store │ ├── contract │ └── Bank.sol │ ├── main │ ├── java │ │ └── com │ │ │ └── block │ │ │ └── coupon │ │ │ ├── controller │ │ │ ├── AbiParse.java │ │ │ ├── BankController.java │ │ │ ├── ConsumerController.java │ │ │ ├── MainController.java │ │ │ └── MerchantController.java │ │ │ ├── interceptors │ │ │ └── LoginInterceptor.java │ │ │ ├── mapper │ │ │ ├── BankMapper.java │ │ │ ├── BankMapper.xml │ │ │ ├── ConsumerMapper.java │ │ │ ├── ConsumerMapper.xml │ │ │ ├── CouponMapper.java │ │ │ ├── CouponMapper.xml │ │ │ ├── MerchantMapper.java │ │ │ ├── MerchantMapper.xml │ │ │ ├── SettlementOperationMapper.java │ │ │ └── SettlementOperationMapper.xml │ │ │ ├── po │ │ │ ├── AvailableQuery.java │ │ │ ├── BankStaff.java │ │ │ ├── BankStaffCustom.java │ │ │ ├── BillInfo.java │ │ │ ├── Consumer.java │ │ │ ├── ConsumerCoupon.java │ │ │ ├── ConsumerCustom.java │ │ │ ├── ConsumerInfo.java │ │ │ ├── Coupon.java │ │ │ ├── CouponApplication.java │ │ │ ├── CouponApplicationCustom.java │ │ │ ├── CouponConsumeInfo.java │ │ │ ├── CouponCountInfo.java │ │ │ ├── CouponCustom.java │ │ │ ├── CouponDetail.java │ │ │ ├── CouponInfo.java │ │ │ ├── CouponItem.java │ │ │ ├── CouponMes.java │ │ │ ├── CouponMigration.java │ │ │ ├── CouponPayApplication.java │ │ │ ├── CouponPayApplicationCustom.java │ │ │ ├── CouponRuler.java │ │ │ ├── CouponRulerCustom.java │ │ │ ├── CouponSummary.java │ │ │ ├── Location.java │ │ │ ├── Merchant.java │ │ │ ├── MerchantAccountSetting.java │ │ │ ├── MerchantCustom.java │ │ │ ├── MerchantLogin.java │ │ │ ├── MerchantRegister.java │ │ │ ├── MerchantRegisterCustom.java │ │ │ ├── MerchantSeting.java │ │ │ ├── MerchantStatus.java │ │ │ ├── ModifyPassVo.java │ │ │ ├── NearbyMerchantDist.java │ │ │ ├── NearbyMerchantItem.java │ │ │ ├── QueryCouponStatus.java │ │ │ ├── QueryMerchantBill.java │ │ │ ├── QueryMerchantBills.java │ │ │ ├── QuerySettlementCustom.java │ │ │ ├── SettlementApplication.java │ │ │ ├── SettlementOperation.java │ │ │ ├── SettlementOperationCustom.java │ │ │ ├── SettlementRecord.java │ │ │ ├── TerminateIssueEncapsulation.java │ │ │ ├── UpdateCouponOwner.java │ │ │ ├── UpdateCouponPayParam.java │ │ │ └── srcnew.java │ │ │ ├── rpc │ │ │ ├── TestMain.java │ │ │ ├── TestOurContract.java │ │ │ ├── Web3.java │ │ │ └── WebResourceObj.java │ │ │ ├── service │ │ │ ├── BankService.java │ │ │ ├── ConsumerService.java │ │ │ ├── MerchantService.java │ │ │ └── impl │ │ │ │ ├── BankServiceImpl.java │ │ │ │ ├── ConsumerServiceImpl.java │ │ │ │ └── MerchantServiceImpl.java │ │ │ ├── sha3 │ │ │ ├── Keccak.java │ │ │ └── Sha3.java │ │ │ └── util │ │ │ ├── CreatePublicKey.java │ │ │ ├── DateUtil.java │ │ │ ├── DistanceComparator.java │ │ │ ├── Encryption.java │ │ │ ├── JSONUtils.java │ │ │ ├── ReadAccount.java │ │ │ ├── TestServiceMain.java │ │ │ └── passwd │ ├── resources │ │ ├── abi-ours │ │ │ ├── BankABI.txt │ │ │ ├── ConsumerABI.txt │ │ │ ├── CouponABI.txt │ │ │ └── MerchantABI.txt │ │ ├── account.properties │ │ ├── db.properties │ │ ├── log4j.properties │ │ ├── mybatis │ │ │ └── sqlMapConfig.xml │ │ └── spring │ │ │ ├── applicationContext.xml │ │ │ └── springmvc.xml │ ├── test │ └── webapp │ │ ├── Front │ │ ├── consumer.html │ │ ├── coupon.html │ │ ├── css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── main.css │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ │ ├── index.html │ │ ├── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ ├── jquery.min.js │ │ │ ├── js.cookie.js │ │ │ ├── main.js │ │ │ ├── npm.js │ │ │ └── utils.js │ │ ├── login.html │ │ └── recheck.html │ │ ├── WEB-INF │ │ ├── jsp │ │ │ ├── bank │ │ │ │ ├── consumer.jsp │ │ │ │ ├── coupon.jsp │ │ │ │ ├── firstTrial.jsp │ │ │ │ ├── login.jsp │ │ │ │ └── recheck.jsp │ │ │ ├── consumer │ │ │ │ ├── abnormalities.jsp │ │ │ │ ├── consumers.jsp │ │ │ │ └── frozenusers.jsp │ │ │ ├── coupon │ │ │ │ ├── analysis.jsp │ │ │ │ ├── coupon.jsp │ │ │ │ └── monitor.jsp │ │ │ └── merchant │ │ │ │ ├── audit.jsp │ │ │ │ ├── authorize.jsp │ │ │ │ ├── distribution.jsp │ │ │ │ ├── re_distribution.jsp │ │ │ │ ├── re_withdrawal.jsp │ │ │ │ └── withdrawal.jsp │ │ └── web.xml │ │ ├── index.jsp │ │ └── resources │ │ ├── css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── main.css │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ │ └── js │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── consumers.js │ │ ├── coupon.js │ │ ├── firstTrial.js │ │ ├── jquery.min.js │ │ ├── jquery.validate.js │ │ ├── js.cookie.js │ │ ├── main.js │ │ ├── merchantAudit.js │ │ ├── npm.js │ │ ├── recheck.js │ │ └── utils.js │ ├── sql │ └── coupon.sql │ └── test │ ├── ApplySettlementCouponTest.java │ ├── BankTest.java │ ├── FundAccountTest.java │ ├── IssueCouponsTest.java │ ├── MerchantAccessTest.java │ ├── SpringTest.java │ └── com │ └── block │ └── coupon │ └── service │ └── impl │ └── BankServiceImplTest.java └── coupon_merchant_part ├── .gitignore ├── .idea ├── caches │ ├── build_file_checksums.ser │ └── gradle_models.ser ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── gradle.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── Ladies Night 2 ├── Ladies Night 2.jar └── build.gradle ├── README.md ├── app ├── .gitignore ├── build.gradle ├── libs │ ├── BaiduLBS_Android.jar │ ├── MobCommons-2016.1201.1839.jar │ ├── MobTools-2016.1201.1839.jar │ ├── SMSSDK-2.1.3.aar │ ├── SMSSDKGUI-2.1.3.aar │ ├── android-core-3.1.0 .jar │ ├── android-integration-3.1.0.jar │ ├── arm64-v8a │ │ ├── libBaiduMapSDK_base_v4_3_0.so │ │ └── liblocSDK7a.so │ ├── armeabi-v7a │ │ ├── libBaiduMapSDK_base_v4_3_0.so │ │ └── liblocSDK7a.so │ ├── armeabi │ │ ├── libBaiduMapSDK_base_v4_3_0.so │ │ └── liblocSDK7a.so │ ├── core-3.1.0.jar │ ├── x86 │ │ ├── libBaiduMapSDK_base_v4_3_0.so │ │ └── liblocSDK7a.so │ └── x86_64 │ │ ├── libBaiduMapSDK_base_v4_3_0.so │ │ └── liblocSDK7a.so ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── creation │ │ └── coupon_merchant_part │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── creation │ │ │ └── coupon_merchant_part │ │ │ ├── activity │ │ │ ├── CapitalAccountActivity.java │ │ │ ├── CouponStateActivity.java │ │ │ ├── HelpActivity.java │ │ │ ├── IssueActivity.java │ │ │ ├── IssueManageActivity.java │ │ │ ├── LoginActivity.java │ │ │ ├── MainActivity.java │ │ │ ├── MySettingsActivity.java │ │ │ ├── NoCouponRulerActivity.java │ │ │ ├── NoNetActivity.java │ │ │ ├── QRCodeActivity.java │ │ │ ├── RegisterActivity.java │ │ │ ├── TestActivity.java │ │ │ └── TicketApplyActivity.java │ │ │ ├── fragment │ │ │ ├── AccountSettingFragment.java │ │ │ ├── CirculateChild1Fragment.java │ │ │ ├── CirculateChild2Fragment.java │ │ │ ├── CirculateFragment.java │ │ │ ├── FirstFragment.java │ │ │ ├── InfoSettingFragment.java │ │ │ ├── MyFragment.java │ │ │ └── PasswordSettingFragment.java │ │ │ ├── pojo │ │ │ ├── BillItem.java │ │ │ ├── CouponRequestItem.java │ │ │ ├── CouponStateItem.java │ │ │ ├── CouponVerifyItem.java │ │ │ ├── Merchant.java │ │ │ ├── SettlementRecord.java │ │ │ └── UrlManager.java │ │ │ ├── utils │ │ │ ├── AsyncResponse.java │ │ │ ├── BillAdapter.java │ │ │ ├── CouponRequestAdapter.java │ │ │ ├── CouponStateAdapter.java │ │ │ ├── CouponVerifyAdapter.java │ │ │ ├── DataUtils.java │ │ │ ├── HttpTaskForJsonTool.java │ │ │ ├── HttpTaskTool.java │ │ │ ├── JsonUtils.java │ │ │ └── SettlementRecordAdapter.java │ │ │ └── zxing │ │ │ └── encoding │ │ │ └── EncodingUtils.java │ └── res │ │ ├── drawable │ │ ├── tab_circulate_bg.xml │ │ ├── tab_circulate_image.xml │ │ ├── tab_circulate_text.xml │ │ ├── tab_menu_bg.xml │ │ ├── tab_menu_image.xml │ │ ├── tab_menu_text.xml │ │ ├── tab_my_bg.xml │ │ ├── tab_my_image.xml │ │ └── tab_my_text.xml │ │ ├── layout │ │ ├── activity_capital_account.xml │ │ ├── activity_coupon_state.xml │ │ ├── activity_help.xml │ │ ├── activity_issue.xml │ │ ├── activity_issue_manage.xml │ │ ├── activity_login.xml │ │ ├── activity_main.xml │ │ ├── activity_my_settings.xml │ │ ├── activity_no_coupon_ruler.xml │ │ ├── activity_no_net.xml │ │ ├── activity_qrcode.xml │ │ ├── activity_register.xml │ │ ├── activity_ticket_apply.xml │ │ ├── apply_recording_item.xml │ │ ├── bill_item.xml │ │ ├── coupon_item.xml │ │ ├── coupon_request_item.xml │ │ ├── coupon_verify_item.xml │ │ ├── fragment_account_setting.xml │ │ ├── fragment_circulate.xml │ │ ├── fragment_circulate_child1.xml │ │ ├── fragment_circulate_child2.xml │ │ ├── fragment_first.xml │ │ ├── fragment_info_setting.xml │ │ ├── fragment_my.xml │ │ ├── fragment_password_setting.xml │ │ ├── test.xml │ │ ├── title.xml │ │ └── titles.xml │ │ ├── mipmap-hdpi │ │ ├── circulate.png │ │ ├── heart.png │ │ ├── ic_launcher.png │ │ ├── item.png │ │ ├── login.png │ │ ├── main_page.png │ │ ├── my.png │ │ ├── no_coupon_ruler.png │ │ ├── nonet.png │ │ ├── plus.png │ │ └── rightbar3.png │ │ ├── mipmap-mdpi │ │ ├── a001.png │ │ ├── a002.png │ │ ├── a003.png │ │ ├── a005.png │ │ ├── a039.png │ │ ├── a040.png │ │ ├── a041.png │ │ ├── a042.png │ │ ├── backbar.png │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── mainbg.png │ │ ├── mainbg2.png │ │ ├── mainbg3.png │ │ └── mainbg4.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── creation │ └── coupon_merchant_part │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /README.md: -------------------------------------------------------------------------------- 1 | # Ethereum-Coupon 2 | 基于以太坊的通用电子优惠券系统 3 | 4 | # 文件目录 5 | + `coupon_cunstomer_part` 是客户的app源码 6 | + `coupin_merchant_part` 是商户的app源码 7 | + `coupon_git/src/main` 是后端源码 8 | + `coupon_git/src/sql` 是数据库 9 | + `coupon_git/src/contract` 是合约代码 10 | 11 | # 版本说明 12 | + Android SDK 版本为 AndroidX 13 | + EVM 版本选择 homestead `(在Remix上编译的时候注意修改)` 14 | + Solidity版本为 0.5.1 15 | 16 | # 文件说明 17 | + `coupon_git/src/main/resources/account.properties` 配置区块链账户地址 18 | + `coupon_git/src/main/resources/db.properties` 配置mysql数据库信息 19 | + `coupon_git/src/main.java.com.block.coupon/rpc/WebRecourceObj.java` 配置区块链ip地址 20 | + `coupon_customer_part/app/src/main.java.com.example.babara.coupon_customer_part/utils/UrlManager.java` 客户app配置服务器ip地址 21 | + `coupon_merchant_part/app/src/main.java.com.creation.coupon_customer_part/pojo/UrlManager.java` 商户app配置服务器ip地址 -------------------------------------------------------------------------------- /coupon_customer_part/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /coupon_customer_part/.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /coupon_customer_part/.idea/caches/gradle_models.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/.idea/caches/gradle_models.ser -------------------------------------------------------------------------------- /coupon_customer_part/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /coupon_customer_part/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /coupon_customer_part/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /coupon_customer_part/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 21 | -------------------------------------------------------------------------------- /coupon_customer_part/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /coupon_customer_part/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /coupon_customer_part/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /coupon_customer_part/README.md: -------------------------------------------------------------------------------- 1 | # coupon_customer_part -------------------------------------------------------------------------------- /coupon_customer_part/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/BaiduLBS_Android.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/BaiduLBS_Android.jar -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/MobCommons-2016.1201.1839.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/MobCommons-2016.1201.1839.jar -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/MobTools-2016.1201.1839.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/MobTools-2016.1201.1839.jar -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/SMSSDK-2.1.3.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/SMSSDK-2.1.3.aar -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/SMSSDKGUI-2.1.3.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/SMSSDKGUI-2.1.3.aar -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/achartengine-1.1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/achartengine-1.1.0.jar -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/arm64-v8a/libBaiduMapSDK_base_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/arm64-v8a/libBaiduMapSDK_base_v4_3_0.so -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/arm64-v8a/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/arm64-v8a/liblocSDK7a.so -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/armeabi-v7a/libBaiduMapSDK_base_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/armeabi-v7a/libBaiduMapSDK_base_v4_3_0.so -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/armeabi-v7a/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/armeabi-v7a/liblocSDK7a.so -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/armeabi/libBaiduMapSDK_base_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/armeabi/libBaiduMapSDK_base_v4_3_0.so -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/armeabi/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/armeabi/liblocSDK7a.so -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/x86/libBaiduMapSDK_base_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/x86/libBaiduMapSDK_base_v4_3_0.so -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/x86/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/x86/liblocSDK7a.so -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/x86_64/libBaiduMapSDK_base_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/x86_64/libBaiduMapSDK_base_v4_3_0.so -------------------------------------------------------------------------------- /coupon_customer_part/app/libs/x86_64/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/libs/x86_64/liblocSDK7a.so -------------------------------------------------------------------------------- /coupon_customer_part/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/babara/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/androidTest/java/com/example/babara/coupon_customer_part/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.example.babara.coupon_customer_part; 2 | 3 | import android.content.Context; 4 | import androidx.test.InstrumentationRegistry; 5 | import androidx.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.example.babara.coupon_customer_part", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/java/com/example/babara/coupon_customer_part/Fragment/NearbyMerchantFragment.java: -------------------------------------------------------------------------------- 1 | package com.example.babara.coupon_customer_part.Fragment; 2 | 3 | import android.os.Bundle; 4 | import androidx.annotation.Nullable; 5 | import android.view.LayoutInflater; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | 9 | import androidx.fragment.app.Fragment; 10 | 11 | import com.example.babara.coupon_customer_part.R; 12 | 13 | public class NearbyMerchantFragment extends Fragment implements View.OnClickListener{ 14 | public NearbyMerchantFragment(){ 15 | } 16 | 17 | @Nullable 18 | @Override 19 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 20 | View view = inflater.inflate(R.layout.fragment_nearby_merchant,container,false); 21 | return view; 22 | } 23 | @Override 24 | public void onClick(View v){ 25 | 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/java/com/example/babara/coupon_customer_part/Fragment/ScanCodePayFragment.java: -------------------------------------------------------------------------------- 1 | package com.example.babara.coupon_customer_part.Fragment; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import androidx.annotation.Nullable; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.widget.Button; 10 | 11 | import androidx.fragment.app.Fragment; 12 | 13 | import com.example.babara.coupon_customer_part.R; 14 | import com.example.babara.coupon_customer_part.zxing.activity.CaptureActivity; 15 | 16 | import static androidx.appcompat.app.AppCompatActivity.RESULT_OK; 17 | 18 | 19 | public class ScanCodePayFragment extends Fragment implements View.OnClickListener{ 20 | public ScanCodePayFragment(){ 21 | } 22 | 23 | private Button button; 24 | 25 | @Nullable 26 | @Override 27 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 28 | View view = inflater.inflate(R.layout.fragment_scan_code_pay,container,false); 29 | button = (Button)view.findViewById(R.id.scan); 30 | button.setOnClickListener(this); 31 | return view; 32 | } 33 | @Override 34 | public void onClick(View v){ 35 | //扫描操作 36 | 37 | Intent intent = new Intent(getActivity(), CaptureActivity.class); 38 | startActivity(intent); 39 | // IntentIntegrator integrator = new IntentIntegrator(getActivity()); 40 | // integrator.initiateScan(); 41 | } 42 | 43 | @Override 44 | public void onActivityResult(int requestCode, int resultCode, Intent data) { 45 | super.onActivityResult(requestCode, resultCode, data); 46 | if(resultCode==RESULT_OK){ 47 | Bundle bundle = data.getExtras(); 48 | String result = bundle.getString("result"); 49 | button.setText(result); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/java/com/example/babara/coupon_customer_part/activity/HelpActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.babara.coupon_customer_part.activity; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | import android.view.Window; 6 | import android.widget.ImageView; 7 | 8 | import androidx.appcompat.app.AppCompatActivity; 9 | 10 | import com.example.babara.coupon_customer_part.R; 11 | 12 | public class HelpActivity extends AppCompatActivity implements View.OnClickListener{ 13 | 14 | private ImageView backImage; 15 | 16 | @Override 17 | protected void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | requestWindowFeature(Window.FEATURE_NO_TITLE); 20 | setContentView(R.layout.activity_help); 21 | backImage = (ImageView)findViewById(R.id.help_back); 22 | backImage.setOnClickListener(this); 23 | } 24 | @Override 25 | public void onClick(View v){ 26 | switch (v.getId()){ 27 | case R.id.help_back: 28 | this.finish(); 29 | break; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/java/com/example/babara/coupon_customer_part/activity/TestActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.babara.coupon_customer_part.activity; 2 | 3 | import androidx.appcompat.app.AppCompatActivity; 4 | import android.os.Bundle; 5 | import android.widget.TextView; 6 | 7 | import com.example.babara.coupon_customer_part.R; 8 | 9 | public class TestActivity extends AppCompatActivity { 10 | private TextView textView; 11 | 12 | @Override 13 | protected void onCreate(Bundle savedInstanceState) { 14 | super.onCreate(savedInstanceState); 15 | setContentView(R.layout.activity_test); 16 | 17 | textView = (TextView)findViewById(R.id.test); 18 | Bundle bundle = getIntent().getExtras(); //得到传过来的bundle 19 | String data = bundle.getString("result");//读出数据 20 | textView.setText(data); 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/java/com/example/babara/coupon_customer_part/pojo/NearbyMerchantItem.java: -------------------------------------------------------------------------------- 1 | package com.example.babara.coupon_customer_part.pojo; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by babara on 2017/3/12. 7 | */ 8 | 9 | public class NearbyMerchantItem implements Serializable{ 10 | private String merchantId; 11 | private String distance; 12 | private String merchantName; 13 | private String merchantInfo; 14 | 15 | public NearbyMerchantItem(String merchantId,String merchantName){ 16 | this.merchantId = merchantId; 17 | this.merchantName = merchantName; 18 | } 19 | 20 | public NearbyMerchantItem(String merchantId, String distance, String merchantName, String merchantInfo) { 21 | this.merchantId = merchantId; 22 | this.distance = distance; 23 | this.merchantName = merchantName; 24 | this.merchantInfo = merchantInfo; 25 | } 26 | 27 | public String getMerchantId() { 28 | return merchantId; 29 | } 30 | 31 | public void setMerchantId(String merchantId) { 32 | this.merchantId = merchantId; 33 | } 34 | 35 | public String getDistance() { 36 | return distance; 37 | } 38 | 39 | public void setDistance(String distance) { 40 | this.distance = distance; 41 | } 42 | 43 | public String getMerchantName() { 44 | return merchantName; 45 | } 46 | 47 | public void setMerchantName(String merchantName) { 48 | this.merchantName = merchantName; 49 | } 50 | 51 | public String getMerchantInfo() { 52 | return merchantInfo; 53 | } 54 | 55 | public void setMerchantInfo(String merchantInfo) { 56 | this.merchantInfo = merchantInfo; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/java/com/example/babara/coupon_customer_part/utils/AsyncResponse.java: -------------------------------------------------------------------------------- 1 | package com.example.babara.coupon_customer_part.utils; 2 | 3 | /** 4 | * Created by Babara Liang on 2017/1/14. 5 | * Description:使用该接口是为了在onPostExecute之外获取到服务器传送的数据, 6 | * 配合HttpTackTool的使用 7 | */ 8 | 9 | public interface AsyncResponse { 10 | void onDataReceivedSuccess(String data); 11 | //void onDataReceivedFailed(); 12 | } 13 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/java/com/example/babara/coupon_customer_part/utils/CheckableLinearLayout.java: -------------------------------------------------------------------------------- 1 | package com.example.babara.coupon_customer_part.utils; 2 | 3 | import android.content.Context; 4 | import android.graphics.drawable.ColorDrawable; 5 | import android.util.AttributeSet; 6 | import android.widget.Checkable; 7 | import android.widget.LinearLayout; 8 | 9 | /** 10 | * Created by babara on 2017/3/12. 11 | */ 12 | 13 | public class CheckableLinearLayout extends LinearLayout implements Checkable { 14 | 15 | private boolean mChecked; 16 | public CheckableLinearLayout(Context context, AttributeSet attrs) { 17 | super(context, attrs); 18 | } 19 | @Override 20 | public void setChecked(boolean checked) { 21 | mChecked = checked; 22 | setBackgroundDrawable(checked ? new ColorDrawable(0xffffe1ff) : null);//当选中时呈现蓝色 23 | } 24 | @Override 25 | public boolean isChecked() { 26 | return mChecked; 27 | } 28 | @Override 29 | public void toggle() { 30 | setChecked(!mChecked); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/java/com/example/babara/coupon_customer_part/utils/NearbyMerchantAdapter.java: -------------------------------------------------------------------------------- 1 | package com.example.babara.coupon_customer_part.utils; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.ArrayAdapter; 8 | import android.widget.TextView; 9 | 10 | import com.example.babara.coupon_customer_part.R; 11 | import com.example.babara.coupon_customer_part.pojo.NearbyMerchantItem; 12 | 13 | import java.util.List; 14 | public class NearbyMerchantAdapter extends ArrayAdapter { 15 | private int textViewResource; 16 | public NearbyMerchantAdapter(Context context, int textViewResource, List objects){ 17 | super(context, textViewResource, objects); 18 | this.textViewResource = textViewResource; 19 | } 20 | @Override 21 | public View getView(int position, View convertView, ViewGroup parent){ 22 | NearbyMerchantItem nearbyMerchantItem = getItem(position); 23 | View view = LayoutInflater.from(getContext()).inflate(textViewResource, null); 24 | TextView distance = (TextView)view.findViewById(R.id.merchant_distance_text); 25 | TextView merchantName = (TextView)view.findViewById(R.id.merchant_name_text); 26 | TextView merchantInfo = (TextView)view.findViewById(R.id.merchant_info_text); 27 | 28 | distance.setText(nearbyMerchantItem.getDistance()); 29 | merchantName.setText(nearbyMerchantItem.getMerchantName()); 30 | merchantInfo.setText(nearbyMerchantItem.getMerchantInfo()); 31 | 32 | return view; 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/java/com/example/babara/coupon_customer_part/utils/UrlManager.java: -------------------------------------------------------------------------------- 1 | package com.example.babara.coupon_customer_part.utils; 2 | 3 | /** 4 | * Created by Babara Liang on 2017/1/17. 5 | * Description:该类的作用是管理服务器的地址 6 | * 实际是用此方法实现一个全局变量 7 | */ 8 | 9 | public class UrlManager { 10 | public static String createUrlString(String addString){ 11 | return "http://192.168.1.157:8080/coupon"+ addString; 12 | } 13 | } -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/java/com/example/babara/coupon_customer_part/zxing/decode/DecodeFormatManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 ZXing authors 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.babara.coupon_customer_part.zxing.decode; 18 | 19 | import com.google.zxing.BarcodeFormat; 20 | 21 | import java.util.Collection; 22 | import java.util.EnumSet; 23 | import java.util.Set; 24 | 25 | public class DecodeFormatManager { 26 | 27 | // 1D解码 28 | private static final Set PRODUCT_FORMATS; 29 | private static final Set INDUSTRIAL_FORMATS; 30 | private static final Set ONE_D_FORMATS; 31 | 32 | // 二维码解码 33 | private static final Set QR_CODE_FORMATS; 34 | 35 | static { 36 | PRODUCT_FORMATS = EnumSet.of(BarcodeFormat.UPC_A, BarcodeFormat.UPC_E, BarcodeFormat.EAN_13, 37 | BarcodeFormat.EAN_8, BarcodeFormat.RSS_14, BarcodeFormat.RSS_EXPANDED); 38 | INDUSTRIAL_FORMATS = EnumSet.of(BarcodeFormat.CODE_39, BarcodeFormat.CODE_93, BarcodeFormat 39 | .CODE_128, BarcodeFormat.ITF, BarcodeFormat.CODABAR); 40 | ONE_D_FORMATS = EnumSet.copyOf(PRODUCT_FORMATS); 41 | ONE_D_FORMATS.addAll(INDUSTRIAL_FORMATS); 42 | 43 | QR_CODE_FORMATS = EnumSet.of(BarcodeFormat.QR_CODE); 44 | } 45 | 46 | public static Collection getQrCodeFormats() { 47 | return QR_CODE_FORMATS; 48 | } 49 | 50 | public static Collection getBarCodeFormats() { 51 | return ONE_D_FORMATS; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/drawable/qr_code_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/drawable/qr_code_bg.9.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/drawable/scan_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/drawable/scan_line.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/drawable/shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/drawable/shadow.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/drawable/tab_circulate_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/drawable/tab_circulate_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/drawable/tab_circulate_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/drawable/tab_menu_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/drawable/tab_menu_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/drawable/tab_menu_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/drawable/tab_my_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/drawable/tab_my_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/drawable/tab_my_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/layout/activity_help.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 23 | 32 | 33 | 34 | 39 | 40 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/layout/activity_my_account.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 16 | 22 | 31 | 32 | 37 | 24 | 没有帐号?点击注册 25 | 26 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/WEB-INF/jsp/consumer/frozenusers.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 3 | 4 | 5 | Title 6 | 7 | 8 |
9 |

已冻结用户列表

10 |
11 |
12 | 13 |
14 | 15 |
16 |
17 | 18 |
19 |
20 |
21 |
22 |
23 |
24 |

用户名:消费者3

25 |

状态:已冻结

26 |
27 |
28 | 29 |
30 |
31 |
32 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/WEB-INF/jsp/coupon/monitor.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 3 | 4 | 5 | Title 6 | 7 | 8 |
9 |

平台监控

10 |
11 |
12 | 13 |
14 | 15 |
16 |
17 | 18 |
19 |
20 |
21 |
22 |
23 |
24 |

优惠券id:消费者3

25 |

状态:已冻结

26 |
27 |
28 | 29 |
30 |
31 |
32 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/WEB-INF/jsp/merchant/authorize.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 3 | 4 | 5 | Title 6 | 7 | 8 |
9 |

商户授权

10 |
11 | 12 |
13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 2 | 3 | 4 | 5 | 6 | 7 |

Hello World!

8 | 9 | 银行员工登陆注册 10 |
11 | 员工初审界面 12 |
13 | 员工复审界面 14 | 15 | 16 | -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/resources/css/main.css: -------------------------------------------------------------------------------- 1 | .w-45 { width: 45% } 2 | .mt10 { margin-top: 10px } -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/resources/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_git/src/main/webapp/resources/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/resources/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_git/src/main/webapp/resources/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/resources/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_git/src/main/webapp/resources/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/resources/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/resources/js/utils.js: -------------------------------------------------------------------------------- 1 | // 通用方法和工具 2 | 3 | -------------------------------------------------------------------------------- /coupon_git/src/test/SpringTest.java: -------------------------------------------------------------------------------- 1 | import javax.sql.DataSource; 2 | 3 | import org.junit.Before; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.test.context.ContextConfiguration; 7 | import org.springframework.test.context.ContextHierarchy; 8 | import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; 9 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 10 | import org.springframework.test.context.transaction.TransactionConfiguration; 11 | import org.springframework.test.context.web.WebAppConfiguration; 12 | import org.springframework.test.web.servlet.MockMvc; 13 | import org.springframework.test.web.servlet.setup.MockMvcBuilders; 14 | import org.springframework.web.context.WebApplicationContext; 15 | 16 | @RunWith(SpringJUnit4ClassRunner.class) 17 | @WebAppConfiguration 18 | @ContextHierarchy({ 19 | @ContextConfiguration(name="parent",locations="classpath:spring/applicationContext.xml"), 20 | @ContextConfiguration(name="child", locations="classpath:spring/springmvc.xml") 21 | }) 22 | @TransactionConfiguration(defaultRollback = true) 23 | public class SpringTest extends AbstractJUnit4SpringContextTests{ 24 | @Autowired 25 | protected WebApplicationContext wac; 26 | protected MockMvc mockMvc; 27 | 28 | @Before 29 | public void setup(){ 30 | mockMvc = MockMvcBuilders.webAppContextSetup(wac).build(); 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /coupon_merchant_part/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /coupon_merchant_part/.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /coupon_merchant_part/.idea/caches/gradle_models.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/.idea/caches/gradle_models.ser -------------------------------------------------------------------------------- /coupon_merchant_part/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /coupon_merchant_part/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /coupon_merchant_part/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /coupon_merchant_part/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 22 | 23 | -------------------------------------------------------------------------------- /coupon_merchant_part/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /coupon_merchant_part/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /coupon_merchant_part/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /coupon_merchant_part/Ladies Night 2/Ladies Night 2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/Ladies Night 2/Ladies Night 2.jar -------------------------------------------------------------------------------- /coupon_merchant_part/Ladies Night 2/build.gradle: -------------------------------------------------------------------------------- 1 | configurations.maybeCreate("default") 2 | artifacts.add("default", file('Ladies Night 2.jar')) -------------------------------------------------------------------------------- /coupon_merchant_part/README.md: -------------------------------------------------------------------------------- 1 | #coupon_merchant_part 2 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | buildToolsVersion "28.0.3" 6 | defaultConfig { 7 | applicationId "com.creation.coupon_merchant_part" 8 | minSdkVersion 17 9 | targetSdkVersion 28 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 13 | multiDexEnabled true 14 | } 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 19 | } 20 | } 21 | sourceSets { 22 | main { 23 | jniLibs.srcDirs = ['libs'] 24 | } 25 | } 26 | } 27 | 28 | repositories { 29 | flatDir { 30 | dirs 'libs' 31 | } 32 | } 33 | 34 | dependencies { 35 | implementation fileTree(include: ['*.jar'], dir: 'libs') 36 | androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { 37 | exclude group: 'com.android.support', module: 'support-annotations' 38 | }) 39 | implementation files('libs/MobCommons-2016.1201.1839.jar') 40 | implementation(name: 'SMSSDK-2.1.3', ext: 'aar') 41 | implementation(name: 'SMSSDKGUI-2.1.3', ext: 'aar') 42 | implementation files('libs/MobTools-2016.1201.1839.jar') 43 | implementation 'androidx.appcompat:appcompat:1.0.0' 44 | implementation 'com.google.android.material:material:1.0.0' 45 | implementation 'com.google.firebase:firebase-appindexing:19.0.0' 46 | implementation 'androidx.legacy:legacy-support-v4:1.0.0' 47 | implementation 'com.google.android.gms:play-services:12.0.1' 48 | testImplementation 'junit:junit:4.12' 49 | implementation 'androidx.multidex:multidex:2.0.0' 50 | implementation files('libs/BaiduLBS_Android.jar') 51 | } -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/BaiduLBS_Android.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/BaiduLBS_Android.jar -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/MobCommons-2016.1201.1839.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/MobCommons-2016.1201.1839.jar -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/MobTools-2016.1201.1839.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/MobTools-2016.1201.1839.jar -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/SMSSDK-2.1.3.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/SMSSDK-2.1.3.aar -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/SMSSDKGUI-2.1.3.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/SMSSDKGUI-2.1.3.aar -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/android-core-3.1.0 .jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/android-core-3.1.0 .jar -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/android-integration-3.1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/android-integration-3.1.0.jar -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/arm64-v8a/libBaiduMapSDK_base_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/arm64-v8a/libBaiduMapSDK_base_v4_3_0.so -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/arm64-v8a/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/arm64-v8a/liblocSDK7a.so -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/armeabi-v7a/libBaiduMapSDK_base_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/armeabi-v7a/libBaiduMapSDK_base_v4_3_0.so -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/armeabi-v7a/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/armeabi-v7a/liblocSDK7a.so -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/armeabi/libBaiduMapSDK_base_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/armeabi/libBaiduMapSDK_base_v4_3_0.so -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/armeabi/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/armeabi/liblocSDK7a.so -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/core-3.1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/core-3.1.0.jar -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/x86/libBaiduMapSDK_base_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/x86/libBaiduMapSDK_base_v4_3_0.so -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/x86/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/x86/liblocSDK7a.so -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/x86_64/libBaiduMapSDK_base_v4_3_0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/x86_64/libBaiduMapSDK_base_v4_3_0.so -------------------------------------------------------------------------------- /coupon_merchant_part/app/libs/x86_64/liblocSDK7a.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/libs/x86_64/liblocSDK7a.so -------------------------------------------------------------------------------- /coupon_merchant_part/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\Administrator\AppData\Local\Android\sdk1/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/androidTest/java/com/creation/coupon_merchant_part/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part; 2 | 3 | import android.content.Context; 4 | import androidx.test.InstrumentationRegistry; 5 | import androidx.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.creation.coupon_merchant_part", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/activity/HelpActivity.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.activity; 2 | 3 | import android.app.Activity; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | import android.os.Bundle; 6 | import android.view.View; 7 | import android.view.Window; 8 | import android.widget.ImageView; 9 | 10 | import com.creation.coupon_merchant_part.R; 11 | /** 12 | * Description:该类实现帮助用户使用该APP的功能 13 | */ 14 | public class HelpActivity extends Activity implements View.OnClickListener{ 15 | private ImageView backImageView; 16 | @Override 17 | protected void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | requestWindowFeature(Window.FEATURE_NO_TITLE); 20 | setContentView(R.layout.activity_help); 21 | backImageView = (ImageView)findViewById(R.id.help_back); 22 | backImageView.setOnClickListener(this); 23 | } 24 | @Override 25 | public void onClick(View v){ 26 | switch (v.getId()){ 27 | case R.id.help_back: 28 | this.finish(); 29 | break; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/activity/NoCouponRulerActivity.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.activity; 2 | 3 | import android.content.Intent; 4 | import androidx.appcompat.app.AppCompatActivity; 5 | import android.os.Bundle; 6 | import android.view.View; 7 | import android.widget.TextView; 8 | 9 | import com.creation.coupon_merchant_part.R; 10 | 11 | public class NoCouponRulerActivity extends AppCompatActivity { 12 | private TextView issureCouponTextView; 13 | 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | setContentView(R.layout.activity_no_coupon_ruler); 18 | issureCouponTextView = (TextView)findViewById(R.id.issureRulerText); 19 | issureCouponTextView.setOnClickListener(new View.OnClickListener() { 20 | @Override 21 | public void onClick(View view) { 22 | Intent intent = new Intent(NoCouponRulerActivity.this,IssueActivity.class); 23 | startActivity(intent); 24 | NoCouponRulerActivity.this.finish(); 25 | } 26 | }); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/activity/NoNetActivity.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.activity; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.content.IntentFilter; 7 | import android.net.ConnectivityManager; 8 | import android.net.NetworkInfo; 9 | import androidx.appcompat.app.AppCompatActivity; 10 | import android.os.Bundle; 11 | 12 | import com.creation.coupon_merchant_part.R; 13 | 14 | public class NoNetActivity extends AppCompatActivity { 15 | 16 | @Override 17 | protected void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | setContentView(R.layout.activity_no_net); 20 | networkListener(); 21 | } 22 | 23 | //网络监听 24 | class NetworkChangeReceiver extends BroadcastReceiver { 25 | //每当网络状态发生变化时,onReceive方法会得到执行 26 | //执行后实时更新网路状态isNetworkAvailable 27 | @Override 28 | public void onReceive(Context context, Intent intent){ 29 | ConnectivityManager connectivityManager = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); 30 | NetworkInfo networkInfo= connectivityManager.getActiveNetworkInfo(); 31 | if(networkInfo != null && networkInfo.isAvailable()){ 32 | NoNetActivity.this.finish(); 33 | } 34 | } 35 | } 36 | 37 | public void networkListener(){ 38 | //每当网络状态发生变化时,系统会发出"android.net.conn.CONNECTIVITY_CHANGE"的广播 39 | //要给intentFilter添加这样一个action,所以想要监听什么样的广播,就添加相应的action 40 | IntentFilter intentFilter = new IntentFilter(); 41 | intentFilter.addAction("android.net.conn.CONNECTIVITY_CHANGE"); 42 | NetworkChangeReceiver networkChangeReceiver = new NetworkChangeReceiver(); 43 | //调用 registerReceiver()进行注册,NetworkChangeReceiver()会收到 44 | // 所有值为"android.net.conn.CONNECTIVITY_CHANGE"的广播 45 | registerReceiver(networkChangeReceiver, intentFilter); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/activity/QRCodeActivity.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.activity; 2 | 3 | import android.app.Activity; 4 | import android.content.SharedPreferences; 5 | import android.graphics.Bitmap; 6 | import android.graphics.BitmapFactory; 7 | import android.os.Bundle; 8 | import android.view.View; 9 | import android.view.Window; 10 | import android.widget.ImageView; 11 | 12 | import com.creation.coupon_merchant_part.R; 13 | import com.creation.coupon_merchant_part.zxing.encoding.EncodingUtils; 14 | 15 | /** 16 | * Description:该类主要展示从服务器获取的二维码。 17 | */ 18 | public class QRCodeActivity extends Activity implements View.OnClickListener{ 19 | private ImageView backImageView; 20 | private ImageView merchantQRImage; 21 | @Override 22 | protected void onCreate(Bundle savedInstanceState) { 23 | super.onCreate(savedInstanceState); 24 | requestWindowFeature(Window.FEATURE_NO_TITLE); 25 | setContentView(R.layout.activity_qrcode); 26 | backImageView = (ImageView)findViewById(R.id.qrcode_back); 27 | backImageView.setOnClickListener(this); 28 | merchantQRImage = (ImageView)findViewById(R.id.merchant_qr_image); 29 | 30 | createMerchantCode(); 31 | } 32 | 33 | private void createMerchantCode() { 34 | SharedPreferences sp = getSharedPreferences("currentSession",MODE_PRIVATE); 35 | String merchantId = sp.getString("merchantId",""); 36 | Bitmap logoBitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.mainbg4); 37 | Bitmap bitmap= EncodingUtils.createQRCode(merchantId, 500, 500, logoBitmap); 38 | merchantQRImage.setImageBitmap(bitmap); 39 | } 40 | 41 | @Override 42 | public void onClick(View v){ 43 | switch (v.getId()){ 44 | case R.id.qrcode_back: 45 | //点击返回按钮,退出此页 46 | this.finish(); 47 | break; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/activity/TestActivity.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.activity; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.view.Window; 6 | import android.widget.Toast; 7 | 8 | import com.creation.coupon_merchant_part.R; 9 | /** 10 | * Description:该类用于测试。 11 | */ 12 | 13 | public class TestActivity extends Activity { 14 | 15 | @Override 16 | protected void onCreate(Bundle savedInstanceState) { 17 | super.onCreate(savedInstanceState); 18 | requestWindowFeature(Window.FEATURE_NO_TITLE); 19 | setContentView(R.layout.test); 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/pojo/BillItem.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.pojo; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by Babara Liang on 2017/1/17. 7 | * Description:该类是账单类。设置->资金账户->账单中的每个账单条目都是该类的一个对象 8 | */ 9 | 10 | public class BillItem implements Serializable { 11 | private String time; //账单的发生时间 12 | private String type; //账单的类别 13 | private String accountRemain; //账户的余额 14 | 15 | public BillItem(String time, String type, String accountRemain) { 16 | this.time = time; 17 | this.type = type; 18 | this.accountRemain = accountRemain; 19 | } 20 | 21 | public String getTime() { 22 | return time; 23 | } 24 | 25 | public void setTime(String time) { 26 | this.time = time; 27 | } 28 | 29 | public String getType() { 30 | return type; 31 | } 32 | 33 | public void setType(String type) { 34 | this.type = type; 35 | } 36 | 37 | public String getAccountRemain() { 38 | return accountRemain; 39 | } 40 | 41 | public void setAccountRemain(String accountRemain) { 42 | this.accountRemain = accountRemain; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/pojo/Merchant.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.pojo; 2 | 3 | /** 4 | * Created by Babara Liang on 2017/1/11. 5 | */ 6 | 7 | public class Merchant { 8 | private String name; 9 | private String password; 10 | private String description; 11 | private Integer accountBalance; 12 | 13 | public Merchant(Integer accountBalance, String name, String password, String description) { 14 | this.accountBalance = accountBalance; 15 | this.name = name; 16 | this.password = password; 17 | this.description = description; 18 | } 19 | 20 | public Integer getAccountBalance() { 21 | return accountBalance; 22 | } 23 | 24 | public void setAccountBalance(Integer accountBalance) { 25 | this.accountBalance = accountBalance; 26 | } 27 | 28 | public Merchant(String name, String password){ 29 | this.name = name; 30 | this.password = password; 31 | this.description=description; 32 | } 33 | 34 | public String getName() { 35 | return name; 36 | } 37 | 38 | public void setName(String name) { 39 | this.name = name; 40 | } 41 | 42 | public String getPassword() { 43 | return password; 44 | } 45 | 46 | public void setPassword(String password) { 47 | this.password = password; 48 | } 49 | 50 | public String getDescription() { 51 | return description; 52 | } 53 | 54 | public void setDescription(String description) { 55 | this.description = description; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/pojo/UrlManager.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.pojo; 2 | 3 | /** 4 | * Created by Babara Liang on 2017/1/17. 5 | * Description:该类的作用是管理服务器的地址 6 | * 实际是用此方法实现一个全局变量 7 | */ 8 | 9 | public class UrlManager { 10 | public static String createUrlString(String addString){ 11 | return "http://192.168.31.16:8080/coupon"+ addString; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/utils/AsyncResponse.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.utils; 2 | 3 | /** 4 | * Created by Babara Liang on 2017/1/14. 5 | * Description:使用该接口是为了在onPostExecute之外获取到服务器传送的数据, 6 | * 配合HttpTackTool的使用 7 | */ 8 | 9 | public interface AsyncResponse { 10 | void onDataReceivedSuccess(String data); 11 | //void onDataReceivedFailed(); 12 | } 13 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/utils/BillAdapter.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.utils; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.ArrayAdapter; 8 | import android.widget.TextView; 9 | 10 | import com.creation.coupon_merchant_part.R; 11 | import com.creation.coupon_merchant_part.pojo.BillItem; 12 | import com.creation.coupon_merchant_part.pojo.CouponStateItem; 13 | 14 | import java.util.List; 15 | 16 | /** 17 | * Created by Babara Liang on 2017/1/15. 18 | * Description:自定义一个账单的适配器,使账单的list列表显示在ListView中 19 | */ 20 | 21 | public class BillAdapter extends ArrayAdapter{ 22 | private int textViewResource; 23 | public BillAdapter(Context context, int textViewResource, List objects){ 24 | super(context, textViewResource, objects); 25 | this.textViewResource = textViewResource; 26 | } 27 | @Override 28 | public View getView(int position, View convertView, ViewGroup parent){ 29 | BillItem billItem = getItem(position); 30 | View view = LayoutInflater.from(getContext()).inflate(textViewResource, null); 31 | TextView timeTextView = (TextView)view.findViewById(R.id.bill_time_text); 32 | TextView typeTextView = (TextView)view.findViewById(R.id.bill_type_text); 33 | TextView remainTextView = (TextView)view.findViewById(R.id.bill_remain_text); 34 | 35 | timeTextView.setText(billItem.getTime()); 36 | typeTextView.setText(billItem.getType()); 37 | remainTextView.setText(billItem.getAccountRemain()); 38 | return view; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/utils/CouponRequestAdapter.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.utils; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.ArrayAdapter; 8 | import android.widget.TextView; 9 | 10 | import com.creation.coupon_merchant_part.R; 11 | import com.creation.coupon_merchant_part.pojo.CouponRequestItem; 12 | import com.creation.coupon_merchant_part.pojo.CouponStateItem; 13 | 14 | import java.util.List; 15 | 16 | /** 17 | * Created by Babara Liang on 2017/1/15. 18 | * Description:自定义一个优惠券请求的适配器,使请求的list列表显示在ListView中 19 | */ 20 | 21 | public class CouponRequestAdapter extends ArrayAdapter{ 22 | private int textViewResource; 23 | public CouponRequestAdapter(Context context, int textViewResource, List objects){ 24 | super(context, textViewResource, objects); 25 | this.textViewResource = textViewResource; 26 | } 27 | @Override 28 | public View getView(int position, View convertView, ViewGroup parent){ 29 | CouponRequestItem couponRequestItem = getItem(position); 30 | View view = LayoutInflater.from(getContext()).inflate(textViewResource, null); 31 | TextView requestUserTextView = (TextView)view.findViewById(R.id.coupon_request_user); 32 | TextView requestTimeTextView = (TextView)view.findViewById(R.id.coupon_request_time); 33 | 34 | requestUserTextView.setText(couponRequestItem.getUser()); 35 | requestTimeTextView.setText(couponRequestItem.getTime()); 36 | return view; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/utils/CouponStateAdapter.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.utils; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.ArrayAdapter; 8 | import android.widget.TextView; 9 | 10 | import com.creation.coupon_merchant_part.R; 11 | import com.creation.coupon_merchant_part.pojo.CouponStateItem; 12 | 13 | import java.util.Iterator; 14 | import java.util.List; 15 | 16 | /** 17 | * Created by Babara Liang on 2017/1/15. 18 | * Description:自定义一个优惠券使用状态的适配器,使使用状态的list列表显示在ListView中 19 | */ 20 | 21 | public class CouponStateAdapter extends ArrayAdapter{ 22 | private int textViewResource; 23 | public CouponStateAdapter(Context context, int textViewResource, List objects){ 24 | super(context, textViewResource, objects); 25 | this.textViewResource = textViewResource; 26 | } 27 | @Override 28 | public View getView(int position, View convertView, ViewGroup parent){ 29 | CouponStateItem couponStateItem = getItem(position); 30 | View view = LayoutInflater.from(getContext()).inflate(textViewResource, null); 31 | TextView userTextView = (TextView)view.findViewById(R.id.user_text); 32 | TextView usingDateTextView = (TextView)view.findViewById(R.id.using_date_text); 33 | TextView returnAmountTextView = (TextView)view.findViewById(R.id.return_amount_text); 34 | TextView isUsedTextView = (TextView)view.findViewById(R.id.is_used_text); 35 | 36 | userTextView.setText(couponStateItem.getUser()); 37 | usingDateTextView.setText(couponStateItem.getUsingDate()); 38 | returnAmountTextView.setText(couponStateItem.getReturnAmount()); 39 | isUsedTextView.setText(couponStateItem.getUsingState()); 40 | 41 | return view; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/utils/CouponVerifyAdapter.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.utils; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.ArrayAdapter; 8 | import android.widget.TextView; 9 | 10 | import com.creation.coupon_merchant_part.R; 11 | import com.creation.coupon_merchant_part.pojo.CouponRequestItem; 12 | import com.creation.coupon_merchant_part.pojo.CouponVerifyItem; 13 | 14 | import java.util.List; 15 | 16 | /** 17 | * Created by Babara Liang on 2017/1/15. 18 | * Description:自定义一个优惠券确认的适配器,使的li确认请求的list列表显示在ListView中 19 | */ 20 | 21 | public class CouponVerifyAdapter extends ArrayAdapter{ 22 | private int textViewResource; 23 | public CouponVerifyAdapter(Context context, int textViewResource, List objects){ 24 | super(context, textViewResource, objects); 25 | this.textViewResource = textViewResource; 26 | } 27 | @Override 28 | public View getView(int position, View convertView, ViewGroup parent){ 29 | CouponVerifyItem couponVerifyItem = getItem(position); 30 | View view = LayoutInflater.from(getContext()).inflate(textViewResource, null); 31 | TextView requestUserTextView = (TextView)view.findViewById(R.id.coupon_verify_user); 32 | TextView requestTimeTextView = (TextView)view.findViewById(R.id.coupon_verify_time); 33 | TextView requestAmountTextView = (TextView)view.findViewById(R.id.coupon_verify_amount); 34 | 35 | requestUserTextView.setText(couponVerifyItem.getUser()); 36 | requestTimeTextView.setText(couponVerifyItem.getTime()); 37 | requestAmountTextView.setText(String.valueOf(couponVerifyItem.getCouponValue())); 38 | return view; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/utils/DataUtils.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.utils; 2 | 3 | /** 4 | * Created by Babara Liang on 2017/1/11. 5 | */ 6 | 7 | public class DataUtils { 8 | public static boolean validData(String data){ 9 | //判断是否满足日期格式 10 | String dataRegex = "\\d{4}-\\d{2}-\\d{2}"; 11 | if(data.matches(dataRegex)){ 12 | String[] dataDate = data.split("-"); 13 | if (dataDate[0].compareTo("2000")<0 || dataDate[0].compareTo("2100")>0) return false; 14 | //判断2月 15 | if ("02".equals(dataDate[1])){ 16 | int year = Integer.parseInt(dataDate[0]); 17 | if ((year%4==0 && year%100!=0) || year%400==0){ 18 | if (dataDate[2].compareTo("29")>0){ 19 | return false; 20 | } 21 | }else { 22 | if (dataDate[2].compareTo("28")>0){ 23 | return false; 24 | } 25 | } 26 | } 27 | //判断月份 28 | if (dataDate[1].compareTo("01")<0 || dataDate[1].compareTo("12")>0){ 29 | return false; 30 | } 31 | //判断日 32 | switch (dataDate[1]){ 33 | case "01": 34 | case "03": 35 | case "05": 36 | case "07": 37 | case "08": 38 | case "10": 39 | case "12": 40 | if (dataDate[2].compareTo("01")<0 || dataDate[2].compareTo("31")>0) return false; 41 | break; 42 | case "04": 43 | case "06": 44 | case "09": 45 | case "11": 46 | if (dataDate[2].compareTo("01")<0 || dataDate[2].compareTo("30")>0) return false; 47 | break; 48 | } 49 | }else { 50 | return false; 51 | } 52 | return true; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/utils/JsonUtils.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.utils; 2 | 3 | import org.json.JSONException; 4 | import org.json.JSONObject; 5 | 6 | import java.io.ByteArrayOutputStream; 7 | import java.io.InputStream; 8 | 9 | /** 10 | * Created by Babara Liang on 2017/1/11. 11 | */ 12 | 13 | public class JsonUtils { 14 | public static String createJsonString(String key, Object value)throws JSONException { 15 | JSONObject jsonObject = new JSONObject(); 16 | jsonObject.put(key, value); 17 | return jsonObject.toString(); 18 | } 19 | 20 | public static byte[] readBytes(InputStream is){ 21 | try { 22 | byte[] buffer = new byte[1024]; 23 | int len = -1 ; 24 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); 25 | while((len = is.read(buffer)) != -1){ 26 | baos.write(buffer, 0, len); 27 | } 28 | baos.close(); 29 | return baos.toByteArray(); 30 | } catch (Exception e) { 31 | e.printStackTrace(); 32 | } 33 | return null ; 34 | } 35 | public static String readString(InputStream is){ 36 | return new String(readBytes(is)); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/java/com/creation/coupon_merchant_part/utils/SettlementRecordAdapter.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part.utils; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup; 7 | import android.widget.ArrayAdapter; 8 | import android.widget.TextView; 9 | 10 | import com.creation.coupon_merchant_part.R; 11 | import com.creation.coupon_merchant_part.pojo.CouponStateItem; 12 | import com.creation.coupon_merchant_part.pojo.SettlementRecord; 13 | 14 | import java.util.List; 15 | 16 | /** 17 | * Created by thomas on 2017/3/3. 18 | */ 19 | 20 | public class SettlementRecordAdapter extends ArrayAdapter { 21 | private int viewResource; 22 | public SettlementRecordAdapter(Context context, int viewResource, List records){ 23 | super(context,viewResource, records); 24 | this.viewResource = viewResource; 25 | } 26 | @Override 27 | public View getView(int position, View convertView, ViewGroup parent){ 28 | SettlementRecord settlementRecord = getItem(position); 29 | View view = LayoutInflater.from(getContext()).inflate(viewResource, null); 30 | TextView operationDateTextView = (TextView)view.findViewById(R.id.operation_date); 31 | TextView operationAmountTextView = (TextView)view.findViewById(R.id.operation_amount); 32 | TextView operationStatusTextView = (TextView)view.findViewById(R.id.operation_status); 33 | 34 | operationDateTextView.setText(settlementRecord.getOperationDate()); 35 | operationAmountTextView.setText(String.valueOf(settlementRecord.getOperationAmount())); 36 | operationStatusTextView.setText(settlementRecord.getRecheckStatus()); 37 | 38 | return view; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/drawable/tab_circulate_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/drawable/tab_circulate_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/drawable/tab_circulate_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/drawable/tab_menu_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/drawable/tab_menu_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/drawable/tab_menu_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/drawable/tab_my_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/drawable/tab_my_image.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/drawable/tab_my_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/layout/activity_help.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 15 | 21 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/layout/activity_no_coupon_ruler.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 23 | 24 | 31 | 32 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/layout/activity_no_net.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 20 | 21 | 27 | 28 | 34 | 35 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/layout/activity_qrcode.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 16 | 22 | 31 | 32 | 33 | 36 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/layout/apply_recording_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 19 | 20 | 30 | 31 | 41 | 42 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/layout/bill_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 28 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/layout/coupon_request_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/layout/coupon_verify_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 18 | 28 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/layout/test.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/layout/title.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/layout/titles.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-hdpi/circulate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-hdpi/circulate.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-hdpi/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-hdpi/heart.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-hdpi/item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-hdpi/item.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-hdpi/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-hdpi/login.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-hdpi/main_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-hdpi/main_page.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-hdpi/my.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-hdpi/my.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-hdpi/no_coupon_ruler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-hdpi/no_coupon_ruler.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-hdpi/nonet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-hdpi/nonet.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-hdpi/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-hdpi/plus.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-hdpi/rightbar3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-hdpi/rightbar3.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-mdpi/a001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-mdpi/a001.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-mdpi/a002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-mdpi/a002.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-mdpi/a003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-mdpi/a003.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-mdpi/a005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-mdpi/a005.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-mdpi/a039.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-mdpi/a039.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-mdpi/a040.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-mdpi/a040.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-mdpi/a041.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-mdpi/a041.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-mdpi/a042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-mdpi/a042.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-mdpi/backbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-mdpi/backbar.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-xhdpi/mainbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-xhdpi/mainbg.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-xhdpi/mainbg2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-xhdpi/mainbg2.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-xhdpi/mainbg3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-xhdpi/mainbg3.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-xhdpi/mainbg4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-xhdpi/mainbg4.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | //主页相关的颜色 8 | #ffffff 9 | #333399 10 | #ff6666 11 | 12 | #333399 13 | #666666 14 | #FFFFCC 15 | #99ccff 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 优惠宝 3 | Sign in 4 | 用户注册 5 | 6 | 7 | 手机号码 8 | 密码 9 | 登录 10 | 注册 11 | Sign in 12 | 用户名格式不正确 13 | 请填写四位以上密码 14 | 密码不正确 15 | This field is required 16 | "Contacts permissions are needed for providing email 17 | completions." 18 | 19 | 20 | 21 | 22 | 手机号码(用户名) 23 | 短信动态码 24 | 获取验证码 25 | 设置密码 26 | 再次输入密码 27 | 商户名 28 | 营业执照号 29 | 法人姓名 30 | 经营范围 31 | 地址 32 | 33 | 34 | Hello blank fragment 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /coupon_merchant_part/app/src/test/java/com/creation/coupon_merchant_part/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.creation.coupon_merchant_part; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /coupon_merchant_part/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | maven { 7 | url 'https://maven.google.com/' 8 | name 'Google' 9 | } 10 | google() 11 | } 12 | dependencies { 13 | classpath 'com.android.tools.build:gradle:3.4.2' 14 | 15 | // NOTE: Do not place your application dependencies here; they belong 16 | // in the individual module build.gradle files 17 | } 18 | } 19 | 20 | allprojects { 21 | repositories { 22 | jcenter() 23 | maven { 24 | url 'https://maven.google.com/' 25 | name 'Google' 26 | } 27 | } 28 | } 29 | 30 | task clean(type: Delete) { 31 | delete rootProject.buildDir 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /coupon_merchant_part/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | android.enableJetifier=true 13 | android.useAndroidX=true 14 | org.gradle.jvmargs=-Xmx1536m 15 | 16 | # When configured, Gradle will run in incubating parallel mode. 17 | # This option should only be used with decoupled projects. More details, visit 18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 19 | # org.gradle.parallel=true 20 | -------------------------------------------------------------------------------- /coupon_merchant_part/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_merchant_part/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /coupon_merchant_part/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Jul 30 13:01:42 CST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip 7 | -------------------------------------------------------------------------------- /coupon_merchant_part/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | --------------------------------------------------------------------------------