forked from szvone/Vmq
-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 738100b
Showing
174 changed files
with
15,408 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/target/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/build/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ |
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,62 @@ | ||
|
||
V免签 —— 个人开发者收款解决方案 | ||
=============== | ||
|
||
|
||
V免签 是基于SpringBoot 2.0.6 实现的一套Api图床程序,主要包含以下特色: | ||
|
||
+ 使用H2-Database,仅需安装Java环境,简单配置,一键搭建 | ||
+ 超简单Api使用,提供统一Api实现收款回调 | ||
+ 免费、开源 | ||
|
||
> V免签的运行环境为JDK版本1.8。 | ||
> V免签仅供个人开发者调试测试使用,请勿用于非法用途,商用请您申请官方商户接口 | ||
## 安装 | ||
|
||
+ 下载已经编译好的war,位于GitHub的releases中 | ||
+ 确认本机已经拥有java的运行环境(JDK>=1.8),如果没有,请您安装java的运行环境 | ||
+ 在war包的同级目录,在控制台输入启动命令 java -jar v.war | ||
+ 请将v.war替换成您下载的war包的名字 | ||
+ 如果您需要自定义项目的运行端口,请您在启动的时候使用:java -jar cjtc.war --server.port=9090 (9090可以替换成任意端口) | ||
+ 打开浏览器,访问 localhost:8080 | ||
+ 点击系统设置,进入设置页面,修改系统的默认配置 | ||
+ 下载V免签监控端到安卓手机或安卓模拟器,开启辅助服务,实现收款回调功能 | ||
+ 默认管理账号为:admin | ||
+ 默认通讯密钥为:admin | ||
+ 保存配置后,即可开始使用 | ||
|
||
|
||
> 升级说明:请您直接下载新版本覆盖旧版本即可! | ||
|
||
## 使用 | ||
|
||
+ 根据主页显示的Api接口,调用Api接口,将会返回对应的图片地址 | ||
+ 使用主页提供的测试工具,手动选择图片上传,会显示对应的图片地址 | ||
|
||
> 如果您忘记密码,请您删除war包同级目录下的vone.txt文件,系统将会恢复默认配置 | ||
## 说明 | ||
+ 请部署完成后访问后台,有详细的Api说明 | ||
|
||
|
||
## 注意 | ||
|
||
+ 本系统原理为监控收款后手机的通知栏推送消息,所以请保持微信/支付宝/V免签监控端后台正常运行,且添加到内存清理白名单! | ||
|
||
## 更新记录 | ||
|
||
+ v1.0(2019.01.31) | ||
+ 初版发布 | ||
|
||
## 版权信息 | ||
|
||
V免签遵循 MIT License 开源协议发布,并提供免费使用,请勿用于非法用途。 | ||
|
||
|
||
版权所有Copyright © 2019 by vone (http://szvone.cn) | ||
|
||
All rights reserved。 | ||
|
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,74 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>2.1.1.RELEASE</version> | ||
<relativePath/> <!-- lookup parent from repository --> | ||
</parent> | ||
<groupId>com.vone</groupId> | ||
<artifactId>mq</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<name>mq</name> | ||
<description>Demo project for Spring Boot</description> | ||
|
||
<properties> | ||
<java.version>1.8</java.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-jdbc</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.h2database</groupId> | ||
<artifactId>h2</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-data-jpa</artifactId> | ||
</dependency> | ||
<!-- zxing --> | ||
<dependency> | ||
<groupId>com.google.zxing</groupId> | ||
<artifactId>core</artifactId> | ||
<version>3.2.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.zxing</groupId> | ||
<artifactId>javase</artifactId> | ||
<version>3.2.1</version> | ||
</dependency> | ||
|
||
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson --> | ||
<dependency> | ||
<groupId>com.google.code.gson</groupId> | ||
<artifactId>gson</artifactId> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
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,16 @@ | ||
package com.vone.mq; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.scheduling.annotation.EnableScheduling; | ||
|
||
@SpringBootApplication | ||
@EnableScheduling | ||
public class MqApplication { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(MqApplication.class, args); | ||
} | ||
|
||
} | ||
|
175 changes: 175 additions & 0 deletions
175
src/main/java/com/vone/mq/controller/AdminController.java
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,175 @@ | ||
package com.vone.mq.controller; | ||
|
||
import com.vone.mq.dto.CommonRes; | ||
import com.vone.mq.dto.PageRes; | ||
import com.vone.mq.entity.PayQrcode; | ||
import com.vone.mq.service.AdminService; | ||
import com.vone.mq.utils.ResUtil; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import javax.servlet.http.HttpSession; | ||
import java.util.*; | ||
|
||
@RestController | ||
public class AdminController { | ||
@Autowired | ||
private AdminService adminService; | ||
|
||
@RequestMapping("/login") | ||
public CommonRes login(HttpSession session,String user, String pass){ | ||
if (user==null){ | ||
return ResUtil.error("请输入账号"); | ||
} | ||
if (pass==null){ | ||
return ResUtil.error("请输入密码"); | ||
} | ||
CommonRes r = adminService.login(user, pass); | ||
if (r.getCode()==1){ | ||
session.setAttribute("login","1"); | ||
} | ||
return r; | ||
} | ||
|
||
@RequestMapping("/admin/getMenu") | ||
public List<Map<String,Object>> getMenu(HttpSession session){ | ||
if (session.getAttribute("login")==null){ | ||
return null; | ||
} | ||
List<Map<String,Object>> menu = new ArrayList<>(); | ||
Map<String,Object> node = new HashMap<>(); | ||
node.put("name","系统设置"); | ||
node.put("type","url"); | ||
node.put("url","admin/setting.html?t="+new Date().getTime()); | ||
menu.add(node); | ||
|
||
node = new HashMap<>(); | ||
node.put("name","监控端设置"); | ||
node.put("type","url"); | ||
node.put("url","admin/jk.html?t="+new Date().getTime()); | ||
menu.add(node); | ||
|
||
|
||
List<Map<String,Object>> menu1 = new ArrayList<>(); | ||
|
||
node = new HashMap<>(); | ||
node.put("name","添加"); | ||
node.put("type","url"); | ||
node.put("url","admin/addwxqrcode.html?t="+new Date().getTime()); | ||
menu1.add(node); | ||
|
||
node = new HashMap<>(); | ||
node.put("name","管理"); | ||
node.put("type","url"); | ||
node.put("url","admin/wxqrcodelist.html?t="+new Date().getTime()); | ||
menu1.add(node); | ||
|
||
node = new HashMap<>(); | ||
node.put("name","微信二维码"); | ||
node.put("type","menu"); | ||
node.put("node",menu1); | ||
menu.add(node); | ||
|
||
|
||
List<Map<String,Object>> menu2 = new ArrayList<>(); | ||
|
||
node = new HashMap<>(); | ||
node.put("name","添加"); | ||
node.put("type","url"); | ||
node.put("url","admin/addzfbqrcode.html?t="+new Date().getTime()); | ||
menu2.add(node); | ||
|
||
node = new HashMap<>(); | ||
node.put("name","管理"); | ||
node.put("type","url"); | ||
node.put("url","admin/zfbqrcodelist.html?t="+new Date().getTime()); | ||
menu2.add(node); | ||
|
||
node = new HashMap<>(); | ||
node.put("name","支付宝二维码"); | ||
node.put("type","menu"); | ||
node.put("node",menu2); | ||
menu.add(node); | ||
|
||
node = new HashMap<>(); | ||
node.put("name","订单列表"); | ||
node.put("type","url"); | ||
node.put("url","admin/orderlist.html?t="+new Date().getTime()); | ||
menu.add(node); | ||
|
||
node = new HashMap<>(); | ||
node.put("name","Api说明"); | ||
node.put("type","url"); | ||
node.put("url","../api.html?t="+new Date().getTime()); | ||
menu.add(node); | ||
return menu; | ||
} | ||
@RequestMapping("/admin/saveSetting") | ||
public CommonRes saveSetting(HttpSession session,String user,String pass,String notifyUrl,String returnUrl,String key,String wxpay,String zfbpay,String close){ | ||
if (session.getAttribute("login")==null){ | ||
return ResUtil.error("未登录"); | ||
} | ||
return adminService.saveSetting(user, pass, notifyUrl, returnUrl, key, wxpay, zfbpay, close); | ||
} | ||
@RequestMapping("/admin/getSettings") | ||
public CommonRes getSettings(HttpSession session){ | ||
if (session.getAttribute("login")==null){ | ||
return ResUtil.error("未登录"); | ||
} | ||
return adminService.getSettings(); | ||
} | ||
@RequestMapping("/admin/getOrders") | ||
public PageRes getOrders(HttpSession session,Integer page, Integer limit, Integer type, Integer state){ | ||
if (session.getAttribute("login")==null){ | ||
PageRes p = new PageRes(); | ||
p.setCode(-1); | ||
p.setMsg("未登录"); | ||
return p; | ||
} | ||
return adminService.getOrders(page, limit, type,state); | ||
} | ||
@RequestMapping("/admin/setBd") | ||
public CommonRes setBd(HttpSession session,Integer id){ | ||
if (session.getAttribute("login")==null){ | ||
return ResUtil.error("未登录"); | ||
} | ||
if (id==null){ | ||
return ResUtil.error(); | ||
} | ||
return adminService.setBd(id); | ||
} | ||
@RequestMapping("/admin/getPayQrcodes") | ||
public PageRes getPayQrcodes(HttpSession session,Integer page, Integer limit, Integer type){ | ||
if (session.getAttribute("login")==null){ | ||
PageRes p = new PageRes(); | ||
p.setCode(-1); | ||
p.setMsg("未登录"); | ||
return p; | ||
} | ||
return adminService.getPayQrcodes(page, limit, type); | ||
} | ||
@RequestMapping("/admin/delPayQrcode") | ||
public CommonRes delPayQrcode(HttpSession session,Long id){ | ||
if (session.getAttribute("login")==null){ | ||
return ResUtil.error("未登录"); | ||
} | ||
|
||
return adminService.delPayQrcode(id); | ||
} | ||
@RequestMapping("/admin/addPayQrcode") | ||
public CommonRes addPayQrcode(HttpSession session,PayQrcode payQrcode){ | ||
if (session.getAttribute("login")==null){ | ||
return ResUtil.error("未登录"); | ||
} | ||
return adminService.addPayQrcode(payQrcode); | ||
} | ||
@RequestMapping("/admin/getMain") | ||
public CommonRes getMain(HttpSession session){ | ||
if (session.getAttribute("login")==null){ | ||
return ResUtil.error("未登录"); | ||
} | ||
return adminService.getMain(); | ||
} | ||
|
||
} |
Oops, something went wrong.