-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
314 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
--- | ||
title: 介绍 | ||
date: 2023-12-22 22:37:52 | ||
permalink: /campus-imaotai | ||
--- | ||
<p align="center"><a href="https://oddfar.com/" target="_blank" rel="noopener noreferrer"><img width="180" src="https://note.oddfar.com/img/web.png" alt="logo"></a></p> | ||
|
||
<p align="center"> | ||
<a href="https://github.com/oddfar/campus-imaotai/stargazers"><img src="https://img.shields.io/github/stars/oddfar/campus-imaotai.svg"></a> | ||
<a href="https://github.com/oddfar/campus-imaotai/blob/master/LICENSE"><img src="https://img.shields.io/github/license/oddfar/campus-imaotai.svg"></a> | ||
</p> | ||
|
||
|
||
|
||
<p align="center"> i茅台app自动预约,每日自动预约,支持docker一键部署</p> | ||
|
||
<h2 align="center">Campus-imaotai</h2> | ||
|
||
[笔记仓库](https://github.com/oddfar/notes) | [我的博客](https://oddfar.com) | ||
|
||
## 项目介绍 | ||
|
||
i茅台app,每日自动预约茅台 | ||
|
||
- 平台注册账号(可用i茅台) | ||
|
||
- 添加多个用户 | ||
|
||
- 自动预约 | ||
|
||
- 类型选择(本市出货量最大的门店,或位置附近门店) | ||
|
||
- 自动旅行 | ||
|
||
- 首次旅行分享 | ||
|
||
- 获取申购耐力值 | ||
|
||
- 自定义时间/随机时间预约或旅行 | ||
|
||
- 结果消息推送 | ||
|
||
此项目使用 **Campus** 进行编写:<https://github.com/oddfar/campus> | ||
|
||
## 使用教程 | ||
|
||
- 文档:<https://github.com/oddfar/campus-imaotai/wiki> | ||
|
||
|
||
有问题请查看文档,查找 [issues](https://github.com/oddfar/campus-imaotai/issues) 上是否有相同问题! | ||
|
||
若没有则提交 [issues](https://github.com/oddfar/campus-imaotai/issues) ,附带详细的错误原因 | ||
|
||
不会Docker部署的,可使用客户端:<https://github.com/lisongkun/hygge-imaotai> | ||
|
||
|
||
## 贡献代码 | ||
|
||
若您有好的想法,发现一些 **BUG** 并修复了,欢迎提交 **Pull Request** 参与开源贡献 | ||
|
||
发起 pull request 请求,提交到 master 分支,等待作者合并 | ||
|
||
## 友情链接 | ||
|
||
- 葫芦娃项目 | ||
|
||
yize8888-maotai: <https://github.com/yize8888/maotai> | ||
|
||
## 演示图 | ||
|
||
|
||
|
||
| i茅台预约 | | | ||
| ------------------------------------------------------------ | ------------------------------------------------------------ | | ||
|  |  | | ||
| | | | ||
|  |  | | ||
|
||
## star 趋势图 | ||
|
||
 | ||
|
||
|
||
|
||
## 贡献 | ||
|
||
<a href="https://github.com/oddfar/campus-imaotai/graphs/contributors"> | ||
<img src="https://contrib.rocks/image?repo=oddfar/campus-imaotai" /> | ||
</a> | ||
|
||
## 声明 | ||
|
||
- 本项目涉及的数据由使用的个人或组织自行填写,本项目不对数据内容负责,包括但不限于数据的真实性、准确性、合法性。使用本项目所造成的一切后果,与本项目的所有贡献者无关,由使用的个人或组织完全承担。 | ||
- 本项目中涉及的第三方硬件、软件等,与本项目没有任何直接或间接的关系。本项目仅对部署和使用过程进行客观描述,不代表支持使用任何第三方硬件、软件。使用任何第三方硬件、软件,所造成的一切后果由使用的个人或组织承担,与本项目无关。 | ||
- 本项目中所有内容只供学习和研究使用,不得将本项目中任何内容用于违反国家/地区/组织等的法律法规或相关规定的其他用途。 | ||
- 所有基于本项目源代码,进行的任何修改,为其他个人或组织的自发行为,与本项目没有任何直接或间接的关系,所造成的一切后果亦与本项目无关。 | ||
- 所有直接或间接使用本项目的个人和组织,应24小时内完成学习和研究,并及时删除本项目中的所有内容。如对本项目的功能有需求,应自行开发相关功能。 | ||
- 本项目保留随时对免责声明进行补充或更改的权利,直接或间接使用本项目内容的个人或组织,视为接受本项目的特别声明。 | ||
|
||
## 鸣谢 | ||
|
||
> [IntelliJ IDEA](https://zh.wikipedia.org/zh-hans/IntelliJ_IDEA) 是一个在各个方面都最大程度地提高开发人员的生产力的 IDE,适用于 JVM 平台语言。 | ||
特别感谢 [JetBrains](https://www.jetbrains.com/?from=campus) 为开源项目提供免费的 [IntelliJ IDEA](https://www.jetbrains.com/idea/?from=campus) 等 IDE 的授权 | ||
[<img src="https://gcore.jsdelivr.net/gh/oddfar/campus-imaotai/.github/jetbrains-variant.png" width="200"/>](https://www.jetbrains.com/?from=campus) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--- | ||
title: 快速启动 | ||
date: 2023-12-22 23:01:58 | ||
permalink: /pages/8f2aa8/ | ||
--- | ||
项目代码:<https://github.com/oddfar/campus-imaotai> | ||
|
||
## IDEA启动 | ||
|
||
|
||
|
||
环境准备:<https://oddfar.github.io/campus-doc/pages/747f41/> | ||
|
||
后端及后台启动可看此处:<https://oddfar.github.io/campus-doc/pages/b784e7/> | ||
|
||
|
||
|
||
## Docker启动后端 | ||
|
||
建议查看:<https://oddfar.github.io/campus-doc/pages/3c5985/> | ||
|
||
Docker仓库地址:<https://hub.docker.com/r/oddfar/campus-imaotai> | ||
|
||
目前仓库只有 `amd64` 系统的镜像,其他系统请自行打包 | ||
|
||
|
||
|
||
### 环境 | ||
|
||
**本项目启动前需要 mysql redis 服务,请自行根据网上教程解决** | ||
|
||
创建 `campus_imaotai` 数据库,执行 sql 文件 | ||
|
||
sql 文件:<https://github.com/oddfar/campus-imaotai/tree/master/doc/sql> | ||
|
||
### 启动 | ||
|
||
拉取镜像: | ||
|
||
```sh | ||
docker pull oddfar/campus-imaotai | ||
``` | ||
|
||
启动: | ||
|
||
```sh | ||
docker run --net host -d --restart=always --name campus-imaotai \ | ||
-v /docker/server/conf:/home/campus/conf --privileged \ | ||
-e TZ=Asia/Shanghai \ | ||
-e SERVER_PORT=8160 \ | ||
-e spring.config.additional-location=/home/campus/conf/application-prod.yml \ | ||
oddfar/campus-imaotai | ||
``` | ||
|
||
之后需挂载使用外部配置文件 | ||
|
||
拷贝一份 `campus-modular/src/resources `目录下的 [ `application-prod.yml`](https://github.com/oddfar/campus-imaotai/blob/master/campus-modular/src/main/resources/application-prod.yml) 文件,放到服务器中的`/docker/server/conf` 目录下(也就是启动时挂载的文件目录,对应docker容器里的`/home/campus/conf`) | ||
|
||
修改对应的 mysql redis配置 | ||
|
||
- mysql | ||
|
||
```yml | ||
url: jdbc:mysql://localhost:3306/campus_imaotai?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true | ||
username: root | ||
password: 123456789 | ||
``` | ||
- redis | ||
```yml | ||
--- # redis | ||
spring: | ||
redis: | ||
# 地址 | ||
host: localhost | ||
# 端口,默认为6379 | ||
port: 6379 | ||
# 数据库索引 | ||
database: 0 | ||
# 密码(如没有密码请注释掉) | ||
# password: | ||
``` | ||
|
||
至此您已经启动完后端服务了 | ||
|
||
## 前端部署 | ||
|
||
请看此处:<https://oddfar.github.io/campus-doc/pages/3c5985/#%E5%89%8D%E7%AB%AF%E9%83%A8%E7%BD%B2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
title: 使用教程 | ||
date: 2023-12-22 23:01:58 | ||
permalink: /pages/40521a/ | ||
--- | ||
## 项目使用 | ||
|
||
> 修改配置 | ||
1、添加用户 | ||
|
||
i茅台->用户管理->添加账号(若你有token,可直接点击“直接添加”) | ||
|
||
2、修改配置 | ||
|
||
添加完后,选中所手机号修改配置 | ||
|
||
- 修改预约项目 | ||
|
||
查看 预约项目列表,自行选择项目 | ||
|
||
- 修改预约的门店 | ||
|
||
门店列表里,查询自己位置附近的门店,填写商品ID | ||
|
||
- 推送token | ||
|
||
在网站 <https://www.pushplus.plus> 获取,不填写则不推送通知 | ||
|
||
|
||
|
||
**原先旧版本([V1.0.5](https://github.com/oddfar/campus-imaotai/releases/tag/V1.0.5)之前)是手动填入自己位置经纬度** | ||
|
||
查询地址:<https://restapi.amap.com/v3/geocode/geo?key=0a7f4baae0a5e37e6f90e4dc88e3a10d&output=json&address=清华大学> | ||
|
||
返回的 `location` 值:`116.326759,40.003304` 中,前面是经度 后边是纬度 | ||
|
||
|
||
|
||
## 网站账号 | ||
|
||
- 管理员 | ||
|
||
admin admin123 | ||
|
||
- 普通用户(啥也干不了) | ||
|
||
zhiyuan 123456 | ||
|
||
- 测试用户(可添加i茅台) | ||
|
||
test 123456 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
title: 常见问题 | ||
date: 2023-12-22 23:01:58 | ||
permalink: /pages/167e31/ | ||
--- | ||
- 第一次启动失败 | ||
|
||
第一次启动可能会失败,是因为 `mysql` 服务还没启动完成,`campus-service` 就启动了,等mysql启动完毕后,再启动一次即可 `docker-compose up -d` | ||
|
||
- 默认账户 | ||
|
||
用户名 默认是 `admin` ,密码 `admin123` | ||
|
||
登录地址:`/login`,注册地址:`/register` | ||
|
||
- <s>系统密码</s> | ||
|
||
<s>mysql:oddfar_imaotai,redis:oddfar_imaotai</s> | ||
|
||
- 修改密码 | ||
|
||
登录后台,右上角`个人中心`->`修改密码` | ||
|
||
- 日志提示预约成功,但进入i茅台app发现没有预约。 | ||
|
||
app的界面显示可以预约申购,实际已经预约了,需要在 app-`我的`->`申购记录`里查询。 | ||
|
||
- 关于 token | ||
|
||
到期时间是 token 的到期时间,一次 token 管30天,到期了需要自己手动更改 token | ||
|
||
- ERROR [internal] load metadata for docker.io/library/java:8 | ||
|
||
修改 `campus-dockerfile` 把 `FROM java:8` 换成 `FROM openjdk:8` | ||
|
||
然后删除镜像、容器重新启动试试。 | ||
|
||
如果是amr架构换成 `FROM 987846/jdk1.8` | ||
|
||
- 端口被占用 | ||
|
||
修改 `docker-compose.yml` 里的端口配置,例如 MySql:3306:3306 改成 `3307:3306` | ||
|
||
- 推送token | ||
|
||
https://www.pushplus.plus/ | ||
|
||
- 预约时间 | ||
|
||
预约时间在9点开始,根据设置的分钟(选择随机时间,则会在晚上自动修改时间1-50随机) | ||
|
||
旅行会在每天11点开始 | ||
|
||
申购耐力会在预约10s之后 | ||
|
||
- 申购结果推送 | ||
|
||
申购结果中了后才会推送,没中不会推送 | ||
|
||
- JDK的AES加密异常java.security.InvalidKeyException: Illegal key size | ||
|
||
jdk 1.8 去 https://www.oracle.com/java/technologies/javase-jce8-downloads.html 下载jar包 | ||
|
||
将压缩包中的两个jar包放在 `%JDK_HOME%\jre\lib\security` 目录下 | ||
|
||
引用:<https://github.com/oddfar/campus-imaotai/issues/69> |