Skip to content

Commit 738100b

Browse files
committed
V1.0
0 parents  commit 738100b

File tree

174 files changed

+15408
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+15408
-0
lines changed

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/target/
2+
!.mvn/wrapper/maven-wrapper.jar
3+
4+
### STS ###
5+
.apt_generated
6+
.classpath
7+
.factorypath
8+
.project
9+
.settings
10+
.springBeans
11+
.sts4-cache
12+
13+
### IntelliJ IDEA ###
14+
.idea
15+
*.iws
16+
*.iml
17+
*.ipr
18+
19+
### NetBeans ###
20+
/nbproject/private/
21+
/build/
22+
/nbbuild/
23+
/dist/
24+
/nbdist/
25+
/.nb-gradle/

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
2+
V免签 —— 个人开发者收款解决方案
3+
===============
4+
5+
6+
V免签 是基于SpringBoot 2.0.6 实现的一套Api图床程序,主要包含以下特色:
7+
8+
+ 使用H2-Database,仅需安装Java环境,简单配置,一键搭建
9+
+ 超简单Api使用,提供统一Api实现收款回调
10+
+ 免费、开源
11+
12+
> V免签的运行环境为JDK版本1.8。
13+
14+
> V免签仅供个人开发者调试测试使用,请勿用于非法用途,商用请您申请官方商户接口
15+
16+
## 安装
17+
18+
+ 下载已经编译好的war,位于GitHub的releases中
19+
+ 确认本机已经拥有java的运行环境(JDK>=1.8),如果没有,请您安装java的运行环境
20+
+ 在war包的同级目录,在控制台输入启动命令 java -jar v.war
21+
+ 请将v.war替换成您下载的war包的名字
22+
+ 如果您需要自定义项目的运行端口,请您在启动的时候使用:java -jar cjtc.war --server.port=9090 (9090可以替换成任意端口)
23+
+ 打开浏览器,访问 localhost:8080
24+
+ 点击系统设置,进入设置页面,修改系统的默认配置
25+
+ 下载V免签监控端到安卓手机或安卓模拟器,开启辅助服务,实现收款回调功能
26+
+ 默认管理账号为:admin
27+
+ 默认通讯密钥为:admin
28+
+ 保存配置后,即可开始使用
29+
30+
31+
> 升级说明:请您直接下载新版本覆盖旧版本即可!
32+
33+
34+
## 使用
35+
36+
+ 根据主页显示的Api接口,调用Api接口,将会返回对应的图片地址
37+
+ 使用主页提供的测试工具,手动选择图片上传,会显示对应的图片地址
38+
39+
> 如果您忘记密码,请您删除war包同级目录下的vone.txt文件,系统将会恢复默认配置
40+
41+
## 说明
42+
+ 请部署完成后访问后台,有详细的Api说明
43+
44+
45+
## 注意
46+
47+
+ 本系统原理为监控收款后手机的通知栏推送消息,所以请保持微信/支付宝/V免签监控端后台正常运行,且添加到内存清理白名单!
48+
49+
## 更新记录
50+
51+
+ v1.0(2019.01.31)
52+
+ 初版发布
53+
54+
## 版权信息
55+
56+
V免签遵循 MIT License 开源协议发布,并提供免费使用,请勿用于非法用途。
57+
58+
59+
版权所有Copyright © 2019 by vone (http://szvone.cn)
60+
61+
All rights reserved。
62+

pom.xml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>org.springframework.boot</groupId>
7+
<artifactId>spring-boot-starter-parent</artifactId>
8+
<version>2.1.1.RELEASE</version>
9+
<relativePath/> <!-- lookup parent from repository -->
10+
</parent>
11+
<groupId>com.vone</groupId>
12+
<artifactId>mq</artifactId>
13+
<version>0.0.1-SNAPSHOT</version>
14+
<name>mq</name>
15+
<description>Demo project for Spring Boot</description>
16+
17+
<properties>
18+
<java.version>1.8</java.version>
19+
</properties>
20+
21+
<dependencies>
22+
<dependency>
23+
<groupId>org.springframework.boot</groupId>
24+
<artifactId>spring-boot-starter-jdbc</artifactId>
25+
</dependency>
26+
<dependency>
27+
<groupId>org.springframework.boot</groupId>
28+
<artifactId>spring-boot-starter-web</artifactId>
29+
</dependency>
30+
31+
<dependency>
32+
<groupId>com.h2database</groupId>
33+
<artifactId>h2</artifactId>
34+
<scope>runtime</scope>
35+
</dependency>
36+
<dependency>
37+
<groupId>org.springframework.boot</groupId>
38+
<artifactId>spring-boot-starter-test</artifactId>
39+
<scope>test</scope>
40+
</dependency>
41+
<dependency>
42+
<groupId>org.springframework.boot</groupId>
43+
<artifactId>spring-boot-starter-data-jpa</artifactId>
44+
</dependency>
45+
<!-- zxing -->
46+
<dependency>
47+
<groupId>com.google.zxing</groupId>
48+
<artifactId>core</artifactId>
49+
<version>3.2.1</version>
50+
</dependency>
51+
<dependency>
52+
<groupId>com.google.zxing</groupId>
53+
<artifactId>javase</artifactId>
54+
<version>3.2.1</version>
55+
</dependency>
56+
57+
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
58+
<dependency>
59+
<groupId>com.google.code.gson</groupId>
60+
<artifactId>gson</artifactId>
61+
</dependency>
62+
63+
</dependencies>
64+
65+
<build>
66+
<plugins>
67+
<plugin>
68+
<groupId>org.springframework.boot</groupId>
69+
<artifactId>spring-boot-maven-plugin</artifactId>
70+
</plugin>
71+
</plugins>
72+
</build>
73+
74+
</project>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.vone.mq;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
import org.springframework.scheduling.annotation.EnableScheduling;
6+
7+
@SpringBootApplication
8+
@EnableScheduling
9+
public class MqApplication {
10+
11+
public static void main(String[] args) {
12+
SpringApplication.run(MqApplication.class, args);
13+
}
14+
15+
}
16+
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
package com.vone.mq.controller;
2+
3+
import com.vone.mq.dto.CommonRes;
4+
import com.vone.mq.dto.PageRes;
5+
import com.vone.mq.entity.PayQrcode;
6+
import com.vone.mq.service.AdminService;
7+
import com.vone.mq.utils.ResUtil;
8+
import org.springframework.beans.factory.annotation.Autowired;
9+
import org.springframework.web.bind.annotation.RequestMapping;
10+
import org.springframework.web.bind.annotation.RestController;
11+
12+
import javax.servlet.http.HttpSession;
13+
import java.util.*;
14+
15+
@RestController
16+
public class AdminController {
17+
@Autowired
18+
private AdminService adminService;
19+
20+
@RequestMapping("/login")
21+
public CommonRes login(HttpSession session,String user, String pass){
22+
if (user==null){
23+
return ResUtil.error("请输入账号");
24+
}
25+
if (pass==null){
26+
return ResUtil.error("请输入密码");
27+
}
28+
CommonRes r = adminService.login(user, pass);
29+
if (r.getCode()==1){
30+
session.setAttribute("login","1");
31+
}
32+
return r;
33+
}
34+
35+
@RequestMapping("/admin/getMenu")
36+
public List<Map<String,Object>> getMenu(HttpSession session){
37+
if (session.getAttribute("login")==null){
38+
return null;
39+
}
40+
List<Map<String,Object>> menu = new ArrayList<>();
41+
Map<String,Object> node = new HashMap<>();
42+
node.put("name","系统设置");
43+
node.put("type","url");
44+
node.put("url","admin/setting.html?t="+new Date().getTime());
45+
menu.add(node);
46+
47+
node = new HashMap<>();
48+
node.put("name","监控端设置");
49+
node.put("type","url");
50+
node.put("url","admin/jk.html?t="+new Date().getTime());
51+
menu.add(node);
52+
53+
54+
List<Map<String,Object>> menu1 = new ArrayList<>();
55+
56+
node = new HashMap<>();
57+
node.put("name","添加");
58+
node.put("type","url");
59+
node.put("url","admin/addwxqrcode.html?t="+new Date().getTime());
60+
menu1.add(node);
61+
62+
node = new HashMap<>();
63+
node.put("name","管理");
64+
node.put("type","url");
65+
node.put("url","admin/wxqrcodelist.html?t="+new Date().getTime());
66+
menu1.add(node);
67+
68+
node = new HashMap<>();
69+
node.put("name","微信二维码");
70+
node.put("type","menu");
71+
node.put("node",menu1);
72+
menu.add(node);
73+
74+
75+
List<Map<String,Object>> menu2 = new ArrayList<>();
76+
77+
node = new HashMap<>();
78+
node.put("name","添加");
79+
node.put("type","url");
80+
node.put("url","admin/addzfbqrcode.html?t="+new Date().getTime());
81+
menu2.add(node);
82+
83+
node = new HashMap<>();
84+
node.put("name","管理");
85+
node.put("type","url");
86+
node.put("url","admin/zfbqrcodelist.html?t="+new Date().getTime());
87+
menu2.add(node);
88+
89+
node = new HashMap<>();
90+
node.put("name","支付宝二维码");
91+
node.put("type","menu");
92+
node.put("node",menu2);
93+
menu.add(node);
94+
95+
node = new HashMap<>();
96+
node.put("name","订单列表");
97+
node.put("type","url");
98+
node.put("url","admin/orderlist.html?t="+new Date().getTime());
99+
menu.add(node);
100+
101+
node = new HashMap<>();
102+
node.put("name","Api说明");
103+
node.put("type","url");
104+
node.put("url","../api.html?t="+new Date().getTime());
105+
menu.add(node);
106+
return menu;
107+
}
108+
@RequestMapping("/admin/saveSetting")
109+
public CommonRes saveSetting(HttpSession session,String user,String pass,String notifyUrl,String returnUrl,String key,String wxpay,String zfbpay,String close){
110+
if (session.getAttribute("login")==null){
111+
return ResUtil.error("未登录");
112+
}
113+
return adminService.saveSetting(user, pass, notifyUrl, returnUrl, key, wxpay, zfbpay, close);
114+
}
115+
@RequestMapping("/admin/getSettings")
116+
public CommonRes getSettings(HttpSession session){
117+
if (session.getAttribute("login")==null){
118+
return ResUtil.error("未登录");
119+
}
120+
return adminService.getSettings();
121+
}
122+
@RequestMapping("/admin/getOrders")
123+
public PageRes getOrders(HttpSession session,Integer page, Integer limit, Integer type, Integer state){
124+
if (session.getAttribute("login")==null){
125+
PageRes p = new PageRes();
126+
p.setCode(-1);
127+
p.setMsg("未登录");
128+
return p;
129+
}
130+
return adminService.getOrders(page, limit, type,state);
131+
}
132+
@RequestMapping("/admin/setBd")
133+
public CommonRes setBd(HttpSession session,Integer id){
134+
if (session.getAttribute("login")==null){
135+
return ResUtil.error("未登录");
136+
}
137+
if (id==null){
138+
return ResUtil.error();
139+
}
140+
return adminService.setBd(id);
141+
}
142+
@RequestMapping("/admin/getPayQrcodes")
143+
public PageRes getPayQrcodes(HttpSession session,Integer page, Integer limit, Integer type){
144+
if (session.getAttribute("login")==null){
145+
PageRes p = new PageRes();
146+
p.setCode(-1);
147+
p.setMsg("未登录");
148+
return p;
149+
}
150+
return adminService.getPayQrcodes(page, limit, type);
151+
}
152+
@RequestMapping("/admin/delPayQrcode")
153+
public CommonRes delPayQrcode(HttpSession session,Long id){
154+
if (session.getAttribute("login")==null){
155+
return ResUtil.error("未登录");
156+
}
157+
158+
return adminService.delPayQrcode(id);
159+
}
160+
@RequestMapping("/admin/addPayQrcode")
161+
public CommonRes addPayQrcode(HttpSession session,PayQrcode payQrcode){
162+
if (session.getAttribute("login")==null){
163+
return ResUtil.error("未登录");
164+
}
165+
return adminService.addPayQrcode(payQrcode);
166+
}
167+
@RequestMapping("/admin/getMain")
168+
public CommonRes getMain(HttpSession session){
169+
if (session.getAttribute("login")==null){
170+
return ResUtil.error("未登录");
171+
}
172+
return adminService.getMain();
173+
}
174+
175+
}

0 commit comments

Comments
 (0)