Copy disabled (too large)
Download .txt
Showing preview only (10,605K chars total). Download the full file to get everything.
Repository: qiurunze123/miaosha
Branch: master
Commit: e58017658e54
Files: 866
Total size: 9.9 MB
Directory structure:
gitextract_75nft3s6/
├── .gitattributes
├── .gitignore
├── CHANGELOG.md
├── README.md
├── docs/
│ ├── code-criterion.md
│ ├── code-rpc.md
│ ├── code-solve.md
│ ├── dubbo-admin.md
│ ├── dubbo-zk.md
│ ├── fenbushi-tcc.md
│ ├── fenbushi.md
│ ├── jemter-solve.md
│ ├── jvm-goods.md
│ ├── linux.md
│ ├── maven-wrapper.md
│ ├── mybatis-code.md
│ ├── mysql-2.md
│ ├── mysql-3.md
│ ├── mysql-master-slave.md
│ ├── mysql-mvcc.md
│ ├── mysql.md
│ ├── netty.md
│ ├── ngnix-good.md
│ ├── old.md
│ ├── redis-good.md
│ ├── redis-lua.md
│ └── tomcat-good.md
├── miaosha-admin/
│ ├── .gitignore
│ ├── miaosha-admin-api/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── geekq/
│ │ └── admin/
│ │ ├── entity/
│ │ │ ├── Account.java
│ │ │ ├── BaseDomain.java
│ │ │ ├── IpLog.java
│ │ │ ├── Logininfo.java
│ │ │ ├── SystemDictionary.java
│ │ │ ├── SystemDictionaryItem.java
│ │ │ └── Userinfo.java
│ │ ├── pojo/
│ │ │ ├── Orders.java
│ │ │ └── OrdersExample.java
│ │ ├── query/
│ │ │ ├── IpLogQueryObject.java
│ │ │ ├── PageResult.java
│ │ │ ├── QueryObject.java
│ │ │ └── SystemDictionaryQueryObject.java
│ │ └── service/
│ │ ├── IAccountService.java
│ │ ├── IIpLogService.java
│ │ ├── ILogininfoService.java
│ │ ├── ISystemDictionaryService.java
│ │ ├── IUserService.java
│ │ ├── OrdersService.java
│ │ └── RedisCacheStorageService.java
│ ├── miaosha-admin-common/
│ │ ├── .gitignore
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── geekq/
│ │ └── common/
│ │ ├── enums/
│ │ │ ├── Constants.java
│ │ │ ├── MessageStatus.java
│ │ │ ├── OrderStatusEnum.java
│ │ │ ├── ResultStatus.java
│ │ │ ├── SexEnum.java
│ │ │ └── YesOrNo.java
│ │ ├── utils/
│ │ │ ├── Constanst.java
│ │ │ ├── DBContextUtil.java
│ │ │ ├── DateUtil.java
│ │ │ ├── JsonUtils.java
│ │ │ ├── SnowflakeIdWorker.java
│ │ │ ├── ValidatorUtil.java
│ │ │ ├── md5/
│ │ │ │ └── MD5Utils.java
│ │ │ ├── numcal/
│ │ │ │ ├── BidConst.java
│ │ │ │ ├── BitStatesUtils.java
│ │ │ │ ├── CalculateUtil.java
│ │ │ │ └── DecimalFormatUtil.java
│ │ │ └── resultbean/
│ │ │ ├── AbstractResult.java
│ │ │ ├── ResultGeekQ.java
│ │ │ └── ResultJSON.java
│ │ ├── validator/
│ │ │ ├── MobileCheck.java
│ │ │ └── MobileValidator.java
│ │ └── vo/
│ │ └── LoginVo.java
│ ├── miaosha-admin-service/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── geekq/
│ │ │ └── admin/
│ │ │ ├── mapper/
│ │ │ │ ├── AccountMapper.java
│ │ │ │ ├── AccountMapper.xml
│ │ │ │ ├── IpLogMapper.java
│ │ │ │ ├── IpLogMapper.xml
│ │ │ │ ├── LogininfoMapper.java
│ │ │ │ ├── LogininfoMapper.xml
│ │ │ │ ├── OrdersMapper.java
│ │ │ │ ├── OrdersMapper.xml
│ │ │ │ ├── SystemDictionaryItemMapper.java
│ │ │ │ ├── SystemDictionaryItemMapper.xml
│ │ │ │ ├── SystemDictionaryMapper.java
│ │ │ │ ├── SystemDictionaryMapper.xml
│ │ │ │ ├── UserinfoMapper.java
│ │ │ │ └── UserinfoMapper.xml
│ │ │ ├── redis/
│ │ │ │ └── RedisClient.java
│ │ │ ├── service/
│ │ │ │ └── impl/
│ │ │ │ ├── AccountServiceImpl.java
│ │ │ │ ├── IpLogServiceImpl.java
│ │ │ │ ├── LogininfoServiceImpl.java
│ │ │ │ ├── OrdersServiceImpl.java
│ │ │ │ ├── RedisCache.java
│ │ │ │ ├── RedisCacheStorageServiceImpl.java
│ │ │ │ ├── SystemDictionaryServiceImpl.java
│ │ │ │ ├── SystemDictionaryUtil.java
│ │ │ │ └── UserServiceImpl.java
│ │ │ └── utils/
│ │ │ └── UserContext.java
│ │ ├── resources/
│ │ │ ├── dubbo/
│ │ │ │ └── dubbo.xsd
│ │ │ ├── log4j.properties
│ │ │ ├── mybatis/
│ │ │ │ └── SqlMapConfig.xml
│ │ │ ├── resource/
│ │ │ │ ├── db.properties
│ │ │ │ └── redis.properties
│ │ │ └── spring/
│ │ │ ├── applicationContext-dao.xml
│ │ │ ├── applicationContext-dubbo-provider.xml
│ │ │ ├── applicationContext-redis.xml
│ │ │ ├── applicationContext-service.xml
│ │ │ ├── applicationContext-transaction.xml
│ │ │ └── spring-context.xml
│ │ └── webapp/
│ │ └── WEB-INF/
│ │ └── web.xml
│ ├── miaosha-admin-web/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── geekq/
│ │ │ └── web/
│ │ │ ├── controller/
│ │ │ │ ├── BaseController.java
│ │ │ │ ├── LoginController.java
│ │ │ │ ├── PayController.java
│ │ │ │ ├── PersonController.java
│ │ │ │ └── RegisterController.java
│ │ │ ├── interceptor/
│ │ │ │ ├── AddGlobalUtilInterceptor.java
│ │ │ │ ├── LoginInterceptor.java
│ │ │ │ └── RequiredLogin.java
│ │ │ └── service/
│ │ │ ├── CulsterService.java
│ │ │ └── impl/
│ │ │ └── CulsterServiceImpl.java
│ │ ├── resources/
│ │ │ ├── log4j.properties
│ │ │ └── spring/
│ │ │ ├── applicationContext-dubbo-consumer.xml
│ │ │ ├── applicationContext-service.xml
│ │ │ └── springmvc.xml
│ │ └── webapp/
│ │ ├── WEB-INF/
│ │ │ ├── views/
│ │ │ │ ├── bankInfo.ftl
│ │ │ │ ├── bankInfo_result.ftl
│ │ │ │ ├── bidRequest_list.ftl
│ │ │ │ ├── bid_list.ftl
│ │ │ │ ├── borrow.ftl
│ │ │ │ ├── borrow_apply.ftl
│ │ │ │ ├── borrow_apply_result.ftl
│ │ │ │ ├── borrow_info.ftl
│ │ │ │ ├── checkmail_result.ftl
│ │ │ │ ├── common/
│ │ │ │ │ ├── footer-tpl.ftl
│ │ │ │ │ ├── head-tpl.ftl
│ │ │ │ │ ├── leftmenu-tpl.ftl
│ │ │ │ │ ├── links-tpl.ftl
│ │ │ │ │ ├── loadSystemDictionary-macro.ftl
│ │ │ │ │ └── navbar-tpl.ftl
│ │ │ │ ├── invest.ftl
│ │ │ │ ├── invest_list.ftl
│ │ │ │ ├── iplog_list.ftl
│ │ │ │ ├── main.ftl
│ │ │ │ ├── moneyWithdraw_apply.ftl
│ │ │ │ ├── personal.ftl
│ │ │ │ ├── realAuth.ftl
│ │ │ │ ├── realAuth_result.ftl
│ │ │ │ ├── recharge.ftl
│ │ │ │ ├── recharge_list.ftl
│ │ │ │ ├── returnmoney_list.ftl
│ │ │ │ ├── userFiles.ftl
│ │ │ │ ├── userFiles_commit.ftl
│ │ │ │ └── userInfo.ftl
│ │ │ └── web.xml
│ │ ├── bootstrap.html
│ │ ├── borrow.html
│ │ ├── css/
│ │ │ ├── account.css
│ │ │ ├── bank.css
│ │ │ └── core.css
│ │ ├── index.html
│ │ ├── js/
│ │ │ ├── My97DatePicker/
│ │ │ │ ├── My97DatePicker.htm
│ │ │ │ ├── WdatePicker.js
│ │ │ │ ├── calendar.js
│ │ │ │ ├── config.js
│ │ │ │ ├── lang/
│ │ │ │ │ ├── en.js
│ │ │ │ │ ├── zh-cn.js
│ │ │ │ │ └── zh-tw.js
│ │ │ │ └── skin/
│ │ │ │ ├── WdatePicker.css
│ │ │ │ ├── default/
│ │ │ │ │ └── datepicker.css
│ │ │ │ └── whyGreen/
│ │ │ │ └── datepicker.css
│ │ │ ├── bank.js
│ │ │ ├── bootstrap-3.3.2-dist/
│ │ │ │ ├── css/
│ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ └── bootstrap.css
│ │ │ │ └── js/
│ │ │ │ ├── bootstrap.js
│ │ │ │ └── npm.js
│ │ │ ├── jquery/
│ │ │ │ └── jquery-2.1.3.js
│ │ │ ├── metisMenu/
│ │ │ │ ├── metisMenu.css
│ │ │ │ └── metisMenu.js
│ │ │ ├── plugins/
│ │ │ │ ├── datetimepicker/
│ │ │ │ │ ├── .gitattributes
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── .travis.yml
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── css/
│ │ │ │ │ │ └── bootstrap-datetimepicker.css
│ │ │ │ │ ├── js/
│ │ │ │ │ │ ├── bootstrap-datetimepicker.js
│ │ │ │ │ │ └── locales/
│ │ │ │ │ │ └── bootstrap-datetimepicker.zh-CN.js
│ │ │ │ │ ├── sample in bootstrap v2/
│ │ │ │ │ │ ├── bootstrap/
│ │ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ │ └── bootstrap.css
│ │ │ │ │ │ │ └── js/
│ │ │ │ │ │ │ └── bootstrap.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ └── sample in bootstrap v3/
│ │ │ │ │ ├── bootstrap/
│ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ │ │ └── bootstrap.css
│ │ │ │ │ │ └── js/
│ │ │ │ │ │ └── bootstrap.js
│ │ │ │ │ └── index.html
│ │ │ │ ├── flipcountdown/
│ │ │ │ │ ├── .gitattributes
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── MIT-LICENSE.txt
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── bower.json
│ │ │ │ │ ├── flipcountdown.jquery.json
│ │ │ │ │ ├── img/
│ │ │ │ │ │ ├── am-pm-1.psd
│ │ │ │ │ │ ├── digit-lg-dark.psd
│ │ │ │ │ │ └── digit-lg.psd
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── jquery.flipcountdown.css
│ │ │ │ │ ├── jquery.flipcountdown.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── jquery-validation/
│ │ │ │ │ ├── .gitattributes
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── .travis.yml
│ │ │ │ │ ├── demo/
│ │ │ │ │ │ ├── ajaxSubmit-intergration-demo.html
│ │ │ │ │ │ ├── captcha/
│ │ │ │ │ │ │ ├── captcha.js
│ │ │ │ │ │ │ ├── image_req.php
│ │ │ │ │ │ │ ├── images/
│ │ │ │ │ │ │ │ ├── .htaccess
│ │ │ │ │ │ │ │ └── image.php
│ │ │ │ │ │ │ ├── index.php
│ │ │ │ │ │ │ ├── newsession.php
│ │ │ │ │ │ │ ├── process.php
│ │ │ │ │ │ │ ├── rand.php
│ │ │ │ │ │ │ └── style.css
│ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ ├── chili.css
│ │ │ │ │ │ │ ├── cmxform.css
│ │ │ │ │ │ │ ├── cmxformTemplate.css
│ │ │ │ │ │ │ ├── core.css
│ │ │ │ │ │ │ ├── reset.css
│ │ │ │ │ │ │ └── screen.css
│ │ │ │ │ │ ├── custom-messages-data-demo.html
│ │ │ │ │ │ ├── custom-methods-demo.html
│ │ │ │ │ │ ├── dynamic-totals.html
│ │ │ │ │ │ ├── errorcontainer-demo.html
│ │ │ │ │ │ ├── file_input.html
│ │ │ │ │ │ ├── form.php
│ │ │ │ │ │ ├── form.phps
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── jquerymobile.html
│ │ │ │ │ │ ├── js/
│ │ │ │ │ │ │ └── chili-1.7.pack.js
│ │ │ │ │ │ ├── login/
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ └── screen.css
│ │ │ │ │ │ ├── marketo/
│ │ │ │ │ │ │ ├── emails.php
│ │ │ │ │ │ │ ├── emails.phps
│ │ │ │ │ │ │ ├── ie6.css
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── jquery.maskedinput.js
│ │ │ │ │ │ │ ├── mktSignup.js
│ │ │ │ │ │ │ ├── step2.htm
│ │ │ │ │ │ │ └── stylesheet.css
│ │ │ │ │ │ ├── milk/
│ │ │ │ │ │ │ ├── emails.php
│ │ │ │ │ │ │ ├── emails.phps
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── milk.css
│ │ │ │ │ │ │ ├── users.php
│ │ │ │ │ │ │ └── users.phps
│ │ │ │ │ │ ├── multipart/
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── js/
│ │ │ │ │ │ │ │ ├── jquery.maskedinput-1.0.js
│ │ │ │ │ │ │ │ ├── ui.accordion.js
│ │ │ │ │ │ │ │ └── ui.core.js
│ │ │ │ │ │ │ └── style.css
│ │ │ │ │ │ ├── radio-checkbox-select-demo.html
│ │ │ │ │ │ ├── tabs/
│ │ │ │ │ │ │ └── index.html
│ │ │ │ │ │ ├── themerollered.html
│ │ │ │ │ │ └── tinymce/
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── themes/
│ │ │ │ │ │ │ └── simple/
│ │ │ │ │ │ │ ├── editor_template.js
│ │ │ │ │ │ │ ├── langs/
│ │ │ │ │ │ │ │ └── en.js
│ │ │ │ │ │ │ └── skins/
│ │ │ │ │ │ │ └── default/
│ │ │ │ │ │ │ └── ui.css
│ │ │ │ │ │ └── tiny_mce.js
│ │ │ │ │ ├── jquery.validate.js
│ │ │ │ │ ├── lib/
│ │ │ │ │ │ ├── jquery-1.6.4.js
│ │ │ │ │ │ ├── jquery-1.7.2.js
│ │ │ │ │ │ ├── jquery-1.8.3.js
│ │ │ │ │ │ ├── jquery-1.9.0.js
│ │ │ │ │ │ ├── jquery.form.js
│ │ │ │ │ │ ├── jquery.js
│ │ │ │ │ │ └── jquery.mockjax.js
│ │ │ │ │ └── localization/
│ │ │ │ │ └── messages_zh.js
│ │ │ │ ├── jquery.form.js
│ │ │ │ ├── jquery.twbsPagination.js
│ │ │ │ └── uploadify/
│ │ │ │ ├── jquery.uploadify.js
│ │ │ │ └── uploadify.swf
│ │ │ └── plugins-override.js
│ │ ├── jsp/
│ │ │ └── index.jsp
│ │ ├── login.html
│ │ └── register.html
│ └── pom.xml
├── miaosha-order/
│ ├── .gitignore
│ ├── README.md
│ ├── miaosha-order-api/
│ │ ├── .gitignore
│ │ ├── mvnw
│ │ ├── mvnw.cmd
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── geekq/
│ │ └── api/
│ │ ├── entity/
│ │ │ ├── Goods.java
│ │ │ ├── GoodsVoOrder.java
│ │ │ └── MiaoshaGoods.java
│ │ ├── service/
│ │ │ ├── GoodsService.java
│ │ │ └── GoodsServiceMock.java
│ │ └── utils/
│ │ ├── AbstractResultOrder.java
│ │ ├── ResultGeekQOrder.java
│ │ └── ResultStatusOrder.java
│ ├── miaosha-order-provider/
│ │ ├── .gitignore
│ │ ├── mvnw
│ │ ├── mvnw.cmd
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── geekq/
│ │ │ │ └── provider/
│ │ │ │ ├── DubboProviderApplication.java
│ │ │ │ ├── mapper/
│ │ │ │ │ ├── GoodsMapper.java
│ │ │ │ │ └── GoodsMapper.xml
│ │ │ │ └── service/
│ │ │ │ └── impl/
│ │ │ │ ├── GoodsGroupServiceImpl.java
│ │ │ │ └── GoodsServiceImpl.java
│ │ │ └── resources/
│ │ │ ├── application.properties
│ │ │ └── provider.xml
│ │ └── test/
│ │ └── java/
│ │ └── com/
│ │ └── geekq/
│ │ └── provider/
│ │ └── DubboProviderApplicationTests.java
│ ├── mvnw
│ ├── mvnw.cmd
│ └── pom.xml
├── miaosha-rpc/
│ ├── .gitignore
│ ├── dubbo-api/
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ ├── com/
│ │ │ │ └── geekq/
│ │ │ │ └── dubbo/
│ │ │ │ └── springboot/
│ │ │ │ ├── CapAccountTradeOrderService.java
│ │ │ │ └── ServiceAPI.java
│ │ │ └── dto/
│ │ │ └── CapitalTradeOrderDto.java
│ │ └── test/
│ │ └── java/
│ │ └── com/
│ │ └── geekq/
│ │ └── dubbo/
│ │ └── springboot/
│ │ └── AppTest.java
│ ├── dubbo-consumer/
│ │ ├── .gitignore
│ │ ├── mvnw
│ │ ├── mvnw.cmd
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── geekq/
│ │ │ └── dubbo/
│ │ │ └── springboot/
│ │ │ └── consumer/
│ │ │ ├── ConsumerApplication.java
│ │ │ ├── config/
│ │ │ │ └── TCCConfig.java
│ │ │ ├── quickstart/
│ │ │ │ └── QuickstartConsumer.java
│ │ │ └── transaction/
│ │ │ └── TransactionConsumer.java
│ │ └── resources/
│ │ └── application.properties
│ ├── dubbo-provider/
│ │ ├── .gitignore
│ │ ├── mvnw
│ │ ├── mvnw.cmd
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── geekq/
│ │ │ └── dubbo/
│ │ │ └── springboot/
│ │ │ └── privoder/
│ │ │ ├── PrivoderApplication.java
│ │ │ ├── config/
│ │ │ │ └── TCCConfig.java
│ │ │ ├── quickstart/
│ │ │ │ └── QuickstartServiceImpl.java
│ │ │ └── transaction/
│ │ │ ├── CapServiceImpl.java
│ │ │ └── TransactionServiceImpl.java
│ │ └── resources/
│ │ └── application.properties
│ ├── mvnw
│ ├── mvnw.cmd
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── com/
│ │ └── mooc/
│ │ └── jiangzh/
│ │ └── dubbo/
│ │ └── springboot/
│ │ └── springbootdubbo/
│ │ └── SpringbootDubboApplication.java
│ └── resources/
│ └── application.properties
├── miaosha-v1/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── com/
│ │ └── geekq/
│ │ └── miaosha/
│ │ ├── GeekQMainApplication.java
│ │ ├── access/
│ │ │ ├── AccessInterceptor.java
│ │ │ ├── AccessKey.java
│ │ │ ├── AccessLimit.java
│ │ │ └── UserContext.java
│ │ ├── common/
│ │ │ ├── Constanst.java
│ │ │ ├── SnowflakeIdWorker.java
│ │ │ ├── enums/
│ │ │ │ ├── MessageStatus.java
│ │ │ │ └── ResultStatus.java
│ │ │ └── resultbean/
│ │ │ ├── AbstractResult.java
│ │ │ └── ResultGeekQ.java
│ │ ├── config/
│ │ │ ├── DruidConfig.java
│ │ │ ├── UserArgumentResolver.java
│ │ │ └── WebConfig.java
│ │ ├── controller/
│ │ │ ├── BaseController.java
│ │ │ ├── GoodsController.java
│ │ │ ├── LoginController.java
│ │ │ ├── MiaoShaMessageController.java
│ │ │ ├── MiaoshaController.java
│ │ │ ├── OrderController.java
│ │ │ └── RegisterController.java
│ │ ├── dao/
│ │ │ ├── GoodsDao.java
│ │ │ ├── MiaoShaMessageDao.java
│ │ │ ├── MiaoShaUserDao.java
│ │ │ ├── OrderDao.java
│ │ │ └── UserDao.java
│ │ ├── domain/
│ │ │ ├── Goods.java
│ │ │ ├── MiaoShaMessageInfo.java
│ │ │ ├── MiaoShaMessageUser.java
│ │ │ ├── MiaoshaGoods.java
│ │ │ ├── MiaoshaOrder.java
│ │ │ ├── MiaoshaUser.java
│ │ │ ├── OrderInfo.java
│ │ │ └── User.java
│ │ ├── exception/
│ │ │ ├── GlobleException.java
│ │ │ └── GlobleExceptionHandler.java
│ │ ├── mybatis/
│ │ │ ├── Mapper/
│ │ │ │ └── UserMapper.java
│ │ │ ├── README.md
│ │ │ ├── controller/
│ │ │ │ └── UbatisController.java
│ │ │ ├── entity/
│ │ │ │ └── User.java
│ │ │ └── vo/
│ │ │ ├── TeacherListVo.java
│ │ │ └── TeacherVo.java
│ │ ├── rabbitmq/
│ │ │ ├── MQConfig.java
│ │ │ ├── MQReceiver.java
│ │ │ ├── MQSender.java
│ │ │ └── MiaoshaMessage.java
│ │ ├── redis/
│ │ │ ├── BasePrefix.java
│ │ │ ├── DistributedLocker.java
│ │ │ ├── GoodsKey.java
│ │ │ ├── KeyPrefix.java
│ │ │ ├── MiaoShaUserKey.java
│ │ │ ├── MiaoshaKey.java
│ │ │ ├── OrderKey.java
│ │ │ ├── RedisConfig.java
│ │ │ ├── RedisPoolFactory.java
│ │ │ ├── RedisService.java
│ │ │ ├── RedissLockUtil.java
│ │ │ ├── RedissonAutoConfiguration.java
│ │ │ ├── RedissonDistributedLocker.java
│ │ │ ├── RedissonProperties.java
│ │ │ ├── RedissonService.java
│ │ │ ├── Userkey.java
│ │ │ └── redismanager/
│ │ │ ├── OptimisticLockTest.java
│ │ │ ├── RedisLock.java
│ │ │ ├── RedisLua.java
│ │ │ ├── RedisManager.java
│ │ │ ├── RedisUtil.java
│ │ │ └── lua/
│ │ │ ├── RedisLuaLock.java
│ │ │ ├── luaLockScript.lua
│ │ │ ├── test.lua
│ │ │ └── testlua.lua
│ │ ├── service/
│ │ │ ├── GoodsService.java
│ │ │ ├── MiaoShaMessageService.java
│ │ │ ├── MiaoShaUserService.java
│ │ │ ├── MiaoshaService.java
│ │ │ ├── OrderService.java
│ │ │ ├── UserService.java
│ │ │ └── rpchander/
│ │ │ ├── RpcCompensateService.java
│ │ │ ├── RpcHandler.java
│ │ │ ├── enums/
│ │ │ │ ├── PlanStepStatus.java
│ │ │ │ └── PlanStepType.java
│ │ │ └── vo/
│ │ │ ├── HandlerParam.java
│ │ │ ├── PlanOrder.java
│ │ │ └── PlanStep.java
│ │ ├── timeTask/
│ │ │ └── OrderCloseTask.java
│ │ ├── utils/
│ │ │ ├── DBUtil.java
│ │ │ ├── DateTimeUtils.java
│ │ │ ├── MD5Util.java
│ │ │ ├── MD5Utils.java
│ │ │ ├── UUIDUtil.java
│ │ │ ├── UserUtil.java
│ │ │ └── ValidatorUtil.java
│ │ ├── validator/
│ │ │ ├── MobileCheck.java
│ │ │ └── MobileValidator.java
│ │ └── vo/
│ │ ├── GoodsDetailVo.java
│ │ ├── GoodsVo.java
│ │ ├── LoginVo.java
│ │ ├── MiaoShaMessageVo.java
│ │ └── OrderDetailVo.java
│ └── resources/
│ ├── application-dev.properties
│ ├── application-prod.properties
│ ├── application-test.properties
│ ├── application.properties
│ ├── config/
│ │ └── application-test.properties
│ ├── dubbo/
│ │ └── applicationContext-dubbo-consumer.xml
│ ├── generatorConfig.xml
│ ├── mybatis/
│ │ ├── conf.xml
│ │ ├── mapper/
│ │ │ └── userMapper.xml
│ │ └── mybatis-config.xml
│ ├── static/
│ │ ├── bootstrap/
│ │ │ ├── css/
│ │ │ │ ├── bootstrap-theme.css
│ │ │ │ └── bootstrap.css
│ │ │ └── js/
│ │ │ ├── bootstrap.js
│ │ │ └── npm.js
│ │ ├── css/
│ │ │ ├── common.css
│ │ │ └── reset.css
│ │ ├── fonts/
│ │ │ └── FontAwesome.otf
│ │ ├── goods_detail.htm
│ │ ├── js/
│ │ │ ├── common.js
│ │ │ └── common1.js
│ │ ├── layer/
│ │ │ ├── layer.js
│ │ │ ├── mobile/
│ │ │ │ ├── layer.js
│ │ │ │ └── need/
│ │ │ │ └── layer.css
│ │ │ └── skin/
│ │ │ └── default/
│ │ │ └── layer.css
│ │ └── order_detail.htm
│ └── templates/
│ ├── goods_detail.html
│ ├── goods_list.html
│ ├── hello.html
│ ├── index.html
│ ├── login.html
│ ├── message_list.html
│ ├── miaosha_fail.html
│ ├── order_detail.html
│ ├── register.html
│ └── register1.html
├── miaosha-v2/
│ ├── .gitignore
│ ├── miaosha-common/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── geekq/
│ │ └── miasha/
│ │ ├── entity/
│ │ │ ├── BaseDomain.java
│ │ │ ├── Goods.java
│ │ │ ├── IpLog.java
│ │ │ ├── Logininfo.java
│ │ │ ├── MiaoShaMessageInfo.java
│ │ │ ├── MiaoShaMessageUser.java
│ │ │ ├── MiaoshaGoods.java
│ │ │ ├── MiaoshaOrder.java
│ │ │ ├── MiaoshaUser.java
│ │ │ └── OrderInfo.java
│ │ ├── enums/
│ │ │ ├── Constanst.java
│ │ │ ├── Constants.java
│ │ │ ├── MessageStatus.java
│ │ │ ├── OrderStatusEnum.java
│ │ │ ├── SexEnum.java
│ │ │ ├── YesOrNo.java
│ │ │ ├── enums/
│ │ │ │ ├── MessageStatus.java
│ │ │ │ └── ResultStatus.java
│ │ │ └── resultbean/
│ │ │ ├── AbstractResult.java
│ │ │ └── ResultGeekQ.java
│ │ ├── exception/
│ │ │ └── GlobleException.java
│ │ ├── utils/
│ │ │ ├── DateTimeUtils.java
│ │ │ ├── MD5Utils.java
│ │ │ ├── SnowflakeIdWorker.java
│ │ │ ├── UUIDUtil.java
│ │ │ ├── UserContext.java
│ │ │ ├── UserContext2.java
│ │ │ └── ValidatorUtil.java
│ │ ├── validator/
│ │ │ ├── MobileCheck.java
│ │ │ └── MobileValidator.java
│ │ └── vo/
│ │ ├── GoodsDetailVo.java
│ │ ├── GoodsVo.java
│ │ ├── LoginVo.java
│ │ ├── MiaoShaMessageVo.java
│ │ └── OrderDetailVo.java
│ ├── miaosha-service/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── geekq/
│ │ │ └── miaosha/
│ │ │ ├── mapper/
│ │ │ │ ├── GoodsMapper.java
│ │ │ │ ├── GoodsMapper.xml
│ │ │ │ ├── IpLogMapper.java
│ │ │ │ ├── IpLogMapper.xml
│ │ │ │ ├── LogininfoMapper.java
│ │ │ │ ├── LogininfoMapper.xml
│ │ │ │ ├── MiaoShaUserMapper.java
│ │ │ │ ├── MiaoShaUserMapper.xml
│ │ │ │ ├── OrderMapper.java
│ │ │ │ └── OrderMapper.xml
│ │ │ ├── rabbitmq/
│ │ │ │ ├── MQConfig.java
│ │ │ │ ├── MQReceiver.java
│ │ │ │ ├── MQSender.java
│ │ │ │ └── MiaoshaMessage.java
│ │ │ ├── redis/
│ │ │ │ ├── BasePrefix.java
│ │ │ │ ├── DistributedLocker.java
│ │ │ │ ├── GoodsKey.java
│ │ │ │ ├── KeyPrefix.java
│ │ │ │ ├── MiaoShaUserKey.java
│ │ │ │ ├── MiaoshaKey.java
│ │ │ │ ├── OrderKey.java
│ │ │ │ ├── RedisConfig.java
│ │ │ │ ├── RedisPoolFactory.java
│ │ │ │ ├── RedisService.java
│ │ │ │ ├── RedissLockUtil.java
│ │ │ │ ├── Userkey.java
│ │ │ │ └── redismanager/
│ │ │ │ ├── RedisLimitRateWithLUA.java
│ │ │ │ ├── RedisLock.java
│ │ │ │ ├── RedisLua.java
│ │ │ │ ├── RedisManager.java
│ │ │ │ └── lua/
│ │ │ │ ├── RedisLuaLock.java
│ │ │ │ ├── limit.lua
│ │ │ │ ├── luaLockScript.lua
│ │ │ │ ├── test.lua
│ │ │ │ └── testlua.lua
│ │ │ └── service/
│ │ │ ├── GoodsService.java
│ │ │ ├── LoginInfoService.java
│ │ │ ├── MiaoShaMessageService.java
│ │ │ ├── MiaoShaUserService.java
│ │ │ ├── MiaoshaService.java
│ │ │ ├── OrderService.java
│ │ │ └── impl/
│ │ │ └── LoginInfoServiceImpl.java
│ │ └── resources/
│ │ └── limit.lua
│ ├── miaosha-web/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── geekq/
│ │ │ └── miaosha/
│ │ │ ├── GeekQMainApplication.java
│ │ │ ├── config/
│ │ │ │ ├── DruidConfig.java
│ │ │ │ ├── UserArgumentResolver.java
│ │ │ │ └── WebConfig.java
│ │ │ ├── controller/
│ │ │ │ ├── BaseController.java
│ │ │ │ ├── GoodsController.java
│ │ │ │ ├── LoginController.java
│ │ │ │ ├── MiaoShaMessageController.java
│ │ │ │ ├── MiaoshaController.java
│ │ │ │ ├── OrderController.java
│ │ │ │ └── RegisterController.java
│ │ │ └── interceptor/
│ │ │ ├── AccessKey.java
│ │ │ ├── GlobalExceptionHandler.java
│ │ │ ├── GlobalParamAdvice.java
│ │ │ ├── LoginInterceptor.java
│ │ │ └── RequireLogin.java
│ │ └── resources/
│ │ ├── application.properties
│ │ ├── consumer.xml
│ │ ├── css/
│ │ │ ├── account.css
│ │ │ ├── bank.css
│ │ │ ├── core.css
│ │ │ └── slide-unlock.css
│ │ ├── static/
│ │ │ ├── bootstrap/
│ │ │ │ ├── css/
│ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ └── bootstrap.css
│ │ │ │ └── js/
│ │ │ │ ├── bootstrap.js
│ │ │ │ └── npm.js
│ │ │ ├── css/
│ │ │ │ ├── common.css
│ │ │ │ └── reset.css
│ │ │ ├── fonts/
│ │ │ │ └── FontAwesome.otf
│ │ │ ├── goods_detail.htm
│ │ │ ├── js/
│ │ │ │ ├── My97DatePicker/
│ │ │ │ │ ├── My97DatePicker.htm
│ │ │ │ │ ├── WdatePicker.js
│ │ │ │ │ ├── calendar.js
│ │ │ │ │ ├── config.js
│ │ │ │ │ ├── lang/
│ │ │ │ │ │ ├── en.js
│ │ │ │ │ │ ├── zh-cn.js
│ │ │ │ │ │ └── zh-tw.js
│ │ │ │ │ └── skin/
│ │ │ │ │ ├── WdatePicker.css
│ │ │ │ │ ├── default/
│ │ │ │ │ │ └── datepicker.css
│ │ │ │ │ └── whyGreen/
│ │ │ │ │ └── datepicker.css
│ │ │ │ ├── bank.js
│ │ │ │ ├── bootstrap-3.3.2-dist/
│ │ │ │ │ ├── css/
│ │ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ │ └── bootstrap.css
│ │ │ │ │ └── js/
│ │ │ │ │ ├── bootstrap.js
│ │ │ │ │ └── npm.js
│ │ │ │ ├── common.js
│ │ │ │ ├── common1.js
│ │ │ │ ├── jquery/
│ │ │ │ │ └── jquery-2.1.3.js
│ │ │ │ ├── metisMenu/
│ │ │ │ │ ├── metisMenu.css
│ │ │ │ │ └── metisMenu.js
│ │ │ │ ├── plugins/
│ │ │ │ │ ├── datetimepicker/
│ │ │ │ │ │ ├── .gitattributes
│ │ │ │ │ │ ├── .gitignore
│ │ │ │ │ │ ├── .travis.yml
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ └── bootstrap-datetimepicker.css
│ │ │ │ │ │ ├── js/
│ │ │ │ │ │ │ ├── bootstrap-datetimepicker.js
│ │ │ │ │ │ │ └── locales/
│ │ │ │ │ │ │ └── bootstrap-datetimepicker.zh-CN.js
│ │ │ │ │ │ ├── sample in bootstrap v2/
│ │ │ │ │ │ │ ├── bootstrap/
│ │ │ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ │ │ └── bootstrap.css
│ │ │ │ │ │ │ │ └── js/
│ │ │ │ │ │ │ │ └── bootstrap.js
│ │ │ │ │ │ │ └── index.html
│ │ │ │ │ │ └── sample in bootstrap v3/
│ │ │ │ │ │ ├── bootstrap/
│ │ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ │ │ │ └── bootstrap.css
│ │ │ │ │ │ │ └── js/
│ │ │ │ │ │ │ └── bootstrap.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── flipcountdown/
│ │ │ │ │ │ ├── .gitattributes
│ │ │ │ │ │ ├── .gitignore
│ │ │ │ │ │ ├── MIT-LICENSE.txt
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── bower.json
│ │ │ │ │ │ ├── flipcountdown.jquery.json
│ │ │ │ │ │ ├── img/
│ │ │ │ │ │ │ ├── am-pm-1.psd
│ │ │ │ │ │ │ ├── digit-lg-dark.psd
│ │ │ │ │ │ │ └── digit-lg.psd
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── jquery.flipcountdown.css
│ │ │ │ │ │ ├── jquery.flipcountdown.js
│ │ │ │ │ │ └── package.json
│ │ │ │ │ ├── jquery-validation/
│ │ │ │ │ │ ├── .gitattributes
│ │ │ │ │ │ ├── .gitignore
│ │ │ │ │ │ ├── .travis.yml
│ │ │ │ │ │ ├── demo/
│ │ │ │ │ │ │ ├── ajaxSubmit-intergration-demo.html
│ │ │ │ │ │ │ ├── captcha/
│ │ │ │ │ │ │ │ ├── captcha.js
│ │ │ │ │ │ │ │ ├── image_req.php
│ │ │ │ │ │ │ │ ├── images/
│ │ │ │ │ │ │ │ │ ├── .htaccess
│ │ │ │ │ │ │ │ │ └── image.php
│ │ │ │ │ │ │ │ ├── index.php
│ │ │ │ │ │ │ │ ├── newsession.php
│ │ │ │ │ │ │ │ ├── process.php
│ │ │ │ │ │ │ │ ├── rand.php
│ │ │ │ │ │ │ │ └── style.css
│ │ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ │ ├── chili.css
│ │ │ │ │ │ │ │ ├── cmxform.css
│ │ │ │ │ │ │ │ ├── cmxformTemplate.css
│ │ │ │ │ │ │ │ ├── core.css
│ │ │ │ │ │ │ │ ├── reset.css
│ │ │ │ │ │ │ │ └── screen.css
│ │ │ │ │ │ │ ├── custom-messages-data-demo.html
│ │ │ │ │ │ │ ├── custom-methods-demo.html
│ │ │ │ │ │ │ ├── dynamic-totals.html
│ │ │ │ │ │ │ ├── errorcontainer-demo.html
│ │ │ │ │ │ │ ├── file_input.html
│ │ │ │ │ │ │ ├── form.php
│ │ │ │ │ │ │ ├── form.phps
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── jquerymobile.html
│ │ │ │ │ │ │ ├── js/
│ │ │ │ │ │ │ │ └── chili-1.7.pack.js
│ │ │ │ │ │ │ ├── login/
│ │ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ │ └── screen.css
│ │ │ │ │ │ │ ├── marketo/
│ │ │ │ │ │ │ │ ├── emails.php
│ │ │ │ │ │ │ │ ├── emails.phps
│ │ │ │ │ │ │ │ ├── ie6.css
│ │ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ │ ├── jquery.maskedinput.js
│ │ │ │ │ │ │ │ ├── mktSignup.js
│ │ │ │ │ │ │ │ ├── step2.htm
│ │ │ │ │ │ │ │ └── stylesheet.css
│ │ │ │ │ │ │ ├── milk/
│ │ │ │ │ │ │ │ ├── emails.php
│ │ │ │ │ │ │ │ ├── emails.phps
│ │ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ │ ├── milk.css
│ │ │ │ │ │ │ │ ├── users.php
│ │ │ │ │ │ │ │ └── users.phps
│ │ │ │ │ │ │ ├── multipart/
│ │ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ │ ├── js/
│ │ │ │ │ │ │ │ │ ├── jquery.maskedinput-1.0.js
│ │ │ │ │ │ │ │ │ ├── ui.accordion.js
│ │ │ │ │ │ │ │ │ └── ui.core.js
│ │ │ │ │ │ │ │ └── style.css
│ │ │ │ │ │ │ ├── radio-checkbox-select-demo.html
│ │ │ │ │ │ │ ├── tabs/
│ │ │ │ │ │ │ │ └── index.html
│ │ │ │ │ │ │ ├── themerollered.html
│ │ │ │ │ │ │ └── tinymce/
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── themes/
│ │ │ │ │ │ │ │ └── simple/
│ │ │ │ │ │ │ │ ├── editor_template.js
│ │ │ │ │ │ │ │ ├── langs/
│ │ │ │ │ │ │ │ │ └── en.js
│ │ │ │ │ │ │ │ └── skins/
│ │ │ │ │ │ │ │ └── default/
│ │ │ │ │ │ │ │ └── ui.css
│ │ │ │ │ │ │ └── tiny_mce.js
│ │ │ │ │ │ ├── jquery.validate.js
│ │ │ │ │ │ ├── lib/
│ │ │ │ │ │ │ ├── jquery-1.6.4.js
│ │ │ │ │ │ │ ├── jquery-1.7.2.js
│ │ │ │ │ │ │ ├── jquery-1.8.3.js
│ │ │ │ │ │ │ ├── jquery-1.9.0.js
│ │ │ │ │ │ │ ├── jquery.form.js
│ │ │ │ │ │ │ ├── jquery.js
│ │ │ │ │ │ │ └── jquery.mockjax.js
│ │ │ │ │ │ └── localization/
│ │ │ │ │ │ └── messages_zh.js
│ │ │ │ │ ├── jquery.form.js
│ │ │ │ │ ├── jquery.twbsPagination.js
│ │ │ │ │ └── uploadify/
│ │ │ │ │ ├── jquery.uploadify.js
│ │ │ │ │ └── uploadify.swf
│ │ │ │ └── plugins-override.js
│ │ │ ├── layer/
│ │ │ │ ├── layer.js
│ │ │ │ ├── mobile/
│ │ │ │ │ ├── layer.js
│ │ │ │ │ └── need/
│ │ │ │ │ └── layer.css
│ │ │ │ └── skin/
│ │ │ │ └── default/
│ │ │ │ └── layer.css
│ │ │ └── order_detail.htm
│ │ └── templates/
│ │ ├── bootstrap/
│ │ │ ├── css/
│ │ │ │ ├── bootstrap-theme.css
│ │ │ │ └── bootstrap.css
│ │ │ └── js/
│ │ │ ├── bootstrap.js
│ │ │ └── npm.js
│ │ ├── css/
│ │ │ ├── common.css
│ │ │ ├── common1.css
│ │ │ ├── reset.css
│ │ │ └── slide-unlock.css
│ │ ├── fonts/
│ │ │ └── FontAwesome.otf
│ │ ├── goods_list.html
│ │ ├── hello.html
│ │ ├── index.html
│ │ ├── index2.html
│ │ ├── js/
│ │ │ ├── My97DatePicker/
│ │ │ │ ├── My97DatePicker.htm
│ │ │ │ ├── WdatePicker.js
│ │ │ │ ├── calendar.js
│ │ │ │ ├── config.js
│ │ │ │ ├── lang/
│ │ │ │ │ ├── en.js
│ │ │ │ │ ├── zh-cn.js
│ │ │ │ │ └── zh-tw.js
│ │ │ │ └── skin/
│ │ │ │ ├── WdatePicker.css
│ │ │ │ ├── default/
│ │ │ │ │ └── datepicker.css
│ │ │ │ └── whyGreen/
│ │ │ │ └── datepicker.css
│ │ │ ├── bank.js
│ │ │ ├── bootstrap-3.3.2-dist/
│ │ │ │ ├── css/
│ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ └── bootstrap.css
│ │ │ │ └── js/
│ │ │ │ ├── bootstrap.js
│ │ │ │ └── npm.js
│ │ │ ├── common.js
│ │ │ ├── common1.js
│ │ │ ├── jquery/
│ │ │ │ └── jquery-2.1.3.js
│ │ │ ├── metisMenu/
│ │ │ │ ├── metisMenu.css
│ │ │ │ └── metisMenu.js
│ │ │ ├── plugins/
│ │ │ │ ├── datetimepicker/
│ │ │ │ │ ├── .gitattributes
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── .travis.yml
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── css/
│ │ │ │ │ │ └── bootstrap-datetimepicker.css
│ │ │ │ │ ├── js/
│ │ │ │ │ │ ├── bootstrap-datetimepicker.js
│ │ │ │ │ │ └── locales/
│ │ │ │ │ │ └── bootstrap-datetimepicker.zh-CN.js
│ │ │ │ │ ├── sample in bootstrap v2/
│ │ │ │ │ │ ├── bootstrap/
│ │ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ │ └── bootstrap.css
│ │ │ │ │ │ │ └── js/
│ │ │ │ │ │ │ └── bootstrap.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ └── sample in bootstrap v3/
│ │ │ │ │ ├── bootstrap/
│ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ │ │ └── bootstrap.css
│ │ │ │ │ │ └── js/
│ │ │ │ │ │ └── bootstrap.js
│ │ │ │ │ └── index.html
│ │ │ │ ├── flipcountdown/
│ │ │ │ │ ├── .gitattributes
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── MIT-LICENSE.txt
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── bower.json
│ │ │ │ │ ├── flipcountdown.jquery.json
│ │ │ │ │ ├── img/
│ │ │ │ │ │ ├── am-pm-1.psd
│ │ │ │ │ │ ├── digit-lg-dark.psd
│ │ │ │ │ │ └── digit-lg.psd
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── jquery.flipcountdown.css
│ │ │ │ │ ├── jquery.flipcountdown.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── jquery-validation/
│ │ │ │ │ ├── .gitattributes
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── .travis.yml
│ │ │ │ │ ├── demo/
│ │ │ │ │ │ ├── ajaxSubmit-intergration-demo.html
│ │ │ │ │ │ ├── captcha/
│ │ │ │ │ │ │ ├── captcha.js
│ │ │ │ │ │ │ ├── image_req.php
│ │ │ │ │ │ │ ├── images/
│ │ │ │ │ │ │ │ ├── .htaccess
│ │ │ │ │ │ │ │ └── image.php
│ │ │ │ │ │ │ ├── index.php
│ │ │ │ │ │ │ ├── newsession.php
│ │ │ │ │ │ │ ├── process.php
│ │ │ │ │ │ │ ├── rand.php
│ │ │ │ │ │ │ └── style.css
│ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ ├── chili.css
│ │ │ │ │ │ │ ├── cmxform.css
│ │ │ │ │ │ │ ├── cmxformTemplate.css
│ │ │ │ │ │ │ ├── core.css
│ │ │ │ │ │ │ ├── reset.css
│ │ │ │ │ │ │ └── screen.css
│ │ │ │ │ │ ├── custom-messages-data-demo.html
│ │ │ │ │ │ ├── custom-methods-demo.html
│ │ │ │ │ │ ├── dynamic-totals.html
│ │ │ │ │ │ ├── errorcontainer-demo.html
│ │ │ │ │ │ ├── file_input.html
│ │ │ │ │ │ ├── form.php
│ │ │ │ │ │ ├── form.phps
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── jquerymobile.html
│ │ │ │ │ │ ├── js/
│ │ │ │ │ │ │ └── chili-1.7.pack.js
│ │ │ │ │ │ ├── login/
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ └── screen.css
│ │ │ │ │ │ ├── marketo/
│ │ │ │ │ │ │ ├── emails.php
│ │ │ │ │ │ │ ├── emails.phps
│ │ │ │ │ │ │ ├── ie6.css
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── jquery.maskedinput.js
│ │ │ │ │ │ │ ├── mktSignup.js
│ │ │ │ │ │ │ ├── step2.htm
│ │ │ │ │ │ │ └── stylesheet.css
│ │ │ │ │ │ ├── milk/
│ │ │ │ │ │ │ ├── emails.php
│ │ │ │ │ │ │ ├── emails.phps
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── milk.css
│ │ │ │ │ │ │ ├── users.php
│ │ │ │ │ │ │ └── users.phps
│ │ │ │ │ │ ├── multipart/
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── js/
│ │ │ │ │ │ │ │ ├── jquery.maskedinput-1.0.js
│ │ │ │ │ │ │ │ ├── ui.accordion.js
│ │ │ │ │ │ │ │ └── ui.core.js
│ │ │ │ │ │ │ └── style.css
│ │ │ │ │ │ ├── radio-checkbox-select-demo.html
│ │ │ │ │ │ ├── tabs/
│ │ │ │ │ │ │ └── index.html
│ │ │ │ │ │ ├── themerollered.html
│ │ │ │ │ │ └── tinymce/
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── themes/
│ │ │ │ │ │ │ └── simple/
│ │ │ │ │ │ │ ├── editor_template.js
│ │ │ │ │ │ │ ├── langs/
│ │ │ │ │ │ │ │ └── en.js
│ │ │ │ │ │ │ └── skins/
│ │ │ │ │ │ │ └── default/
│ │ │ │ │ │ │ └── ui.css
│ │ │ │ │ │ └── tiny_mce.js
│ │ │ │ │ ├── jquery.validate.js
│ │ │ │ │ ├── lib/
│ │ │ │ │ │ ├── jquery-1.6.4.js
│ │ │ │ │ │ ├── jquery-1.7.2.js
│ │ │ │ │ │ ├── jquery-1.8.3.js
│ │ │ │ │ │ ├── jquery-1.9.0.js
│ │ │ │ │ │ ├── jquery.form.js
│ │ │ │ │ │ ├── jquery.js
│ │ │ │ │ │ └── jquery.mockjax.js
│ │ │ │ │ └── localization/
│ │ │ │ │ └── messages_zh.js
│ │ │ │ ├── jquery.form.js
│ │ │ │ ├── jquery.twbsPagination.js
│ │ │ │ └── uploadify/
│ │ │ │ ├── jquery.uploadify.js
│ │ │ │ └── uploadify.swf
│ │ │ ├── plugins-override.js
│ │ │ └── slideunlock/
│ │ │ └── slideunlock.js
│ │ ├── layer/
│ │ │ ├── layer.js
│ │ │ ├── mobile/
│ │ │ │ ├── layer.js
│ │ │ │ └── need/
│ │ │ │ └── layer.css
│ │ │ └── skin/
│ │ │ └── default/
│ │ │ └── layer.css
│ │ ├── login.html
│ │ ├── login222.html
│ │ ├── message_list.html
│ │ ├── miaosha_fail.html
│ │ ├── order_detail.html
│ │ ├── register.html
│ │ ├── register1.html
│ │ ├── register2.html
│ │ └── test.html
│ ├── miaosha.sql
│ └── pom.xml
├── old.md
├── pom.xml
└── sql/
├── miaosha.sql
└── miaosha1.sql
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
*.js linguist-language=java
*.css linguist-language=java
*.html linguist-language=java
================================================
FILE: .gitignore
================================================
# IntelliJ project files
.DS_Store
.idea/
*.iml
.mvn/*
out
# CMake
cmake-build-*/
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### Java template
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
.settings/
.mvn/
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Maven template
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
================================================
FILE: CHANGELOG.md
================================================
## 修改记录
### 1.0.0
- 将秒杀项目进行模块化划分
- 基础依赖版本升级
- 新增.mvn等无需跟踪文件
================================================
FILE: README.md
================================================
大家好,我是GEEK.Q,我对自己的经验知识做了一个系统的整理,有自己的迭代项目,框架,也有一些学习笔记和画的图。
本GitHub还有许多其他的知识,随时欢迎探讨与骚扰!如果想一起**维护**或者**文章出现瑕疵**请及时与我联系【邮箱QiuRunZe_key@163.com】!
一点小建议:学习本系列知识之前,如果你完全没接触过 `[深入]Spring[不深入框架可能理解起来比较费劲]`、`MQ`、`SpringBoot`、`Redis`、`Dubbo`、`ZK` 、`Maven`,`lua`等,那么我建议你可以先在网上搜一下每一块知识的快速入门。tydeus-monito框架这个项目可以说是非常好的解决**日志**痛点
### tydeus-monito框架
> tydeus-monitor : [https://github.com/qiurunze123/tydeus-monitor](https://github.com/qiurunze123/tydeus-monitor)
一种为监控而生的日志解决方案
"监控"多种多样,网上一搜,花样百出,每个公司都会有自己的监控系统,大部分的功能都为监视+报警系统,很少有业务控制和系统控制的相关功能
本文主要讲解为业务系统指标相关监控、如何更快捷方便优雅地打出你需要的日志、而不需要镶嵌在各个业务环节中
* 进线率
* 完结率
* 成功失败率
* 各种姿势打印各种类型日志【入参、出参、异常】
### 多线程学习与讲解+三高导入框架
> 多线程学习与讲解 : [https://github.com/qiurunze123/threadandjuc](https://github.com/qiurunze123/threadandjuc)
three-high-import 项目意义在于利用多线程进行千万级别导入,实现可扩展,高性能,高可用,高可靠三个高,本项目可以在千万级别数据实现无差别高性能数据上报 与导入,与普通导入相比性能提高10倍左右,而且规避风险在偶尔的机器宕机,网络波动等情况出现时,仍能够实现数据一致,数据可靠,数据重试,数据报警等功能,在一些重要数据 例如: 对账 , 账户金额,账单等,需要每日定时任务而且有高风险的数据实现数据无错误! 多线程从基础到进阶,分析入坑出坑,以及工作实操,最后会分享一个项目,针对如何进行大数据量(经测试几亿数据完全搞的定)进行安全高可用的策略, 示例为高可用高可靠高性能 三高导入系统 DEMO分析 ,如何进行数据分片,数据导入,计算,多线程策略等等 本文属于进阶系列,有问题或者更好的想法可以一起探讨!
### JVM内存学习与讲解
> JVM内存学习与讲解 : [https://github.com/qiurunze123/memoryoptimization/blob/master/README.md](https://github.com/qiurunze123/memoryoptimization/blob/master/README.md)
本项目介绍 : JVM内存调优与生产实战 简单说明下
在项目上线之初,我们应该如何设置JVM的参数配置,我们如何分配内存空间会使效率最大化,当项目上线后我们如何监控项目的内存情况呢? 我们又如何来查看内存的溢出情况,分析GC日志呢?...... 这个项目就是为了这些研究这些可能大家平时不会考虑的东西来应运而生? 此项目仍为进阶课程,一些简单的请提前预习!
### 节点轻量级流程引擎
> 编排节点轻量级流程引擎 : [https://github.com/qiurunze123/qrzFlowEngine](https://github.com/qiurunze123/qrzFlowEngine)
之前业内有证明了随着架构设计时间的增加,开发和返工量都会减少,所以在这有限时间内,找到一个最佳平衡点来进行设计是一个问题,那么如何来找到最佳平衡点,让我们少走弯路,既能够灵活设计,又能够按时上线,又能够符合当下现状和需求成本了本次文章探讨的命题,本文将从复杂机审流程进行举例,来看下踩了哪些坑,又做对了哪些事情,最后终于在架构【需求+设计+时间】 = 设计平衡点!也就是本次框架设计的初衷!
### zookeeper设计哲学
> zookeeper设计哲学 : [https://github.com/qiurunze123/zookeeperDesign](https://github.com/qiurunze123/zookeeperDesign)
此项目是为了适应互联网分布式架构的背景下的集群管理,多个节点的互相协调的问题等! ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件 ,它是一个为分布式应用提供一致性服务的软件,提供的功能包括:配置维护、域名服务、分布式同步、组服务等 此项目可以带大家深入了解zk在分布式项目中发挥了什么作用!
### 设计模式哲学
> 设计模式哲学 : [https://github.com/qiurunze123/Designpattern](https://github.com/qiurunze123/Designpattern)
此项目是为了适应互联网分布式架构的背景下的集群管理,多个节点的互相协调的问题等! ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件 ,它是一个为分布式应用提供一致性服务的软件,提供的功能包括:配置维护、域名服务、分布式同步、组服务等 此项目可以带大家深入了解zk在分布式项目中发挥了什么作用!
### 原版+轻量级秒杀 停更
> 原老版ms : [https://github.com/qiurunze123/miaosha/blob/master/old.md](https://github.com/qiurunze123/miaosha/blob/master/old.md)
已不更新、如果想看之前思考记录文档和一些画的图可以看下
> demo-airtravel版ms : [https://github.com/qiurunze123/aircrafttravel/blob/master/README.md](https://github.com/qiurunze123/aircrafttravel/blob/master/README.md)
已不更新、如果想看之前思考记录文档和一些画的图可以看下
================================================
FILE: docs/code-criterion.md
================================================
### 代码规范
老司机一般的规范大家都知道类似驼峰,匹配一类的大家都知道具体则不再提
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
##要求:
1.lombok-- idea插件请大家下载 ,去除setget构造方法等,阿里巴巴代码规范插件请自行下载<br>
2.**尽量将长的类名,方法名,变量名精简**<br>
1.长的类名会使开发者不易生命该类型的变量
2.长的方法命名会使它变得晦涩难懂
3.长的变量名不利于代码重用,导致过长的方法链
3.**命名清晰准确**<br>
清晰: 你要知道该命名于什么有关
精确:你要知道该命名于什么无关
当完成这两个目标后其他的都是多余的字符
4.**命名无需含有表示变量或者参数类型的单词**<br>
nameString 请写成 name
accountLessWindow 请写成 window
5.**对于集合来说,最好使用名词的复数形式来描述内容**<br>
List<DateTime> holidayDateLists 请写成 List<DateTime> holidays
Map<Employee,Role> employeeRoleHashMap 请写成 Map<Employee,Role> employeeRoles
6.**方法名不需要描述它的参数及参数的类型–参数列表已经说明了这些**<br>
mergeTableCells(List<TableCell> cells) 请写成 merge(List<TableCell> cells)
sortEventsUsingComparator(List<Event> events,Comparator<Event> comparator) 请写成 sort(List<Event> events, Comparator<Event> comparator)
7.**省略命名中不是用来消除歧义的单词**<br>
8.**命名只是一个表示符,只要告诉你变量在哪定义不需要吧所有的信息都塞到命名里面**<br>
recentlyUpdatedAnnualSalesBid
存在不是最近更新的全年销售投标么?
存在没有被更新的最近的全年销售投标么?
存在最近更新的非全年的销售投标么?
存在最近更新的全年非销售的投标么?
存在最近更新的全年销售非投标的东东吗?
上面的任何一个问题回答是不存在,那就意味着命名中引入了无用的单词
finalBattleMostDangerousBossMonster 请写成 boss
weaklingFirstEncounterMonster 请写成firstMonster
如果有一些你觉得过了,太短了,容易引起歧义,但是你可以大胆的这样做,如果在之后的开发中你觉得命名会造成冲突和不明确
你可以填一些修饰词来完善它,反之如果一开始就是一个很长的名字,你不可能再改回来
9.**省略命名中可以从上下文获取的单词**<br>
// Bad:
class AnnualHolidaySale {
int _annualSaleRebate;
void promoteHolidaySale() { ... }
}
// Better:
class AnnualHolidaySale {
int _rebate;
void promote() { ... }
}
实际上一个命名嵌套的层次越多,他就有更多的相关的上下文,也就更简短,换句话说一个变量的作用域越小,命名就越短
10.**省略命名中无任何意义的单词**<br>
例如:data、state、amount、value、manager、engine、object、entity 和 instance一类的 不需要这类严肃的词语
11.**是否可以描述出一幅画(我在装逼)**<br>
一个好的命名能够在阅读者的脑海里面描绘出一幅图画,而降变量命名为manager 并不能象读者传达出任何有关该变量做什么的信息
在命名时可以问一下自己,把这个单词去掉含义是不是不变?如果是,那就果断把它剔除吧
12.**终极一例**<br>
例子:好吃的华夫饼
// 好吃的比利时华夫饼
class DeliciousBelgianWaffleObject {
void garnishDeliciousBelgianWaffleWithStrawberryList(
List<Strawberry> strawberryList) { ... }
}
首先,通过参数列表,我们可以知道方法是用来处理一个strawberry 的列表 所以可以在方法的命名中去掉
class DeliciousBelgianWaffleObject {
void garnishDeliciousBelgianWaffle(
List<Strawberry> strawberries) { ... }
}
除非程序中还包含不好吃的比利时华夫饼或者其它华夫饼 不然我们可以将这个无用的形容词去掉
class WaffleObject {
void garnishWaffle(List<Strawberry> strawberries) { ... }
}
方法是包含在waffleObject类中的 所以方法名无需waffle说明
class WaffleObject {
void garnish(List<Strawberry> strawberries) { ... }
}
很明显他是一个对象,任何事物都是一个对象,这也就是传说中的面相对象的意思,所以命名中无需带有Object
class Waffle {
void garnish(List<Strawberry> strawberries) { ... }
}
13.**类名应该是名词不应该是动词,使用普遍的被大众理解的词**<br>
14.**请勿抛异常直接返回**<br>
类似如下规范
Result result=Result.build();
boolean isChecking = redisServiceUtil.getIsCheckingOfAutomatedLoanService();
result.setValue(isChecking);
if (isChecking) {
logger.info("--- isSystemChecking ---系统清算中-----");
result.withError(ResultMsgStatus.SYSTEM_CHECKING.getMessage());
}
return result;
================================================
FILE: docs/code-rpc.md
================================================
### 分布式事务的讲解与实现
基础的ACID等等就不一一介绍了
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
##简介:
基础的ACID等等就不一一介绍了,柔性事务一类的大家在网上一搜都是,可以先看看基础的!
我的github都是实际操作加讲解,我觉得写文章大篇大论浪费时间,不如实际操作来的深刻
感谢大家支持!
1.tcc事务演进与场景
2.tcc事务源码解析与实际操作
3.分布式事务的实操与演进
2. **TCC事务的简介**
两段式事务

三段式事务

TCC的优点:
1.解决了扩应用的业务操作的原子性问题
2.数据库的二阶段提交提到了应用层实现
使用场景:
组合支付,账务一类的 比较要求强一致性高的场景使用
Tcc项目地址:
[](https://github.com/changmingxie/tcc-transaction/tree/master-1.2.x)
如果你想 用dubbo的他的还不行有点错误请下载: (使用请先参考TCC文档)
[](https://github.com/qiurunze123/tcc-dubbo)
效果图:

|_tcc-transaction-dubbo|
|_1 字节码代理 -> 创建接口的代理对象
|_2 DubboTransactionContextEditor -> TRANSACTION_CONTEXT[标识事务状态]利用Dubbo的隐式参数来传递关键的非业务数据
|_tcc-transaction-spring|
|_封装了一些关键的Spring组件
|_questions|
|_1、什么时候生成的TRANSACTION_CONTEXT隐式参数
|_2、如何判断一个大的事务下,都有哪些小的事务
|_3、为什么要有@Compensable注解
|_4、两个拦截器都没有处理Confirm和Cancel
|_基础概念 |
|_主事务和分支事务【事务参与者】
|_事务拦截器作用:[Spring AOP的基本概念要熟练掌握]|_1 CompensableTransactionInterceptor
|_ 将事务区分为Root事务和分支事务
|_不断的修改数据库内的状态【初始化事务,修改事务状态】
|_注册和清除事务管理器中队列内容
|_ResourceCoordinatorInterceptor
|_主要处理try阶段的事情
|_在try阶段,就将所有的"资源"封装完成并交给事务管理器
|_资源 -- 事务资源
事务的参与者
|_1.Confirm上下文
|_2.Cancel上下文
|_3.分支事务信息
|_4.事务管理器修改数据库状态
|_ 调用目标对象 -- order red cap
|_小结
|_ 1.事务的相关信息【全局事务编号,乐观锁版本等要持久化存储】
|_ 2.资源:* TCC 【try-confirm-cancel】 try核心点: 预留业务资源 把事务数据资源存入库中
|_ 3 流程:
|_注册和初始化事务
|_组织事务参与者
|_执行目标try方法
|_执行confirm和cancel方法
================================================
FILE: docs/code-solve.md
================================================
### 秒杀常见问题
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
> 秒杀注意事项以及整体简略设计
#### [1.如何解决卖超问题]()
--在sql加上判断防止数据变为负数
--数据库加唯一索引防止用户重复购买
--redis预减库存减少数据库访问 内存标记减少redis访问 请求先入队列缓冲,异步下单,增强用户体验
#### [注册功能 -- 如果有前端的牛人加入修改几个页面那是再好不过了哈哈哈]()
#### [全局异常处理拦截]()
1.定义全局的异常拦截器
2.定义了全局异常类型
3.只返回和业务有关的
4.详情请看GlobleException
#### [页面级缓存thymeleafViewResolver]()
1.详细请看basecontroller 缓存渲染页面
#### [对象级缓存redis🙋🐓]()
redis永久缓存对象减少压力
redis预减库存减少数据库访
内存标记方法减少redis访问
#### [订单处理队列rabbitmq]()
请求先入队缓冲,异步下单,增强用户体验
请求出队,生成订单,减少库存
客户端定时轮询检查是否秒杀成功
#### [解决分布式session]()
--生成随机的uuid作为cookie返回并redis内存写入
--拦截器每次拦截方法,来重新获根据cookie获取对象
--下一个页面拿到key重新获取对象
--HandlerMethodArgumentResolver 方法 supportsParameter 如果为true 执行 resolveArgument 方法获取miaoshauser对象
--如果有缓存的话 这个功能实现起来就和简单,在一个用户访问接口的时候我们把访问次数写到缓存中,在加上一个有效期。
通过拦截器. 做一个注解 @AccessLimit 然后封装这个注解,可以有效的设置每次访问多少次,有效时间是否需要登录!
#### [秒杀安全 -- 安全性设计]()
秒杀接口隐藏
数字公式验证码
接口防刷限流(通用 注解,拦截器方式)
#### [通用缓存key的封装采用什么设计模式]()
模板模式的优点
-具体细节步骤实现定义在子类中,子类定义详细处理算法是不会改变算法整体结构
-代码复用的基本技术,在数据库设计中尤为重要
-存在一种反向的控制结构,通过一个父类调用其子类的操作,通过子类对父类进行扩展增加新的行为,符合“开闭原则”
-缺点: 每个不同的实现都需要定义一个子类,会导致类的个数增加,系统更加庞大
#### [redis的库存如何与数据库的库存保持一致]()
redis的数量不是库存,他的作用仅仅只是为了阻挡多余的请求透穿到DB,起到一个保护的作用
因为秒杀的商品有限,比如10个,让1万个请求区访问DB是没有意义的,因为最多也就只能10个
请求下单成功,所有这个是一个伪命题,我们是不需要保持一致的
#### [redis 预减成功,DB扣减库存失败怎么办]()
-其实我们可以不用太在意,对用户而言,秒杀不中是正常现象,秒杀中才是意外,单个用户秒杀中
-1.本来就是小概率事件,出现这种情况对于用户而言没有任何影响
-2.对于商户而言,本来就是为了活动拉流量人气的,卖不完还可以省一部分费用,但是活动还参与了,也就没有了任何影响
-3.对网站而言,最重要的是体验,只要网站不崩溃,对用户而言没有任何影响
#### [为什么redis数量会减少为负数]()
//预见库存
long stock = redisService.decr(GoodsKey.getMiaoshaGoodsStock,""+goodsId) ;
if(stock <0){
localOverMap.put(goodsId, true);
return Result.error(CodeMsg.MIAO_SHA_OVER);
}
假如redis的数量为1,这个时候同时过来100个请求,大家一起执行decr数量就会减少成-99这个是正常的
进行优化后改变了sql写法和内存写法则不会出现上述问题
#### [为什么要单独维护一个秒杀结束标志]()
-1.前提所有的秒杀相关的接口都要加上活动是否结束的标志,如果结束就直接返回,包括轮寻的接口防止一直轮寻
-2.管理后台也可以手动的更改这个标志,防止出现活动开始以后就没办法结束这种意外的事件
#### [rabbitmq如何做到消息不重复不丢失即使服务器重启]()
-1.exchange持久化
-2.queue持久化
-3.发送消息设置MessageDeliveryMode.persisent这个也是默认的行为
-4.手动确认
#### [为什么threadlocal存储user对象,原理]()
1.并发编程中重要的问题就是数据共享,当你在一个线程中改变任意属性时,所有的线程都会因此受到影响,同时会看到第一个线程修改后的值<br>
有时我们希望如此,比如:多个线程增大或减小同一个计数器变量<br>
但是,有时我们希望确保每个线程,只能工作在它自己 的线程实例的拷贝上,同时不会影响其他线程的数据<br>
举例: 举个例子,想象你在开发一个电子商务应用,你需要为每一个控制器处理的顾客请求,生成一个唯一的事务ID,同时将其传到管理器或DAO的业务方法中,
以便记录日志。一种方案是将事务ID作为一个参数,传到所有的业务方法中。但这并不是一个好的方案,它会使代码变得冗余。
你可以使用ThreadLocal类型的变量解决这个问题。首先在控制器或者任意一个预处理器拦截器中生成一个事务ID
然后在ThreadLocal中 设置事务ID,最后,不论这个控制器调用什么方法,都能从threadlocal中获取事务ID
而且这个应用的控制器可以同时处理多个请求,
同时在框架 层面,因为每一个请求都是在一个单独的线程中处理的,所以事务ID对于每一个线程都是唯一的,而且可以从所有线程的执行路径获取
运行结果可以看出每个线程都在维护自己的变量:
Starting Thread: 0 : Fri Sep 21 23:05:34 CST 2018<br>
Starting Thread: 2 : Fri Sep 21 23:05:34 CST 2018<br>
Starting Thread: 1 : Fri Jan 02 05:36:17 CST 1970<br>
Thread Finished: 1 : Fri Jan 02 05:36:17 CST 1970<br>
Thread Finished: 0 : Fri Sep 21 23:05:34 CST 2018<br>
Thread Finished: 2 : Fri Sep 21 23:05:34 CST 2018<br>
局部线程通常使用在这样的情况下,当你有一些对象并不满足线程安全,但是你想避免在使用synchronized关键字<br>
块时产生的同步访问,那么,让每个线程拥有它自己的对象实例<br>
注意:局部变量是同步或局部线程的一个好的替代,它总是能够保证线程安全。唯一可能限制你这样做的是你的应用设计约束<br>
所以设计threadlocal存储user不会对对象产生影响,每次进来一个请求都会产生自身的线程变量来存储
#### [maven 隔离]()
maven隔离就是在开发中,把各个环境的隔离开来,一般分为
本地(local)
开发(dev)
测试(test)
线上(prod)
在环境部署中为了防止人工修改的弊端! spring.profiles.active=@activatedProperties@
#### [redis 分布式锁实现方法]()
我用了四种方法 , 分别指出了不同版本的缺陷以及演进的过程 orderclosetask
V1---->>版本没有操作,在分布式系统中会造成同一时间,资源浪费而且很容易出现并发问题
V2--->>版本加了分布式redis锁,在访问核心方法前,加入redis锁可以阻塞其他线程访问,可以
很好的处理并发问题,但是缺陷就是如果机器突然宕机,或者线路波动等,就会造成死锁,一直
不释放等问题
V3版本-->>很好的解决了这个问题v2的问题,就是加入时间对比如果当前时间已经大与释放锁的时间
说明已经可以释放这个锁重新在获取锁,setget方法可以把之前的锁去掉在重新获取,旧值在于之前的
值比较,如果无变化说明这个期间没有人获取或者操作这个redis锁,则可以重新获取
V4---->>采用成熟的框架redisson,封装好的方法则可以直接处理,但是waittime记住要这只为0
#### [服务降级--服务熔断(过载保护))]()
自动降级: 超时.失败次数,故障,限流
人工降级:秒杀,双11
9.所有秒杀相关的接口比如:秒杀,获取秒杀地址,获取秒杀结果,获取秒杀验证码都需要加上
秒杀是否开始结束的判断
#### [RPC事务补偿]()
当集中式进行服务化RPC演进成分布式的时候,事务则成为了进行分布式的一个痛点,本项目的做法为:
1.进行流程初始化,当分别调用不用服务化接口的时候,成功则进行流程,失败则返回并进行状态更新
将订单状态变为回滚
2.使用定时任务不断的进行处理rollback的订单进行回滚
#### [秒杀类似场景sql的写法注意事项]()
1.在秒杀一类的场景里面,因为数据量亿万级所有即使有的有缓存有的时候也是扛不住的,不可避免的透穿到DB
所有在写一些sql的时候就要注意:
1.一定要避免全表扫描,如果扫一张大表的数据就会造成慢查询,导致数据的连接池直接塞满,导致事故
首先考虑在where和order by 设计的列上建立索引
例如: 1. where 子句中对字段进行 null 值判断 .
2. 应尽量避免在 where 子句中使用!=或<>操作符
3. 应尽量避免在 where 子句中使用 or 来连接条件
4. in 和 not in 也要慎用,否则会导致全表扫描( 如果索引 会优先走索引 不会导致全表扫描
字段上建了索引后,使用in不会全表扫描,而用not in 会全表扫描 低版本的mysql是两种情况都会全表扫描。
5.5版本后以修。而且在优化大表连接查询的时候,有一个方法就是将join操作拆分为in查询)
5. select id from t where name like '%abc%' 或者
6.select id from t where name like '%abc' 或者
7. 若要提高效率,可以考虑全文检索。
8.而select id from t where name like 'abc%' 才用到索引 慢查询一般在测试环境不容易复现
9.应尽量避免在 where 子句中对字段进行表达式操作 where num/2 num=100*2
2.合理的使用索引 索引并不是越多越好,使用不当会造成性能开销
3.尽量避免大事务操作,提高系统并发能力
4.尽量避免象客户端返回大量数据,如果返回则要考虑是否需求合理,实在不得已则需要在设计一波了!!!!!
#### [网站访问统计实现]()

利用lua脚本进行对redis操作,登陆时,每次登陆成功则记录访问(具体你想在什么时段进行统计自己说了算)
#### [项目进行dubbo+ZK改造]()
├── miaosha-admin 登录模块
│ ├── pom.xml
│ └── miaosha-admin-api
│ └── miaosha-admin-service
│ └── miaosha-admin-web
│ └── miaosha-common
│
│
├── miaosha-order 订单秒杀模块
│ ├── pom.xml
│ └── miaosha-order-api
│ └── miaosha-order-service
│ └── miaosha-order-web
│ └── miaosha-order-common
│
│
├── miaosha-message 消息模块
│ ├── pom.xml
│ └── miaosha-message-api
│ └── miaosha-message-service
│ └── miaosha-message-web
│ └── miaosha-message-common
│
│
================================================
FILE: docs/dubbo-admin.md
================================================
### dubbo-admin 平台搭建与管理
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
#### [dubbo-admin-2.6.0 war包 请进入/docs/dubbo-admin/下载](/docs/dubbo-admin/dubbo-admin-2.6.0.war)
1.可直接 https://github.com/apache/incubator-dubbo/releases/tag/dubbo-2.6.0 下载后将dubbo-admin-2.6.0达成war包
2./docs/dubbo-admin/dubbo-admin-2.6.0.war获取war包
3.获取后 将war包放在tomcat的webapp目录
4.启动 window startup.bat linux ./bin/startup.sh 启动 -- 记得安装zk客户端才可以启动成功
5.访问 http://端口号:8080/dubbo-admin-2.6.0/ 可成功
6.账号密码 root/root
================================================
FILE: docs/dubbo-zk.md
================================================
### dubbo + zk 使用与进阶
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
>目标 (希望大家仔细研究dubbo文档 源码分析正在更新中打算实现自己的rpc框架 请看dubbo-die )
http://dubbo.apache.org/zh-cn/docs/user/references/xml/dubbo-method.html dubbo文档地址
mapper 文件记得 在pom里面配置否则无法访问除了resources的mapper文件

**1.如何利用dubbo 进行服务降级 ?**
一些服务降级措施,当服务提供端某一个非关键的服务出错时候,dubbo可以对消费端的调用进行降级,这样服务消费端就避免了在去调用出错的服务提供端,而是使用自定义的返回值直接在在本地返回
**2.springboot + dubbo 配置 ?**

可以通过服务降级功能临时屏蔽某个出错的非关键服务,并定义降级后的返回策略

**3.使用方式 ?**
在dubbo的页面 可以手动 更改自己想要的效果,也可以更改返回值!点击overrides 更改

**4.解析**
MockClusterInvoker
正常

force

fail

impl

**5.参数含义**

------------------------------------------------------------------------------------------------------
**6.自定义服务降级**

**7.自定义服务降级---类 必须为service加上mock**

================================================
FILE: docs/fenbushi-tcc.md
================================================
### 分布式事务
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
>目标 (希望大家仔细研究redis.conf配置文件-本文很多基础的一带而过)
1.事务简介
2.分布式事务的前世今生
3.分布式事务解决方案
4.主流分布式事务框架介绍
整理大部分常用的场景与使用,如果有疑问或者你不懂的地方请联系我!
#### 1 分布式事务
>1.将多个节点的事务看成一个整体处理
>2.分布式事务由事务参与者,资源服务器,事务管理器等组成
>3.常见的分布式事务的例子: 支付,下订单等
>4.两段式事务和三段式事务(2pc,3pc)
基于XA的分布式事务
基于消息的最终一致性方案
TCC编程式补偿性方案
**redis分布式锁解决什么问题**
1.一个进程中的多个线程,多个线程并发访问同一个资源的时候,如何解决线程安全问题。
2.一个分布式架构系统中的两个模块同时去访问一个文件对文件进行读写操作
3.多个应用对同一条数据做修改的时候,如何保证数据的安全性
在但一个进程中,我们可以用到synchronized、lock之类的同步操作去解决,但是对于分布式架构下多进程的情况下,
如何做到跨进程的锁。就需要借助一些第三方手段来完成
**设计一个分布式所需要解决的问题,分布式锁解决方案(数据库方案)**
数据库解决方式,创建一个表叫做LOCK表
lock(
id int(11)
methodName varchar(100),--锁定的方法名称
memo varchar(1000)
modifyTime timestamp
unique key mn (method) --唯一约束
)
在执行方法的时候,获取锁的伪代码 或者for update行锁 或者 乐观锁方式也是可以的
try{
exec insert into lock(methodName,memo) values(‘method’,’desc’);
return true;
}Catch(DuplicateException e){
return false;
}
释放锁:
delete from lock where methodName=’’;
**(数据库方案)存在的问题以及思考**
1.锁没有失效时间,一旦解锁操作失败,就会导致锁记录一直在数据库中,其他线程无法再获得到锁
2.锁是非阻塞的,数据的insert操作,一旦插入失败就会直接报错。没有获得锁的线程并不会进入排队队列
要想再次获得锁就要再次触发获得锁操作
3.锁是非重入的,同一个线程在没有释放锁之前无法再次获得该锁
**ZK方案**
ZK方案实现之前你要先了解ZK关于他的节点的几个特性:
有序节点:假如当前有一个父节点为/lock,我们可以在这个父节点下面创建子节点;zookeeper提供了一个可选的有序特性
例如我们可以创建子节点“/lock/node-”并且指明有序,那么zookeeper在生成子节点时会根据当前的子节点数量自动添加整数序号
也就是说如果是第一个创建的子节点,那么生成的子节点为/lock/node-0000000000,下一个节点则为/lock/node-0000000001,依次类推
临时节点:客户端可以建立一个临时节点,在会话结束或者会话超时后,zookeeper会自动删除该节点
事件监听:在读取数据时,我们可以同时对节点设置事件监听,当节点数据或结构变化时,zookeeper会通知客户端
当前zookeeper有如下四种事件:
1)节点创建
2)节点删除
3)节点数据修改
4)子节点变更
获取分布式锁的流程 ------- 假设所空间的根节点为/lock
1.客户端连接zookeeper,并在/lock下创建临时的且有序的子节点
第一个客户端对应的子节点为/lock/lock-0000000000,第二个为/lock/lock-0000000001,以此类推
2.--避免羊群效应--客户端获取/lock下的子节点列表,判断自己创建的子节点是否为当前子节点列表中序号最小的子节点,
如果是则认为获得锁,否则监听刚好在自己之前一位的子节点删除消息,获得子节点变更通知后重复此步骤直至获得锁
3.实行业务代码
4.流程完成后,删除对应的子节点并释放锁 (Watch机制)
对应分布式开源包Curator

**Redis分布式锁方案**
Redis 中有许多的命令都可以实现分布式锁,但是比较常用的是SETNX这个命令来实现
有多种方案代码:
1.获取锁,释放锁 代码在redismanager 里面 (简单版)


closeOrder也有 不过是另一种!比较复杂!!
加入时间对比如果当前时间已经大与释放锁的时间
说明已经可以释放这个锁重新在获取锁,setget方法可以把之前的锁去掉在重新获取,旧值在于之前的
值比较,如果无变化说明这个期间没有人获取或者操作这个redis锁,则可以重新获取

redis有成熟的框架redission
**Redis多路复用机制(看不看都行)**
linux的内核会把所有外部设备都看作一个文件来操作,对一个文件的读写操作会调用内核提供的系统命令,
返回一个 file descriptor(文件描述符)。对于一个socket的读写也会有响应的描述符,称为socketfd(socket 描述符)。
而IO多路复用是指内核一旦发现进程指定的一个或者多个文件描述符IO条件准备好以后就通知该进程
IO多路复用又称为事件驱动,操作系统提供了一个功能,当某个socket可读或者可写的时候,它会给一个通知。
当配合非阻塞socket使用时,只有当系统通知我哪个描述符可读了,我才去执行read操作,可以保证每次read都能读到有效数据。
操作系统的功能通过select/pool/epoll/kqueue之类的系统调用函数来使用,这些函数可以同时监视多个描述符的读写就绪情况
,这样多个描述符的I/O操作都能在一个线程内并发交替完成,这就叫I/O多路复用,这里的复用指的是同一个线程
多路复用的优势在于用户可以在一个线程内同时处理多个socket的 io请求。达到同一个线程同时处理多个IO请求的目的。
而在同步阻塞模型中,必须通过多线程的方式才能达到目的
**Redis(2.6以后)--lua脚本**
1.减少网络开销,在Lua脚本中可以把多个命令放在同一个脚本中运行
2.原子操作,redis会将整个脚本作为一个整体执行,中间不会被其他命令插入。换句话说,编写脚本的过程中无需担心会出现竞态条件
3.复用性,客户端发送的脚本会永远存储在redis中,这意味着其他客户端可以复用这一脚本来完成同样的逻辑
4.脚本可以通过return 来返回客户端
例子: 利用lua脚本进行电话号或则IP限流 实例 具体请看 redislua类
KEYS[1] ARGV[1] ARGV[2] key 参数1 参数2
local num=redis.call('incr',KEYS[1])
if tonumber(num)==1 then
redis.call('expire',KEYS[1],ARGV[1])
return 1
elseif tonumber(num)>tonumber(ARGV[2]) then
return 0
else
return 1
end
**Redis(2.6以后)--lua--EVALSHA命令**
考虑到我们通过eval执行lua脚本,脚本比较长的情况下,每次调用脚本都需要把整个脚本传给redis
比较占用带宽。为了解决这个问题,redis提供了EVALSHA命令允许开发者通过脚本内容的SHA1摘要来执行脚本。该命令的用法和EVAL一样,
只不过是将脚本内容替换成脚本内容的SHA1摘要
1. Redis在执行EVAL命令时会计算脚本的SHA1摘要并记录在脚本缓存中
2. 执行EVALSHA命令时Redis会根据提供的摘要从脚本缓存中查找对应的脚本内容
如果找到了就执行脚本,否则返回“NOSCRIPT No matching script,Please use EVAL”
**Redis(2.6以后)--lua脚本运行限制**
redis的脚本执行是原子的,即脚本执行期间Redis不会执行其他命令
所有的命令必须等待脚本执行完以后才能执行。为了防止某个脚本执行时间过程导致Redis无法提供服务
Redis提供了lua-time-limit参数限制脚本的最长运行时间--默认是5秒钟
当脚本运行时间超过这个限制后,Redis将开始接受其他命令但不会执行(以确保脚本的原子性),而是返回BUSY的错误
在第一个窗口中执行lua脚本的死循环
eval “while true do end” 0 在第二个窗口中运行get hello
最后第二个窗口的运行结果是Busy, 可以通过script kill命令终止正在执行的脚本
如果当前执行的lua脚本对redis的数据进行了修改,比如(set)操作,那么script kill命令没办法终止脚本的运行,
因为要保证lua脚本的原子性。如果执行一部分终止了,就违背了这一个原则
在这种情况下,只能通过 shutdown nosave命令强行终止
**Redis(2.6以后)--lua分布式锁**

================================================
FILE: docs/fenbushi.md
================================================
### 分布式系统
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
> 分布式系统历程----1

> 分布式系统历程----2

> 分布式系统历程----3

> 分布式系统历程----4

> 分布式系统历程----5

> 分布式系统历程----6

> 分布式系统历程----7

================================================
FILE: docs/jemter-solve.md
================================================
### 如何利用jmeter进行压测
### 我的服务配置较低大数据量请在自己的服务器上搞下不然就崩了
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
>目标 (希望大家仔细研究redis.conf配置文件-本文很多基础的一带而过)
1.如何对秒杀生成大数据量对应的用户id和token来进行压测
2.利用jmeter进行接口压测
我这个版本只是简单的测试,你仍然需要把一些接口安全的放开或者自己写一个没有安全性防刷一类的接口测试性能
如果有疑问或者你不懂的地方请联系我!
#### 1 利用jmeter进行接口压测 (jmeter3.0 jdk1.7 版本以上需1.8 版本在tools里面)
**秒杀生成大数据量对应的用户id和token**
在后端写模拟前端请求计算出不同的用户对应的token , 在UserUtil类里面
生成文件格式:

代码类:


利用这个类可以生成大数据量的userId和token当前也可以自己改装生成你想要的
**利用jmeter进行接口压测**
1.点击右键生成线程组一类的

2.右键线程组选择配置原件并定义http默认值

3.右键监听器可以生成聚合报告等一类的

4.右键线程组添加sampler 添加请求http请求具体情况更具实际的来

5.右键线程组添加CSV DATA Set Config 设置用户参数和token 把生成的路径引进来

================================================
FILE: docs/jvm-goods.md
================================================
### 生产内存环境
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
## 前言
注重实践,不会长篇大论,纯属浪费大家时间!属于进阶文章,感谢你的支持!
解决问题:
|_ 1.生产环境发生了内存溢出该如何处理
|_ 2.生产环境应该给服务器分配多少的内存
|_ 3.如何对垃圾回收起的性能进行调优
|_ 4.生产环境CPU的负载飙高应该如何处理
|_ 5.生产环境因该给应用分配多少的线程合适
|_ 6.不加log如何确定请求是否执行到某一段的代码
|_ 7.实时查看某个方法的入参与返回值
|_ 8.JVM的字节码实操
|_ 9.循环体中字符串拼接为什么效率很低
|_ 10.string常量池怎么回事
|_ 11.用字节码分析 i++,++i 到底哪种效率高
项目实战收获:
|_ 1.熟练使用各种监控和调试工具
|_ 2.从容应对生产环境的各种调试和性能
|_ 3.熟悉JVM字节码指令
|_ 4.深入理解JVM自动回收机制学会GC调优
|_ 5.基于JDK命令行的监控 |_ JVM的参数类型
|_ 查看JVM运行时的参数
|_ Jstat查看JVM统计信息
|_ 演示内存溢出
|_ 导出内存映像文件
|_ MAT分析内存溢出
|_ jstack与线程的状态
|_ jstack实战死循环与锁
|_ 6.基于JVisualVM的可视化工具 |_ 监控本地java进程
|_ 监控远程java进程
|_ 7.基于Btrace的监控调试基于Btrace的监控调试 |_ Btrace入门
|_ 拦截器构造函数,同名函数
|_ 拦截器返回值,异常,行号
|_ 拦截器复杂参数,环境变量,正则匹配拦截
|_ 注意事项
|_ 8.tomcat的性能监控调优 |_ tomcat远程debug
|_ tomcat-manager监控
|_ psi-probe监控
|_ tomcat优化
|_ 9.nginx的监控调优 |_ nginx的监控调优
|_ ngx_http_stub_status监控连接信息
|_ ngxtop监控请求信息
|_ nginx-rrd图形化监控
|_ nginx优化
|_ 10.jvm+gc调优 |_ JVM的内存结构以及各个分区
|_ 常见垃圾回收算法
|_ 垃圾回收期调优
|_ 如何分析内存日志
|_ 垃圾回收器
|_ GC日志格式详解
|_ ParallelGC调优
|_ G1调优
**基于JDK命令行工具监控**
|_ JVM参数类型
|_ 运行时JVM参数查看
|_ jstat查看虚拟机统计信息
|_ jmap + MAT实战内存溢出
|_ jstack 实战死锁循环与死锁
| ID | Problem | Article |
| --- | --- | :--- |
| 000 |JVM参数类型 | 三种: 标准参数 , X参数 ,XX 参数 |
| 001 |如何对本项目进行jmeter压测 | [解决思路](https://raw.githubusercontent.com/qiurunze123/imageall/master/miaosha.png) |
================================================
FILE: docs/linux.md
================================================
### 秒杀nginx优化
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
##要求:
>目标
1.并发优化
2.KeepALive长连接优化
3.压缩优化
4.配置缓存
#### [/docs/tools/nginx nginx优化相关包](/docs/tools)
安装:cd
yum install -y gcc gcc-c++
./configure --prefix=/usr/local/nginx --with-pcre=/home/qiurunze/下载/pcre-8.38 --with-http_stub_status_module --with-http_gzip_static_module --add-module=/home/qiurunze/下载/ngx_cache_purge-2.3
make
make install
ps -ef | grep nginx
./sbin/nginx -s reload
http://nginx.org/en/docs/
1.工作线程数和并发连接数
worker_processes 4; #cpu,如果nginx单独在一台机器上
worker_processes auto;
events {
worker_connections 4096;#每一个进程打开的最大连接数,超出了log中会有记录
multi_accept on; #可以一次建立多个连接
use epoll;
}
worker_rlimit_nofile 10240;每个进程打开的最大的文件数,受限于操作系统:
vi /etc/security/limits.conf
* hard nofile 102400
* soft nofile 102400
* soft core unlimited
* soft stack 10240
2.操作系统优化
配置文件/etc/sysctl.conf
sysctl -w net.ipv4.tcp_syncookies=1#防止一个套接字在有过多试图连接到达时引起过载
sysctl-w net.core.somaxconn=1024#默认128,连接队列
sysctl-w net.ipv4.tcp_fin_timeout=10 # timewait的超时时间
sysctl -w net.ipv4.tcp_tw_reuse=1 #os直接使用timewait的连接
sysctl -w net.ipv4.tcp_tw_recycle = 0 #回收禁用
3.Keepalive长连接
Nginx与upstream server:
upstream server_pool{
server localhost:8080 weight=1 max_fails=2 fail_timeout=30s;
keepalive 300; #300个长连接
}
同时要在location中设置:
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
客户端与nginx(默认是打开的):
4.keepalive_timeout 60s; #长连接的超时时间
keepalive_requests 100; #100个请求之后就关闭连接,可以调大
keepalive_disable msie6; #ie6禁用启用压缩
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_proxied any;
gzip_types text/html text/plain application/x-javascript application/javascript text/css application/xml
gzip_vary on; #Vary: Accept-Encoding
gzip_static on; #如果有压缩好的 直接使用
5.状态监控
location = /nginx_status {
stub_status on;
access_log off;
allow <YOURIPADDRESS>;
deny all;
}
输出结果:
Active connections: 1
server accepts handled requests
17122 17122 34873
Reading: 0 Writing: 1 Waiting: 0
Active connections:当前实时的并发连接数
accepts:收到的总连接数,
handled:处理的总连接数
requests:处理的总请求数
Reading:当前有都少个读,读取客户端的请求
Writing:当前有多少个写,向客户端输出
Waiting:当前有多少个长连接(reading + writing)
reading – nginx reads request header
writing – nginx reads request body, processes request, or writes response to a client
waiting – keep-alive connections, actually it is active - (reading + writing)
6.实时请求信息统计ngxtop
https://github.com/lebinh/ngxtop
(1)安装python-pip
yum install epel-release
yum install python-pip
(2)安装ngxtop
pip install ngxtop
(3)使用
指定配置文件: ngxtop -c ./conf/nginx.conf
查询状态是200: ngxtop -c ./conf/nginx.conf --filter 'status == 200'
查询那个ip访问最多: ngxtop -c ./conf/nginx.conf --group-by remote_addr
-----------------------------------------------------------------------------
nginx.conf配置文件
user www;
worker_processes 4;#取决于cpu
error_log logs/error.log;
pid logs/nginx.pid;
worker_rlimit_nofile 10240; #每个进程打开的最大的文件数,受限于操作系统/etc/security/limits.conf
events {
worker_connections 10240;#每一个进程打开的最大连接数,超出了log中会有记录
multi_accept on; #可以一次建立多个连接
use epoll;
}
http {
include mime.types;
default_type application/octet-stream;
server_tokens off; #隐藏版本号
client_max_body_size 10m; #文件上传需要调大
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
#默认写日志:打开文件写入关闭,max:缓存的文件描述符数量,inactive缓存时间,valid:检查时间间隔,min_uses:在inactive时间段内使用了多少次加入缓存
open_log_file_cache max=200 inactive=20s valid=1m min_uses=2;
sendfile on;
tcp_nopush on;
#与浏览器的长连接
keepalive_timeout 65;#长连接超时时间
keepalive_requests 500;#500个请求以后,关闭长连接
keepalive_disable msie6;
# 启用压缩
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_proxied any;
gzip_types text/plain application/x-javascript application/javascript text/css application/xml;
gzip_vary on; #Vary: Accept-Encoding
gzip_static on; #如果有压缩好的 直接使用
#超时时间
proxy_connect_timeout 5; #连接proxy超时
proxy_send_timeout 5; # proxy连接nginx超时
proxy_read_timeout 60;# proxy响应超时
# 开启缓存,2级目录
proxy_cache_path /usr/local/nginx/proxy_cache levels=1:2 keys_zone=cache_one:200m inactive=1d max_size=20g;
proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
proxy_hide_header Cache-Control;
proxy_hide_header Pragma;
#反向代理服务器集群
upstream server_pool{
server localhost:8080 weight=1 max_fails=2 fail_timeout=30s;
server localhost:8081 weight=1 max_fails=2 fail_timeout=30s;
keepalive 200; # 最大的空闲的长连接数
}
server {
listen 80;
server_name localhost 192.168.220.133;
location / {
#长连接
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#Tomcat获取真实用户ip
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://server_pool;
}
# 状态监控
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
allow 192.168.220.133;
deny all;
}
#用于清除缓存
location ~ /purge(/.*)
{
allow 127.0.0.1;
allow 192.168.220.133;
deny all;
proxy_cache_purge cache_one $host$1$is_args$args;
}
# 静态文件加缓存
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css|html|htm)?$
{
expires 1d;
proxy_cache cache_one;
proxy_cache_valid 200 304 1d;
proxy_cache_valid any 1m;
proxy_cache_key $host$uri$is_args$args;
proxy_pass http://server_pool;
}
}
}
================================================
FILE: docs/maven-wrapper.md
================================================
### maven wrapper
下载项目, 切换的项目根目录
```bash
Linux/Mac:
> cd miaosha/
> ./mvnw clean install
Windows:
> mvnw.cmd clean install
```
运行以上命令相关依赖便会安装完毕
启动GeekQMainApplication主类即可
若有对于./mvnw 不了解的请点击下方链接介绍
> 传统maven的使用流程
1. 传统使用maven需要先到官网上下载.
2. 配置环境变量把mvn可执行文件路径加入到环境变量,以便之后使用直接使用mvn命令.
3. 另外项目pom.xml文件描述的依赖文件默认是下载在用户目录下的.m2文件下的repository目录下.
4. 再次,如果需要更换maven的版本,需要重新下载maven并替换环境变量path中的maven路径.
> maven-wrapper,会获得以下特性
执行mvnw比如./mvnw clean ,如果本地没有匹配的maven版本,直接会去下载maven,放在用户目录下的.m2/wrapper中
并且项目的依赖的jar包会直接放在项目目录下的repository目录,这样可以很清晰看到当前项目的依赖文件。
如果需要更换maven的版本,只需要更改项目当前目录下.mvn/wrapper/maven-wrapper.properties的distributionUrl属性值,更换对应版本的maven下载地址。mvnw命令就会自动重新下载maven。
可以说带有mvnw文件的项目,除了额外需要配置 java环境外,只需要使用本项目的mvnw脚本就可以完成编译,打包,发布等一系列操作。
> 如何使用呢?
通常我们在使用maven的时候会执行如下一些命令:
mvn clean
mvn install
mvn package
...
使用maven wrapper之后只需打开terminal 执行如下等价命令即可:
linux:
./mvnw clean
./mvnw install
./mvnw package
...
windows:
mvnw.cmd clean
mvnw.cmd install
mvnw.cmd package
...
> Get Started!
因此大家在下载项目代码之后, 只需要执行 ./mvn clean install
maven warpper 便会自动为该项目构建maven环境.
当然如果大家用的IDE是idea 那么依然也可以使用右上方的MavenProject Panel 鼠标触发各个Task
================================================
FILE: docs/mybatis-code.md
================================================
### mybatis使用与总结
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
> mybatis 使用总结
#### resultType 和 resultMap
MyBatis的每一个查询映射的返回类型都是ResultMap,
只是当我们提供的返回类型属性是resultType的时候,MyBatis对自动的给我们把对应的值赋给resultType所指定对象的属性,
而当我们提供的返回类型是resultMap的时候,将数据库中列数据复制到对象的相应属性上,可以用于复制查询,两者不能同时用。
#### typeAliases类型命名
存在的意义在于减少类的完全限定名的冗余
_user可以用在任何需要com.geekq.miaosha.mybatis.User
### 当实体类中的属性名和表中的字段名不一致时使用MyBatis进行查询操作时无法查询出相应的结果的问题以及针对问题采用的两种办法
解决办法一: 通过在查询的sql语句中定义字段名的别名,让字段名的别名和实体类的属性名一致,
这样就可以表的字段名和实体类的属性名一一对应上了,这种方式是通过在sql语句中定义别名来解决字段名和属性名的映射关系的
解决办法二: 通过<resultMap>来映射字段名和实体类属性名的一一对应关系。
这种方式是使用MyBatis提供的解决方式来解决字段名和属性名的映射关系的。
### 为什么order by 要用${xxx} 而不用 #{}
对于形如#{variable}
的变量,Mybatis会将其视为字符串值,在变量替换成功后,缺省地给变量值加上引号。"variable"
(2)对于形如${variable}的变量,Mybatis会将其视作直接变量,即在变量替换成功后,不会再给其加上引号。
variable
所以在动态sql中,#{variable}
需要去掉 "",比如正常sql赋值一般是这样的and name= #{name},因为是=赋值,所以会获取内容,去掉""
${variable}可以直接使用,比如order
by ${name} 传入的直接是name,不带双引号,可以直接使用,
并且order
by不是 =赋值,所以如果直接order by #{name},结果是order
by "name",自然无法执行了
### 如何打印sql日志 ?
xml方式
<setting name="lazyLoadTriggerMethods" value="clone"/>
<!-- 打印查询语句 打印mybatis日志-->
<setting name="logImpl" value="STDOUT_LOGGING" />
配置方式:
#打印mybatis sql
log4j.logger.com.ibatis=DEBUG
log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG
log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG
log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG
log4j.logger.Java.sql.Connection=DEBUG
log4j.logger.java.sql.Statement=DEBUG
log4j.logger.java.sql.PreparedStatement=DEBUG
### 动态sql标签
if
choose (when, otherwise)
trim (where, set)
foreach
### 如何使用mybatis-generator:generate
pom 配置:
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<verbose>true</verbose>
<overwrite>false</overwrite>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.21</version>
</dependency>
</dependencies>
</plugin>


### generatorConfig.xml 内容解析?
已在其中备注,详细内容请见generatorConfig.xml
### xml映射文件都会有一个dao接口,工作原理?
Dao接口里的方法,是不能重载的,因为是全限名+方法名的保存和寻找策略。
Dao接口的工作原理是JDK动态代理,Mybatis运行时会使用JDK动态代理为Dao接口生成代理proxy对象,
代理对象proxy会拦截接口方法,转而执行MappedStatement所代表的sql,然后将sql执行结果返回。
###
================================================
FILE: docs/mysql-2.md
================================================
### mysql数据库设计与优化与架构 模拟场景(京东商城)
任何优化多需要场景,本次所有的场景为京东商城的数据库设计模拟!
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
##简介:
设计:
1.常见业务处理
2.执行计划分析
3.如何优化分页查询示例
4.如何删除重复数据示例
5.如何进行分区间数据统计显示
6.捕获有问题的sql慢查日志
**执行计划能够告诉我们什么**
1.sql如何使用索引
2.链接查询的执行顺序
3.查询扫描数据行数
**执行计划内容**

ID列:数据为一组数字表示执行select语句的顺序
id值相同的时候执行顺序由上至下
id值越大优先级越高,越先被执行
ID列中的如果数据为一组数字,表示执行SELECT语句的顺序;如果为NULL,则说明这一行数据是由另外两个SQL语句进行 UNION操作后产生的结果集
SELECT_TYPE |_ SIMPLE不包含子查询或者是UNION操作的查询
|_ PRIMARY 查询中如果包含任何子查询,那么最外层的查询则被标记为 PRIMARY
|_ SUBQUERY select 列表中的子查询
|_ DEPENDENT 依赖外部结果的子查询
|_ SUBQUERY 依赖外部结果的子查询
|_ UNION Union操作的第二个或是之后的查询的值为union
|_ DEPENDENT UNION 当UNION作为子查询时,第二或是第二个后的查询的select_type值
|_ UNION RESULT UNION产生的结果集
|_ DERIVED 出现在FROM子句中的子查询
TABLE |_ 所在表的名称,如果表取了别名,则显示的是别名
|_ <union M,N>: 由ID为M,N查询union产生的结果集
|_ <derived N>/<subquery N> :由ID为N的查询产生的结果
PARTITIONS 分区表
查询匹配的记录来自哪一个分区
对于分区表,显示查询的分区ID
对于非分区表,显示为NULL
TYPE列
|_ system 这是const联接类型的一个特例,当查询的表只有一行时使用
|_ const 表中有且只有一个匹配的行时使用,如对主键或是唯一索引的查询,这是效率最高的联接方式
|_ eq_ref 唯一索引或主键索引查询,对应每个索引键,表中只有一条记录与之匹配
|_ ref 非唯一索引查找,返回匹配某个单独值的所有行
|_ ref_or_null 类似于ref类型的查询,但是附加了对NULL值列的查询
|_ index_merge 该联接类型表示使用了索引合并优化方法
|_ range 索引范围扫描,常见于between、>、<这样的查询条件
|_ index FULL index Scan 全索引扫描,同ALL的区别是,遍历的是索引树
|_ ALL FULL TABLE Scan 全表扫描,这是效率最差的联接方式
Extra列
|_ Distinct 优化distinct操作,在找到第一个匹配的元素后即停止查找
|_ Not exists 使用not exists来优化查询
|_ Using filesort 使用额外操作进行排序,通常会出现在order by或group by查询中
|_ Using index 使用了覆盖索引进行查询
|_ Using temporary MySQL需要使用临时表来处理查询,常见于排序,子查询,和分组查询
|_ Using where 需要在MySQL服务器层使用WHERE条件来过滤数据
|_ select tables optimized away 直接通过索引来获得数据,不用访问表,这种情况通常效率是最高的
POSSIBLE_KEYS列
|_ 指出MySQL能使用哪些索引来优化查询
|_ 查询列所涉及到的列上的索引都会被列出,但不一定会被使用
KEY列
|_查询优化器优化查询实际所使用的索引
|_如果表中没有可用的索引,则显示为NULL
|_如果查询使用了覆盖索引,则该索引仅出现在Key列中
KEY_LEN列
|_ 显示MySQL索引所使用的字节数,在联合索引中如果有3列,假如3列字段总长度为100个字节
Key_len显示的可能会小于100字节,比如30字节
这就说明在查询过程中没有使用到联合索引的所有列,只是利用到了前面的一列或2列
|_ 表示索引字段的最大可能长度
|_ Key_len的长度由字段定义计算而来,并非数据的实际长度
Ref列
|_ 表示当前表在利用Key列记录中的索引进行查询时所用到的列或常量
|_
|_
rows列
|_ 表示MySQL通过索引的统计信息,估算出来的所需读取的行数(关联查询时,显示的是每次嵌套查询时所需要的行数
|_ Rows值的大小是个统计抽样结果,并不十分准确
Filtered列
|_ 表示返回结果的行数占需读取行数的百分比
|_ Filtered列的值越大越好(值越大,表明实际读取的行数与所需要返回的行数越接近)
|_ Filtered列的值依赖统计信息,所以同样也不是十分准确,只是一个参考值
执行计划的限制
|_ 无法展示存储过程,触发器,UDF对查询的影响
|_ 无法使用EXPLAIN对存储过程进行分析
|_ 早期版本的MySQL只支持对SELECT语句进行分析
----------------------------------------------------
如何删除重复数据
删除评论表中的对同一个商品的重复评论,只保留最早的一条
|--- 查看是否存在对于同一订单同一商品的重复评论,如果存在,进行后续步骤
查询语句:
SELECT order_id,product_id,COUNT(*) FROM product_comment
GROUP BY order_id,product_id HAVING COUNT(*) > 1;
|--- 备份product_comment表(避免误删除的情况)
CREATE TABLE bak_product_comment_190108 AS SELECT * FROM product_comment;
错误代码:1786 Statement violates GTID consistency:CREATE TABLE ... SELECT.
则换用下面的语句
CREATE TABLE bak_product_comment_190108 AS LIKE product_comment;
INSERT INTO bak_product_comment_190108 SELECT * FROM product_comment;
错误代码:1786
Statement violates GTID consistency:CREATE TABLE ... SELECT.
错误原因
这是因为在5.6及以上的版本内,开启了 enforce_gtid_consistency=true 功能导致的,MySQL官方解释说当启用 enforce_gtid_consistency 功能的时候,MySQL只允许能够保障事务安全,并且能够被日志记录的SQL语句被执行,像create table … select 和 create temporarytable语句,以及同时更新事务表和非事务表的SQL语句或事务都不允许执行。
解决办法
|---- 修改 :
SET @@GLOBAL.ENFORCE_GTID_CONSISTENCY = off;
配置文件中 :
ENFORCE_GTID_CONSISTENCY = off;
|----
create table xxx as select 的方式会拆分成两部分。
create table xxxx like data_mgr;
insert into xxxx select *from data_mgr;
如果表数据量比较大,则使用mysql dump的方式导出成文件进行备份
|---- 删除同一订单的重复评论
删除语句:
DELETE a FROM product_comment a
JOIN(
SELECT order_id,product_id,MIN(comment_id) AS comment_id
FROM product_comment
GROUP BY order_id,product_id
HAVING COUNT(*) > 1
) b on a.order_id = b.order_id AND a.product_id = b.product_id
AND a.comment_id > b.comment_id;
分区间统计
统计消费总金额大于1000元的,800到1000元的,500到800元的,以及500元以下的人数
SELECT
COUNT(CASE WHEN IFNULL(total_money,0) >= 1000 THEN a.customer_id END) AS '大于1000'
,COUNT(CASE WHEN IFNULL(total_money,0) >= 800 AND IFNULL(total_money,0)<1000
THEN a.customer_id END) AS '800~1000'
,COUNT(CASE WHEN IFNULL(total_money,0) >= 500 AND IFNULL(total_money,0)<800
THEN a.customer_id END) AS '500~800'
,COUNT(CASE WHEN IFNULL(total_money,0) < 500 THEN a.customer_id END) '小于500'
FROM mc_userdb.customer_login a
LEFT JOIN
(
SELECT customer_id,SUM(order_money) AS total_money
FROM mc_orderdb.order_master
GROUP BY customer_id
) b
ON a.customer_id = b.customer_id
**for example测试表分析执行计划 (联合索引和单列索引)**
CREATE TABLE `miaosha_mysql_test` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`userId` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '用户id',
`mobile` varchar(24) NOT NULL DEFAULT '' COMMENT '手机号码',
`month` varchar(32) DEFAULT NULL COMMENT '月份',
`createTime` datetime DEFAULT NULL COMMENT '创建时间',
`overTime` datetime DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`id`),
KEY `联合索引` (`userId`,`mobile`,`month`)
) ENGINE=InnoDB AUTO_INCREMENT=71185 DEFAULT CHARSET=utf8 COMMENT='测试'
建立联合索引的列userId,mobile,month 三个建立联合索引
EXPLAIN SELECT * FROM `miaosha_mysql_test` WHERE userid='2222' and mobile='166011'

无索引可用
EXPLAIN SELECT * FROM `miaosha_mysql_test` WHERE mobile='166011' ;

有索引可用
EXPLAIN SELECT * FROM `miaosha_mysql_test` WHERE userid='2222' or mobile='166011' ;

有索引可用

有索引可用 当然这才是正确的用法!!!
---------- ----------- ----------- --------------
**创建三个单列的索引**
CREATE INDEX useridsingle ON miaosha_mysql_test(userid);
CREATE INDEX mobilesingle ON miaosha_mysql_test(mobile);
CREATE INDEX monthsingle ON miaosha_mysql_test(month);
EXPLAIN SELECT * FROM `miaosha_mysql_test` WHERE userid='2222' and mobile='166011' and month=1;

只是用了useridsingle 有索引可用
EXPLAIN SELECT * FROM `miaosha_mysql_test` WHERE mobile='13281899972' AND month='2018-04'

EXPLAIN SELECT * FROM `miaosha_mysql_test` WHERE userid='2222' OR mobile='13281899972'

有索引可用 都用上了
**多个单列索引在多条件查询时只会生效第一个索引!所以多条件联合查询时最好建联合索引!**
**最左前缀原则:**
|_在创建联合索引时,要根据业务需求,where子句中使用最频繁的一列放在最左边。这样的话扩展性较好
|_比如 userid 经常需要作为查询条件,而 mobile 不常常用
|_则需要把 userid 放在联合索引的第一位置,即最左边
|_第一个字段是范围查询需要单独建一个索引
**同时存在联合索引和单列索引(字段有重复的),这个时候查询mysql会怎么用索引呢**
当一个表有多条索引可走,那么会根据优化器的查询成本来选择走哪个索引
联合索引本质:
当创建(a,b,c)联合索引时,相当于创建了(a)单列索引,(a,b)联合索引以及(a,b,c)联合索引
想要索引生效的话,只能使用 a和a,b和a,b,c三种组合,当然a,c也可以但是只用到了a
1.需要加索引的字段,要在where条件中
2、数据量少的字段不需要加索引;因为建索引有一定开销,如果数据量小则没必要建索引(速度反而慢)
3、如果where条件中是OR关系,加索引不起作用
4、联合索引比对每个列分别建索引更有优势,因为索引建立得越多就越占磁盘空间,
在更新数据的时候速度会更慢。另外建立多列索引时,顺序也是需要注意的,
应该将严格的索引放在前面,这样筛选的力度会更大,效率更高。
================================================
FILE: docs/mysql-3.md
================================================
### 数据库备份和恢复 + 数据库架构变迁
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
## 简介:


**详情请下载**
[xmind总结](/docs/MySQL性能优化.xmind) |
================================================
FILE: docs/mysql-master-slave.md
================================================
### 分库分表及mycat的整理实操(未整理马上更新)
本文章安排目标:
1. 对于存储层的压力知道如何去提供解决方案和思路
2. 对分库分表的常用手段有全面了解
3. 了解Mysql的主从及binlog
4. 知道Mycat及其他相似的中间件
5. Mycat是什么
6. Mycat中的核心概念及配置文件分析
7. 水平分表实战(单库、跨库)
8. Mycat读写分离实战
9. Mycat 全局序列号
10. Mycat常用分片规则
##思路(3why??)
**为什么要进行分库分表**
为什么要分库分表、
超大容量问题
性能问题
如何去做到
垂直切分、 水平切分
1. 垂直分库; 解决的是表过多的问题
2. 垂直分表; 解决单表列过多的问题
水平切分; 大数据表拆成小表
常见的拆分策略
垂直拆分(er分片)
水平拆分
一致性hash
范围切分 可以按照ID
日期拆分
拆分以后带来的问题
跨库join的问题
1. 设计的时候考虑到应用层的join问题。
2. 在服务层去做调用;
A服务里查询到一个list
for(list){
bservice.select(list);
}
3. 全局表
1. 数据变更比较少的基于全局应用的表
2.
4. 做字段冗余(空间换时间的做法)
订单表。 商家id 商家名称
商家名称变更- 定时任务、任务通知
跨分片数据排序分页
唯一主键问题
用自增id做主键
UUID 性能比较低
snowflake
mongoDB
zookeeper
数据库表
分布式事务问题
多个数据库表之间保证原子性 性能问题; 互联网公司用强一致性分布式事务比较少
分库分表最难的在于业务的复杂度;
前提: 水平分表的前提是已经存在大量的业务数据。而这个业务数据已经渗透到了各个应用节点
如何权衡当前公司的存储需要优化
1. 提前规划(主键问题解决、 join问题)
2. 当前数据单表超过1000W、每天的增长量持续上升
Mysql的主从
数据库的版本5.7版本
安装以后文件对应的目录
mysql的数据文件和二进制文件: /var/lib/mysql/
mysql的配置文件: /etc/my.cnf
mysql的日志文件: /var/log/mysql.log
140 为master
1. 创建一个用户’repl’,并且允许其他服务器可以通过该用户远程访问master,通过该用户去读取二进制数据,实现数据同步
create user repl identified by ‘repl; repl用户必须具有replication slave权限,除此之外其他权限都不需要
grant replication slave on *.* to ‘repl’@’%’ identified BY ‘repl’ ;
2. 修改140 my.cnf配置文件,在[mysqld] 下添加如下配置
log-bin=mysql-bin //启用二进制日志文件
server-id=130 服务器唯一ID
3. 重启数据库 systemctl restart mysqld sudo /etc/init.d/mysql start
4. 登录到数据库,通过show master status 查看master的状态信息
142 为slave
1. 修改142 my.cnf配置文件, 在[mysqld]下增加如下配置
server-id=132 服务器id,唯一
relay-log=slave-relay-bin
relay-log-index=slave-relay-bin.index
read_only=1
2. 重启数据库: systemctl restart mysqld
3. 连接到数据库客户端,通过如下命令建立同步连接
change master to master_log_file='mysql-bin 隆.000002',master_log_pos=154;
error:
ERROR 1794 (HY000): Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL error log.
最后通过如下的操作解决的问题,具体原因还尚未清楚
CHANGE MASTER TO
MASTER_HOST='39.107.245.253',
MASTER_USER='repl',
MASTER_PASSWORD='repl',
MASTER_LOG_FILE='mysql-bin 隆.000001',
MASTER_LOG_POS= 154;
(1)登录数据库后,删除5张表,并重新导入脚本
use mysql
drop table slave_master_info;
drop table slave_relay_log_info;
drop table slave_worker_info;
drop table innodb_index_stats;
drop table innodb_table_stats;
---------------------
2.重启数据库
change master to master_host='39.107.245.253', master_port=3306,master_user='repl',master_password='repl',master_log_file='mysql-bin 隆.000001',master_log_pos=154;
红色部分从master的show master status可以找到对应的值,不能随便写。
4. 执行 start slave
5. show slave status\G;查看slave服务器状态,当如下两个线程状态为yes,表示主从复制配置成功
Slave_IO_Running=Yes
Slave_SQL_Running=Yes
主从同步的原理
1. master记录二进制日志。在每个事务更新数据完成之前,master在二日志记录这些改变。MySQL将事务串行的写入二进制日志,即使事务中的语句都是交叉执行的。在事件写入二进制日志完成后,master通知存储引擎提交事务
2. slave将master的binary log拷贝到它自己的中继日志。首先,slave开始一个工作线程——I/O线程。I/O线程在master上打开一个普通的连接,然后开始binlog dump process。Binlog dump process从master的二进制日志中读取事件,如果已经跟上master,它会睡眠并等待master产生新的事件。I/O线程将这些事件写入中继日志
3. SQL线程从中继日志读取事件,并重放其中的事件而更新slave的数据,使其与master中的数据一致
binlog: 用来记录mysql的数据更新或者潜在更新(update xxx where id=x effect row 0);
文件内容存储:/var/lib/mysql
mysqlbinlog --base64-output=decode-rows -v mysql-bin.000001 查看binlog的内容
binlog的格式
statement : 基于sql语句的模式。update table set name =””; effect row 1000; uuid、now() other function
row: 基于行模式; 存在1000条数据变更; 记录修改以后每一条记录变化的值
mixed: 混合模式,由mysql自动判断处理
修改binlog_formater,通过在mysql客户端输入如下命令可以修改
set global binlog_format=’row/mixed/statement’;
或者在vim /etc/my.cnf 的[mysqld]下增加binlog_format=‘mixed’
主从同步的延时问题
主从同步延迟是怎么产生的
1. 当master库tps比较高的时候,产生的DDL数量超过slave一个sql线程所能承受的范围,或者slave的大型query语句产生锁等待
2. 网络传输: bin文件的传输延迟
3. 磁盘的读写耗时:文件通知更新、磁盘读取延迟、磁盘写入延迟
解决方案
1. 在数据库和应用层增加缓存处理,优先从缓存中读取数据
2. 减少slave同步延迟,可以修改slave库sync_binlog属性;
sync_binlog=0 文件系统来调度把binlog_cache刷新到磁盘
sync_binlog=n
3. 增加延时监控
Nagios做网络监控
mk-heartbeat
5. Mysql的主从配置
6. 了解binlog及主从复制原理
================================================
FILE: docs/mysql-mvcc.md
================================================
### MVCC原理
Multi-Version Concurrency Control,翻译为中文即多版本并发控制,使用它来实现RR以及RC隔离级别下读取数据的隔离性。串行话可以理解为直接用锁,而读未提交可以理解成什么也不控制。
innodb为每一行记录都实现了三个隐藏字段
DB_ROW_ID 6个字节: 行标识
DB_TRX_ID 6个字节:删除、插入或者更新行的最后一个事物id,自动增长
DB_ROLL_PTR 7个字节:回滚指针
| #transaction 100 | #transaction 200 | #transaction 300 | #select 1 | #select 2 |
| ---- | ---- |---- |---- |---- |
| bengin | bengin | bengin |
| update test set cl = '123' where id =1; |
| | update test set cl = '123' where id =1; |
| | | update account set name = 'lilei300' where id =1; |
| | | commit; |
| | | | select name from account where id=1; readview[100,200] 300 --> lilei300 |
| update account set name = 'lilei1' where id =1; |
| update account set name = 'lilei2' where id =1; |
| | | | select name from account where id=1; readview[100,200] 300 --> lilei300 |
| commit; | update account set name = 'lilei3' where id =1; |
| | update account set name = 'lilei4' where id =1; |
| | | | select name from account where id=1; readview[100,200] 300 --> lilei300 | select name from account where id=1; readview[200] 300 --> lilei2 |
| | commit; |

操作的时候会生成事务id
①每条记录都会拼接trx_id(事务id)和roll_pointer(回滚指针)2个字段
②每次操作会将就数据移动到undo log,修改后数据的回滚指针,指向undo log中这条数据
查询的时候会读取出ReadView(一致性视图):【未提交的事务id】数组+已创建的最大事务id
可重复读,会在事物中第一次读数据时生成readview
读已提交,会在事务中每次读取数据时生成readview
匹配规则:
1.当表中数据事务id < readview未提交事务最小值,数据可见
2.当表中数据事务id > readview最大事务id,说明本次事务开启时,表中数据事务都还没开启。 数据不可见
3.当表中数据事务id in readview未提交数组里,说明这个事务还未提交,不可见。 特殊的:如果事务是当前事务,依旧可见
4.当表中数据事务id > readview未提交数组里 || 当表中数据事务id < readview已创建的最大事务id 可见
删除算修改的一种特殊情况,会在undo log 的record header中记录下delete flag,如果被删除了,就忽略这条数据。

### MVCC & 2PL解决了部分幻读问题
主要参考https://www.zhihu.com/question/372905832,分别讲了MVCC和2PL(悲观锁,对应还有OCC乐观锁)解决的幻读问题
ps:幻读主要在insert,不可重复读主要在delete & update
#### MVCC解决的幻读
阿里:http://mysql.taobao.org/monthly/2017/06/07/,这边文章是以mysql可重复度解决了幻读,但此情况还是出现了幻读的角度。我们反过来看mysql是如何通过MVCC解决部分幻读的

在这个案例中。如果mysql的可重复读不解决幻读问题。哪session1在第二次select中应该是可以查出session2插入的数据的。但是由于MVCC的存在,session2的事务id是大于session1中readview的最大事务的,所以我们是看不到session2插入的数据的,保证了此时的不可幻读。但是记住MVCC只是解决读问题。在update时 讲session2插入的数据的事务id更新成seesion1的事务id了,导致最后一次查询数据的事务id==当前事务id变成可见了。
#### 2PL解决部分幻读
美团:https://tech.meituan.com/2014/08/20/innodb-lock.html

以我们的认知可重复不解决幻读问题,此时事务B的数据应该是能插入的,但实际上被阻塞了,这是因为事务A在执行update的时候加上了间隙锁

导致此时无法插入,需等事务A提交后释放锁(2PL第二步)才能插入。
================================================
FILE: docs/mysql.md
================================================
### mysql数据库设计与优化与架构 模拟场景(京东商城)
任何优化多需要场景,本次所有的场景为京东商城的数据库设计模拟!
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
##简介:
设计:
1.数据库开发规范的制定
2.数据库结构与设计
3.mysql执行计划的分析
4.mysql数据库的备份和恢复
5.mysql高性能高可用架构变迁
**场景说明**
用户登录->选购商品->加购物车->检查库存->提交订单->货到付款-- Y -- 发货
|N--订单付款
用户模块 -- 完成用户注册和登录验证
商品模块 -- 前后台商品管理和游览
订单模块 -- 订单和购物车的生成和管理
仓配模块 -- 仓库库存和物流的管理
**数据库设计规范**
逻辑设计 + 物理设计
1.数据库命名规范
2.数据库基本设计规范
3.数据库索引设计规范
4.数据库字段设计规范
5.数据库的sql开发规范
数据库操作行为规范(运维标准)
数据库设计规范
1.所有的数据库对象名称必须使用小写字母并用下划线分割(mysql数据库大小写敏感)
例如: 不同的数据库名 DbName dbname 不同的表名 Table table taBLe
2.所有数据库对象名称禁止使用mysql保留关键字
例如 :select id , username , from ,age from table_user 会造成mysql 歧义
3.数据库对象的命名要做到见名识义,并且最好不要超过32个字符
例如:秒杀用户表 miaosha_userdb good!!
用户账号表 user_account good!!
4.所有的临时表必须义tmp为前缀并且已日期为后缀,备份库备份表必须义bak为前缀并且已日期为后缀,大的可以到处sql
5.所有的数据存储的列名和列类型必须一致
custom_inf order_master
customer_id int unsigned customer_id int unsigned
必须一致否则会影响性能,一般这种列都是作为表的关联列,如果两个字段的数据类型不同,数据库则会进行隐式的数据类型
转换降低性能,造成列上的索引失效!!
存储规范
1.所有的表必须使用Innodb存储引擎 支持事物行级锁,更好的恢复性,并发性能更好
2.大部分数据库表字符集要统一 (大部分使用UTF-8) 编码乱码
3.所有的表和字段都要添加注释 数据字典的维护
4.尽量控制单表的数据量大小,建议控制在500万以内 当然500万并不是mysql的限制
过大可以通过历史数据归档,分库分表的手段来控制数据量的大小(订单表一类的比较重要)
5.尽量做到冷热数据分离,减少表的宽度 列最大4096列
减少磁盘io,保证热数据的内存缓存命中率,控制列数量也可以更加有效的利用缓存,避免读入无用的冷数据
经常使用的列放在一个表中
6.禁止在表中建立预留字段
预留字段命名很难做到见识义,无法选择合适的类型,对预留字段修改会对表进行锁定
行为规范
1.禁止存储图片,文件等二进制文件,造成大量的io操作 (存在相应的文件服务器上)
2.禁止再线上进行数据库的压力测试
3.禁止从开发环境测试环境直连生产环境
索引设计规范(不要滥用索引)
1.建议单表索引数量不超过5个 索引并不是越多越好过多索引降低效率,优化器过多索引选出最优解
innodb 是按照那个索引的顺序来组织表的呢 主键
不使用更新频繁的列作为主键,不使用多列主键
不使用uuid,md5,hash 字符串列作为主键 不能保证顺序增长
2.那些哪些列上建立索引???
1.我们经常在select update delete语句的where从句的列建立索引
2.包含在order by , group by , distinct 中的字段
3.多表join的关联列
3.如何选择索引的顺序?
联合索引中 索引从左到右的顺序
建立索引的目的 查询数据的时候可以根据索引来进行数据查找-- 从而减少磁盘的随机io , 增加查询的性能,所以
如果我们的索引能够过滤出更少的数据那么我们从磁盘读入的数据则越少
1.区分度最高的列放在联合索引的最左侧 区分度--数据唯一值的数量/总行数 区分度最大的就应该是主键了
2.尽量字段长度小的列放在联合索引的最左侧
3.使用最频繁的列放在最左侧
4,尽量避免冗余和重复的索引 重复索引了: primary key(id) , index(id) , unique index(id)
冗余: index(a,b,c) , index(a.b)
5.对于频繁使用的查询先优先考虑覆盖索引(包含了所有的查询字段的索引)
6.尽量使用外键 不建议使用外检约束,但是一定要在表与表之间的关联键上建立索引
数据库字段设计规范
1.优先选择符合存储需要的最小的数据类型
1.将字符串转换成数字类型存储 INET_ATON('255.255.255.255') = 4294967295 字符串转ip
将字符串转换成数字类型存储 INET_NTOA('4294967295') = 255.255.255.255 ip 转字符串
2.对于非负数据采用无符号整形进行存储 signed int -2147483648 -- 2147483647
unsigned int -0 -- 4294967295
3.VARCHAR(N)中的N代表的是字符数而不是字节数 使用UTF-8存储汉字varchar(255) = 765个字节 存储255个汉字
4.过大的长度会消耗更多的内存 varchar是一个可变的长度
2.避免使用text,blob数据类型 建议blob或者时text分离到单独的表中
避免使用enum数据类型
3.尽可能的所有列都定义为NOT NULL
索引null列需要额外的空间来保存,所以需要占用更多的空间
进行比较和计算的时候要对null值进行特别的处理
4.字符串存储日期型的数据不是正确的
无法用日期函数来进行计算和比较
用字符串存储日期要占用更多的空间
5.timestamp 和datatime 类型存储时间
timestamp 存储范围有限制 1970-01-01 00:00:01 ~2038-01-19 03:14:07
timestamp占用4字节和INT相同,但是INT可读性能高
6.财务相关的金额类数据,必须由decimal类型存储
decimal类型为精准的浮点数,在计算时不会丢失精度
占用空间由定义的宽度来决定
可用于存储比bigint更大的整数类型
数据库sql开发规范
1.建议使用预编译语句对数据库进行操作
2.避免数据类型的隐式转换 不同表的相同列的数据类型不一致 会导致索引失效
3.重复利用已经存在的索引
1.避免使用双%%的查询条件 如 a like '%1323%'
2.一个sql只能利用到复合索引中的一列进行范围查询
有 a,b,c列的联合索引,在查询条件中有a列的范围查询,则在b,c列上的索引将不会被用到,
在定义联合索引时,如果a列要用到范围查找的话,就要把a列放到联合索引的右侧
3.使用left join 或者not exists 来优化not in(偶尔也会导致索引失效) 操作
4.程序链接不同数据库要使用不同的账号,禁止跨库连接为迁移和分库分表做预备
5.禁止select * 必须使用select <字段列表> (* 无法覆盖索引 减少表结构变更 对程序带来的影响)
6.insert 明确字段列表
7.禁止使用子查询,可以把子查询优化为join操作
子查询结果集无法使用索引
子查询会产生临时表操作,如果子查询数据量大则会更严重
8.避免使用过多的join 关联表
于Mysql来说,是存在关联缓存的,缓存的大小可以由join_buffer_size参数进行设置
在Mysql中,对于同一个SQL多关联(join)一个表,就会多分配一个关联缓存,如果在一个SQL中关联的表越多,
所占用的内存也就越大
如果程序中大量的使用了多表关联的操作,同时join_buffer_size设置的也不合理的情况下,就容易造成服务器内存溢出的情况,
就会影响到服务器数据库性能的稳定性
同时对于关联操作来说,会产生临时表操作,影响查询效率
Mysql最多允许关联61个表,建议不超过5个
9.减少同数据库的交互次数 多个相同的操作合并在一起
10.对应同一列进行or判断时,使用in代替or
in 的值不要超过500个
in 操作可以更有效的利用索引,or大多数情况下很少能利用到索引
11.禁止order by rand() 进行随机排序
会把表中所有符合条件的数据装载到内存中,然后在内存中对所有数据根据随机生成的值进行排序
并且可能会对每一行都生成一个随机值,如果满足条件的数据集非常大,就会消耗大量的CPU和IO及内存资源
推荐在程序中获取一个随机值,然后从数据库中获取数据的方式
12.where 从句禁止对列进行函数转换和计算(导致无法使用相关列的索引)
SELECT(正确写法)
*
FROM
miaosha_message
WHERE
create_time >= '20190101'
AND create_time < '20190102'
SELECT (错误写法)
*
FROM
miaosha_message
WHERE
date
(create_time) = '20190101'
13.不会有重复值时使用UNION ALL 而不是UNION
UNION 会把两个结果集的所有数据放到临时表中后再进行去重操作
UNION ALL 不会再对结果集进行去重操作
14.拆分大sql变为小sql
大SQL:逻辑上比较复杂,需要占用大量CPU进行计算的SQL
MySQL 一个SQL只能使用一个CPU进行计算
SQL拆分后可以通过并行执行来提高处理效率
数据库操作行为规范
过大数据的(100万)批量写操作要分批多次操作
1.大批量操作可能会导致严重的主从延迟
2. binlog日志为row格式时会产生大量的日志
大批量写操作会产生大量日志,特别是对于row格式二进制数据而言,由于在row格式中会记录每一行数据的修改,我们一次修改的数据越多,
产生的日志量也就会越多,日志的传输和恢复所需要的时间也就越长,这也是造成主从延迟的一个原因
3. 避免产生大事务操作
大批量修改数据,一定是在一个事务中进行的,这就会造成表中大批量数据进行锁定,从而导致大量的阻塞,阻塞会对MySQL的性能产生非常大的影响
特别是长时间的阻塞会占满所有数据库的可用连接,这会使生产环境中的其他应用无法连接到数据库,因此一定要注意大批量写操作要进行分批
4.对于大表的修改使用pt-online-schema-change
1.原理: 会在原表的结构上建造一个新表 复制数据
2.避免延迟,修改时锁表
5.禁止super权限滥用
6.数据账号连接最小
================================================
FILE: docs/netty.md
================================================
### Netty 教程
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
####了解NIO和IO
| NIO | IO |
| :---:| :---:|
| 面向缓存区 | 面向流 |
| 非阻塞IO | 阻塞IO |
| 选择器 |无 |
#####面向缓存区和面向流
Java NIO和IO之间的第一差异在于IO是面向流的,其中NIO是面向缓冲的。
面向流的Java IO意味着您一次从流中读取一个或多个字节。你读取的字节取决于你所做的。
他们没有任何缓存空间。此外,你不能向前或向后移动流中的数据。如果您需要在从流中读取的数据中前后移动,则需要首先将其缓存在缓冲区中。
Java NIO的缓存导向方法略有不同。数据先被读入缓存区然后再被处理。您可以根据需要在缓冲区中向前后移动。
这样可以在处理过程中给予您更多的灵活性。但是,您还需要检查缓冲区是否包含所有需要的数据,以便完全处理它。
而且,您需要确保在缓冲区中读取更多数据时,不要覆盖尚未处理的在缓冲区中的数据。
#####非阻塞IO和阻塞IO
Java IO的各种流是阻塞的。
这意味着,当一个线程调用read() 或 write()时,该线程被阻塞,直到有一些数据被读取,或数据完全写入。该线程在此期间不能再干任何事情了。
Java NIO的非阻塞模式,使一个线程从某通道发送请求读取数据,但是它仅能得到目前可用的数据,如果目前没有数据可用时,就什么都不会获取,而不是保持线程阻塞,所以直至数据变的可以读取之前,该线程可以继续做其他的事情。 非阻塞写也是如此。
一个线程请求写入一些数据到某通道,但不需要等待它完全写入,这个线程同时可以去做别的事情。 线程通常将非阻塞IO的空闲时间用于在其它通道上执行IO操作,所以一个单独的线程现在可以管理多个输入和输出通道(channel)。
######选择器
Java NIO的选择器允许单个线程监视多个通道的输入。您可以使用选择器注册多个通道,然后使用单个线程“选择”具有可用于处理的输入的通道,或选择准备好进行写入的通道。这种选择器机制使单线程更容易管理多个通道。
####IO编程
我们简化下场景:客户端每隔两秒发送一个带有时间戳的"hello world"给服务端,服务端收到之后打印。
为了方便演示,下面例子中,服务端和客户端各一个类,把这两个类拷贝到你的IDE中,先后运行 IOServer.java 和IOClient.java可看到效果。
下面是传统的IO编程中服务端实现
`````java
public class IOServer {
public static void main(String[] args) throws Exception {
ServerSocket serverSocket = new ServerSocket(8000);
// (1) 接收新连接线程
new Thread(() -> {
while (true) {
try {
// (1) 阻塞方法获取新的连接
Socket socket = serverSocket.accept();
// (2) 每一个新的连接都创建一个线程,负责读取数据
new Thread(() -> {
try {
byte[] data = new byte[1024];
InputStream inputStream = socket.getInputStream();
while (true) {
int len;
// (3) 按字节流方式读取数据
while ((len = inputStream.read(data)) != -1) {
System.out.println(new String(data, 0, len));
}
}
} catch (IOException e) {
}
}).start();
} catch (IOException e) {
}
}
}).start();
}
}
//server端首先创建了一个serverSocket来监听8000端口。
//然后创建一个线程,线程里面不断调用阻塞方法 serversocket.accept();获取新的连接,见(1),当获取到新的连接之后,给每条连接创建一个新的线程,这个线程负责从该连接中读取数据,见(2),然后读取数据是以字节流的方式,见(3)。
`````
```java
public class IOClient {
public static void main(String[] args) {
new Thread(() -> {
try {
Socket socket = new Socket("127.0.0.1", 8000);
while (true) {
try {
socket.getOutputStream().write((new Date() + ": hello world").getBytes());
socket.getOutputStream().flush();
Thread.sleep(2000);
} catch (Exception e) {
}
}
} catch (IOException e) {
}
}).start();
}
}
//客户端的代码相对简单,连接上服务端8000端口之后,每隔2秒,我们向服务端写一个带有时间戳的 "hello world"
```
上面的demo,从服务端代码中我们可以看到,在传统的IO模型中,每个连接创建成功之后都需要一个线程来维护,每个线程包含一个while死循环,那么1w个连接对应1w个线程,继而1w个while死循环,这就带来如下几个问题:
线程资源受限:线程是操作系统中非常宝贵的资源,同一时刻有大量的线程处于阻塞状态是非常严重的资源浪费,操作系统耗不起
线程切换效率低下:单机cpu核数固定,线程爆炸之后操作系统频繁进行线程切换,应用性能急剧下降。
除了以上两个问题,IO编程中,我们看到数据读写是以字节流为单位,效率不高。
为了解决这三个问题,JDK在1.4之后提出了NIO
####NIO编程
关于NIO相关的文章网上也有很多,这里不打算详细深入分析,下面简单描述一下NIO是如何解决以上三个问题的。
#####线程资源受限
在NIO模型中,他把这么多while死循环变成一个死循环,这个死循环由一个线程控制,那么他又是如何做到一个线程,一个while死循环就能监测1w个连接是否有数据可读的呢?
这就是NIO模型中selector的作用,一条连接来了之后,现在不创建一个while死循环去监听是否有数据可读了,而是直接把这条连接注册到selector上,然后,通过检查这个selector,就可以批量监测出有数据可读的连接,进而读取数据,
#####线程切换效率低下
由于NIO模型中线程数量大大降低,线程切换效率因此也大幅度提高
#####IO读写以字节为单位
NIO解决这个问题的方式是数据读写不再以字节为单位,而是以字节块为单位。IO模型中,每次都是从操作系统底层一个字节一个字节地读取数据,而NIO维护一个缓冲区,每次可以从这个缓冲区里面读取一块的数据,
这就好比一盘美味的豆子放在你面前,你用筷子一个个夹(每次一个),肯定不如要勺子挖着吃(每次一批)效率来得高。
介绍完IO/NIO我们来真正介绍Netty吧
####了解什么是Netty
* Netty的官方解释
Netty是由JBOSS提供的一个java开源框架。
Netty提供异步的、事件驱动的网络应用程序框架和工具,用以快速开发高性能、高可靠性的网络服务器和客户端程序。
* Netty的简单概括
Netty是一款基于NIO(Nonblocking I/O,非阻塞IO)开发的网络通信框架。
####Netty的特性呢
>1.统一的API,支持多种传输类型,阻塞的和非阻塞的简单而强大的线程模型真正的无连接数据报套接字支持链接逻辑组件以支持复用。
>2.拥有比Java的核心API更高的吞吐量以及更低的延迟得益于池化和复用,拥有更低的资源消耗最少的内存复制。
>3.不会因为慢速、快速或者超载的连接而导致OutOfMemoryError消除在高速网络中NIO应用程序常见的不公平读/写比率。
>4.完整的SSL/TLS以及StartTLS支持可用于受限环境下,如Applet和OSGI。
>等等。
好 让我们动手写一个Netty客户端和服务端吧
####Netty客户端
```java
package com.example.netty.http;
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.handler.codec.http.*;
import io.netty.util.AsciiString;
public class HttpHandler extends SimpleChannelInboundHandler<FullHttpRequest> {
private AsciiString contentType = HttpHeaderValues.TEXT_PLAIN;
@Override
protected void channelRead0(ChannelHandlerContext ctx, FullHttpRequest msg) throws Exception {
System.out.println("class:" + msg.getClass().getName());
DefaultFullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1,
HttpResponseStatus.OK,
Unpooled.wrappedBuffer("test".getBytes()));
HttpHeaders heads = response.headers();
heads.add(HttpHeaderNames.CONTENT_TYPE, contentType + "; charset=UTF-8");
heads.add(HttpHeaderNames.CONTENT_LENGTH, response.content().readableBytes()); // 3
heads.add(HttpHeaderNames.CONNECTION, HttpHeaderValues.KEEP_ALIVE);
ctx.write(response);
}
@Override
public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
System.out.println("channelReadComplete");
super.channelReadComplete(ctx);
ctx.flush(); // 4
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
System.out.println("exceptionCaught");
if (null != cause) cause.printStackTrace();
if (null != ctx) ctx.close();
}
}
```
####Netty服务端
```java
package com.example.netty.http;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.sctp.nio.NioSctpServerChannel;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.handler.codec.http.HttpObjectAggregator;
import io.netty.handler.codec.http.HttpRequestDecoder;
import io.netty.handler.codec.http.HttpResponseEncoder;
public class HttpServer {
private final int port ;
public HttpServer(int port) {
this.port = port;
}
public void start(){
ServerBootstrap bootStrap = new ServerBootstrap();
NioEventLoopGroup group = new NioEventLoopGroup();
bootStrap.group(group).channel(NioServerSocketChannel.class)
.childHandler(new ChannelInitializer<SocketChannel>() {
@Override
protected void initChannel(SocketChannel ch) throws Exception {
System.out.println("channel :" +ch);
ch.pipeline().addLast("decoder", new HttpRequestDecoder())
.addLast("encoder", new HttpResponseEncoder()) // 2
.addLast("aggregator", new HttpObjectAggregator(512 * 1024)) // 3
.addLast("handler", new HttpHandler());
}
});
}
public static void main(String[] args) throws Exception {
if (args.length != 1) {
System.err.println(
"Usage: " + HttpServer.class.getSimpleName() +
" <port>");
return;
}
int port = Integer.parseInt(args[0]);
new HttpServer(port).start();
}
}
//To be continued!
```
####参考文档
[Netty是什么?](https://www.jianshu.com/p/a4e03835921a)
To be continued!!!!
To be continued!!!!
================================================
FILE: docs/ngnix-good.md
================================================
### 秒杀nginx优化
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
##要求:
>目标
1.并发优化
2.KeepALive长连接优化
3.压缩优化
4.配置缓存
#### [/docs/tools/nginx nginx优化相关包](/docs/tools)
安装:cd
yum install -y gcc gcc-c++
./configure --prefix=/usr/local/nginx --with-pcre=/home/qiurunze/下载/pcre-8.38 --with-http_stub_status_module --with-http_gzip_static_module --add-module=/home/qiurunze/下载/ngx_cache_purge-2.3
make
make install
ps -ef | grep nginx
./sbin/nginx -s reload
http://nginx.org/en/docs/
1.工作线程数和并发连接数
worker_processes 4; #cpu,如果nginx单独在一台机器上
worker_processes auto;
events {
worker_connections 4096;#每一个进程打开的最大连接数,超出了log中会有记录
multi_accept on; #可以一次建立多个连接
use epoll;
}
worker_rlimit_nofile 10240;每个进程打开的最大的文件数,受限于操作系统:
vi /etc/security/limits.conf
* hard nofile 102400
* soft nofile 102400
* soft core unlimited
* soft stack 10240
2.操作系统优化
配置文件/etc/sysctl.conf
sysctl -w net.ipv4.tcp_syncookies=1#防止一个套接字在有过多试图连接到达时引起过载
sysctl-w net.core.somaxconn=1024#默认128,连接队列
sysctl-w net.ipv4.tcp_fin_timeout=10 # timewait的超时时间
sysctl -w net.ipv4.tcp_tw_reuse=1 #os直接使用timewait的连接
sysctl -w net.ipv4.tcp_tw_recycle = 0 #回收禁用
3.Keepalive长连接
Nginx与upstream server:
upstream server_pool{
server localhost:8080 weight=1 max_fails=2 fail_timeout=30s;
keepalive 300; #300个长连接
}
同时要在location中设置:
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
客户端与nginx(默认是打开的):
4.keepalive_timeout 60s; #长连接的超时时间
keepalive_requests 100; #100个请求之后就关闭连接,可以调大
keepalive_disable msie6; #ie6禁用启用压缩
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_proxied any;
gzip_types text/html text/plain application/x-javascript application/javascript text/css application/xml
gzip_vary on; #Vary: Accept-Encoding
gzip_static on; #如果有压缩好的 直接使用
5.状态监控
location = /nginx_status {
stub_status on;
access_log off;
allow <YOURIPADDRESS>;
deny all;
}
输出结果:
Active connections: 1
server accepts handled requests
17122 17122 34873
Reading: 0 Writing: 1 Waiting: 0
Active connections:当前实时的并发连接数
accepts:收到的总连接数,
handled:处理的总连接数
requests:处理的总请求数
Reading:当前有都少个读,读取客户端的请求
Writing:当前有多少个写,向客户端输出
Waiting:当前有多少个长连接(reading + writing)
reading – nginx reads request header
writing – nginx reads request body, processes request, or writes response to a client
waiting – keep-alive connections, actually it is active - (reading + writing)
6.实时请求信息统计ngxtop
https://github.com/lebinh/ngxtop
(1)安装python-pip
yum install epel-release
yum install python-pip
(2)安装ngxtop
pip install ngxtop
(3)使用
指定配置文件: ngxtop -c ./conf/nginx.conf
查询状态是200: ngxtop -c ./conf/nginx.conf --filter 'status == 200'
查询那个ip访问最多: ngxtop -c ./conf/nginx.conf --group-by remote_addr
-----------------------------------------------------------------------------
nginx.conf配置文件
user www;
worker_processes 4;#取决于cpu
error_log logs/error.log;
pid logs/nginx.pid;
worker_rlimit_nofile 10240; #每个进程打开的最大的文件数,受限于操作系统/etc/security/limits.conf
events {
worker_connections 10240;#每一个进程打开的最大连接数,超出了log中会有记录
multi_accept on; #可以一次建立多个连接
use epoll;
}
http {
include mime.types;
default_type application/octet-stream;
server_tokens off; #隐藏版本号
client_max_body_size 10m; #文件上传需要调大
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
#默认写日志:打开文件写入关闭,max:缓存的文件描述符数量,inactive缓存时间,valid:检查时间间隔,min_uses:在inactive时间段内使用了多少次加入缓存
open_log_file_cache max=200 inactive=20s valid=1m min_uses=2;
sendfile on;
tcp_nopush on;
#与浏览器的长连接
keepalive_timeout 65;#长连接超时时间
keepalive_requests 500;#500个请求以后,关闭长连接
keepalive_disable msie6;
# 启用压缩
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_proxied any;
gzip_types text/plain application/x-javascript application/javascript text/css application/xml;
gzip_vary on; #Vary: Accept-Encoding
gzip_static on; #如果有压缩好的 直接使用
#超时时间
proxy_connect_timeout 5; #连接proxy超时
proxy_send_timeout 5; # proxy连接nginx超时
proxy_read_timeout 60;# proxy响应超时
# 开启缓存,2级目录
proxy_cache_path /usr/local/nginx/proxy_cache levels=1:2 keys_zone=cache_one:200m inactive=1d max_size=20g;
proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
proxy_hide_header Cache-Control;
proxy_hide_header Pragma;
#反向代理服务器集群
upstream server_pool{
server localhost:8080 weight=1 max_fails=2 fail_timeout=30s;
server localhost:8081 weight=1 max_fails=2 fail_timeout=30s;
keepalive 200; # 最大的空闲的长连接数
}
server {
listen 80;
server_name localhost 192.168.220.133;
location / {
#长连接
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#Tomcat获取真实用户ip
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://server_pool;
}
# 状态监控
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
allow 192.168.220.133;
deny all;
}
#用于清除缓存
location ~ /purge(/.*)
{
allow 127.0.0.1;
allow 192.168.220.133;
deny all;
proxy_cache_purge cache_one $host$1$is_args$args;
}
# 静态文件加缓存
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css|html|htm)?$
{
expires 1d;
proxy_cache cache_one;
proxy_cache_valid 200 304 1d;
proxy_cache_valid any 1m;
proxy_cache_key $host$uri$is_args$args;
proxy_pass http://server_pool;
}
}
}
================================================
FILE: docs/old.md
================================================

> 邮箱 : [QiuRunZe_key@163.com](QiuRunZe_key@163.com)
> Github : [https://github.com/qiurunze123](https://github.com/qiurunze123)
> QQ : [3341386488](3341386488)
> QQ群(秒杀架构一群) : 950056961
> QQ群(秒杀架构二群) : 652032632
> QQ群3(多线程交流群 三高系统 -- 并发框架) :453259026
[](https://github.com/qiurunze123)
高并发大流量如何进行秒杀架构,我对这部分知识做了一个系统的整理,写了一套系统。本GitHub还有许多其他的知识,随时欢迎探讨与骚扰!本文还在更新如果文章出现瑕疵请及时与我联系!
文章还有许多不足,我仍在不断改进!如果你本地没有这些环境,可以先找我要我的阿里云地址,看效果! ps: 本文章基础思路来自于若鱼1919老师!大家可以关注老师的课和博客很不错,老师很nice! 谢谢大家 !课程地址:https://coding.imooc.com/class/168.html
一点小建议:学习本系列知识之前,如果你完全没接触过 `MQ`、`SpringBoot`、`Redis`、`Dubbo`、`ZK` 、`Maven`,`lua`等,那么我建议你可以先在网上搜一下每一块知识的快速入门,
也可以下载本项目边做边学习,我的项目完全是实战加讲解不想写一堆的文章,浪费我们的生命,你还不懂内层含义,想要明白就边实际操作边学习,效果会更好!加油💪💪
新版正在更新,旧版入口:
- [首页](README.md)
### 最初版本请下载 (https://pan.baidu.com/s/1sld8RBSvLe2q4gc-Z-fVAQ)
### 如果想先看dubbo + zk 了解请下载we-miaosha ,miaosha-order 为项目分离示例项目!会不断完善!此版本为springboot2.0+ 请使JDK1.8+
### start 维护 开始搭建
> 软件环境 : 请选择稳定版

> 未来设计图 : 未来设计

> 软件环境 : mysql 数据库表设计

>1.需注意 因为秒杀,大促,打折等活动进行频繁,所以需要单独建立秒杀_....表来管理否则会经常进行回归
>2.本sql只是进行模拟,现实情况比这个信息要复杂的多,你可以把它看作是一个简化版本的sql
>3.访问地址 http://localhost:8080/login/to_login
### 以下所有内容都已完成,但是因内容多需逐渐整理上传! 专题的部分也会尽快上传更新! 立个flag 半年内吧争取全部更新完!各位稍安勿躁!
### [如要提交代码请先看--提交合并代码规范提交者的后面都会有署名方便大家问问题](/docs/code-criterion.md)
| ID | Problem | Article |
| --- | --- | :--- |
| 000 |如何解决卖超问题 | [解决思路](/docs/code-solve.md) |
| 001 |如何对本项目进行jmeter压测 | [解决思路](/docs/jemter-solve.md) |
| 003 |全局异常处理拦截 |[解决思路](/docs/code-solve.md) |
| 003 |页面级缓存thymeleafViewResolver |[解决思路](/docs/code-solve.md) |
| 004 |对象级缓存redis🙋🐓 |[解决思路](/docs/code-solve.md) |
| 005 |订单处理队列rabbitmq |[解决思路](/docs/code-solve.md) |
| 006 |解决分布式session |[解决思路](/docs/code-solve.md) |
| 007 |秒杀安全 -- 安全性设计 |[解决思路](/docs/code-solve.md) |
| 008 |通用缓存key的封装采用什么设计模式 |[解决思路](/docs/code-solve.md) |
| 009 |redis的库存如何与数据库的库存保持一致 |[解决思路](/docs/code-solve.md) |
| 010 |为什么redis数量会减少为负数 |[解决思路](/docs/code-solve.md) |
| 011 |为什么要单独维护一个秒杀结束标志 |[解决思路](/docs/code-solve.md) |
| 012 |rabbitmq如何做到消息不重复不丢失即使服务器重启 |[解决思路](/docs/code-solve.md) |
| 013 |为什么threadlocal存储user对象,原理 |[解决思路](/docs/code-solve.md) |
| 014 |maven 隔离 |[解决思路](/docs/code-solve.md) |
| 015 |服务降级--服务熔断(过载保护)(未更新)) |[解决思路](/docs/code-solve.md) |
| 016 |redis 分布式锁实现方法 |[解决思路](/docs/code-solve.md) |
| 017 |定时关单模拟与分布式锁(未更新文章--代码已更新) |[解决思路](/docs/time-close.md) |
| 018 |tomcat配置和优化 |[解决思路]((/docs/tomcat-good.md)) |
| 018 |tomcat集群配置 |[解决思路](/docs/tomcat-group.md) |
| 020 |Nginx优化(前端缓存) |[解决思路](/docs/ngnix-good.md) |
| 021 |重点 *** RPC分布式补偿如何解决(已更新 两种写法) |[解决思路](/docs/code-rpc.md) |
| 022 |分布式事物解决方案(已更新 -- 最新的思路和写法) |[解决思路](/docs/code-rpc.md) |
| 023 |mysql主从复制思路及实操(未更新代码) |[解决思路](/docs/mysql-master-slave.md) |
| 024 |如何进行分库分表 |[解决思路](/docs/mysql-master-slave.md) |
| 025 |秒杀类似场景sql的写法注意事项有哪些?|[解决思路](/docs/mysql-master-slave.md) |
| 026 |如何利用lua脚本进行操作限流与分布式锁(可保证原子性)?|[解决思路](/docs/redis-good.md) |
| 027 |如何利用lua脚本进行分布式锁操作?|[解决思路](/docs/redis-good.md) |
| 028 |网站访问统计实现?|[解决思路](/docs/code-solve.md) |
| 028 |项目进行dubbo + zk 改造 (已完成dubbo嵌入--springboot 与dubbo结合xml版本)?|[解决思路](/docs/code-solve.md) |
| 029 |dubbo客户端 dubbo-admin管理平台 搭建安装|[解决思路](/docs/dubbo-admin.md) |
| 030 |如何利用dubbo 的mock 来进行服务降级本地伪装 ?? (有更好的方式进群@我)|[解决思路](/docs/dubbo-zk.md) |
| 031 |*** 如何利用lua + redis 取代 nigix + lua 脚本进行分布式限流 (请看miaosha-2version) ? *** |[解决思路](/docs/redis-good.md) |
| 032 |多数据源配置 如何进行多数据源配置 |[解决思路](/docs/code-solve.md) |
#### [分布式系统发展历程(已更新)](/docs/fenbushi.md)
#### [生产环境内存调优](/docs/jvm-goods.md)
#### [mybatis源码解析与使用--未更新](/docs/mybatis-code.md)
#### [redis 使用与进阶以及如何进行集群--已更新](/docs/redis-good.md)
#### [spring源码--未更新](/docs/redis-code.md)
#### [分布式治理框架-dubbo - zk - 解析--更新中](/docs/dubbo-zk.md)
#### [多线程分析以及三高多线程demo系统 ](https://github.com/qiurunze123/threadandjuc)
#### [微服务框架--未更新](/docs/redis-code.md)
-------------------------------------------------|
#### [mysql数据库优化及架构学习](/docs/mysql.md)
##### [mysql数据库设计规范(已更新)](/docs/mysql.md)
##### [mysql数据库设计实例(已更新)](/docs/mysql-1.md)
##### [mysql数据库执行计划分析(已更新)](/docs/mysql-2.md)
##### [mysql数据库备份和恢复(已更新)](/docs/mysql-3.md)
##### [mysql数据库架构变迁(已更新)](/docs/mysql-3.md)
--------------------------------------------------|
#### [netty专题(已更新 by liuxiangyu)](/docs/netty.md)
#### [linux专题](/docs/linux.md)
#### [面试专题(最后更新)--未更新](/docs/code-solve.md)
###### [maven-wrapper介绍(add by zhangkai)](/docs/maven-wrapper.md)
================================================
FILE: docs/redis-good.md
================================================
### redis 使用与进阶
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
>目标 (希望大家仔细研究redis.conf配置文件-本文很多基础的一带而过)
1.redis分布式锁,zk分布式锁,lua脚本限流,lua分布式锁
2.redis持久化策略
3.redis集群
4.redis的简单操练
整理大部分常用的场景与使用,如果有疑问或者你不懂的地方请联系我!
#### 1 redis分布式锁
>1.分布式系统(单机的使用ReentrantLock或者synchronized代码块来实现)
>2.共享资源大并发产生
>3.同步访问
**redis分布式锁解决什么问题**
1.一个进程中的多个线程,多个线程并发访问同一个资源的时候,如何解决线程安全问题。
2.一个分布式架构系统中的两个模块同时去访问一个文件对文件进行读写操作
3.多个应用对同一条数据做修改的时候,如何保证数据的安全性
但在一个进程中,我们可以用到synchronized、lock之类的同步操作去解决,但是对于分布式架构下多进程的情况下,
如何做到跨进程的锁。就需要借助一些第三方手段来完成
**设计一个分布式所需要解决的问题,分布式锁解决方案(数据库方案)**
数据库解决方式,创建一个表叫做LOCK表
lock(
id int(11)
methodName varchar(100),--锁定的方法名称
memo varchar(1000)
modifyTime timestamp
unique key mn (method) --唯一约束
)
在执行方法的时候,获取锁的伪代码 或者for update行锁 或者 乐观锁方式也是可以的
try{
exec insert into lock(methodName,memo) values(‘method’,’desc’);
return true;
}Catch(DuplicateException e){
return false;
}
释放锁:
delete from lock where methodName=’’;
**(数据库方案)存在的问题以及思考**
1.锁没有失效时间,一旦解锁操作失败,就会导致锁记录一直在数据库中,其他线程无法再获得到锁
2.锁是非阻塞的,数据的insert操作,一旦插入失败就会直接报错。没有获得锁的线程并不会进入排队队列
要想再次获得锁就要再次触发获得锁操作
3.锁是非重入的,同一个线程在没有释放锁之前无法再次获得该锁(要解决这个问题可以在表中多加一列用于记录线程名称,通过判断这个列来实现重入)
**ZK方案**
ZK方案实现之前你要先了解ZK关于他的节点的几个特性:
有序节点:假如当前有一个父节点为/lock,我们可以在这个父节点下面创建子节点;zookeeper提供了一个可选的有序特性
例如我们可以创建子节点“/lock/node-”并且指明有序,那么zookeeper在生成子节点时会根据当前的子节点数量自动添加整数序号
也就是说如果是第一个创建的子节点,那么生成的子节点为/lock/node-0000000000,下一个节点则为/lock/node-0000000001,依次类推
临时节点:客户端可以建立一个临时节点,在会话结束或者会话超时后,zookeeper会自动删除该节点
事件监听:在读取数据时,我们可以同时对节点设置事件监听,当节点数据或结构变化时,zookeeper会通知客户端
当前zookeeper有如下四种事件:
1)节点创建
2)节点删除
3)节点数据修改
4)子节点变更
获取分布式锁的流程 ------- 假设所空间的根节点为/lock
1.客户端连接zookeeper,并在/lock下创建临时的且有序的子节点
第一个客户端对应的子节点为/lock/lock-0000000000,第二个为/lock/lock-0000000001,以此类推
2.--避免羊群效应--客户端获取/lock下的子节点列表,判断自己创建的子节点是否为当前子节点列表中序号最小的子节点,
如果是则认为获得锁,否则监听刚好在自己之前一位的子节点删除消息,获得子节点变更通知后重复此步骤直至获得锁
3.实行业务代码
4.流程完成后,删除对应的子节点并释放锁 (Watch机制)
对应分布式开源包Curator

**Redis分布式锁方案**
Redis 中有许多的命令都可以实现分布式锁,但是比较常用的是SETNX这个命令来实现
有多种方案代码:
1.获取锁,释放锁 代码在redismanager 里面 (简单版)


closeOrder也有 不过是另一种!比较复杂!!
加入时间对比如果当前时间已经大与释放锁的时间
说明已经可以释放这个锁重新在获取锁,setget方法可以把之前的锁去掉在重新获取,旧值在于之前的
值比较,如果无变化说明这个期间没有人获取或者操作这个redis锁,则可以重新获取

redis有成熟的框架redission
**Redis多路复用机制(看不看都行)**
linux的内核会把所有外部设备都看作一个文件来操作,对一个文件的读写操作会调用内核提供的系统命令,
返回一个 file descriptor(文件描述符)。对于一个socket的读写也会有响应的描述符,称为socketfd(socket 描述符)。
而IO多路复用是指内核一旦发现进程指定的一个或者多个文件描述符IO条件准备好以后就通知该进程
IO多路复用又称为事件驱动,操作系统提供了一个功能,当某个socket可读或者可写的时候,它会给一个通知。
当配合非阻塞socket使用时,只有当系统通知我哪个描述符可读了,我才去执行read操作,可以保证每次read都能读到有效数据。
操作系统的功能通过select/pool/epoll/kqueue之类的系统调用函数来使用,这些函数可以同时监视多个描述符的读写就绪情况
,这样多个描述符的I/O操作都能在一个线程内并发交替完成,这就叫I/O多路复用,这里的复用指的是同一个线程
多路复用的优势在于用户可以在一个线程内同时处理多个socket的 io请求。达到同一个线程同时处理多个IO请求的目的。
而在同步阻塞模型中,必须通过多线程的方式才能达到目的
**Redis(2.6以后)--lua脚本**
1.减少网络开销,在Lua脚本中可以把多个命令放在同一个脚本中运行
2.原子操作,redis会将整个脚本作为一个整体执行,中间不会被其他命令插入。换句话说,编写脚本的过程中无需担心会出现竞态条件
3.复用性,客户端发送的脚本会永远存储在redis中,这意味着其他客户端可以复用这一脚本来完成同样的逻辑
4.脚本可以通过return 来返回客户端
例子: 利用lua脚本进行电话号或则IP限流 实例 具体请看 redislua类
KEYS[1] ARGV[1] ARGV[2] key 参数1 参数2
local num=redis.call('incr',KEYS[1])
if tonumber(num)==1 then
redis.call('expire',KEYS[1],ARGV[1])
return 1
elseif tonumber(num)>tonumber(ARGV[2]) then
return 0
else
return 1
end
**Redis(2.6以后)--lua--EVALSHA命令**
考虑到我们通过eval执行lua脚本,脚本比较长的情况下,每次调用脚本都需要把整个脚本传给redis
比较占用带宽。为了解决这个问题,redis提供了EVALSHA命令允许开发者通过脚本内容的SHA1摘要来执行脚本。该命令的用法和EVAL一样,
只不过是将脚本内容替换成脚本内容的SHA1摘要
1. Redis在执行EVAL命令时会计算脚本的SHA1摘要并记录在脚本缓存中
2. 执行EVALSHA命令时Redis会根据提供的摘要从脚本缓存中查找对应的脚本内容
如果找到了就执行脚本,否则返回“NOSCRIPT No matching script,Please use EVAL”
演示流程:
```shell
# 计算出脚本的sha1,用于后续验证
127.0.0.1:6379> SCRIPT LOAD "return 'hello moto'"
"232fd51614574cf0867b83d384a5e898cfd24e5a"
# 判断脚本存在
127.0.0.1:6379> SCRIPT EXISTS 232fd51614574cf0867b83d384a5e898cfd24e5a
1) (integer) 1
# 清空所有脚本
127.0.0.1:6379> SCRIPT FLUSH
OK
# 判断脚本不存在
127.0.0.1:6379> SCRIPT EXISTS 232fd51614574cf0867b83d384a5e898cfd24e5a
1) (integer) 0
# 直接运行脚本,redis会自动进行缓存
127.0.0.1:6379> EVAL "return 'hello moto'" 0
"hello moto"
# 根据缓存中的sha1来直接运行脚本
127.0.0.1:6379> EVALSHA 232fd51614574cf0867b83d384a5e898cfd24e5a 0
"hello moto"
```
**Redis(2.6以后)--lua脚本运行限制**
redis的脚本执行是原子的,即脚本执行期间Redis不会执行其他命令
所有的命令必须等待脚本执行完以后才能执行。为了防止某个脚本执行时间过程导致Redis无法提供服务
Redis提供了lua-time-limit参数限制脚本的最长运行时间--默认是5秒钟
当脚本运行时间超过这个限制后,Redis将开始接受其他命令但不会执行(以确保脚本的原子性),而是返回BUSY的错误
在第一个窗口中执行lua脚本的死循环
eval “while true do end” 0 在第二个窗口中运行get hello
最后第二个窗口的运行结果是Busy, 可以通过script kill命令终止正在执行的脚本
如果当前执行的lua脚本对redis的数据进行了修改,比如(set)操作,那么script kill命令没办法终止脚本的运行,
因为要保证lua脚本的原子性。如果执行一部分终止了,就违背了这一个原则
在这种情况下,只能通过 shutdown nosave命令强行终止
**Redis(2.6以后)--lua分布式锁**

**如何利用lua + redis 取代 nigix + lua 脚本进行分布式限流**
分布式限流的关键就是把限流做成具有原子性的功能,可以使用redis + lua 来进行技术实现,高并发和高性能,实现时间窗口内的流量控制
操作在lua脚本中又因为redis是单线程的,因此线程安全!Redis 将整个脚本作为一个原子执行, 无需担心并发, 也就无需事务;


lua脚本一致存在于redis 中可以 限制每秒钟的请求数实现限流!
这里提供一种基于zset的信号量实现方式:
- zset的成员为uuid,唯一代表某一个线程,分数是当前的时间戳
- 限制zset中给的成员数量来实现限流
- 根据zset的分值(时间戳)按大小进行排序,移除某一范围的成员,实现超时移除处理
假定zset的名字为`xhlZset`,获取信号量:
```
// 被动触发超时处理:将已经超时的信号量移除出zset
zremrangebyscore xhlZset -inf now-timeout
// 如果信号量的数量没有超出限制
if zcard xhlZset < limit {
// 添加,记录uuid以及当前时间戳now
zadd xhlZset now uuid
return 1
}
return 0
```
释放信号量
```
zrem xhlZset uuid
```
================================================
FILE: docs/redis-lua.md
================================================
### lua学习
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
>数据类型
================================================
FILE: docs/tomcat-good.md
================================================
xiu修改### 秒杀tomcat优化
有问题或者宝贵意见联系我的QQ,非常希望你的加入!
##要求:
> 本文以tomcat8.5.20为准
>目标
1.内存优化
2.并发优化
3.APR优化
#### [APR优化相关包](/docs/tools)
1.**内存优化**
内存优化catalina
JAVA_OPTS="-server -Xms2048M -Xmx2048M -XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=$CATALINA_HOME/logs/heap.dump"
# Register custom URL handlers
server.xml 配置
maxConnections="300"
acceptCount="200"
maxThreads="400"
minSpareThreads="200"/>
禁用
<!-- Define an AJP 1.3 Connector on port 8009
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />-->
${tomcat}/webapps/docs/config/host.html
autoDeploy:This flag value indicates if Tomcat should check periodically for new or updated web applications while Tomcat is running
${tomcat}/webapps/docs/config/http.html
enableLookups:false
${tomcat}/webapps/docs/config/context.html:
reloadable:false
2.**如果你的网站具有高并发那么建议使用APR模式**
http://apr.apache.org/
依赖:
>>APR 1.2+ development headers (libapr1-dev package)
>>OpenSSL 1.0.2+ development headers (libssl-dev package)
>>JNI headers from Java compatible JDK 1.4+
>>GNU development environment (gcc, make)
yum install apr* openssl-devel gcc make
tar zxvf apr-1.4.5.tar
cd apr-1.4.5
./configure --prefix=/usr/local/apr
make
make install
tar -zxvf apr-iconv-1.2.1.tar.gz
cd apr-iconv-1.2.1
./configure --prefix=/usr/local/apr-iconv --with-apr=/usr/local/apr
make
make install
yum install expat-devel
tar zxvf apr-util-1.3.12.tar.gz
cd apr-util-1.3.12
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install
安装openssl 1.0.2
./config --prefix=/usr/local/openssl
修改Makefile:
vi Makefile
将原来的:CFLAG= -DOPENSSL_THREADS
修改为: CFLAG= -fPIC -DOPENSSL_THREADS
也就是添加-fPIC
执行执行:
make && make install
cd bin
tar -zxvf tomcat-native.tar.gz
cd tomcat-native-1.2.12-src
cd native
./configure --with-apr=/usr/local/apr --with-ssl=/usr/local/openssl
make
make install
catalina.sh:
JAVA_OPTS="$JAVA_OPTS -Djava.library.path=/usr/local/apr/lib
注意:开启了apr之后,jvm用到的native内存会增大,因此要适当调大Metaspace空间,添加JVM选项:-XX:MetaspaceSize=128m
JAVA_OPTS="-server -Xms2048M -Xmx2048M -XX:MetaspaceSize=128M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$CATALINA_HOME/logs/heap.dump"
server.xml:
<Connector port="8080" protocol="org.apache.coyote.http11.Http11AprProtocol"
connectionTimeout="20000"
redirectPort="8443" />
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="off" />
================================================
FILE: miaosha-admin/.gitignore
================================================
/.settings/
/.project
================================================
FILE: miaosha-admin/miaosha-admin-api/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.geekq</groupId>
<artifactId>miaosha-admin</artifactId>
<version>${revision}</version>
</parent>
<artifactId>miaosha-admin-api</artifactId>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.geekq</groupId>
<artifactId>miaosha-admin-common</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</dependency>
</dependencies>
</project>
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/Account.java
================================================
package com.geekq.admin.entity;
import com.geekq.common.utils.md5.MD5Utils;
import com.geekq.common.utils.numcal.BidConst;
import lombok.Getter;
import lombok.Setter;
import org.apache.ibatis.type.Alias;
import java.math.BigDecimal;
/**
* 用户的帐户信息账户 一个LoginInfo 对应一个UserInfo对应一个Account
*
* @author 邱润泽
*/
@Getter
@Setter
@Alias("Account")
public class Account extends BaseDomain {
private static final long serialVersionUID = 6760287512112252557L;
private int version;
private String tradePassword; // 交易密码
private BigDecimal usableAmount = BidConst.ZERO; // 可用余额
private BigDecimal freezedAmount = BidConst.ZERO; // 冻结金额
private BigDecimal unReceiveInterest = BidConst.ZERO; // 账户待收利息
private BigDecimal unReceivePrincipal = BidConst.ZERO; // 账户待收本金
private BigDecimal unReturnAmount = BidConst.ZERO; // 账户待还金额
private BigDecimal remainBorrowLimit = BidConst.ZERO; // 账户剩余授信额度
private BigDecimal borrowLimitAmount; // 授信额度(当前还可以信用借款额度)
private String abstractInfo;//摘要信息用于防篡改检查;
public static Account empty(Long id) {
Account account = new Account();
account.setId(id);
account.setBorrowLimitAmount(BidConst.DEFALUT_BORROWLIMITAMOUNT);
account.setRemainBorrowLimit(BidConst.DEFALUT_BORROWLIMITAMOUNT);
return account;
}
public String getAbstractInfo() {//可用余额 + 冻结金额 + 账户神域的授权额度
return MD5Utils.MD5(usableAmount.add(freezedAmount)
.add(remainBorrowLimit).toString());
}
public boolean checkAbstractInfo() {//可用余额 + 冻结金额 + 账户神域的授权额度
return MD5Utils.MD5(
usableAmount.add(freezedAmount).add(remainBorrowLimit)
.toString()).equals(abstractInfo);
}
public BigDecimal getTotalAmount() {
return usableAmount.add(freezedAmount).add(unReceivePrincipal);
}
public void addUseableAmount(BigDecimal amount) {
this.usableAmount = this.usableAmount.add(amount);
}
public void addFreezedAmount(BigDecimal amount) {
this.freezedAmount = this.freezedAmount.add(amount);
}
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/BaseDomain.java
================================================
package com.geekq.admin.entity;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
/**
* @author qiurunze
*/
@Getter
@Setter
public class BaseDomain implements Serializable {
protected Long id;
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/IpLog.java
================================================
package com.geekq.admin.entity;
import lombok.Getter;
import lombok.Setter;
import org.apache.ibatis.type.Alias;
import java.util.Date;
/**
* 登陆日志
*
* @author Administrator
*/
@Getter
@Setter
@Alias("IpLog")
public class IpLog extends BaseDomain {
public static int LOGINSTATE_FAILD = 0;//登陆失败
public static int LOGINSTATE_SUCCESS = 1;//登陆成功
private String username;
private Date loginTime;
private String ip;
private int loginState;
private int loginType;
private Long loginInfoId;
public IpLog() {
super();
}
public IpLog(String username, Date loginTime, String ip, int loginType,
Long loginInfoId) {
super();
this.username = username;
this.loginTime = loginTime;
this.ip = ip;
this.loginState = IpLog.LOGINSTATE_FAILD;
this.loginType = loginType;
this.loginInfoId = loginInfoId;
}
public String getDisplayState() {
return this.loginState == LOGINSTATE_FAILD ? "登录失败" : "登录成功";
}
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/Logininfo.java
================================================
package com.geekq.admin.entity;
import com.geekq.common.enums.Constants;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.io.Serializable;
import java.util.Date;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class Logininfo implements Serializable {
private Long id;
private String nickname;
private String password;
private String salt;
private Date registerDate;
private Date lastLoginDate;
private int state = Constants.STATE_NORMAL;
private int userType;//用户类型
private boolean admin = false;
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/SystemDictionary.java
================================================
package com.geekq.admin.entity;
import com.alibaba.fastjson.JSONObject;
import lombok.Getter;
import lombok.Setter;
import org.apache.ibatis.type.Alias;
import java.util.HashMap;
import java.util.Map;
/**
* 数据字典
*
* @author Stef
*/
@Getter
@Setter
@Alias("SystemDictionary")
public class SystemDictionary extends BaseDomain {
private static final long serialVersionUID = 3382007784095246946L;
private String sn; // 编码
private String title; // 名称
private String intro; // 简介
public String getJsonString() {
Map<String, Object> m = new HashMap<>();
m.put("id", getId());
m.put("sn", sn);
m.put("title", title);
m.put("intro", intro);
return JSONObject.toJSONString(m);
}
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/SystemDictionaryItem.java
================================================
package com.geekq.admin.entity;
import com.alibaba.fastjson.JSONObject;
import lombok.Getter;
import lombok.Setter;
import org.apache.ibatis.type.Alias;
import java.util.HashMap;
import java.util.Map;
/**
* 数据字典明细
*
* @author Stef
*/
@Getter
@Setter
@Alias("SystemDictionaryItem")
public class SystemDictionaryItem extends BaseDomain {
private static final long serialVersionUID = 4520006109163647891L;
private Long parentId; // 系统目录
private String title; // 名称
private String tvalue; // 值
private Integer sequence; // 序列
private String intro; // 说明
public String getJsonString() {
Map<String, Object> m = new HashMap<>();
m.put("id", getId());
m.put("parentId", parentId);
m.put("title", title);
m.put("tvalue", tvalue);
m.put("sequence", sequence);
m.put("intro", intro);
return JSONObject.toJSONString(m);
}
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/Userinfo.java
================================================
package com.geekq.admin.entity;
import com.geekq.common.utils.numcal.BitStatesUtils;
import lombok.Getter;
import lombok.Setter;
import org.apache.ibatis.type.Alias;
import org.springframework.util.StringUtils;
/**
* @author 邱润泽
*/
@Getter
@Setter
@Alias("UserInfo")
public class Userinfo extends BaseDomain {
private static final long serialVersionUID = -2194938919842714855L;
/**
* 版本号
*/
private int version;
/**
* 位状态
*/
private Long bitState = 0L;
/**
* 对应实名认证中的真实姓名
*/
private String realName;
/**
* 对应实名认证中的身份证号
*/
private String idNumber;
/**
* 用户邮箱
*/
private String email;
/**
* 手机号
*/
private String phoneNumber = "";
/**
* 用户当前认证分数
*/
private int authScore = 0;
/**
* 用户有效的实名认证对象
*/
private Long realauthId;
/**
* 会员的基本资料
* 月收入
*/
private SystemDictionaryItem incomeGrade;
/**
* 婚姻情况
*/
private SystemDictionaryItem marriage;
/**
* 子女情况
*/
private SystemDictionaryItem kidCount;
/**
* 学历
*/
private SystemDictionaryItem educationBackground;
/**
* 住房条件
*/
private SystemDictionaryItem houseCondition;
public static Userinfo empty(Long id) {
Userinfo userinfo = new Userinfo();
userinfo.setId(id);
userinfo.setBitState(BitStatesUtils.OP_BASIC_INFO);
return userinfo;
}
/**
* 获取用户真实名字的隐藏字符串,只显示姓氏
*
* @param realName 真实名字
* @return
*/
public static String getAnonymousRealName(String realName) {
if (StringUtils.hasLength(realName)) {
int len = realName.length();
String replace = "";
replace += realName.charAt(0);
for (int i = 1; i < len; i++) {
replace += "*";
}
return replace;
}
return realName;
}
/**
* 获取用户身份号码的隐藏字符串
*
* @param idNumber
* @return
*/
public static String getAnonymousIdNumber(String idNumber) {
if (StringUtils.hasLength(idNumber)) {
int len = idNumber.length();
String replace = "";
for (int i = 0; i < len; i++) {
if ((i > 5 && i < 10) || (i > len - 5)) {
replace += "*";
} else {
replace += idNumber.charAt(i);
}
}
return replace;
}
return idNumber;
}
/**
* 获取用户手机号码的隐藏字符串
*
* @param phoneNumber 用户手机号码
* @return
*/
public static String getAnonymousPhoneNumber(String phoneNumber) {
if (StringUtils.hasLength(phoneNumber)) {
int len = phoneNumber.length();
String replace = "";
for (int i = 0; i < len; i++) {
if (i > 2 && i < 7) {
replace += "*";
} else {
replace += phoneNumber.charAt(i);
}
}
return replace;
}
return phoneNumber;
}
/**
* 获取用户住址的隐藏字符串
*
* @param currentAddress 用户住址
* @return
*/
public static String getAnonymousCurrentAddress(String currentAddress) {
if (StringUtils.hasLength(currentAddress)
&& currentAddress.length() > 4) {
String last = currentAddress.substring(currentAddress.length() - 4,
currentAddress.length());
String stars = "";
for (int i = 0; i < currentAddress.length() - 4; i++) {
stars += "*";
}
return stars + last;
}
return currentAddress;
}
public void addState(Long state) {
this.bitState = BitStatesUtils.addState(this.bitState, state);
}
public void removeState(Long state) {
this.bitState = BitStatesUtils.removeState(this.bitState, state);
}
public boolean getIsBindPhone() {
return BitStatesUtils.hasState(bitState, BitStatesUtils.OP_BIND_PHONE);
}
public boolean getIsBindEmail() {
return BitStatesUtils.hasState(bitState, BitStatesUtils.OP_BIND_EMAIL);
}
public boolean getBaseInfo() {
return BitStatesUtils.hasState(bitState, BitStatesUtils.OP_BASE_INFO);
}
public boolean getRealAuth() {
return BitStatesUtils.hasState(bitState, BitStatesUtils.OP_REAL_AUTH);
}
public boolean getVedioAuth() {
return BitStatesUtils.hasState(bitState, BitStatesUtils.OP_VEDIO_AUTH);
}
public boolean getHasBidRequest() {
return BitStatesUtils.hasState(bitState, BitStatesUtils.OP_HAS_BIDRQUEST);
}
/**
* 获取用户真实名字的隐藏字符串,只显示姓氏
*
* @param 真实名字
* @return
*/
public String getAnonymousRealName() {
if (StringUtils.hasLength(realName)) {
int len = realName.length();
String replace = "";
replace += realName.charAt(0);
for (int i = 1; i < len; i++) {
replace += "*";
}
return replace;
}
return realName;
}
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/pojo/Orders.java
================================================
package com.geekq.admin.pojo;
public class Orders {
private String id;
private String orderNum;
private String itemId;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public String getOrderNum() {
return orderNum;
}
public void setOrderNum(String orderNum) {
this.orderNum = orderNum == null ? null : orderNum.trim();
}
public String getItemId() {
return itemId;
}
public void setItemId(String itemId) {
this.itemId = itemId == null ? null : itemId.trim();
}
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/pojo/OrdersExample.java
================================================
package com.geekq.admin.pojo;
import java.util.ArrayList;
import java.util.List;
public class OrdersExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public OrdersExample() {
oredCriteria = new ArrayList<Criteria>();
}
public String getOrderByClause() {
return orderByClause;
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public boolean isDistinct() {
return distinct;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(String value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(String value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(String value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(String value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(String value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(String value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdLike(String value) {
addCriterion("id like", value, "id");
return (Criteria) this;
}
public Criteria andIdNotLike(String value) {
addCriterion("id not like", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<String> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<String> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(String value1, String value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(String value1, String value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andOrderNumIsNull() {
addCriterion("order_num is null");
return (Criteria) this;
}
public Criteria andOrderNumIsNotNull() {
addCriterion("order_num is not null");
return (Criteria) this;
}
public Criteria andOrderNumEqualTo(String value) {
addCriterion("order_num =", value, "orderNum");
return (Criteria) this;
}
public Criteria andOrderNumNotEqualTo(String value) {
addCriterion("order_num <>", value, "orderNum");
return (Criteria) this;
}
public Criteria andOrderNumGreaterThan(String value) {
addCriterion("order_num >", value, "orderNum");
return (Criteria) this;
}
public Criteria andOrderNumGreaterThanOrEqualTo(String value) {
addCriterion("order_num >=", value, "orderNum");
return (Criteria) this;
}
public Criteria andOrderNumLessThan(String value) {
addCriterion("order_num <", value, "orderNum");
return (Criteria) this;
}
public Criteria andOrderNumLessThanOrEqualTo(String value) {
addCriterion("order_num <=", value, "orderNum");
return (Criteria) this;
}
public Criteria andOrderNumLike(String value) {
addCriterion("order_num like", value, "orderNum");
return (Criteria) this;
}
public Criteria andOrderNumNotLike(String value) {
addCriterion("order_num not like", value, "orderNum");
return (Criteria) this;
}
public Criteria andOrderNumIn(List<String> values) {
addCriterion("order_num in", values, "orderNum");
return (Criteria) this;
}
public Criteria andOrderNumNotIn(List<String> values) {
addCriterion("order_num not in", values, "orderNum");
return (Criteria) this;
}
public Criteria andOrderNumBetween(String value1, String value2) {
addCriterion("order_num between", value1, value2, "orderNum");
return (Criteria) this;
}
public Criteria andOrderNumNotBetween(String value1, String value2) {
addCriterion("order_num not between", value1, value2, "orderNum");
return (Criteria) this;
}
public Criteria andItemIdIsNull() {
addCriterion("item_id is null");
return (Criteria) this;
}
public Criteria andItemIdIsNotNull() {
addCriterion("item_id is not null");
return (Criteria) this;
}
public Criteria andItemIdEqualTo(String value) {
addCriterion("item_id =", value, "itemId");
return (Criteria) this;
}
public Criteria andItemIdNotEqualTo(String value) {
addCriterion("item_id <>", value, "itemId");
return (Criteria) this;
}
public Criteria andItemIdGreaterThan(String value) {
addCriterion("item_id >", value, "itemId");
return (Criteria) this;
}
public Criteria andItemIdGreaterThanOrEqualTo(String value) {
addCriterion("item_id >=", value, "itemId");
return (Criteria) this;
}
public Criteria andItemIdLessThan(String value) {
addCriterion("item_id <", value, "itemId");
return (Criteria) this;
}
public Criteria andItemIdLessThanOrEqualTo(String value) {
addCriterion("item_id <=", value, "itemId");
return (Criteria) this;
}
public Criteria andItemIdLike(String value) {
addCriterion("item_id like", value, "itemId");
return (Criteria) this;
}
public Criteria andItemIdNotLike(String value) {
addCriterion("item_id not like", value, "itemId");
return (Criteria) this;
}
public Criteria andItemIdIn(List<String> values) {
addCriterion("item_id in", values, "itemId");
return (Criteria) this;
}
public Criteria andItemIdNotIn(List<String> values) {
addCriterion("item_id not in", values, "itemId");
return (Criteria) this;
}
public Criteria andItemIdBetween(String value1, String value2) {
addCriterion("item_id between", value1, value2, "itemId");
return (Criteria) this;
}
public Criteria andItemIdNotBetween(String value1, String value2) {
addCriterion("item_id not between", value1, value2, "itemId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
}
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/query/IpLogQueryObject.java
================================================
package com.geekq.admin.query;
import com.geekq.common.utils.DateUtil;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* IpLog查询对象
*
* @author 邱润泽
*/
@Setter
@Getter
public class IpLogQueryObject extends QueryObject {
private Date beginDate;
private Date endDate;
private String username;
private int userType = -1;
private boolean like;
private int state = -1;
@DateTimeFormat(pattern = "yyyy-MM-dd")
public void setBeginDate(Date beginDate) {
this.beginDate = beginDate;
}
public Date getEndDate() {
if (endDate != null) {
return DateUtil.endOfDay(endDate);
}
return null;
}
@DateTimeFormat(pattern = "yyyy-MM-dd")
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/query/PageResult.java
================================================
package com.geekq.admin.query;
import java.util.ArrayList;
import java.util.List;
public class PageResult {
private Integer totalCount;
private Integer pageSize = 10;
private Integer currentPage = 1;
private List result;
public PageResult() {
}
public PageResult(Integer totalCount, Integer pageSize,
Integer currentPage, List result) {
super();
this.totalCount = totalCount;
this.pageSize = pageSize;
this.currentPage = currentPage;
this.result = result;
}
public static PageResult empty(int pageSize) {
return new PageResult(0, pageSize, 1, new ArrayList());
}
public Integer getTotalPage() {
return Math.max((totalCount + pageSize - 1) / pageSize, 1);
}
public Integer getPrev() {
return Math.max(currentPage - 1, 1);
}
public Integer getNext() {
return Math.min(currentPage + 1, getTotalPage());
}
public Integer getTotalCount() {
return totalCount;
}
public List getResult() {
return result;
}
public Integer getCurrentPage() {
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/query/QueryObject.java
================================================
package com.geekq.admin.query;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class QueryObject {
private Integer currentPage = 1;
private Integer pageSize = 10;
public int getStart() {
return (currentPage - 1) * pageSize;
}
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/query/SystemDictionaryQueryObject.java
================================================
package com.geekq.admin.query;
import lombok.Getter;
import lombok.Setter;
import org.springframework.util.StringUtils;
@Getter
@Setter
public class SystemDictionaryQueryObject extends QueryObject {
private String keyword;
private Long parentId;
public String getKeyword() {
return StringUtils.hasLength(keyword) ? keyword : null;
}
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/IAccountService.java
================================================
package com.geekq.admin.service;
import com.geekq.admin.entity.Account;
import java.util.List;
public interface IAccountService {
void update(Account account);
Account get(Long id);
void recreateAbstractInfo();
List<Account> listAll();
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/IIpLogService.java
================================================
package com.geekq.admin.service;
import com.geekq.admin.entity.IpLog;
import com.geekq.admin.query.IpLogQueryObject;
import com.geekq.admin.query.PageResult;
public interface IIpLogService {
PageResult query(IpLogQueryObject qo);
void insert(IpLog ipLog);
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/ILogininfoService.java
================================================
package com.geekq.admin.service;
import com.geekq.admin.entity.Logininfo;
import com.geekq.common.utils.resultbean.ResultGeekQ;
import java.util.List;
import java.util.Map;
public interface ILogininfoService {
/**
* 注册
*
* @param username
* @param password
*/
void register(String username, String password);
/**
* 检查是否有重复的用户名
*/
boolean checkUsername(String name, int userType);
/**
* 用户登陆
*
* @param name
* @param password
* @return
*/
ResultGeekQ<Logininfo> login(String name, String password, int userType, String ip);
/**
* 是否有管理员
*
* @return
*/
boolean hasAdmin();
/**
* 创建默认的管理员
*/
void createDefaultAdmin();
/**
* 查询用户的id和name
*
* @param word
* @param userType
* @return
*/
List<Map<String, Object>> autoComplate(String word, int userType);
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/ISystemDictionaryService.java
================================================
package com.geekq.admin.service;
import com.geekq.admin.entity.SystemDictionary;
import com.geekq.admin.entity.SystemDictionaryItem;
import com.geekq.admin.query.PageResult;
import com.geekq.admin.query.SystemDictionaryQueryObject;
import java.util.List;
public interface ISystemDictionaryService {
PageResult queryDic(SystemDictionaryQueryObject qo);
void saveOrUpdate(SystemDictionary sd);
PageResult queryDicItem(SystemDictionaryQueryObject qo);
void saveOrUpdateItem(SystemDictionaryItem item);
List<SystemDictionary> listDics();
List<SystemDictionaryItem> queryBySn(String sn);
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/IUserService.java
================================================
package com.geekq.admin.service;
import com.geekq.admin.entity.Userinfo;
public interface IUserService {
void update(Userinfo userinfo);
Userinfo get(Long id);
boolean bindPhone(String phoneNumber, String verifyCode);
/**
* 修改基本信息
*
* @param userinfo
*/
void updateBasicInfo(Userinfo userinfo);
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/OrdersService.java
================================================
package com.geekq.admin.service;
import com.geekq.admin.pojo.Orders;
public interface OrdersService {
/**
* @Description: 根据订单id查询订单
*/
public Orders getOrder(String orderId);
/**
* @Description: 下订单
*/
public boolean createOrder(String itemId);
}
================================================
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/RedisCacheStorageService.java
================================================
package com.geekq.admin.service;
import com.geekq.admin.entity.Logininfo;
public interface RedisCacheStorageService<K, V> {
/**
* 在redis数据库中插入 key 和value
*
* @param key
* @param value
* @return
*/
boolean set(String key, V value);
Logininfo get(String key);
}
================================================
FILE: miaosha-admin/miaosha-admin-common/.gitignore
================================================
/.classpath
/.project
/.settings/
/target/
================================================
FILE: miaosha-admin/miaosha-admin-common/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.geekq</groupId>
<artifactId>miaosha-admin</artifactId>
<version>${revision}</version>
</parent>
<artifactId>miaosha-admin-common</artifactId>
<version>${revision}</version>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
</dependencies>
</project>
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/Constants.java
================================================
package com.geekq.common.enums;
/**
* @author 邱润泽
* 常用数据静态变量类型集合
*/
public class Constants {
public static final int STATE_NORMAL = 0;
public static final int STATE_LOCK = 1;
public static final int STATE_DELETE = -1;
public static final int USERTYPE_NORMAL = 0;//前段用户
public static final int USERTYPE_SYSTEM = 1;//后台用户
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/MessageStatus.java
================================================
package com.geekq.common.enums;
public class MessageStatus {
public static final Integer ZORE = 0;
/**
* 消息类型
*/
public enum messageType {
maiosha_message("秒杀消息"),
buy_message("购买消息"),
system_message("系统消息");
private String message;
private messageType(String message) {
this.message = message;
}
public String getMessage() {
return message;
}
}
/**
* 消息内容
*/
public enum ContentEnum {
system_message_register(7000, "尊敬的用户你好,你已经成功注册!"),
system_message_register_head(7001, "注册成功");
private int code;
private String message;
private ContentEnum(int code, String message) {
this.code = code;
this.message = message;
}
public int getCode() {
return code;
}
public String getMessage() {
return message;
}
}
/**
* 消息类型
*/
public enum sendType {
// maiosha_message("秒杀消息"),
// buy_message("购买消息"),
// system_message("系统消息");
// private String message;
//
// private messageType(String message){
// this.message = message;
// }
//
// public String getMessage() {
// return message;
// }
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/OrderStatusEnum.java
================================================
package com.geekq.common.enums;
/**
* @Description: 订单状态
*/
public enum OrderStatusEnum {
WAIT_PAY(10, "待付款"), // 代付款
PAYING(20, "付款中"), // 付款中
PAID(30, "已付款"), // 已付款
PAID_FAILD(40, "付款失败"), // 付款失败
CANCELED(50, "已取消"), // 已取消
CLOSED(60, "交易关闭"); // 超时未支付, 交易关闭
public final int key;
public final String value;
OrderStatusEnum(int key, String value) {
this.key = key;
this.value = value;
}
public static String getName(int key) {
for (OrderStatusEnum status : OrderStatusEnum.values()) {
if (status.getKey() == key) {
return status.value;
}
}
return null;
}
public int getKey() {
return key;
}
public String getValue() {
return value;
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/ResultStatus.java
================================================
package com.geekq.common.enums;
/**
* 普通返回类
* 1打头 系统系列错误
* 2 注册登录系列错误
* 3 check 系列错误
* 4 秒杀错误
* 5 商品错误
* 6 订单错误
*
* @author qiurunze
*/
public enum ResultStatus {
SUCCESS(0, "成功"),
FAILD(-1, "失败"),
EXCEPTION(-1, "系统异常"),
PARAM_ERROR(10000, "参数错误"),
SYSTEM_ERROR(10001, "系统错误"),
FILE_NOT_EXIST(10002, "文件不存在"),
FILE_NOT_DOWNLOAD(10003, "文件没有下载"),
FILE_NOT_GENERATE(10004, "文件没有生成"),
FILE_NOT_STORAGE(10005, "文件没有入库"),
SYSTEM_DB_ERROR(10006, "数据库系统错误"),
FILE_ALREADY_DOWNLOAD(10007, "文件已经下载"),
DATA_ALREADY_PEXISTS(10008, "数据已经存在"),
/**
* 注册登录
*/
RESIGETR_SUCCESS(20000, "注册成功!"),
RESIGETER_FAIL(200001, "注册失败!"),
CODE_FAIL(200002, "验证码不一致!"),
RESIGETER_NICKNAMEEXIST(200003, "用户名已经存在!"),
LOGIN_FIAL(200004, "登录失败!"),
/**
* check
*/
BIND_ERROR(30001, "参数校验异常:%s"),
ACCESS_LIMIT_REACHED(30002, "请求非法!"),
REQUEST_ILLEGAL(30004, "访问太频繁!"),
SESSION_ERROR(30005, "Session不存在或者已经失效!"),
PASSWORD_EMPTY(30006, "登录密码不能为空!"),
MOBILE_EMPTY(30007, "手机号不能为空!"),
MOBILE_ERROR(30008, "手机号格式错误!"),
MOBILE_NOT_EXIST(30009, "手机号不存在!"),
PASSWORD_ERROR(30010, "密码错误!"),
USER_NOT_EXIST(30011, "用户不存在!"),
/**
* 订单模块
*/
ORDER_NOT_EXIST(60001, "订单不存在"),
/**
* 秒杀模块
*/
MIAO_SHA_OVER(40001, "商品已经秒杀完毕"),
REPEATE_MIAOSHA(40002, "不能重复秒杀"),
MIAOSHA_FAIL(40003, "秒杀失败");
/**
* 商品模块
*/
private int code;
private String message;
private ResultStatus(int code, String message) {
this.code = code;
this.message = message;
}
private ResultStatus(Object... args) {
this.message = String.format(this.message, args);
}
public int getCode() {
return this.code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return this.message;
}
public void setMessage(String message) {
this.message = message;
}
public String getName() {
return this.name();
}
public String getOutputName() {
return this.name();
}
public String toString() {
return this.getName();
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/SexEnum.java
================================================
package com.geekq.common.enums;
/**
* @Description: 男女枚举
*/
public enum SexEnum {
GIRL(0), // 女
BOY(1), // 男
SECRET(2); // 保密
public final int value;
SexEnum(int value) {
this.value = value;
}
public int getValue() {
return value;
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/YesOrNo.java
================================================
package com.geekq.common.enums;
/**
* @Description: 是否枚举
*/
public enum YesOrNo {
YES(1), // 是 有错误
NO(0); // 否 无错误
public final int value;
YesOrNo(int value) {
this.value = value;
}
public int getValue() {
return value;
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/Constanst.java
================================================
package com.geekq.common.utils;
public class Constanst {
public static String CLOSE_ORDER_INFO_TASK_LOCK = "CLOSE_ORDER_INFO_KEY";
public static String COUNTLOGIN = "count:login";
public enum orderStaus {
ORDER_NOT_PAY("新建未支付");
private String name;
orderStaus(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/DBContextUtil.java
================================================
package com.geekq.common.utils;
public class DBContextUtil {
public static final String DBMASTER = "dbmaster";
public static final String DBREAD = "dbread";
private static ThreadLocal<String> dbPools = new ThreadLocal<>();
public static String getDB() {
return dbPools.get();
}
public static void setDB(String db) {
dbPools.set(db);
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/DateUtil.java
================================================
package com.geekq.common.utils;
import org.apache.commons.lang3.time.DateUtils;
import java.util.Calendar;
import java.util.Date;
public class DateUtil {
public static Date endOfDay(Date d) {
return DateUtils.addSeconds(
DateUtils.addDays(DateUtils.truncate(d, Calendar.DATE), 1), -1);
}
public static long getSecondsBetweenDates(Date d1, Date d2) {
return Math.abs((d1.getTime() - d2.getTime()) / 1000);
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/JsonUtils.java
================================================
package com.geekq.common.utils;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.List;
/**
* @Description: 自定义响应结构, 转换类
*/
public class JsonUtils {
// 定义jackson对象
private static final ObjectMapper MAPPER = new ObjectMapper();
/**
* 将对象转换成json字符串。
* <p>Title: pojoToJson</p>
* <p>Description: </p>
*
* @param data
* @return
*/
public static String objectToJson(Object data) {
try {
String string = MAPPER.writeValueAsString(data);
return string;
} catch (JsonProcessingException e) {
e.printStackTrace();
}
return null;
}
/**
* 将json结果集转化为对象
*
* @param jsonData json数据
* @param clazz 对象中的object类型
* @return
*/
public static <T> T jsonToPojo(String jsonData, Class<T> beanType) {
try {
T t = MAPPER.readValue(jsonData, beanType);
return t;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* 将json数据转换成pojo对象list
* <p>Title: jsonToList</p>
* <p>Description: </p>
*
* @param jsonData
* @param beanType
* @return
*/
public static <T> List<T> jsonToList(String jsonData, Class<T> beanType) {
JavaType javaType = MAPPER.getTypeFactory().constructParametricType(List.class, beanType);
try {
List<T> list = MAPPER.readValue(jsonData, javaType);
return list;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/SnowflakeIdWorker.java
================================================
package com.geekq.common.utils;
/**
* Twitter_Snowflake<br>
* SnowFlake的结构如下(每部分用-分开):<br>
* 0 - 0000000000 0000000000 0000000000 0000000000 0 - 00000 - 00000 - 000000000000 <br>
* 1位标识,由于long基本类型在Java中是带符号的,最高位是符号位,正数是0,负数是1,所以id一般是正数,最高位是0<br>
* 41位时间截(毫秒级),注意,41位时间截不是存储当前时间的时间截,而是存储时间截的差值(当前时间截 - 开始时间截)
* 得到的值),这里的的开始时间截,一般是我们的id生成器开始使用的时间,由我们程序来指定的(如下下面程序IdWorker类的startTime属性)。41位的时间截,可以使用69年,年T = (1L << 41) / (1000L * 60 * 60 * 24 * 365) = 69<br>
* 10位的数据机器位,可以部署在1024个节点,包括5位datacenterId和5位workerId<br>
* 12位序列,毫秒内的计数,12位的计数顺序号支持每个节点每毫秒(同一机器,同一时间截)产生4096个ID序号<br>
* 加起来刚好64位,为一个Long型。<br>
* SnowFlake的优点是,整体上按照时间自增排序,并且整个分布式系统内不会产生ID碰撞(由数据中心ID和机器ID作区分),并且效率较高,经测试,SnowFlake每秒能够产生26万ID左右。
*/
public class SnowflakeIdWorker {
// ==============================Fields===========================================
/**
* 开始时间截 (2015-01-01)
*/
private final long twepoch = 1420041600000L;
/**
* 机器id所占的位数
*/
private final long workerIdBits = 5L;
/**
* 数据标识id所占的位数
*/
private final long datacenterIdBits = 5L;
/**
* 支持的最大机器id,结果是31 (这个移位算法可以很快的计算出几位二进制数所能表示的最大十进制数)
*/
private final long maxWorkerId = -1L ^ (-1L << workerIdBits);
/**
* 支持的最大数据标识id,结果是31
*/
private final long maxDatacenterId = -1L ^ (-1L << datacenterIdBits);
/**
* 序列在id中占的位数
*/
private final long sequenceBits = 12L;
/**
* 机器ID向左移12位
*/
private final long workerIdShift = sequenceBits;
/**
* 数据标识id向左移17位(12+5)
*/
private final long datacenterIdShift = sequenceBits + workerIdBits;
/**
* 时间截向左移22位(5+5+12)
*/
private final long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits;
/**
* 生成序列的掩码,这里为4095 (0b111111111111=0xfff=4095)
*/
private final long sequenceMask = -1L ^ (-1L << sequenceBits);
/**
* 工作机器ID(0~31)
*/
private long workerId;
/**
* 数据中心ID(0~31)
*/
private long datacenterId;
/**
* 毫秒内序列(0~4095)
*/
private long sequence = 0L;
/**
* 上次生成ID的时间截
*/
private long lastTimestamp = -1L;
//==============================Constructors=====================================
/**
* 构造函数
*
* @param workerId 工作ID (0~31)
* @param datacenterId 数据中心ID (0~31)
*/
public SnowflakeIdWorker(long workerId, long datacenterId) {
if (workerId > maxWorkerId || workerId < 0) {
throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", maxWorkerId));
}
if (datacenterId > maxDatacenterId || datacenterId < 0) {
throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0", maxDatacenterId));
}
this.workerId = workerId;
this.datacenterId = datacenterId;
}
/**
* 生成订单唯一ID
*
* @param workerId
* @param datacenterId
* @return
*/
public static long getOrderId(long workerId, long datacenterId) {
SnowflakeIdWorker idWorker = new SnowflakeIdWorker(0, 0);
return idWorker.nextId();
}
/**
* 获得下一个ID (该方法是线程安全的)
*
* @return SnowflakeId
*/
public synchronized long nextId() {
long timestamp = timeGen();
//如果当前时间小于上一次ID生成的时间戳,说明系统时钟回退过这个时候应当抛出异常
if (timestamp < lastTimestamp) {
throw new RuntimeException(
String.format("Clock moved backwards. Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
}
//如果是同一时间生成的,则进行毫秒内序列
if (lastTimestamp == timestamp) {
sequence = (sequence + 1) & sequenceMask;
//毫秒内序列溢出
if (sequence == 0) {
//阻塞到下一个毫秒,获得新的时间戳
timestamp = tilNextMillis(lastTimestamp);
}
}
//时间戳改变,毫秒内序列重置
else {
sequence = 0L;
}
//上次生成ID的时间截
lastTimestamp = timestamp;
//移位并通过或运算拼到一起组成64位的ID
return ((timestamp - twepoch) << timestampLeftShift) //
| (datacenterId << datacenterIdShift) //
| (workerId << workerIdShift) //
| sequence;
}
/**
* 阻塞到下一个毫秒,直到获得新的时间戳
*
* @param lastTimestamp 上次生成ID的时间截
* @return 当前时间戳
*/
protected long tilNextMillis(long lastTimestamp) {
long timestamp = timeGen();
while (timestamp <= lastTimestamp) {
timestamp = timeGen();
}
return timestamp;
}
//==============================Test=============================================
/**
* 返回以毫秒为单位的当前时间
*
* @return 当前时间(毫秒)
*/
protected long timeGen() {
return System.currentTimeMillis();
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/ValidatorUtil.java
================================================
package com.geekq.common.utils;
import org.apache.commons.lang3.StringUtils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class ValidatorUtil {
private static final Pattern mobile_pattern = Pattern.compile("1\\d{10}");
public static boolean isMobile(String src) {
if (StringUtils.isEmpty(src)) {
return false;
}
Matcher m = mobile_pattern.matcher(src);
return m.matches();
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/md5/MD5Utils.java
================================================
package com.geekq.common.utils.md5;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.digest.DigestUtils;
import java.security.SecureRandom;
/**
* @author 邱润泽
*/
public class MD5Utils {
private static String getSalt = getSaltT();
public static final String getSaltT() {
SecureRandom random = new SecureRandom();
byte bytes[] = new byte[15];
random.nextBytes(bytes);
String salt = Base64.encodeBase64String(bytes);
return salt;
}
public static String MD5(String keyName) {
/**
* 返回16
*/
return DigestUtils.md5Hex(keyName);
}
/**
* 测试使用
*
* @param inputPass
* @return
*/
public static String inputPassFormPass(String inputPass) {
String str = "" + getSalt.charAt(0) + getSalt.charAt(2) + inputPass + getSalt.charAt(4) + getSalt.charAt(6);
return MD5(str);
}
/**
* 盐值salt 随机 二次加密
*
* @param inputPass
* @return
*/
public static String formPassFormPass(String inputPass) {
String str = "" + getSalt.charAt(0) + getSalt.charAt(2) + inputPass + getSalt.charAt(4) + getSalt.charAt(6);
return MD5(str);
}
/**
* 第二次md5--反解密 用户登录验证 --- salt 可随机
*
* @param formPass
* @param salt
* @return
*/
public static String formPassToDBPass(String formPass, String salt) {
String str = "" + salt.charAt(0) + salt.charAt(2) + formPass + salt.charAt(4) + salt.charAt(6);
return MD5(str);
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/numcal/BidConst.java
================================================
package com.geekq.common.utils.numcal;
import java.math.BigDecimal;
/**
* 系统需要的常量
*
* @author 邱润泽
*/
public class BidConst {
public static final int DISPLAY_SCALE = 2;//显示精度
public static final int CAL_SCALE = 8;//计算精度
public static final int STORE_SCALE = 4;//保存精度
public static final BigDecimal ZERO = new BigDecimal("0.0000");//系统中需要的zero
public static final BigDecimal DEFALUT_BORROWLIMITAMOUNT = new BigDecimal(
"2000.0000");//初始用户授信额度
public static final BigDecimal ACCOUNT_MANAGER_CHARGE_RATE = new BigDecimal("0.0500");
public static final String DEFAULT_ADMIN_NAME = "admin";
public static final String DEFAULT_ADMIN_PASSWORD = "1111";
public static final int CREDIT_BORROW_SCORE = 30;//信用信用分数
public final static int RETURN_TYPE_MONTH_INTEREST_PRINCIPAL = 0; // 还款方式 按月分期还款(等额本息)
public final static int RETURN_TYPE_MONTH_INTEREST = 1; // 还款方式 按月到期还款(每月还利息,到期还本息)
public final static int BIDREQUEST_TYPE_NORMAL = 0; // 普通信用标
public final static int BIDREQUEST_STATE_PUBLISH_PENDING = 0; // 待发布
public final static int BIDREQUEST_STATE_BIDDING = 1; // 招标中
public final static int BIDREQUEST_STATE_UNDO = 2; // 已撤销
public final static int BIDREQUEST_STATE_BIDDING_OVERDUE = 3; // 流标
public final static int BIDREQUEST_STATE_APPROVE_PENDING_1 = 4; // 满标1审
public final static int BIDREQUEST_STATE_APPROVE_PENDING_2 = 5; // 满标2审
public final static int BIDREQUEST_STATE_REJECTED = 6; // 满标审核被拒绝
public final static int BIDREQUEST_STATE_PAYING_BACK = 7; // 还款中
public final static int BIDREQUEST_STATE_COMPLETE_PAY_BACK = 8; // 已还清
public final static int BIDREQUEST_STATE_PAY_BACK_OVERDUE = 9; // 逾期
public final static int BIDREQUEST_STATE_PUBLISH_REFUSE = 10; // 发标审核拒绝状态
public static final BigDecimal SMALLEST_BID_AMOUNT = new BigDecimal("50.0000");//系统规定的最小投标金额
public static final BigDecimal SMALLEST_BIDREQUEST_AMOUNT = new BigDecimal("500.0000");//系统规定的最小借款金额
/**
* =============================账户流水类型================================
*/
public final static int ACCOUNT_ACTIONTYPE_DEPOSIT_OFFLINE_LOCAL = 0;// 资金流水类别:线下充值
public final static int ACCOUNT_ACTIONTYPE_WITHDRAW = 1;// 资金流水类别:提现
public final static int ACCOUNT_ACTIONTYPE_BIDREQUEST_SUCCESSFUL = 2;// 资金流水类别:成功借款
public final static int ACCOUNT_ACTIONTYPE_BID_SUCCESSFUL = 3;// 资金流水类别:成功投标
public final static int ACCOUNT_ACTIONTYPE_RETURN_MONEY = 4;// 资金流水类别:还款
public final static int ACCOUNT_ACTIONTYPE_CALLBACK_MONEY = 5;// 资金流水类别:回款
public final static int ACCOUNT_ACTIONTYPE_CHARGE = 6;// 资金流水类别:平台管理费
public final static int ACCOUNT_ACTIONTYPE_INTEREST_SHARE = 7;// 资金流水类别:利息管理费
public final static int ACCOUNT_ACTIONTYPE_WITHDRAW_MANAGE_CHARGE = 8;// 资金流水类别:提现手续费
public final static int ACCOUNT_ACTIONTYPE_RECHARGE_CHARGE = 9;// 资金流水类别:充值手续费
public final static int ACCOUNT_ACTIONTYPE_BID_FREEZED = 10;// 资金流水类别:投标冻结金额
public final static int ACCOUNT_ACTIONTYPE_BID_UNFREEZED = 11;// 资金流水类别:取消投标冻结金额
public final static int ACCOUNT_ACTIONTYPE_WITHDRAW_FREEZED = 12;// 资金流水类别:提现申请冻结金额
public final static int ACCOUNT_ACTIONTYPE_WITHDRAW_UNFREEZED = 13;// 资金流水类别:提现申请失败取消冻结金额
/**
* =========还款状态===============
*/
public final static int PAYMENT_STATE_NORMAL = 0; //正常待还
public final static int PAYMENT_STATE_DONE = 1; //已还
public final static int PAYMENT_STATE_OVERDUE = 2; //逾期
/**
* ============系统账户流水类型=============
*/
public final static int SYSTEM_ACCOUNT_NONE = -1; //未指定
public final static int SYSTEM_ACCOUNT_ACTIONTYPE_MANAGE_CHARGE = 1;//系统账户收到账户管理费(借款管理费)
public final static int SYSTEM_ACCOUNT_ACTIONTYPE_INTREST_MANAGE_CHARGE = 2;//系统账户收到利息管理费
public final static int SYSTEM_ACCOUNT_ACTIONTYPE_WITHDRAW_MANAGE_CHARGE = 3;//系统账户收到提现手续费
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/numcal/BitStatesUtils.java
================================================
package com.geekq.common.utils.numcal;
/**
* 用户状态类,记录用户在平台使用系统中所有的状态。
*
* @author 邱润泽
*/
public class BitStatesUtils {
public final static Long OP_BASIC_INFO = 1L; //用户注册成功的标示,及为默认初始状态
public final static Long OP_BIND_PHONE = 2L; //用户绑定手机状态码
public final static Long OP_BIND_EMAIL = 2L << 1;//用户绑定邮箱
public final static Long OP_BASE_INFO = 2L << 2;//填写基本资料
public final static Long OP_REAL_AUTH = 2L << 3;//用户实名认证
public final static Long OP_VEDIO_AUTH = 2L << 4;//视频认证
public final static Long OP_HAS_BIDRQUEST = 2l << 5;//当前用户有一个借款还在借款流程当中
/**
* @param states 所有状态值
* @param value 需要判断状态值
* @return 是否存在
*/
public static boolean hasState(long states, long value) {
return (states & value) != 0;
}
/**
* @param states 已有状态值
* @param value 需要添加状态值
* @return 新的状态值
*/
public static long addState(long states, long value) {
if (hasState(states, value)) {
return states;
}
return (states | value);
}
/**
* @param states 已有状态值
* @param value 需要删除状态值
* @return 新的状态值
*/
public static long removeState(long states, long value) {
if (!hasState(states, value)) {
return states;
}
return states ^ value;
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/numcal/CalculateUtil.java
================================================
package com.geekq.common.utils.numcal;
import java.math.BigDecimal;
import java.math.RoundingMode;
/**
* 计算器Util
* @author 邱润泽
*/
public class CalculateUtil {
public static final BigDecimal ONE_HUNDRED = new BigDecimal("100.0000");
public static final BigDecimal NUMBER_MONTHS_OF_YEAR = new BigDecimal(
"12.0000");
/**
* 获取月利率
*/
public static BigDecimal getMonthlyRate(BigDecimal yearRate) {
if (yearRate == null)
return BigDecimal.ZERO;
return yearRate.divide(ONE_HUNDRED).divide(NUMBER_MONTHS_OF_YEAR,
BidConst.CAL_SCALE, RoundingMode.HALF_UP);
}
/**
* 计算借款总利息
*
* @param returnType 还款类型
* @param bidRequestAmount 借款金额
* @param yearRate 年利率
* @param monthes2Return 还款期限
* @return
*/
public static BigDecimal calTotalInterest(int returnType,
BigDecimal bidRequestAmount, BigDecimal yearRate, int monthes2Return) {
BigDecimal totalInterest = BigDecimal.ZERO;
BigDecimal monthlyRate = getMonthlyRate(yearRate);
if (returnType == BidConst.RETURN_TYPE_MONTH_INTEREST_PRINCIPAL) {// 按月分期
// 只借款一个月
if (monthes2Return == 1) {
totalInterest = bidRequestAmount.multiply(monthlyRate)
.setScale(BidConst.CAL_SCALE, RoundingMode.HALF_UP);
} else {
BigDecimal temp1 = bidRequestAmount.multiply(monthlyRate);
BigDecimal temp2 = (BigDecimal.ONE.add(monthlyRate))
.pow(monthes2Return);
BigDecimal temp3 = (BigDecimal.ONE.add(monthlyRate)).pow(
monthes2Return).subtract(BigDecimal.ONE);
// 算出每月还款
BigDecimal monthToReturnMoney = temp1.multiply(temp2).divide(
temp3, BidConst.CAL_SCALE, RoundingMode.HALF_UP);
// 算出总还款
BigDecimal totalReturnMoney = monthToReturnMoney
.multiply(new BigDecimal(monthes2Return));
// 算出总利息
totalInterest = totalReturnMoney.subtract(bidRequestAmount);
}
} else if (returnType == BidConst.RETURN_TYPE_MONTH_INTEREST) {// 按月到期
BigDecimal monthlyInterest = DecimalFormatUtil
.amountFormat(bidRequestAmount.multiply(monthlyRate));
totalInterest = monthlyInterest.multiply(new BigDecimal(
monthes2Return));
}
return DecimalFormatUtil.formatBigDecimal(totalInterest,
BidConst.STORE_SCALE);
}
/**
* 计算每期利息
*
* @param returnType 还款类型
* @param bidRequestAmount 借款金额
* @param yearRate 年利率
* @param monthIndex 第几期
* @param monthes2Return 还款期限
* @return
*/
public static BigDecimal calMonthlyInterest(int returnType,
BigDecimal bidRequestAmount, BigDecimal yearRate, int monthIndex,
int monthes2Return) {
BigDecimal monthlyInterest = BigDecimal.ZERO;
BigDecimal monthlyRate = getMonthlyRate(yearRate);
if (returnType == BidConst.RETURN_TYPE_MONTH_INTEREST_PRINCIPAL) {// 按月分期
// 只借款一个月
if (monthes2Return == 1) {
monthlyInterest = bidRequestAmount.multiply(monthlyRate)
.setScale(BidConst.CAL_SCALE, RoundingMode.HALF_UP);
} else {
BigDecimal temp1 = bidRequestAmount.multiply(monthlyRate);
BigDecimal temp2 = (BigDecimal.ONE.add(monthlyRate))
.pow(monthes2Return);
BigDecimal temp3 = (BigDecimal.ONE.add(monthlyRate)).pow(
monthes2Return).subtract(BigDecimal.ONE);
BigDecimal temp4 = (BigDecimal.ONE.add(monthlyRate))
.pow(monthIndex - 1);
// 算出每月还款
BigDecimal monthToReturnMoney = temp1.multiply(temp2).divide(
temp3, BidConst.CAL_SCALE, RoundingMode.HALF_UP);
// 算出总还款
BigDecimal totalReturnMoney = monthToReturnMoney
.multiply(new BigDecimal(monthes2Return));
// 算出总利息
BigDecimal totalInterest = totalReturnMoney
.subtract(bidRequestAmount);
if (monthIndex < monthes2Return) {
monthlyInterest = (temp1.subtract(monthToReturnMoney))
.multiply(temp4).add(monthToReturnMoney)
.setScale(BidConst.CAL_SCALE, RoundingMode.HALF_UP);
} else if (monthIndex == monthes2Return) {
BigDecimal temp6 = BigDecimal.ZERO;
// 汇总最后一期之前所有利息之和
for (int i = 1; i < monthes2Return; i++) {
BigDecimal temp5 = (BigDecimal.ONE.add(monthlyRate))
.pow(i - 1);
monthlyInterest = (temp1.subtract(monthToReturnMoney))
.multiply(temp5)
.add(monthToReturnMoney)
.setScale(BidConst.CAL_SCALE,
RoundingMode.HALF_UP);
temp6 = temp6.add(monthlyInterest);
}
monthlyInterest = totalInterest.subtract(temp6);
}
}
} else if (returnType == BidConst.RETURN_TYPE_MONTH_INTEREST) {// 按月到期
monthlyInterest = DecimalFormatUtil.amountFormat(bidRequestAmount
.multiply(monthlyRate));
}
return monthlyInterest;
}
/**
* 计算每期还款
*
* @param returnType 还款类型
* @param bidRequestAmount 借款金额
* @param yearRate 年利率
* @param monthIndex 第几期
* @param monthes2Return 还款期限
* @return
*/
public static BigDecimal calMonthToReturnMoney(int returnType,
BigDecimal bidRequestAmount, BigDecimal yearRate, int monthIndex,
int monthes2Return) {
BigDecimal monthToReturnMoney = BigDecimal.ZERO;
BigDecimal monthlyRate = getMonthlyRate(yearRate);
if (returnType == BidConst.RETURN_TYPE_MONTH_INTEREST_PRINCIPAL) {// 按月分期
if (monthes2Return == 1) {
monthToReturnMoney = bidRequestAmount.add(
bidRequestAmount.multiply(monthlyRate)).setScale(
BidConst.CAL_SCALE, RoundingMode.HALF_UP);
} else {
BigDecimal temp1 = bidRequestAmount.multiply(monthlyRate);
BigDecimal temp2 = (BigDecimal.ONE.add(monthlyRate))
.pow(monthes2Return);
BigDecimal temp3 = (BigDecimal.ONE.add(monthlyRate)).pow(
monthes2Return).subtract(BigDecimal.ONE);
// 算出每月还款
monthToReturnMoney = temp1.multiply(temp2).divide(temp3,
BidConst.CAL_SCALE, RoundingMode.HALF_UP);
}
} else if (returnType == BidConst.RETURN_TYPE_MONTH_INTEREST) {// 按月到期
BigDecimal monthlyInterest = bidRequestAmount.multiply(monthlyRate)
.setScale(BidConst.CAL_SCALE, RoundingMode.HALF_UP);
if (monthIndex == monthes2Return) {
monthToReturnMoney = bidRequestAmount.add(monthlyInterest)
.setScale(BidConst.CAL_SCALE, RoundingMode.HALF_UP);
} else if (monthIndex < monthes2Return) {
monthToReturnMoney = monthlyInterest;
}
}
return DecimalFormatUtil.formatBigDecimal(monthToReturnMoney,
BidConst.STORE_SCALE);
}
/**
* 计算一次投标实际获得的利息=投标金额/借款金额 *总利息
*
* @param bidRequestAmount 借款金额
* @param monthes2Return 还款期数
* @param yearRate 年利率
* @param returnType 还款类型
* @param acturalBidAmount 投标金额
* @return
*/
public static BigDecimal calBidInterest(BigDecimal bidRequestAmount,
int monthes2Return, BigDecimal yearRate, int returnType,
BigDecimal acturalBidAmount) {
// 借款产生的总利息
BigDecimal totalInterest = calTotalInterest(returnType,
bidRequestAmount, yearRate, monthes2Return);
// 所占比例
BigDecimal proportion = acturalBidAmount.divide(bidRequestAmount,
BidConst.CAL_SCALE, RoundingMode.HALF_UP);
BigDecimal bidInterest = totalInterest.multiply(proportion);
return DecimalFormatUtil.formatBigDecimal(bidInterest,
BidConst.STORE_SCALE);
}
/**
* 计算利息管理费
*
* @param interest
* 利息
* @param interestManagerChargeRate
* 利息管理费比例
* @return
*/
/**
public static BigDecimal calInterestManagerCharge(BigDecimal interest) {
return DecimalFormatUtil.formatBigDecimal(
interest.multiply(BidConst.INTEREST_MANAGER_CHARGE_RATE), BidConst.SCALE);
}
*/
/**
* 计算借款管理费
*
* @param bidRequestAmount 借款金额
* @return
*/
public static BigDecimal calAccountManagementCharge(
BigDecimal bidRequestAmount) {
BigDecimal accountManagementCharge = DecimalFormatUtil
.formatBigDecimal(bidRequestAmount
.multiply(BidConst.ACCOUNT_MANAGER_CHARGE_RATE),
BidConst.CAL_SCALE);
return accountManagementCharge;
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/numcal/DecimalFormatUtil.java
================================================
package com.geekq.common.utils.numcal;
import java.math.BigDecimal;
import java.math.RoundingMode;
/**
* 大数字格式化工具类
*
* @author 邱润泽
*/
public class DecimalFormatUtil {
//金额
public static BigDecimal amountFormat(BigDecimal number) {
number = number.setScale(BidConst.STORE_SCALE, RoundingMode.HALF_UP);
return number;
}
//利率
public static BigDecimal rateFormat(BigDecimal number) {
number = number.setScale(BidConst.STORE_SCALE, RoundingMode.HALF_UP);
return number;
}
public static BigDecimal decimalRateFormat(BigDecimal number) {
return number.multiply(BigDecimal.valueOf(100));
}
//月利率
public static BigDecimal monthRateFormat(BigDecimal number) {
return number.multiply(BigDecimal.valueOf(100)).divide(
BigDecimal.valueOf(12), BidConst.CAL_SCALE,
RoundingMode.HALF_UP);
}
public static BigDecimal formatBigDecimal(BigDecimal data, int scal) {
if (null == data)
return new BigDecimal(0.00);
return data.setScale(scal, BigDecimal.ROUND_HALF_UP);
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/resultbean/AbstractResult.java
================================================
package com.geekq.common.utils.resultbean;
import com.geekq.common.enums.ResultStatus;
public class AbstractResult {
private ResultStatus status;
private int code;
private String message;
AbstractResult() {
}
protected AbstractResult(ResultStatus status, String message) {
this.code = status.getCode();
this.status = status;
this.message = message;
}
protected AbstractResult(ResultStatus status) {
this.code = status.getCode();
this.message = status.getMessage();
this.status = status;
}
public static boolean isSuccess(AbstractResult result) {
return result != null && result.status == ResultStatus.SUCCESS && result.getCode() == ResultStatus.SUCCESS.getCode();
}
public AbstractResult withError(ResultStatus status) {
this.status = status;
return this;
}
public AbstractResult withError(String message) {
this.status = ResultStatus.SYSTEM_ERROR;
this.message = message;
return this;
}
public AbstractResult withError(int code, String message) {
this.status = ResultStatus.SYSTEM_ERROR;
this.code = code;
this.message = message;
return this;
}
public AbstractResult success() {
this.status = ResultStatus.SUCCESS;
return this;
}
public ResultStatus getStatus() {
return this.status;
}
public String getMessage() {
return this.message == null ? this.status.getMessage() : this.message;
}
public int getCode() {
return this.code;
}
public void setCode(int code) {
this.code = code;
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/resultbean/ResultGeekQ.java
================================================
package com.geekq.common.utils.resultbean;
import com.geekq.common.enums.ResultStatus;
import java.io.Serializable;
public class ResultGeekQ<T> extends AbstractResult implements Serializable {
private T data;
private Integer count;
protected ResultGeekQ() {
}
protected ResultGeekQ(ResultStatus status, String message) {
super(status, message);
}
protected ResultGeekQ(ResultStatus status) {
super(status);
}
public static <T> ResultGeekQ<T> build() {
return new ResultGeekQ(ResultStatus.SUCCESS, "构造函数");
}
public static <T> ResultGeekQ<T> build(String message) {
return new ResultGeekQ(ResultStatus.SUCCESS, message);
}
public static <T> ResultGeekQ<T> error(ResultStatus status) {
return new ResultGeekQ<T>(status);
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
public Integer getCount() {
return this.count;
}
public void setCount(Integer count) {
this.count = count;
}
public void success(T value) {
this.success();
this.data = value;
this.count = 0;
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/resultbean/ResultJSON.java
================================================
package com.geekq.common.utils.resultbean;
import lombok.Getter;
import lombok.Setter;
/**
* @author 邱润泽
*/
@Getter
@Setter
public class ResultJSON {
private Boolean success = false;
private String msg;
public ResultJSON() {
super();
}
public ResultJSON(Boolean success, String msg) {
super();
this.success = success;
this.msg = msg;
}
public ResultJSON(String msg) {
super();
this.msg = msg;
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/validator/MobileCheck.java
================================================
package com.geekq.common.validator;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {MobileValidator.class})
public @interface MobileCheck {
boolean required() default true;
String message() default "手机号码格式有误!";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/validator/MobileValidator.java
================================================
package com.geekq.common.validator;
import com.geekq.common.utils.ValidatorUtil;
import org.apache.commons.lang3.StringUtils;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
public class MobileValidator implements ConstraintValidator<MobileCheck, String> {
private boolean require = false;
@Override
public void initialize(MobileCheck isMobile) {
require = isMobile.required();
}
@Override
public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext) {
if (require) {
return ValidatorUtil.isMobile(value);
} else {
if (StringUtils.isEmpty(value)) {
return true;
} else {
return ValidatorUtil.isMobile(value);
}
}
}
}
================================================
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/vo/LoginVo.java
================================================
package com.geekq.common.vo;
import com.geekq.common.validator.MobileCheck;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import javax.validation.constraints.NotNull;
/**
* @author 邱润泽
*/
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class LoginVo {
@NotNull
@MobileCheck
private String mobile;
@NotNull
private String password;
@Override
public String toString() {
return "LoginVo{" +
"mobile='" + mobile + '\'' +
", password='" + password + '\'' +
'}';
}
}
================================================
FILE: miaosha-admin/miaosha-admin-service/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.geekq</groupId>
<artifactId>miaosha-admin</artifactId>
<version>${revision}</version>
</parent>
<artifactId>miaosha-admin-service</artifactId>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
</dependency>
<dependency>
<groupId>com.geekq</groupId>
<artifactId>miaosha-admin-api</artifactId>
</dependency>
<dependency>
<groupId>com.geekq</groupId>
<artifactId>miaosha-admin-common</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</dependency>
<dependency>
<groupId>com.github.sgroschupf</groupId>
<artifactId>zkclient</artifactId>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
</dependency>
<dependency>
<groupId>com.github.miemiedev</groupId>
<artifactId>mybatis-paginator</artifactId>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
</dependency>
<!-- MySql -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- 连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
================================================
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/AccountMapper.java
================================================
package com.geekq.admin.mapper;
import com.geekq.admin.entity.Account;
import java.util.List;
public interface AccountMapper {
int deleteByPrimaryKey(Long id);
int insert(Account record);
Account selectByPrimaryKey(Long id);
List<Account> selectAll();
int updateByPrimaryKey(Account record);
}
================================================
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/AccountMapper.xml
================================================
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.geekq.admin.mapper.AccountMapper" >
<resultMap id="BaseResultMap" type="com.geekq.admin.entity.Account" >
<id column="id" property="id" jdbcType="BIGINT" />
<result column="tradePassword" property="tradePassword" jdbcType="VARCHAR" />
<result column="usableAmount" property="usableAmount" jdbcType="DECIMAL" />
<result column="freezedAmount" property="freezedAmount" jdbcType="DECIMAL" />
<result column="borrowLimitAmount" property="borrowLimitAmount" jdbcType="DECIMAL" />
<result column="version" property="version" jdbcType="INTEGER" />
<result column="unReceiveInterest" property="unReceiveInterest" jdbcType="DECIMAL" />
<result column="unReceivePrincipal" property="unReceivePrincipal" jdbcType="DECIMAL" />
<result column="unReturnAmount" property="unReturnAmount" jdbcType="DECIMAL" />
<result column="remainBorrowLimit" property="remainBorrowLimit" jdbcType="DECIMAL" />
<result column="abstractInfo" property="abstractInfo" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
delete from account
where id = #{id,jdbcType=BIGINT} and version=#{version}
</delete>
<insert id="insert" parameterType="com.geekq.admin.entity.Account" keyProperty="id" >
insert into account (id,tradePassword, usableAmount, freezedAmount,
borrowLimitAmount, version, unReceiveInterest,
unReceivePrincipal, unReturnAmount, remainBorrowLimit,abstractInfo)
values (#{id},#{tradePassword,jdbcType=VARCHAR}, #{usableAmount,jdbcType=DECIMAL}, #{freezedAmount,jdbcType=DECIMAL},
#{borrowLimitAmount,jdbcType=DECIMAL}, 0, #{unReceiveInterest,jdbcType=DECIMAL},
#{unReceivePrincipal,jdbcType=DECIMAL}, #{unReturnAmount,jdbcType=DECIMAL}, #{remainBorrowLimit,jdbcType=DECIMAL},#{abstractInfo})
</insert>
<update id="updateByPrimaryKey" parameterType="com.geekq.admin.entity.Account" >
update account
set tradePassword = #{tradePassword,jdbcType=VARCHAR},
usableAmount = #{usableAmount,jdbcType=DECIMAL},
freezedAmount = #{freezedAmount,jdbcType=DECIMAL},
borrowLimitAmount = #{borrowLimitAmount,jdbcType=DECIMAL},
version = version+1,
unReceiveInterest = #{unReceiveInterest,jdbcType=DECIMAL},
unReceivePrincipal = #{unReceivePrincipal,jdbcType=DECIMAL},
unReturnAmount = #{unReturnAmount,jdbcType=DECIMAL},
remainBorrowLimit = #{remainBorrowLimit,jdbcType=DECIMAL},
abstractInfo=#{abstractInfo}
where id = #{id,jdbcType=BIGINT} and version=#{version}
</update>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
select id, tradePassword, usableAmount, freezedAmount, borrowLimitAmount, version,
unReceiveInterest, unReceivePrincipal, unReturnAmount, remainBorrowLimit,abstractInfo
from account
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectAll" resultMap="BaseResultMap" >
select id, tradePassword, usableAmount, freezedAmount, borrowLimitAmount, version,
unReceiveInterest, unReceivePrincipal, unReturnAmount, remainBorrowLimit,abstractInfo
from account
</select>
</mapper>
================================================
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/IpLogMapper.java
================================================
package com.geekq.admin.mapper;
import com.geekq.admin.entity.IpLog;
import com.geekq.admin.query.IpLogQueryObject;
import java.util.List;
public interface IpLogMapper {
int deleteByPrimaryKey(Long id);
int insert(IpLog record);
IpLog selectByPrimaryKey(Long id);
List<IpLog> selectAll();
int updateByPrimaryKey(IpLog record);
int queryForCount(IpLogQueryObject qo);
List<IpLog> query(IpLogQueryObject qo);
}
================================================
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/IpLogMapper.xml
================================================
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.geekq.admin.mapper.IpLogMapper" >
<resultMap id="BaseResultMap" type="IpLog" >
<id column="id" property="id" jdbcType="BIGINT" />
<result column="ip" property="ip" jdbcType="VARCHAR" />
<result column="loginState" property="loginState" jdbcType="TINYINT" />
<result column="username" property="username" jdbcType="VARCHAR" />
<result column="loginInfoId" property="loginInfoId" jdbcType="BIGINT" />
<result column="loginType" property="loginType" jdbcType="TINYINT" />
<result column="loginTime" property="loginTime" jdbcType="TIMESTAMP" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
delete from iplog
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="IpLog" useGeneratedKeys="true" keyProperty="id" >
insert into iplog (ip, loginState, username,
loginInfoId, loginType, loginTime)
values (#{ip,jdbcType=VARCHAR}, #{loginState,jdbcType=TINYINT}, #{username,jdbcType=VARCHAR},
#{loginInfoId,jdbcType=BIGINT}, #{loginType,jdbcType=TINYINT}, #{loginTime,jdbcType=TIMESTAMP})
</insert>
<update id="updateByPrimaryKey" parameterType="IpLog" >
update iplog
set ip = #{ip,jdbcType=VARCHAR},
loginState = #{loginState,jdbcType=TINYINT},
username = #{username,jdbcType=VARCHAR},
loginInfoId = #{loginInfoId,jdbcType=BIGINT},
loginType = #{loginType,jdbcType=TINYINT},
loginTime = #{loginTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<sql id="base_column">
id, ip, loginState, username, loginInfoId, loginType, loginTime
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
select <include refid="base_column" />
from iplog
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectAll" resultMap="BaseResultMap" >
select <include refid="base_column" />
from iplog
</select>
<sql id="base_query">
<where>
<if test="beginDate!=null">
AND loginTime >=#{beginDate}
</if>
<if test="endDate!=null">
AND loginTime <=#{endDate}
</if>
<if test="username!=null and like">
AND username like concat('%',#{username},'%')
</if>
<if test="username!=null and !like">
AND username =#{username}
</if>
<if test="userType>-1">
AND loginType =#{userType}
</if>
<if test="state >-1">
AND loginstate = #{state}
</if>
</where>
</sql>
<select id="queryForCount" resultType="int">
select count(id) from iplog
<include refid="base_query" />
</select>
<select id="query" resultMap="BaseResultMap">
select <include refid="base_column"/>
from iplog
<include refid="base_query" />
order by loginTime desc
<if test="pageSize >-1">
LIMIT #{start},#{pageSize}
</if>
</select>
</mapper>
================================================
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/LogininfoMapper.java
================================================
package com.geekq.admin.mapper;
import com.geekq.admin.entity.Logininfo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
public interface LogininfoMapper {
int deleteByPrimaryKey(Long id);
int insert(Logininfo record);
Logininfo selectByPrimaryKey(Long id);
List<Logininfo> selectAll();
int updateByPrimaryKey(Logininfo record);
int getCountByNickname(@Param("nickname") String nickname,
@Param("userType") int userType);
Logininfo getLoginInfoByNickname(@Param("nickname") String nickname,
@Param("userType") int userType);
Logininfo login(@Param("name") String name,
@Param("password") String password, @Param("userType") int userType);
List<Map<String, Object>> autoComplate(@Param("word") String word, @Param("userType") int userType);
}
================================================
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/LogininfoMapper.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.geekq.admin.mapper.LogininfoMapper">
<!--<cache type="redis" />-->
<resultMap id="BaseResultMap" type="com.geekq.admin.entity.Logininfo">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="nickname" jdbcType="VARCHAR" property="nickname" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="state" jdbcType="TINYINT" property="state" />
<result column="admin" property="admin" />
<result column="usertype" property="userType" />
<result column="salt" property="salt" />
<result column="usertype" property="userType" />
<result column="registerDate" property="registerDate" />
<result column="lastLoginDate" property="lastLoginDate" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from
logininfo
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyProperty="id" parameterType="com.geekq.admin.entity.Logininfo" useGeneratedKeys="true">
insert into logininfo (nickname,password, state,usertype,admin,salt,registerdate,lastlogindate)
values (#{nickname,jdbcType=VARCHAR},#{password,jdbcType=VARCHAR},#{state,jdbcType=TINYINT},#{userType},#{admin}
,#{salt},#{registerDate},#{lastLoginDate})
</insert>
<update id="updateByPrimaryKey" parameterType="com.geekq.admin.entity.Logininfo">
update logininfo set nickname = #{nickname,jdbcType=VARCHAR},password =#{password,jdbcType=VARCHAR},
state = #{state,jdbcType=TINYINT},usertype = #{userType},admin=#{admin},salt = #{salt},
registerdate = #{registerDate},lastlogindate = #{lastLoginDate}
where id = #{id,jdbcType=BIGINT}
</update>
<sql id="base_column">
id, nickname, password, state,usertype,admin ,salt , registerdate , lastlogindate
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap" useCache="true">
select <include refid="base_column" />
from logininfo where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectAll" resultMap="BaseResultMap" useCache="false">
select <include refid="base_column" />
from logininfo
</select>
<select id="getCountByNickname" resultType="int" useCache="false">
select count(id) from logininfo where nickname=#{nickname} and usertype = #{userType}
</select>
<select id="getLoginInfoByNickname" resultMap="BaseResultMap" useCache="false">
select <include refid="base_column" />
from logininfo where nickname=#{nickname} and usertype = #{userType}
</select>
<select id="login" resultMap="BaseResultMap" useCache="true">
select <include refid="base_column"/>
from logininfo where nickname= #{name} and password=#{password} and usertype=#{userType}
</select>
<select id="autoComplate" resultType="hashmap" useCache="false">
select id,nickname as name
from logininfo where nickname LIKE concat(#{word},'%') AND usertype = #{userType}
</select>
</mapper>
================================================
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/OrdersMapper.java
================================================
package com.geekq.admin.mapper;
import com.geekq.admin.pojo.Orders;
import com.geekq.admin.pojo.OrdersExample;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface OrdersMapper {
int countByExample(OrdersExample example);
int deleteByExample(OrdersExample example);
int deleteByPrimaryKey(String id);
int insert(Orders record);
int insertSelective(Orders record);
List<Orders> selectByExample(OrdersExample example);
Orders selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") Orders record, @Param("example") OrdersExample example);
int updateByExample(@Param("record") Orders record, @Param("example") OrdersExample example);
int updateByPrimaryKeySelective(Orders record);
int updateByPrimaryKey(Orders record);
}
================================================
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/OrdersMapper.xml
================================================
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.geekq.admin.mapper.OrdersMapper" >
<resultMap id="BaseResultMap" type="com.geekq.admin.pojo.Orders" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="order_num" property="orderNum" jdbcType="VARCHAR" />
<result column="item_id" property="itemId" jdbcType="VARCHAR" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
id, order_num, item_id
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.geekq.admin.pojo.OrdersExample" >
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from orders
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from orders
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from orders
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.geekq.admin.pojo.OrdersExample" >
delete from orders
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.geekq.admin.pojo.Orders" >
insert into orders (id, order_num, item_id
)
values (#{id,jdbcType=VARCHAR}, #{orderNum,jdbcType=VARCHAR}, #{itemId,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.geekq.admin.pojo.Orders" >
insert into orders
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="orderNum != null" >
order_num,
</if>
<if test="itemId != null" >
item_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="orderNum != null" >
#{orderNum,jdbcType=VARCHAR},
</if>
<if test="itemId != null" >
#{itemId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.geekq.admin.pojo.OrdersExample" resultType="java.lang.Integer" >
select count(*) from orders
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update orders
<set >
<if test="record.id != null" >
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.orderNum != null" >
order_num = #{record.orderNum,jdbcType=VARCHAR},
</if>
<if test="record.itemId != null" >
item_id = #{record.itemId,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update orders
set id = #{record.id,jdbcType=VARCHAR},
order_num = #{record.orderNum,jdbcType=VARCHAR},
item_id = #{record.itemId,jdbcType=VARCHAR}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.geekq.admin.pojo.Orders" >
update orders
<set >
<if test="orderNum != null" >
order_num = #{orderNum,jdbcType=VARCHAR},
</if>
<if test="itemId != null" >
item_id = #{itemId,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.geekq.admin.pojo.Orders" >
update orders
set order_num = #{orderNum,jdbcType=VARCHAR},
item_id = #{itemId,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
================================================
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/SystemDictionaryItemMapper.java
================================================
package com.geekq.admin.mapper;
import com.geekq.admin.entity.SystemDictionaryItem;
import com.geekq.admin.query.SystemDictionaryQueryObject;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SystemDictionaryItemMapper {
int deleteByPrimaryKey(Long id);
int insert(SystemDictionaryItem record);
SystemDictionaryItem selectByPrimaryKey(Long id);
List<SystemDictionaryItem> selectAll();
int updateByPrimaryKey(SystemDictionaryItem record);
int queryForCount(SystemDictionaryQueryObject qo);
List<SystemDictionaryItem> query(SystemDictionaryQueryObject qo);
/**
* 按照数据字典的目录sn查所有明细
*
* @param sn
* @return
*/
List<SystemDictionaryItem> queryBySn(@Param("sn") String sn);
}
================================================
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/SystemDictionaryItemMapper.xml
================================================
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.geekq.admin.mapper.SystemDictionaryItemMapper">
<resultMap id="BaseResultMap" type="SystemDictionaryItem">
<id column="id" property="id" jdbcType="BIGINT" />
<result column="parentId" property="parentId" jdbcType="BIGINT" />
<result column="title" property="title" jdbcType="VARCHAR" />
<result column="tvalue" property="tvalue" jdbcType="VARCHAR" />
<result column="sequence" property="sequence" jdbcType="TINYINT" />
<result column="intro" property="intro" jdbcType="VARCHAR" />
</resultMap>
<resultMap type="SystemDictionaryItem" id="small_result">
<id column="id" property="id" jdbcType="BIGINT" />
<result column="title" property="title" jdbcType="VARCHAR" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from systemdictionaryitem
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="SystemDictionaryItem"
useGeneratedKeys="true" keyProperty="id">
insert into systemdictionaryitem (parentId, title, tvalue,sequence, intro)
values (#{parentId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR},#{tvalue,jdbcType=VARCHAR},
#{sequence,jdbcType=TINYINT}, #{intro,jdbcType=VARCHAR})
</insert>
<update id="updateByPrimaryKey" parameterType="SystemDictionaryItem">
update systemdictionaryitem
set parentId = #{parentId,jdbcType=BIGINT},
title = #{title,jdbcType=VARCHAR},
tvalue = #{tvalue,jdbcType=VARCHAR},
sequence = #{sequence,jdbcType=TINYINT},
intro = #{intro,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<sql id="base_column">
id, parentId, title, tvalue, sequence, intro
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
parameterType="java.lang.Long">
select <include refid="base_column" />
from systemdictionaryitem
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select <include refid="base_column" />
from systemdictionaryitem
</select>
<sql id="base_where">
<where>
<if test="parentId!=null">
AND parentId = #{parentId}
</if>
<if test="keyword!=null">
AND title LIKE concat('%',#{keyword},'%')
</if>
</where>
</sql>
<select id="queryForCount" resultType="int">
select count(id) from systemdictionaryitem
<include refid="base_where" />
</select>
<select id="query" resultMap="BaseResultMap">
select <include refid="base_column" />
from systemdictionaryitem
<include refid="base_where" />
<if test="pageSize>-1">
LIMIT #{start},#{pageSize}
</if>
</select>
<select id="queryBySn" resultMap="small_result">
select item.id as id,item.title as title
from systemdictionaryitem item join systemdictionary d on item.parentId = d.id
where d.sn = #{sn}
order by item.sequence
</select>
</mapper>
================================================
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/SystemDictionaryMapper.java
================================================
package com.geekq.admin.mapper;
imp
gitextract_75nft3s6/
├── .gitattributes
├── .gitignore
├── CHANGELOG.md
├── README.md
├── docs/
│ ├── code-criterion.md
│ ├── code-rpc.md
│ ├── code-solve.md
│ ├── dubbo-admin.md
│ ├── dubbo-zk.md
│ ├── fenbushi-tcc.md
│ ├── fenbushi.md
│ ├── jemter-solve.md
│ ├── jvm-goods.md
│ ├── linux.md
│ ├── maven-wrapper.md
│ ├── mybatis-code.md
│ ├── mysql-2.md
│ ├── mysql-3.md
│ ├── mysql-master-slave.md
│ ├── mysql-mvcc.md
│ ├── mysql.md
│ ├── netty.md
│ ├── ngnix-good.md
│ ├── old.md
│ ├── redis-good.md
│ ├── redis-lua.md
│ └── tomcat-good.md
├── miaosha-admin/
│ ├── .gitignore
│ ├── miaosha-admin-api/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── geekq/
│ │ └── admin/
│ │ ├── entity/
│ │ │ ├── Account.java
│ │ │ ├── BaseDomain.java
│ │ │ ├── IpLog.java
│ │ │ ├── Logininfo.java
│ │ │ ├── SystemDictionary.java
│ │ │ ├── SystemDictionaryItem.java
│ │ │ └── Userinfo.java
│ │ ├── pojo/
│ │ │ ├── Orders.java
│ │ │ └── OrdersExample.java
│ │ ├── query/
│ │ │ ├── IpLogQueryObject.java
│ │ │ ├── PageResult.java
│ │ │ ├── QueryObject.java
│ │ │ └── SystemDictionaryQueryObject.java
│ │ └── service/
│ │ ├── IAccountService.java
│ │ ├── IIpLogService.java
│ │ ├── ILogininfoService.java
│ │ ├── ISystemDictionaryService.java
│ │ ├── IUserService.java
│ │ ├── OrdersService.java
│ │ └── RedisCacheStorageService.java
│ ├── miaosha-admin-common/
│ │ ├── .gitignore
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── geekq/
│ │ └── common/
│ │ ├── enums/
│ │ │ ├── Constants.java
│ │ │ ├── MessageStatus.java
│ │ │ ├── OrderStatusEnum.java
│ │ │ ├── ResultStatus.java
│ │ │ ├── SexEnum.java
│ │ │ └── YesOrNo.java
│ │ ├── utils/
│ │ │ ├── Constanst.java
│ │ │ ├── DBContextUtil.java
│ │ │ ├── DateUtil.java
│ │ │ ├── JsonUtils.java
│ │ │ ├── SnowflakeIdWorker.java
│ │ │ ├── ValidatorUtil.java
│ │ │ ├── md5/
│ │ │ │ └── MD5Utils.java
│ │ │ ├── numcal/
│ │ │ │ ├── BidConst.java
│ │ │ │ ├── BitStatesUtils.java
│ │ │ │ ├── CalculateUtil.java
│ │ │ │ └── DecimalFormatUtil.java
│ │ │ └── resultbean/
│ │ │ ├── AbstractResult.java
│ │ │ ├── ResultGeekQ.java
│ │ │ └── ResultJSON.java
│ │ ├── validator/
│ │ │ ├── MobileCheck.java
│ │ │ └── MobileValidator.java
│ │ └── vo/
│ │ └── LoginVo.java
│ ├── miaosha-admin-service/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── geekq/
│ │ │ └── admin/
│ │ │ ├── mapper/
│ │ │ │ ├── AccountMapper.java
│ │ │ │ ├── AccountMapper.xml
│ │ │ │ ├── IpLogMapper.java
│ │ │ │ ├── IpLogMapper.xml
│ │ │ │ ├── LogininfoMapper.java
│ │ │ │ ├── LogininfoMapper.xml
│ │ │ │ ├── OrdersMapper.java
│ │ │ │ ├── OrdersMapper.xml
│ │ │ │ ├── SystemDictionaryItemMapper.java
│ │ │ │ ├── SystemDictionaryItemMapper.xml
│ │ │ │ ├── SystemDictionaryMapper.java
│ │ │ │ ├── SystemDictionaryMapper.xml
│ │ │ │ ├── UserinfoMapper.java
│ │ │ │ └── UserinfoMapper.xml
│ │ │ ├── redis/
│ │ │ │ └── RedisClient.java
│ │ │ ├── service/
│ │ │ │ └── impl/
│ │ │ │ ├── AccountServiceImpl.java
│ │ │ │ ├── IpLogServiceImpl.java
│ │ │ │ ├── LogininfoServiceImpl.java
│ │ │ │ ├── OrdersServiceImpl.java
│ │ │ │ ├── RedisCache.java
│ │ │ │ ├── RedisCacheStorageServiceImpl.java
│ │ │ │ ├── SystemDictionaryServiceImpl.java
│ │ │ │ ├── SystemDictionaryUtil.java
│ │ │ │ └── UserServiceImpl.java
│ │ │ └── utils/
│ │ │ └── UserContext.java
│ │ ├── resources/
│ │ │ ├── dubbo/
│ │ │ │ └── dubbo.xsd
│ │ │ ├── log4j.properties
│ │ │ ├── mybatis/
│ │ │ │ └── SqlMapConfig.xml
│ │ │ ├── resource/
│ │ │ │ ├── db.properties
│ │ │ │ └── redis.properties
│ │ │ └── spring/
│ │ │ ├── applicationContext-dao.xml
│ │ │ ├── applicationContext-dubbo-provider.xml
│ │ │ ├── applicationContext-redis.xml
│ │ │ ├── applicationContext-service.xml
│ │ │ ├── applicationContext-transaction.xml
│ │ │ └── spring-context.xml
│ │ └── webapp/
│ │ └── WEB-INF/
│ │ └── web.xml
│ ├── miaosha-admin-web/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── geekq/
│ │ │ └── web/
│ │ │ ├── controller/
│ │ │ │ ├── BaseController.java
│ │ │ │ ├── LoginController.java
│ │ │ │ ├── PayController.java
│ │ │ │ ├── PersonController.java
│ │ │ │ └── RegisterController.java
│ │ │ ├── interceptor/
│ │ │ │ ├── AddGlobalUtilInterceptor.java
│ │ │ │ ├── LoginInterceptor.java
│ │ │ │ └── RequiredLogin.java
│ │ │ └── service/
│ │ │ ├── CulsterService.java
│ │ │ └── impl/
│ │ │ └── CulsterServiceImpl.java
│ │ ├── resources/
│ │ │ ├── log4j.properties
│ │ │ └── spring/
│ │ │ ├── applicationContext-dubbo-consumer.xml
│ │ │ ├── applicationContext-service.xml
│ │ │ └── springmvc.xml
│ │ └── webapp/
│ │ ├── WEB-INF/
│ │ │ ├── views/
│ │ │ │ ├── bankInfo.ftl
│ │ │ │ ├── bankInfo_result.ftl
│ │ │ │ ├── bidRequest_list.ftl
│ │ │ │ ├── bid_list.ftl
│ │ │ │ ├── borrow.ftl
│ │ │ │ ├── borrow_apply.ftl
│ │ │ │ ├── borrow_apply_result.ftl
│ │ │ │ ├── borrow_info.ftl
│ │ │ │ ├── checkmail_result.ftl
│ │ │ │ ├── common/
│ │ │ │ │ ├── footer-tpl.ftl
│ │ │ │ │ ├── head-tpl.ftl
│ │ │ │ │ ├── leftmenu-tpl.ftl
│ │ │ │ │ ├── links-tpl.ftl
│ │ │ │ │ ├── loadSystemDictionary-macro.ftl
│ │ │ │ │ └── navbar-tpl.ftl
│ │ │ │ ├── invest.ftl
│ │ │ │ ├── invest_list.ftl
│ │ │ │ ├── iplog_list.ftl
│ │ │ │ ├── main.ftl
│ │ │ │ ├── moneyWithdraw_apply.ftl
│ │ │ │ ├── personal.ftl
│ │ │ │ ├── realAuth.ftl
│ │ │ │ ├── realAuth_result.ftl
│ │ │ │ ├── recharge.ftl
│ │ │ │ ├── recharge_list.ftl
│ │ │ │ ├── returnmoney_list.ftl
│ │ │ │ ├── userFiles.ftl
│ │ │ │ ├── userFiles_commit.ftl
│ │ │ │ └── userInfo.ftl
│ │ │ └── web.xml
│ │ ├── bootstrap.html
│ │ ├── borrow.html
│ │ ├── css/
│ │ │ ├── account.css
│ │ │ ├── bank.css
│ │ │ └── core.css
│ │ ├── index.html
│ │ ├── js/
│ │ │ ├── My97DatePicker/
│ │ │ │ ├── My97DatePicker.htm
│ │ │ │ ├── WdatePicker.js
│ │ │ │ ├── calendar.js
│ │ │ │ ├── config.js
│ │ │ │ ├── lang/
│ │ │ │ │ ├── en.js
│ │ │ │ │ ├── zh-cn.js
│ │ │ │ │ └── zh-tw.js
│ │ │ │ └── skin/
│ │ │ │ ├── WdatePicker.css
│ │ │ │ ├── default/
│ │ │ │ │ └── datepicker.css
│ │ │ │ └── whyGreen/
│ │ │ │ └── datepicker.css
│ │ │ ├── bank.js
│ │ │ ├── bootstrap-3.3.2-dist/
│ │ │ │ ├── css/
│ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ └── bootstrap.css
│ │ │ │ └── js/
│ │ │ │ ├── bootstrap.js
│ │ │ │ └── npm.js
│ │ │ ├── jquery/
│ │ │ │ └── jquery-2.1.3.js
│ │ │ ├── metisMenu/
│ │ │ │ ├── metisMenu.css
│ │ │ │ └── metisMenu.js
│ │ │ ├── plugins/
│ │ │ │ ├── datetimepicker/
│ │ │ │ │ ├── .gitattributes
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── .travis.yml
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── css/
│ │ │ │ │ │ └── bootstrap-datetimepicker.css
│ │ │ │ │ ├── js/
│ │ │ │ │ │ ├── bootstrap-datetimepicker.js
│ │ │ │ │ │ └── locales/
│ │ │ │ │ │ └── bootstrap-datetimepicker.zh-CN.js
│ │ │ │ │ ├── sample in bootstrap v2/
│ │ │ │ │ │ ├── bootstrap/
│ │ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ │ └── bootstrap.css
│ │ │ │ │ │ │ └── js/
│ │ │ │ │ │ │ └── bootstrap.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ └── sample in bootstrap v3/
│ │ │ │ │ ├── bootstrap/
│ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ │ │ └── bootstrap.css
│ │ │ │ │ │ └── js/
│ │ │ │ │ │ └── bootstrap.js
│ │ │ │ │ └── index.html
│ │ │ │ ├── flipcountdown/
│ │ │ │ │ ├── .gitattributes
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── MIT-LICENSE.txt
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── bower.json
│ │ │ │ │ ├── flipcountdown.jquery.json
│ │ │ │ │ ├── img/
│ │ │ │ │ │ ├── am-pm-1.psd
│ │ │ │ │ │ ├── digit-lg-dark.psd
│ │ │ │ │ │ └── digit-lg.psd
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── jquery.flipcountdown.css
│ │ │ │ │ ├── jquery.flipcountdown.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── jquery-validation/
│ │ │ │ │ ├── .gitattributes
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── .travis.yml
│ │ │ │ │ ├── demo/
│ │ │ │ │ │ ├── ajaxSubmit-intergration-demo.html
│ │ │ │ │ │ ├── captcha/
│ │ │ │ │ │ │ ├── captcha.js
│ │ │ │ │ │ │ ├── image_req.php
│ │ │ │ │ │ │ ├── images/
│ │ │ │ │ │ │ │ ├── .htaccess
│ │ │ │ │ │ │ │ └── image.php
│ │ │ │ │ │ │ ├── index.php
│ │ │ │ │ │ │ ├── newsession.php
│ │ │ │ │ │ │ ├── process.php
│ │ │ │ │ │ │ ├── rand.php
│ │ │ │ │ │ │ └── style.css
│ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ ├── chili.css
│ │ │ │ │ │ │ ├── cmxform.css
│ │ │ │ │ │ │ ├── cmxformTemplate.css
│ │ │ │ │ │ │ ├── core.css
│ │ │ │ │ │ │ ├── reset.css
│ │ │ │ │ │ │ └── screen.css
│ │ │ │ │ │ ├── custom-messages-data-demo.html
│ │ │ │ │ │ ├── custom-methods-demo.html
│ │ │ │ │ │ ├── dynamic-totals.html
│ │ │ │ │ │ ├── errorcontainer-demo.html
│ │ │ │ │ │ ├── file_input.html
│ │ │ │ │ │ ├── form.php
│ │ │ │ │ │ ├── form.phps
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── jquerymobile.html
│ │ │ │ │ │ ├── js/
│ │ │ │ │ │ │ └── chili-1.7.pack.js
│ │ │ │ │ │ ├── login/
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ └── screen.css
│ │ │ │ │ │ ├── marketo/
│ │ │ │ │ │ │ ├── emails.php
│ │ │ │ │ │ │ ├── emails.phps
│ │ │ │ │ │ │ ├── ie6.css
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── jquery.maskedinput.js
│ │ │ │ │ │ │ ├── mktSignup.js
│ │ │ │ │ │ │ ├── step2.htm
│ │ │ │ │ │ │ └── stylesheet.css
│ │ │ │ │ │ ├── milk/
│ │ │ │ │ │ │ ├── emails.php
│ │ │ │ │ │ │ ├── emails.phps
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── milk.css
│ │ │ │ │ │ │ ├── users.php
│ │ │ │ │ │ │ └── users.phps
│ │ │ │ │ │ ├── multipart/
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── js/
│ │ │ │ │ │ │ │ ├── jquery.maskedinput-1.0.js
│ │ │ │ │ │ │ │ ├── ui.accordion.js
│ │ │ │ │ │ │ │ └── ui.core.js
│ │ │ │ │ │ │ └── style.css
│ │ │ │ │ │ ├── radio-checkbox-select-demo.html
│ │ │ │ │ │ ├── tabs/
│ │ │ │ │ │ │ └── index.html
│ │ │ │ │ │ ├── themerollered.html
│ │ │ │ │ │ └── tinymce/
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── themes/
│ │ │ │ │ │ │ └── simple/
│ │ │ │ │ │ │ ├── editor_template.js
│ │ │ │ │ │ │ ├── langs/
│ │ │ │ │ │ │ │ └── en.js
│ │ │ │ │ │ │ └── skins/
│ │ │ │ │ │ │ └── default/
│ │ │ │ │ │ │ └── ui.css
│ │ │ │ │ │ └── tiny_mce.js
│ │ │ │ │ ├── jquery.validate.js
│ │ │ │ │ ├── lib/
│ │ │ │ │ │ ├── jquery-1.6.4.js
│ │ │ │ │ │ ├── jquery-1.7.2.js
│ │ │ │ │ │ ├── jquery-1.8.3.js
│ │ │ │ │ │ ├── jquery-1.9.0.js
│ │ │ │ │ │ ├── jquery.form.js
│ │ │ │ │ │ ├── jquery.js
│ │ │ │ │ │ └── jquery.mockjax.js
│ │ │ │ │ └── localization/
│ │ │ │ │ └── messages_zh.js
│ │ │ │ ├── jquery.form.js
│ │ │ │ ├── jquery.twbsPagination.js
│ │ │ │ └── uploadify/
│ │ │ │ ├── jquery.uploadify.js
│ │ │ │ └── uploadify.swf
│ │ │ └── plugins-override.js
│ │ ├── jsp/
│ │ │ └── index.jsp
│ │ ├── login.html
│ │ └── register.html
│ └── pom.xml
├── miaosha-order/
│ ├── .gitignore
│ ├── README.md
│ ├── miaosha-order-api/
│ │ ├── .gitignore
│ │ ├── mvnw
│ │ ├── mvnw.cmd
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── geekq/
│ │ └── api/
│ │ ├── entity/
│ │ │ ├── Goods.java
│ │ │ ├── GoodsVoOrder.java
│ │ │ └── MiaoshaGoods.java
│ │ ├── service/
│ │ │ ├── GoodsService.java
│ │ │ └── GoodsServiceMock.java
│ │ └── utils/
│ │ ├── AbstractResultOrder.java
│ │ ├── ResultGeekQOrder.java
│ │ └── ResultStatusOrder.java
│ ├── miaosha-order-provider/
│ │ ├── .gitignore
│ │ ├── mvnw
│ │ ├── mvnw.cmd
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── geekq/
│ │ │ │ └── provider/
│ │ │ │ ├── DubboProviderApplication.java
│ │ │ │ ├── mapper/
│ │ │ │ │ ├── GoodsMapper.java
│ │ │ │ │ └── GoodsMapper.xml
│ │ │ │ └── service/
│ │ │ │ └── impl/
│ │ │ │ ├── GoodsGroupServiceImpl.java
│ │ │ │ └── GoodsServiceImpl.java
│ │ │ └── resources/
│ │ │ ├── application.properties
│ │ │ └── provider.xml
│ │ └── test/
│ │ └── java/
│ │ └── com/
│ │ └── geekq/
│ │ └── provider/
│ │ └── DubboProviderApplicationTests.java
│ ├── mvnw
│ ├── mvnw.cmd
│ └── pom.xml
├── miaosha-rpc/
│ ├── .gitignore
│ ├── dubbo-api/
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── java/
│ │ │ ├── com/
│ │ │ │ └── geekq/
│ │ │ │ └── dubbo/
│ │ │ │ └── springboot/
│ │ │ │ ├── CapAccountTradeOrderService.java
│ │ │ │ └── ServiceAPI.java
│ │ │ └── dto/
│ │ │ └── CapitalTradeOrderDto.java
│ │ └── test/
│ │ └── java/
│ │ └── com/
│ │ └── geekq/
│ │ └── dubbo/
│ │ └── springboot/
│ │ └── AppTest.java
│ ├── dubbo-consumer/
│ │ ├── .gitignore
│ │ ├── mvnw
│ │ ├── mvnw.cmd
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── geekq/
│ │ │ └── dubbo/
│ │ │ └── springboot/
│ │ │ └── consumer/
│ │ │ ├── ConsumerApplication.java
│ │ │ ├── config/
│ │ │ │ └── TCCConfig.java
│ │ │ ├── quickstart/
│ │ │ │ └── QuickstartConsumer.java
│ │ │ └── transaction/
│ │ │ └── TransactionConsumer.java
│ │ └── resources/
│ │ └── application.properties
│ ├── dubbo-provider/
│ │ ├── .gitignore
│ │ ├── mvnw
│ │ ├── mvnw.cmd
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── geekq/
│ │ │ └── dubbo/
│ │ │ └── springboot/
│ │ │ └── privoder/
│ │ │ ├── PrivoderApplication.java
│ │ │ ├── config/
│ │ │ │ └── TCCConfig.java
│ │ │ ├── quickstart/
│ │ │ │ └── QuickstartServiceImpl.java
│ │ │ └── transaction/
│ │ │ ├── CapServiceImpl.java
│ │ │ └── TransactionServiceImpl.java
│ │ └── resources/
│ │ └── application.properties
│ ├── mvnw
│ ├── mvnw.cmd
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── com/
│ │ └── mooc/
│ │ └── jiangzh/
│ │ └── dubbo/
│ │ └── springboot/
│ │ └── springbootdubbo/
│ │ └── SpringbootDubboApplication.java
│ └── resources/
│ └── application.properties
├── miaosha-v1/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── com/
│ │ └── geekq/
│ │ └── miaosha/
│ │ ├── GeekQMainApplication.java
│ │ ├── access/
│ │ │ ├── AccessInterceptor.java
│ │ │ ├── AccessKey.java
│ │ │ ├── AccessLimit.java
│ │ │ └── UserContext.java
│ │ ├── common/
│ │ │ ├── Constanst.java
│ │ │ ├── SnowflakeIdWorker.java
│ │ │ ├── enums/
│ │ │ │ ├── MessageStatus.java
│ │ │ │ └── ResultStatus.java
│ │ │ └── resultbean/
│ │ │ ├── AbstractResult.java
│ │ │ └── ResultGeekQ.java
│ │ ├── config/
│ │ │ ├── DruidConfig.java
│ │ │ ├── UserArgumentResolver.java
│ │ │ └── WebConfig.java
│ │ ├── controller/
│ │ │ ├── BaseController.java
│ │ │ ├── GoodsController.java
│ │ │ ├── LoginController.java
│ │ │ ├── MiaoShaMessageController.java
│ │ │ ├── MiaoshaController.java
│ │ │ ├── OrderController.java
│ │ │ └── RegisterController.java
│ │ ├── dao/
│ │ │ ├── GoodsDao.java
│ │ │ ├── MiaoShaMessageDao.java
│ │ │ ├── MiaoShaUserDao.java
│ │ │ ├── OrderDao.java
│ │ │ └── UserDao.java
│ │ ├── domain/
│ │ │ ├── Goods.java
│ │ │ ├── MiaoShaMessageInfo.java
│ │ │ ├── MiaoShaMessageUser.java
│ │ │ ├── MiaoshaGoods.java
│ │ │ ├── MiaoshaOrder.java
│ │ │ ├── MiaoshaUser.java
│ │ │ ├── OrderInfo.java
│ │ │ └── User.java
│ │ ├── exception/
│ │ │ ├── GlobleException.java
│ │ │ └── GlobleExceptionHandler.java
│ │ ├── mybatis/
│ │ │ ├── Mapper/
│ │ │ │ └── UserMapper.java
│ │ │ ├── README.md
│ │ │ ├── controller/
│ │ │ │ └── UbatisController.java
│ │ │ ├── entity/
│ │ │ │ └── User.java
│ │ │ └── vo/
│ │ │ ├── TeacherListVo.java
│ │ │ └── TeacherVo.java
│ │ ├── rabbitmq/
│ │ │ ├── MQConfig.java
│ │ │ ├── MQReceiver.java
│ │ │ ├── MQSender.java
│ │ │ └── MiaoshaMessage.java
│ │ ├── redis/
│ │ │ ├── BasePrefix.java
│ │ │ ├── DistributedLocker.java
│ │ │ ├── GoodsKey.java
│ │ │ ├── KeyPrefix.java
│ │ │ ├── MiaoShaUserKey.java
│ │ │ ├── MiaoshaKey.java
│ │ │ ├── OrderKey.java
│ │ │ ├── RedisConfig.java
│ │ │ ├── RedisPoolFactory.java
│ │ │ ├── RedisService.java
│ │ │ ├── RedissLockUtil.java
│ │ │ ├── RedissonAutoConfiguration.java
│ │ │ ├── RedissonDistributedLocker.java
│ │ │ ├── RedissonProperties.java
│ │ │ ├── RedissonService.java
│ │ │ ├── Userkey.java
│ │ │ └── redismanager/
│ │ │ ├── OptimisticLockTest.java
│ │ │ ├── RedisLock.java
│ │ │ ├── RedisLua.java
│ │ │ ├── RedisManager.java
│ │ │ ├── RedisUtil.java
│ │ │ └── lua/
│ │ │ ├── RedisLuaLock.java
│ │ │ ├── luaLockScript.lua
│ │ │ ├── test.lua
│ │ │ └── testlua.lua
│ │ ├── service/
│ │ │ ├── GoodsService.java
│ │ │ ├── MiaoShaMessageService.java
│ │ │ ├── MiaoShaUserService.java
│ │ │ ├── MiaoshaService.java
│ │ │ ├── OrderService.java
│ │ │ ├── UserService.java
│ │ │ └── rpchander/
│ │ │ ├── RpcCompensateService.java
│ │ │ ├── RpcHandler.java
│ │ │ ├── enums/
│ │ │ │ ├── PlanStepStatus.java
│ │ │ │ └── PlanStepType.java
│ │ │ └── vo/
│ │ │ ├── HandlerParam.java
│ │ │ ├── PlanOrder.java
│ │ │ └── PlanStep.java
│ │ ├── timeTask/
│ │ │ └── OrderCloseTask.java
│ │ ├── utils/
│ │ │ ├── DBUtil.java
│ │ │ ├── DateTimeUtils.java
│ │ │ ├── MD5Util.java
│ │ │ ├── MD5Utils.java
│ │ │ ├── UUIDUtil.java
│ │ │ ├── UserUtil.java
│ │ │ └── ValidatorUtil.java
│ │ ├── validator/
│ │ │ ├── MobileCheck.java
│ │ │ └── MobileValidator.java
│ │ └── vo/
│ │ ├── GoodsDetailVo.java
│ │ ├── GoodsVo.java
│ │ ├── LoginVo.java
│ │ ├── MiaoShaMessageVo.java
│ │ └── OrderDetailVo.java
│ └── resources/
│ ├── application-dev.properties
│ ├── application-prod.properties
│ ├── application-test.properties
│ ├── application.properties
│ ├── config/
│ │ └── application-test.properties
│ ├── dubbo/
│ │ └── applicationContext-dubbo-consumer.xml
│ ├── generatorConfig.xml
│ ├── mybatis/
│ │ ├── conf.xml
│ │ ├── mapper/
│ │ │ └── userMapper.xml
│ │ └── mybatis-config.xml
│ ├── static/
│ │ ├── bootstrap/
│ │ │ ├── css/
│ │ │ │ ├── bootstrap-theme.css
│ │ │ │ └── bootstrap.css
│ │ │ └── js/
│ │ │ ├── bootstrap.js
│ │ │ └── npm.js
│ │ ├── css/
│ │ │ ├── common.css
│ │ │ └── reset.css
│ │ ├── fonts/
│ │ │ └── FontAwesome.otf
│ │ ├── goods_detail.htm
│ │ ├── js/
│ │ │ ├── common.js
│ │ │ └── common1.js
│ │ ├── layer/
│ │ │ ├── layer.js
│ │ │ ├── mobile/
│ │ │ │ ├── layer.js
│ │ │ │ └── need/
│ │ │ │ └── layer.css
│ │ │ └── skin/
│ │ │ └── default/
│ │ │ └── layer.css
│ │ └── order_detail.htm
│ └── templates/
│ ├── goods_detail.html
│ ├── goods_list.html
│ ├── hello.html
│ ├── index.html
│ ├── login.html
│ ├── message_list.html
│ ├── miaosha_fail.html
│ ├── order_detail.html
│ ├── register.html
│ └── register1.html
├── miaosha-v2/
│ ├── .gitignore
│ ├── miaosha-common/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── geekq/
│ │ └── miasha/
│ │ ├── entity/
│ │ │ ├── BaseDomain.java
│ │ │ ├── Goods.java
│ │ │ ├── IpLog.java
│ │ │ ├── Logininfo.java
│ │ │ ├── MiaoShaMessageInfo.java
│ │ │ ├── MiaoShaMessageUser.java
│ │ │ ├── MiaoshaGoods.java
│ │ │ ├── MiaoshaOrder.java
│ │ │ ├── MiaoshaUser.java
│ │ │ └── OrderInfo.java
│ │ ├── enums/
│ │ │ ├── Constanst.java
│ │ │ ├── Constants.java
│ │ │ ├── MessageStatus.java
│ │ │ ├── OrderStatusEnum.java
│ │ │ ├── SexEnum.java
│ │ │ ├── YesOrNo.java
│ │ │ ├── enums/
│ │ │ │ ├── MessageStatus.java
│ │ │ │ └── ResultStatus.java
│ │ │ └── resultbean/
│ │ │ ├── AbstractResult.java
│ │ │ └── ResultGeekQ.java
│ │ ├── exception/
│ │ │ └── GlobleException.java
│ │ ├── utils/
│ │ │ ├── DateTimeUtils.java
│ │ │ ├── MD5Utils.java
│ │ │ ├── SnowflakeIdWorker.java
│ │ │ ├── UUIDUtil.java
│ │ │ ├── UserContext.java
│ │ │ ├── UserContext2.java
│ │ │ └── ValidatorUtil.java
│ │ ├── validator/
│ │ │ ├── MobileCheck.java
│ │ │ └── MobileValidator.java
│ │ └── vo/
│ │ ├── GoodsDetailVo.java
│ │ ├── GoodsVo.java
│ │ ├── LoginVo.java
│ │ ├── MiaoShaMessageVo.java
│ │ └── OrderDetailVo.java
│ ├── miaosha-service/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── geekq/
│ │ │ └── miaosha/
│ │ │ ├── mapper/
│ │ │ │ ├── GoodsMapper.java
│ │ │ │ ├── GoodsMapper.xml
│ │ │ │ ├── IpLogMapper.java
│ │ │ │ ├── IpLogMapper.xml
│ │ │ │ ├── LogininfoMapper.java
│ │ │ │ ├── LogininfoMapper.xml
│ │ │ │ ├── MiaoShaUserMapper.java
│ │ │ │ ├── MiaoShaUserMapper.xml
│ │ │ │ ├── OrderMapper.java
│ │ │ │ └── OrderMapper.xml
│ │ │ ├── rabbitmq/
│ │ │ │ ├── MQConfig.java
│ │ │ │ ├── MQReceiver.java
│ │ │ │ ├── MQSender.java
│ │ │ │ └── MiaoshaMessage.java
│ │ │ ├── redis/
│ │ │ │ ├── BasePrefix.java
│ │ │ │ ├── DistributedLocker.java
│ │ │ │ ├── GoodsKey.java
│ │ │ │ ├── KeyPrefix.java
│ │ │ │ ├── MiaoShaUserKey.java
│ │ │ │ ├── MiaoshaKey.java
│ │ │ │ ├── OrderKey.java
│ │ │ │ ├── RedisConfig.java
│ │ │ │ ├── RedisPoolFactory.java
│ │ │ │ ├── RedisService.java
│ │ │ │ ├── RedissLockUtil.java
│ │ │ │ ├── Userkey.java
│ │ │ │ └── redismanager/
│ │ │ │ ├── RedisLimitRateWithLUA.java
│ │ │ │ ├── RedisLock.java
│ │ │ │ ├── RedisLua.java
│ │ │ │ ├── RedisManager.java
│ │ │ │ └── lua/
│ │ │ │ ├── RedisLuaLock.java
│ │ │ │ ├── limit.lua
│ │ │ │ ├── luaLockScript.lua
│ │ │ │ ├── test.lua
│ │ │ │ └── testlua.lua
│ │ │ └── service/
│ │ │ ├── GoodsService.java
│ │ │ ├── LoginInfoService.java
│ │ │ ├── MiaoShaMessageService.java
│ │ │ ├── MiaoShaUserService.java
│ │ │ ├── MiaoshaService.java
│ │ │ ├── OrderService.java
│ │ │ └── impl/
│ │ │ └── LoginInfoServiceImpl.java
│ │ └── resources/
│ │ └── limit.lua
│ ├── miaosha-web/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── geekq/
│ │ │ └── miaosha/
│ │ │ ├── GeekQMainApplication.java
│ │ │ ├── config/
│ │ │ │ ├── DruidConfig.java
│ │ │ │ ├── UserArgumentResolver.java
│ │ │ │ └── WebConfig.java
│ │ │ ├── controller/
│ │ │ │ ├── BaseController.java
│ │ │ │ ├── GoodsController.java
│ │ │ │ ├── LoginController.java
│ │ │ │ ├── MiaoShaMessageController.java
│ │ │ │ ├── MiaoshaController.java
│ │ │ │ ├── OrderController.java
│ │ │ │ └── RegisterController.java
│ │ │ └── interceptor/
│ │ │ ├── AccessKey.java
│ │ │ ├── GlobalExceptionHandler.java
│ │ │ ├── GlobalParamAdvice.java
│ │ │ ├── LoginInterceptor.java
│ │ │ └── RequireLogin.java
│ │ └── resources/
│ │ ├── application.properties
│ │ ├── consumer.xml
│ │ ├── css/
│ │ │ ├── account.css
│ │ │ ├── bank.css
│ │ │ ├── core.css
│ │ │ └── slide-unlock.css
│ │ ├── static/
│ │ │ ├── bootstrap/
│ │ │ │ ├── css/
│ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ └── bootstrap.css
│ │ │ │ └── js/
│ │ │ │ ├── bootstrap.js
│ │ │ │ └── npm.js
│ │ │ ├── css/
│ │ │ │ ├── common.css
│ │ │ │ └── reset.css
│ │ │ ├── fonts/
│ │ │ │ └── FontAwesome.otf
│ │ │ ├── goods_detail.htm
│ │ │ ├── js/
│ │ │ │ ├── My97DatePicker/
│ │ │ │ │ ├── My97DatePicker.htm
│ │ │ │ │ ├── WdatePicker.js
│ │ │ │ │ ├── calendar.js
│ │ │ │ │ ├── config.js
│ │ │ │ │ ├── lang/
│ │ │ │ │ │ ├── en.js
│ │ │ │ │ │ ├── zh-cn.js
│ │ │ │ │ │ └── zh-tw.js
│ │ │ │ │ └── skin/
│ │ │ │ │ ├── WdatePicker.css
│ │ │ │ │ ├── default/
│ │ │ │ │ │ └── datepicker.css
│ │ │ │ │ └── whyGreen/
│ │ │ │ │ └── datepicker.css
│ │ │ │ ├── bank.js
│ │ │ │ ├── bootstrap-3.3.2-dist/
│ │ │ │ │ ├── css/
│ │ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ │ └── bootstrap.css
│ │ │ │ │ └── js/
│ │ │ │ │ ├── bootstrap.js
│ │ │ │ │ └── npm.js
│ │ │ │ ├── common.js
│ │ │ │ ├── common1.js
│ │ │ │ ├── jquery/
│ │ │ │ │ └── jquery-2.1.3.js
│ │ │ │ ├── metisMenu/
│ │ │ │ │ ├── metisMenu.css
│ │ │ │ │ └── metisMenu.js
│ │ │ │ ├── plugins/
│ │ │ │ │ ├── datetimepicker/
│ │ │ │ │ │ ├── .gitattributes
│ │ │ │ │ │ ├── .gitignore
│ │ │ │ │ │ ├── .travis.yml
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ └── bootstrap-datetimepicker.css
│ │ │ │ │ │ ├── js/
│ │ │ │ │ │ │ ├── bootstrap-datetimepicker.js
│ │ │ │ │ │ │ └── locales/
│ │ │ │ │ │ │ └── bootstrap-datetimepicker.zh-CN.js
│ │ │ │ │ │ ├── sample in bootstrap v2/
│ │ │ │ │ │ │ ├── bootstrap/
│ │ │ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ │ │ └── bootstrap.css
│ │ │ │ │ │ │ │ └── js/
│ │ │ │ │ │ │ │ └── bootstrap.js
│ │ │ │ │ │ │ └── index.html
│ │ │ │ │ │ └── sample in bootstrap v3/
│ │ │ │ │ │ ├── bootstrap/
│ │ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ │ │ │ └── bootstrap.css
│ │ │ │ │ │ │ └── js/
│ │ │ │ │ │ │ └── bootstrap.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ ├── flipcountdown/
│ │ │ │ │ │ ├── .gitattributes
│ │ │ │ │ │ ├── .gitignore
│ │ │ │ │ │ ├── MIT-LICENSE.txt
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── bower.json
│ │ │ │ │ │ ├── flipcountdown.jquery.json
│ │ │ │ │ │ ├── img/
│ │ │ │ │ │ │ ├── am-pm-1.psd
│ │ │ │ │ │ │ ├── digit-lg-dark.psd
│ │ │ │ │ │ │ └── digit-lg.psd
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── jquery.flipcountdown.css
│ │ │ │ │ │ ├── jquery.flipcountdown.js
│ │ │ │ │ │ └── package.json
│ │ │ │ │ ├── jquery-validation/
│ │ │ │ │ │ ├── .gitattributes
│ │ │ │ │ │ ├── .gitignore
│ │ │ │ │ │ ├── .travis.yml
│ │ │ │ │ │ ├── demo/
│ │ │ │ │ │ │ ├── ajaxSubmit-intergration-demo.html
│ │ │ │ │ │ │ ├── captcha/
│ │ │ │ │ │ │ │ ├── captcha.js
│ │ │ │ │ │ │ │ ├── image_req.php
│ │ │ │ │ │ │ │ ├── images/
│ │ │ │ │ │ │ │ │ ├── .htaccess
│ │ │ │ │ │ │ │ │ └── image.php
│ │ │ │ │ │ │ │ ├── index.php
│ │ │ │ │ │ │ │ ├── newsession.php
│ │ │ │ │ │ │ │ ├── process.php
│ │ │ │ │ │ │ │ ├── rand.php
│ │ │ │ │ │ │ │ └── style.css
│ │ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ │ ├── chili.css
│ │ │ │ │ │ │ │ ├── cmxform.css
│ │ │ │ │ │ │ │ ├── cmxformTemplate.css
│ │ │ │ │ │ │ │ ├── core.css
│ │ │ │ │ │ │ │ ├── reset.css
│ │ │ │ │ │ │ │ └── screen.css
│ │ │ │ │ │ │ ├── custom-messages-data-demo.html
│ │ │ │ │ │ │ ├── custom-methods-demo.html
│ │ │ │ │ │ │ ├── dynamic-totals.html
│ │ │ │ │ │ │ ├── errorcontainer-demo.html
│ │ │ │ │ │ │ ├── file_input.html
│ │ │ │ │ │ │ ├── form.php
│ │ │ │ │ │ │ ├── form.phps
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── jquerymobile.html
│ │ │ │ │ │ │ ├── js/
│ │ │ │ │ │ │ │ └── chili-1.7.pack.js
│ │ │ │ │ │ │ ├── login/
│ │ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ │ └── screen.css
│ │ │ │ │ │ │ ├── marketo/
│ │ │ │ │ │ │ │ ├── emails.php
│ │ │ │ │ │ │ │ ├── emails.phps
│ │ │ │ │ │ │ │ ├── ie6.css
│ │ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ │ ├── jquery.maskedinput.js
│ │ │ │ │ │ │ │ ├── mktSignup.js
│ │ │ │ │ │ │ │ ├── step2.htm
│ │ │ │ │ │ │ │ └── stylesheet.css
│ │ │ │ │ │ │ ├── milk/
│ │ │ │ │ │ │ │ ├── emails.php
│ │ │ │ │ │ │ │ ├── emails.phps
│ │ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ │ ├── milk.css
│ │ │ │ │ │ │ │ ├── users.php
│ │ │ │ │ │ │ │ └── users.phps
│ │ │ │ │ │ │ ├── multipart/
│ │ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ │ ├── js/
│ │ │ │ │ │ │ │ │ ├── jquery.maskedinput-1.0.js
│ │ │ │ │ │ │ │ │ ├── ui.accordion.js
│ │ │ │ │ │ │ │ │ └── ui.core.js
│ │ │ │ │ │ │ │ └── style.css
│ │ │ │ │ │ │ ├── radio-checkbox-select-demo.html
│ │ │ │ │ │ │ ├── tabs/
│ │ │ │ │ │ │ │ └── index.html
│ │ │ │ │ │ │ ├── themerollered.html
│ │ │ │ │ │ │ └── tinymce/
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── themes/
│ │ │ │ │ │ │ │ └── simple/
│ │ │ │ │ │ │ │ ├── editor_template.js
│ │ │ │ │ │ │ │ ├── langs/
│ │ │ │ │ │ │ │ │ └── en.js
│ │ │ │ │ │ │ │ └── skins/
│ │ │ │ │ │ │ │ └── default/
│ │ │ │ │ │ │ │ └── ui.css
│ │ │ │ │ │ │ └── tiny_mce.js
│ │ │ │ │ │ ├── jquery.validate.js
│ │ │ │ │ │ ├── lib/
│ │ │ │ │ │ │ ├── jquery-1.6.4.js
│ │ │ │ │ │ │ ├── jquery-1.7.2.js
│ │ │ │ │ │ │ ├── jquery-1.8.3.js
│ │ │ │ │ │ │ ├── jquery-1.9.0.js
│ │ │ │ │ │ │ ├── jquery.form.js
│ │ │ │ │ │ │ ├── jquery.js
│ │ │ │ │ │ │ └── jquery.mockjax.js
│ │ │ │ │ │ └── localization/
│ │ │ │ │ │ └── messages_zh.js
│ │ │ │ │ ├── jquery.form.js
│ │ │ │ │ ├── jquery.twbsPagination.js
│ │ │ │ │ └── uploadify/
│ │ │ │ │ ├── jquery.uploadify.js
│ │ │ │ │ └── uploadify.swf
│ │ │ │ └── plugins-override.js
│ │ │ ├── layer/
│ │ │ │ ├── layer.js
│ │ │ │ ├── mobile/
│ │ │ │ │ ├── layer.js
│ │ │ │ │ └── need/
│ │ │ │ │ └── layer.css
│ │ │ │ └── skin/
│ │ │ │ └── default/
│ │ │ │ └── layer.css
│ │ │ └── order_detail.htm
│ │ └── templates/
│ │ ├── bootstrap/
│ │ │ ├── css/
│ │ │ │ ├── bootstrap-theme.css
│ │ │ │ └── bootstrap.css
│ │ │ └── js/
│ │ │ ├── bootstrap.js
│ │ │ └── npm.js
│ │ ├── css/
│ │ │ ├── common.css
│ │ │ ├── common1.css
│ │ │ ├── reset.css
│ │ │ └── slide-unlock.css
│ │ ├── fonts/
│ │ │ └── FontAwesome.otf
│ │ ├── goods_list.html
│ │ ├── hello.html
│ │ ├── index.html
│ │ ├── index2.html
│ │ ├── js/
│ │ │ ├── My97DatePicker/
│ │ │ │ ├── My97DatePicker.htm
│ │ │ │ ├── WdatePicker.js
│ │ │ │ ├── calendar.js
│ │ │ │ ├── config.js
│ │ │ │ ├── lang/
│ │ │ │ │ ├── en.js
│ │ │ │ │ ├── zh-cn.js
│ │ │ │ │ └── zh-tw.js
│ │ │ │ └── skin/
│ │ │ │ ├── WdatePicker.css
│ │ │ │ ├── default/
│ │ │ │ │ └── datepicker.css
│ │ │ │ └── whyGreen/
│ │ │ │ └── datepicker.css
│ │ │ ├── bank.js
│ │ │ ├── bootstrap-3.3.2-dist/
│ │ │ │ ├── css/
│ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ └── bootstrap.css
│ │ │ │ └── js/
│ │ │ │ ├── bootstrap.js
│ │ │ │ └── npm.js
│ │ │ ├── common.js
│ │ │ ├── common1.js
│ │ │ ├── jquery/
│ │ │ │ └── jquery-2.1.3.js
│ │ │ ├── metisMenu/
│ │ │ │ ├── metisMenu.css
│ │ │ │ └── metisMenu.js
│ │ │ ├── plugins/
│ │ │ │ ├── datetimepicker/
│ │ │ │ │ ├── .gitattributes
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── .travis.yml
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── css/
│ │ │ │ │ │ └── bootstrap-datetimepicker.css
│ │ │ │ │ ├── js/
│ │ │ │ │ │ ├── bootstrap-datetimepicker.js
│ │ │ │ │ │ └── locales/
│ │ │ │ │ │ └── bootstrap-datetimepicker.zh-CN.js
│ │ │ │ │ ├── sample in bootstrap v2/
│ │ │ │ │ │ ├── bootstrap/
│ │ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ │ └── bootstrap.css
│ │ │ │ │ │ │ └── js/
│ │ │ │ │ │ │ └── bootstrap.js
│ │ │ │ │ │ └── index.html
│ │ │ │ │ └── sample in bootstrap v3/
│ │ │ │ │ ├── bootstrap/
│ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ ├── bootstrap-theme.css
│ │ │ │ │ │ │ └── bootstrap.css
│ │ │ │ │ │ └── js/
│ │ │ │ │ │ └── bootstrap.js
│ │ │ │ │ └── index.html
│ │ │ │ ├── flipcountdown/
│ │ │ │ │ ├── .gitattributes
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── MIT-LICENSE.txt
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── bower.json
│ │ │ │ │ ├── flipcountdown.jquery.json
│ │ │ │ │ ├── img/
│ │ │ │ │ │ ├── am-pm-1.psd
│ │ │ │ │ │ ├── digit-lg-dark.psd
│ │ │ │ │ │ └── digit-lg.psd
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── jquery.flipcountdown.css
│ │ │ │ │ ├── jquery.flipcountdown.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── jquery-validation/
│ │ │ │ │ ├── .gitattributes
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── .travis.yml
│ │ │ │ │ ├── demo/
│ │ │ │ │ │ ├── ajaxSubmit-intergration-demo.html
│ │ │ │ │ │ ├── captcha/
│ │ │ │ │ │ │ ├── captcha.js
│ │ │ │ │ │ │ ├── image_req.php
│ │ │ │ │ │ │ ├── images/
│ │ │ │ │ │ │ │ ├── .htaccess
│ │ │ │ │ │ │ │ └── image.php
│ │ │ │ │ │ │ ├── index.php
│ │ │ │ │ │ │ ├── newsession.php
│ │ │ │ │ │ │ ├── process.php
│ │ │ │ │ │ │ ├── rand.php
│ │ │ │ │ │ │ └── style.css
│ │ │ │ │ │ ├── css/
│ │ │ │ │ │ │ ├── chili.css
│ │ │ │ │ │ │ ├── cmxform.css
│ │ │ │ │ │ │ ├── cmxformTemplate.css
│ │ │ │ │ │ │ ├── core.css
│ │ │ │ │ │ │ ├── reset.css
│ │ │ │ │ │ │ └── screen.css
│ │ │ │ │ │ ├── custom-messages-data-demo.html
│ │ │ │ │ │ ├── custom-methods-demo.html
│ │ │ │ │ │ ├── dynamic-totals.html
│ │ │ │ │ │ ├── errorcontainer-demo.html
│ │ │ │ │ │ ├── file_input.html
│ │ │ │ │ │ ├── form.php
│ │ │ │ │ │ ├── form.phps
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── jquerymobile.html
│ │ │ │ │ │ ├── js/
│ │ │ │ │ │ │ └── chili-1.7.pack.js
│ │ │ │ │ │ ├── login/
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ └── screen.css
│ │ │ │ │ │ ├── marketo/
│ │ │ │ │ │ │ ├── emails.php
│ │ │ │ │ │ │ ├── emails.phps
│ │ │ │ │ │ │ ├── ie6.css
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── jquery.maskedinput.js
│ │ │ │ │ │ │ ├── mktSignup.js
│ │ │ │ │ │ │ ├── step2.htm
│ │ │ │ │ │ │ └── stylesheet.css
│ │ │ │ │ │ ├── milk/
│ │ │ │ │ │ │ ├── emails.php
│ │ │ │ │ │ │ ├── emails.phps
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── milk.css
│ │ │ │ │ │ │ ├── users.php
│ │ │ │ │ │ │ └── users.phps
│ │ │ │ │ │ ├── multipart/
│ │ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ │ ├── js/
│ │ │ │ │ │ │ │ ├── jquery.maskedinput-1.0.js
│ │ │ │ │ │ │ │ ├── ui.accordion.js
│ │ │ │ │ │ │ │ └── ui.core.js
│ │ │ │ │ │ │ └── style.css
│ │ │ │ │ │ ├── radio-checkbox-select-demo.html
│ │ │ │ │ │ ├── tabs/
│ │ │ │ │ │ │ └── index.html
│ │ │ │ │ │ ├── themerollered.html
│ │ │ │ │ │ └── tinymce/
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ ├── themes/
│ │ │ │ │ │ │ └── simple/
│ │ │ │ │ │ │ ├── editor_template.js
│ │ │ │ │ │ │ ├── langs/
│ │ │ │ │ │ │ │ └── en.js
│ │ │ │ │ │ │ └── skins/
│ │ │ │ │ │ │ └── default/
│ │ │ │ │ │ │ └── ui.css
│ │ │ │ │ │ └── tiny_mce.js
│ │ │ │ │ ├── jquery.validate.js
│ │ │ │ │ ├── lib/
│ │ │ │ │ │ ├── jquery-1.6.4.js
│ │ │ │ │ │ ├── jquery-1.7.2.js
│ │ │ │ │ │ ├── jquery-1.8.3.js
│ │ │ │ │ │ ├── jquery-1.9.0.js
│ │ │ │ │ │ ├── jquery.form.js
│ │ │ │ │ │ ├── jquery.js
│ │ │ │ │ │ └── jquery.mockjax.js
│ │ │ │ │ └── localization/
│ │ │ │ │ └── messages_zh.js
│ │ │ │ ├── jquery.form.js
│ │ │ │ ├── jquery.twbsPagination.js
│ │ │ │ └── uploadify/
│ │ │ │ ├── jquery.uploadify.js
│ │ │ │ └── uploadify.swf
│ │ │ ├── plugins-override.js
│ │ │ └── slideunlock/
│ │ │ └── slideunlock.js
│ │ ├── layer/
│ │ │ ├── layer.js
│ │ │ ├── mobile/
│ │ │ │ ├── layer.js
│ │ │ │ └── need/
│ │ │ │ └── layer.css
│ │ │ └── skin/
│ │ │ └── default/
│ │ │ └── layer.css
│ │ ├── login.html
│ │ ├── login222.html
│ │ ├── message_list.html
│ │ ├── miaosha_fail.html
│ │ ├── order_detail.html
│ │ ├── register.html
│ │ ├── register1.html
│ │ ├── register2.html
│ │ └── test.html
│ ├── miaosha.sql
│ └── pom.xml
├── old.md
├── pom.xml
└── sql/
├── miaosha.sql
└── miaosha1.sql
Showing preview only (250K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2838 symbols across 343 files)
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/Account.java
class Account (line 16) | @Getter
method empty (line 33) | public static Account empty(Long id) {
method getAbstractInfo (line 41) | public String getAbstractInfo() {//可用余额 + 冻结金额 + 账户神域的授权额度
method checkAbstractInfo (line 46) | public boolean checkAbstractInfo() {//可用余额 + 冻结金额 + 账户神域的授权额度
method getTotalAmount (line 52) | public BigDecimal getTotalAmount() {
method addUseableAmount (line 56) | public void addUseableAmount(BigDecimal amount) {
method addFreezedAmount (line 60) | public void addFreezedAmount(BigDecimal amount) {
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/BaseDomain.java
class BaseDomain (line 11) | @Getter
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/IpLog.java
class IpLog (line 14) | @Getter
method IpLog (line 29) | public IpLog() {
method IpLog (line 33) | public IpLog(String username, Date loginTime, String ip, int loginType,
method getDisplayState (line 44) | public String getDisplayState() {
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/Logininfo.java
class Logininfo (line 12) | @Setter
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/SystemDictionary.java
class SystemDictionary (line 16) | @Getter
method getJsonString (line 25) | public String getJsonString() {
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/SystemDictionaryItem.java
class SystemDictionaryItem (line 16) | @Getter
method getJsonString (line 28) | public String getJsonString() {
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/Userinfo.java
class Userinfo (line 12) | @Getter
method empty (line 73) | public static Userinfo empty(Long id) {
method getAnonymousRealName (line 86) | public static String getAnonymousRealName(String realName) {
method getAnonymousIdNumber (line 105) | public static String getAnonymousIdNumber(String idNumber) {
method getAnonymousPhoneNumber (line 127) | public static String getAnonymousPhoneNumber(String phoneNumber) {
method getAnonymousCurrentAddress (line 149) | public static String getAnonymousCurrentAddress(String currentAddress) {
method addState (line 163) | public void addState(Long state) {
method removeState (line 167) | public void removeState(Long state) {
method getIsBindPhone (line 171) | public boolean getIsBindPhone() {
method getIsBindEmail (line 176) | public boolean getIsBindEmail() {
method getBaseInfo (line 180) | public boolean getBaseInfo() {
method getRealAuth (line 184) | public boolean getRealAuth() {
method getVedioAuth (line 188) | public boolean getVedioAuth() {
method getHasBidRequest (line 192) | public boolean getHasBidRequest() {
method getAnonymousRealName (line 202) | public String getAnonymousRealName() {
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/pojo/Orders.java
class Orders (line 3) | public class Orders {
method getId (line 10) | public String getId() {
method setId (line 14) | public void setId(String id) {
method getOrderNum (line 18) | public String getOrderNum() {
method setOrderNum (line 22) | public void setOrderNum(String orderNum) {
method getItemId (line 26) | public String getItemId() {
method setItemId (line 30) | public void setItemId(String itemId) {
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/pojo/OrdersExample.java
class OrdersExample (line 6) | public class OrdersExample {
method OrdersExample (line 13) | public OrdersExample() {
method getOrderByClause (line 17) | public String getOrderByClause() {
method setOrderByClause (line 21) | public void setOrderByClause(String orderByClause) {
method isDistinct (line 25) | public boolean isDistinct() {
method setDistinct (line 29) | public void setDistinct(boolean distinct) {
method getOredCriteria (line 33) | public List<Criteria> getOredCriteria() {
method or (line 37) | public void or(Criteria criteria) {
method or (line 41) | public Criteria or() {
method createCriteria (line 47) | public Criteria createCriteria() {
method createCriteriaInternal (line 55) | protected Criteria createCriteriaInternal() {
method clear (line 60) | public void clear() {
class GeneratedCriteria (line 66) | protected abstract static class GeneratedCriteria {
method GeneratedCriteria (line 69) | protected GeneratedCriteria() {
method isValid (line 74) | public boolean isValid() {
method getAllCriteria (line 78) | public List<Criterion> getAllCriteria() {
method getCriteria (line 82) | public List<Criterion> getCriteria() {
method addCriterion (line 86) | protected void addCriterion(String condition) {
method addCriterion (line 93) | protected void addCriterion(String condition, Object value, String p...
method addCriterion (line 100) | protected void addCriterion(String condition, Object value1, Object ...
method andIdIsNull (line 107) | public Criteria andIdIsNull() {
method andIdIsNotNull (line 112) | public Criteria andIdIsNotNull() {
method andIdEqualTo (line 117) | public Criteria andIdEqualTo(String value) {
method andIdNotEqualTo (line 122) | public Criteria andIdNotEqualTo(String value) {
method andIdGreaterThan (line 127) | public Criteria andIdGreaterThan(String value) {
method andIdGreaterThanOrEqualTo (line 132) | public Criteria andIdGreaterThanOrEqualTo(String value) {
method andIdLessThan (line 137) | public Criteria andIdLessThan(String value) {
method andIdLessThanOrEqualTo (line 142) | public Criteria andIdLessThanOrEqualTo(String value) {
method andIdLike (line 147) | public Criteria andIdLike(String value) {
method andIdNotLike (line 152) | public Criteria andIdNotLike(String value) {
method andIdIn (line 157) | public Criteria andIdIn(List<String> values) {
method andIdNotIn (line 162) | public Criteria andIdNotIn(List<String> values) {
method andIdBetween (line 167) | public Criteria andIdBetween(String value1, String value2) {
method andIdNotBetween (line 172) | public Criteria andIdNotBetween(String value1, String value2) {
method andOrderNumIsNull (line 177) | public Criteria andOrderNumIsNull() {
method andOrderNumIsNotNull (line 182) | public Criteria andOrderNumIsNotNull() {
method andOrderNumEqualTo (line 187) | public Criteria andOrderNumEqualTo(String value) {
method andOrderNumNotEqualTo (line 192) | public Criteria andOrderNumNotEqualTo(String value) {
method andOrderNumGreaterThan (line 197) | public Criteria andOrderNumGreaterThan(String value) {
method andOrderNumGreaterThanOrEqualTo (line 202) | public Criteria andOrderNumGreaterThanOrEqualTo(String value) {
method andOrderNumLessThan (line 207) | public Criteria andOrderNumLessThan(String value) {
method andOrderNumLessThanOrEqualTo (line 212) | public Criteria andOrderNumLessThanOrEqualTo(String value) {
method andOrderNumLike (line 217) | public Criteria andOrderNumLike(String value) {
method andOrderNumNotLike (line 222) | public Criteria andOrderNumNotLike(String value) {
method andOrderNumIn (line 227) | public Criteria andOrderNumIn(List<String> values) {
method andOrderNumNotIn (line 232) | public Criteria andOrderNumNotIn(List<String> values) {
method andOrderNumBetween (line 237) | public Criteria andOrderNumBetween(String value1, String value2) {
method andOrderNumNotBetween (line 242) | public Criteria andOrderNumNotBetween(String value1, String value2) {
method andItemIdIsNull (line 247) | public Criteria andItemIdIsNull() {
method andItemIdIsNotNull (line 252) | public Criteria andItemIdIsNotNull() {
method andItemIdEqualTo (line 257) | public Criteria andItemIdEqualTo(String value) {
method andItemIdNotEqualTo (line 262) | public Criteria andItemIdNotEqualTo(String value) {
method andItemIdGreaterThan (line 267) | public Criteria andItemIdGreaterThan(String value) {
method andItemIdGreaterThanOrEqualTo (line 272) | public Criteria andItemIdGreaterThanOrEqualTo(String value) {
method andItemIdLessThan (line 277) | public Criteria andItemIdLessThan(String value) {
method andItemIdLessThanOrEqualTo (line 282) | public Criteria andItemIdLessThanOrEqualTo(String value) {
method andItemIdLike (line 287) | public Criteria andItemIdLike(String value) {
method andItemIdNotLike (line 292) | public Criteria andItemIdNotLike(String value) {
method andItemIdIn (line 297) | public Criteria andItemIdIn(List<String> values) {
method andItemIdNotIn (line 302) | public Criteria andItemIdNotIn(List<String> values) {
method andItemIdBetween (line 307) | public Criteria andItemIdBetween(String value1, String value2) {
method andItemIdNotBetween (line 312) | public Criteria andItemIdNotBetween(String value1, String value2) {
class Criteria (line 318) | public static class Criteria extends GeneratedCriteria {
method Criteria (line 320) | protected Criteria() {
class Criterion (line 325) | public static class Criterion {
method Criterion (line 342) | protected Criterion(String condition) {
method Criterion (line 349) | protected Criterion(String condition, Object value, String typeHandl...
method Criterion (line 361) | protected Criterion(String condition, Object value) {
method Criterion (line 365) | protected Criterion(String condition, Object value, Object secondVal...
method Criterion (line 374) | protected Criterion(String condition, Object value, Object secondVal...
method getCondition (line 378) | public String getCondition() {
method getValue (line 382) | public Object getValue() {
method getSecondValue (line 386) | public Object getSecondValue() {
method isNoValue (line 390) | public boolean isNoValue() {
method isSingleValue (line 394) | public boolean isSingleValue() {
method isBetweenValue (line 398) | public boolean isBetweenValue() {
method isListValue (line 402) | public boolean isListValue() {
method getTypeHandler (line 406) | public String getTypeHandler() {
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/query/IpLogQueryObject.java
class IpLogQueryObject (line 15) | @Setter
method setBeginDate (line 26) | @DateTimeFormat(pattern = "yyyy-MM-dd")
method getEndDate (line 31) | public Date getEndDate() {
method setEndDate (line 38) | @DateTimeFormat(pattern = "yyyy-MM-dd")
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/query/PageResult.java
class PageResult (line 6) | public class PageResult {
method PageResult (line 13) | public PageResult() {
method PageResult (line 17) | public PageResult(Integer totalCount, Integer pageSize,
method empty (line 26) | public static PageResult empty(int pageSize) {
method getTotalPage (line 30) | public Integer getTotalPage() {
method getPrev (line 34) | public Integer getPrev() {
method getNext (line 38) | public Integer getNext() {
method getTotalCount (line 42) | public Integer getTotalCount() {
method getResult (line 46) | public List getResult() {
method getCurrentPage (line 50) | public Integer getCurrentPage() {
method setCurrentPage (line 54) | public void setCurrentPage(Integer currentPage) {
method getPageSize (line 58) | public Integer getPageSize() {
method setPageSize (line 62) | public void setPageSize(Integer pageSize) {
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/query/QueryObject.java
class QueryObject (line 7) | @Getter
method getStart (line 14) | public int getStart() {
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/query/SystemDictionaryQueryObject.java
class SystemDictionaryQueryObject (line 7) | @Getter
method getKeyword (line 13) | public String getKeyword() {
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/IAccountService.java
type IAccountService (line 8) | public interface IAccountService {
method update (line 10) | void update(Account account);
method get (line 12) | Account get(Long id);
method recreateAbstractInfo (line 14) | void recreateAbstractInfo();
method listAll (line 16) | List<Account> listAll();
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/IIpLogService.java
type IIpLogService (line 7) | public interface IIpLogService {
method query (line 9) | PageResult query(IpLogQueryObject qo);
method insert (line 11) | void insert(IpLog ipLog);
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/ILogininfoService.java
type ILogininfoService (line 9) | public interface ILogininfoService {
method register (line 17) | void register(String username, String password);
method checkUsername (line 22) | boolean checkUsername(String name, int userType);
method login (line 31) | ResultGeekQ<Logininfo> login(String name, String password, int userTyp...
method hasAdmin (line 38) | boolean hasAdmin();
method createDefaultAdmin (line 43) | void createDefaultAdmin();
method autoComplate (line 52) | List<Map<String, Object>> autoComplate(String word, int userType);
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/ISystemDictionaryService.java
type ISystemDictionaryService (line 10) | public interface ISystemDictionaryService {
method queryDic (line 12) | PageResult queryDic(SystemDictionaryQueryObject qo);
method saveOrUpdate (line 14) | void saveOrUpdate(SystemDictionary sd);
method queryDicItem (line 16) | PageResult queryDicItem(SystemDictionaryQueryObject qo);
method saveOrUpdateItem (line 18) | void saveOrUpdateItem(SystemDictionaryItem item);
method listDics (line 20) | List<SystemDictionary> listDics();
method queryBySn (line 22) | List<SystemDictionaryItem> queryBySn(String sn);
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/IUserService.java
type IUserService (line 6) | public interface IUserService {
method update (line 8) | void update(Userinfo userinfo);
method get (line 10) | Userinfo get(Long id);
method bindPhone (line 12) | boolean bindPhone(String phoneNumber, String verifyCode);
method updateBasicInfo (line 19) | void updateBasicInfo(Userinfo userinfo);
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/OrdersService.java
type OrdersService (line 5) | public interface OrdersService {
method getOrder (line 10) | public Orders getOrder(String orderId);
method createOrder (line 15) | public boolean createOrder(String itemId);
FILE: miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/RedisCacheStorageService.java
type RedisCacheStorageService (line 5) | public interface RedisCacheStorageService<K, V> {
method set (line 14) | boolean set(String key, V value);
method get (line 17) | Logininfo get(String key);
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/Constants.java
class Constants (line 7) | public class Constants {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/MessageStatus.java
class MessageStatus (line 3) | public class MessageStatus {
type messageType (line 10) | public enum messageType {
method messageType (line 16) | private messageType(String message) {
method getMessage (line 20) | public String getMessage() {
type ContentEnum (line 28) | public enum ContentEnum {
method ContentEnum (line 36) | private ContentEnum(int code, String message) {
method getCode (line 41) | public int getCode() {
method getMessage (line 45) | public String getMessage() {
type sendType (line 53) | public enum sendType {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/OrderStatusEnum.java
type OrderStatusEnum (line 6) | public enum OrderStatusEnum {
method OrderStatusEnum (line 18) | OrderStatusEnum(int key, String value) {
method getName (line 23) | public static String getName(int key) {
method getKey (line 32) | public int getKey() {
method getValue (line 36) | public String getValue() {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/ResultStatus.java
type ResultStatus (line 14) | public enum ResultStatus {
method ResultStatus (line 71) | private ResultStatus(int code, String message) {
method ResultStatus (line 76) | private ResultStatus(Object... args) {
method getCode (line 80) | public int getCode() {
method setCode (line 84) | public void setCode(int code) {
method getMessage (line 88) | public String getMessage() {
method setMessage (line 92) | public void setMessage(String message) {
method getName (line 96) | public String getName() {
method getOutputName (line 100) | public String getOutputName() {
method toString (line 104) | public String toString() {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/SexEnum.java
type SexEnum (line 6) | public enum SexEnum {
method SexEnum (line 14) | SexEnum(int value) {
method getValue (line 18) | public int getValue() {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/YesOrNo.java
type YesOrNo (line 6) | public enum YesOrNo {
method YesOrNo (line 13) | YesOrNo(int value) {
method getValue (line 17) | public int getValue() {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/Constanst.java
class Constanst (line 3) | public class Constanst {
type orderStaus (line 9) | public enum orderStaus {
method orderStaus (line 14) | orderStaus(String name) {
method getName (line 18) | public String getName() {
method setName (line 22) | public void setName(String name) {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/DBContextUtil.java
class DBContextUtil (line 3) | public class DBContextUtil {
method getDB (line 9) | public static String getDB() {
method setDB (line 13) | public static void setDB(String db) {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/DateUtil.java
class DateUtil (line 9) | public class DateUtil {
method endOfDay (line 11) | public static Date endOfDay(Date d) {
method getSecondsBetweenDates (line 16) | public static long getSecondsBetweenDates(Date d1, Date d2) {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/JsonUtils.java
class JsonUtils (line 12) | public class JsonUtils {
method objectToJson (line 25) | public static String objectToJson(Object data) {
method jsonToPojo (line 42) | public static <T> T jsonToPojo(String jsonData, Class<T> beanType) {
method jsonToList (line 61) | public static <T> List<T> jsonToList(String jsonData, Class<T> beanTyp...
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/SnowflakeIdWorker.java
class SnowflakeIdWorker (line 15) | public class SnowflakeIdWorker {
method SnowflakeIdWorker (line 96) | public SnowflakeIdWorker(long workerId, long datacenterId) {
method getOrderId (line 114) | public static long getOrderId(long workerId, long datacenterId) {
method nextId (line 123) | public synchronized long nextId() {
method tilNextMillis (line 162) | protected long tilNextMillis(long lastTimestamp) {
method timeGen (line 177) | protected long timeGen() {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/ValidatorUtil.java
class ValidatorUtil (line 8) | public class ValidatorUtil {
method isMobile (line 12) | public static boolean isMobile(String src) {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/md5/MD5Utils.java
class MD5Utils (line 11) | public class MD5Utils {
method getSaltT (line 16) | public static final String getSaltT() {
method MD5 (line 24) | public static String MD5(String keyName) {
method inputPassFormPass (line 39) | public static String inputPassFormPass(String inputPass) {
method formPassFormPass (line 50) | public static String formPassFormPass(String inputPass) {
method formPassToDBPass (line 62) | public static String formPassToDBPass(String formPass, String salt) {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/numcal/BidConst.java
class BidConst (line 10) | public class BidConst {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/numcal/BitStatesUtils.java
class BitStatesUtils (line 8) | public class BitStatesUtils {
method hasState (line 22) | public static boolean hasState(long states, long value) {
method addState (line 31) | public static long addState(long states, long value) {
method removeState (line 43) | public static long removeState(long states, long value) {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/numcal/CalculateUtil.java
class CalculateUtil (line 10) | public class CalculateUtil {
method getMonthlyRate (line 19) | public static BigDecimal getMonthlyRate(BigDecimal yearRate) {
method calTotalInterest (line 35) | public static BigDecimal calTotalInterest(int returnType,
method calMonthlyInterest (line 79) | public static BigDecimal calMonthlyInterest(int returnType,
method calMonthToReturnMoney (line 145) | public static BigDecimal calMonthToReturnMoney(int returnType,
method calBidInterest (line 189) | public static BigDecimal calBidInterest(BigDecimal bidRequestAmount,
method calAccountManagementCharge (line 225) | public static BigDecimal calAccountManagementCharge(
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/numcal/DecimalFormatUtil.java
class DecimalFormatUtil (line 11) | public class DecimalFormatUtil {
method amountFormat (line 13) | public static BigDecimal amountFormat(BigDecimal number) {
method rateFormat (line 19) | public static BigDecimal rateFormat(BigDecimal number) {
method decimalRateFormat (line 24) | public static BigDecimal decimalRateFormat(BigDecimal number) {
method monthRateFormat (line 29) | public static BigDecimal monthRateFormat(BigDecimal number) {
method formatBigDecimal (line 35) | public static BigDecimal formatBigDecimal(BigDecimal data, int scal) {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/resultbean/AbstractResult.java
class AbstractResult (line 6) | public class AbstractResult {
method AbstractResult (line 11) | AbstractResult() {
method AbstractResult (line 14) | protected AbstractResult(ResultStatus status, String message) {
method AbstractResult (line 20) | protected AbstractResult(ResultStatus status) {
method isSuccess (line 26) | public static boolean isSuccess(AbstractResult result) {
method withError (line 30) | public AbstractResult withError(ResultStatus status) {
method withError (line 35) | public AbstractResult withError(String message) {
method withError (line 41) | public AbstractResult withError(int code, String message) {
method success (line 48) | public AbstractResult success() {
method getStatus (line 53) | public ResultStatus getStatus() {
method getMessage (line 57) | public String getMessage() {
method getCode (line 61) | public int getCode() {
method setCode (line 65) | public void setCode(int code) {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/resultbean/ResultGeekQ.java
class ResultGeekQ (line 8) | public class ResultGeekQ<T> extends AbstractResult implements Serializab...
method ResultGeekQ (line 12) | protected ResultGeekQ() {
method ResultGeekQ (line 15) | protected ResultGeekQ(ResultStatus status, String message) {
method ResultGeekQ (line 19) | protected ResultGeekQ(ResultStatus status) {
method build (line 23) | public static <T> ResultGeekQ<T> build() {
method build (line 27) | public static <T> ResultGeekQ<T> build(String message) {
method error (line 31) | public static <T> ResultGeekQ<T> error(ResultStatus status) {
method getData (line 35) | public T getData() {
method setData (line 39) | public void setData(T data) {
method getCount (line 43) | public Integer getCount() {
method setCount (line 47) | public void setCount(Integer count) {
method success (line 51) | public void success(T value) {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/resultbean/ResultJSON.java
class ResultJSON (line 9) | @Getter
method ResultJSON (line 15) | public ResultJSON() {
method ResultJSON (line 19) | public ResultJSON(Boolean success, String msg) {
method ResultJSON (line 25) | public ResultJSON(String msg) {
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/validator/MobileValidator.java
class MobileValidator (line 9) | public class MobileValidator implements ConstraintValidator<MobileCheck,...
method initialize (line 13) | @Override
method isValid (line 18) | @Override
FILE: miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/vo/LoginVo.java
class LoginVo (line 14) | @Setter
method toString (line 26) | @Override
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/AccountMapper.java
type AccountMapper (line 8) | public interface AccountMapper {
method deleteByPrimaryKey (line 9) | int deleteByPrimaryKey(Long id);
method insert (line 11) | int insert(Account record);
method selectByPrimaryKey (line 13) | Account selectByPrimaryKey(Long id);
method selectAll (line 15) | List<Account> selectAll();
method updateByPrimaryKey (line 17) | int updateByPrimaryKey(Account record);
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/IpLogMapper.java
type IpLogMapper (line 8) | public interface IpLogMapper {
method deleteByPrimaryKey (line 9) | int deleteByPrimaryKey(Long id);
method insert (line 11) | int insert(IpLog record);
method selectByPrimaryKey (line 13) | IpLog selectByPrimaryKey(Long id);
method selectAll (line 15) | List<IpLog> selectAll();
method updateByPrimaryKey (line 17) | int updateByPrimaryKey(IpLog record);
method queryForCount (line 19) | int queryForCount(IpLogQueryObject qo);
method query (line 21) | List<IpLog> query(IpLogQueryObject qo);
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/LogininfoMapper.java
type LogininfoMapper (line 9) | public interface LogininfoMapper {
method deleteByPrimaryKey (line 11) | int deleteByPrimaryKey(Long id);
method insert (line 13) | int insert(Logininfo record);
method selectByPrimaryKey (line 15) | Logininfo selectByPrimaryKey(Long id);
method selectAll (line 17) | List<Logininfo> selectAll();
method updateByPrimaryKey (line 19) | int updateByPrimaryKey(Logininfo record);
method getCountByNickname (line 21) | int getCountByNickname(@Param("nickname") String nickname,
method getLoginInfoByNickname (line 24) | Logininfo getLoginInfoByNickname(@Param("nickname") String nickname,
method login (line 27) | Logininfo login(@Param("name") String name,
method autoComplate (line 30) | List<Map<String, Object>> autoComplate(@Param("word") String word, @Pa...
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/OrdersMapper.java
type OrdersMapper (line 9) | public interface OrdersMapper {
method countByExample (line 10) | int countByExample(OrdersExample example);
method deleteByExample (line 12) | int deleteByExample(OrdersExample example);
method deleteByPrimaryKey (line 14) | int deleteByPrimaryKey(String id);
method insert (line 16) | int insert(Orders record);
method insertSelective (line 18) | int insertSelective(Orders record);
method selectByExample (line 20) | List<Orders> selectByExample(OrdersExample example);
method selectByPrimaryKey (line 22) | Orders selectByPrimaryKey(String id);
method updateByExampleSelective (line 24) | int updateByExampleSelective(@Param("record") Orders record, @Param("e...
method updateByExample (line 26) | int updateByExample(@Param("record") Orders record, @Param("example") ...
method updateByPrimaryKeySelective (line 28) | int updateByPrimaryKeySelective(Orders record);
method updateByPrimaryKey (line 30) | int updateByPrimaryKey(Orders record);
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/SystemDictionaryItemMapper.java
type SystemDictionaryItemMapper (line 9) | public interface SystemDictionaryItemMapper {
method deleteByPrimaryKey (line 11) | int deleteByPrimaryKey(Long id);
method insert (line 13) | int insert(SystemDictionaryItem record);
method selectByPrimaryKey (line 15) | SystemDictionaryItem selectByPrimaryKey(Long id);
method selectAll (line 17) | List<SystemDictionaryItem> selectAll();
method updateByPrimaryKey (line 19) | int updateByPrimaryKey(SystemDictionaryItem record);
method queryForCount (line 21) | int queryForCount(SystemDictionaryQueryObject qo);
method query (line 23) | List<SystemDictionaryItem> query(SystemDictionaryQueryObject qo);
method queryBySn (line 31) | List<SystemDictionaryItem> queryBySn(@Param("sn") String sn);
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/SystemDictionaryMapper.java
type SystemDictionaryMapper (line 9) | public interface SystemDictionaryMapper {
method deleteByPrimaryKey (line 11) | int deleteByPrimaryKey(Long id);
method insert (line 13) | int insert(SystemDictionary record);
method selectByPrimaryKey (line 15) | SystemDictionary selectByPrimaryKey(Long id);
method selectAll (line 17) | List<SystemDictionary> selectAll();
method updateByPrimaryKey (line 19) | int updateByPrimaryKey(SystemDictionary record);
method queryForCount (line 21) | int queryForCount(SystemDictionaryQueryObject qo);
method query (line 23) | List<SystemDictionary> query(SystemDictionaryQueryObject qo);
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/UserinfoMapper.java
type UserinfoMapper (line 8) | public interface UserinfoMapper {
method deleteByPrimaryKey (line 9) | int deleteByPrimaryKey(Long id);
method insert (line 11) | int insert(Userinfo record);
method selectByPrimaryKey (line 13) | Userinfo selectByPrimaryKey(@Param("id") Long id, @Param("salt") Strin...
method selectAll (line 15) | List<Userinfo> selectAll(@Param("salt") String salt);
method updateByPrimaryKey (line 17) | int updateByPrimaryKey(@Param("ui") Userinfo record, @Param("salt") St...
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/redis/RedisClient.java
class RedisClient (line 10) | public class RedisClient {
method set (line 48) | public static boolean set(String key, String value) throws Exception {
method set (line 69) | public static boolean set(String key, Object value) {
method del (line 90) | public static boolean del(String key) {
method get (line 110) | public static Object get(String key) {
method get (line 131) | public static <T> T get(String key, Class<T> clazz) {
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/AccountServiceImpl.java
class AccountServiceImpl (line 11) | @Service("accountServiceImpl")
method update (line 17) | @Override
method get (line 26) | @Override
method recreateAbstractInfo (line 38) | @Override
method listAll (line 46) | @Override
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/IpLogServiceImpl.java
class IpLogServiceImpl (line 17) | @Service
method query (line 23) | @Override
method insert (line 34) | @Override
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/LogininfoServiceImpl.java
class LogininfoServiceImpl (line 29) | @Service("logininfoServiceImpl")
method register (line 48) | @Override
method checkUsername (line 79) | @Override
method login (line 84) | @Override
method hasAdmin (line 109) | @Override
method createDefaultAdmin (line 114) | @Override
method autoComplate (line 119) | @Override
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/OrdersServiceImpl.java
class OrdersServiceImpl (line 13) | @Service("ordersService")
method getOrder (line 21) | @Override
method createOrder (line 26) | @Override
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/RedisCache.java
class RedisCache (line 12) | @Service
method getResource (line 57) | public Jedis getResource() {
method disconnect (line 72) | public void disconnect(Jedis jedis) {
method returnResource (line 81) | public void returnResource(Jedis jedis) {
method brokenResource (line 96) | public void brokenResource(Jedis jedis) {
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/RedisCacheStorageServiceImpl.java
class RedisCacheStorageServiceImpl (line 13) | @Service("redisCacheStorageServiceImpl")
method stringToBean (line 22) | @SuppressWarnings("unchecked")
method set (line 38) | @Override
method get (line 72) | @Override
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/SystemDictionaryServiceImpl.java
class SystemDictionaryServiceImpl (line 15) | @Service("iSystemDictionaryServiceImpl")
method listDics (line 23) | @Override
method queryDic (line 28) | @Override
method saveOrUpdate (line 39) | @Override
method queryDicItem (line 48) | @Override
method saveOrUpdateItem (line 60) | @Override
method queryBySn (line 69) | @Override
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/SystemDictionaryUtil.java
class SystemDictionaryUtil (line 15) | @Component
method list (line 21) | public List<SystemDictionaryItem> list(String sn) {
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/UserServiceImpl.java
class UserServiceImpl (line 9) | @Service("userServiceImpl")
method update (line 23) | @Override
method get (line 32) | @Override
method bindPhone (line 38) | @Override
method updateBasicInfo (line 56) | @Override
FILE: miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/utils/UserContext.java
class UserContext (line 15) | public class UserContext {
method getRequest (line 27) | private static HttpServletRequest getRequest() {
method removeUser (line 32) | public static void removeUser() {
method putLogininfo (line 46) | public static void putLogininfo(Logininfo logininfo) {
method getCurrent (line 53) | public static Logininfo getCurrent() {
method requestContextListener (line 58) | @Bean
FILE: miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/controller/BaseController.java
class BaseController (line 6) | abstract public class BaseController {
FILE: miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/controller/LoginController.java
class LoginController (line 22) | @Controller
method dologin (line 35) | @RequestMapping("/login")
FILE: miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/controller/PayController.java
class PayController (line 12) | @Controller
method index (line 18) | @RequiredLogin
FILE: miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/controller/PersonController.java
class PersonController (line 15) | @Controller
method personal (line 28) | @RequiredLogin
FILE: miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/controller/RegisterController.java
class RegisterController (line 18) | @Controller
method register (line 26) | @RequestMapping("/register")
method checkUsername (line 40) | @RequestMapping("/checkUsername")
FILE: miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/interceptor/AddGlobalUtilInterceptor.java
class AddGlobalUtilInterceptor (line 11) | public class AddGlobalUtilInterceptor extends HandlerInterceptorAdapter {
method postHandle (line 16) | @Override
FILE: miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/interceptor/LoginInterceptor.java
class LoginInterceptor (line 12) | public class LoginInterceptor extends HandlerInterceptorAdapter {
method preHandle (line 17) | @Override
FILE: miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/service/CulsterService.java
type CulsterService (line 3) | public interface CulsterService {
method doBuyItem (line 8) | public void doBuyItem(String itemId);
method displayBuy (line 10) | public boolean displayBuy(String itemId);
FILE: miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/service/impl/CulsterServiceImpl.java
class CulsterServiceImpl (line 10) | @Service("buyService")
method doBuyItem (line 21) | @Override
method displayBuy (line 30) | @Override
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/My97DatePicker/WdatePicker.js
function B (line 35) | function B(){V.$dp=V.$dp||{};obj={$:function($){return(typeof $=="string...
function E (line 35) | function E(A,$,_){if(T)A.attachEvent($,_);else{var B=$.replace(/on/,"");...
function L (line 35) | function L(){var _,A,$=X[O][C]("script");for(var B=0;B<$.length;B++){_=$...
function F (line 35) | function F(F){var E,C;if(F.substring(0,1)!="/"&&F.indexOf("://")==-1){E=...
function M (line 35) | function M(A,$,B){var D=X[O][C]("HEAD").item(0),_=X[O].createElement("li...
function Z (line 35) | function Z($,_){E($,"onload",_)}
function G (line 35) | function G($){$=$||V;var A=0,_=0;while($!=V){var D=$.parent[O][C]("ifram...
function W (line 35) | function W(E){if(T)return E.getBoundingClientRect();else{var A={ROOT_TAG...
function N (line 35) | function N($){$=$||V;var _=$[O];_=_[J]&&_[J].clientHeight&&_[J].clientHe...
function a (line 35) | function a($){$=$||V;var B=$[O],A=B[J],_=B.body;B=(A&&A.scrollTop!=null&...
function D (line 35) | function D($){src=$?($.srcElement||$.target):null;if($dp&&$dp.cal&&!$dp....
function Y (line 35) | function Y(){$dp.status=2;H()}
function H (line 35) | function H(){if($dp.flatCfgs.length>0){var $=$dp.flatCfgs.shift();$.el={...
function U (line 35) | function U(E,_){$dp.win=X;B();E=E||{};if(_){if(!D()){$=$||setInterval(fu...
function S (line 35) | function S(_,$){return _.currentStyle?_.currentStyle[$]:document.default...
function Q (line 35) | function Q(_,$){if(_)if($!=null)_.style.display=$;else return S(_,"displ...
function K (line 35) | function K(H,$){for(var D in _)if(D.substring(0,1)!="$")$dp[D]=_[D];for(...
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/My97DatePicker/calendar.js
function C (line 7) | function C(A){return A<62?String.fromCharCode(A+=A<26?65:A<52?71:-4):A<6...
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/bootstrap-3.3.2-dist/js/bootstrap.js
function transitionEnd (line 34) | function transitionEnd() {
function removeElement (line 126) | function removeElement() {
function Plugin (line 142) | function Plugin(option) {
function Plugin (line 247) | function Plugin(option) {
function Plugin (line 466) | function Plugin(option) {
function getTargetFromTrigger (line 685) | function getTargetFromTrigger($trigger) {
function Plugin (line 697) | function Plugin(option) {
function clearMenus (line 829) | function clearMenus(e) {
function getParent (line 848) | function getParent($this) {
function Plugin (line 865) | function Plugin(option) {
function Plugin (line 1179) | function Plugin(option, _relatedTarget) {
function complete (line 1521) | function complete() {
function Plugin (line 1673) | function Plugin(option) {
function Plugin (line 1787) | function Plugin(option) {
function ScrollSpy (line 1830) | function ScrollSpy(element, options) {
function Plugin (line 1953) | function Plugin(option) {
function next (line 2060) | function next() {
function Plugin (line 2106) | function Plugin(option) {
function Plugin (line 2263) | function Plugin(option) {
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/jquery/jquery-2.1.3.js
function isArraylike (line 533) | function isArraylike( obj ) {
function Sizzle (line 745) | function Sizzle( selector, context, results, seed ) {
function createCache (line 859) | function createCache() {
function markFunction (line 877) | function markFunction( fn ) {
function assert (line 886) | function assert( fn ) {
function addHandle (line 908) | function addHandle( attrs, handler ) {
function siblingCheck (line 923) | function siblingCheck( a, b ) {
function createInputPseudo (line 950) | function createInputPseudo( type ) {
function createButtonPseudo (line 961) | function createButtonPseudo( type ) {
function createPositionalPseudo (line 972) | function createPositionalPseudo( fn ) {
function testContext (line 995) | function testContext( context ) {
function setFilters (line 2004) | function setFilters() {}
function toSelector (line 2075) | function toSelector( tokens ) {
function addCombinator (line 2085) | function addCombinator( matcher, combinator, base ) {
function elementMatcher (line 2138) | function elementMatcher( matchers ) {
function multipleContexts (line 2152) | function multipleContexts( selector, contexts, results ) {
function condense (line 2161) | function condense( unmatched, map, filter, context, xml ) {
function setMatcher (line 2182) | function setMatcher( preFilter, selector, matcher, postFilter, postFinde...
function matcherFromTokens (line 2275) | function matcherFromTokens( tokens ) {
function matcherFromGroupMatchers (line 2333) | function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
function winnow (line 2629) | function winnow( elements, qualifier, not ) {
function sibling (line 2953) | function sibling( cur, dir ) {
function createOptions (line 3031) | function createOptions( options ) {
function completed (line 3425) | function completed() {
function Data (line 3530) | function Data() {
function dataAttr (line 3721) | function dataAttr( elem, key, data ) {
function returnTrue (line 4061) | function returnTrue() {
function returnFalse (line 4065) | function returnFalse() {
function safeActiveElement (line 4069) | function safeActiveElement() {
function manipulationTarget (line 4941) | function manipulationTarget( elem, content ) {
function disableScript (line 4951) | function disableScript( elem ) {
function restoreScript (line 4955) | function restoreScript( elem ) {
function setGlobalEval (line 4968) | function setGlobalEval( elems, refElements ) {
function cloneCopyEvent (line 4979) | function cloneCopyEvent( src, dest ) {
function getAll (line 5013) | function getAll( context, tag ) {
function fixInput (line 5024) | function fixInput( src, dest ) {
function actualDisplay (line 5479) | function actualDisplay( name, doc ) {
function defaultDisplay (line 5501) | function defaultDisplay( nodeName ) {
function curCSS (line 5548) | function curCSS( elem, name, computed ) {
function addGetHookIf (line 5596) | function addGetHookIf( conditionFn, hookFn ) {
function computePixelPositionAndBoxSizingReliable (line 5636) | function computePixelPositionAndBoxSizingReliable() {
function vendorPropName (line 5741) | function vendorPropName( style, name ) {
function setPositiveNumber (line 5763) | function setPositiveNumber( elem, value, subtract ) {
function augmentWidthOrHeight (line 5771) | function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
function getWidthOrHeight (line 5810) | function getWidthOrHeight( elem, name, extra ) {
function showHide (line 5854) | function showHide( elements, show ) {
function Tween (line 6152) | function Tween( elem, options, prop, end, easing ) {
function createFxNow (line 6321) | function createFxNow() {
function genFx (line 6329) | function genFx( type, includeWidth ) {
function createTween (line 6349) | function createTween( value, prop, animation ) {
function defaultPrefilter (line 6363) | function defaultPrefilter( elem, props, opts ) {
function propFilter (line 6496) | function propFilter( props, specialEasing ) {
function Animation (line 6533) | function Animation( elem, properties, options ) {
function addToPrefiltersOrTransports (line 7581) | function addToPrefiltersOrTransports( structure ) {
function inspectPrefiltersOrTransports (line 7613) | function inspectPrefiltersOrTransports( structure, options, originalOpti...
function ajaxExtend (line 7640) | function ajaxExtend( target, src ) {
function ajaxHandleResponses (line 7660) | function ajaxHandleResponses( s, jqXHR, responses ) {
function ajaxConvert (line 7716) | function ajaxConvert( s, response, jqXHR, isSuccess ) {
function done (line 8174) | function done( status, nativeStatusText, responses, headers ) {
function buildParams (line 8418) | function buildParams( prefix, obj, traditional, add ) {
function getWindow (line 8912) | function getWindow( elem ) {
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/metisMenu/metisMenu.js
function Plugin (line 17) | function Plugin(element, options) {
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/datetimepicker/js/bootstrap-datetimepicker.js
function UTCDate (line 32) | function UTCDate() {
function UTCToday (line 36) | function UTCToday() {
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/datetimepicker/sample in bootstrap v2/bootstrap/js/bootstrap.js
function clearMenus (line 409) | function clearMenus() {
function getParent (line 415) | function getParent($this) {
function ScrollSpy (line 496) | function ScrollSpy(element, options) {
function next (line 708) | function next() {
function removeWithAnimation (line 940) | function removeWithAnimation() {
function removeElement (line 1347) | function removeElement() {
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/datetimepicker/sample in bootstrap v3/bootstrap/js/bootstrap.js
function transitionEnd (line 33) | function transitionEnd() {
function removeElement (line 118) | function removeElement() {
function clearMenus (line 764) | function clearMenus() {
function getParent (line 775) | function getParent($this) {
function complete (line 1336) | function complete() {
function ScrollSpy (line 1604) | function ScrollSpy(element, options) {
function next (line 1805) | function next() {
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/jquery-validation/demo/marketo/jquery.maskedinput.js
function getCaretPosition (line 32) | function getCaretPosition(ctl){
function setCaretPosition (line 45) | function setCaretPosition(ctl, pos){
function focusEvent (line 102) | function focusEvent(){
function keydownEvent (line 121) | function keydownEvent(e){
function keypressEvent (line 161) | function keypressEvent(e){
function clearBuffer (line 213) | function clearBuffer(start,end){
function writeBuffer (line 220) | function writeBuffer(pos){
function checkVal (line 231) | function checkVal(){
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/jquery-validation/demo/multipart/js/jquery.maskedinput-1.0.js
function getCaretPosition (line 32) | function getCaretPosition(ctl){
function setCaretPosition (line 45) | function setCaretPosition(ctl, pos){
function clearBuffer (line 204) | function clearBuffer(start,end){
function writeBuffer (line 211) | function writeBuffer(pos){
function checkVal (line 222) | function checkVal(){
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/jquery-validation/demo/multipart/js/ui.core.js
function getter (line 206) | function getter(namespace, plugin, method, args) {
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/jquery-validation/demo/tinymce/tiny_mce.js
function getBase (line 1) | function getBase(n){if(n.src&&/tiny_mce(|_dev|_src|_gzip|_jquery|_protot...
function unload (line 1) | function unload(){var li=t.unloads,o,n;if(li){for(n in li){o=li[n];if(o&...
function fakeUnload (line 1) | function fakeUnload(){var d=document;if(d.readyState=='interactive'){fun...
function get (line 1) | function get(s){x=0;try{x=new ActiveXObject(s);}catch(ex){}return x;}
function ready (line 1) | function ready(){if(!o.async||x.readyState==4||c++>10000){if(o.success&&...
function get (line 1) | function get(s,n){return s.getElementsByTagName(n.toLowerCase());}
function get (line 1) | function get(s,n){return s.getElementsByTagName(n);}
function collect (line 1) | function collect(n){if(!n.mce_save){n.mce_save=1;o.push(n);}}
function collectIE (line 1) | function collectIE(n){if(!n.getAttribute('mce_save')){n.setAttribute('mc...
function find (line 1) | function find(n,f,r){var i,l,nl=get(r,n);for(i=0,l=nl.length;i<l;i++)f(n...
function compress (line 1) | function compress(p,s,ot){var t,r,b,l;t=o[p+'-top'+s];if(!t)return;r=o[p...
function compress2 (line 1) | function compress2(ta,a,b,c){var t;t=o[a];if(!t)return;t=o[b];if(!t)retu...
function set (line 1) | function set(){try{e.innerHTML='<br />'+h;e.removeChild(e.firstChild);}c...
function trim (line 1) | function trim(s){s=s.replace(/(<!--\[CDATA\[|\]\]-->)/g,'\n');s=s.replac...
function handle (line 1) | function handle(m,b,c){var u=c;if(a.indexOf('mce_'+b)!=-1)return m;if(b=...
function hex (line 1) | function hex(s){s=parseInt(s).toString(16);return s.length>1?s:'0'+s;}
function addClasses (line 1) | function addClasses(s){each(s.imports,function(r){addClasses(r);});each(...
function trimNl (line 1) | function trimNl(s){return s.replace(/[\n\r]+/g,'');}
function getPos (line 1) | function getPos(r,sn,en){var w=t.dom.doc.createTreeWalker(r,NodeFilter.S...
function getPos (line 1) | function getPos(r,sp,ep){var w=t.dom.doc.createTreeWalker(r,NodeFilter.S...
function first (line 1) | function first(n){return n?d.createTreeWalker(n,NodeFilter.SHOW_TEXT,nul...
function last (line 1) | function last(n){var c,o,w;if(!n)return null;w=d.createTreeWalker(n,Node...
function getXML (line 1) | function getXML(){var i=document.implementation;if(!i||!i.createDocument...
function getIEAtts (line 1) | function getIEAtts(n){var o=[];if(n.nodeName=='OBJECT')return n.attribut...
function wildcardToRE (line 1) | function wildcardToRE(s){return s.replace(/([?+*])/g,'.$1');}
function prevNode (line 1) | function prevNode(e,n){var a=n.split(','),i;while((e=e.previousSibling)!...
function enc (line 1) | function enc(s){return s.replace(/[\r\n\\]/g,function(c){if(c==='\n')ret...
function dec (line 1) | function dec(s){return s.replace(/\\[\\rn]/g,function(c){if(c==='\\n')re...
function loadScript (line 1) | function loadScript(u){if(Event.domLoaded||t.settings.strict_mode){tinym...
function done (line 1) | function done(o){o.state=2;if(o.func)o.func.call(o.scope||t);}
function allDone (line 1) | function allDone(){var l;l=sc.length;each(sc,function(o){o=lo[o.url];if(...
function load (line 1) | function load(o){if(o.state>0)return;o.state=1;tinymce.dom.ScriptLoader....
function done (line 1) | function done(){Event.clear(id);tinymce.DOM.remove(id);if(cb){cb.call(do...
function focus (line 1) | function focus(d){var i=t._focusIdx+d,e=DOM.select('a','menu_'+t.id)[i];...
function onChange (line 1) | function onChange(e){var v=t.items[e.target.selectedIndex-1];if(v&&(v=v....
function execCallback (line 1) | function execCallback(se,n,s){var f=se[n];if(!f)return;if(tinymce.is(f,'...
function hasClass (line 1) | function hasClass(n,c){return c.constructor===RegExp?c.test(n.className)...
function clr (line 1) | function clr(){ed.destroy();w.detachEvent('onunload',clr);w=w.tinyMCE=w....
function loadScripts (line 1) | function loadScripts(){if(s.language)sl.add(tinymce.baseURL+'/langs/'+s....
function repaint (line 1) | function repaint(a,o){if(!o||!o.initial)t.execCommand('mceRepaint');}
function handleCustom (line 1) | function handleCustom(ed,o){each(explode(s.custom_elements),function(v){...
function eventHandler (line 1) | function eventHandler(e,o){var ty=e.type;if(t.removed)return;if(t.onEven...
function setOpts (line 1) | function setOpts(){var t=this,d=t.getDoc(),s=t.settings;if(isGecko&&!s.r...
function tabCancel (line 1) | function tabCancel(ed,e){if(e.keyCode===9)return Event.cancel(e);}
function tabHandler (line 1) | function tabHandler(ed,e){var x,i,f,el,v;function find(d){f=DOM.getParen...
function find (line 1) | function find(e){var v=null;if(!e.altKey&&!e.ctrlKey&&!e.metaKey)return ...
function addUndo (line 1) | function addUndo(){t.undoManager.typing=0;t.undoManager.add();}
function convert (line 1) | function convert(ed,o){if(!s.inline_styles)return;if(o.get){each(t.dom.s...
function process (line 1) | function process(no){var n,sp,nl,x;if(!s.inline_styles)return;nl=t.dom.s...
function isBlock (line 1) | function isBlock(n){return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|OL|U...
function set (line 1) | function set(e){each(v,function(v,k){ed.dom.setAttrib(e,k,v);});}
function getParent (line 1) | function getParent(n){return dom.getParent(n,function(n){return n.nodeTy...
function set (line 1) | function set(n,e){if(n.nodeType==1){switch(v.command){case'setattrib':re...
function set (line 1) | function set(s){if(!isGecko)return;try{d.execCommand("styleWithCSS",0,s)...
function isBlock (line 1) | function isBlock(n){return/^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test...
function getBQ (line 1) | function getBQ(e){return dom.getParent(e,function(n){return n.nodeName==...
function replaceFonts (line 1) | function replaceFonts(){var bm;each(dom.select(tinymce.isWebKit&&!tinymc...
function padd (line 1) | function padd(ed,o){if(isOpera)o.content=o.content.replace(t.reOpera,'</...
function ren (line 1) | function ren(rn,na){var ne=ed.dom.create(na);each(rn.attributes,function...
function isEmpty (line 1) | function isEmpty(n){n=n.innerHTML;n=n.replace(/<(img|hr|table)/gi,'-');n...
function appendStyles (line 1) | function appendStyles(e,en){var nl=[],nn,n,i;e.innerHTML='';if(se.keep_s...
function first (line 1) | function first(n){return d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,...
function handler (line 1) | function handler(e){var pr;e=e.target;if(e&&e.parentNode&&e.nodeName=='B...
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/jquery-validation/jquery.validate.js
function handle (line 61) | function handle() {
function delegate (line 327) | function delegate(event) {
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/jquery-validation/lib/jquery-1.6.4.js
function jQuerySub (line 871) | function jQuerySub( selector, context ) {
function doScrollCheck (line 937) | function doScrollCheck() {
function resolveFunc (line 1127) | function resolveFunc( i ) {
function dataAttr (line 1728) | function dataAttr( elem, key, data ) {
function isEmptyDataObject (line 1761) | function isEmptyDataObject( obj ) {
function handleQueueMarkDefer (line 1774) | function handleQueueMarkDefer( elem, type, src ) {
function resolve (line 1924) | function resolve() {
function returnFalse (line 3169) | function returnFalse() {
function returnTrue (line 3172) | function returnTrue() {
function trigger (line 3416) | function trigger( type, elem, args ) {
function handler (line 3451) | function handler( donor ) {
function liveHandler (line 3655) | function liveHandler( event ) {
function liveConvert (line 3743) | function liveConvert( type, selector ) {
function dirNodeCheck (line 5058) | function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
function dirCheck (line 5091) | function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
function isDisconnected (line 5371) | function isDisconnected( node ) {
function winnow (line 5493) | function winnow( elements, qualifier, keep ) {
function root (line 5873) | function root( elem, cur ) {
function cloneCopyEvent (line 5880) | function cloneCopyEvent( src, dest ) {
function cloneFixAttributes (line 5909) | function cloneFixAttributes( src, dest ) {
function getAll (line 6041) | function getAll( elem ) {
function fixDefaultChecked (line 6054) | function fixDefaultChecked( elem ) {
function findInputs (line 6060) | function findInputs( elem ) {
function evalScript (line 6279) | function evalScript( i, elem ) {
function getWH (line 6617) | function getWH( elem, name, extra ) {
function addToPrefiltersOrTransports (line 6743) | function addToPrefiltersOrTransports( structure ) {
function inspectPrefiltersOrTransports (line 6779) | function inspectPrefiltersOrTransports( structure, options, originalOpti...
function ajaxExtend (line 6821) | function ajaxExtend( target, src ) {
function done (line 7163) | function done( status, nativeStatusText, responses, headers ) {
function buildParams (line 7478) | function buildParams( prefix, obj, traditional, add ) {
function ajaxHandleResponses (line 7528) | function ajaxHandleResponses( s, jqXHR, responses ) {
function ajaxConvert (line 7593) | function ajaxConvert( s, response ) {
function createStandardXHR (line 7859) | function createStandardXHR() {
function createActiveXHR (line 7865) | function createActiveXHR() {
function createFxNow (line 8344) | function createFxNow() {
function clearFxNow (line 8349) | function clearFxNow() {
function genFx (line 8354) | function genFx( type, num ) {
function t (line 8464) | function t( gotoEnd ) {
function defaultDisplay (line 8619) | function defaultDisplay( nodeName ) {
function getWindow (line 8965) | function getWindow( elem ) {
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/jquery-validation/lib/jquery-1.7.2.js
function jQuerySub (line 897) | function jQuerySub( selector, context ) {
function doScrollCheck (line 963) | function doScrollCheck() {
function createFlags (line 990) | function createFlags( flags ) {
function resolveFunc (line 1325) | function resolveFunc( i ) {
function progressFunc (line 1333) | function progressFunc( i ) {
function dataAttr (line 1985) | function dataAttr( elem, key, data ) {
function isEmptyDataObject (line 2016) | function isEmptyDataObject( obj ) {
function handleQueueMarkDefer (line 2034) | function handleQueueMarkDefer( elem, type, src ) {
function resolve (line 2193) | function resolve() {
function returnFalse (line 3546) | function returnFalse() {
function returnTrue (line 3549) | function returnTrue() {
function dirNodeCheck (line 5260) | function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
function dirCheck (line 5293) | function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
function isDisconnected (line 5566) | function isDisconnected( node ) {
function winnow (line 5683) | function winnow( elements, qualifier, keep ) {
function createSafeFragment (line 5720) | function createSafeFragment( document ) {
function root (line 6092) | function root( elem, cur ) {
function cloneCopyEvent (line 6099) | function cloneCopyEvent( src, dest ) {
function cloneFixAttributes (line 6127) | function cloneFixAttributes( src, dest ) {
function getAll (line 6272) | function getAll( elem ) {
function fixDefaultChecked (line 6285) | function fixDefaultChecked( elem ) {
function findInputs (line 6291) | function findInputs( elem ) {
function shimCloneNode (line 6302) | function shimCloneNode( elem ) {
function getWidthOrHeight (line 6793) | function getWidthOrHeight( elem, name, extra ) {
function addToPrefiltersOrTransports (line 7034) | function addToPrefiltersOrTransports( structure ) {
function inspectPrefiltersOrTransports (line 7070) | function inspectPrefiltersOrTransports( structure, options, originalOpti...
function ajaxExtend (line 7112) | function ajaxExtend( target, src ) {
function done (line 7454) | function done( status, nativeStatusText, responses, headers ) {
function buildParams (line 7769) | function buildParams( prefix, obj, traditional, add ) {
function ajaxHandleResponses (line 7819) | function ajaxHandleResponses( s, jqXHR, responses ) {
function ajaxConvert (line 7884) | function ajaxConvert( s, response ) {
function createStandardXHR (line 8149) | function createStandardXHR() {
function createActiveXHR (line 8155) | function createActiveXHR() {
function doAnimation (line 8494) | function doAnimation() {
function stopQueue (line 8650) | function stopQueue( elem, data, index ) {
function createFxNow (line 8692) | function createFxNow() {
function clearFxNow (line 8697) | function clearFxNow() {
function genFx (line 8702) | function genFx( type, num ) {
function t (line 8817) | function t( gotoEnd ) {
function defaultDisplay (line 9015) | function defaultDisplay( nodeName ) {
function getWindow (line 9299) | function getWindow( elem ) {
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/jquery-validation/lib/jquery-1.8.3.js
function createOptions (line 911) | function createOptions( options ) {
function dataAttr (line 1801) | function dataAttr( elem, key, data ) {
function isEmptyDataObject (line 1833) | function isEmptyDataObject( obj ) {
function returnFalse (line 3274) | function returnFalse() {
function returnTrue (line 3277) | function returnTrue() {
function Sizzle (line 3880) | function Sizzle( selector, context, results, seed ) {
function createInputPseudo (line 3949) | function createInputPseudo( type ) {
function createButtonPseudo (line 3957) | function createButtonPseudo( type ) {
function createPositionalPseudo (line 3965) | function createPositionalPseudo( fn ) {
function siblingCheck (line 4560) | function siblingCheck( a, b, ret ) {
function tokenize (line 4683) | function tokenize( selector, parseOnly ) {
function addCombinator (line 4746) | function addCombinator( matcher, combinator, base ) {
function elementMatcher (line 4798) | function elementMatcher( matchers ) {
function condense (line 4812) | function condense( unmatched, map, filter, context, xml ) {
function setMatcher (line 4833) | function setMatcher( preFilter, selector, matcher, postFilter, postFinde...
function matcherFromTokens (line 4926) | function matcherFromTokens( tokens ) {
function matcherFromGroupMatchers (line 4978) | function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
function multipleContexts (line 5102) | function multipleContexts( selector, contexts, results ) {
function select (line 5111) | function select( selector, context, results, seed, xml ) {
function setFilters (line 5338) | function setFilters() {}
function isDisconnected (line 5504) | function isDisconnected( node ) {
function sibling (line 5508) | function sibling( cur, dir ) {
function winnow (line 5616) | function winnow( elements, qualifier, keep ) {
function createSafeFragment (line 5649) | function createSafeFragment( document ) {
function findOrAppend (line 6033) | function findOrAppend( elem, tag ) {
function cloneCopyEvent (line 6037) | function cloneCopyEvent( src, dest ) {
function cloneFixAttributes (line 6065) | function cloneFixAttributes( src, dest ) {
function getAll (line 6208) | function getAll( elem ) {
function fixDefaultChecked (line 6221) | function fixDefaultChecked( elem ) {
function jQuerySub (line 6517) | function jQuerySub( selector, context ) {
function vendorPropName (line 6563) | function vendorPropName( style, name ) {
function isHidden (line 6585) | function isHidden( elem, el ) {
function showHide (line 6590) | function showHide( elements, show ) {
function setPositiveNumber (line 6900) | function setPositiveNumber( elem, value, subtract ) {
function augmentWidthOrHeight (line 6907) | function augmentWidthOrHeight( elem, name, extra, isBorderBox ) {
function getWidthOrHeight (line 6949) | function getWidthOrHeight( elem, name, extra ) {
function css_defaultDisplay (line 6992) | function css_defaultDisplay( nodeName ) {
function buildParams (line 7246) | function buildParams( prefix, obj, traditional, add ) {
function addToPrefiltersOrTransports (line 7335) | function addToPrefiltersOrTransports( structure ) {
function inspectPrefiltersOrTransports (line 7369) | function inspectPrefiltersOrTransports( structure, options, originalOpti...
function ajaxExtend (line 7411) | function ajaxExtend( target, src ) {
function done (line 7722) | function done( status, nativeStatusText, responses, headers ) {
function ajaxHandleResponses (line 8015) | function ajaxHandleResponses( s, jqXHR, responses ) {
function ajaxConvert (line 8077) | function ajaxConvert( s, response ) {
function createStandardXHR (line 8344) | function createStandardXHR() {
function createActiveXHR (line 8350) | function createActiveXHR() {
function createFxNow (line 8604) | function createFxNow() {
function createTweens (line 8611) | function createTweens( animation, props ) {
function Animation (line 8626) | function Animation( elem, properties, options ) {
function propFilter (line 8724) | function propFilter( props, specialEasing ) {
function defaultPrefilter (line 8791) | function defaultPrefilter( elem, props, opts ) {
function Tween (line 8915) | function Tween( elem, options, prop, end, easing ) {
function genFx (line 9099) | function genFx( type, includeWidth ) {
function getWindow (line 9405) | function getWindow( elem ) {
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/jquery-validation/lib/jquery-1.9.0.js
function isArraylike (line 931) | function isArraylike( obj ) {
function createOptions (line 954) | function createOptions( options ) {
function internalData (line 1525) | function internalData( elem, name, data, pvt /* Internal Use Only */ ){
function internalRemoveData (line 1619) | function internalRemoveData( elem, name, pvt /* For internal use only */ ){
function dataAttr (line 1811) | function dataAttr( elem, key, data ) {
function isEmptyDataObject (line 1843) | function isEmptyDataObject( obj ) {
function returnTrue (line 2672) | function returnTrue() {
function returnFalse (line 2676) | function returnFalse() {
function isNative (line 3827) | function isNative( fn ) {
function createCache (line 3837) | function createCache() {
function markFunction (line 3855) | function markFunction( fn ) {
function assert (line 3864) | function assert( fn ) {
function Sizzle (line 3877) | function Sizzle( selector, context, results, seed ) {
function siblingCheck (line 4439) | function siblingCheck( a, b ) {
function createInputPseudo (line 4452) | function createInputPseudo( type ) {
function createButtonPseudo (line 4460) | function createButtonPseudo( type ) {
function createPositionalPseudo (line 4468) | function createPositionalPseudo( fn ) {
function tokenize (line 4995) | function tokenize( selector, parseOnly ) {
function toSelector (line 5062) | function toSelector( tokens ) {
function addCombinator (line 5072) | function addCombinator( matcher, combinator, base ) {
function elementMatcher (line 5122) | function elementMatcher( matchers ) {
function condense (line 5136) | function condense( unmatched, map, filter, context, xml ) {
function setMatcher (line 5157) | function setMatcher( preFilter, selector, matcher, postFilter, postFinde...
function matcherFromTokens (line 5250) | function matcherFromTokens( tokens ) {
function matcherFromGroupMatchers (line 5302) | function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
function multipleContexts (line 5428) | function multipleContexts( selector, contexts, results ) {
function select (line 5437) | function select( selector, context, results, seed ) {
function setFilters (line 5505) | function setFilters() {}
function sibling (line 5657) | function sibling( cur, dir ) {
function winnow (line 5765) | function winnow( elements, qualifier, keep ) {
function createSafeFragment (line 5798) | function createSafeFragment( document ) {
function findOrAppend (line 6184) | function findOrAppend( elem, tag ) {
function disableScript (line 6189) | function disableScript( elem ) {
function restoreScript (line 6194) | function restoreScript( elem ) {
function setGlobalEval (line 6205) | function setGlobalEval( elems, refElements ) {
function cloneCopyEvent (line 6213) | function cloneCopyEvent( src, dest ) {
function fixCloneNodeIssues (line 6241) | function fixCloneNodeIssues( src, dest ) {
function getAll (line 6334) | function getAll( context, tag ) {
function fixDefaultChecked (line 6357) | function fixDefaultChecked( elem ) {
function vendorPropName (line 6621) | function vendorPropName( style, name ) {
function isHidden (line 6643) | function isHidden( elem, el ) {
function showHide (line 6650) | function showHide( elements, show ) {
function setPositiveNumber (line 6988) | function setPositiveNumber( elem, value, subtract ) {
function augmentWidthOrHeight (line 6996) | function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
function getWidthOrHeight (line 7035) | function getWidthOrHeight( elem, name, extra ) {
function css_defaultDisplay (line 7079) | function css_defaultDisplay( nodeName ) {
function actualDisplay (line 7111) | function actualDisplay( name, doc ) {
function buildParams (line 7337) | function buildParams( prefix, obj, traditional, add ) {
function addToPrefiltersOrTransports (line 7421) | function addToPrefiltersOrTransports( structure ) {
function inspectPrefiltersOrTransports (line 7453) | function inspectPrefiltersOrTransports( structure, options, originalOpti...
function ajaxExtend (line 7480) | function ajaxExtend( target, src ) {
function done (line 7943) | function done( status, nativeStatusText, responses, headers ) {
function ajaxHandleResponses (line 8064) | function ajaxHandleResponses( s, jqXHR, responses ) {
function ajaxConvert (line 8126) | function ajaxConvert( s, response ) {
function createStandardXHR (line 8388) | function createStandardXHR() {
function createActiveXHR (line 8394) | function createActiveXHR() {
function createFxNow (line 8644) | function createFxNow() {
function createTweens (line 8651) | function createTweens( animation, props ) {
function Animation (line 8666) | function Animation( elem, properties, options ) {
function propFilter (line 8770) | function propFilter( props, specialEasing ) {
function defaultPrefilter (line 8837) | function defaultPrefilter( elem, props, opts ) {
function Tween (line 8962) | function Tween( elem, options, prop, end, easing ) {
function genFx (line 9188) | function genFx( type, includeWidth ) {
function getWindow (line 9484) | function getWindow( elem ) {
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/jquery-validation/lib/jquery.form.js
function deepSerialize (line 222) | function deepSerialize(extraData){
function fileUploadXhr (line 235) | function fileUploadXhr(a) {
function fileUploadIframe (line 288) | function fileUploadIframe(a) {
function doAjaxSubmit (line 758) | function doAjaxSubmit(e) {
function captureSubmittingElement (line 767) | function captureSubmittingElement(e) {
function log (line 1109) | function log() {
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/jquery-validation/lib/jquery.mockjax.js
function parseXML (line 20) | function parseXML(xml) {
function success (line 191) | function success() {
function complete (line 203) | function complete() {
function trigger (line 220) | function trigger(type, args) {
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/jquery.form.js
function deepSerialize (line 272) | function deepSerialize(extraData){
function fileUploadXhr (line 288) | function fileUploadXhr(a) {
function fileUploadIframe (line 350) | function fileUploadIframe(a) {
function doAjaxSubmit (line 885) | function doAjaxSubmit(e) {
function captureSubmittingElement (line 894) | function captureSubmittingElement(e) {
function log (line 1264) | function log() {
FILE: miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/uploadify/jquery.uploadify.js
function f (line 13) | function f(){if(J){return;}try{var Z=j.getElementsByTagName("body")[0].a...
function K (line 14) | function K(X){if(J){X();}else{U[U.length]=X;}}
function s (line 14) | function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load"...
function h (line 16) | function h(){if(T){V();}else{H();}}
function V (line 16) | function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);
function H (line 19) | function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[a...
function z (line 23) | function z(aa){var X=null;
function A (line 24) | function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312);
function P (line 25) | function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X...
function p (line 29) | function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");
function g (line 31) | function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML...
function u (line 33) | function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X;}if(aa){if...
function e (line 37) | function e(Z,X,Y){var aa=C("param");
function y (line 38) | function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.s...
function b (line 39) | function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function...
function c (line 40) | function c(Z){var X=null;try{X=j.getElementById(Z);}catch(Y){}return X;}
function C (line 40) | function C(X){return j.createElement(X);}
function i (line 40) | function i(Z,X,Y){Z.attachEvent(X,Y);
function F (line 41) | function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=pars...
function v (line 42) | function v(ac,Y,ad,ab){if(M.ie&&M.mac){return;}var aa=j.getElementsByTag...
function w (line 45) | function w(Z,X){if(!m){return;}var Y=X?"visible":"hidden";if(J&&c(Z)){c(...
function L (line 45) | function L(Y){var Z=/[\\\"<>\.;]/;
FILE: miaosha-order/miaosha-order-api/src/main/java/com/geekq/api/entity/Goods.java
class Goods (line 8) | @Setter
FILE: miaosha-order/miaosha-order-api/src/main/java/com/geekq/api/entity/GoodsVoOrder.java
class GoodsVoOrder (line 12) | @Setter
FILE: miaosha-order/miaosha-order-api/src/main/java/com/geekq/api/entity/MiaoshaGoods.java
class MiaoshaGoods (line 12) | @Setter
FILE: miaosha-order/miaosha-order-api/src/main/java/com/geekq/api/service/GoodsService.java
type GoodsService (line 11) | public interface GoodsService {
method listGoodsVo (line 18) | public ResultGeekQOrder<List<GoodsVoOrder>> listGoodsVo();
method getGoodsVoByGoodsId (line 26) | public ResultGeekQOrder<GoodsVoOrder> getGoodsVoByGoodsId(long goodsId);
method reduceStock (line 33) | public boolean reduceStock(GoodsVoOrder goods);
FILE: miaosha-order/miaosha-order-api/src/main/java/com/geekq/api/service/GoodsServiceMock.java
class GoodsServiceMock (line 13) | @Service
method listGoodsVo (line 15) | @Override
method getGoodsVoByGoodsId (line 23) | @Override
method reduceStock (line 28) | @Override
FILE: miaosha-order/miaosha-order-api/src/main/java/com/geekq/api/utils/AbstractResultOrder.java
class AbstractResultOrder (line 4) | public class AbstractResultOrder {
method AbstractResultOrder (line 9) | protected AbstractResultOrder() {
method AbstractResultOrder (line 12) | protected AbstractResultOrder(ResultStatusOrder status, String message) {
method AbstractResultOrder (line 18) | protected AbstractResultOrder(ResultStatusOrder status) {
method isSuccess (line 24) | public static boolean isSuccess(AbstractResultOrder result) {
method withError (line 28) | public AbstractResultOrder withError(ResultStatusOrder status) {
method withError (line 33) | public AbstractResultOrder withError(String message) {
method withError (line 39) | public AbstractResultOrder withError(int code, String message) {
method success (line 45) | public AbstractResultOrder success() {
method getStatus (line 50) | public ResultStatusOrder getStatus() {
method getMessage (line 54) | public String getMessage() {
method getCode (line 58) | public int getCode() {
method setCode (line 62) | public void setCode(int code) {
FILE: miaosha-order/miaosha-order-api/src/main/java/com/geekq/api/utils/ResultGeekQOrder.java
class ResultGeekQOrder (line 6) | public class ResultGeekQOrder<T> extends AbstractResultOrder implements ...
method ResultGeekQOrder (line 11) | protected ResultGeekQOrder() {
method ResultGeekQOrder (line 14) | protected ResultGeekQOrder(ResultStatusOrder status, String message) {
method ResultGeekQOrder (line 18) | protected ResultGeekQOrder(ResultStatusOrder status) {
method build (line 22) | public static <T> ResultGeekQOrder<T> build() {
method build (line 26) | public static <T> ResultGeekQOrder<T> build(String message) {
method error (line 30) | public static <T> ResultGeekQOrder<T> error(ResultStatusOrder status) {
method getData (line 34) | public T getData() {
method setData (line 38) | public void setData(T data) {
method getCount (line 42) | public Integer getCount() {
method setCount (line 46) | public void setCount(Integer count) {
method success (line 50) | public void success(T value) {
FILE: miaosha-order/miaosha-order-api/src/main/java/com/geekq/api/utils/ResultStatusOrder.java
type ResultStatusOrder (line 14) | public enum ResultStatusOrder {
method ResultStatusOrder (line 69) | private ResultStatusOrder(int code, String message) {
method ResultStatusOrder (line 74) | private ResultStatusOrder(Object... args) {
method getCode (line 78) | public int getCode() {
method setCode (line 82) | public void setCode(int code) {
method getMessage (line 86) | public String getMessage() {
method setMessage (line 90) | public void setMessage(String message) {
method getName (line 94) | public String getName() {
method getOutputName (line 98) | public String getOutputName() {
method toString (line 102) | public String toString() {
FILE: miaosha-order/miaosha-order-provider/src/main/java/com/geekq/provider/DubboProviderApplication.java
class DubboProviderApplication (line 15) | @ImportResource(value = {"classpath:provider.xml"})
method main (line 20) | public static void main(String[] args) {
FILE: miaosha-order/miaosha-order-provider/src/main/java/com/geekq/provider/mapper/GoodsMapper.java
type GoodsMapper (line 12) | public interface GoodsMapper {
method listGoodsVo (line 14) | public List<GoodsVoOrder> listGoodsVo();
method getGoodsVoByGoodsId (line 16) | public GoodsVoOrder getGoodsVoByGoodsId(@Param("goodsId") long goodsId);
method reduceStock (line 18) | public int reduceStock(MiaoshaGoods g);
FILE: miaosha-order/miaosha-order-provider/src/main/java/com/geekq/provider/service/impl/GoodsGroupServiceImpl.java
class GoodsGroupServiceImpl (line 13) | @Service("goodGroupService")
method listGoodsVo (line 15) | @Override
method getGoodsVoByGoodsId (line 22) | @Override
method reduceStock (line 28) | @Override
FILE: miaosha-order/miaosha-order-provider/src/main/java/com/geekq/provider/service/impl/GoodsServiceImpl.java
class GoodsServiceImpl (line 19) | @Service("goodsService")
method listGoodsVo (line 28) | @Override
method getGoodsVoByGoodsId (line 41) | @Override
method reduceStock (line 55) | @Override
FILE: miaosha-order/miaosha-order-provider/src/test/java/com/geekq/provider/DubboProviderApplicationTests.java
class DubboProviderApplicationTests (line 8) | @RunWith(SpringRunner.class)
method contextLoads (line 12) | @Test
FILE: miaosha-rpc/dubbo-api/src/main/java/com/geekq/dubbo/springboot/CapAccountTradeOrderService.java
type CapAccountTradeOrderService (line 10) | public interface CapAccountTradeOrderService {
method getCapAccountByUserId (line 11) | BigDecimal getCapAccountByUserId(Long userId);
method record (line 13) | public String record(CapitalTradeOrderDto tradeOrderDto);
FILE: miaosha-rpc/dubbo-api/src/main/java/com/geekq/dubbo/springboot/ServiceAPI.java
type ServiceAPI (line 3) | public interface ServiceAPI {
method sendMessage (line 5) | String sendMessage(String message);
method isTrueSeats (line 20) | boolean isTrueSeats(String seats);
method isNotSold (line 23) | boolean isNotSold(String seats);
method saveOrder (line 26) | String saveOrder(String fieldId, String seats, String seatsNum);
FILE: miaosha-rpc/dubbo-api/src/main/java/dto/CapitalTradeOrderDto.java
class CapitalTradeOrderDto (line 9) | public class CapitalTradeOrderDto implements Serializable {
method getSelfUserId (line 23) | public long getSelfUserId() {
method setSelfUserId (line 27) | public void setSelfUserId(long selfUserId) {
method getOppositeUserId (line 31) | public long getOppositeUserId() {
method setOppositeUserId (line 35) | public void setOppositeUserId(long oppositeUserId) {
method getOrderTitle (line 39) | public String getOrderTitle() {
method setOrderTitle (line 43) | public void setOrderTitle(String orderTitle) {
method getMerchantOrderNo (line 47) | public String getMerchantOrderNo() {
method setMerchantOrderNo (line 51) | public void setMerchantOrderNo(String merchantOrderNo) {
method getAmount (line 55) | public BigDecimal getAmount() {
method setAmount (line 59) | public void setAmount(BigDecimal amount) {
FILE: miaosha-rpc/dubbo-api/src/test/java/com/geekq/dubbo/springboot/AppTest.java
class AppTest (line 10) | public class AppTest {
method shouldAnswerWithTrue (line 14) | @Test
FILE: miaosha-rpc/dubbo-consumer/src/main/java/com/geekq/dubbo/springboot/consumer/ConsumerApplication.java
class ConsumerApplication (line 9) | @SpringBootApplication
method main (line 13) | public static void main(String[] args) {
FILE: miaosha-rpc/dubbo-consumer/src/main/java/com/geekq/dubbo/springboot/consumer/config/TCCConfig.java
class TCCConfig (line 5) | @Configuration
FILE: miaosha-rpc/dubbo-consumer/src/main/java/com/geekq/dubbo/springboot/consumer/quickstart/QuickstartConsumer.java
class QuickstartConsumer (line 7) | public class QuickstartConsumer {
method sendMessage (line 12) | public void sendMessage(String message) {
FILE: miaosha-rpc/dubbo-consumer/src/main/java/com/geekq/dubbo/springboot/consumer/transaction/TransactionConsumer.java
class TransactionConsumer (line 7) | @Component
method sendMessage (line 13) | public void sendMessage(String message) {
method confirmSendMessage (line 27) | public void confirmSendMessage(String message) {
method cancelSendMessage (line 32) | public void cancelSendMessage(String message) {
FILE: miaosha-rpc/dubbo-provider/src/main/java/com/geekq/dubbo/springboot/privoder/PrivoderApplication.java
class PrivoderApplication (line 7) | @SpringBootApplication
method main (line 11) | public static void main(String[] args) {
FILE: miaosha-rpc/dubbo-provider/src/main/java/com/geekq/dubbo/springboot/privoder/config/TCCConfig.java
class TCCConfig (line 5) | @Configuration
FILE: miaosha-rpc/dubbo-provider/src/main/java/com/geekq/dubbo/springboot/privoder/quickstart/QuickstartServiceImpl.java
class QuickstartServiceImpl (line 8) | public class QuickstartServiceImpl implements ServiceAPI {
method sendMessage (line 10) | @Override
method isTrueSeats (line 15) | @Override
method isNotSold (line 20) | @Override
method saveOrder (line 25) | @Override
FILE: miaosha-rpc/dubbo-provider/src/main/java/com/geekq/dubbo/springboot/privoder/transaction/CapServiceImpl.java
class CapServiceImpl (line 9) | public class CapServiceImpl implements CapAccountTradeOrderService {
method getCapAccountByUserId (line 11) | @Override
method record (line 16) | @Override
FILE: miaosha-rpc/dubbo-provider/src/main/java/com/geekq/dubbo/springboot/privoder/transaction/TransactionServiceImpl.java
class TransactionServiceImpl (line 7) | @Component
method sendMessage (line 11) | @Override
method isTrueSeats (line 21) | @Override
method isNotSold (line 30) | public boolean isNotSold(String seats) {
method saveOrder (line 41) | public String saveOrder(String fieldId, String seats, String seatsNum) {
method confirmSaveOrder (line 46) | public String confirmSaveOrder(String fieldId, String seats, String se...
method cancelSaveOrder (line 51) | public String cancelSaveOrder(String fieldId, String seats, String sea...
method confirmSendMessage (line 56) | public String confirmSendMessage(String message) {
method cancelSendMessage (line 61) | public String cancelSendMessage(String message) {
method confirmIsTrueSeats (line 66) | public boolean confirmIsTrueSeats(String seats) {
method cancelIsTrueSeats (line 71) | public boolean cancelIsTrueSeats(String seats) {
method confirmIsNotSold (line 76) | public boolean confirmIsNotSold(String seats) {
method cancelIsNotSold (line 81) | public boolean cancelIsNotSold(String seats) {
FILE: miaosha-rpc/src/main/java/com/mooc/jiangzh/dubbo/springboot/springbootdubbo/SpringbootDubboApplication.java
class SpringbootDubboApplication (line 6) | @SpringBootApplication
method main (line 9) | public static void main(String[] args) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/GeekQMainApplication.java
class GeekQMainApplication (line 8) | @SpringBootApplication
method main (line 12) | public static void main(String[] args) throws Exception {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/access/AccessInterceptor.java
class AccessInterceptor (line 25) | @Service
method preHandle (line 36) | @Override
method afterCompletion (line 82) | @Override
method render (line 88) | private void render(HttpServletResponse response, ResultStatus cm) thr...
method getUser (line 97) | private MiaoshaUser getUser(HttpServletRequest request, HttpServletRes...
method getCookieValue (line 107) | private String getCookieValue(HttpServletRequest request, String cooki...
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/access/AccessKey.java
class AccessKey (line 5) | public class AccessKey extends BasePrefix {
method AccessKey (line 7) | private AccessKey(int expireSeconds, String prefix) {
method withExpire (line 11) | public static AccessKey withExpire(int expireSeconds) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/access/UserContext.java
class UserContext (line 5) | public class UserContext {
method getUser (line 9) | public static MiaoshaUser getUser() {
method setUser (line 13) | public static void setUser(MiaoshaUser user) {
method removeUser (line 17) | public static void removeUser() {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/common/Constanst.java
class Constanst (line 3) | public class Constanst {
type orderStaus (line 9) | public enum orderStaus {
method orderStaus (line 14) | orderStaus(String name) {
method getName (line 18) | public String getName() {
method setName (line 22) | public void setName(String name) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/common/SnowflakeIdWorker.java
class SnowflakeIdWorker (line 15) | public class SnowflakeIdWorker {
method SnowflakeIdWorker (line 96) | public SnowflakeIdWorker(long workerId, long datacenterId) {
method getOrderId (line 114) | public static long getOrderId(long workerId, long datacenterId) {
method nextId (line 124) | public synchronized long nextId() {
method tilNextMillis (line 163) | protected long tilNextMillis(long lastTimestamp) {
method timeGen (line 178) | protected long timeGen() {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/common/enums/MessageStatus.java
class MessageStatus (line 3) | public class MessageStatus {
type messageType (line 10) | public enum messageType {
method messageType (line 16) | private messageType(String message) {
method getMessage (line 20) | public String getMessage() {
type ContentEnum (line 28) | public enum ContentEnum {
method ContentEnum (line 36) | private ContentEnum(int code, String message) {
method getCode (line 41) | public int getCode() {
method getMessage (line 45) | public String getMessage() {
type sendType (line 53) | public enum sendType {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/common/enums/ResultStatus.java
type ResultStatus (line 14) | public enum ResultStatus {
method ResultStatus (line 68) | private ResultStatus(int code, String message) {
method ResultStatus (line 73) | private ResultStatus(Object... args) {
method getCode (line 77) | public int getCode() {
method setCode (line 81) | public void setCode(int code) {
method getMessage (line 85) | public String getMessage() {
method setMessage (line 89) | public void setMessage(String message) {
method getName (line 93) | public String getName() {
method getOutputName (line 97) | public String getOutputName() {
method toString (line 101) | public String toString() {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/common/resultbean/AbstractResult.java
class AbstractResult (line 5) | public class AbstractResult {
method AbstractResult (line 10) | protected AbstractResult(ResultStatus status, String message) {
method AbstractResult (line 16) | protected AbstractResult(ResultStatus status) {
method isSuccess (line 22) | public static boolean isSuccess(AbstractResult result) {
method withError (line 26) | public AbstractResult withError(ResultStatus status) {
method withError (line 31) | public AbstractResult withError(String message) {
method withError (line 37) | public AbstractResult withError(int code, String message) {
method success (line 43) | public AbstractResult success() {
method getStatus (line 48) | public ResultStatus getStatus() {
method getMessage (line 52) | public String getMessage() {
method getCode (line 56) | public int getCode() {
method setCode (line 60) | public void setCode(int code) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/common/resultbean/ResultGeekQ.java
class ResultGeekQ (line 7) | public class ResultGeekQ<T> extends AbstractResult implements Serializab...
method ResultGeekQ (line 12) | protected ResultGeekQ(ResultStatus status, String message) {
method ResultGeekQ (line 16) | protected ResultGeekQ(ResultStatus status) {
method build (line 20) | public static <T> ResultGeekQ<T> build() {
method build (line 24) | public static <T> ResultGeekQ<T> build(String message) {
method error (line 28) | public static <T> ResultGeekQ<T> error(ResultStatus status) {
method getData (line 32) | public T getData() {
method setData (line 36) | public void setData(T data) {
method getCount (line 40) | public Integer getCount() {
method setCount (line 44) | public void setCount(Integer count) {
method success (line 48) | public void success(T value) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/config/DruidConfig.java
class DruidConfig (line 13) | @Configuration
method druidSverlet (line 36) | @Bean
method druidDataSource (line 48) | @Bean
method getUrl (line 75) | public String getUrl() {
method setUrl (line 79) | public void setUrl(String url) {
method getUsername (line 83) | public String getUsername() {
method setUsername (line 87) | public void setUsername(String username) {
method getPassword (line 91) | public String getPassword() {
method setPassword (line 95) | public void setPassword(String password) {
method getDriverClassName (line 99) | public String getDriverClassName() {
method setDriverClassName (line 103) | public void setDriverClassName(String driverClassName) {
method getType (line 107) | public String getType() {
method setType (line 111) | public void setType(String type) {
method getFilters (line 115) | public String getFilters() {
method setFilters (line 119) | public void setFilters(String filters) {
method getMaxActive (line 123) | public int getMaxActive() {
method setMaxActive (line 127) | public void setMaxActive(int maxActive) {
method getInitialSize (line 131) | public int getInitialSize() {
method setInitialSize (line 135) | public void setInitialSize(int initialSize) {
method getMinIdle (line 139) | public int getMinIdle() {
method setMinIdle (line 143) | public void setMinIdle(int minIdle) {
method getMaxWait (line 147) | public long getMaxWait() {
method setMaxWait (line 151) | public void setMaxWait(long maxWait) {
method getTimeBetweenEvictionRunsMillis (line 155) | public long getTimeBetweenEvictionRunsMillis() {
method setTimeBetweenEvictionRunsMillis (line 159) | public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionR...
method getMinEvictableIdleTimeMillis (line 163) | public long getMinEvictableIdleTimeMillis() {
method setMinEvictableIdleTimeMillis (line 167) | public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMil...
method getValidationQuery (line 171) | public String getValidationQuery() {
method setValidationQuery (line 175) | public void setValidationQuery(String validationQuery) {
method isTestWhileIdle (line 179) | public boolean isTestWhileIdle() {
method setTestWhileIdle (line 183) | public void setTestWhileIdle(boolean testWhileIdle) {
method isTestOnBorrow (line 187) | public boolean isTestOnBorrow() {
method setTestOnBorrow (line 191) | public void setTestOnBorrow(boolean testOnBorrow) {
method isTestOnReturn (line 195) | public boolean isTestOnReturn() {
method setTestOnReturn (line 199) | public void setTestOnReturn(boolean testOnReturn) {
method isPoolPreparedStatements (line 203) | public boolean isPoolPreparedStatements() {
method setPoolPreparedStatements (line 207) | public void setPoolPreparedStatements(boolean poolPreparedStatements) {
method getMaxOpenPreparedStatements (line 211) | public int getMaxOpenPreparedStatements() {
method setMaxOpenPreparedStatements (line 215) | public void setMaxOpenPreparedStatements(int maxOpenPreparedStatements) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/config/UserArgumentResolver.java
class UserArgumentResolver (line 14) | @Service
method supportsParameter (line 20) | @Override
method resolveArgument (line 26) | @Override
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/config/WebConfig.java
class WebConfig (line 12) | @Configuration
method addInterceptors (line 21) | @Override
method addArgumentResolvers (line 27) | @Override
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/controller/BaseController.java
class BaseController (line 17) | @Controller
method out (line 29) | public static void out(HttpServletResponse res, String html) {
method render (line 42) | public String render(HttpServletRequest request, HttpServletResponse r...
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/controller/GoodsController.java
class GoodsController (line 28) | @Controller
method list (line 48) | @RequestMapping(value = "/to_list", produces = "text/html")
method detail2 (line 57) | @RequestMapping(value = "/to_detail2/{goodsId}", produces = "text/html")
method detail (line 98) | @RequestMapping(value = "/detail/{goodsId}")
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/controller/LoginController.java
class LoginController (line 21) | @Controller
method tologin (line 30) | @Reference
method dologin (line 42) | @RequestMapping("/do_login")
method createToken (line 52) | @RequestMapping("/create_token")
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/controller/MiaoShaMessageController.java
class MiaoShaMessageController (line 19) | @Controller
method list (line 28) | @RequestMapping(value = "/list", produces = "text/html")
method getNewMessage (line 42) | @RequestMapping(value = "/getNewMessage", produces = "text/html")
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/controller/MiaoshaController.java
class MiaoshaController (line 34) | @Controller
method miaosha (line 65) | @AccessLimit(seconds = 5, maxCount = 5, needLogin = true)
method miaoshaResult (line 123) | @AccessLimit(seconds = 5, maxCount = 5, needLogin = true)
method getMiaoshaPath (line 139) | @AccessLimit(seconds = 5, maxCount = 5, needLogin = true)
method getMiaoshaVerifyCod (line 161) | @RequestMapping(value = "/verifyCodeRegister", method = RequestMethod....
method getMiaoshaVerifyCod (line 180) | @RequestMapping(value = "/verifyCode", method = RequestMethod.GET)
method afterPropertiesSet (line 208) | @Override
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/controller/OrderController.java
class OrderController (line 22) | @Controller
method info (line 38) | @RequestMapping("/detail")
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/controller/RegisterController.java
class RegisterController (line 19) | @Controller
method registerIndex (line 30) | @RequestMapping("/do_register")
method register (line 43) | @RequestMapping("/register")
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/dao/GoodsDao.java
type GoodsDao (line 12) | @Mapper
method listGoodsVo (line 15) | @Select("select g.*,mg.stock_count, mg.start_date, mg.end_date,mg.miao...
method getGoodsVoByGoodsId (line 18) | @Select("select g.*,mg.stock_count, mg.start_date, mg.end_date,mg.miao...
method reduceStock (line 21) | @Update("update miaosha_goods set stock_count = stock_count - 1 where ...
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/dao/MiaoShaMessageDao.java
type MiaoShaMessageDao (line 9) | @Mapper
method listMiaoShaMessage (line 12) | @Select("select * from miaosha_message where messageid = #{messageid}...
method listMiaoShaMessageUser (line 15) | @Select("<script>select * from miaosha_message_user where 1=1 <if test...
method insertMiaoShaMessage (line 18) | @Insert("insert into miaosha_message (id , messageid ,content , create...
method insertMiaoShaMessageUser (line 23) | @Insert("insert into miaosha_message_user (id , userid ,messageid , go...
method listMiaoShaMessageByUserId (line 29) | @Select(" <script> select * from miaosha_message_user mmu , miaosha_me...
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/dao/MiaoShaUserDao.java
type MiaoShaUserDao (line 6) | @Mapper
method getByNickname (line 9) | @Select("select * from miaosha_user where nickname = #{nickname}")
method getById (line 12) | @Select("select * from miaosha_user where id = #{id}")
method update (line 16) | @Update("update miaosha_user set password = #{password} where id = #{i...
method insertMiaoShaUser (line 20) | @Insert("insert into miaosha_user (id , nickname ,password , salt ,hea...
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/dao/OrderDao.java
type OrderDao (line 9) | @Mapper
method getMiaoshaOrderByUserIdGoodsId (line 12) | @Select("select * from miaosha_order where user_id=#{userNickName} and...
method insert (line 15) | @Insert("insert into order_info(user_id, goods_id, goods_name, goods_c...
method insertMiaoshaOrder (line 20) | @Insert("insert into miaosha_order (user_id, goods_id, order_id)values...
method getOrderById (line 23) | @Select("select * from order_info where id = #{orderId}")
method selectOrderStatusByCreateTime (line 26) | @Select("select * from order_info where status=#{status} and create_Da...
method closeOrderByOrderInfo (line 29) | @Select("update order_info set status=0 where id=#{id}")
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/dao/UserDao.java
type UserDao (line 9) | @Mapper
method getById (line 12) | @Select("select * from user where id = #{id}")
method insert (line 15) | @Insert("insert into user (id, name) values(#{id}, #{name})")
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/domain/Goods.java
class Goods (line 8) | @Setter
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/domain/MiaoShaMessageInfo.java
class MiaoShaMessageInfo (line 15) | @Setter
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/domain/MiaoShaMessageUser.java
class MiaoShaMessageUser (line 14) | @Setter
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/domain/MiaoshaGoods.java
class MiaoshaGoods (line 10) | @Setter
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/domain/MiaoshaOrder.java
class MiaoshaOrder (line 8) | @Setter
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/domain/MiaoshaUser.java
class MiaoshaUser (line 10) | @Setter
method toString (line 25) | @Override
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/domain/OrderInfo.java
class OrderInfo (line 10) | @Setter
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/domain/User.java
class User (line 8) | @Setter
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/exception/GlobleException.java
class GlobleException (line 5) | public class GlobleException extends RuntimeException {
method GlobleException (line 10) | public GlobleException(ResultStatus status) {
method getStatus (line 15) | public ResultStatus getStatus() {
method setStatus (line 19) | public void setStatus(ResultStatus status) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/exception/GlobleExceptionHandler.java
class GlobleExceptionHandler (line 23) | @ControllerAdvice
method exceptionHandler (line 29) | @ExceptionHandler(value = Exception.class)
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/mybatis/Mapper/UserMapper.java
type UserMapper (line 12) | @Mapper
method getUser (line 15) | public User getUser(Integer id);
method insert (line 17) | public int insert(User user);
method update (line 19) | public int update(User user);
method delete (line 21) | public int delete(Integer id);
method getUserList (line 30) | public List<User> getUserList(@Param("id") Integer id, @Param("name") ...
method getUserListMap (line 39) | public List<User> getUserListMap(@Param("id") Integer id, @Param("name...
method getTeacherAndUser (line 41) | public List<TeacherVo> getTeacherAndUser(@Param("uId") Integer uId);
method getTeacherAndUserList (line 43) | public List<TeacherVo> getTeacherAndUserList(@Param("uId") List<Intege...
method getTeacherAndUserListVo (line 45) | public List<TeacherListVo> getTeacherAndUserListVo(@Param("uId") Integ...
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/mybatis/controller/UbatisController.java
class UbatisController (line 15) | @Controller
method testMybatis (line 23) | @RequestMapping(value = "/testUser", produces = "text/html")
method testSelectUser (line 30) | @RequestMapping(value = "/testSelectLIst", produces = "text/html")
method testInsert (line 37) | @RequestMapping(value = "/testInsert", produces = "text/html")
method testUpdate (line 49) | @RequestMapping(value = "/testUpdate", produces = "text/html")
method testDelete (line 62) | @RequestMapping(value = "/testDelete", produces = "text/html")
method testTandU (line 73) | @RequestMapping(value = "/testTandU", produces = "text/html")
method testTandUIn (line 84) | @RequestMapping(value = "/testTandUIn", produces = "text/html")
method testAssc (line 98) | @RequestMapping(value = "/testAssc", produces = "text/html")
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/mybatis/entity/User.java
class User (line 10) | @Setter
method toString (line 20) | @Override
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/mybatis/vo/TeacherListVo.java
class TeacherListVo (line 9) | @Setter
method toString (line 22) | @Override
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/mybatis/vo/TeacherVo.java
class TeacherVo (line 8) | @Setter
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/rabbitmq/MQConfig.java
class MQConfig (line 10) | @Configuration
method queue (line 36) | @Bean
method topicQueue1 (line 44) | @Bean
method topicQueue2 (line 49) | @Bean
method topicExchage (line 54) | @Bean
method topicBinding1 (line 59) | @Bean
method topicBinding2 (line 64) | @Bean
method fanoutExchage (line 72) | @Bean
method FanoutBinding1 (line 77) | @Bean
method FanoutBinding2 (line 82) | @Bean
method headersExchage (line 90) | @Bean
method headerQueue1 (line 95) | @Bean
method headerBinding (line 100) | @Bean
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/rabbitmq/MQReceiver.java
class MQReceiver (line 22) | @Service
method receive (line 42) | @RabbitListener(queues = MQConfig.MIAOSHA_QUEUE)
method receiveMiaoShaMessage (line 64) | @RabbitListener(queues = MQConfig.MIAOSHATEST)
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/rabbitmq/MQSender.java
class MQSender (line 12) | @Service
method sendMiaoshaMessage (line 23) | public void sendMiaoshaMessage(MiaoshaMessage mm) {
method sendMessage (line 34) | public void sendMessage(MiaoshaMessage mm) {
method sendRegisterMessage (line 45) | public void sendRegisterMessage(MiaoShaMessageVo miaoShaMessageVo) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/rabbitmq/MiaoshaMessage.java
class MiaoshaMessage (line 5) | public class MiaoshaMessage {
method getUser (line 9) | public MiaoshaUser getUser() {
method setUser (line 13) | public void setUser(MiaoshaUser user) {
method getGoodsId (line 17) | public long getGoodsId() {
method setGoodsId (line 21) | public void setGoodsId(long goodsId) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/BasePrefix.java
class BasePrefix (line 3) | public abstract class BasePrefix implements KeyPrefix {
method BasePrefix (line 9) | public BasePrefix(int expireSeconds, String prefix) {
method BasePrefix (line 15) | public BasePrefix(String prefix) {
method expireSeconds (line 19) | @Override
method getPrefix (line 29) | @Override
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/DistributedLocker.java
type DistributedLocker (line 5) | public interface DistributedLocker {
method lock (line 7) | void lock(String lockKey);
method unlock (line 9) | void unlock(String lockKey);
method lock (line 11) | void lock(String lockKey, int timeout);
method lock (line 13) | void lock(String lockKey, TimeUnit unit, int timeout);
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/GoodsKey.java
class GoodsKey (line 3) | public class GoodsKey extends BasePrefix {
method GoodsKey (line 8) | private GoodsKey(int expireSeconds, String prefix) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/KeyPrefix.java
type KeyPrefix (line 3) | public interface KeyPrefix {
method expireSeconds (line 5) | public int expireSeconds();
method getPrefix (line 7) | public String getPrefix();
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/MiaoShaUserKey.java
class MiaoShaUserKey (line 3) | public class MiaoShaUserKey extends BasePrefix {
method MiaoShaUserKey (line 8) | public MiaoShaUserKey(int expireSeconds, String prefix) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/MiaoshaKey.java
class MiaoshaKey (line 3) | public class MiaoshaKey extends BasePrefix {
method MiaoshaKey (line 9) | private MiaoshaKey(int expireSeconds, String prefix) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/OrderKey.java
class OrderKey (line 3) | public class OrderKey extends BasePrefix {
method OrderKey (line 8) | public OrderKey(String prefix) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/RedisConfig.java
class RedisConfig (line 6) | @Component
method getHost (line 17) | public String getHost() {
method setHost (line 21) | public void setHost(String host) {
method getPort (line 25) | public int getPort() {
method setPort (line 29) | public void setPort(int port) {
method getTimeout (line 33) | public int getTimeout() {
method setTimeout (line 37) | public void setTimeout(int timeout) {
method getPassword (line 41) | public String getPassword() {
method setPassword (line 45) | public void setPassword(String password) {
method getPoolMaxTotal (line 49) | public int getPoolMaxTotal() {
method setPoolMaxTotal (line 53) | public void setPoolMaxTotal(int poolMaxTotal) {
method getPoolMaxIdle (line 57) | public int getPoolMaxIdle() {
method setPoolMaxIdle (line 61) | public void setPoolMaxIdle(int poolMaxIdle) {
method getPoolMaxWait (line 65) | public int getPoolMaxWait() {
method setPoolMaxWait (line 69) | public void setPoolMaxWait(int poolMaxWait) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/RedisPoolFactory.java
class RedisPoolFactory (line 9) | @Service
method JedisPoolFactory (line 15) | @Bean
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/RedisService.java
class RedisService (line 15) | @Service
method beanToString (line 22) | public static <T> String beanToString(T value) {
method stringToBean (line 38) | @SuppressWarnings("unchecked")
method setnx (line 61) | public Long setnx(String key, String value) {
method expire (line 84) | public Long expire(String key, int exTime) {
method get (line 102) | public <T> T get(KeyPrefix prefix, String key, Class<T> clazz) {
method get (line 116) | public String get(String key) {
method getset (line 131) | public String getset(String key, String value) {
method set (line 149) | public <T> boolean set(KeyPrefix prefix, String key, T value) {
method exists (line 174) | public <T> boolean exists(KeyPrefix prefix, String key) {
method delete (line 189) | public boolean delete(KeyPrefix prefix, String key) {
method incr (line 205) | public <T> Long incr(KeyPrefix prefix, String key) {
method decr (line 220) | public <T> Long decr(KeyPrefix prefix, String key) {
method del (line 232) | public Long del(String key) {
method delete (line 247) | public boolean delete(KeyPrefix prefix) {
method scanKeys (line 270) | public List<String> scanKeys(String key) {
method returnToPool (line 296) | private void returnToPool(Jedis jedis) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/RedissLockUtil.java
class RedissLockUtil (line 8) | public class RedissLockUtil {
method setLocker (line 11) | public static void setLocker(DistributedLocker locker) {
method lock (line 15) | public static void lock(String lockKey) {
method unlock (line 19) | public static void unlock(String lockKey) {
method lock (line 29) | public static void lock(String lockKey, int timeout) {
method lock (line 40) | public static void lock(String lockKey, TimeUnit unit, int timeout) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/Userkey.java
class Userkey (line 3) | public class Userkey extends BasePrefix {
method Userkey (line 8) | private Userkey(String prefix) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/redismanager/OptimisticLockTest.java
class OptimisticLockTest (line 16) | public class OptimisticLockTest {
method main (line 17) | public static void main(String[] args) throws InterruptedException {
method printResult (line 33) | public static void printResult() {
method initClient (line 48) | public static void initClient() {
method initPrduct (line 72) | public static void initPrduct() {
class ClientThread (line 97) | class ClientThread implements Runnable {
method ClientThread (line 103) | public ClientThread(int num) {
method run (line 108) | public void run() {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/redismanager/RedisLock.java
class RedisLock (line 9) | public class RedisLock {
method getLock (line 11) | public String getLock(String key, int timeOut) {
method releaseLock (line 38) | public boolean releaseLock(String key, String value) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/redismanager/RedisLua.java
class RedisLua (line 13) | public class RedisLua {
method getLuaLimit (line 20) | public static void getLuaLimit() {
method getVistorCount (line 50) | public static Object getVistorCount(String key) {
method vistorCount (line 76) | public static void vistorCount(String key) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/redismanager/RedisManager.java
class RedisManager (line 7) | public class RedisManager {
method getJedis (line 18) | public static Jedis getJedis() throws Exception {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/redismanager/RedisUtil.java
class RedisUtil (line 13) | public class RedisUtil {
method RedisUtil (line 21) | private RedisUtil() {
method main (line 35) | public static void main(String[] args) {
method getInstance (line 41) | public static RedisUtil getInstance() {
method returnResource (line 45) | public static void returnResource(JedisPool pool, Jedis jedis) {
method returnResource (line 51) | public static void returnResource(Jedis jedis) {
method getJedis (line 57) | public Jedis getJedis() {
method get (line 62) | public String get(String key) {
method set (line 76) | public String set(String key, String value) {
method del (line 90) | public Long del(String... keys) {
method append (line 104) | public Long append(String key, String str) {
method exists (line 120) | public Boolean exists(String key) {
method setnx (line 134) | public Long setnx(String key, String value) {
method setex (line 148) | public String setex(String key, String value, int seconds) {
method setrange (line 163) | public Long setrange(String key, String str, int offset) {
method mget (line 177) | public List<String> mget(String... keys) {
method mset (line 192) | public String mset(String... keysvalues) {
method msetnx (line 207) | public Long msetnx(String... keysvalues) {
method getset (line 222) | public String getset(String key, String value) {
method getrange (line 237) | public String getrange(String key, int startOffset, int endOffset) {
method incr (line 252) | public Long incr(String key) {
method incrBy (line 267) | public Long incrBy(String key, Long integer) {
method decr (line 282) | public Long decr(String key) {
method decrBy (line 297) | public Long decrBy(String key, Long integer) {
method serlen (line 312) | public Long serlen(String key) {
method hset (line 327) | public Long hset(String key, String field, String value) {
method hsetnx (line 342) | public Long hsetnx(String key, String field, String value) {
method hmset (line 357) | public String hmset(String key, Map<String, String> hash) {
method hget (line 372) | public String hget(String key, String field) {
method hmget (line 387) | public List<String> hmget(String key, String... fields) {
method hincrby (line 402) | public Long hincrby(String key, String field, Long value) {
method hexists (line 417) | public Boolean hexists(String key, String field) {
method hlen (line 432) | public Long hlen(String key) {
method hdel (line 448) | public Long hdel(String key, String... fields) {
method hkeys (line 463) | public Set<String> hkeys(String key) {
method hvals (line 478) | public List<String> hvals(String key) {
method hgetall (line 493) | public Map<String, String> hgetall(String key) {
method lpush (line 507) | public Long lpush(String key, String... strs) {
method rpush (line 522) | public Long rpush(String key, String... strs) {
method lset (line 537) | public String lset(String key, Long index, String value) {
method lrem (line 552) | public Long lrem(String key, long count, String value) {
method ltrim (line 567) | public String ltrim(String key, long start, long end) {
method lpop (line 582) | synchronized public String lpop(String key) {
method rpop (line 597) | synchronized public String rpop(String key) {
method rpoplpush (line 612) | public String rpoplpush(String srckey, String dstkey) {
method lindex (line 627) | public String lindex(String key, long index) {
method llen (line 642) | public Long llen(String key) {
method lrange (line 657) | public List<String> lrange(String key, long start, long end) {
method sadd (line 672) | public Long sadd(String key, String... members) {
method srem (line 687) | public Long srem(String key, String... members) {
method spop (line 702) | public String spop(String key) {
method sdiff (line 717) | public Set<String> sdiff(String... keys) {
method sdiffstore (line 732) | public Long sdiffstore(String dstkey, String... keys) {
method sinter (line 747) | public Set<String> sinter(String... keys) {
method sinterstore (line 762) | public Long sinterstore(String dstkey, String... keys) {
method sunion (line 777) | public Set<String> sunion(String... keys) {
method sunionstore (line 792) | public Long sunionstore(String dstkey, String... keys) {
method smove (line 807) | public Long smove(String srckey, String dstkey, String member) {
method scard (line 822) | public Long scard(String key) {
method sismember (line 837) | public Boolean sismember(String key, String member) {
method srandmember (line 852) | public String srandmember(String key) {
method smembers (line 867) | public Set<String> smembers(String key) {
method zadd (line 882) | public Long zadd(String key, double score, String member) {
method zrem (line 897) | public Long zrem(String key, String... members) {
method zincrby (line 912) | public Double zincrby(String key, double score, String member) {
method zrank (line 927) | public Long zrank(String key, String member) {
method zrevrank (line 942) | public Long zrevrank(String key, String member) {
method zrevrange (line 957) | public Set<String> zrevrange(String key, long start, long end) {
method zrangebyscore (line 972) | public Set<String> zrangebyscore(String key, String max, String min) {
method zrangeByScore (line 987) | public Set<String> zrangeByScore(String key, double max, double min) {
method zcount (line 1002) | public Long zcount(String key, String min, String max) {
method zcard (line 1017) | public Long zcard(String key) {
method zscore (line 1032) | public Double zscore(String key, String member) {
method zremrangeByRank (line 1047) | public Long zremrangeByRank(String key, long start, long end) {
method zremrangeByScore (line 1062) | public Long zremrangeByScore(String key, double start, double end) {
method keys (line 1077) | public Set<String> keys(String pattern) {
method type (line 1092) | public String type(String key) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/redis/redismanager/lua/RedisLuaLock.java
class RedisLuaLock (line 3) | public class RedisLuaLock {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/service/GoodsService.java
class GoodsService (line 11) | @Service
method listGoodsVo (line 18) | public List<GoodsVo> listGoodsVo() {
method getGoodsVoByGoodsId (line 22) | public GoodsVo getGoodsVoByGoodsId(long goodsId) {
method reduceStock (line 26) | public boolean reduceStock(GoodsVo goods) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/service/MiaoShaMessageService.java
class MiaoShaMessageService (line 14) | @Service
method getmessageUserList (line 20) | public List<MiaoShaMessageInfo> getmessageUserList(Long userId, Intege...
method insertMs (line 25) | @Transactional(rollbackFor = Exception.class)
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/service/MiaoShaUserService.java
class MiaoShaUserService (line 24) | @Service
method getByToken (line 40) | public MiaoshaUser getByToken(HttpServletResponse response, String tok...
method getByNickName (line 53) | public MiaoshaUser getByNickName(String nickName) {
method updatePassword (line 69) | public boolean updatePassword(String token, String nickName, String fo...
method register (line 88) | public boolean register(HttpServletResponse response, String userName,...
method login (line 112) | public boolean login(HttpServletResponse response, LoginVo loginVo) {
method createToken (line 137) | public String createToken(HttpServletResponse response, LoginVo loginV...
method addCookie (line 161) | private void addCookie(HttpServletResponse response, String token, Mia...
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/service/MiaoshaService.java
class MiaoshaService (line 21) | @Service
method calc (line 32) | private static int calc(String exp) {
method miaosha (line 44) | @Transactional
method getMiaoshaResult (line 57) | public long getMiaoshaResult(Long userId, long goodsId) {
method setGoodsOver (line 71) | private void setGoodsOver(Long goodsId) {
method getGoodsOver (line 75) | private boolean getGoodsOver(long goodsId) {
method checkPath (line 79) | public boolean checkPath(MiaoshaUser user, long goodsId, String path) {
method createMiaoshaPath (line 87) | public String createMiaoshaPath(MiaoshaUser user, long goodsId) {
method createVerifyCode (line 96) | public BufferedImage createVerifyCode(MiaoshaUser user, long goodsId) {
method checkVerifyCodeRegister (line 138) | public boolean checkVerifyCodeRegister(int verifyCode) {
method createVerifyCodeRegister (line 147) | public BufferedImage createVerifyCodeRegister() {
method checkVerifyCode (line 180) | public boolean checkVerifyCode(MiaoshaUser user, long goodsId, int ver...
method generateVerifyCode (line 195) | private String generateVerifyCode(Random rdm) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/service/OrderService.java
class OrderService (line 21) | @Service
method getMiaoshaOrderByUserIdGoodsId (line 30) | public MiaoshaOrder getMiaoshaOrderByUserIdGoodsId(long userId, long g...
method getOrderById (line 34) | public OrderInfo getOrderById(long orderId) {
method createOrder (line 38) | @Transactional
method closeOrder (line 60) | public void closeOrder(int hour) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/service/UserService.java
class UserService (line 8) | @Service
method getById (line 14) | public User getById(int id) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/service/rpchander/RpcCompensateService.java
class RpcCompensateService (line 7) | @Service
method recharge (line 11) | public ResultGeekQ<String> recharge() {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/service/rpchander/RpcHandler.java
type RpcHandler (line 3) | public interface RpcHandler {
method handele (line 7) | boolean handele();
method rollBack (line 9) | boolean rollBack();
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/service/rpchander/enums/PlanStepStatus.java
type PlanStepStatus (line 3) | public enum PlanStepStatus {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/service/rpchander/enums/PlanStepType.java
type PlanStepType (line 3) | public enum PlanStepType {
method PlanStepType (line 23) | PlanStepType(int priority, String handler) {
method getHandler (line 28) | public String getHandler() {
method setHandler (line 32) | public void setHandler(String handler) {
method getPriority (line 36) | public int getPriority() {
method setPriority (line 40) | public void setPriority(int priority) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/service/rpchander/vo/HandlerParam.java
class HandlerParam (line 3) | public class HandlerParam {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/service/rpchander/vo/PlanOrder.java
class PlanOrder (line 5) | public class PlanOrder {
method getId (line 30) | public Long getId() {
method setId (line 34) | public void setId(Long id) {
method getCreateTime (line 38) | public Date getCreateTime() {
method setCreateTime (line 42) | public void setCreateTime(Date createTime) {
method getUpdateTime (line 46) | public Date getUpdateTime() {
method setUpdateTime (line 50) | public void setUpdateTime(Date updateTime) {
method getVersion (line 54) | public Integer getVersion() {
method setVersion (line 58) | public void setVersion(Integer version) {
method getUserId (line 62) | public Integer getUserId() {
method setUserId (line 66) | public void setUserId(Integer userId) {
method getOrderNo (line 70) | public String getOrderNo() {
method setOrderNo (line 74) | public void setOrderNo(String orderNo) {
method getOrderId (line 78) | public Integer getOrderId() {
method setOrderId (line 82) | public void setOrderId(Integer orderId) {
method getAccountId (line 86) | public Integer getAccountId() {
method setAccountId (line 90) | public void setAccountId(Integer accountId) {
method getType (line 94) | public String getType() {
method setType (line 98) | public void setType(String type) {
method getCmbcStatus (line 102) | public String getCmbcStatus() {
method setCmbcStatus (line 106) | public void setCmbcStatus(String cmbcStatus) {
method getParams (line 110) | public String getParams() {
method setParams (line 114) | public void setParams(String params) {
method getStatus (line 118) | public String getStatus() {
method setStatus (line 122) | public void setStatus(String status) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/service/rpchander/vo/PlanStep.java
class PlanStep (line 5) | public class PlanStep {
method getId (line 26) | public Long getId() {
method setId (line 30) | public void setId(Long id) {
method getCreateTime (line 34) | public Date getCreateTime() {
method setCreateTime (line 38) | public void setCreateTime(Date createTime) {
method getUpdateTime (line 42) | public Date getUpdateTime() {
method setUpdateTime (line 46) | public void setUpdateTime(Date updateTime) {
method getVersion (line 50) | public Integer getVersion() {
method setVersion (line 54) | public void setVersion(Integer version) {
method getOrderId (line 58) | public Long getOrderId() {
method setOrderId (line 62) | public void setOrderId(Long orderId) {
method getStatus (line 66) | public String getStatus() {
method setStatus (line 70) | public void setStatus(String status) {
method getType (line 74) | public String getType() {
method setType (line 78) | public void setType(String type) {
method getPriority (line 82) | public Integer getPriority() {
method setPriority (line 86) | public void setPriority(Integer priority) {
method getRetryCount (line 90) | public Integer getRetryCount() {
method setRetryCount (line 94) | public void setRetryCount(Integer retryCount) {
method getRemark (line 98) | public String getRemark() {
method setRemark (line 102) | public void setRemark(String remark) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/timeTask/OrderCloseTask.java
class OrderCloseTask (line 13) | @Component
method closeOrderTaskv1 (line 29) | private void closeOrderTaskv1() {
method closeOrderTaskV3 (line 49) | public void closeOrderTaskV3() {
method closeOrder (line 98) | private void closeOrder(String lockName) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/utils/DBUtil.java
class DBUtil (line 8) | public class DBUtil {
method getConn (line 23) | public static Connection getConn() throws Exception {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/utils/DateTimeUtils.java
class DateTimeUtils (line 13) | public class DateTimeUtils {
method strToDate (line 22) | public static Date strToDate(String dateTimeStr, String formatStr) {
method dateToStr (line 28) | public static String dateToStr(Date date, String formatStr) {
method strToDate (line 36) | public static Date strToDate(String dateTimeStr) {
method dateToStr (line 42) | public static String dateToStr(Date date) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/utils/MD5Util.java
class MD5Util (line 5) | public class MD5Util {
method md5 (line 9) | public static String md5(String src) {
method inputPassToFormPass (line 13) | public static String inputPassToFormPass(String inputPass) {
method formPassToDBPass (line 19) | public static String formPassToDBPass(String formPass, String salt) {
method inputPassToDbPass (line 24) | public static String inputPassToDbPass(String inputPass, String saltDB) {
method main (line 30) | public static void main(String[] args) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/utils/MD5Utils.java
class MD5Utils (line 5) | public class MD5Utils {
method md5 (line 10) | public static String md5(String key) {
method inputPassFormPass (line 18) | public static String inputPassFormPass(String inputPass) {
method formPassToDBPass (line 30) | public static String formPassToDBPass(String formPass, String salt) {
method inputPassToDBPass (line 35) | public static String inputPassToDBPass(String inputPass, String saltDB) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/utils/UUIDUtil.java
class UUIDUtil (line 5) | public class UUIDUtil {
method uuid (line 7) | public static String uuid() {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/utils/UserUtil.java
class UserUtil (line 15) | public class UserUtil {
method createUser (line 17) | private static void createUser(int count) throws Exception {
method main (line 93) | public static void main(String[] args) throws Exception {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/utils/ValidatorUtil.java
class ValidatorUtil (line 8) | public class ValidatorUtil {
method isMobile (line 12) | public static boolean isMobile(String src) {
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/validator/MobileValidator.java
class MobileValidator (line 9) | public class MobileValidator implements ConstraintValidator<MobileCheck,...
method initialize (line 13) | @Override
method isValid (line 18) | @Override
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/vo/GoodsDetailVo.java
class GoodsDetailVo (line 10) | @Setter
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/vo/GoodsVo.java
class GoodsVo (line 11) | @Setter
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/vo/LoginVo.java
class LoginVo (line 12) | @Setter
method toString (line 25) | @Override
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/vo/MiaoShaMessageVo.java
class MiaoShaMessageVo (line 12) | @Setter
FILE: miaosha-v1/src/main/java/com/geekq/miaosha/vo/OrderDetailVo.java
class OrderDetailVo (line 9) | @Setter
method getGoods (line 17) | public GoodsVo getGoods() {
method setGoods (line 21) | public void setGoods(GoodsVo goods) {
method getOrder (line 25) | public OrderInfo getOrder() {
method setOrder (line 29) | public void setOrder(OrderInfo order) {
FILE: miaosha-v1/src/main/resources/static/bootstrap/js/bootstrap.js
function transitionEnd (line 34) | function transitionEnd() {
function removeElement (line 126) | function removeElement() {
function Plugin (line 142) | function Plugin(option) {
function Plugin (line 251) | function Plugin(option) {
function Plugin (line 475) | function Plugin(option) {
function getTargetFromTrigger (line 695) | function getTargetFromTrigger($trigger) {
function Plugin (line 707) | function Plugin(option) {
function getParent (line 774) | function getParent($this) {
function clearMenus (line 787) | function clearMenus(e) {
function Plugin (line 880) | function Plugin(option) {
function Plugin (line 1208) | function Plugin(option, _relatedTarget) {
function complete (line 1574) | function complete() {
function Plugin (line 1750) | function Plugin(option) {
function Plugin (line 1859) | function Plugin(option) {
function ScrollSpy (line 1902) | function ScrollSpy(element, options) {
function Plugin (line 2022) | function Plugin(option) {
function next (line 2131) | function next() {
function Plugin (line 2177) | function Plugin(option) {
function Plugin (line 2334) | function Plugin(option) {
FILE: miaosha-v1/src/main/resources/static/js/common.js
function g_showLoading (line 2) | function g_showLoading(){
function g_getQueryString (line 9) | function g_getQueryString(name) {
FILE: miaosha-v1/src/main/resources/static/layer/layer.js
function t (line 2) | function t(e){e=s.find(e),e.height(f[1]-c-u-2*(0|parseFloat(e.css("paddi...
function e (line 2) | function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}
function o (line 2) | function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onlo...
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/entity/BaseDomain.java
class BaseDomain (line 11) | @Getter
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/entity/Goods.java
class Goods (line 8) | @Setter
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/entity/IpLog.java
class IpLog (line 14) | @Getter
method IpLog (line 29) | public IpLog() {
method IpLog (line 33) | public IpLog(String username, Date loginTime, String ip, int loginType,
method getDisplayState (line 44) | public String getDisplayState() {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/entity/Logininfo.java
class Logininfo (line 12) | @Setter
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/entity/MiaoShaMessageInfo.java
class MiaoShaMessageInfo (line 15) | @Setter
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/entity/MiaoShaMessageUser.java
class MiaoShaMessageUser (line 14) | @Setter
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/entity/MiaoshaGoods.java
class MiaoshaGoods (line 11) | @Setter
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/entity/MiaoshaOrder.java
class MiaoshaOrder (line 9) | @Setter
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/entity/MiaoshaUser.java
class MiaoshaUser (line 11) | @Setter
method toString (line 27) | @Override
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/entity/OrderInfo.java
class OrderInfo (line 11) | @Setter
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/enums/Constanst.java
class Constanst (line 3) | public class Constanst {
type orderStaus (line 9) | public enum orderStaus {
method orderStaus (line 14) | orderStaus(String name) {
method getName (line 18) | public String getName() {
method setName (line 22) | public void setName(String name) {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/enums/Constants.java
class Constants (line 7) | public class Constants {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/enums/MessageStatus.java
class MessageStatus (line 3) | public class MessageStatus {
type messageType (line 10) | public enum messageType {
method messageType (line 16) | private messageType(String message) {
method getMessage (line 20) | public String getMessage() {
type ContentEnum (line 28) | public enum ContentEnum {
method ContentEnum (line 36) | private ContentEnum(int code, String message) {
method getCode (line 41) | public int getCode() {
method getMessage (line 45) | public String getMessage() {
type sendType (line 53) | public enum sendType {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/enums/OrderStatusEnum.java
type OrderStatusEnum (line 6) | public enum OrderStatusEnum {
method OrderStatusEnum (line 18) | OrderStatusEnum(int key, String value) {
method getName (line 23) | public static String getName(int key) {
method getKey (line 32) | public int getKey() {
method getValue (line 36) | public String getValue() {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/enums/SexEnum.java
type SexEnum (line 6) | public enum SexEnum {
method SexEnum (line 14) | SexEnum(int value) {
method getValue (line 18) | public int getValue() {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/enums/YesOrNo.java
type YesOrNo (line 6) | public enum YesOrNo {
method YesOrNo (line 13) | YesOrNo(int value) {
method getValue (line 17) | public int getValue() {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/enums/enums/MessageStatus.java
class MessageStatus (line 3) | public class MessageStatus {
type messageType (line 10) | public enum messageType {
method messageType (line 16) | private messageType(String message) {
method getMessage (line 20) | public String getMessage() {
type ContentEnum (line 28) | public enum ContentEnum {
method ContentEnum (line 36) | private ContentEnum(int code, String message) {
method getCode (line 41) | public int getCode() {
method getMessage (line 45) | public String getMessage() {
type sendType (line 53) | public enum sendType {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/enums/enums/ResultStatus.java
type ResultStatus (line 14) | public enum ResultStatus {
method ResultStatus (line 68) | private ResultStatus(int code, String message) {
method ResultStatus (line 73) | private ResultStatus(Object... args) {
method getCode (line 77) | public int getCode() {
method setCode (line 81) | public void setCode(int code) {
method getMessage (line 85) | public String getMessage() {
method setMessage (line 89) | public void setMessage(String message) {
method getName (line 93) | public String getName() {
method getOutputName (line 97) | public String getOutputName() {
method toString (line 101) | public String toString() {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/enums/resultbean/AbstractResult.java
class AbstractResult (line 6) | public class AbstractResult {
method AbstractResult (line 11) | AbstractResult() {
method AbstractResult (line 14) | protected AbstractResult(ResultStatus status, String message) {
method AbstractResult (line 20) | protected AbstractResult(ResultStatus status) {
method isSuccess (line 26) | public static boolean isSuccess(AbstractResult result) {
method withError (line 30) | public AbstractResult withError(ResultStatus status) {
method withError (line 35) | public AbstractResult withError(String message) {
method withError (line 41) | public AbstractResult withError(int code, String message) {
method success (line 47) | public AbstractResult success() {
method getStatus (line 52) | public ResultStatus getStatus() {
method getMessage (line 56) | public String getMessage() {
method getCode (line 60) | public int getCode() {
method setCode (line 64) | public void setCode(int code) {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/enums/resultbean/ResultGeekQ.java
class ResultGeekQ (line 8) | public class ResultGeekQ<T> extends AbstractResult implements Serializab...
method ResultGeekQ (line 13) | protected ResultGeekQ() {
method ResultGeekQ (line 16) | protected ResultGeekQ(ResultStatus status, String message) {
method ResultGeekQ (line 20) | protected ResultGeekQ(ResultStatus status) {
method build (line 24) | public static <T> ResultGeekQ<T> build() {
method build (line 28) | public static <T> ResultGeekQ<T> build(String message) {
method error (line 32) | public static <T> ResultGeekQ<T> error(ResultStatus status) {
method getData (line 36) | public T getData() {
method setData (line 40) | public void setData(T data) {
method getCount (line 44) | public Integer getCount() {
method setCount (line 48) | public void setCount(Integer count) {
method success (line 52) | public void success(T value) {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/exception/GlobleException.java
class GlobleException (line 6) | public class GlobleException extends RuntimeException {
method GlobleException (line 11) | public GlobleException(ResultStatus status) {
method getStatus (line 16) | public ResultStatus getStatus() {
method setStatus (line 20) | public void setStatus(ResultStatus status) {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/utils/DateTimeUtils.java
class DateTimeUtils (line 13) | public class DateTimeUtils {
method strToDate (line 22) | public static Date strToDate(String dateTimeStr, String formatStr) {
method dateToStr (line 28) | public static String dateToStr(Date date, String formatStr) {
method strToDate (line 36) | public static Date strToDate(String dateTimeStr) {
method dateToStr (line 42) | public static String dateToStr(Date date) {
method main (line 51) | public static void main(String[] args) {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/utils/MD5Utils.java
class MD5Utils (line 10) | public class MD5Utils {
method md5 (line 14) | public static String md5(String src) {
method getSaltT (line 18) | public static final String getSaltT() {
method MD5 (line 26) | public static String MD5(String keyName) {
method inputPassFormPass (line 41) | public static String inputPassFormPass(String inputPass) {
method formPassFormPass (line 52) | public static String formPassFormPass(String inputPass) {
method formPassToDBPass (line 64) | public static String formPassToDBPass(String formPass, String salt) {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/utils/SnowflakeIdWorker.java
class SnowflakeIdWorker (line 15) | public class SnowflakeIdWorker {
method SnowflakeIdWorker (line 96) | public SnowflakeIdWorker(long workerId, long datacenterId) {
method getOrderId (line 114) | public static long getOrderId(long workerId, long datacenterId) {
method main (line 124) | public static void main(String[] args) {
method nextId (line 138) | public synchronized long nextId() {
method tilNextMillis (line 177) | protected long tilNextMillis(long lastTimestamp) {
method timeGen (line 192) | protected long timeGen() {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/utils/UUIDUtil.java
class UUIDUtil (line 5) | public class UUIDUtil {
method uuid (line 7) | public static String uuid() {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/utils/UserContext.java
class UserContext (line 6) | public class UserContext {
method getUser (line 10) | public static MiaoshaUser getUser() {
method setUser (line 15) | public static void setUser(MiaoshaUser user) {
method removeUser (line 19) | public static void removeUser() {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/utils/UserContext2.java
class UserContext2 (line 14) | public class UserContext2 {
method getRequest (line 18) | private static HttpServletRequest getRequest() {
method putLogininfo (line 23) | public static void putLogininfo(Logininfo logininfo) {
method getCurrent (line 27) | public static Logininfo getCurrent() {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/utils/ValidatorUtil.java
class ValidatorUtil (line 9) | public class ValidatorUtil {
method isMobile (line 13) | public static boolean isMobile(String src) {
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/validator/MobileValidator.java
class MobileValidator (line 9) | public class MobileValidator implements ConstraintValidator<MobileCheck,...
method initialize (line 13) | @Override
method isValid (line 18) | @Override
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/vo/GoodsDetailVo.java
class GoodsDetailVo (line 11) | @Setter
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/vo/GoodsVo.java
class GoodsVo (line 12) | @Setter
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/vo/LoginVo.java
class LoginVo (line 8) | @AllArgsConstructor
method getNickname (line 17) | public String getNickname() {
method setNickname (line 21) | public void setNickname(String nickname) {
method getPassword (line 25) | public String getPassword() {
method setPassword (line 29) | public void setPassword(String password) {
method toString (line 33) | @Override
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/vo/MiaoShaMessageVo.java
class MiaoShaMessageVo (line 12) | @Setter
FILE: miaosha-v2/miaosha-common/src/main/java/com/geekq/miasha/vo/OrderDetailVo.java
class OrderDetailVo (line 9) | @Setter
method getGoods (line 17) | public GoodsVo getGoods() {
method setGoods (line 21) | public void setGoods(GoodsVo goods) {
method getOrder (line 25) | public OrderInfo getOrder() {
method setOrder (line 29) | public void setOrder(OrderInfo order) {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/mapper/GoodsMapper.java
type GoodsMapper (line 12) | public interface GoodsMapper {
method listGoodsVo (line 14) | public List<GoodsVo> listGoodsVo();
method getGoodsVoByGoodsId (line 16) | public GoodsVo getGoodsVoByGoodsId(@Param("goodsId") long goodsId);
method reduceStock (line 18) | public int reduceStock(MiaoshaGoods g);
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/mapper/IpLogMapper.java
type IpLogMapper (line 8) | public interface IpLogMapper {
method deleteByPrimaryKey (line 9) | int deleteByPrimaryKey(Long id);
method insert (line 11) | int insert(IpLog record);
method selectByPrimaryKey (line 13) | IpLog selectByPrimaryKey(Long id);
method selectAll (line 15) | List<IpLog> selectAll();
method updateByPrimaryKey (line 17) | int updateByPrimaryKey(IpLog record);
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/mapper/LogininfoMapper.java
type LogininfoMapper (line 9) | public interface LogininfoMapper {
method deleteByPrimaryKey (line 11) | int deleteByPrimaryKey(Long id);
method insert (line 13) | int insert(Logininfo record);
method selectByPrimaryKey (line 15) | Logininfo selectByPrimaryKey(Long id);
method selectAll (line 17) | List<Logininfo> selectAll();
method updateByPrimaryKey (line 19) | int updateByPrimaryKey(Logininfo record);
method getCountByNickname (line 21) | int getCountByNickname(@Param("nickname") String nickname,
method getLoginInfoByNickname (line 24) | Logininfo getLoginInfoByNickname(@Param("nickname") String nickname,
method login (line 27) | Logininfo login(@Param("name") String name,
method autoComplate (line 30) | List<Map<String, Object>> autoComplate(@Param("word") String word, @Pa...
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/mapper/MiaoShaUserMapper.java
type MiaoShaUserMapper (line 9) | public interface MiaoShaUserMapper {
method getByNickname (line 11) | public MiaoshaUser getByNickname(@Param("nickname") String nickname);
method getById (line 13) | public MiaoshaUser getById(@Param("id") long id);
method update (line 15) | public void update(MiaoshaUser toBeUpdate);
method insertMiaoShaUser (line 17) | public void insertMiaoShaUser(MiaoshaUser miaoshaUser);
method getCountByUserName (line 19) | public int getCountByUserName(@Param("userName") String userName, @Par...
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/mapper/OrderMapper.java
type OrderMapper (line 12) | public interface OrderMapper {
method getMiaoshaOrderByUserIdGoodsId (line 14) | public MiaoshaOrder getMiaoshaOrderByUserIdGoodsId(@Param("userNickNam...
method insert (line 16) | public long insert(OrderInfo orderInfo);
method insertMiaoshaOrder (line 18) | public int insertMiaoshaOrder(MiaoshaOrder miaoshaOrder);
method getOrderById (line 20) | public OrderInfo getOrderById(@Param("orderId") long orderId);
method selectOrderStatusByCreateTime (line 22) | public List<OrderInfo> selectOrderStatusByCreateTime(@Param("status") ...
method closeOrderByOrderInfo (line 24) | public int closeOrderByOrderInfo();
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/rabbitmq/MQConfig.java
class MQConfig (line 10) | @Configuration
method queue (line 36) | @Bean
method topicQueue1 (line 44) | @Bean
method topicQueue2 (line 49) | @Bean
method topicExchage (line 54) | @Bean
method topicBinding1 (line 59) | @Bean
method topicBinding2 (line 64) | @Bean
method fanoutExchage (line 72) | @Bean
method FanoutBinding1 (line 77) | @Bean
method FanoutBinding2 (line 82) | @Bean
method headersExchage (line 90) | @Bean
method headerQueue1 (line 95) | @Bean
method headerBinding (line 100) | @Bean
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/rabbitmq/MQReceiver.java
class MQReceiver (line 20) | @Service
method receive (line 43) | @RabbitListener(queues = MQConfig.MIAOSHA_QUEUE)
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/rabbitmq/MQSender.java
class MQSender (line 12) | @Service
method sendMiaoshaMessage (line 23) | public void sendMiaoshaMessage(MiaoshaMessage mm) {
method sendMessage (line 34) | public void sendMessage(MiaoshaMessage mm) {
method sendRegisterMessage (line 45) | public void sendRegisterMessage(MiaoShaMessageVo miaoShaMessageVo) {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/rabbitmq/MiaoshaMessage.java
class MiaoshaMessage (line 6) | public class MiaoshaMessage {
method getUser (line 10) | public MiaoshaUser getUser() {
method setUser (line 14) | public void setUser(MiaoshaUser user) {
method getGoodsId (line 18) | public long getGoodsId() {
method setGoodsId (line 22) | public void setGoodsId(long goodsId) {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/BasePrefix.java
class BasePrefix (line 3) | public abstract class BasePrefix implements KeyPrefix {
method BasePrefix (line 9) | public BasePrefix(int expireSeconds, String prefix) {
method BasePrefix (line 15) | public BasePrefix(String prefix) {
method expireSeconds (line 19) | @Override
method getPrefix (line 29) | @Override
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/DistributedLocker.java
type DistributedLocker (line 5) | public interface DistributedLocker {
method lock (line 7) | void lock(String lockKey);
method unlock (line 9) | void unlock(String lockKey);
method lock (line 11) | void lock(String lockKey, int timeout);
method lock (line 13) | void lock(String lockKey, TimeUnit unit, int timeout);
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/GoodsKey.java
class GoodsKey (line 3) | public class GoodsKey extends BasePrefix {
method GoodsKey (line 8) | private GoodsKey(int expireSeconds, String prefix) {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/KeyPrefix.java
type KeyPrefix (line 3) | public interface KeyPrefix {
method expireSeconds (line 5) | public int expireSeconds();
method getPrefix (line 7) | public String getPrefix();
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/MiaoShaUserKey.java
class MiaoShaUserKey (line 3) | public class MiaoShaUserKey extends BasePrefix {
method MiaoShaUserKey (line 8) | public MiaoShaUserKey(int expireSeconds, String prefix) {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/MiaoshaKey.java
class MiaoshaKey (line 3) | public class MiaoshaKey extends BasePrefix {
method MiaoshaKey (line 9) | private MiaoshaKey(int expireSeconds, String prefix) {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/OrderKey.java
class OrderKey (line 3) | public class OrderKey extends BasePrefix {
method OrderKey (line 8) | public OrderKey(String prefix) {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/RedisConfig.java
class RedisConfig (line 6) | @Component
method getHost (line 17) | public String getHost() {
method setHost (line 21) | public void setHost(String host) {
method getPort (line 25) | public int getPort() {
method setPort (line 29) | public void setPort(int port) {
method getTimeout (line 33) | public int getTimeout() {
method setTimeout (line 37) | public void setTimeout(int timeout) {
method getPassword (line 41) | public String getPassword() {
method setPassword (line 45) | public void setPassword(String password) {
method getPoolMaxTotal (line 49) | public int getPoolMaxTotal() {
method setPoolMaxTotal (line 53) | public void setPoolMaxTotal(int poolMaxTotal) {
method getPoolMaxIdle (line 57) | public int getPoolMaxIdle() {
method setPoolMaxIdle (line 61) | public void setPoolMaxIdle(int poolMaxIdle) {
method getPoolMaxWait (line 65) | public int getPoolMaxWait() {
method setPoolMaxWait (line 69) | public void setPoolMaxWait(int poolMaxWait) {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/RedisPoolFactory.java
class RedisPoolFactory (line 9) | @Service
method JedisPoolFactory (line 15) | @Bean
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/RedisService.java
class RedisService (line 15) | @Service
method beanToString (line 22) | public static <T> String beanToString(T value) {
method stringToBean (line 38) | @SuppressWarnings("unchecked")
method setnx (line 61) | public Long setnx(String key, String value) {
method expire (line 84) | public Long expire(String key, int exTime) {
method get (line 102) | public <T> T get(KeyPrefix prefix, String key, Class<T> clazz) {
method get (line 116) | public String get(String key) {
method getset (line 131) | public String getset(String key, String value) {
method set (line 149) | public <T> boolean set(KeyPrefix prefix, String key, T value) {
method exists (line 174) | public <T> boolean exists(KeyPrefix prefix, String key) {
method delete (line 189) | public boolean delete(KeyPrefix prefix, String key) {
method incr (line 205) | public <T> Long incr(KeyPrefix prefix, String key) {
method decr (line 220) | public <T> Long decr(KeyPrefix prefix, String key) {
method del (line 232) | public Long del(String key) {
method delete (line 247) | public boolean delete(KeyPrefix prefix) {
method scanKeys (line 270) | public List<String> scanKeys(String key) {
method returnToPool (line 296) | private void returnToPool(Jedis jedis) {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/RedissLockUtil.java
class RedissLockUtil (line 8) | public class RedissLockUtil {
method setLocker (line 11) | public static void setLocker(DistributedLocker locker) {
method lock (line 15) | public static void lock(String lockKey) {
method unlock (line 19) | public static void unlock(String lockKey) {
method lock (line 29) | public static void lock(String lockKey, int timeout) {
method lock (line 40) | public static void lock(String lockKey, TimeUnit unit, int timeout) {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/Userkey.java
class Userkey (line 3) | public class Userkey extends BasePrefix {
method Userkey (line 8) | private Userkey(String prefix) {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/redismanager/RedisLimitRateWithLUA.java
class RedisLimitRateWithLUA (line 11) | public class RedisLimitRateWithLUA {
method accquire (line 13) | public static boolean accquire() throws IOException, URISyntaxException {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/redismanager/RedisLock.java
class RedisLock (line 9) | public class RedisLock {
method getLock (line 11) | public String getLock(String key, int timeOut) {
method releaseLock (line 38) | public boolean releaseLock(String key, String value) {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/redismanager/RedisLua.java
class RedisLua (line 13) | public class RedisLua {
method getLuaLimit (line 20) | public static void getLuaLimit() {
method getVistorCount (line 50) | public static Object getVistorCount(String key) {
method vistorCount (line 76) | public static void vistorCount(String key) {
method currentlimitMinute (line 97) | public static void currentlimitMinute() {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/redismanager/RedisManager.java
class RedisManager (line 7) | public class RedisManager {
method getJedis (line 18) | public static Jedis getJedis() throws Exception {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/redis/redismanager/lua/RedisLuaLock.java
class RedisLuaLock (line 3) | public class RedisLuaLock {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/service/GoodsService.java
class GoodsService (line 11) | @Service
method listGoodsVo (line 18) | public List<GoodsVo> listGoodsVo() {
method getGoodsVoByGoodsId (line 22) | public GoodsVo getGoodsVoByGoodsId(long goodsId) {
method reduceStock (line 26) | public boolean reduceStock(GoodsVo goods) {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/service/LoginInfoService.java
type LoginInfoService (line 6) | public interface LoginInfoService {
method checkName (line 8) | public String checkName();
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/service/MiaoShaMessageService.java
class MiaoShaMessageService (line 5) | @Service
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/service/MiaoShaUserService.java
class MiaoShaUserService (line 28) | @Service
method getNickNameCount (line 44) | public boolean getNickNameCount(String userName) {
method getByToken (line 50) | public MiaoshaUser getByToken(HttpServletResponse response, String tok...
method getByNickName (line 63) | public MiaoshaUser getByNickName(String nickName) {
method updatePassword (line 79) | public boolean updatePassword(String token, String nickName, String fo...
method register (line 98) | public boolean register(String userName, String passWord,
method login (line 130) | public boolean login(HttpServletResponse response, LoginVo loginVo) {
method createToken (line 155) | public String createToken(HttpServletResponse response, LoginVo loginV...
method addCookie (line 179) | private void addCookie(HttpServletResponse response, String token, Mia...
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/service/MiaoshaService.java
class MiaoshaService (line 22) | @Service
method calc (line 36) | private static int calc(String exp) {
method miaosha (line 48) | @Transactional
method getMiaoshaResult (line 62) | public long getMiaoshaResult(Long userId, long goodsId) {
method setGoodsOver (line 76) | private void setGoodsOver(Long goodsId) {
method getGoodsOver (line 80) | private boolean getGoodsOver(long goodsId) {
method checkPath (line 84) | public boolean checkPath(MiaoshaUser user, long goodsId, String path) {
method createMiaoshaPath (line 92) | public String createMiaoshaPath(MiaoshaUser user, long goodsId) {
method createVerifyCode (line 101) | public BufferedImage createVerifyCode(MiaoshaUser user, long goodsId) {
method checkVerifyCodeRegister (line 143) | public boolean checkVerifyCodeRegister(int verifyCode) {
method createVerifyCodeRegister (line 152) | public BufferedImage createVerifyCodeRegister() {
method checkVerifyCode (line 185) | public boolean checkVerifyCode(MiaoshaUser user, long goodsId, int ver...
method generateVerifyCode (line 200) | private String generateVerifyCode(Random rdm) {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/service/OrderService.java
class OrderService (line 22) | @Service
method getMiaoshaOrderByUserIdGoodsId (line 31) | public MiaoshaOrder getMiaoshaOrderByUserIdGoodsId(long userId, long g...
method getOrderById (line 35) | public OrderInfo getOrderById(long orderId) {
method createOrder (line 39) | @Transactional
method closeOrder (line 61) | public void closeOrder(int hour) {
FILE: miaosha-v2/miaosha-service/src/main/java/com/geekq/miaosha/service/impl/LoginInfoServiceImpl.java
class LoginInfoServiceImpl (line 11) | @Service
method checkName (line 17) | @Override
FILE: miaosha-v2/miaosha-web/src/main/java/com/geekq/miaosha/GeekQMainApplication.java
class GeekQMainApplication (line 8) | @ImportResource(value = {"classpath:consumer.xml"})
method main (line 13) | public static void main(String[] args) throws Exception {
FILE: miaosha-v2/miaosha-web/src/main/java/com/geekq/miaosha/config/DruidConfig.java
class DruidConfig (line 13) | @Configuration
method druidSverlet (line 36) | @Bean
method druidDataSource (line 48) | @Bean
method getUrl (line 75) | public String getUrl() {
method setUrl (line 79) | public void setUrl(String url) {
method getUsername (line 83) | public String getUsername() {
method setUsername (line 87) | public void setUsername(String username) {
method getPassword (line 91) | public String getPassword() {
method setPassword (line 95) | public void setPassword(String password) {
method getDriverClassName (line 99) | public String getDriverClassName() {
method setDriverClassName (line 103) | public void setDriverClassName(String driverClassName) {
method getType (line 107) | public String getType() {
method setType (line 111) | public void setType(String type) {
method getFilters (line 115) | public String getFilters() {
method setFilters (line 119) | public void setFilters(String filters) {
method getMaxActive (line 123) | public int getMaxActive() {
method setMaxActive (line 127) | public void setMaxActive(int maxActive) {
method getInitialSize (line 131) | public int getInitialSize() {
method setInitialSize (line 135) | public void setInitialSize(int initialSize) {
method getMinIdle (line 139) | public int getMinIdle() {
method setMinIdle (line 143) | public void setMinIdle(int minIdle) {
method getMaxWait (line 147) | public long getMaxWait() {
method setMaxWait (line 151) | public void setMaxWait(long maxWait) {
method getTimeBetweenEvictionRunsMillis (line 155) | public long getTimeBetweenEvictionRunsMillis() {
method setTimeBetweenEvictionRunsMillis (line 159) | public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionR...
method getMinEvictableIdleTimeMillis (line 163) | public long getMinEvictableIdleTimeMillis() {
method setMinEvictableIdleTimeMillis (line 167) | public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMil...
method getValidationQuery (line 171) | public String getValidationQuery() {
method setValidationQuery (line 175) | public void setValidationQuery(String validationQuery) {
method isTestWhileIdle (line 179) | public boolean isTestWhileIdle() {
method setTestWhileIdle (line 183) | public void setTestWhileIdle(boolean testWhileIdle) {
method isTestOnBorrow (line 187) | public boolean isTestOnBorrow() {
method setTestOnBorrow (line 191) | public void setTestOnBorrow(boolean testOnBorrow) {
method isTestOnReturn (line 195) | public boolean isTestOnReturn() {
method setTestOnReturn (line 199) | public void setTestOnReturn(boolean testOnReturn) {
method isPoolPreparedStatements (line 203) | public boolean isPoolPreparedStatements() {
method setPoolPreparedStatements (line 207) | public void setPoolPreparedStatements(boolean poolPreparedStatements) {
method getMaxOpenPreparedStatements (line 211) | public int getMaxOpenPreparedStatements() {
method setMaxOpenPreparedStatements (line 215) | public void setMaxOpenPreparedStatements(int maxOpenPreparedStatements) {
FILE: miaosha-v2/miaosha-web/src/main/java/com/geekq/miaosha/config/UserArgumentResolver.java
class UserArgumentResolver (line 14) | @Service
method supportsParameter (line 20) | @Override
method resolveArgument (line 26) | @Override
FILE: miaosha-v2/miaosha-web/src/main/java/com/geekq/miaosha/config/WebConfig.java
class WebConfig (line 12) | @Configuration
method addInterceptors (line 21) | @Override
method addArgumentResolvers (line 28) | @Override
FILE: miaosha-v2/miaosha-web/src/main/java/com/geekq/miaosha/controller/BaseController.java
class BaseController (line 17) | @Controller
method out (line 29) | public static void out(HttpServletResponse res, String html) {
method render (line 42) | public String render(HttpServletRequest request, HttpServletResponse r...
FILE: miaosha-v2/miaosha-web/src/main/java/com/geekq/miaosha/controller/GoodsController.java
class GoodsController (line 34) | @Controller
method list (line 56) | @RequireLogin(seconds = 5, maxCount = 5, needLogin = true)
method detail2 (line 73) | @RequestMapping(value = "/to_detail2/{goodsId}", produces = "text/html")
method detail (line 138) | @RequestMapping(value = "/detail/{goodsId}")
FILE: miaosha-v2/miaosha-web/src/main/java/com/geekq/miaosha/controller/LoginController.java
class LoginController (line 20) | @Controller
method sayHello (line 29) | @RequestMapping("/sayHello")
method tologin (line 35) | @RequestMapping("/to_login")
method dologin (line 47) | @RequestMapping("/loginin")
method createToken (line 57) | @RequestMapping("/create_token")
FILE: miaosha-v2/miaosha-web/src/main/java/com/geekq/miaosha/controller/MiaoShaMessageController.java
class MiaoShaMessageController (line 15) | @Controller
method list (line 24) | @RequestMapping(value = "/list", produces = "text/html")
method getNewMessage (line 38) | @RequestMapping(value = "/getNewMessage", produces = "text/html")
FILE: miaosha-v2/miaosha-web/src/main/java/com/geekq/miaosha/controller/MiaoshaController.java
class MiaoshaController (line 38) | @Controller
method miaosha (line 69) | @RequireLogin(seconds = 5, maxCount = 5, needLogin = true)
method miaoshaResult (line 140) | @RequireLogin(seconds = 5, maxCount = 5, needLogin = true)
method getMiaoshaPath (line 156) | @RequireLogin(seconds = 5, maxCount = 5, needLogin = true)
method getMiaoshaVerifyCod (line 178) | @RequestMapping(value = "/verifyCodeRegister", method = RequestMethod....
method getMiaoshaVerifyCod (line 198) | @RequestMapping(value = "/verifyCode", method = RequestMethod.GET)
method afterPropertiesSet (line 226) | @Override
FILE: miaosha-v2/miaosha-web/src/main/java/com/geekq/miaosha/controller/OrderController.java
class OrderController (line 23) | @Controller
method info (line 39) | @RequestMapping("/detail")
FILE: miaosha-v2/miaosha-web/src/main/java/com/geekq/miaosha/controller/RegisterController.java
class RegisterController (line 21) | @Controller
method loginIndex (line 38) | @RequestMapping("/do_login")
method register (line 53) | @RequestMapping("/registerv2")
method checkUsername (line 64) | @RequestMapping("/checkUsername")
method register (line 81) | @RequestMapping("/register")
FILE: miaosha-v2/miaosha-web/src/main/java/com/geekq/miaosha/interceptor/AccessKey.java
class AccessKey (line 5) | public class AccessKey extends BasePrefix {
method AccessKey (line 7) | private AccessKey(int expireSeconds, String prefix) {
method withExpire (line 11) | public static AccessKey withExpire(int expireSeconds) {
FILE: miaosha-v2/miaosha-web/src/main/java/com/geekq/miaosha/interceptor/GlobalExceptionHandler.java
class GlobalExceptionHandler (line 23) | @ControllerAdvice
method exceptionHandler (line 29) | @ResponseBody
FILE: miaosha-v2/miaosha-web/src/main/java/com/geekq/miaosha/interceptor/GlobalParamAdvice.java
class GlobalParamAdvice (line 12) | @ControllerAdvice
method initBinder (line 20) | @InitBinder
method addAttributes (line 29) | @ModelAttribute
FILE: miaosha-v2/miaosha-web/src/main/java/com/geekq/miaosha/interceptor/LoginInterceptor.java
class LoginInterceptor (line 27) | @Service
method preHandle (line 38) | @Override
method afterCompletion (line 90) | @Override
method render (line 96) | private void render(HttpServletResponse response, ResultStatus cm) thr...
method getUser (line 105) | private MiaoshaUser getUser(HttpServletRequest request, HttpServletRes...
method getCookieValue (line 115) | private String getCookieValue(HttpServletRequest request, String cooki...
FILE: miaosha-v2/miaosha-web/src/main/resources/static/bootstrap/js/bootstrap.js
function transitionEnd (line 34) | function transitionEnd() {
function removeElement (line 126) | function removeElement() {
function Plugin (line 142) | function Plugin(option) {
function Plugin (line 251) | function Plugin(option) {
function Plugin (line 475) | function Plugin(option) {
function getTargetFromTrigger (line 695) | function getTargetFromTrigger($trigger) {
function Plugin (line 707) | function Plugin(option) {
function getParent (line 774) | function getParent($this) {
function clearMenus (line 787) | function clearMenus(e) {
function Plugin (line 880) | function Plugin(option) {
function Plugin (line 1208) | function Plugin(option, _relatedTarget) {
function complete (line 1574) | function complete() {
function Plugin (line 1750) | function Plugin(option) {
function Plugin (line 1859) | function Plugin(option) {
function ScrollSpy (line 1902) | function ScrollSpy(element, options) {
function Plugin (line 2022) | function Plugin(option) {
function next (line 2131) | function next() {
function Plugin (line 2177) | function Plugin(option) {
function Plugin (line 2334) | function Plugin(option) {
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/My97DatePicker/WdatePicker.js
function B (line 35) | function B(){V.$dp=V.$dp||{};obj={$:function($){return(typeof $=="string...
function E (line 35) | function E(A,$,_){if(T)A.attachEvent($,_);else{var B=$.replace(/on/,"");...
function L (line 35) | function L(){var _,A,$=X[O][C]("script");for(var B=0;B<$.length;B++){_=$...
function F (line 35) | function F(F){var E,C;if(F.substring(0,1)!="/"&&F.indexOf("://")==-1){E=...
function M (line 35) | function M(A,$,B){var D=X[O][C]("HEAD").item(0),_=X[O].createElement("li...
function Z (line 35) | function Z($,_){E($,"onload",_)}
function G (line 35) | function G($){$=$||V;var A=0,_=0;while($!=V){var D=$.parent[O][C]("ifram...
function W (line 35) | function W(E){if(T)return E.getBoundingClientRect();else{var A={ROOT_TAG...
function N (line 35) | function N($){$=$||V;var _=$[O];_=_[J]&&_[J].clientHeight&&_[J].clientHe...
function a (line 35) | function a($){$=$||V;var B=$[O],A=B[J],_=B.body;B=(A&&A.scrollTop!=null&...
function D (line 35) | function D($){src=$?($.srcElement||$.target):null;if($dp&&$dp.cal&&!$dp....
function Y (line 35) | function Y(){$dp.status=2;H()}
function H (line 35) | function H(){if($dp.flatCfgs.length>0){var $=$dp.flatCfgs.shift();$.el={...
function U (line 35) | function U(E,_){$dp.win=X;B();E=E||{};if(_){if(!D()){$=$||setInterval(fu...
function S (line 35) | function S(_,$){return _.currentStyle?_.currentStyle[$]:document.default...
function Q (line 35) | function Q(_,$){if(_)if($!=null)_.style.display=$;else return S(_,"displ...
function K (line 35) | function K(H,$){for(var D in _)if(D.substring(0,1)!="$")$dp[D]=_[D];for(...
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/My97DatePicker/calendar.js
function C (line 7) | function C(A){return A<62?String.fromCharCode(A+=A<26?65:A<52?71:-4):A<6...
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/bootstrap-3.3.2-dist/js/bootstrap.js
function transitionEnd (line 34) | function transitionEnd() {
function removeElement (line 126) | function removeElement() {
function Plugin (line 142) | function Plugin(option) {
function Plugin (line 247) | function Plugin(option) {
function Plugin (line 466) | function Plugin(option) {
function getTargetFromTrigger (line 685) | function getTargetFromTrigger($trigger) {
function Plugin (line 697) | function Plugin(option) {
function clearMenus (line 829) | function clearMenus(e) {
function getParent (line 848) | function getParent($this) {
function Plugin (line 865) | function Plugin(option) {
function Plugin (line 1179) | function Plugin(option, _relatedTarget) {
function complete (line 1521) | function complete() {
function Plugin (line 1673) | function Plugin(option) {
function Plugin (line 1787) | function Plugin(option) {
function ScrollSpy (line 1830) | function ScrollSpy(element, options) {
function Plugin (line 1953) | function Plugin(option) {
function next (line 2060) | function next() {
function Plugin (line 2106) | function Plugin(option) {
function Plugin (line 2263) | function Plugin(option) {
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/common.js
function g_showLoading (line 2) | function g_showLoading(){
function g_getQueryString (line 9) | function g_getQueryString(name) {
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/jquery/jquery-2.1.3.js
function isArraylike (line 533) | function isArraylike( obj ) {
function Sizzle (line 745) | function Sizzle( selector, context, results, seed ) {
function createCache (line 859) | function createCache() {
function markFunction (line 877) | function markFunction( fn ) {
function assert (line 886) | function assert( fn ) {
function addHandle (line 908) | function addHandle( attrs, handler ) {
function siblingCheck (line 923) | function siblingCheck( a, b ) {
function createInputPseudo (line 950) | function createInputPseudo( type ) {
function createButtonPseudo (line 961) | function createButtonPseudo( type ) {
function createPositionalPseudo (line 972) | function createPositionalPseudo( fn ) {
function testContext (line 995) | function testContext( context ) {
function setFilters (line 2004) | function setFilters() {}
function toSelector (line 2075) | function toSelector( tokens ) {
function addCombinator (line 2085) | function addCombinator( matcher, combinator, base ) {
function elementMatcher (line 2138) | function elementMatcher( matchers ) {
function multipleContexts (line 2152) | function multipleContexts( selector, contexts, results ) {
function condense (line 2161) | function condense( unmatched, map, filter, context, xml ) {
function setMatcher (line 2182) | function setMatcher( preFilter, selector, matcher, postFilter, postFinde...
function matcherFromTokens (line 2275) | function matcherFromTokens( tokens ) {
function matcherFromGroupMatchers (line 2333) | function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
function winnow (line 2629) | function winnow( elements, qualifier, not ) {
function sibling (line 2953) | function sibling( cur, dir ) {
function createOptions (line 3031) | function createOptions( options ) {
function completed (line 3425) | function completed() {
function Data (line 3530) | function Data() {
function dataAttr (line 3721) | function dataAttr( elem, key, data ) {
function returnTrue (line 4061) | function returnTrue() {
function returnFalse (line 4065) | function returnFalse() {
function safeActiveElement (line 4069) | function safeActiveElement() {
function manipulationTarget (line 4941) | function manipulationTarget( elem, content ) {
function disableScript (line 4951) | function disableScript( elem ) {
function restoreScript (line 4955) | function restoreScript( elem ) {
function setGlobalEval (line 4968) | function setGlobalEval( elems, refElements ) {
function cloneCopyEvent (line 4979) | function cloneCopyEvent( src, dest ) {
function getAll (line 5013) | function getAll( context, tag ) {
function fixInput (line 5024) | function fixInput( src, dest ) {
function actualDisplay (line 5479) | function actualDisplay( name, doc ) {
function defaultDisplay (line 5501) | function defaultDisplay( nodeName ) {
function curCSS (line 5548) | function curCSS( elem, name, computed ) {
function addGetHookIf (line 5596) | function addGetHookIf( conditionFn, hookFn ) {
function computePixelPositionAndBoxSizingReliable (line 5636) | function computePixelPositionAndBoxSizingReliable() {
function vendorPropName (line 5741) | function vendorPropName( style, name ) {
function setPositiveNumber (line 5763) | function setPositiveNumber( elem, value, subtract ) {
function augmentWidthOrHeight (line 5771) | function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
function getWidthOrHeight (line 5810) | function getWidthOrHeight( elem, name, extra ) {
function showHide (line 5854) | function showHide( elements, show ) {
function Tween (line 6152) | function Tween( elem, options, prop, end, easing ) {
function createFxNow (line 6321) | function createFxNow() {
function genFx (line 6329) | function genFx( type, includeWidth ) {
function createTween (line 6349) | function createTween( value, prop, animation ) {
function defaultPrefilter (line 6363) | function defaultPrefilter( elem, props, opts ) {
function propFilter (line 6496) | function propFilter( props, specialEasing ) {
function Animation (line 6533) | function Animation( elem, properties, options ) {
function addToPrefiltersOrTransports (line 7581) | function addToPrefiltersOrTransports( structure ) {
function inspectPrefiltersOrTransports (line 7613) | function inspectPrefiltersOrTransports( structure, options, originalOpti...
function ajaxExtend (line 7640) | function ajaxExtend( target, src ) {
function ajaxHandleResponses (line 7660) | function ajaxHandleResponses( s, jqXHR, responses ) {
function ajaxConvert (line 7716) | function ajaxConvert( s, response, jqXHR, isSuccess ) {
function done (line 8174) | function done( status, nativeStatusText, responses, headers ) {
function buildParams (line 8418) | function buildParams( prefix, obj, traditional, add ) {
function getWindow (line 8912) | function getWindow( elem ) {
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/metisMenu/metisMenu.js
function Plugin (line 17) | function Plugin(element, options) {
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/plugins/datetimepicker/js/bootstrap-datetimepicker.js
function UTCDate (line 32) | function UTCDate() {
function UTCToday (line 36) | function UTCToday() {
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/plugins/datetimepicker/sample in bootstrap v2/bootstrap/js/bootstrap.js
function clearMenus (line 409) | function clearMenus() {
function getParent (line 415) | function getParent($this) {
function ScrollSpy (line 496) | function ScrollSpy(element, options) {
function next (line 708) | function next() {
function removeWithAnimation (line 940) | function removeWithAnimation() {
function removeElement (line 1347) | function removeElement() {
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/plugins/datetimepicker/sample in bootstrap v3/bootstrap/js/bootstrap.js
function transitionEnd (line 33) | function transitionEnd() {
function removeElement (line 118) | function removeElement() {
function clearMenus (line 764) | function clearMenus() {
function getParent (line 775) | function getParent($this) {
function complete (line 1336) | function complete() {
function ScrollSpy (line 1604) | function ScrollSpy(element, options) {
function next (line 1805) | function next() {
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/plugins/jquery-validation/demo/marketo/jquery.maskedinput.js
function getCaretPosition (line 32) | function getCaretPosition(ctl){
function setCaretPosition (line 45) | function setCaretPosition(ctl, pos){
function focusEvent (line 102) | function focusEvent(){
function keydownEvent (line 121) | function keydownEvent(e){
function keypressEvent (line 161) | function keypressEvent(e){
function clearBuffer (line 213) | function clearBuffer(start,end){
function writeBuffer (line 220) | function writeBuffer(pos){
function checkVal (line 231) | function checkVal(){
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/plugins/jquery-validation/demo/multipart/js/jquery.maskedinput-1.0.js
function getCaretPosition (line 32) | function getCaretPosition(ctl){
function setCaretPosition (line 45) | function setCaretPosition(ctl, pos){
function clearBuffer (line 204) | function clearBuffer(start,end){
function writeBuffer (line 211) | function writeBuffer(pos){
function checkVal (line 222) | function checkVal(){
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/plugins/jquery-validation/demo/multipart/js/ui.core.js
function getter (line 206) | function getter(namespace, plugin, method, args) {
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/plugins/jquery-validation/demo/tinymce/tiny_mce.js
function getBase (line 1) | function getBase(n){if(n.src&&/tiny_mce(|_dev|_src|_gzip|_jquery|_protot...
function unload (line 1) | function unload(){var li=t.unloads,o,n;if(li){for(n in li){o=li[n];if(o&...
function fakeUnload (line 1) | function fakeUnload(){var d=document;if(d.readyState=='interactive'){fun...
function get (line 1) | function get(s){x=0;try{x=new ActiveXObject(s);}catch(ex){}return x;}
function ready (line 1) | function ready(){if(!o.async||x.readyState==4||c++>10000){if(o.success&&...
function get (line 1) | function get(s,n){return s.getElementsByTagName(n.toLowerCase());}
function get (line 1) | function get(s,n){return s.getElementsByTagName(n);}
function collect (line 1) | function collect(n){if(!n.mce_save){n.mce_save=1;o.push(n);}}
function collectIE (line 1) | function collectIE(n){if(!n.getAttribute('mce_save')){n.setAttribute('mc...
function find (line 1) | function find(n,f,r){var i,l,nl=get(r,n);for(i=0,l=nl.length;i<l;i++)f(n...
function compress (line 1) | function compress(p,s,ot){var t,r,b,l;t=o[p+'-top'+s];if(!t)return;r=o[p...
function compress2 (line 1) | function compress2(ta,a,b,c){var t;t=o[a];if(!t)return;t=o[b];if(!t)retu...
function set (line 1) | function set(){try{e.innerHTML='<br />'+h;e.removeChild(e.firstChild);}c...
function trim (line 1) | function trim(s){s=s.replace(/(<!--\[CDATA\[|\]\]-->)/g,'\n');s=s.replac...
function handle (line 1) | function handle(m,b,c){var u=c;if(a.indexOf('mce_'+b)!=-1)return m;if(b=...
function hex (line 1) | function hex(s){s=parseInt(s).toString(16);return s.length>1?s:'0'+s;}
function addClasses (line 1) | function addClasses(s){each(s.imports,function(r){addClasses(r);});each(...
function trimNl (line 1) | function trimNl(s){return s.replace(/[\n\r]+/g,'');}
function getPos (line 1) | function getPos(r,sn,en){var w=t.dom.doc.createTreeWalker(r,NodeFilter.S...
function getPos (line 1) | function getPos(r,sp,ep){var w=t.dom.doc.createTreeWalker(r,NodeFilter.S...
function first (line 1) | function first(n){return n?d.createTreeWalker(n,NodeFilter.SHOW_TEXT,nul...
function last (line 1) | function last(n){var c,o,w;if(!n)return null;w=d.createTreeWalker(n,Node...
function getXML (line 1) | function getXML(){var i=document.implementation;if(!i||!i.createDocument...
function getIEAtts (line 1) | function getIEAtts(n){var o=[];if(n.nodeName=='OBJECT')return n.attribut...
function wildcardToRE (line 1) | function wildcardToRE(s){return s.replace(/([?+*])/g,'.$1');}
function prevNode (line 1) | function prevNode(e,n){var a=n.split(','),i;while((e=e.previousSibling)!...
function enc (line 1) | function enc(s){return s.replace(/[\r\n\\]/g,function(c){if(c==='\n')ret...
function dec (line 1) | function dec(s){return s.replace(/\\[\\rn]/g,function(c){if(c==='\\n')re...
function loadScript (line 1) | function loadScript(u){if(Event.domLoaded||t.settings.strict_mode){tinym...
function done (line 1) | function done(o){o.state=2;if(o.func)o.func.call(o.scope||t);}
function allDone (line 1) | function allDone(){var l;l=sc.length;each(sc,function(o){o=lo[o.url];if(...
function load (line 1) | function load(o){if(o.state>0)return;o.state=1;tinymce.dom.ScriptLoader....
function done (line 1) | function done(){Event.clear(id);tinymce.DOM.remove(id);if(cb){cb.call(do...
function focus (line 1) | function focus(d){var i=t._focusIdx+d,e=DOM.select('a','menu_'+t.id)[i];...
function onChange (line 1) | function onChange(e){var v=t.items[e.target.selectedIndex-1];if(v&&(v=v....
function execCallback (line 1) | function execCallback(se,n,s){var f=se[n];if(!f)return;if(tinymce.is(f,'...
function hasClass (line 1) | function hasClass(n,c){return c.constructor===RegExp?c.test(n.className)...
function clr (line 1) | function clr(){ed.destroy();w.detachEvent('onunload',clr);w=w.tinyMCE=w....
function loadScripts (line 1) | function loadScripts(){if(s.language)sl.add(tinymce.baseURL+'/langs/'+s....
function repaint (line 1) | function repaint(a,o){if(!o||!o.initial)t.execCommand('mceRepaint');}
function handleCustom (line 1) | function handleCustom(ed,o){each(explode(s.custom_elements),function(v){...
function eventHandler (line 1) | function eventHandler(e,o){var ty=e.type;if(t.removed)return;if(t.onEven...
function setOpts (line 1) | function setOpts(){var t=this,d=t.getDoc(),s=t.settings;if(isGecko&&!s.r...
function tabCancel (line 1) | function tabCancel(ed,e){if(e.keyCode===9)return Event.cancel(e);}
function tabHandler (line 1) | function tabHandler(ed,e){var x,i,f,el,v;function find(d){f=DOM.getParen...
function find (line 1) | function find(e){var v=null;if(!e.altKey&&!e.ctrlKey&&!e.metaKey)return ...
function addUndo (line 1) | function addUndo(){t.undoManager.typing=0;t.undoManager.add();}
function convert (line 1) | function convert(ed,o){if(!s.inline_styles)return;if(o.get){each(t.dom.s...
function process (line 1) | function process(no){var n,sp,nl,x;if(!s.inline_styles)return;nl=t.dom.s...
function isBlock (line 1) | function isBlock(n){return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|OL|U...
function set (line 1) | function set(e){each(v,function(v,k){ed.dom.setAttrib(e,k,v);});}
function getParent (line 1) | function getParent(n){return dom.getParent(n,function(n){return n.nodeTy...
function set (line 1) | function set(n,e){if(n.nodeType==1){switch(v.command){case'setattrib':re...
function set (line 1) | function set(s){if(!isGecko)return;try{d.execCommand("styleWithCSS",0,s)...
function isBlock (line 1) | function isBlock(n){return/^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test...
function getBQ (line 1) | function getBQ(e){return dom.getParent(e,function(n){return n.nodeName==...
function replaceFonts (line 1) | function replaceFonts(){var bm;each(dom.select(tinymce.isWebKit&&!tinymc...
function padd (line 1) | function padd(ed,o){if(isOpera)o.content=o.content.replace(t.reOpera,'</...
function ren (line 1) | function ren(rn,na){var ne=ed.dom.create(na);each(rn.attributes,function...
function isEmpty (line 1) | function isEmpty(n){n=n.innerHTML;n=n.replace(/<(img|hr|table)/gi,'-');n...
function appendStyles (line 1) | function appendStyles(e,en){var nl=[],nn,n,i;e.innerHTML='';if(se.keep_s...
function first (line 1) | function first(n){return d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,...
function handler (line 1) | function handler(e){var pr;e=e.target;if(e&&e.parentNode&&e.nodeName=='B...
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/plugins/jquery-validation/jquery.validate.js
function handle (line 61) | function handle() {
function delegate (line 327) | function delegate(event) {
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/plugins/jquery-validation/lib/jquery-1.6.4.js
function jQuerySub (line 871) | function jQuerySub( selector, context ) {
function doScrollCheck (line 937) | function doScrollCheck() {
function resolveFunc (line 1127) | function resolveFunc( i ) {
function dataAttr (line 1728) | function dataAttr( elem, key, data ) {
function isEmptyDataObject (line 1761) | function isEmptyDataObject( obj ) {
function handleQueueMarkDefer (line 1774) | function handleQueueMarkDefer( elem, type, src ) {
function resolve (line 1924) | function resolve() {
function returnFalse (line 3169) | function returnFalse() {
function returnTrue (line 3172) | function returnTrue() {
function trigger (line 3416) | function trigger( type, elem, args ) {
function handler (line 3451) | function handler( donor ) {
function liveHandler (line 3655) | function liveHandler( event ) {
function liveConvert (line 3743) | function liveConvert( type, selector ) {
function dirNodeCheck (line 5058) | function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
function dirCheck (line 5091) | function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
function isDisconnected (line 5371) | function isDisconnected( node ) {
function winnow (line 5493) | function winnow( elements, qualifier, keep ) {
function root (line 5873) | function root( elem, cur ) {
function cloneCopyEvent (line 5880) | function cloneCopyEvent( src, dest ) {
function cloneFixAttributes (line 5909) | function cloneFixAttributes( src, dest ) {
function getAll (line 6041) | function getAll( elem ) {
function fixDefaultChecked (line 6054) | function fixDefaultChecked( elem ) {
function findInputs (line 6060) | function findInputs( elem ) {
function evalScript (line 6279) | function evalScript( i, elem ) {
function getWH (line 6617) | function getWH( elem, name, extra ) {
function addToPrefiltersOrTransports (line 6743) | function addToPrefiltersOrTransports( structure ) {
function inspectPrefiltersOrTransports (line 6779) | function inspectPrefiltersOrTransports( structure, options, originalOpti...
function ajaxExtend (line 6821) | function ajaxExtend( target, src ) {
function done (line 7163) | function done( status, nativeStatusText, responses, headers ) {
function buildParams (line 7478) | function buildParams( prefix, obj, traditional, add ) {
function ajaxHandleResponses (line 7528) | function ajaxHandleResponses( s, jqXHR, responses ) {
function ajaxConvert (line 7593) | function ajaxConvert( s, response ) {
function createStandardXHR (line 7859) | function createStandardXHR() {
function createActiveXHR (line 7865) | function createActiveXHR() {
function createFxNow (line 8344) | function createFxNow() {
function clearFxNow (line 8349) | function clearFxNow() {
function genFx (line 8354) | function genFx( type, num ) {
function t (line 8464) | function t( gotoEnd ) {
function defaultDisplay (line 8619) | function defaultDisplay( nodeName ) {
function getWindow (line 8965) | function getWindow( elem ) {
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/plugins/jquery-validation/lib/jquery-1.7.2.js
function jQuerySub (line 897) | function jQuerySub( selector, context ) {
function doScrollCheck (line 963) | function doScrollCheck() {
function createFlags (line 990) | function createFlags( flags ) {
function resolveFunc (line 1325) | function resolveFunc( i ) {
function progressFunc (line 1333) | function progressFunc( i ) {
function dataAttr (line 1985) | function dataAttr( elem, key, data ) {
function isEmptyDataObject (line 2016) | function isEmptyDataObject( obj ) {
function handleQueueMarkDefer (line 2034) | function handleQueueMarkDefer( elem, type, src ) {
function resolve (line 2193) | function resolve() {
function returnFalse (line 3546) | function returnFalse() {
function returnTrue (line 3549) | function returnTrue() {
function dirNodeCheck (line 5260) | function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
function dirCheck (line 5293) | function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
function isDisconnected (line 5566) | function isDisconnected( node ) {
function winnow (line 5683) | function winnow( elements, qualifier, keep ) {
function createSafeFragment (line 5720) | function createSafeFragment( document ) {
function root (line 6092) | function root( elem, cur ) {
function cloneCopyEvent (line 6099) | function cloneCopyEvent( src, dest ) {
function cloneFixAttributes (line 6127) | function cloneFixAttributes( src, dest ) {
function getAll (line 6272) | function getAll( elem ) {
function fixDefaultChecked (line 6285) | function fixDefaultChecked( elem ) {
function findInputs (line 6291) | function findInputs( elem ) {
function shimCloneNode (line 6302) | function shimCloneNode( elem ) {
function getWidthOrHeight (line 6793) | function getWidthOrHeight( elem, name, extra ) {
function addToPrefiltersOrTransports (line 7034) | function addToPrefiltersOrTransports( structure ) {
function inspectPrefiltersOrTransports (line 7070) | function inspectPrefiltersOrTransports( structure, options, originalOpti...
function ajaxExtend (line 7112) | function ajaxExtend( target, src ) {
function done (line 7454) | function done( status, nativeStatusText, responses, headers ) {
function buildParams (line 7769) | function buildParams( prefix, obj, traditional, add ) {
function ajaxHandleResponses (line 7819) | function ajaxHandleResponses( s, jqXHR, responses ) {
function ajaxConvert (line 7884) | function ajaxConvert( s, response ) {
function createStandardXHR (line 8149) | function createStandardXHR() {
function createActiveXHR (line 8155) | function createActiveXHR() {
function doAnimation (line 8494) | function doAnimation() {
function stopQueue (line 8650) | function stopQueue( elem, data, index ) {
function createFxNow (line 8692) | function createFxNow() {
function clearFxNow (line 8697) | function clearFxNow() {
function genFx (line 8702) | function genFx( type, num ) {
function t (line 8817) | function t( gotoEnd ) {
function defaultDisplay (line 9015) | function defaultDisplay( nodeName ) {
function getWindow (line 9299) | function getWindow( elem ) {
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/plugins/jquery-validation/lib/jquery-1.8.3.js
function createOptions (line 911) | function createOptions( options ) {
function dataAttr (line 1801) | function dataAttr( elem, key, data ) {
function isEmptyDataObject (line 1833) | function isEmptyDataObject( obj ) {
function returnFalse (line 3274) | function returnFalse() {
function returnTrue (line 3277) | function returnTrue() {
function Sizzle (line 3880) | function Sizzle( selector, context, results, seed ) {
function createInputPseudo (line 3949) | function createInputPseudo( type ) {
function createButtonPseudo (line 3957) | function createButtonPseudo( type ) {
function createPositionalPseudo (line 3965) | function createPositionalPseudo( fn ) {
function siblingCheck (line 4560) | function siblingCheck( a, b, ret ) {
function tokenize (line 4683) | function tokenize( selector, parseOnly ) {
function addCombinator (line 4746) | function addCombinator( matcher, combinator, base ) {
function elementMatcher (line 4798) | function elementMatcher( matchers ) {
function condense (line 4812) | function condense( unmatched, map, filter, context, xml ) {
function setMatcher (line 4833) | function setMatcher( preFilter, selector, matcher, postFilter, postFinde...
function matcherFromTokens (line 4926) | function matcherFromTokens( tokens ) {
function matcherFromGroupMatchers (line 4978) | function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
function multipleContexts (line 5102) | function multipleContexts( selector, contexts, results ) {
function select (line 5111) | function select( selector, context, results, seed, xml ) {
function setFilters (line 5338) | function setFilters() {}
function isDisconnected (line 5504) | function isDisconnected( node ) {
function sibling (line 5508) | function sibling( cur, dir ) {
function winnow (line 5616) | function winnow( elements, qualifier, keep ) {
function createSafeFragment (line 5649) | function createSafeFragment( document ) {
function findOrAppend (line 6033) | function findOrAppend( elem, tag ) {
function cloneCopyEvent (line 6037) | function cloneCopyEvent( src, dest ) {
function cloneFixAttributes (line 6065) | function cloneFixAttributes( src, dest ) {
function getAll (line 6208) | function getAll( elem ) {
function fixDefaultChecked (line 6221) | function fixDefaultChecked( elem ) {
function jQuerySub (line 6517) | function jQuerySub( selector, context ) {
function vendorPropName (line 6563) | function vendorPropName( style, name ) {
function isHidden (line 6585) | function isHidden( elem, el ) {
function showHide (line 6590) | function showHide( elements, show ) {
function setPositiveNumber (line 6900) | function setPositiveNumber( elem, value, subtract ) {
function augmentWidthOrHeight (line 6907) | function augmentWidthOrHeight( elem, name, extra, isBorderBox ) {
function getWidthOrHeight (line 6949) | function getWidthOrHeight( elem, name, extra ) {
function css_defaultDisplay (line 6992) | function css_defaultDisplay( nodeName ) {
function buildParams (line 7246) | function buildParams( prefix, obj, traditional, add ) {
function addToPrefiltersOrTransports (line 7335) | function addToPrefiltersOrTransports( structure ) {
function inspectPrefiltersOrTransports (line 7369) | function inspectPrefiltersOrTransports( structure, options, originalOpti...
function ajaxExtend (line 7411) | function ajaxExtend( target, src ) {
function done (line 7722) | function done( status, nativeStatusText, responses, headers ) {
function ajaxHandleResponses (line 8015) | function ajaxHandleResponses( s, jqXHR, responses ) {
function ajaxConvert (line 8077) | function ajaxConvert( s, response ) {
function createStandardXHR (line 8344) | function createStandardXHR() {
function createActiveXHR (line 8350) | function createActiveXHR() {
function createFxNow (line 8604) | function createFxNow() {
function createTweens (line 8611) | function createTweens( animation, props ) {
function Animation (line 8626) | function Animation( elem, properties, options ) {
function propFilter (line 8724) | function propFilter( props, specialEasing ) {
function defaultPrefilter (line 8791) | function defaultPrefilter( elem, props, opts ) {
function Tween (line 8915) | function Tween( elem, options, prop, end, easing ) {
function genFx (line 9099) | function genFx( type, includeWidth ) {
function getWindow (line 9405) | function getWindow( elem ) {
FILE: miaosha-v2/miaosha-web/src/main/resources/static/js/plugins/jquery-validation/lib/jquery-1.9.0.js
function isArraylike (line 931) | function isArraylike( obj ) {
function createOptions (line 954) | function createOptions( options ) {
function internalData (line 1525) | function internalData( elem, name, data, pvt /* Internal Use Only */ ){
function internalRemoveData (line 1619) | function internalRemoveData( elem, name, pvt /* For internal use only */ ){
function dataAttr (line 1811) | function dataAttr( elem, k
Copy disabled (too large)
Download .json
Condensed preview — 866 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (11,344K chars).
[
{
"path": ".gitattributes",
"chars": 87,
"preview": "*.js linguist-language=java\n*.css linguist-language=java\n*.html linguist-language=java\n"
},
{
"path": ".gitignore",
"chars": 852,
"preview": "# IntelliJ project files\n.DS_Store\n.idea/\n*.iml\n.mvn/*\nout\n# CMake\ncmake-build-*/\n\n# File-based project format\n*.iws\n# I"
},
{
"path": "CHANGELOG.md",
"chars": 61,
"preview": "## 修改记录\n\n### 1.0.0\n- 将秒杀项目进行模块化划分\n- 基础依赖版本升级\n- 新增.mvn等无需跟踪文件\n"
},
{
"path": "README.md",
"chars": 2815,
"preview": "大家好,我是GEEK.Q,我对自己的经验知识做了一个系统的整理,有自己的迭代项目,框架,也有一些学习笔记和画的图。\n本GitHub还有许多其他的知识,随时欢迎探讨与骚扰!如果想一起**维护**或者**文章出现瑕疵**请及时与我联系【邮箱Qi"
},
{
"path": "docs/code-criterion.md",
"chars": 3472,
"preview": "### 代码规范 \n\n 老司机一般的规范大家都知道类似驼峰,匹配一类的大家都知道具体则不再提\n 有问题或者宝贵意见联系我的QQ,非常希望你的加入!\n \n##要求:\n1.lombok-- idea插件请大家下载 ,去除set"
},
{
"path": "docs/code-rpc.md",
"chars": 3751,
"preview": "### 分布式事务的讲解与实现 \n\n 基础的ACID等等就不一一介绍了\n 有问题或者宝贵意见联系我的QQ,非常希望你的加入!\n \n##简介:\n\n 基础的ACID等等就不一一介绍了,柔性事务一类的大家在网上一搜都是,"
},
{
"path": "docs/code-solve.md",
"chars": 6140,
"preview": "### 秒杀常见问题\n\n 有问题或者宝贵意见联系我的QQ,非常希望你的加入!\n \n> 秒杀注意事项以及整体简略设计\n#### [1.如何解决卖超问题]() \n --在sql加上判断防止数据变为负数 \n --数据库加"
},
{
"path": "docs/dubbo-admin.md",
"chars": 472,
"preview": "### dubbo-admin 平台搭建与管理\n\n 有问题或者宝贵意见联系我的QQ,非常希望你的加入!\n \n#### [dubbo-admin-2.6.0 war包 请进入/docs/dubbo-admin/下载](/docs/"
},
{
"path": "docs/dubbo-zk.md",
"chars": 1715,
"preview": "### dubbo + zk 使用与进阶 \n\n 有问题或者宝贵意见联系我的QQ,非常希望你的加入!\n \n>目标 (希望大家仔细研究dubbo文档 源码分析正在更新中打算实现自己的rpc框架 请看dubbo-die )\n\n "
},
{
"path": "docs/fenbushi-tcc.md",
"chars": 4922,
"preview": "### 分布式事务\n\n 有问题或者宝贵意见联系我的QQ,非常希望你的加入!\n \n>目标 (希望大家仔细研究redis.conf配置文件-本文很多基础的一带而过)\n\n 1.事务简介\n 2.分布式事务的前世今生\n "
},
{
"path": "docs/fenbushi.md",
"chars": 761,
"preview": "### 分布式系统\n\n 有问题或者宝贵意见联系我的QQ,非常希望你的加入!\n \n> 分布式系统历程----1\n\n\n\n 任何优化多需要场景,本次所有的场景为京东商城的数据库设计模拟!\n 有问题或者宝贵意见联系我的QQ,非常希望你的加入!\n \n##简介:\n\n 设计:\n"
},
{
"path": "docs/mysql-3.md",
"chars": 280,
"preview": "### 数据库备份和恢复 + 数据库架构变迁\n\n 有问题或者宝贵意见联系我的QQ,非常希望你的加入!\n \n## 简介:\n\n\n\n 本文章安排目标:\n 1. 对于存储层的压力知道如何去提供解决方案和思路\n 2. 对分库分表的常用手段有全面了解\n 3. 了解Mysql的主从及binlo"
},
{
"path": "docs/mysql-mvcc.md",
"chars": 2586,
"preview": "### MVCC原理\nMulti-Version Concurrency Control,翻译为中文即多版本并发控制,使用它来实现RR以及RC隔离级别下读取数据的隔离性。串行话可以理解为直接用锁,而读未提交可以理解成什么也不控制。\n "
},
{
"path": "docs/mysql.md",
"chars": 6145,
"preview": "### mysql数据库设计与优化与架构 模拟场景(京东商城)\n\n 任何优化多需要场景,本次所有的场景为京东商城的数据库设计模拟!\n 有问题或者宝贵意见联系我的QQ,非常希望你的加入!\n \n##简介:\n\n 设计:\n"
},
{
"path": "docs/netty.md",
"chars": 8116,
"preview": "### Netty 教程\n\n 有问题或者宝贵意见联系我的QQ,非常希望你的加入!\n \n\n####了解NIO和IO\n\n| NIO | IO |\n| :---:| :---:| \n| 面向缓存区 | 面向流 | \n"
},
{
"path": "docs/ngnix-good.md",
"chars": 6895,
"preview": "### 秒杀nginx优化 \n\n 有问题或者宝贵意见联系我的QQ,非常希望你的加入!\n \n##要求:\n>目标\n\n 1.并发优化\n 2.KeepALive长连接优化\n 3.压缩优化\n 4.配置缓存\n "
},
{
"path": "docs/old.md",
"chars": 4837,
"preview": "\n\n> 邮箱 : [QiuRunZ"
},
{
"path": "docs/redis-good.md",
"chars": 6270,
"preview": "### redis 使用与进阶 \n\n 有问题或者宝贵意见联系我的QQ,非常希望你的加入!\n \n>目标 (希望大家仔细研究redis.conf配置文件-本文很多基础的一带而过)\n\n 1.redis分布式锁,zk分布式锁,lu"
},
{
"path": "docs/redis-lua.md",
"chars": 54,
"preview": "### lua学习\n\n 有问题或者宝贵意见联系我的QQ,非常希望你的加入!\n \n>数据类型\n "
},
{
"path": "docs/tomcat-good.md",
"chars": 2913,
"preview": "xiu修改### 秒杀tomcat优化 \n\n 有问题或者宝贵意见联系我的QQ,非常希望你的加入!\n \n##要求:\n> 本文以tomcat8.5.20为准 \n>目标\n\n 1.内存优化\n 2.并发优化\n 3.APR"
},
{
"path": "miaosha-admin/.gitignore",
"chars": 22,
"preview": "/.settings/\n/.project\n"
},
{
"path": "miaosha-admin/miaosha-admin-api/pom.xml",
"chars": 912,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/Account.java",
"chars": 2100,
"preview": "package com.geekq.admin.entity;\n\nimport com.geekq.common.utils.md5.MD5Utils;\nimport com.geekq.common.utils.numcal.BidCon"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/BaseDomain.java",
"chars": 229,
"preview": "package com.geekq.admin.entity;\n\nimport lombok.Getter;\nimport lombok.Setter;\n\nimport java.io.Serializable;\n\n/**\n * @auth"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/IpLog.java",
"chars": 1041,
"preview": "package com.geekq.admin.entity;\n\nimport lombok.Getter;\nimport lombok.Setter;\nimport org.apache.ibatis.type.Alias;\n\nimpor"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/Logininfo.java",
"chars": 628,
"preview": "package com.geekq.admin.entity;\n\nimport com.geekq.common.enums.Constants;\nimport lombok.AllArgsConstructor;\nimport lombo"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/SystemDictionary.java",
"chars": 751,
"preview": "package com.geekq.admin.entity;\n\nimport com.alibaba.fastjson.JSONObject;\nimport lombok.Getter;\nimport lombok.Setter;\nimp"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/SystemDictionaryItem.java",
"chars": 918,
"preview": "package com.geekq.admin.entity;\n\nimport com.alibaba.fastjson.JSONObject;\nimport lombok.Getter;\nimport lombok.Setter;\nimp"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/entity/Userinfo.java",
"chars": 5189,
"preview": "package com.geekq.admin.entity;\n\nimport com.geekq.common.utils.numcal.BitStatesUtils;\nimport lombok.Getter;\nimport lombo"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/pojo/Orders.java",
"chars": 640,
"preview": "package com.geekq.admin.pojo;\n\npublic class Orders {\n private String id;\n\n private String orderNum;\n\n private S"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/pojo/OrdersExample.java",
"chars": 11967,
"preview": "package com.geekq.admin.pojo;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class OrdersExample {\n prot"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/query/IpLogQueryObject.java",
"chars": 888,
"preview": "package com.geekq.admin.query;\n\nimport com.geekq.common.utils.DateUtil;\nimport lombok.Getter;\nimport lombok.Setter;\nimpo"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/query/PageResult.java",
"chars": 1434,
"preview": "package com.geekq.admin.query;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class PageResult {\n\n priva"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/query/QueryObject.java",
"chars": 277,
"preview": "package com.geekq.admin.query;\n\nimport lombok.Getter;\nimport lombok.Setter;\n\n\n@Getter\n@Setter\npublic class QueryObject {"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/query/SystemDictionaryQueryObject.java",
"chars": 362,
"preview": "package com.geekq.admin.query;\n\nimport lombok.Getter;\nimport lombok.Setter;\nimport org.springframework.util.StringUtils;"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/IAccountService.java",
"chars": 262,
"preview": "package com.geekq.admin.service;\n\n\nimport com.geekq.admin.entity.Account;\n\nimport java.util.List;\n\npublic interface IAcc"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/IIpLogService.java",
"chars": 271,
"preview": "package com.geekq.admin.service;\n\nimport com.geekq.admin.entity.IpLog;\nimport com.geekq.admin.query.IpLogQueryObject;\nim"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/ILogininfoService.java",
"chars": 933,
"preview": "package com.geekq.admin.service;\n\nimport com.geekq.admin.entity.Logininfo;\nimport com.geekq.common.utils.resultbean.Resu"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/ISystemDictionaryService.java",
"chars": 619,
"preview": "package com.geekq.admin.service;\n\nimport com.geekq.admin.entity.SystemDictionary;\nimport com.geekq.admin.entity.SystemDi"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/IUserService.java",
"chars": 344,
"preview": "package com.geekq.admin.service;\n\n\nimport com.geekq.admin.entity.Userinfo;\n\npublic interface IUserService {\n\n void up"
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/OrdersService.java",
"chars": 290,
"preview": "package com.geekq.admin.service;\n\nimport com.geekq.admin.pojo.Orders;\n\npublic interface OrdersService {\n\n /**\n * "
},
{
"path": "miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/admin/service/RedisCacheStorageService.java",
"chars": 308,
"preview": "package com.geekq.admin.service;\n\nimport com.geekq.admin.entity.Logininfo;\n\npublic interface RedisCacheStorageService<K,"
},
{
"path": "miaosha-admin/miaosha-admin-common/.gitignore",
"chars": 43,
"preview": "/.classpath\n/.project\n/.settings/\n/target/\n"
},
{
"path": "miaosha-admin/miaosha-admin-common/pom.xml",
"chars": 1568,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/Constants.java",
"chars": 348,
"preview": "package com.geekq.common.enums;\n\n/**\n * @author 邱润泽\n * 常用数据静态变量类型集合\n */\npublic class Constants {\n\n public static fina"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/MessageStatus.java",
"chars": 1361,
"preview": "package com.geekq.common.enums;\n\npublic class MessageStatus {\n\n public static final Integer ZORE = 0;\n\n /**\n *"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/OrderStatusEnum.java",
"chars": 875,
"preview": "package com.geekq.common.enums;\n\n/**\n * @Description: 订单状态\n */\npublic enum OrderStatusEnum {\n\n WAIT_PAY(10, \"待付款\"), "
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/ResultStatus.java",
"chars": 2230,
"preview": "package com.geekq.common.enums;\n\n/**\n * 普通返回类\n * 1打头 系统系列错误\n * 2 注册登录系列错误\n * 3 check 系列错误\n * 4 秒杀错误\n * 5 商品错误\n * 6 订单错误\n"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/SexEnum.java",
"chars": 316,
"preview": "package com.geekq.common.enums;\n\n/**\n * @Description: 男女枚举\n */\npublic enum SexEnum {\n\n GIRL(0), // 女\n BOY(1"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/enums/YesOrNo.java",
"chars": 298,
"preview": "package com.geekq.common.enums;\n\n/**\n * @Description: 是否枚举\n */\npublic enum YesOrNo {\n\n YES(1), // 是\t有错误\n "
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/Constanst.java",
"chars": 520,
"preview": "package com.geekq.common.utils;\n\npublic class Constanst {\n public static String CLOSE_ORDER_INFO_TASK_LOCK = \"CLOSE_O"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/DBContextUtil.java",
"chars": 386,
"preview": "package com.geekq.common.utils;\n\npublic class DBContextUtil {\n\n public static final String DBMASTER = \"dbmaster\";\n "
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/DateUtil.java",
"chars": 463,
"preview": "package com.geekq.common.utils;\n\n\nimport org.apache.commons.lang3.time.DateUtils;\n\nimport java.util.Calendar;\nimport jav"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/JsonUtils.java",
"chars": 1731,
"preview": "package com.geekq.common.utils;\n\nimport com.fasterxml.jackson.core.JsonProcessingException;\nimport com.fasterxml.jackson"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/SnowflakeIdWorker.java",
"chars": 4860,
"preview": "package com.geekq.common.utils;\n\n/**\n * Twitter_Snowflake<br>\n * SnowFlake的结构如下(每部分用-分开):<br>\n * 0 - 0000000000 00000000"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/ValidatorUtil.java",
"chars": 466,
"preview": "package com.geekq.common.utils;\n\nimport org.apache.commons.lang3.StringUtils;\n\nimport java.util.regex.Matcher;\nimport ja"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/md5/MD5Utils.java",
"chars": 1571,
"preview": "package com.geekq.common.utils.md5;\n\nimport org.apache.commons.codec.binary.Base64;\nimport org.apache.commons.codec.dige"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/numcal/BidConst.java",
"chars": 3921,
"preview": "package com.geekq.common.utils.numcal;\n\nimport java.math.BigDecimal;\n\n/**\n * 系统需要的常量\n *\n * @author 邱润泽\n */\npublic class "
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/numcal/BitStatesUtils.java",
"chars": 1314,
"preview": "package com.geekq.common.utils.numcal;\n\n/**\n * 用户状态类,记录用户在平台使用系统中所有的状态。\n *\n * @author 邱润泽\n */\npublic class BitStatesUtil"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/numcal/CalculateUtil.java",
"chars": 9828,
"preview": "package com.geekq.common.utils.numcal;\n\nimport java.math.BigDecimal;\nimport java.math.RoundingMode;\n\n/**\n * 计算器Util\n * @"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/numcal/DecimalFormatUtil.java",
"chars": 1121,
"preview": "package com.geekq.common.utils.numcal;\n\nimport java.math.BigDecimal;\nimport java.math.RoundingMode;\n\n/**\n * 大数字格式化工具类\n *"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/resultbean/AbstractResult.java",
"chars": 1685,
"preview": "package com.geekq.common.utils.resultbean;\n\n\nimport com.geekq.common.enums.ResultStatus;\n\npublic class AbstractResult {\n"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/resultbean/ResultGeekQ.java",
"chars": 1210,
"preview": "package com.geekq.common.utils.resultbean;\n\n\nimport com.geekq.common.enums.ResultStatus;\n\nimport java.io.Serializable;\n\n"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/utils/resultbean/ResultJSON.java",
"chars": 485,
"preview": "package com.geekq.common.utils.resultbean;\n\nimport lombok.Getter;\nimport lombok.Setter;\n\n/**\n * @author 邱润泽\n */\n@Getter\n"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/validator/MobileCheck.java",
"chars": 568,
"preview": "package com.geekq.common.validator;\n\nimport javax.validation.Constraint;\nimport javax.validation.Payload;\nimport java.la"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/validator/MobileValidator.java",
"chars": 843,
"preview": "package com.geekq.common.validator;\n\nimport com.geekq.common.utils.ValidatorUtil;\nimport org.apache.commons.lang3.String"
},
{
"path": "miaosha-admin/miaosha-admin-common/src/main/java/com/geekq/common/vo/LoginVo.java",
"chars": 635,
"preview": "package com.geekq.common.vo;\n\nimport com.geekq.common.validator.MobileCheck;\nimport lombok.AllArgsConstructor;\nimport lo"
},
{
"path": "miaosha-admin/miaosha-admin-service/pom.xml",
"chars": 2465,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLoca"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/AccountMapper.java",
"chars": 321,
"preview": "package com.geekq.admin.mapper;\n\n\nimport com.geekq.admin.entity.Account;\n\nimport java.util.List;\n\npublic interface Accou"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/AccountMapper.xml",
"chars": 3332,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/IpLogMapper.java",
"chars": 445,
"preview": "package com.geekq.admin.mapper;\n\nimport com.geekq.admin.entity.IpLog;\nimport com.geekq.admin.query.IpLogQueryObject;\n\nim"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/IpLogMapper.xml",
"chars": 3059,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/LogininfoMapper.java",
"chars": 914,
"preview": "package com.geekq.admin.mapper;\n\nimport com.geekq.admin.entity.Logininfo;\nimport org.apache.ibatis.annotations.Param;\n\ni"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/LogininfoMapper.xml",
"chars": 3058,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org/"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/OrdersMapper.java",
"chars": 828,
"preview": "package com.geekq.admin.mapper;\n\nimport com.geekq.admin.pojo.Orders;\nimport com.geekq.admin.pojo.OrdersExample;\nimport o"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/OrdersMapper.xml",
"chars": 6505,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/SystemDictionaryItemMapper.java",
"chars": 774,
"preview": "package com.geekq.admin.mapper;\n\nimport com.geekq.admin.entity.SystemDictionaryItem;\nimport com.geekq.admin.query.System"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/SystemDictionaryItemMapper.xml",
"chars": 3017,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/SystemDictionaryMapper.java",
"chars": 559,
"preview": "package com.geekq.admin.mapper;\n\n\nimport com.geekq.admin.entity.SystemDictionary;\nimport com.geekq.admin.query.SystemDic"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/SystemDictionaryMapper.xml",
"chars": 2189,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/UserinfoMapper.java",
"chars": 478,
"preview": "package com.geekq.admin.mapper;\n\nimport com.geekq.admin.entity.Userinfo;\nimport org.apache.ibatis.annotations.Param;\n\nim"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/mapper/UserinfoMapper.xml",
"chars": 4014,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\" \"http://mybatis.org"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/redis/RedisClient.java",
"chars": 3564,
"preview": "package com.geekq.admin.redis;\n\nimport com.alibaba.fastjson.JSON;\nimport redis.clients.jedis.Jedis;\nimport redis.clients"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/AccountServiceImpl.java",
"chars": 1315,
"preview": "package com.geekq.admin.service.impl;\n\nimport com.geekq.admin.entity.Account;\nimport com.geekq.admin.mapper.AccountMappe"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/IpLogServiceImpl.java",
"chars": 1088,
"preview": "package com.geekq.admin.service.impl;\n\nimport com.geekq.admin.entity.IpLog;\nimport com.geekq.admin.mapper.IpLogMapper;\ni"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/LogininfoServiceImpl.java",
"chars": 4144,
"preview": "package com.geekq.admin.service.impl;\n\nimport com.geekq.admin.entity.Account;\nimport com.geekq.admin.entity.IpLog;\nimpor"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/OrdersServiceImpl.java",
"chars": 1036,
"preview": "package com.geekq.admin.service.impl;\n\nimport com.geekq.admin.mapper.OrdersMapper;\nimport com.geekq.admin.pojo.Orders;\ni"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/RedisCache.java",
"chars": 2644,
"preview": "package com.geekq.admin.service.impl;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.springframewo"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/RedisCacheStorageServiceImpl.java",
"chars": 2601,
"preview": "package com.geekq.admin.service.impl;\n\nimport com.alibaba.fastjson.JSON;\nimport com.geekq.admin.entity.Logininfo;\nimport"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/SystemDictionaryServiceImpl.java",
"chars": 2500,
"preview": "package com.geekq.admin.service.impl;\n\nimport com.geekq.admin.entity.SystemDictionary;\nimport com.geekq.admin.entity.Sys"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/SystemDictionaryUtil.java",
"chars": 577,
"preview": "package com.geekq.admin.service.impl;\n\nimport com.geekq.admin.entity.SystemDictionaryItem;\nimport com.geekq.admin.servic"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/service/impl/UserServiceImpl.java",
"chars": 2002,
"preview": "package com.geekq.admin.service.impl;\n\nimport com.geekq.admin.entity.Userinfo;\nimport com.geekq.admin.mapper.UserinfoMap"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/admin/utils/UserContext.java",
"chars": 2193,
"preview": "package com.geekq.admin.utils;\n\n\nimport com.geekq.admin.entity.Logininfo;\nimport org.springframework.beans.factory.annot"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/resources/dubbo/dubbo.xsd",
"chars": 61503,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n "
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/resources/log4j.properties",
"chars": 347,
"preview": "log4j.rootLogger=INFO,console\n#INFO,console,dailyFile\n\nlog4j.logger.com.geekq.mapper=INFO\n\nlog4j.appender.console=org.ap"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/resources/mybatis/SqlMapConfig.xml",
"chars": 1961,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE configuration\n\t\tPUBLIC \"-//mybatis.org//DTD Config 3.0//EN\"\n\t\t\"http://"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/resources/resource/db.properties",
"chars": 158,
"preview": "jdbc.driver=com.mysql.jdbc.Driver\njdbc.url=jdbc:mysql://localhost:3306/miaosha2?characterEncoding=utf-8\njdbc.username=ro"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/resources/resource/redis.properties",
"chars": 176,
"preview": "\n#访问地址\nredis.host=39.107.245.253\nredis.port=6379\nredis.pass=youxin11\n\nredis.maxIdle=25\nredis.maxActive=100\nredis.maxWait"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-dao.xml",
"chars": 2545,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:context=\"http:/"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-dubbo-provider.xml",
"chars": 1621,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:xsi=\"http://www"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-redis.xml",
"chars": 1998,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n xmlns:xsi=\"http"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-service.xml",
"chars": 1241,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:context=\"http:/"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-transaction.xml",
"chars": 2099,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:context=\"http:/"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/resources/spring/spring-context.xml",
"chars": 654,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:xsi=\"http://www"
},
{
"path": "miaosha-admin/miaosha-admin-service/src/main/webapp/WEB-INF/web.xml",
"chars": 870,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<web-app xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txmlns=\"http://jav"
},
{
"path": "miaosha-admin/miaosha-admin-web/pom.xml",
"chars": 2540,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/controller/BaseController.java",
"chars": 99,
"preview": "package com.geekq.web.controller;\n\n/**\n * @author 邱润泽\n */\nabstract public class BaseController {\n}\n"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/controller/LoginController.java",
"chars": 1677,
"preview": "package com.geekq.web.controller;\n\nimport com.geekq.admin.entity.Logininfo;\nimport com.geekq.admin.service.ILogininfoSer"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/controller/PayController.java",
"chars": 553,
"preview": "package com.geekq.web.controller;\n\nimport com.geekq.web.interceptor.RequiredLogin;\nimport com.geekq.web.service.CulsterS"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/controller/PersonController.java",
"chars": 1287,
"preview": "package com.geekq.web.controller;\n\nimport com.geekq.admin.entity.Logininfo;\nimport com.geekq.admin.service.IAccountServi"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/controller/RegisterController.java",
"chars": 1730,
"preview": "package com.geekq.web.controller;\n\nimport com.geekq.admin.service.ILogininfoService;\nimport com.geekq.common.enums.Const"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/interceptor/AddGlobalUtilInterceptor.java",
"chars": 919,
"preview": "package com.geekq.web.interceptor;\n\nimport com.geekq.admin.service.impl.SystemDictionaryUtil;\nimport org.springframework"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/interceptor/LoginInterceptor.java",
"chars": 1374,
"preview": "package com.geekq.web.interceptor;\n\nimport com.geekq.admin.entity.Logininfo;\nimport com.geekq.admin.service.RedisCacheSt"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/interceptor/RequiredLogin.java",
"chars": 299,
"preview": "package com.geekq.web.interceptor;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimpo"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/service/CulsterService.java",
"chars": 201,
"preview": "package com.geekq.web.service;\n\npublic interface CulsterService {\n\n /**\n * @Description: 购买商品\n */\n public "
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/service/impl/CulsterServiceImpl.java",
"chars": 1383,
"preview": "package com.geekq.web.service.impl;\n\nimport com.geekq.admin.service.OrdersService;\nimport com.geekq.web.service.CulsterS"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/resources/log4j.properties",
"chars": 347,
"preview": "log4j.rootLogger=INFO,console\n#INFO,console,dailyFile\n\nlog4j.logger.com.geekq.mapper=INFO\n\nlog4j.appender.console=org.ap"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/resources/spring/applicationContext-dubbo-consumer.xml",
"chars": 1992,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:xsi=\"http://www"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/resources/spring/applicationContext-service.xml",
"chars": 1238,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:context=\"http:/"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/resources/spring/springmvc.xml",
"chars": 3518,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<beans xmlns=\"http://www.springframework.org/schema/beans\"\n\txmlns:xsi=\"http://www"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/bankInfo.ftl",
"chars": 3234,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/bankInfo_result.ftl",
"chars": 1410,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/bidRequest_list.ftl",
"chars": 3359,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/bid_list.ftl",
"chars": 3281,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/borrow.ftl",
"chars": 3294,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<me"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/borrow_apply.ftl",
"chars": 6584,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/borrow_apply_result.ftl",
"chars": 787,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/borrow_info.ftl",
"chars": 11225,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/checkmail_result.ftl",
"chars": 2652,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<me"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/common/footer-tpl.ftl",
"chars": 695,
"preview": "<div class=\"container-foot-2\">\n\t<div class=\"context\">\n\t\t<div class=\"left\">\n\t\t\t<p>专注于高级Java开发工程师的培养</p>\n\t\t\t<p>版权所有: "
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/common/head-tpl.ftl",
"chars": 628,
"preview": "<div class=\"el-header\" >\n\t\t<div class=\"container\" style=\"position: relative;\">\n\t\t\t<ul class=\"nav navbar-nav navbar-right"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/common/leftmenu-tpl.ftl",
"chars": 1293,
"preview": "<ul id=\"menu\" class=\"list-group\">\n\t<li class=\"list-group-item\">\n\t\t<a href=\"javascript:;\"><span>借贷项目</span></a>\n\t\t<ul>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/common/links-tpl.ftl",
"chars": 391,
"preview": "<link rel=\"stylesheet\" href=\"/js/bootstrap-3.3.2-dist/css/bootstrap.css\" type=\"text/css\" />\n<link rel=\"stylesheet\" href="
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/common/loadSystemDictionary-macro.ftl",
"chars": 165,
"preview": "<#macro loadDictionary sn>\n\t<#assign itemList = _DicUtil.list(sn)/>\n\t<#list itemList as item>\n\t\t<option value=\"${item.id"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/common/navbar-tpl.ftl",
"chars": 633,
"preview": "<div class=\"navbar navbar-default el-navbar\">\n\t<div class=\"container\">\n\t\t<div class=\"navbar-header\">\n\t\t\t<a href=\"/\">\n\t\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/invest.ftl",
"chars": 2359,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<me"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/invest_list.ftl",
"chars": 1000,
"preview": "<#if pageResult.result?size > 0 >\n\t<#list pageResult.result as data>\n\t\t<tr>\n\t\t\t<td>${data.createUser.username }</td>\n"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/iplog_list.ftl",
"chars": 3512,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/main.ftl",
"chars": 4447,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/moneyWithdraw_apply.ftl",
"chars": 4350,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<me"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/personal.ftl",
"chars": 7741,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/realAuth.ftl",
"chars": 6650,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/realAuth_result.ftl",
"chars": 1591,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/recharge.ftl",
"chars": 5106,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/recharge_list.ftl",
"chars": 3945,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/returnmoney_list.ftl",
"chars": 5080,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/userFiles.ftl",
"chars": 2459,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/userFiles_commit.ftl",
"chars": 2256,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/views/userInfo.ftl",
"chars": 5409,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n\t<head>\n\t\t"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/web.xml",
"chars": 1580,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<web-app id=\"WebApp_9\" version=\"2.4\" xmlns=\"http://java.sun.com/xml/ns/j2ee\"\n\txml"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/bootstrap.html",
"chars": 2999,
"preview": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n<meta charset=\"utf-8\">\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/borrow.html",
"chars": 3915,
"preview": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<me"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/css/account.css",
"chars": 1435,
"preview": "#menu>li.active {\n\tbackground: none;\n\tborder: 1px solid #ddd;\n}\n\n#menu>li.list-group-item {\n\tpadding: 0px;\n}\n\n#menu>li>a"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/css/bank.css",
"chars": 1263,
"preview": ".bank {\n\tbackground: url(\"../images/bank_list.png\") no-repeat scroll 0 0\n\t\ttransparent;\n\tcursor: pointer;\n\tdisplay: bloc"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/css/core.css",
"chars": 5038,
"preview": "body {\n\tfont: 14px/1.5 \"Verdana\", \"微软雅黑\", YaHei, tahoma, arial, Hiragino Sans GB,\n\t\t\"宋体\"\n}\n\n.el-header {\n\tbackground-col"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/index.html",
"chars": 76,
"preview": "<script type=\"text/javascript\">\n\twindow.location.href=\"/index.do\";\n</script>"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/My97DatePicker/My97DatePicker.htm",
"chars": 1331,
"preview": "<html>\n<head>\n<meta http-equiv=\"content-type\" content=\"text/xml; charset=utf-8\" />\n<title>My97DatePicker</title>\n<script"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/My97DatePicker/WdatePicker.js",
"chars": 7603,
"preview": "/*\n * My97 DatePicker 4.6 Prerelease\n * SITE: http://dp.my97.net\n * BLOG: http://my97.cnblogs.com\n * MAIL: smallcarrot@1"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/My97DatePicker/calendar.js",
"chars": 18009,
"preview": "/*\n * My97 DatePicker 4.6 Prerelease\n * SITE: http://dp.my97.net\n * BLOG: http://my97.cnblogs.com\n * MAIL: smallcarrot@1"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/My97DatePicker/config.js",
"chars": 213,
"preview": "var langList = \n[\n\t{name:'en',\tcharset:'UTF-8'},\n\t{name:'zh-cn',\tcharset:'gb2312'},\n\t{name:'zh-tw',\tcharset:'GBK'}\n];\n\nv"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/My97DatePicker/lang/en.js",
"chars": 631,
"preview": "var $lang={\nerrAlertMsg: \"Invalid date or the date out of range,redo or not?\",\naWeekStr: [\"wk\", \"Sun\", \"Mon\", \"Tue\", \"We"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/My97DatePicker/lang/zh-cn.js",
"chars": 329,
"preview": "var $lang={\nerrAlertMsg: \"ϷڸʽڳΧ,Ҫ?\",\naWeekStr: [\"\",\"\",\"һ\",\"\",\"\",\"\",\"\",\"\"],\naLongWeekStr:[\"\",\"\",\"һ\",\"ڶ\",\"\",\"\",\"\",\"\"],\naM"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/My97DatePicker/lang/zh-tw.js",
"chars": 329,
"preview": "var $lang={\nerrAlertMsg: \"Ϸڸʽڳ,ҪN?\",\naWeekStr: [\"\",\"\",\"һ\",\"\",\"\",\"\",\"\",\"\"],\naLongWeekStr:[\"\",\"\",\"һ\",\"ڶ\",\"\",\"\",\"\",\"\"],\naM"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/My97DatePicker/skin/WdatePicker.css",
"chars": 149,
"preview": ".Wdate{\n\tborder:#999 1px solid;\n\theight:20px;\n\tbackground:#fff url(datePicker.gif) no-repeat right;\n}\n\n.WdateFmtErr{\n\tfo"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/My97DatePicker/skin/default/datepicker.css",
"chars": 4157,
"preview": "/* \n * My97 DatePicker 4.6\n * Ƥ:default\n */\n\n/* ѡ DIV */\n.WdateDiv{\n\twidth:180px;\n\tbackground-color:#FFFFFF;\n\tborder:#bb"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/My97DatePicker/skin/whyGreen/datepicker.css",
"chars": 4278,
"preview": "/* \n * My97 DatePicker 4.6\n * Ƥ:whyGreen\n */\n \n/* ѡ DIV */\n.WdateDiv{\n\twidth:180px;\n\tbackground-color:#fff;\n\tborder:#C5E"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/bank.js",
"chars": 325,
"preview": "var SITE_BANK_TYPE_NAME_MAP = {\n\t1\t:\t\"中国工商银行\",\n\t2\t:\t\"中国农业银行\",\n\t3\t:\t\"中国建设银行\",\n\t4\t:\t\"中国招商银行\",\n\t5\t:\t\"中国民生银行\",\n\t6\t:\t\"中国交通银行\""
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/bootstrap-3.3.2-dist/css/bootstrap-theme.css",
"chars": 22608,
"preview": "/*!\n * Bootstrap v3.3.2 (http://getbootstrap.com)\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://gi"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/bootstrap-3.3.2-dist/css/bootstrap.css",
"chars": 141415,
"preview": "/*!\n * Bootstrap v3.3.2 (http://getbootstrap.com)\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://gi"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/bootstrap-3.3.2-dist/js/bootstrap.js",
"chars": 66732,
"preview": "/*!\n * Bootstrap v3.3.2 (http://getbootstrap.com)\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://gi"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/bootstrap-3.3.2-dist/js/npm.js",
"chars": 484,
"preview": "// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.\nrequ"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/jquery/jquery-2.1.3.js",
"chars": 247387,
"preview": "/*!\n * jQuery JavaScript Library v2.1.3\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Cop"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/metisMenu/metisMenu.css",
"chars": 1019,
"preview": "/*\n * metismenu - v1.1.3\n * A jQuery menu plugin for Bootstrap 3\n * https://github.com/onokumus/metisMenu\n *\n * Made by "
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/metisMenu/metisMenu.js",
"chars": 4089,
"preview": "/*\n * metismenu - v1.1.3\n * A jQuery menu plugin for Bootstrap 3\n * https://github.com/onokumus/metisMenu\n *\n * Made by "
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/datetimepicker/.gitattributes",
"chars": 483,
"preview": "# Auto detect text files and perform LF normalization\n* text=auto\n\n# Custom for Visual Studio\n*.cs diff=csharp\n*.sln"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/datetimepicker/.gitignore",
"chars": 64,
"preview": "# PHP Storm\n.idea\n*.iml\natlassian-ide-plugin.xml\nyuicompressor-*"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/datetimepicker/.travis.yml",
"chars": 118,
"preview": "before_script:\n - cd ./tests\n - echo \"new Date().toString();\" | phantomjs\nscript: phantomjs run-qunit.js tests.html\n"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/datetimepicker/README.md",
"chars": 18110,
"preview": "# Project : bootstrap-datetimepicker\n======================================\n\n[ 2013 http://xdsoft.net\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof th"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/flipcountdown/README.md",
"chars": 225,
"preview": "flipCountDown\n==============\n[Demo&Documentation][doc]\n\n\njQuery Plugin Flip Count Down Retro Clock\n\nflipCountDown\n\n![Scr"
},
{
"path": "miaosha-admin/miaosha-admin-web/src/main/webapp/js/plugins/flipcountdown/bower.json",
"chars": 874,
"preview": "{\n\t\"name\":\"flipcountdown\",\n\t\"version\": \"3.0.5\",\n\t\"main\": [\n\t\t\"jquery.flipcountdown.js\",\n\t\t\"jquery.flipcountdown.css\"\n\t],"
}
]
// ... and 666 more files (download for full content)
About this extraction
This page contains the full source code of the qiurunze123/miaosha GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 866 files (9.9 MB), approximately 2.7M tokens, and a symbol index with 2838 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.