├── 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 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 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 | 5 | 6 | 7 | 8 | 9 | 10 | 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 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/layout/activity_test.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/layout/fragment_nearby_merchant.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/layout/fragment_right_wallet.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/layout/fragment_scan_code_pay.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-hdpi/circulate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-hdpi/circulate.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-hdpi/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-hdpi/heart.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-hdpi/item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-hdpi/item.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-hdpi/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-hdpi/login.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-hdpi/main_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-hdpi/main_page.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-hdpi/my.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-hdpi/my.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-hdpi/nonet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-hdpi/nonet.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-hdpi/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-hdpi/plus.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-hdpi/redbaghaha.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-hdpi/redbaghaha.jpg -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-hdpi/rightbar3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-hdpi/rightbar3.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-mdpi/a001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-mdpi/a001.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-mdpi/a002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-mdpi/a002.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-mdpi/a003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-mdpi/a003.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-mdpi/a005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-mdpi/a005.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-mdpi/a039.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-mdpi/a039.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-mdpi/a040.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-mdpi/a040.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-mdpi/a041.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-mdpi/a041.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-mdpi/a042.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-mdpi/a042.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-mdpi/backbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-mdpi/backbar.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-xhdpi/mainbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-xhdpi/mainbg.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-xhdpi/mainbg2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-xhdpi/mainbg2.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-xhdpi/mainbg3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-xhdpi/mainbg3.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/mipmap-xxxhdpi/mainbg4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/mipmap-xxxhdpi/mainbg4.png -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/raw/beep.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/app/src/main/res/raw/beep.ogg -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/values-w820dp/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | 8 | 9 | //主页相关的颜色 10 | #ffffff 11 | #333399 12 | #ff6666 13 | 14 | #333399 15 | #666666 16 | #FFFFCC 17 | #99ccff 18 | 19 | //优惠券背景颜色 20 | #FF69B4 21 | #A9A9A9 22 | #F8F8F8 23 | 24 | 25 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | coupon_customer_part 3 | 4 | 5 | Hello blank fragment 6 | 7 | 用户名不正确 8 | 请填写四位以上密码 9 | 密码不正确 10 | This field is required 11 | "Contacts permissions are needed for providing email 12 | completions." 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /coupon_customer_part/app/src/test/java/com/example/babara/coupon_customer_part/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.example.babara.coupon_customer_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_customer_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 | -------------------------------------------------------------------------------- /coupon_customer_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_customer_part/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_customer_part/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /coupon_customer_part/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Aug 02 09:57:22 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_customer_part/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /coupon_git/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_git/.DS_Store -------------------------------------------------------------------------------- /coupon_git/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/* 2 | *.iml 3 | target/* 4 | -------------------------------------------------------------------------------- /coupon_git/src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_git/src/.DS_Store -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/controller/AbiParse.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.controller; 2 | 3 | 4 | import java.io.InputStream; 5 | 6 | import javax.servlet.ServletConfig; 7 | import javax.servlet.ServletException; 8 | import javax.servlet.http.HttpServlet; 9 | 10 | import com.block.coupon.rpc.Web3; 11 | import com.block.coupon.rpc.WebResourceObj; 12 | import com.sun.jersey.api.client.WebResource; 13 | import net.sf.json.JSONObject; 14 | 15 | public class AbiParse extends HttpServlet { 16 | 17 | /** 18 | * 19 | */ 20 | private Boolean flag=true; 21 | private static final long serialVersionUID = 1L; 22 | 23 | // 项目启动时,解析ABI文件 24 | public void init(ServletConfig arg0) throws ServletException { 25 | if(flag) { 26 | InputStream in = Web3.class.getClassLoader().getResourceAsStream("abi-ours/MerchantABI.txt"); 27 | Web3.addABIFile(in, "Merchant"); 28 | in = Web3.class.getClassLoader().getResourceAsStream("abi-ours/CouponABI.txt"); 29 | Web3.addABIFile(in, "Coupon"); 30 | in = Web3.class.getClassLoader().getResourceAsStream("abi-ours/BankABI.txt"); 31 | Web3.addABIFile(in, "Bank"); 32 | in = Web3.class.getClassLoader().getResourceAsStream("abi-ours/ConsumerABI.txt"); 33 | Web3.addABIFile(in, "Consumer"); 34 | flag = false; 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/controller/MainController.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.controller; 2 | 3 | import com.block.coupon.po.MerchantRegisterCustom; 4 | import com.block.coupon.po.SettlementApplication; 5 | import com.block.coupon.service.BankService; 6 | import com.block.coupon.service.MerchantService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | 11 | import java.util.List; 12 | import java.util.Map; 13 | 14 | 15 | @Controller 16 | @RequestMapping(value = "/main") 17 | public class MainController { 18 | 19 | @Autowired 20 | private BankService bankService; 21 | 22 | 23 | /** 24 | * 跳转到登录界面 25 | * @return 26 | */ 27 | @RequestMapping("/login") 28 | public String toBankStaffRegister() { 29 | return "/bank/login"; 30 | } 31 | 32 | /** 33 | * 跳转到银行职员初审界面 34 | * @return 35 | */ 36 | @RequestMapping("/toFirstTrial") 37 | public String toFirstTrial(Map map) throws Exception { 38 | 39 | return "/bank/firstTrial"; 40 | 41 | } 42 | 43 | /** 44 | * 跳转到复审界面 45 | */ 46 | @RequestMapping("/toReCheck") 47 | public String toReCheck(Map map) throws Exception { 48 | 49 | return "/bank/recheck"; 50 | } 51 | 52 | /** 53 | * 跳转到消费者中心 54 | * @return 55 | */ 56 | @RequestMapping("/toConsumerCenter") 57 | public String toConsumerCenter(Map map) { 58 | return "/bank/consumer"; 59 | } 60 | 61 | /** 62 | * 跳转到消费者中心 63 | * @return 64 | */ 65 | @RequestMapping("/toCouponCenter") 66 | public String toCouponCenter(Map map) { 67 | return "/bank/coupon"; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/interceptors/LoginInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.interceptors; 2 | 3 | import com.block.coupon.po.BankStaffCustom; 4 | import org.springframework.web.servlet.HandlerInterceptor; 5 | import org.springframework.web.servlet.ModelAndView; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | import javax.servlet.http.HttpSession; 10 | 11 | /** 12 | * Created by wufaxiang on 2016/12/22. 13 | */ 14 | public class LoginInterceptor implements HandlerInterceptor{ 15 | @Override 16 | public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception { 17 | // 获取请求的url 18 | String url = httpServletRequest.getRequestURI(); 19 | // 除了登录界面,都进行拦截 20 | if(url.indexOf("login.action")>=0 || url.indexOf("register.action")>=0 21 | || url.indexOf("/merchant")>=0 || url.indexOf("/consumer")>=0){ 22 | return true; 23 | } 24 | HttpSession session = httpServletRequest.getSession(); 25 | BankStaffCustom bankStaffCustom = (BankStaffCustom) session.getAttribute("currenBankStaff"); 26 | if(bankStaffCustom != null) { 27 | String position = bankStaffCustom.getPosition(); 28 | if(position.equals("1") && !url.contains("toReCheck.action")) { 29 | return true; 30 | }else if(position.equals("2") && !url.contains("toFirstTrial")) { 31 | return true; 32 | } 33 | } 34 | httpServletRequest.getRequestDispatcher("/WEB-INF/jsp/bank/login.jsp").forward(httpServletRequest, httpServletResponse); 35 | return false; 36 | } 37 | 38 | @Override 39 | public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception { 40 | 41 | } 42 | 43 | @Override 44 | public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception { 45 | 46 | } 47 | } -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/mapper/BankMapper.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.mapper; 2 | 3 | import com.block.coupon.po.BankStaffCustom; 4 | import com.block.coupon.po.CouponConsumeInfo; 5 | import com.block.coupon.po.CouponMes; 6 | 7 | import java.util.List; 8 | 9 | public interface BankMapper { 10 | 11 | // 根据银行职员id查询其信息 12 | BankStaffCustom queryBankStaffById(String id)throws Exception; 13 | 14 | 15 | // 注册员工 16 | void insertBankStaff(BankStaffCustom bankStaffCustom)throws Exception; 17 | 18 | // 根据员工账户查询其信息 19 | BankStaffCustom queryBankStaffByAccount(String account)throws Exception; 20 | 21 | // 冻结异常账户 22 | void freezeExceptionAccount(String account); 23 | 24 | // 解冻异常账户 25 | void thawExceptionAccount(String account); 26 | 27 | List queryAllCouponMes() throws Exception; 28 | 29 | CouponConsumeInfo queryConsumeMerchant(String couponId)throws Exception; 30 | 31 | void updateOnline(BankStaffCustom bsc) throws Exception; 32 | } 33 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/mapper/BankMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | select * 8 | from bank_staff 9 | where id=#{id} 10 | 11 | 12 | 13 | 14 | insert 15 | into bank_staff(id,account,password,salt,publicKey,position, securityCode) 16 | values(#{id},#{account},#{password},#{salt},#{publicKey},#{position},#{securityCode}) 17 | 18 | 19 | 20 | select * 21 | from bank_staff 22 | where account=#{value} 23 | 24 | 25 | 26 | 27 | update consumer 28 | set isFrozen = 1 29 | where account = #{account} 30 | 31 | 32 | 33 | 34 | update consumer 35 | set isFrozen = 0,mark = 1 36 | where account = #{account} 37 | 38 | 39 | 40 | select c.id,c.couponValue ,m.name,c.consumptionDate,c.status,c.ownerId 41 | from coupon as c,merchant as m,coupon_ruler as cr 42 | where c.rulerId = cr.id and m.id = cr.merchantId 43 | 44 | 45 | 46 | select m.name as consumeMerchant, cpa.applicationTime as consumeTime from coupon_pay_application as cpa, merchant as m 47 | where cpa.couponId=#{value} and cpa.merchantId = m.id 48 | 49 | 50 | 51 | update bank_staff set online=#{online} where id=#{id} 52 | 53 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/mapper/ConsumerMapper.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.mapper; 2 | 3 | import java.util.List; 4 | 5 | import com.block.coupon.po.ConsumerCoupon; 6 | import com.block.coupon.po.ConsumerCustom; 7 | import com.block.coupon.po.ConsumerInfo; 8 | import com.block.coupon.po.ModifyPassVo; 9 | 10 | import java.util.List; 11 | 12 | public interface ConsumerMapper { 13 | 14 | // 消费者注册 15 | void insertConsumer(ConsumerCustom consumerCustom)throws Exception; 16 | 17 | // 获取消费者合约地址 18 | String queryConsumerConAddr(String id)throws Exception; 19 | 20 | ConsumerCustom queryConsumerInfoByAccount(String account); 21 | 22 | void updateToken(ConsumerCustom mc); 23 | 24 | List consumerQueryUnusedCoupons(String consumerId); 25 | 26 | String queryConsumerId(String account); 27 | 28 | String queryConsumerPK(String consumerId); 29 | 30 | List queryConsumerCouponByAddress(String conAddr); 31 | 32 | // 消费者修改密码 33 | void modifyPassword(ModifyPassVo mpv) throws Exception; 34 | 35 | List queryAllConsumerInfo() throws Exception; 36 | 37 | List queryAbnormalConsumerInfo() throws Exception; 38 | 39 | void markAbnormal(String consumerId) throws Exception; 40 | 41 | void markNormal(String consumerId) throws Exception; 42 | 43 | List queryFrozenConsumerInfo() throws Exception; 44 | 45 | List querySearchResult(String account) throws Exception; 46 | 47 | String queryAccountById(String id) throws Exception; 48 | } 49 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/mapper/SettlementOperationMapper.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.mapper; 2 | 3 | import com.block.coupon.po.SettlementApplication; 4 | import com.block.coupon.po.SettlementOperationCustom; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | public interface SettlementOperationMapper { 10 | // 结算券申请初审列表查询 11 | List querySFCList()throws Exception; 12 | 13 | // 结算券申请复审列表查询 14 | List querySSCList()throws Exception; 15 | 16 | 17 | // 结算券提现初审列表查询 18 | List querySWDFList()throws Exception; 19 | 20 | // 结算券提现复审列表查询 21 | List querySWDSList()throws Exception; 22 | 23 | // 更新结算券申请初审结果 24 | void updateSettlementFirstCheck(SettlementOperationCustom settlementOperationCustom)throws Exception; 25 | 26 | // 更新结算券申复审结果 27 | void updateSettlementSecondCheck(SettlementOperationCustom settlementOperationCustom)throws Exception; 28 | 29 | // 结算券操作 30 | void insertSettlementOperation(SettlementOperationCustom settlementOperationCustom)throws Exception; 31 | 32 | SettlementOperationCustom querySettlomentByMerchantId(@Param("merchantId") String merchantId); 33 | 34 | SettlementOperationCustom querySettlementById(String id); 35 | } 36 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/AvailableQuery.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by thomas on 2017/3/29. 5 | */ 6 | public class AvailableQuery { 7 | private String consumerId; 8 | private Integer comsuptionAmount; 9 | 10 | 11 | public String getConsumerId() { 12 | return consumerId; 13 | } 14 | 15 | public void setConsumerId(String consumerId) { 16 | this.consumerId = consumerId; 17 | } 18 | 19 | public Integer getComsuptionAmount() { 20 | return comsuptionAmount; 21 | } 22 | 23 | public void setComsuptionAmount(Integer comsuptionAmount) { 24 | this.comsuptionAmount = comsuptionAmount; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/BankStaff.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | public class BankStaff { 4 | private String id; 5 | 6 | private String account; 7 | 8 | private String password; 9 | 10 | private String salt; 11 | 12 | private String publicKey; 13 | 14 | private String position; 15 | 16 | private String securityCode; 17 | 18 | public String getId() { 19 | return id; 20 | } 21 | 22 | public void setId(String id) { 23 | this.id = id == null ? null : id.trim(); 24 | } 25 | 26 | public String getAccount() { 27 | return account; 28 | } 29 | 30 | public void setAccount(String account) { 31 | this.account = account == null ? null : account.trim(); 32 | } 33 | 34 | public String getPassword() { 35 | return password; 36 | } 37 | 38 | public void setPassword(String password) { 39 | this.password = password == null ? null : password.trim(); 40 | } 41 | 42 | public String getSalt() { 43 | return salt; 44 | } 45 | 46 | public void setSalt(String salt) { 47 | this.salt = salt == null ? null : salt.trim(); 48 | } 49 | 50 | public String getPublicKey() { 51 | return publicKey; 52 | } 53 | 54 | public void setPublicKey(String publicKey) { 55 | this.publicKey = publicKey == null ? null : publicKey.trim(); 56 | } 57 | 58 | public String getPosition() { 59 | return position; 60 | } 61 | 62 | public void setPosition(String position) { 63 | this.position = position == null ? null : position.trim(); 64 | } 65 | 66 | public String getSecurityCode() { 67 | return securityCode; 68 | } 69 | 70 | public void setSecurityCode(String securityCode) { 71 | this.securityCode = securityCode; 72 | } 73 | } -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/BankStaffCustom.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | public class BankStaffCustom extends BankStaff{ 4 | private String online; 5 | 6 | public String getOnline() { 7 | return this.online; 8 | } 9 | 10 | public void setOnline(String online) { 11 | this.online = online; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/BillInfo.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by wxw on 2017/3/8. 5 | */ 6 | public class BillInfo { 7 | private String id; 8 | 9 | public String getId() { 10 | return id; 11 | } 12 | 13 | public void setId(String id) { 14 | this.id = id; 15 | } 16 | 17 | public String getMerchantId() { 18 | return merchantId; 19 | } 20 | 21 | public void setMerchantId(String merchantId) { 22 | this.merchantId = merchantId; 23 | } 24 | 25 | public String getOperationDate() { 26 | return operationDate; 27 | } 28 | 29 | public void setOperationDate(String operationDate) { 30 | this.operationDate = operationDate; 31 | } 32 | 33 | public String getType() { 34 | return type; 35 | } 36 | 37 | public void setType(String type) { 38 | this.type = type; 39 | } 40 | 41 | public Integer getValue() { 42 | return value; 43 | } 44 | 45 | public void setValue(Integer value) { 46 | this.value = value; 47 | } 48 | 49 | private String merchantId; 50 | private String operationDate; 51 | private String type; 52 | private Integer value; 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/Consumer.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | public class Consumer { 4 | private String id; 5 | 6 | private String account; 7 | 8 | private String password; 9 | 10 | private String salt; 11 | 12 | private String publicKey; 13 | 14 | private String contractAddress; 15 | 16 | private String token; 17 | 18 | private String mark; 19 | 20 | public String getPublicKey() { 21 | return publicKey; 22 | } 23 | 24 | public void setPublicKey(String publicKey) { 25 | this.publicKey = publicKey; 26 | } 27 | 28 | public String getId() { 29 | return id; 30 | } 31 | 32 | public void setId(String id) { 33 | this.id = id == null ? null : id.trim(); 34 | } 35 | 36 | public String getAccount() { 37 | return account; 38 | } 39 | 40 | public void setAccount(String account) { 41 | this.account = account == null ? null : account.trim(); 42 | } 43 | 44 | public String getPassword() { 45 | return password; 46 | } 47 | 48 | public void setPassword(String password) { 49 | this.password = password == null ? null : password.trim(); 50 | } 51 | 52 | public String getSalt() { 53 | return salt; 54 | } 55 | 56 | public void setSalt(String salt) { 57 | this.salt = salt == null ? null : salt.trim(); 58 | } 59 | 60 | public String getContractAddress() { 61 | return contractAddress; 62 | } 63 | 64 | public void setContractAddress(String contractAddress) { 65 | this.contractAddress = contractAddress == null ? null : contractAddress.trim(); 66 | } 67 | 68 | public String getToken() { 69 | return token; 70 | } 71 | 72 | public void setToken(String token) { 73 | this.token = token == null ? null : token.trim(); 74 | } 75 | 76 | public String getMark() { 77 | return mark; 78 | } 79 | 80 | public void setMark(String mark) { 81 | this.mark = mark; 82 | } 83 | } -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/ConsumerCoupon.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | public class ConsumerCoupon { 4 | String couponId; 5 | int couponValue; 6 | String validStartDate; 7 | String validEndDate; 8 | String consumptionDate; 9 | String merchantName; 10 | int obtainValue; 11 | 12 | public String getCouponId() { 13 | return couponId; 14 | } 15 | 16 | public void setCouponId(String couponId) { 17 | this.couponId = couponId; 18 | } 19 | 20 | public int getCouponValue() { 21 | return couponValue; 22 | } 23 | 24 | public void setCouponValue(int couponValue) { 25 | this.couponValue = couponValue; 26 | } 27 | 28 | public String getValidStartDate() { 29 | return validStartDate; 30 | } 31 | 32 | public void setValidStartDate(String validStartDate) { 33 | this.validStartDate = validStartDate; 34 | } 35 | 36 | public String getValidEndDate() { 37 | return validEndDate; 38 | } 39 | 40 | public void setValidEndDate(String validEndDate) { 41 | this.validEndDate = validEndDate; 42 | } 43 | 44 | public String getConsumptionDate() { 45 | return consumptionDate; 46 | } 47 | 48 | public void setConsumptionDate(String consumptionDate) { 49 | this.consumptionDate = consumptionDate; 50 | } 51 | 52 | public String getMerchantName() { 53 | return merchantName; 54 | } 55 | 56 | public void setMerchantName(String merchantName) { 57 | this.merchantName = merchantName; 58 | } 59 | 60 | public int getObtainValue() { 61 | return obtainValue; 62 | } 63 | 64 | public void setObtainValue(int obtainValue) { 65 | this.obtainValue = obtainValue; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/ConsumerCustom.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | public class ConsumerCustom extends Consumer{ 4 | 5 | } 6 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/ConsumerInfo.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by thomas on 2017/4/16. 5 | */ 6 | public class ConsumerInfo { 7 | private String consumerId; 8 | private String account; 9 | private String mark;//0异常,1正常 10 | private String isFrozen;//0冻结,1正常 11 | private Integer totalOwn; 12 | private Integer totalConsume; 13 | private Integer totalSendOut; 14 | 15 | public String getMark() { 16 | return mark; 17 | } 18 | 19 | public void setMark(String mark) { 20 | this.mark = mark; 21 | } 22 | 23 | public String getConsumerId() { 24 | return consumerId; 25 | } 26 | 27 | public void setConsumerId(String consumerId) { 28 | this.consumerId = consumerId; 29 | } 30 | 31 | public String getAccount() { 32 | return account; 33 | } 34 | 35 | public void setAccount(String account) { 36 | this.account = account; 37 | } 38 | 39 | public String getIsFrozen() { 40 | return isFrozen; 41 | } 42 | 43 | public void setIsFrozen(String isFrozen) { 44 | this.isFrozen = isFrozen; 45 | } 46 | 47 | public Integer getTotalOwn() { 48 | return totalOwn; 49 | } 50 | 51 | public void setTotalOwn(Integer totalOwn) { 52 | this.totalOwn = totalOwn; 53 | } 54 | 55 | public Integer getTotalConsume() { 56 | return totalConsume; 57 | } 58 | 59 | public void setTotalConsume(Integer totalConsume) { 60 | this.totalConsume = totalConsume; 61 | } 62 | 63 | public Integer getTotalSendOut() { 64 | return totalSendOut; 65 | } 66 | 67 | public void setTotalSendOut(Integer totalSendOut) { 68 | this.totalSendOut = totalSendOut; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/CouponApplicationCustom.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | public class CouponApplicationCustom extends CouponApplication{ 4 | 5 | private String account; 6 | 7 | /** 8 | * 发放优惠券时,一次可能发放多张优惠券 9 | */ 10 | private int couponNum; 11 | 12 | public String getAccount() { 13 | return account; 14 | } 15 | 16 | public void setAccount(String account) { 17 | this.account = account; 18 | } 19 | 20 | public int getCouponNum() { 21 | return couponNum; 22 | } 23 | 24 | public void setCouponNum(int couponNum) { 25 | this.couponNum = couponNum; 26 | } 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/CouponConsumeInfo.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by wxw on 2017/4/18. 5 | */ 6 | public class CouponConsumeInfo { 7 | private String consumeMerchant; 8 | private String consumeTime; 9 | 10 | public String getConsumeMerchant() { 11 | return consumeMerchant; 12 | } 13 | 14 | public void setConsumeMerchant(String consumeMerchant) { 15 | this.consumeMerchant = consumeMerchant; 16 | } 17 | 18 | public String getConsumeTime() { 19 | return consumeTime; 20 | } 21 | 22 | public void setConsumeTime(String consumeTime) { 23 | this.consumeTime = consumeTime; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/CouponCountInfo.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * 查询商户使用和未使用优惠券总额 5 | * @author linbo 6 | * 7 | */ 8 | public class CouponCountInfo { 9 | 10 | private int totalUsedCount; 11 | 12 | private int totalUnusedCount; 13 | 14 | public int getTotalUsedCount() { 15 | return totalUsedCount; 16 | } 17 | 18 | public void setTotalUsedCount(int totalUsedCount) { 19 | this.totalUsedCount = totalUsedCount; 20 | } 21 | 22 | public int getTotalUnusedCount() { 23 | return totalUnusedCount; 24 | } 25 | 26 | public void setTotalUnusedCount(int totalUnusedCount) { 27 | this.totalUnusedCount = totalUnusedCount; 28 | } 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/CouponCustom.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | public class CouponCustom extends Coupon { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/CouponDetail.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by thomas on 2017/4/12. 5 | */ 6 | public class CouponDetail { 7 | private String couponId; 8 | private Integer value; 9 | private String merchantName; 10 | private Integer consumptionValue; 11 | private String consumptionDate; 12 | private String startDate; 13 | private String endDate; 14 | 15 | public String getCouponId() { 16 | return couponId; 17 | } 18 | 19 | public void setCouponId(String couponId) { 20 | this.couponId = couponId; 21 | } 22 | 23 | public Integer getValue() { 24 | return value; 25 | } 26 | 27 | public void setValue(Integer value) { 28 | this.value = value; 29 | } 30 | 31 | public String getMerchantName() { 32 | return merchantName; 33 | } 34 | 35 | public void setMerchantName(String merchantName) { 36 | this.merchantName = merchantName; 37 | } 38 | 39 | public Integer getConsumptionValue() { 40 | return consumptionValue; 41 | } 42 | 43 | public void setConsumptionValue(Integer consumptionValue) { 44 | this.consumptionValue = consumptionValue; 45 | } 46 | 47 | public String getConsumptionDate() { 48 | return consumptionDate; 49 | } 50 | 51 | public void setConsumptionDate(String consumptionDate) { 52 | this.consumptionDate = consumptionDate; 53 | } 54 | 55 | public String getStartDate() { 56 | return startDate; 57 | } 58 | 59 | public void setStartDate(String startDate) { 60 | this.startDate = startDate; 61 | } 62 | 63 | public String getEndDate() { 64 | return endDate; 65 | } 66 | 67 | public void setEndDate(String endDate) { 68 | this.endDate = endDate; 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/CouponInfo.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | 4 | /** 5 | * 商户查询优惠券状态 6 | * 存储优惠券信息 7 | * @author linbo 8 | * 9 | */ 10 | public class CouponInfo { 11 | 12 | private String account; 13 | 14 | private String consumptionDate; 15 | 16 | private int couponValue; 17 | 18 | private String status; 19 | 20 | public String getAccount() { 21 | return account; 22 | } 23 | 24 | public void setAccount(String account) { 25 | this.account = account; 26 | } 27 | 28 | public String getConsumptionDate() { 29 | return consumptionDate; 30 | } 31 | 32 | public void setConsumptionDate(String consumptionDate) { 33 | this.consumptionDate = consumptionDate; 34 | } 35 | 36 | public int getCouponValue() { 37 | return couponValue; 38 | } 39 | 40 | public void setCouponValue(int couponValue) { 41 | this.couponValue = couponValue; 42 | } 43 | 44 | public String getStatus() { 45 | return status; 46 | } 47 | 48 | public void setStatus(String status) { 49 | this.status = status; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/CouponItem.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by thomas on 2017/3/29. 5 | */ 6 | public class CouponItem { 7 | private String couponId; 8 | private Integer amount; 9 | private String obtainTime; 10 | private String validityFrom; 11 | private String validityTo; 12 | 13 | public String getCouponId() { 14 | return couponId; 15 | } 16 | 17 | public void setCouponId(String couponId) { 18 | this.couponId = couponId; 19 | } 20 | 21 | public Integer getAmount() { 22 | return amount; 23 | } 24 | 25 | public void setAmount(Integer amount) { 26 | this.amount = amount; 27 | } 28 | 29 | public String getObtainTime() { 30 | return obtainTime; 31 | } 32 | 33 | public void setObtainTime(String obtainTime) { 34 | this.obtainTime = obtainTime; 35 | } 36 | 37 | public String getValidityFrom() { 38 | return validityFrom; 39 | } 40 | 41 | public void setValidityFrom(String validityFrom) { 42 | this.validityFrom = validityFrom; 43 | } 44 | 45 | public String getValidityTo() { 46 | return validityTo; 47 | } 48 | 49 | public void setValidityTo(String validityTo) { 50 | this.validityTo = validityTo; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/CouponMes.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by wxw on 2017/4/17. 5 | */ 6 | public class CouponMes { 7 | private String id; 8 | private Integer couponValue; 9 | private String name; 10 | private String consumptionDate; 11 | private String status; 12 | private String ownerId; 13 | private String ownerAccount; 14 | private String consumeMerchant; 15 | 16 | public String getId() { 17 | return id; 18 | } 19 | 20 | public void setId(String id) { 21 | this.id = id; 22 | } 23 | 24 | public Integer getCouponValue() { 25 | return couponValue; 26 | } 27 | 28 | public void setCouponValue(Integer couponValue) { 29 | this.couponValue = couponValue; 30 | } 31 | 32 | public String getName() { 33 | return name; 34 | } 35 | 36 | public void setName(String name) { 37 | this.name = name; 38 | } 39 | 40 | public String getConsumptionDate() { 41 | return consumptionDate; 42 | } 43 | 44 | public void setConsumptionDate(String consumptionDate) { 45 | this.consumptionDate = consumptionDate; 46 | } 47 | 48 | public String getStatus() { 49 | return status; 50 | } 51 | 52 | public void setStatus(String status) { 53 | this.status = status; 54 | } 55 | 56 | public String getOwnerId() { 57 | return ownerId; 58 | } 59 | 60 | public void setOwnerId(String ownerId) { 61 | this.ownerId = ownerId; 62 | } 63 | 64 | public String getOwnerAccount() { 65 | return ownerAccount; 66 | } 67 | 68 | public void setOwnerAccount(String ownerAccount) { 69 | this.ownerAccount = ownerAccount; 70 | } 71 | 72 | public String getConsumeMerchant() { 73 | return consumeMerchant; 74 | } 75 | 76 | public void setConsumeMerchant(String consumeMerchant) { 77 | this.consumeMerchant = consumeMerchant; 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/CouponMigration.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by thomas on 2017/4/14. 5 | */ 6 | public class CouponMigration { 7 | private String id; 8 | private String couponId; 9 | private String fromId; 10 | private String toId; 11 | private String operationDate; 12 | 13 | public String getId() { 14 | return id; 15 | } 16 | 17 | public void setId(String id) { 18 | this.id = id; 19 | } 20 | 21 | public String getCouponId() { 22 | return couponId; 23 | } 24 | 25 | public void setCouponId(String couponId) { 26 | this.couponId = couponId; 27 | } 28 | 29 | public String getFromId() { 30 | return fromId; 31 | } 32 | 33 | public void setFromId(String fromId) { 34 | this.fromId = fromId; 35 | } 36 | 37 | public String getToId() { 38 | return toId; 39 | } 40 | 41 | public void setToId(String toId) { 42 | this.toId = toId; 43 | } 44 | 45 | public String getOperationDate() { 46 | return operationDate; 47 | } 48 | 49 | public void setOperationDate(String operationDate) { 50 | this.operationDate = operationDate; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/CouponPayApplication.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | public class CouponPayApplication { 4 | private String id; 5 | 6 | private String merchantId; 7 | 8 | private String consumerId; 9 | 10 | private String couponId; 11 | 12 | private String applicationTime; 13 | 14 | private String applicationCode; 15 | 16 | private String status; 17 | 18 | private Integer consumeValue; 19 | 20 | public String getId() { 21 | return id; 22 | } 23 | 24 | public void setId(String id) { 25 | this.id = id == null ? null : id.trim(); 26 | } 27 | 28 | public String getMerchantId() { 29 | return merchantId; 30 | } 31 | 32 | public void setMerchantId(String merchantId) { 33 | this.merchantId = merchantId == null ? null : merchantId.trim(); 34 | } 35 | 36 | public String getConsumerId() { 37 | return consumerId; 38 | } 39 | 40 | public void setConsumerId(String consumerId) { 41 | this.consumerId = consumerId == null ? null : consumerId.trim(); 42 | } 43 | 44 | public String getCouponId() { 45 | return couponId; 46 | } 47 | 48 | public void setCouponId(String couponId) { 49 | this.couponId = couponId == null ? null : couponId.trim(); 50 | } 51 | 52 | public String getApplicationTime() { 53 | return applicationTime; 54 | } 55 | 56 | public void setApplicationTime(String applicationTime) { 57 | this.applicationTime = applicationTime == null ? null : applicationTime.trim(); 58 | } 59 | 60 | public String getApplicationCode() { 61 | return applicationCode; 62 | } 63 | 64 | public void setApplicationCode(String applicationCode) { 65 | this.applicationCode = applicationCode == null ? null : applicationCode.trim(); 66 | } 67 | 68 | public String getStatus() { 69 | return status; 70 | } 71 | 72 | public void setStatus(String status) { 73 | this.status = status == null ? null : status.trim(); 74 | } 75 | 76 | public Integer getConsumeValue() { 77 | return consumeValue; 78 | } 79 | 80 | public void setConsumeValue(Integer consumeValue) { 81 | this.consumeValue = consumeValue; 82 | } 83 | } -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/CouponPayApplicationCustom.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | public class CouponPayApplicationCustom extends CouponPayApplication{ 4 | 5 | private String account; //消费者账号 6 | private int couponValue; //优惠券面值 7 | 8 | 9 | public String getAccount() { 10 | return account; 11 | } 12 | public void setAccount(String account) { 13 | this.account = account; 14 | } 15 | public int getCouponValue() { 16 | return couponValue; 17 | } 18 | public void setCouponValue(int couponValue) { 19 | this.couponValue = couponValue; 20 | } 21 | 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/CouponRulerCustom.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | public class CouponRulerCustom extends CouponRuler{ 4 | 5 | } 6 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/CouponSummary.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by thomas on 2017/4/11. 5 | */ 6 | public class CouponSummary { 7 | Double outDate; 8 | Double almostOutDate; 9 | Double unused; 10 | Integer totalValue; 11 | 12 | public CouponSummary(Double outDate,Double almostOutDate,Double unused,Integer totalValue){ 13 | this.outDate = outDate; 14 | this.almostOutDate = almostOutDate; 15 | this.unused = unused; 16 | this.totalValue = totalValue; 17 | } 18 | 19 | public Double getOutDate() { 20 | return outDate; 21 | } 22 | 23 | public void setOutDate(Double outDate) { 24 | this.outDate = outDate; 25 | } 26 | 27 | public Double getAlmostOutDate() { 28 | return almostOutDate; 29 | } 30 | 31 | public void setAlmostOutDate(Double almostOutDate) { 32 | this.almostOutDate = almostOutDate; 33 | } 34 | 35 | public Double getUnused() { 36 | return unused; 37 | } 38 | 39 | public void setUnused(Double unused) { 40 | this.unused = unused; 41 | } 42 | 43 | public Integer getTotalValue() { 44 | return totalValue; 45 | } 46 | 47 | public void setTotalValue(Integer totalValue) { 48 | this.totalValue = totalValue; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/Location.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by thomas on 2017/3/28. 5 | */ 6 | public class Location { 7 | private String latitude; 8 | private String longitude; 9 | 10 | public String getLatitude() { 11 | return latitude; 12 | } 13 | 14 | public void setLatitude(String latitude) { 15 | this.latitude = latitude; 16 | } 17 | 18 | public String getLongitude() { 19 | return longitude; 20 | } 21 | 22 | public void setLongitude(String longitude) { 23 | this.longitude = longitude; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/MerchantAccountSetting.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by thomas on 2017/3/7. 5 | */ 6 | public class MerchantAccountSetting { 7 | private String id; 8 | private String name; 9 | private String bankNumber; 10 | private String bankName; 11 | 12 | public String getId() { 13 | return id; 14 | } 15 | 16 | public void setId(String id) { 17 | this.id = id; 18 | } 19 | 20 | public String getName() { 21 | return name; 22 | } 23 | 24 | public void setName(String name) { 25 | this.name = name; 26 | } 27 | 28 | public String getBankNumber() { 29 | return bankNumber; 30 | } 31 | 32 | public void setBankNumber(String bankNumber) { 33 | this.bankNumber = bankNumber; 34 | } 35 | 36 | public String getBankName() { 37 | return bankName; 38 | } 39 | 40 | public void setBankName(String bankName) { 41 | this.bankName = bankName; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/MerchantCustom.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | public class MerchantCustom extends Merchant{ 4 | 5 | } 6 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/MerchantLogin.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by thomas on 2017/3/15. 5 | */ 6 | public class MerchantLogin { 7 | private String account; 8 | private String password; 9 | 10 | public String getAccount() { 11 | return account; 12 | } 13 | 14 | public void setAccount(String account) { 15 | this.account = account; 16 | } 17 | 18 | public String getPassword() { 19 | return password; 20 | } 21 | 22 | public void setPassword(String password) { 23 | this.password = password; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/MerchantRegisterCustom.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | public class MerchantRegisterCustom extends MerchantRegister{ 4 | 5 | } 6 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/MerchantSeting.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by wxw on 2017/3/1. 5 | */ 6 | public class MerchantSeting { 7 | private String name; 8 | private String description; 9 | private String id; 10 | public String getId() { 11 | return id; 12 | } 13 | 14 | public void setId(String id) { 15 | this.id = id; 16 | } 17 | 18 | public String getDescription() { 19 | return description; 20 | } 21 | 22 | public void setDescription(String description) { 23 | this.description = description; 24 | } 25 | 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | public void setName(String name) { 32 | this.name = name; 33 | } 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/MerchantStatus.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by ziqiji on 17/4/8. 5 | */ 6 | public class MerchantStatus { 7 | private String id; 8 | private String status; 9 | 10 | public MerchantStatus(){} 11 | public MerchantStatus(String id, String status){ 12 | this.id = id; 13 | this.status = status; 14 | } 15 | public String getId() { 16 | return id; 17 | } 18 | 19 | public void setId(String id) { 20 | this.id = id; 21 | } 22 | 23 | public String getStatus() { 24 | return status; 25 | } 26 | 27 | public void setStatus(String status) { 28 | this.status = status; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/ModifyPassVo.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | public class ModifyPassVo { 4 | String account; 5 | String oldPassword; 6 | String newPassword; 7 | 8 | public String getAccount() { 9 | return account; 10 | } 11 | public void setAccount(String account) { 12 | this.account = account; 13 | } 14 | public String getNewPassword() { 15 | return newPassword; 16 | } 17 | public void setNewPassword(String newPassword) { 18 | this.newPassword = newPassword; 19 | } 20 | 21 | public String getOldPassword() { 22 | return oldPassword; 23 | } 24 | 25 | public void setOldPassword(String oldPassword) { 26 | this.oldPassword = oldPassword; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/NearbyMerchantDist.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by thomas on 2017/3/28. 5 | */ 6 | public class NearbyMerchantDist { 7 | private String merchantName; 8 | private String merchantInfo; 9 | private String merchantId; 10 | private String latitude; 11 | private String longitude; 12 | 13 | 14 | 15 | public String getMerchantName() { 16 | return merchantName; 17 | } 18 | 19 | public void setMerchantName(String merchantName) { 20 | this.merchantName = merchantName; 21 | } 22 | 23 | public String getMerchantInfo() { 24 | return merchantInfo; 25 | } 26 | 27 | public void setMerchantInfo(String merchantInfo) { 28 | this.merchantInfo = merchantInfo; 29 | } 30 | 31 | public String getMerchantId() { 32 | return merchantId; 33 | } 34 | 35 | public void setMerchantId(String merchantId) { 36 | this.merchantId = merchantId; 37 | } 38 | 39 | public String getLatitude() { 40 | return latitude; 41 | } 42 | 43 | public void setLatitude(String latitude) { 44 | this.latitude = latitude; 45 | } 46 | 47 | public String getLongitude() { 48 | return longitude; 49 | } 50 | 51 | public void setLongitude(String longitude) { 52 | this.longitude = longitude; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/NearbyMerchantItem.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by thomas on 2017/3/28. 5 | */ 6 | public class NearbyMerchantItem { 7 | private String distance; 8 | private String merchantName; 9 | private String merchantInfo; 10 | private String merchantId; 11 | 12 | public String getDistance() { 13 | return distance; 14 | } 15 | 16 | public void setDistance(String distance) { 17 | this.distance = distance; 18 | } 19 | 20 | public String getMerchantName() { 21 | return merchantName; 22 | } 23 | 24 | public void setMerchantName(String merchantName) { 25 | this.merchantName = merchantName; 26 | } 27 | 28 | public String getMerchantInfo() { 29 | return merchantInfo; 30 | } 31 | 32 | public void setMerchantInfo(String merchantInfo) { 33 | this.merchantInfo = merchantInfo; 34 | } 35 | 36 | public String getMerchantId() { 37 | return merchantId; 38 | } 39 | 40 | public void setMerchantId(String merchantId) { 41 | this.merchantId = merchantId; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/QueryCouponStatus.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * 商户查询优惠券状态, 5 | * 传入参数:商户id,筛选开始日期,筛选截止日期 6 | * @author linbo 7 | * 8 | */ 9 | public class QueryCouponStatus { 10 | 11 | private String id; //商户id 12 | 13 | private String conCurrentCouponRulerId; 14 | 15 | private String startDate; 16 | 17 | private String endDate; 18 | 19 | public String getId() { 20 | return id; 21 | } 22 | 23 | public String getConCurrentCouponRulerId() { 24 | return conCurrentCouponRulerId; 25 | } 26 | 27 | public void setConCurrentCouponRulerId(String conCurrentCouponRulerId) { 28 | this.conCurrentCouponRulerId = conCurrentCouponRulerId; 29 | } 30 | 31 | 32 | 33 | public void setId(String id) { 34 | this.id = id; 35 | } 36 | 37 | public String getStartDate() { 38 | return startDate; 39 | } 40 | 41 | public void setStartDate(String startDate) { 42 | this.startDate = startDate; 43 | } 44 | 45 | public String getEndDate() { 46 | return endDate; 47 | } 48 | 49 | public void setEndDate(String endDate) { 50 | this.endDate = endDate; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/QueryMerchantBill.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by wxw on 2017/3/8. 5 | */ 6 | public class QueryMerchantBill { 7 | private String id; //商户id 8 | 9 | public String getId() { 10 | return id; 11 | } 12 | 13 | public void setId(String id) { 14 | this.id = id; 15 | } 16 | 17 | public String getStartDate() { 18 | return startDate; 19 | } 20 | 21 | public void setStartDate(String startDate) { 22 | this.startDate = startDate; 23 | } 24 | 25 | public String getEndDate() { 26 | return endDate; 27 | } 28 | 29 | public void setEndDate(String endDate) { 30 | this.endDate = endDate; 31 | } 32 | 33 | private String startDate; 34 | 35 | private String endDate; 36 | } 37 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/QueryMerchantBills.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | public class QueryMerchantBills { 4 | private String id; //商户id 5 | 6 | private String startDate; 7 | 8 | private String endDate; 9 | 10 | public String getId() { 11 | return id; 12 | } 13 | 14 | public void setId(String id) { 15 | this.id = id; 16 | } 17 | 18 | public String getStartDate() { 19 | return startDate; 20 | } 21 | 22 | public void setStartDate(String startDate) { 23 | this.startDate = startDate; 24 | } 25 | 26 | public String getEndDate() { 27 | return endDate; 28 | } 29 | 30 | public void setEndDate(String endDate) { 31 | this.endDate = endDate; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/QuerySettlementCustom.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by admin on 2017/3/1. 5 | */ 6 | public class QuerySettlementCustom { 7 | private String merchantId; 8 | private String startDate; 9 | private String endDate; 10 | 11 | public String getMerchantId(String s) { 12 | return merchantId; 13 | } 14 | 15 | public void setMerchantId(String merchantId) { 16 | this.merchantId = merchantId; 17 | } 18 | 19 | public String getStartDate() { 20 | return startDate; 21 | } 22 | 23 | public void setStartDate(String startDate) { 24 | this.startDate = startDate; 25 | } 26 | 27 | public String getEndDate() { 28 | return endDate; 29 | } 30 | 31 | public void setEndDate(String endDate) { 32 | this.endDate = endDate; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/SettlementApplication.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | 4 | /** 5 | * 用于映射查询到的结算券申请信息 6 | * @author linbo 7 | * 8 | */ 9 | public class SettlementApplication { 10 | 11 | private String id; 12 | 13 | private String merchantId; 14 | 15 | private String merchantName; 16 | 17 | private String operationAmount; 18 | 19 | private String operationDate; 20 | 21 | private String firstEncryptStr; 22 | 23 | public String getId() { 24 | return id; 25 | } 26 | 27 | public void setId(String id) { 28 | this.id = id; 29 | } 30 | 31 | public String getMerchantId() { 32 | return merchantId; 33 | } 34 | 35 | public void setMerchantId(String merchantId) { 36 | this.merchantId = merchantId; 37 | } 38 | 39 | public String getMerchantName() { 40 | return merchantName; 41 | } 42 | 43 | public void setMerchantName(String merchantName) { 44 | this.merchantName = merchantName; 45 | } 46 | 47 | public String getOperationAmount() { 48 | return operationAmount; 49 | } 50 | 51 | public void setOperationAmount(String operationAmount) { 52 | this.operationAmount = operationAmount; 53 | } 54 | 55 | public String getOperationDate() { 56 | return operationDate; 57 | } 58 | 59 | public void setOperationDate(String operationDate) { 60 | this.operationDate = operationDate; 61 | } 62 | 63 | public String getFirstEncryptStr() { 64 | return firstEncryptStr; 65 | } 66 | 67 | public void setFirstEncryptStr(String firstEncryptStr) { 68 | this.firstEncryptStr = firstEncryptStr; 69 | } 70 | 71 | 72 | 73 | } 74 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/SettlementOperationCustom.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | public class SettlementOperationCustom extends SettlementOperation{ 4 | private String merchantName; 5 | 6 | private String bankStaffId; 7 | 8 | public String getMerchantName() { 9 | return merchantName; 10 | } 11 | 12 | public void setMerchantName(String merchantName) { 13 | this.merchantName = merchantName; 14 | } 15 | 16 | public String getBankStaffId() { 17 | return bankStaffId; 18 | } 19 | 20 | public void setBankStaffId(String bankStaffId) { 21 | this.bankStaffId = bankStaffId; 22 | } 23 | 24 | 25 | @Override 26 | public String toString() { 27 | return "SettlementOperationCustom{" + 28 | "SettlementOperation{"+ 29 | "SettlementOperation{" + 30 | "id='" + getId() + '\'' + 31 | ", merchantId='" + getMerchantId() + '\'' + 32 | ", operationAmount=" + getOperationAmount() + 33 | ", operationDate='" + getOperationDate() + '\'' + 34 | ", operationType='" + getOperationType() + '\'' + 35 | ", operatorId='" + getOperatorId() + '\'' + 36 | ", operationTime='" + getOperationTime() + '\'' + 37 | ", operatorOpinion='" + getOperatorOpinion() + '\'' + 38 | ", checkStatus='" + getCheckStatus() + '\'' + 39 | ", firstEncryptStr='" + getFirstEncryptStr() + '\'' + 40 | ", recheckId='" + getRecheckId() + '\'' + 41 | ", recheckTime='" + getRecheckTime() + '\'' + 42 | ", recheckOpinion='" + getRecheckOpinion() + '\'' + 43 | ", recheckStatus='" + getRecheckStatus() + '\'' + 44 | ", secondEncryptStr='" + getSecondEncryptStr() + '\'' + 45 | '}' + 46 | "merchantName='" + merchantName + '\'' + 47 | ", bankStaffId='" + bankStaffId + '\'' + 48 | '}'; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/SettlementRecord.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by admin on 2017/3/1. 5 | */ 6 | public class SettlementRecord { 7 | private String merchantId; 8 | private String operationDate; 9 | private String operationType; 10 | private Integer operationAmount; 11 | private String recheckStatus; 12 | 13 | public String getOperationDate() { 14 | return operationDate; 15 | } 16 | 17 | public void setOperationDate(String operationDate) { 18 | this.operationDate = operationDate; 19 | } 20 | 21 | public String getOperationType() { 22 | return operationType; 23 | } 24 | 25 | public void setOperationType(String operationType) { 26 | this.operationType = operationType; 27 | } 28 | 29 | public Integer getOperationAmount() { 30 | return operationAmount; 31 | } 32 | 33 | public void setOperationAmount(Integer operationAmount) { 34 | this.operationAmount = operationAmount; 35 | } 36 | 37 | public String getMerchantId() { 38 | return merchantId; 39 | } 40 | 41 | public void setMerchantId(String merchantId) { 42 | this.merchantId = merchantId; 43 | } 44 | 45 | public String getRecheckStatus() { 46 | return recheckStatus; 47 | } 48 | 49 | public void setRecheckStatus(String recheckStatus) { 50 | this.recheckStatus = recheckStatus; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/UpdateCouponOwner.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by ziqiji on 17/3/28. 5 | */ 6 | public class UpdateCouponOwner { 7 | private String targetId; 8 | private String couponsId; 9 | 10 | public String getTargetId() { 11 | return targetId; 12 | } 13 | 14 | public void setTargetId(String targetId) { 15 | this.targetId = targetId; 16 | } 17 | 18 | public String getCouponsId() { 19 | return couponsId; 20 | } 21 | 22 | public void setCouponsId(String couponsId) { 23 | this.couponsId = couponsId; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/UpdateCouponPayParam.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | 4 | public class UpdateCouponPayParam { 5 | private String applicationCode; 6 | private String id; 7 | 8 | public String getApplicationCode() { 9 | return applicationCode; 10 | } 11 | 12 | public void setApplicationCode(String applicationCode) { 13 | this.applicationCode = applicationCode; 14 | } 15 | 16 | public String getId() { 17 | return id; 18 | } 19 | 20 | public void setId(String id) { 21 | this.id = id; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/po/srcnew.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.po; 2 | 3 | /** 4 | * Created by admin on 2017/3/1. 5 | */ 6 | public class srcnew { 7 | 8 | } 9 | 10 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/rpc/TestMain.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.rpc; 2 | 3 | import com.block.coupon.po.MerchantCustom; 4 | import com.block.coupon.util.ReadAccount; 5 | import com.sun.jersey.api.client.WebResource; 6 | 7 | import net.sf.json.JSONObject; 8 | 9 | import java.io.IOException; 10 | import java.util.List; 11 | 12 | public class TestMain { 13 | static String contractAddress; 14 | public static void main(String[] args) throws IOException{ 15 | 16 | String code = "contract A{uint a;bool locked;function A(){a=10;locked=false;}function getA() constant returns(uint){while(locked){}return a;}function setA(uint x){lock();a=x;unlock();}function lock(){locked=true;}function unlock(){locked=false;}}"; 17 | String funcName1 = "eth_compileSolidity()"; 18 | String txHash = Web3.universalCall(funcName1,"{from:"+ReadAccount.getAccount("bankAccount")+",\"data\":"+code+",\"gas\":"+"0x470000}",null,null); 19 | String finish = "null"; 20 | String[] content = {txHash}; 21 | while(finish.equals("null")){ 22 | finish = Web3.universalCall("eth_getTransactionReceipt",null, content,null); 23 | } 24 | JSONObject jo = JSONObject.fromObject(finish); 25 | contractAddress = jo.getString("contractAddress"); 26 | 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/rpc/WebResourceObj.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.rpc; 2 | 3 | import com.sun.jersey.api.client.Client; 4 | import com.sun.jersey.api.client.WebResource; 5 | import com.sun.jersey.api.client.config.ClientConfig; 6 | import com.sun.jersey.api.client.config.DefaultClientConfig; 7 | import com.sun.jersey.api.json.JSONConfiguration; 8 | 9 | public class WebResourceObj { 10 | 11 | // private final static String ROUTE="http://192.168.137.176:8545"; 12 | 13 | // private final static String ROUTE="http://10.82.59.76:8545"; 14 | 15 | private final static String ROUTE="http://127.0.0.1:8545"; 16 | 17 | public static WebResource getWebResource(){ 18 | // 客户端配置对象 19 | ClientConfig clientConfig = new DefaultClientConfig(); 20 | // 进行相关配置 21 | clientConfig.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE ); 22 | // 使用客户端配置对象创建客户端 23 | Client client = Client.create(clientConfig); 24 | 25 | WebResource r = client.resource(ROUTE); 26 | 27 | return r; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/service/ConsumerService.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.service; 2 | 3 | import com.block.coupon.po.*; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | public interface ConsumerService { 9 | 10 | // 注册消费者 11 | String consumerRegister(ConsumerCustom consumerCustom)throws Exception; 12 | 13 | Map consumerLogin(String account,String password) throws Exception; 14 | 15 | // 消费者修改密码 16 | String modifyPassword(ModifyPassVo mpv) throws Exception; 17 | 18 | 19 | // 插入优惠券申请 20 | String insertCouponApplication(CouponApplicationCustom couponApplicationCustom)throws Exception; 21 | 22 | // 添加优惠券支付申请 23 | String insertCouponPayApp(String merchantId, String consumerId, String couponIds, Integer consumeValue)throws Exception; 24 | 25 | // 查询可用的优惠券 26 | List queryAvailableCoupons(AvailableQuery aq) throws Exception; 27 | 28 | // 转赠优惠券 29 | String presentCoupon(String from, String to, String couponId); 30 | 31 | List queryConsumerCouponByAddress(String consumerId) throws Exception; 32 | 33 | // 获取消费者所有的优惠券并分类 34 | CouponSummary CalculateCouponSummary(String consumerId) throws Exception; 35 | 36 | // 获取消费者所有优惠券的细节信息 37 | Map> queryAllCouponDetails(String consumerId) throws Exception; 38 | } 39 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/sha3/Sha3.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.sha3; 2 | 3 | 4 | import java.util.Formatter; 5 | 6 | 7 | public class Sha3 { 8 | 9 | // 返回sha3加密算法的256位加密结果 10 | public static String sha3(String str) { 11 | byte[] b = getByteArray(str); 12 | String s = getHexStringByByteArray(b); 13 | Keccak keccak = new Keccak(1600); 14 | 15 | // System.out.println("sha-224 = " + keccak.getHash(s, 1152, 28)); 16 | String sha3Str=keccak.getHash(s, 1088, 32); 17 | // System.out.println("sha-384 = " + keccak.getHash(s, 832, 48)); 18 | // System.out.println("sha-512 = " + keccak.getHash(s, 576, 64)); 19 | return sha3Str; 20 | } 21 | 22 | public static byte[] getByteArray(String s) { 23 | return (s != null) ? s.getBytes(): null; 24 | } 25 | 26 | /** 27 | * Convert the byte array to a hex-string. 28 | * 29 | * @param array byte array 30 | * @return hex string 31 | */ 32 | public static String getHexStringByByteArray(byte[] array) { 33 | if (array == null) 34 | return null; 35 | 36 | StringBuilder stringBuilder = new StringBuilder(array.length * 2); 37 | @SuppressWarnings("resource") 38 | Formatter formatter = new Formatter(stringBuilder); 39 | for (byte tempByte : array) 40 | formatter.format("%02x", tempByte); 41 | 42 | return stringBuilder.toString(); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/util/CreatePublicKey.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.util; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.IOException; 5 | import java.io.InputStreamReader; 6 | 7 | 8 | /** 9 | * 创建商户公钥 10 | * @author linbo 11 | * 12 | */ 13 | public class CreatePublicKey { 14 | public static String create() { 15 | try { 16 | String commands="geth --password ./passwd account new"; 17 | Process process=Runtime.getRuntime().exec(commands); 18 | InputStreamReader ir=new InputStreamReader(process.getInputStream()); 19 | BufferedReader br=new BufferedReader(ir); 20 | String line; 21 | if((line=br.readLine())!=null){ 22 | return line.substring(line.indexOf("{")+1, line.lastIndexOf("}")); 23 | }else{ 24 | return null; 25 | } 26 | 27 | } catch (IOException e) { 28 | // TODO Auto-generated catch block 29 | System.err.println("IOException"+e.getMessage()); 30 | return null; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/util/DateUtil.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.util; 2 | 3 | import java.text.ParseException; 4 | import java.text.SimpleDateFormat; 5 | import java.util.Date; 6 | 7 | public class DateUtil { 8 | 9 | static public String getCurrentDate(){ 10 | Date date=new Date(); 11 | SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd"); 12 | return simpleDateFormat.format(date); 13 | } 14 | 15 | static public String getCurrentTime() { 16 | Date date=new Date(); 17 | SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 18 | return simpleDateFormat.format(date); 19 | } 20 | 21 | // 将字符串转化为日期 22 | static public Date getString2Date(String date) throws ParseException{ 23 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); 24 | return sdf.parse(date); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/util/DistanceComparator.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.util; 2 | 3 | import com.block.coupon.po.NearbyMerchantItem; 4 | 5 | import java.util.Comparator; 6 | 7 | 8 | public class DistanceComparator implements Comparator { 9 | 10 | @Override 11 | public int compare(Object o1, Object o2) { 12 | if(Double.parseDouble(((NearbyMerchantItem)o1).getDistance()) < 13 | Double.parseDouble(((NearbyMerchantItem)o2).getDistance())){ 14 | return 1; 15 | }else if(Double.parseDouble(((NearbyMerchantItem)o1).getDistance()) > 16 | Double.parseDouble(((NearbyMerchantItem)o2).getDistance())){ 17 | return -1; 18 | } 19 | return 0; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/util/Encryption.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.util; 2 | 3 | import java.util.Random; 4 | 5 | /** 6 | * 生成盐,为密码加密 7 | * @author linbo 8 | * 9 | */ 10 | public class Encryption { 11 | 12 | private static final int SALT_LENGTH=8; 13 | 14 | public static String createSalt() { 15 | String s = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; 16 | Random r = new Random(); 17 | StringBuilder sb =new StringBuilder(); 18 | for (int i =0; i < SALT_LENGTH; i++ ){ 19 | int n = r.nextInt(62); 20 | sb.append(s.substring(n, n+1)); 21 | } 22 | return sb.toString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /coupon_git/src/main/java/com/block/coupon/util/JSONUtils.java: -------------------------------------------------------------------------------- 1 | package com.block.coupon.util; 2 | 3 | import java.io.IOException; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import org.codehaus.jackson.JsonGenerationException; 8 | import org.codehaus.jackson.map.JsonMappingException; 9 | import org.codehaus.jackson.map.ObjectMapper; 10 | import org.codehaus.jettison.json.JSONArray; 11 | import org.codehaus.jettison.json.JSONException; 12 | 13 | import com.alibaba.fastjson.JSONObject; 14 | /** 15 | * Created by thomas on 2017/2/28. 16 | */ 17 | 18 | public class JSONUtils { 19 | public static T jsonToObj(String json_str, Class obj){ 20 | T t = null; 21 | try{ 22 | ObjectMapper objectMapper = new ObjectMapper(); 23 | t = objectMapper.readValue(json_str,obj); 24 | }catch(Exception e){ 25 | e.printStackTrace(); 26 | } 27 | return t; 28 | } 29 | 30 | public static String objTojson(T obj) throws JSONException, IOException{ 31 | /*String json_str = ""; 32 | ObjectMapper objectMapper = new ObjectMapper(); 33 | json_str = objectMapper.writeValueAsString(obj); 34 | return json_str;*/ 35 | return JSONObject.toJSONString(obj); 36 | } 37 | 38 | public static List jArraytoList(String json_str, Class obj) throws JSONException{ 39 | List result_list = new ArrayList(); 40 | JSONArray array = new JSONArray(json_str); 41 | for(int i=0;i 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /coupon_git/src/main/test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_git/src/main/test -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/Front/coupon.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_git/src/main/webapp/Front/coupon.html -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/Front/css/main.css: -------------------------------------------------------------------------------- 1 | .w-45 { width: 45% } 2 | .mt10 { margin-top: 10px } -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/Front/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_git/src/main/webapp/Front/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/Front/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_git/src/main/webapp/Front/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/Front/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Blockchain-book/Ethereum-Coupon/77cfc4bab54a1f5d695d22c052452645e0d9a2f8/coupon_git/src/main/webapp/Front/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/Front/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/Front/js/utils.js: -------------------------------------------------------------------------------- 1 | // 通用方法和工具 2 | 3 | -------------------------------------------------------------------------------- /coupon_git/src/main/webapp/Front/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 区块链优惠券系统管理后台 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 登陆 24 | 没有帐号?点击注册 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 操作员 33 | 34 | 35 | 复审员 36 | 37 | 38 | 注册 39 | 已有帐号?点击登录 40 | 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 | 33 | 34 | « 35 | 1 36 | 2 37 | 3 38 | 4 39 | 5 40 | » 41 | 42 | 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 | 优惠券id 13 | 14 | 15 | 16 | 17 | 搜索 18 | 19 | 20 | 21 | 22 | 23 | 24 | 优惠券id:消费者3 25 | 状态:已冻结 26 | 27 | 28 | 解冻 29 | 30 | 31 | 32 | 33 | 34 | « 35 | 1 36 | 2 37 | 3 38 | 4 39 | 5 40 | » 41 | 42 | 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 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 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 | 5 | 6 | 7 | 8 | 9 | 10 | 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 | --------------------------------------------------------------------------------
用户名:消费者3
状态:已冻结
优惠券id:消费者3