parent
725e51d919
commit
8efbefabd0
@ -0,0 +1,6 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="SpringJavaInjectionPointsAutowiringInspection" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
Binary file not shown.
After Width: | Height: | Size: 2.9 MiB |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,443 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<link rel="icon" type="image/x-icon" href="#" />
|
||||||
|
<link type="text/css" rel="styleSheet" href="main.css" tppabs="http://www.17sucai.com/preview/384665/2018-12-28/login/css/main.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>账号登录</title>
|
||||||
|
<style>
|
||||||
|
*{
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'neo';
|
||||||
|
src: url("NEOTERICc.ttf")/*tpa=http://www.17sucai.com/preview/384665/2018-12-28/login/font/NEOTERICc.ttf*/;
|
||||||
|
}
|
||||||
|
input:focus{
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
.form input{
|
||||||
|
width: 300px;
|
||||||
|
height: 30px;
|
||||||
|
font-size: 18px;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
border-bottom: 1px solid #fff;
|
||||||
|
color: #fff;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.form input::placeholder{
|
||||||
|
color: rgba(255,255,255,0.8);
|
||||||
|
font-size: 18px;
|
||||||
|
font-family: "neo";
|
||||||
|
}
|
||||||
|
.confirm{
|
||||||
|
height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: .25s;
|
||||||
|
}
|
||||||
|
.btn{
|
||||||
|
width:140px;
|
||||||
|
height: 40px;
|
||||||
|
border: 1px solid #fff;
|
||||||
|
background: none;
|
||||||
|
font-size:20px;
|
||||||
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-top: 25px;
|
||||||
|
font-family: "neo";
|
||||||
|
transition: .25s;
|
||||||
|
}
|
||||||
|
.btn:hover{
|
||||||
|
background: rgba(255,255,255,.25);
|
||||||
|
}
|
||||||
|
#login_wrap{
|
||||||
|
width: 980px;
|
||||||
|
min-height: 500px;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-family: "neo";
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0px 0px 120px rgba(0, 0, 0, 0.25);
|
||||||
|
position: fixed;
|
||||||
|
top: 50%;
|
||||||
|
right: 50%;
|
||||||
|
margin-top: -250px;
|
||||||
|
margin-right: -490px;
|
||||||
|
}
|
||||||
|
#login{
|
||||||
|
width: 50%;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 500px;
|
||||||
|
background: linear-gradient(45deg, #9a444e, #e06267);
|
||||||
|
position: relative;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
#login #status{
|
||||||
|
width: 90px;
|
||||||
|
height: 35px;
|
||||||
|
margin: 40px auto;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 30px;
|
||||||
|
font-weight: 600;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
#login #status i{
|
||||||
|
font-style: normal;
|
||||||
|
position: absolute;
|
||||||
|
transition: .5s
|
||||||
|
}
|
||||||
|
#login span{
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -150px;
|
||||||
|
top: 52%;
|
||||||
|
margin-top: -140px;
|
||||||
|
}
|
||||||
|
#login span a{
|
||||||
|
text-decoration: none;
|
||||||
|
color: #fff;
|
||||||
|
display: block;
|
||||||
|
margin-top: 80px;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
#bg{
|
||||||
|
background: linear-gradient(45deg, #211136, #bf5853);
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
/*绘图*/
|
||||||
|
#login_img{
|
||||||
|
width: 50%;
|
||||||
|
min-height: 500px;
|
||||||
|
background: linear-gradient(45deg, #221334, #6c3049);
|
||||||
|
float: left;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
#login_img span{
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
#login_img .circle{
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: linear-gradient(45deg, #df5555, #ef907a);
|
||||||
|
top: 70px;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -100px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
#login_img .circle span{
|
||||||
|
width: 150px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 50px;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
#login_img .circle span:nth-child(1){
|
||||||
|
top: 30px;
|
||||||
|
left: -38px;
|
||||||
|
background: #c55c59;
|
||||||
|
}
|
||||||
|
#login_img .circle span:nth-child(2){
|
||||||
|
bottom: 20px;
|
||||||
|
right: -35px;
|
||||||
|
background: #934555;
|
||||||
|
}
|
||||||
|
#login_img .star span{
|
||||||
|
background: radial-gradient(#fff 10%,#fff 20%,rgba(72, 34, 64, 0));
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 0 7px #fff;
|
||||||
|
}
|
||||||
|
#login_img .star span:nth-child(1){
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
top: 50px;
|
||||||
|
left: 30px;
|
||||||
|
}
|
||||||
|
#login_img .star span:nth-child(2){
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
left: 360px;
|
||||||
|
top: 80px;
|
||||||
|
}
|
||||||
|
#login_img .star span:nth-child(3){
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
top: 400px;
|
||||||
|
left: 80px;
|
||||||
|
}
|
||||||
|
#login_img .star span:nth-child(4){
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
top: 240px;
|
||||||
|
left: 60px;
|
||||||
|
}
|
||||||
|
#login_img .star span:nth-child(5){
|
||||||
|
width: 4px;
|
||||||
|
height: 4px;
|
||||||
|
top: 20px;
|
||||||
|
left: 200px;
|
||||||
|
}
|
||||||
|
#login_img .star span:nth-child(6){
|
||||||
|
width: 4px;
|
||||||
|
height: 4px;
|
||||||
|
top: 460px;
|
||||||
|
left: 410px;
|
||||||
|
}
|
||||||
|
#login_img .star span:nth-child(7){
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
top: 250px;
|
||||||
|
left: 350px;
|
||||||
|
}
|
||||||
|
#login_img .fly_star span{
|
||||||
|
width: 90px;
|
||||||
|
height: 3px;
|
||||||
|
background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
|
||||||
|
background: -o-linear-gradient(left, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
|
||||||
|
background: linear-gradient(to right, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
#login_img .fly_star span:nth-child(1){
|
||||||
|
top:60px;
|
||||||
|
left: 80px;
|
||||||
|
}
|
||||||
|
#login_img .fly_star span:nth-child(2){
|
||||||
|
top: 210px;
|
||||||
|
left: 332px;
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
#login_img p{
|
||||||
|
text-align: center;
|
||||||
|
color: #af4b55;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-top: 365px;
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
|
#login_img p i{
|
||||||
|
font-style: normal;
|
||||||
|
margin-right: 45px;
|
||||||
|
}
|
||||||
|
#login_img p i:nth-last-child(1){
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
/*提示*/
|
||||||
|
#hint{
|
||||||
|
width: 100%;
|
||||||
|
line-height: 70px;
|
||||||
|
background: linear-gradient(-90deg, #9b494d, #bf5853);
|
||||||
|
text-align: center;
|
||||||
|
font-size: 25px;
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: 0 0 20px #733544;
|
||||||
|
display: none;
|
||||||
|
opacity: 0;
|
||||||
|
transition: .5s;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
/* 响应式 */
|
||||||
|
@media screen and (max-width:1000px ) {
|
||||||
|
#login_img{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#login_wrap{
|
||||||
|
width: 490px;
|
||||||
|
margin-right: -245px;
|
||||||
|
}
|
||||||
|
#login{
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (max-width:560px ) {
|
||||||
|
#login_wrap{
|
||||||
|
width: 330px;
|
||||||
|
margin-right: -165px;
|
||||||
|
}
|
||||||
|
#login span{
|
||||||
|
margin-left: -125px;
|
||||||
|
}
|
||||||
|
.form input{
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
.btn{
|
||||||
|
width: 113px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (max-width:345px ) {
|
||||||
|
#login_wrap {
|
||||||
|
width: 290px;
|
||||||
|
margin-right: -145px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="bg">
|
||||||
|
<div id="hint"><!-- 提示框 -->
|
||||||
|
<p>登录失败</p>
|
||||||
|
</div>
|
||||||
|
<div id="login_wrap">
|
||||||
|
<div id="login"><!-- 登录注册切换动画 -->
|
||||||
|
<div id="status">
|
||||||
|
<i style="top: 0">Log</i>
|
||||||
|
<i style="top: 35px">Sign</i>
|
||||||
|
<i style="right: 5px">in</i>
|
||||||
|
</div>
|
||||||
|
<span>
|
||||||
|
<form action="http://www.17sucai.com/preview/384665/2018-12-28/login/post">
|
||||||
|
<p class="form"><input type="text" id="user" placeholder="username"></p>
|
||||||
|
<p class="form"><input type="password" id="passwd" placeholder="password"></p>
|
||||||
|
<p class="form confirm"><input type="password" id="confirm-passwd" placeholder="confirm password"></p>
|
||||||
|
<input type="button" value="Log in" class="btn" onclick="login()" style="margin-right: 20px;">
|
||||||
|
<input type="button" value="Sign in" class="btn" onclick='signin()' id="btn">
|
||||||
|
</form>
|
||||||
|
<a href="#">Forget your password?</a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="login_img"><!-- 图片绘制框 -->
|
||||||
|
<span class="circle">
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
</span>
|
||||||
|
<span class="star">
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
</span>
|
||||||
|
<span class="fly_star">
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
</span>
|
||||||
|
<p id="title">CLOUD</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<script>
|
||||||
|
var onoff = true//根据此布尔值判断当前为注册状态还是登录状态
|
||||||
|
var confirm = document.getElementsByClassName("confirm")[0]
|
||||||
|
//var user = document.getElementById("user")
|
||||||
|
//var passwd = document.getElementById("passwd")
|
||||||
|
//var con_pass = document.getElementById("confirm-passwd")
|
||||||
|
|
||||||
|
//自动居中title
|
||||||
|
var name_c = document.getElementById("title")
|
||||||
|
name = name_c.innerHTML.split("")
|
||||||
|
name_c.innerHTML = ""
|
||||||
|
for (i = 0; i < name.length; i++)
|
||||||
|
if (name[i] != ",")
|
||||||
|
name_c.innerHTML += "<i>" + name[i] + "</i>"
|
||||||
|
//引用hint()在最上方弹出提示
|
||||||
|
function hint() {
|
||||||
|
let hit = document.getElementById("hint")
|
||||||
|
hit.style.display = "block"
|
||||||
|
setTimeout("hit.style.opacity = 1", 0)
|
||||||
|
setTimeout("hit.style.opacity = 0", 2000)
|
||||||
|
setTimeout('hit.style.display = "none"', 3000)
|
||||||
|
}
|
||||||
|
//回调函数
|
||||||
|
/*function submit(callback) {
|
||||||
|
//if (passwd.value == con_pass.value) {
|
||||||
|
let request = new XMLHttpRequest()
|
||||||
|
let url = ""
|
||||||
|
request.open("post", url, true)
|
||||||
|
let data = new FormData()
|
||||||
|
data.append("user", user.value)
|
||||||
|
data.append("passwd", passwd.value)
|
||||||
|
request.onreadystatechange = function() {
|
||||||
|
if (this.readyState == 4) {
|
||||||
|
callback.call(this, this.response)
|
||||||
|
//console.log(this.responseText)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
request.send(data)
|
||||||
|
}*/
|
||||||
|
/*else {
|
||||||
|
hit.innerHTML = "两次密码不同"
|
||||||
|
hitting()
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
//注册按钮
|
||||||
|
function signin() {
|
||||||
|
let status = document.getElementById("status").getElementsByTagName("i")
|
||||||
|
let hit = document.getElementById("hint").getElementsByTagName("p")[0]
|
||||||
|
if (onoff) {
|
||||||
|
confirm.style.height = 51 + "px"
|
||||||
|
status[0].style.top = 35 + "px"
|
||||||
|
status[1].style.top = 0
|
||||||
|
onoff = !onoff
|
||||||
|
} else {
|
||||||
|
/*if (!/^[A-Za-z0-9]+$/.test(user.value))
|
||||||
|
hit.innerHTML = "账号只能为英文和数字"
|
||||||
|
else if (user.value.length < 6)
|
||||||
|
hit.innerHTML = "账号长度必须大于6位"
|
||||||
|
else if (passwd.value.length < 6)
|
||||||
|
hit.innerHTML = "密码长度必须大于6位"
|
||||||
|
else if (passwd.value != con_pass.value)
|
||||||
|
hit.innerHTML = "两次密码不相等"
|
||||||
|
else if (passwd.value = con_pass.value) {
|
||||||
|
submit(function(res) {
|
||||||
|
if (res == "exist")
|
||||||
|
hit.innerHTML = "该账号已存在"
|
||||||
|
else if (res == true) {
|
||||||
|
hit.innerHTML = "账号注册成功,两秒后自动刷新页面"
|
||||||
|
setTimeout("window.location.reload()", 2000)
|
||||||
|
} else if (res == false)
|
||||||
|
hit.innerHTML = "账号注册失败"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
hint()*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//登录按钮
|
||||||
|
function login() {
|
||||||
|
if (onoff) {
|
||||||
|
/*let request = new XMLHttpRequest()
|
||||||
|
let url = ""
|
||||||
|
request.open("post", url, true)
|
||||||
|
let data = new FormData()
|
||||||
|
data.append("user", user.value)
|
||||||
|
data.append("passwd", passwd.value)
|
||||||
|
request.onreadystatechange = function() {
|
||||||
|
if (this.readyState == 4) {
|
||||||
|
if (this.responseText == false)
|
||||||
|
hint()
|
||||||
|
else
|
||||||
|
window.location.href = this.responseText;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
request.send(data)*/
|
||||||
|
} else {
|
||||||
|
let status = document.getElementById("status").getElementsByTagName("i")
|
||||||
|
confirm.style.height = 0
|
||||||
|
status[0].style.top = 0
|
||||||
|
status[1].style.top = 35 + "px"
|
||||||
|
onoff = !onoff
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</html>
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Audit;
|
||||||
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface auditMapper {
|
||||||
|
@Select("select * from audit where checkNum = #{checkNum}")
|
||||||
|
public Audit selectAudioByCheckNum(long checkNum);
|
||||||
|
|
||||||
|
@Select("select * from audit")
|
||||||
|
public List<Audit> select();
|
||||||
|
|
||||||
|
@Insert("insert into audit(checkNum, userNum, productNum, " +
|
||||||
|
"bankAccount, checkState, contractNum, " +
|
||||||
|
"isSignContract, year, amount, applyTime)" +
|
||||||
|
" values (#{checkNum},#{userNum},#{productNum},#{bankAccount},#{checkState}," +
|
||||||
|
"#{contractNum},#{isSignContract},#{year},#{amount},#{applyTime})")
|
||||||
|
public void addAudit(Audit audits);
|
||||||
|
|
||||||
|
@Update("update audit set checkNum=#{checkNum},userNum=#{userNum}" +
|
||||||
|
",productNum=#{productNum},checkState=#{checkState},contractNum=#{contractNum}," +
|
||||||
|
"isSignContract=#{isSignContract},year=#{year},amount=#{amount}," +
|
||||||
|
"applyTime=#{applyTime}where checkNum=#{checkNum}")
|
||||||
|
public void updateAudit(Audit audits);
|
||||||
|
|
||||||
|
@Delete("delete from audit where checkNum=#{checkNum}")
|
||||||
|
public void deleteAudit(long checkNum);
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Bank;
|
||||||
|
import org.apache.ibatis.annotations.Insert;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.Update;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface bankMapper {
|
||||||
|
|
||||||
|
@Select("select * from bank where bankNum = #{bankNum}")
|
||||||
|
public Bank selectBankByBankNum(int bankNum);
|
||||||
|
|
||||||
|
@Select("select * from bank where bankName = #{bankName}")
|
||||||
|
public Bank selectBankByBankName(String bankName);
|
||||||
|
|
||||||
|
@Select("select * from bank")
|
||||||
|
public List<Bank> select();
|
||||||
|
|
||||||
|
@Insert("insert into bank(bankNum, bankName, contact, " +
|
||||||
|
" values (#{bankNum},#{bankName},#{contact},)")
|
||||||
|
public void addBank(Bank banks);
|
||||||
|
|
||||||
|
@Update("update bank set bankNum=#{bankNum},bankName=#{bankName}" +
|
||||||
|
",contact=#{contact} where bankNum=#{bankNum}")
|
||||||
|
public void updateBank(Bank banks);
|
||||||
|
|
||||||
|
// @Delete("delete from bank where bankNum=#{bankNum}")
|
||||||
|
// public void deleteBank(String bankNum);
|
||||||
|
//
|
||||||
|
// @Delete("delete from bank where bankName=#{bankName}")
|
||||||
|
// public void deleteBanks(String bankName);
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Manager;
|
||||||
|
import org.apache.ibatis.annotations.Insert;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.Update;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface managerMapper {
|
||||||
|
@Select("select * from manager where managerNum = #{managerName}")
|
||||||
|
public Manager selectManagerByManagerName(String managerName);
|
||||||
|
|
||||||
|
@Insert("insert into manager(managerNum, managerName, managerPwd, " +
|
||||||
|
"managerRight, telephoneNum) values (#{managerNum},#{managerName}," +
|
||||||
|
"#{managerPwd},#{managerRight},#{telephoneNum})")
|
||||||
|
public void addManager(Manager managers);
|
||||||
|
|
||||||
|
@Update("update manager set managerNum=#{managerNum},managerName=#{managerName}" +
|
||||||
|
",managerPwd=#{managerPwd},managerRight=#{managerRight},telephoneNum=#{telephoneNum},")
|
||||||
|
public void updateManager(Manager managers);
|
||||||
|
|
||||||
|
// @Delete("delete from manager where managerNum=#{managerNum}")
|
||||||
|
// public void deleteManager(String managerNum);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Repayment;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.Update;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface paymentMapper {
|
||||||
|
@Select("select * from repayment where checkNum =#{checkNum}")
|
||||||
|
public Repayment selectPepaymentBycheckNum(long checkNum);
|
||||||
|
|
||||||
|
@Update("update repayment set repAmount = {#repAmount} ,repSum = {#repSum} where checkNum = #{checkNum}")
|
||||||
|
public void updateRepayment(Repayment repayment);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
|
||||||
|
import com.example.demo.bean.ProductHistroy;
|
||||||
|
import org.apache.ibatis.annotations.Insert;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface productHistroyMapper {
|
||||||
|
@Select("select * from producthistroy where productNum = #{productNum}")
|
||||||
|
public ProductHistroy selectAudioByCheckNum(long productNum);
|
||||||
|
|
||||||
|
@Select("select * from producthistroy")
|
||||||
|
public List<ProductHistroy> select();
|
||||||
|
|
||||||
|
@Insert("insert into productHistroy(productNum, productName, category, " +
|
||||||
|
"intrate, bankNum, productDescription, uploadTime, deleteTime, alterTime)" +
|
||||||
|
" values (#{productNum},#{productName},#{category},#{intrate},#{bankNum}," +
|
||||||
|
"#{productDescription},#{uploadTime},#{deleteTime},#{alterTime})")
|
||||||
|
public void addProductHistroy(ProductHistroy productHistroys);
|
||||||
|
|
||||||
|
// @Update("update producthistroy set productNum=#{productNum},productName=#{productName}" +
|
||||||
|
// ",category=#{category},intrate=#{intrate},bankNum=#{bankNum}," +
|
||||||
|
// "productDescription=#{productDescription},uploadTime=#{uploadTime},deleteTime=#{deleteTime}," +
|
||||||
|
// "alterTime=#{alterTime}where productNum=#{productNum}")
|
||||||
|
// public void updateProductHistroy(ProductHistroy productHistroys);
|
||||||
|
|
||||||
|
// @Delete("delete from producthistroy where productNum=#{productNum}")
|
||||||
|
// public void deleteProductHistroy(int productNum);
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface productMapper {
|
||||||
|
@Select("select * from product where productNum = #{productNum}")
|
||||||
|
public Product selectProductByProductNum(long productNum);
|
||||||
|
|
||||||
|
@Select("select * from product where productName = #{productName}")
|
||||||
|
public Product selectProductByProductName(long productName);
|
||||||
|
|
||||||
|
@Select("select * from product")
|
||||||
|
public List<Product> select();
|
||||||
|
|
||||||
|
@Insert("insert into product(productNum, productName, category, intrate, " +
|
||||||
|
"bankNum, productDescription, pictureAddress)" +
|
||||||
|
" values (#{productNum},#{productName},#{category},#{intrate},#{bankNum}," +
|
||||||
|
"#{productDescription},#{pictureAddress})")
|
||||||
|
public void addProduct(Product products);
|
||||||
|
|
||||||
|
@Update("update product set productNum=#{productNum},productName=#{productName}" +
|
||||||
|
",category=#{category},intrate=#{intrate},bankNum=#{bankNum}," +
|
||||||
|
"productDescription=#{productDescription},pictureAddress=#{pictureAddress}")
|
||||||
|
public void updateProduct(Product products);
|
||||||
|
|
||||||
|
|
||||||
|
@Delete("delete from product where productNum=#{productNum}")
|
||||||
|
public void deleteProduct(int productNum);
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Transaction;
|
||||||
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface transMapper {
|
||||||
|
@Select("select * from transaction where transactionNum = #{transactionNum}")
|
||||||
|
public Transaction selectAudioByCheckNum(long transactionNum);
|
||||||
|
|
||||||
|
@Select("select * from transaction")
|
||||||
|
public List<Transaction> select();
|
||||||
|
|
||||||
|
@Insert("insert into transaction(transactionNum, payer, payee," +
|
||||||
|
" transactionTime, transactionAmount, note,checkNum)" +
|
||||||
|
" values (#{transactionNum},#{payer},#{payee},#{transactionTime},#{transactionAmount}," +
|
||||||
|
"#{note},#{checkNum})")
|
||||||
|
public void addTransaction(Transaction transactions);
|
||||||
|
|
||||||
|
@Update("update audit set transactionNum=#{transactionNum},payer=#{payer}" +
|
||||||
|
",payee=#{payee},transactionTime=#{transactionTime},transactionAmount=#{transactionAmount}," +
|
||||||
|
"note=#{note}")
|
||||||
|
public void updateTransaction(Transaction transactions);
|
||||||
|
|
||||||
|
@Delete("delete from audit where transactionNum=#{transactionNum}")
|
||||||
|
public void deleteTransaction(long transactionNum);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.UsageDate;
|
||||||
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface usageDateMapper {
|
||||||
|
@Select("select * from usagedate where transactionNum = #{transactionNum}")
|
||||||
|
public UsageDate selectUsageDateByCheckNum(long checkNum);
|
||||||
|
|
||||||
|
@Select("select * from usagedate")
|
||||||
|
public List<UsageDate> select();
|
||||||
|
|
||||||
|
@Insert("insert into usagedate(checkNum, productNum, userNum," +
|
||||||
|
" bankAccount, bankNum, year, amount, startTime)" +
|
||||||
|
" values (#{checkNum},#{productNum},#{userNum},#{bankAccount},#{bankNum}," +
|
||||||
|
"#{year},#{amount},#{startTime})")
|
||||||
|
public void addUsageDate(UsageDate usageDate);
|
||||||
|
|
||||||
|
@Update("update usagedate set checkNum=#{checkNum},productNum=#{productNum}" +
|
||||||
|
",userNum=#{userNum},bankAccount=#{bankAccount},bankNum=#{bankNum}," +
|
||||||
|
"year=#{year},amount=#{amount},startTime=#{startTime}")
|
||||||
|
public void updateUsageDate(UsageDate usageDate);
|
||||||
|
|
||||||
|
@Delete("delete from usagedate where checkNum=#{checkNum}")
|
||||||
|
public void deleteUsageDate(long checkNum);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.UserBankIdentify;
|
||||||
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface userBankIdentify {
|
||||||
|
@Select("select * from userbankidentify where userName = #{userName}")
|
||||||
|
public UserBankIdentify selectUsageDateByCheckNum(String userName);
|
||||||
|
|
||||||
|
@Select("select * from userBankIdentify")
|
||||||
|
public List<UserBankIdentify> select();
|
||||||
|
|
||||||
|
@Insert("insert into usagedate(userName, bankAccount, bankAccountIdentify)" +
|
||||||
|
" values (#{userName},#{bankAccount},#{bankAccountIdentify})")
|
||||||
|
public void addUserBankIdentify(UserBankIdentify userBankIdentifys);
|
||||||
|
|
||||||
|
@Update("update usagedate set userName=#{userName},bankAccount=#{bankAccount}" +
|
||||||
|
",bankAccountIdentify=#{bankAccountIdentify}")
|
||||||
|
public void updateUserBankIdentify(UserBankIdentify userBankIdentifys);
|
||||||
|
|
||||||
|
@Delete("delete from usagedate where userName=#{userName}")
|
||||||
|
public void deleteUserBankIdentify(String userName);
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.User;
|
||||||
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface userMapper {
|
||||||
|
@Select("select * from user where userNum = #{userNum}")
|
||||||
|
public User selectUserByuserNum(long userNum);
|
||||||
|
|
||||||
|
@Select("select * from user")
|
||||||
|
public List<User> select();
|
||||||
|
|
||||||
|
@Insert("insert into user(userNum, userName, userPwd, userRight," +
|
||||||
|
" tureName, idNum, telephoneNum, address, isIdentify, registerTime)" +
|
||||||
|
" values (#{userNum},#{userName},#{userPwd},#{userRight},#{tureName}," +
|
||||||
|
"#{idNum},#{telephoneNum},#{address},#{isIdentify},#{registerTime})")
|
||||||
|
public void addUser(User users);
|
||||||
|
|
||||||
|
@Update("update user set userNum=#{userNum},userName=#{userName}" +
|
||||||
|
",userPwd=#{userPwd},userRight=#{userRight},tureName=#{tureName}," +
|
||||||
|
"idNum=#{idNum},telephoneNum=#{telephoneNum},address=#{address}," +
|
||||||
|
"isIdentify=#{isIdentify},registerTime=#{registerTime}where userNum=#{userNum}")
|
||||||
|
public void updateUser(User users);
|
||||||
|
|
||||||
|
@Delete("delete from user where userNum=#{userNum}")
|
||||||
|
public void deleteUser(long userNum);
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.example.demo;
|
||||||
|
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
//@MapperScan("com.example.demo.Dao")
|
||||||
|
public class DemoApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(DemoApplication.class, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class Audit {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long checkNum;
|
||||||
|
private long userNum;
|
||||||
|
private double amount;
|
||||||
|
private String applyTime;
|
||||||
|
private String bankAccount;
|
||||||
|
private long checkState;
|
||||||
|
private long contractNum;
|
||||||
|
private short isSignContract;
|
||||||
|
private long productNum;
|
||||||
|
private int year;
|
||||||
|
private int equation;
|
||||||
|
|
||||||
|
|
||||||
|
public Audit(){};
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class Bank {
|
||||||
|
@Id
|
||||||
|
private int bankNum;
|
||||||
|
private String bankName;
|
||||||
|
private String contact;//联系方式
|
||||||
|
|
||||||
|
|
||||||
|
public Bank(){};
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class Manager {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long managerNum;
|
||||||
|
private String managerName;
|
||||||
|
private String managerPwd;
|
||||||
|
private String managerRight;
|
||||||
|
private String telephoneNum;
|
||||||
|
|
||||||
|
|
||||||
|
public Manager(){};
|
||||||
|
|
||||||
|
public long getManagerNum() {
|
||||||
|
return managerNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setManagerNum(int managerNum) {
|
||||||
|
this.managerNum = managerNum;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class Product {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long productNum;
|
||||||
|
private String productName;
|
||||||
|
private String category;
|
||||||
|
private float intrate;
|
||||||
|
private int bankNum;
|
||||||
|
private String productDescription;
|
||||||
|
private String pictureAddress;
|
||||||
|
|
||||||
|
public Product(){};
|
||||||
|
|
||||||
|
public String getProductName() {
|
||||||
|
return productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategory() {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory(String category) {
|
||||||
|
this.category = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPictureAddress() {
|
||||||
|
return pictureAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPictureAddress(String pictureAddress) {
|
||||||
|
this.pictureAddress = pictureAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductDescription() {
|
||||||
|
return productDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductDescription(String productDescription) {
|
||||||
|
this.productDescription = productDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBankNum() {
|
||||||
|
return bankNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBankNum(int bankNum) {
|
||||||
|
this.bankNum = bankNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getIntrate() {
|
||||||
|
return intrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIntrate(float intrate) {
|
||||||
|
this.intrate = intrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getProductNum() {
|
||||||
|
return productNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductName(String productName) {
|
||||||
|
this.productName = productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductNum(long productNum) {
|
||||||
|
this.productNum = productNum;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,111 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class ProductHistroy {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long productNum;
|
||||||
|
private int bankNum;
|
||||||
|
private long managerNum;
|
||||||
|
private String productName;
|
||||||
|
private String category;
|
||||||
|
private float intrate;
|
||||||
|
private String productDescription;
|
||||||
|
private String upLoadTime;
|
||||||
|
private String deleteTime;
|
||||||
|
private String alterTime;
|
||||||
|
|
||||||
|
public ProductHistroy(){};
|
||||||
|
|
||||||
|
public long getManagerNum() {
|
||||||
|
return managerNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setManagerNum(long managerNum) {
|
||||||
|
this.managerNum = managerNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getProductNum() {
|
||||||
|
return productNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductNum(long productNum) {
|
||||||
|
this.productNum = productNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAlterTime() {
|
||||||
|
return alterTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlterTime(String alterTime) {
|
||||||
|
this.alterTime = alterTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getDeleteTime() {
|
||||||
|
return deleteTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleteTime(String deleteTime) {
|
||||||
|
this.deleteTime = deleteTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpLoadTime() {
|
||||||
|
return upLoadTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpLoadTime(String upLoadTime) {
|
||||||
|
this.upLoadTime = upLoadTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductDescription() {
|
||||||
|
return productDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductDescription(String productDescription) {
|
||||||
|
this.productDescription = productDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getIntrate() {
|
||||||
|
return intrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIntrate(float intrate) {
|
||||||
|
this.intrate = intrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategory() {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory(String category) {
|
||||||
|
this.category = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductName() {
|
||||||
|
return productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductName(String productName) {
|
||||||
|
this.productName = productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBankNum() {
|
||||||
|
return bankNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBankNum(int bankNum) {
|
||||||
|
this.bankNum = bankNum;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class Repayment {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long checkNum;
|
||||||
|
private double repAmount;
|
||||||
|
private double repSum;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class Transaction {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long transactionNum;
|
||||||
|
private long payer;
|
||||||
|
private long payee;
|
||||||
|
private float transactionTime;
|
||||||
|
private float transactionAmount;
|
||||||
|
private String note;
|
||||||
|
private long checkNum;
|
||||||
|
|
||||||
|
public Transaction(){};
|
||||||
|
public Transaction(long checkNum,long payer,long payee,double transationAmount){
|
||||||
|
this.checkNum=checkNum;
|
||||||
|
this.payer = payer;
|
||||||
|
this.payee = payee;
|
||||||
|
this.transactionAmount=transactionNum;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class UsageDate {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long checkNum;
|
||||||
|
private long productNum;
|
||||||
|
private long userNum;
|
||||||
|
private String bankAccount;
|
||||||
|
private int bankNum;
|
||||||
|
private int year;
|
||||||
|
private float amount;
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
public UsageDate(){};
|
||||||
|
private int equation;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class User {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long userNum;
|
||||||
|
private String userName;
|
||||||
|
private String userPwd;
|
||||||
|
private String userRight;
|
||||||
|
private String trueName;
|
||||||
|
private String idNum;
|
||||||
|
private String telephoneNum;
|
||||||
|
private String address;
|
||||||
|
private String isIdentify;
|
||||||
|
private String registerTime;
|
||||||
|
|
||||||
|
|
||||||
|
public User(){};
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Entity
|
||||||
|
public class UserBankIdentify {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private String userName;
|
||||||
|
private String bankAccount;
|
||||||
|
private short bankAccountIdentify;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.example.demo.circulator.controller;
|
||||||
|
|
||||||
|
import com.example.demo.circulator.service.PayCirService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class PayCirController {
|
||||||
|
//@Autowired
|
||||||
|
PayCirService payCirService;
|
||||||
|
|
||||||
|
@PostMapping("/pay")
|
||||||
|
public String payAmountCir(long checkNum,double pay){
|
||||||
|
int result = payCirService.payAmountCirculator(checkNum,pay);
|
||||||
|
if(result==1){
|
||||||
|
return "/还款成功";
|
||||||
|
}else if(result==-2){
|
||||||
|
return"/未贷款该业务";
|
||||||
|
}else
|
||||||
|
|
||||||
|
return "还款失败";
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.example.demo.circulator.service;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public abstract class CirService {
|
||||||
|
@PostConstruct
|
||||||
|
public void init(){}
|
||||||
|
|
||||||
|
@Transactional //数据库与事物的一致性
|
||||||
|
public double NextCirculator(long checkNum){return 0;}
|
||||||
|
public double SumCirculator(long productNum,double amount,int year){return 0;}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.example.demo.circulator.service;
|
||||||
|
|
||||||
|
import com.example.demo.Dao.productMapper;
|
||||||
|
import com.example.demo.Dao.usageDateMapper;
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import com.example.demo.bean.UsageDate;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class EPAIR_CirService extends CirService{
|
||||||
|
@Autowired
|
||||||
|
private usageDateMapper usageDateMapper;
|
||||||
|
@Autowired
|
||||||
|
private productMapper productMapper;
|
||||||
|
|
||||||
|
@Transactional //数据库与事物的一致性
|
||||||
|
public double NextCirculator(long checkNum){
|
||||||
|
try{
|
||||||
|
UsageDate usageDate = usageDateMapper.selectUsageDateByCheckNum(checkNum);
|
||||||
|
if(usageDate==null)return -2;
|
||||||
|
int year = usageDate.getYear();
|
||||||
|
double amount = usageDate.getAmount();
|
||||||
|
long productNum = usageDate.getProductNum();
|
||||||
|
|
||||||
|
Product product = productMapper.selectProductByProductNum(productNum);
|
||||||
|
if(product==null)return -3;
|
||||||
|
float intrate = product.getIntrate();
|
||||||
|
double rep_amount = 0;
|
||||||
|
|
||||||
|
//double not_rep_amount = amount - rep_amount;
|
||||||
|
intrate /= 12;
|
||||||
|
int month = year*12;
|
||||||
|
double rep = Math.pow((1+intrate),month)/(Math.pow((1+intrate),month)-1);
|
||||||
|
double next_principal_and_interest = rep * intrate * amount;
|
||||||
|
return next_principal_and_interest;
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double SumCirculator(long productNum,double amount,int year){
|
||||||
|
try{
|
||||||
|
Product product = productMapper.selectProductByProductNum(productNum);
|
||||||
|
if(product==null)return -3;
|
||||||
|
float intrate = product.getIntrate();
|
||||||
|
double rep = Math.pow((1+intrate),year)/(Math.pow((1+intrate),year)-1);
|
||||||
|
double principal_and_interest = rep * intrate * amount * year;
|
||||||
|
return principal_and_interest;
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.example.demo.circulator.service;
|
||||||
|
|
||||||
|
import com.example.demo.Dao.paymentMapper;
|
||||||
|
import com.example.demo.Dao.productMapper;
|
||||||
|
import com.example.demo.Dao.usageDateMapper;
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import com.example.demo.bean.Repayment;
|
||||||
|
import com.example.demo.bean.UsageDate;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class EPR_CirService extends CirService{
|
||||||
|
@Autowired
|
||||||
|
private usageDateMapper usageDateMapper;
|
||||||
|
@Autowired
|
||||||
|
private paymentMapper paymentMapper;
|
||||||
|
@Autowired
|
||||||
|
private productMapper productMapper;
|
||||||
|
|
||||||
|
@Transactional //数据库与事物的一致性
|
||||||
|
public double NextCirculator(long checkNum){
|
||||||
|
try{
|
||||||
|
UsageDate usageDate = usageDateMapper.selectUsageDateByCheckNum(checkNum);
|
||||||
|
Repayment repayment = paymentMapper.selectPepaymentBycheckNum(checkNum);
|
||||||
|
if(usageDate!=null){return -2;}
|
||||||
|
int year = usageDate.getYear();
|
||||||
|
double amount = usageDate.getAmount();
|
||||||
|
long productNum = usageDate.getProductNum();
|
||||||
|
|
||||||
|
Product product = productMapper.selectProductByProductNum(productNum);
|
||||||
|
if(product==null)return -3;
|
||||||
|
float intrate = product.getIntrate();
|
||||||
|
double rep_amount = 0;
|
||||||
|
if(repayment!=null)
|
||||||
|
repayment.getRepAmount();
|
||||||
|
intrate /= 12;
|
||||||
|
int month = year*12;
|
||||||
|
double next_principal_and_interest = amount/month + (amount - rep_amount) * intrate;
|
||||||
|
return next_principal_and_interest;
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double SumCirculator(long productNum,double amount,int year){
|
||||||
|
try{
|
||||||
|
Product product = productMapper.selectProductByProductNum(productNum);
|
||||||
|
if(product==null)return -3;
|
||||||
|
float intrate = product.getIntrate();
|
||||||
|
intrate /= 12;
|
||||||
|
int month = year * 12;
|
||||||
|
double first_principal_and_interest = amount/month + amount*intrate;
|
||||||
|
double last_principal_and_interest = amount/month + amount*(1-(month-1)/month)*intrate;
|
||||||
|
double principal_and_interest = (first_principal_and_interest + last_principal_and_interest)*month/2;
|
||||||
|
return principal_and_interest;
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.example.demo.circulator.service;
|
||||||
|
|
||||||
|
import com.example.demo.Dao.paymentMapper;
|
||||||
|
import com.example.demo.Dao.transMapper;
|
||||||
|
import com.example.demo.Dao.usageDateMapper;
|
||||||
|
import com.example.demo.bean.Repayment;
|
||||||
|
import com.example.demo.bean.Transaction;
|
||||||
|
import com.example.demo.bean.UsageDate;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class PayCirService {
|
||||||
|
@Autowired
|
||||||
|
private usageDateMapper usageDateMapper;
|
||||||
|
@Autowired
|
||||||
|
private paymentMapper paymentMapper;
|
||||||
|
@Autowired
|
||||||
|
private transMapper transMapper;
|
||||||
|
|
||||||
|
public int payAmountCirculator(long checkNum,double pay){
|
||||||
|
try{
|
||||||
|
Repayment repayment = paymentMapper.selectPepaymentBycheckNum(checkNum);
|
||||||
|
UsageDate usageDate= usageDateMapper.selectUsageDateByCheckNum(checkNum);
|
||||||
|
if(usageDate!=null)return -2;
|
||||||
|
double rep_amount = 0;
|
||||||
|
if(repayment!=null)
|
||||||
|
repayment.getRepAmount();
|
||||||
|
long userNum = usageDate.getUserNum();
|
||||||
|
int bankNum = usageDate.getBankNum();
|
||||||
|
double amount = usageDate.getAmount();
|
||||||
|
int year = usageDate.getYear();
|
||||||
|
|
||||||
|
Transaction transaction = new Transaction(checkNum,userNum,bankNum,pay);
|
||||||
|
transMapper.addTransaction(transaction);
|
||||||
|
|
||||||
|
rep_amount = pay - amount/(year*12);
|
||||||
|
repayment.setRepAmount(rep_amount);
|
||||||
|
repayment.setRepSum(pay);
|
||||||
|
paymentMapper.updateRepayment(repayment);
|
||||||
|
return 1;
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
package com.example.demo.productService.controller;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import com.example.demo.productService.tools.addPro;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class addController extends HttpServlet {
|
||||||
|
Product product;
|
||||||
|
addPro addPro;
|
||||||
|
@RequestMapping("/addproduct")
|
||||||
|
public String doPost(HttpServletResponse response,HttpServletRequest request){
|
||||||
|
PrintWriter writer=null;
|
||||||
|
try{
|
||||||
|
product.setProductNum(Integer.parseInt(request.getParameter("productNum")));
|
||||||
|
product.setProductName(request.getParameter("productName"));
|
||||||
|
product.setBankNum(Integer.parseInt(request.getParameter("bankNum")));
|
||||||
|
product.setCategory(request.getParameter("productName"));
|
||||||
|
product.setIntrate(Integer.parseInt(request.getParameter("intrate")));
|
||||||
|
product.setProductDescription(request.getParameter("description"));
|
||||||
|
product.setPictureAddress(request.getParameter("address"));
|
||||||
|
int result= addPro.add(product);
|
||||||
|
response.setContentType("text/hmtl;charset=utf-8");
|
||||||
|
writer=response.getWriter();
|
||||||
|
if(result==1){
|
||||||
|
writer.write("增加成功");
|
||||||
|
return "/";//返回增加删除修改的总页面
|
||||||
|
}
|
||||||
|
writer.write("增加失败");
|
||||||
|
return "/";//返回增加的页面
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
if(writer!=null){
|
||||||
|
writer.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "页面出错";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
package com.example.demo.productService.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import com.example.demo.productService.tools.deletePro;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class deleteController {
|
||||||
|
Product product;
|
||||||
|
deletePro deletes;
|
||||||
|
@RequestMapping("/deleteproduct")
|
||||||
|
public String doPost(HttpServletResponse response, HttpServletRequest request){
|
||||||
|
PrintWriter writer=null;
|
||||||
|
try{
|
||||||
|
int productNum=Integer.parseInt(request.getParameter("productNum"));
|
||||||
|
int result= deletes.delete(productNum);
|
||||||
|
response.setContentType("text/hmtl;charset=utf-8");
|
||||||
|
writer=response.getWriter();
|
||||||
|
if(result==1){
|
||||||
|
writer.write("删除成功");
|
||||||
|
return "/";//返回增加删除修改的总页面
|
||||||
|
}
|
||||||
|
writer.write("删除失败");
|
||||||
|
return "/";//返回删除的页面
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
if(writer!=null){
|
||||||
|
writer.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "页面出错";
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.example.demo.productService.controller;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import com.example.demo.productService.tools.updatePro;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class updateController {
|
||||||
|
Product product;
|
||||||
|
updatePro updatePro;
|
||||||
|
@RequestMapping("/updateproduct")
|
||||||
|
public String doPost(HttpServletResponse response, HttpServletRequest request){
|
||||||
|
PrintWriter writer=null;
|
||||||
|
try{
|
||||||
|
product.setProductNum(Integer.parseInt(request.getParameter("productNum")));
|
||||||
|
product.setProductName(request.getParameter("productName"));
|
||||||
|
product.setBankNum(Integer.parseInt(request.getParameter("bankNum")));
|
||||||
|
product.setCategory(request.getParameter("productName"));
|
||||||
|
product.setIntrate(Integer.parseInt(request.getParameter("intrate")));
|
||||||
|
product.setProductDescription(request.getParameter("description"));
|
||||||
|
product.setPictureAddress(request.getParameter("address"));
|
||||||
|
int result= updatePro.update(product);
|
||||||
|
response.setContentType("text/hmtl;charset=utf-8");
|
||||||
|
writer=response.getWriter();
|
||||||
|
if(result==1){
|
||||||
|
writer.write("修改成功");
|
||||||
|
return "/";//返回增加删除修改的总页面
|
||||||
|
}
|
||||||
|
writer.write("修改失败");
|
||||||
|
return "/";//返回修改的页面
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
if(writer!=null){
|
||||||
|
writer.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "页面出错";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.example.demo.productService.tools;
|
||||||
|
|
||||||
|
import com.example.demo.Dao.productHistroyMapper;
|
||||||
|
import com.example.demo.Dao.productMapper;
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import com.example.demo.bean.ProductHistroy;
|
||||||
|
|
||||||
|
public class addPro {
|
||||||
|
private com.example.demo.productService.tools.nowTime nowTime;
|
||||||
|
private productMapper productMapper;
|
||||||
|
private productHistroyMapper proHisMapper;
|
||||||
|
private ProductHistroy productHistroy;
|
||||||
|
|
||||||
|
public int add(Product product1){
|
||||||
|
productMapper.addProduct(product1);
|
||||||
|
productHistroy.setProductNum(product1.getProductNum());
|
||||||
|
productHistroy.setProductName(product1.getProductName());
|
||||||
|
productHistroy.setBankNum(product1.getBankNum());
|
||||||
|
productHistroy.setCategory(product1.getCategory());
|
||||||
|
productHistroy.setIntrate(product1.getIntrate());
|
||||||
|
//productHistroy.setManagerNum(); manager.setManagerNum();调用登陆里面的一个接口得到managerNum
|
||||||
|
productHistroy.setProductDescription(product1.getProductDescription());
|
||||||
|
productHistroy.setUpLoadTime(nowTime.nowTime());
|
||||||
|
proHisMapper.addProductHistroy(productHistroy);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.example.demo.productService.tools;
|
||||||
|
|
||||||
|
import com.example.demo.Dao.productHistroyMapper;
|
||||||
|
import com.example.demo.bean.ProductHistroy;
|
||||||
|
|
||||||
|
public class deletePro {
|
||||||
|
private com.example.demo.productService.tools.nowTime nowTime;
|
||||||
|
private com.example.demo.Dao.productMapper productMapper;
|
||||||
|
private productHistroyMapper proHisMapper;
|
||||||
|
private ProductHistroy productHistroy;
|
||||||
|
|
||||||
|
public int delete(int productNum){
|
||||||
|
productMapper.deleteProduct(productNum);
|
||||||
|
productHistroy.setProductNum(productNum);
|
||||||
|
//productHistroy.setManagerNum(); manager.setManagerNum();调用登陆里面的一个接口得到managerNum
|
||||||
|
productHistroy.setUpLoadTime(nowTime.nowTime());
|
||||||
|
proHisMapper.addProductHistroy(productHistroy);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.example.demo.productService.tools;
|
||||||
|
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
public class nowTime{
|
||||||
|
public String nowTime(){
|
||||||
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
|
||||||
|
String time=(String)df.format(new Date());
|
||||||
|
return time;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.example.demo.productService.tools;
|
||||||
|
|
||||||
|
import com.example.demo.Dao.productHistroyMapper;
|
||||||
|
import com.example.demo.Dao.productMapper;
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import com.example.demo.bean.ProductHistroy;
|
||||||
|
|
||||||
|
public class updatePro {
|
||||||
|
private com.example.demo.productService.tools.nowTime nowTime;
|
||||||
|
private productMapper productMapper;
|
||||||
|
private productHistroyMapper proHisMapper;
|
||||||
|
private ProductHistroy productHistroy;
|
||||||
|
|
||||||
|
public int update(Product product1){
|
||||||
|
productMapper.updateProduct(product1);
|
||||||
|
productHistroy.setProductNum(product1.getProductNum());
|
||||||
|
productHistroy.setProductName(product1.getProductName());
|
||||||
|
productHistroy.setBankNum(product1.getBankNum());
|
||||||
|
productHistroy.setCategory(product1.getCategory());
|
||||||
|
productHistroy.setIntrate(product1.getIntrate());
|
||||||
|
//productHistroy.setManagerNum(); manager.setManagerNum();调用登陆里面的一个接口得到managerNum
|
||||||
|
productHistroy.setProductDescription(product1.getProductDescription());
|
||||||
|
productHistroy.setAlterTime(nowTime.nowTime());
|
||||||
|
proHisMapper.addProductHistroy(productHistroy);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Audit;
|
||||||
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface auditMapper {
|
||||||
|
@Select("select * from audit where checkNum = #{checkNum}")
|
||||||
|
public Audit selectAudioByCheckNum(long checkNum);
|
||||||
|
|
||||||
|
@Select("select * from audit")
|
||||||
|
public List<Audit> select();
|
||||||
|
|
||||||
|
@Insert("insert into audit(checkNum, userNum, productNum, " +
|
||||||
|
"bankAccount, checkState, contractNum, " +
|
||||||
|
"isSignContract, year, amount, applyTime)" +
|
||||||
|
" values (#{checkNum},#{userNum},#{productNum},#{bankAccount},#{checkState}," +
|
||||||
|
"#{contractNum},#{isSignContract},#{year},#{amount},#{applyTime})")
|
||||||
|
public void addAudit(Audit audits);
|
||||||
|
|
||||||
|
@Update("update audit set checkNum=#{checkNum},userNum=#{userNum}" +
|
||||||
|
",productNum=#{productNum},checkState=#{checkState},contractNum=#{contractNum}," +
|
||||||
|
"isSignContract=#{isSignContract},year=#{year},amount=#{amount}," +
|
||||||
|
"applyTime=#{applyTime}where checkNum=#{checkNum}")
|
||||||
|
public void updateAudit(Audit audits);
|
||||||
|
|
||||||
|
@Delete("delete from audit where checkNum=#{checkNum}")
|
||||||
|
public void deleteAudit(long checkNum);
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Bank;
|
||||||
|
import org.apache.ibatis.annotations.Insert;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.Update;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface bankMapper {
|
||||||
|
|
||||||
|
@Select("select * from bank where bankNum = #{bankNum}")
|
||||||
|
public Bank selectBankByBankNum(int bankNum);
|
||||||
|
|
||||||
|
@Select("select * from bank where bankName = #{bankName}")
|
||||||
|
public Bank selectBankByBankName(String bankName);
|
||||||
|
|
||||||
|
@Select("select * from bank")
|
||||||
|
public List<Bank> select();
|
||||||
|
|
||||||
|
@Insert("insert into bank(bankNum, bankName, contact, " +
|
||||||
|
" values (#{bankNum},#{bankName},#{contact},)")
|
||||||
|
public void addBank(Bank banks);
|
||||||
|
|
||||||
|
@Update("update bank set bankNum=#{bankNum},bankName=#{bankName}" +
|
||||||
|
",contact=#{contact} where bankNum=#{bankNum}")
|
||||||
|
public void updateBank(Bank banks);
|
||||||
|
|
||||||
|
// @Delete("delete from bank where bankNum=#{bankNum}")
|
||||||
|
// public void deleteBank(String bankNum);
|
||||||
|
//
|
||||||
|
// @Delete("delete from bank where bankName=#{bankName}")
|
||||||
|
// public void deleteBanks(String bankName);
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Manager;
|
||||||
|
import org.apache.ibatis.annotations.Insert;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.Update;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface managerMapper {
|
||||||
|
@Select("select * from manager where managerNum = #{managerName}")
|
||||||
|
public Manager selectManagerByManagerName(String managerName);
|
||||||
|
|
||||||
|
@Insert("insert into manager(managerNum, managerName, managerPwd, " +
|
||||||
|
"managerRight, telephoneNum) values (#{managerNum},#{managerName}," +
|
||||||
|
"#{managerPwd},#{managerRight},#{telephoneNum})")
|
||||||
|
public void addManager(Manager managers);
|
||||||
|
|
||||||
|
@Update("update manager set managerNum=#{managerNum},managerName=#{managerName}" +
|
||||||
|
",managerPwd=#{managerPwd},managerRight=#{managerRight},telephoneNum=#{telephoneNum},")
|
||||||
|
public void updateManager(Manager managers);
|
||||||
|
|
||||||
|
// @Delete("delete from manager where managerNum=#{managerNum}")
|
||||||
|
// public void deleteManager(String managerNum);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Repayment;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.Update;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface paymentMapper {
|
||||||
|
@Select("select * from repayment where checkNum =#{checkNum}")
|
||||||
|
public Repayment selectPepaymentBycheckNum(long checkNum);
|
||||||
|
|
||||||
|
@Update("update repayment set repAmount = {#repAmount} ,repSum = {#repSum} where checkNum = #{checkNum}")
|
||||||
|
public void updateRepayment(Repayment repayment);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
|
||||||
|
import com.example.demo.bean.ProductHistroy;
|
||||||
|
import org.apache.ibatis.annotations.Insert;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface productHistroyMapper {
|
||||||
|
@Select("select * from producthistroy where productNum = #{productNum}")
|
||||||
|
public ProductHistroy selectAudioByCheckNum(long productNum);
|
||||||
|
|
||||||
|
@Select("select * from producthistroy")
|
||||||
|
public List<ProductHistroy> select();
|
||||||
|
|
||||||
|
@Insert("insert into productHistroy(productNum, productName, category, " +
|
||||||
|
"intrate, bankNum, productDescription, uploadTime, deleteTime, alterTime)" +
|
||||||
|
" values (#{productNum},#{productName},#{category},#{intrate},#{bankNum}," +
|
||||||
|
"#{productDescription},#{uploadTime},#{deleteTime},#{alterTime})")
|
||||||
|
public void addProductHistroy(ProductHistroy productHistroys);
|
||||||
|
|
||||||
|
// @Update("update producthistroy set productNum=#{productNum},productName=#{productName}" +
|
||||||
|
// ",category=#{category},intrate=#{intrate},bankNum=#{bankNum}," +
|
||||||
|
// "productDescription=#{productDescription},uploadTime=#{uploadTime},deleteTime=#{deleteTime}," +
|
||||||
|
// "alterTime=#{alterTime}where productNum=#{productNum}")
|
||||||
|
// public void updateProductHistroy(ProductHistroy productHistroys);
|
||||||
|
|
||||||
|
// @Delete("delete from producthistroy where productNum=#{productNum}")
|
||||||
|
// public void deleteProductHistroy(int productNum);
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface productMapper {
|
||||||
|
@Select("select * from product where productNum = #{productNum}")
|
||||||
|
public Product selectProductByProductNum(long productNum);
|
||||||
|
|
||||||
|
@Select("select * from product where productName = #{productName}")
|
||||||
|
public Product selectProductByProductName(long productName);
|
||||||
|
|
||||||
|
@Select("select * from product")
|
||||||
|
public List<Product> select();
|
||||||
|
|
||||||
|
@Insert("insert into product(productNum, productName, category, intrate, " +
|
||||||
|
"bankNum, productDescription, pictureAddress)" +
|
||||||
|
" values (#{productNum},#{productName},#{category},#{intrate},#{bankNum}," +
|
||||||
|
"#{productDescription},#{pictureAddress})")
|
||||||
|
public void addProduct(Product products);
|
||||||
|
|
||||||
|
@Update("update product set productNum=#{productNum},productName=#{productName}" +
|
||||||
|
",category=#{category},intrate=#{intrate},bankNum=#{bankNum}," +
|
||||||
|
"productDescription=#{productDescription},pictureAddress=#{pictureAddress}")
|
||||||
|
public void updateProduct(Product products);
|
||||||
|
|
||||||
|
|
||||||
|
@Delete("delete from product where productNum=#{productNum}")
|
||||||
|
public void deleteProduct(int productNum);
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Transaction;
|
||||||
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface transMapper {
|
||||||
|
@Select("select * from transaction where transactionNum = #{transactionNum}")
|
||||||
|
public Transaction selectAudioByCheckNum(long transactionNum);
|
||||||
|
|
||||||
|
@Select("select * from transaction")
|
||||||
|
public List<Transaction> select();
|
||||||
|
|
||||||
|
@Insert("insert into transaction(transactionNum, payer, payee," +
|
||||||
|
" transactionTime, transactionAmount, note,checkNum)" +
|
||||||
|
" values (#{transactionNum},#{payer},#{payee},#{transactionTime},#{transactionAmount}," +
|
||||||
|
"#{note},#{checkNum})")
|
||||||
|
public void addTransaction(Transaction transactions);
|
||||||
|
|
||||||
|
@Update("update audit set transactionNum=#{transactionNum},payer=#{payer}" +
|
||||||
|
",payee=#{payee},transactionTime=#{transactionTime},transactionAmount=#{transactionAmount}," +
|
||||||
|
"note=#{note}")
|
||||||
|
public void updateTransaction(Transaction transactions);
|
||||||
|
|
||||||
|
@Delete("delete from audit where transactionNum=#{transactionNum}")
|
||||||
|
public void deleteTransaction(long transactionNum);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.UsageDate;
|
||||||
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface usageDateMapper {
|
||||||
|
@Select("select * from usagedate where transactionNum = #{transactionNum}")
|
||||||
|
public UsageDate selectUsageDateByCheckNum(long checkNum);
|
||||||
|
|
||||||
|
@Select("select * from usagedate")
|
||||||
|
public List<UsageDate> select();
|
||||||
|
|
||||||
|
@Insert("insert into usagedate(checkNum, productNum, userNum," +
|
||||||
|
" bankAccount, bankNum, year, amount, startTime)" +
|
||||||
|
" values (#{checkNum},#{productNum},#{userNum},#{bankAccount},#{bankNum}," +
|
||||||
|
"#{year},#{amount},#{startTime})")
|
||||||
|
public void addUsageDate(UsageDate usageDate);
|
||||||
|
|
||||||
|
@Update("update usagedate set checkNum=#{checkNum},productNum=#{productNum}" +
|
||||||
|
",userNum=#{userNum},bankAccount=#{bankAccount},bankNum=#{bankNum}," +
|
||||||
|
"year=#{year},amount=#{amount},startTime=#{startTime}")
|
||||||
|
public void updateUsageDate(UsageDate usageDate);
|
||||||
|
|
||||||
|
@Delete("delete from usagedate where checkNum=#{checkNum}")
|
||||||
|
public void deleteUsageDate(long checkNum);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.UserBankIdentify;
|
||||||
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface userBankIdentify {
|
||||||
|
@Select("select * from userbankidentify where userName = #{userName}")
|
||||||
|
public UserBankIdentify selectUsageDateByCheckNum(String userName);
|
||||||
|
|
||||||
|
@Select("select * from userBankIdentify")
|
||||||
|
public List<UserBankIdentify> select();
|
||||||
|
|
||||||
|
@Insert("insert into usagedate(userName, bankAccount, bankAccountIdentify)" +
|
||||||
|
" values (#{userName},#{bankAccount},#{bankAccountIdentify})")
|
||||||
|
public void addUserBankIdentify(UserBankIdentify userBankIdentifys);
|
||||||
|
|
||||||
|
@Update("update usagedate set userName=#{userName},bankAccount=#{bankAccount}" +
|
||||||
|
",bankAccountIdentify=#{bankAccountIdentify}")
|
||||||
|
public void updateUserBankIdentify(UserBankIdentify userBankIdentifys);
|
||||||
|
|
||||||
|
@Delete("delete from usagedate where userName=#{userName}")
|
||||||
|
public void deleteUserBankIdentify(String userName);
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.example.demo.Dao;
|
||||||
|
|
||||||
|
import com.example.demo.bean.User;
|
||||||
|
import org.apache.ibatis.annotations.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface userMapper {
|
||||||
|
@Select("select * from user where userNum = #{userNum}")
|
||||||
|
public User selectUserByuserNum(long userNum);
|
||||||
|
|
||||||
|
@Select("select * from user")
|
||||||
|
public List<User> select();
|
||||||
|
|
||||||
|
@Insert("insert into user(userNum, userName, userPwd, userRight," +
|
||||||
|
" tureName, idNum, telephoneNum, address, isIdentify, registerTime)" +
|
||||||
|
" values (#{userNum},#{userName},#{userPwd},#{userRight},#{tureName}," +
|
||||||
|
"#{idNum},#{telephoneNum},#{address},#{isIdentify},#{registerTime})")
|
||||||
|
public void addUser(User users);
|
||||||
|
|
||||||
|
@Update("update user set userNum=#{userNum},userName=#{userName}" +
|
||||||
|
",userPwd=#{userPwd},userRight=#{userRight},tureName=#{tureName}," +
|
||||||
|
"idNum=#{idNum},telephoneNum=#{telephoneNum},address=#{address}," +
|
||||||
|
"isIdentify=#{isIdentify},registerTime=#{registerTime}where userNum=#{userNum}")
|
||||||
|
public void updateUser(User users);
|
||||||
|
|
||||||
|
@Delete("delete from user where userNum=#{userNum}")
|
||||||
|
public void deleteUser(long userNum);
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class Audit {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long checkNum;
|
||||||
|
private long userNum;
|
||||||
|
private double amount;
|
||||||
|
private String applyTime;
|
||||||
|
private String bankAccount;
|
||||||
|
private long checkState;
|
||||||
|
private long contractNum;
|
||||||
|
private short isSignContract;
|
||||||
|
private long productNum;
|
||||||
|
private int year;
|
||||||
|
private int equation;
|
||||||
|
|
||||||
|
|
||||||
|
public Audit(){};
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class Bank {
|
||||||
|
@Id
|
||||||
|
private int bankNum;
|
||||||
|
private String bankName;
|
||||||
|
private String contact;//联系方式
|
||||||
|
|
||||||
|
|
||||||
|
public Bank(){};
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class Manager {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long managerNum;
|
||||||
|
private String managerName;
|
||||||
|
private String managerPwd;
|
||||||
|
private String managerRight;
|
||||||
|
private String telephoneNum;
|
||||||
|
|
||||||
|
|
||||||
|
public Manager(){};
|
||||||
|
|
||||||
|
public long getManagerNum() {
|
||||||
|
return managerNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setManagerNum(int managerNum) {
|
||||||
|
this.managerNum = managerNum;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class Product {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long productNum;
|
||||||
|
private String productName;
|
||||||
|
private String category;
|
||||||
|
private float intrate;
|
||||||
|
private int bankNum;
|
||||||
|
private String productDescription;
|
||||||
|
private String pictureAddress;
|
||||||
|
|
||||||
|
public Product(){};
|
||||||
|
|
||||||
|
public String getProductName() {
|
||||||
|
return productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategory() {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory(String category) {
|
||||||
|
this.category = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPictureAddress() {
|
||||||
|
return pictureAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPictureAddress(String pictureAddress) {
|
||||||
|
this.pictureAddress = pictureAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductDescription() {
|
||||||
|
return productDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductDescription(String productDescription) {
|
||||||
|
this.productDescription = productDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBankNum() {
|
||||||
|
return bankNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBankNum(int bankNum) {
|
||||||
|
this.bankNum = bankNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getIntrate() {
|
||||||
|
return intrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIntrate(float intrate) {
|
||||||
|
this.intrate = intrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getProductNum() {
|
||||||
|
return productNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductName(String productName) {
|
||||||
|
this.productName = productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductNum(long productNum) {
|
||||||
|
this.productNum = productNum;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,111 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class ProductHistroy {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long productNum;
|
||||||
|
private int bankNum;
|
||||||
|
private long managerNum;
|
||||||
|
private String productName;
|
||||||
|
private String category;
|
||||||
|
private float intrate;
|
||||||
|
private String productDescription;
|
||||||
|
private String upLoadTime;
|
||||||
|
private String deleteTime;
|
||||||
|
private String alterTime;
|
||||||
|
|
||||||
|
public ProductHistroy(){};
|
||||||
|
|
||||||
|
public long getManagerNum() {
|
||||||
|
return managerNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setManagerNum(long managerNum) {
|
||||||
|
this.managerNum = managerNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getProductNum() {
|
||||||
|
return productNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductNum(long productNum) {
|
||||||
|
this.productNum = productNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAlterTime() {
|
||||||
|
return alterTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlterTime(String alterTime) {
|
||||||
|
this.alterTime = alterTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getDeleteTime() {
|
||||||
|
return deleteTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleteTime(String deleteTime) {
|
||||||
|
this.deleteTime = deleteTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpLoadTime() {
|
||||||
|
return upLoadTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpLoadTime(String upLoadTime) {
|
||||||
|
this.upLoadTime = upLoadTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductDescription() {
|
||||||
|
return productDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductDescription(String productDescription) {
|
||||||
|
this.productDescription = productDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getIntrate() {
|
||||||
|
return intrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIntrate(float intrate) {
|
||||||
|
this.intrate = intrate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategory() {
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategory(String category) {
|
||||||
|
this.category = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductName() {
|
||||||
|
return productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductName(String productName) {
|
||||||
|
this.productName = productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBankNum() {
|
||||||
|
return bankNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBankNum(int bankNum) {
|
||||||
|
this.bankNum = bankNum;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class Repayment {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long checkNum;
|
||||||
|
private double repAmount;
|
||||||
|
private double repSum;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class Transaction {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long transactionNum;
|
||||||
|
private long payer;
|
||||||
|
private long payee;
|
||||||
|
private float transactionTime;
|
||||||
|
private float transactionAmount;
|
||||||
|
private String note;
|
||||||
|
private long checkNum;
|
||||||
|
|
||||||
|
public Transaction(){};
|
||||||
|
public Transaction(long checkNum,long payer,long payee,double transationAmount){
|
||||||
|
this.checkNum=checkNum;
|
||||||
|
this.payer = payer;
|
||||||
|
this.payee = payee;
|
||||||
|
this.transactionAmount=transactionNum;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class UsageDate {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long checkNum;
|
||||||
|
private long productNum;
|
||||||
|
private long userNum;
|
||||||
|
private String bankAccount;
|
||||||
|
private int bankNum;
|
||||||
|
private int year;
|
||||||
|
private float amount;
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
public UsageDate(){};
|
||||||
|
private int equation;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
public class User {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long userNum;
|
||||||
|
private String userName;
|
||||||
|
private String userPwd;
|
||||||
|
private String userRight;
|
||||||
|
private String trueName;
|
||||||
|
private String idNum;
|
||||||
|
private String telephoneNum;
|
||||||
|
private String address;
|
||||||
|
private String isIdentify;
|
||||||
|
private String registerTime;
|
||||||
|
|
||||||
|
|
||||||
|
public User(){};
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.example.demo.bean;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Entity
|
||||||
|
public class UserBankIdentify {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private String userName;
|
||||||
|
private String bankAccount;
|
||||||
|
private short bankAccountIdentify;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.example.demo.circulator.controller;
|
||||||
|
|
||||||
|
import com.example.demo.circulator.service.PayCirService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class PayCirController {
|
||||||
|
//@Autowired
|
||||||
|
PayCirService payCirService;
|
||||||
|
|
||||||
|
@PostMapping("/pay")
|
||||||
|
public String payAmountCir(long checkNum,double pay){
|
||||||
|
int result = payCirService.payAmountCirculator(checkNum,pay);
|
||||||
|
if(result==1){
|
||||||
|
return "/还款成功";
|
||||||
|
}else if(result==-2){
|
||||||
|
return"/未贷款该业务";
|
||||||
|
}else
|
||||||
|
|
||||||
|
return "还款失败";
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.example.demo.circulator.service;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public abstract class CirService {
|
||||||
|
@PostConstruct
|
||||||
|
public void init(){}
|
||||||
|
|
||||||
|
@Transactional //数据库与事物的一致性
|
||||||
|
public double NextCirculator(long checkNum){return 0;}
|
||||||
|
public double SumCirculator(long productNum,double amount,int year){return 0;}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.example.demo.circulator.service;
|
||||||
|
|
||||||
|
import com.example.demo.Dao.productMapper;
|
||||||
|
import com.example.demo.Dao.usageDateMapper;
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import com.example.demo.bean.UsageDate;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class EPAIR_CirService extends CirService{
|
||||||
|
@Autowired
|
||||||
|
private usageDateMapper usageDateMapper;
|
||||||
|
@Autowired
|
||||||
|
private productMapper productMapper;
|
||||||
|
|
||||||
|
@Transactional //数据库与事物的一致性
|
||||||
|
public double NextCirculator(long checkNum){
|
||||||
|
try{
|
||||||
|
UsageDate usageDate = usageDateMapper.selectUsageDateByCheckNum(checkNum);
|
||||||
|
if(usageDate==null)return -2;
|
||||||
|
int year = usageDate.getYear();
|
||||||
|
double amount = usageDate.getAmount();
|
||||||
|
long productNum = usageDate.getProductNum();
|
||||||
|
|
||||||
|
Product product = productMapper.selectProductByProductNum(productNum);
|
||||||
|
if(product==null)return -3;
|
||||||
|
float intrate = product.getIntrate();
|
||||||
|
double rep_amount = 0;
|
||||||
|
|
||||||
|
//double not_rep_amount = amount - rep_amount;
|
||||||
|
intrate /= 12;
|
||||||
|
int month = year*12;
|
||||||
|
double rep = Math.pow((1+intrate),month)/(Math.pow((1+intrate),month)-1);
|
||||||
|
double next_principal_and_interest = rep * intrate * amount;
|
||||||
|
return next_principal_and_interest;
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double SumCirculator(long productNum,double amount,int year){
|
||||||
|
try{
|
||||||
|
Product product = productMapper.selectProductByProductNum(productNum);
|
||||||
|
if(product==null)return -3;
|
||||||
|
float intrate = product.getIntrate();
|
||||||
|
double rep = Math.pow((1+intrate),year)/(Math.pow((1+intrate),year)-1);
|
||||||
|
double principal_and_interest = rep * intrate * amount * year;
|
||||||
|
return principal_and_interest;
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.example.demo.circulator.service;
|
||||||
|
|
||||||
|
import com.example.demo.Dao.paymentMapper;
|
||||||
|
import com.example.demo.Dao.productMapper;
|
||||||
|
import com.example.demo.Dao.usageDateMapper;
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import com.example.demo.bean.Repayment;
|
||||||
|
import com.example.demo.bean.UsageDate;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class EPR_CirService extends CirService{
|
||||||
|
@Autowired
|
||||||
|
private usageDateMapper usageDateMapper;
|
||||||
|
@Autowired
|
||||||
|
private paymentMapper paymentMapper;
|
||||||
|
@Autowired
|
||||||
|
private productMapper productMapper;
|
||||||
|
|
||||||
|
@Transactional //数据库与事物的一致性
|
||||||
|
public double NextCirculator(long checkNum){
|
||||||
|
try{
|
||||||
|
UsageDate usageDate = usageDateMapper.selectUsageDateByCheckNum(checkNum);
|
||||||
|
Repayment repayment = paymentMapper.selectPepaymentBycheckNum(checkNum);
|
||||||
|
if(usageDate!=null){return -2;}
|
||||||
|
int year = usageDate.getYear();
|
||||||
|
double amount = usageDate.getAmount();
|
||||||
|
long productNum = usageDate.getProductNum();
|
||||||
|
|
||||||
|
Product product = productMapper.selectProductByProductNum(productNum);
|
||||||
|
if(product==null)return -3;
|
||||||
|
float intrate = product.getIntrate();
|
||||||
|
double rep_amount = 0;
|
||||||
|
if(repayment!=null)
|
||||||
|
repayment.getRepAmount();
|
||||||
|
intrate /= 12;
|
||||||
|
int month = year*12;
|
||||||
|
double next_principal_and_interest = amount/month + (amount - rep_amount) * intrate;
|
||||||
|
return next_principal_and_interest;
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double SumCirculator(long productNum,double amount,int year){
|
||||||
|
try{
|
||||||
|
Product product = productMapper.selectProductByProductNum(productNum);
|
||||||
|
if(product==null)return -3;
|
||||||
|
float intrate = product.getIntrate();
|
||||||
|
intrate /= 12;
|
||||||
|
int month = year * 12;
|
||||||
|
double first_principal_and_interest = amount/month + amount*intrate;
|
||||||
|
double last_principal_and_interest = amount/month + amount*(1-(month-1)/month)*intrate;
|
||||||
|
double principal_and_interest = (first_principal_and_interest + last_principal_and_interest)*month/2;
|
||||||
|
return principal_and_interest;
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
package com.example.demo.circulator.service;
|
||||||
|
|
||||||
|
import com.example.demo.Dao.paymentMapper;
|
||||||
|
import com.example.demo.Dao.transMapper;
|
||||||
|
import com.example.demo.Dao.usageDateMapper;
|
||||||
|
import com.example.demo.bean.Repayment;
|
||||||
|
import com.example.demo.bean.Transaction;
|
||||||
|
import com.example.demo.bean.UsageDate;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class PayCirService {
|
||||||
|
@Autowired
|
||||||
|
private usageDateMapper usageDateMapper;
|
||||||
|
@Autowired
|
||||||
|
private paymentMapper paymentMapper;
|
||||||
|
@Autowired
|
||||||
|
private transMapper transMapper;
|
||||||
|
|
||||||
|
public int payAmountCirculator(long checkNum,double pay){
|
||||||
|
try{
|
||||||
|
Repayment repayment = paymentMapper.selectPepaymentBycheckNum(checkNum);
|
||||||
|
UsageDate usageDate= usageDateMapper.selectUsageDateByCheckNum(checkNum);
|
||||||
|
if(usageDate!=null)return -2;
|
||||||
|
double rep_amount = 0;
|
||||||
|
if(repayment!=null)
|
||||||
|
repayment.getRepAmount();
|
||||||
|
long userNum = usageDate.getUserNum();
|
||||||
|
int bankNum = usageDate.getBankNum();
|
||||||
|
double amount = usageDate.getAmount();
|
||||||
|
int year = usageDate.getYear();
|
||||||
|
|
||||||
|
Transaction transaction = new Transaction(checkNum,userNum,bankNum,pay);
|
||||||
|
transMapper.addTransaction(transaction);
|
||||||
|
|
||||||
|
rep_amount = pay - amount/(year*12);
|
||||||
|
repayment.setRepAmount(rep_amount);
|
||||||
|
repayment.setRepSum(pay);
|
||||||
|
paymentMapper.updateRepayment(repayment);
|
||||||
|
return 1;
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
package com.example.demo.productService.controller;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import com.example.demo.productService.tools.addPro;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class addController extends HttpServlet {
|
||||||
|
Product product;
|
||||||
|
addPro addPro;
|
||||||
|
@RequestMapping("/addproduct")
|
||||||
|
public String doPost(HttpServletResponse response,HttpServletRequest request){
|
||||||
|
PrintWriter writer=null;
|
||||||
|
try{
|
||||||
|
product.setProductNum(Integer.parseInt(request.getParameter("productNum")));
|
||||||
|
product.setProductName(request.getParameter("productName"));
|
||||||
|
product.setBankNum(Integer.parseInt(request.getParameter("bankNum")));
|
||||||
|
product.setCategory(request.getParameter("productName"));
|
||||||
|
product.setIntrate(Integer.parseInt(request.getParameter("intrate")));
|
||||||
|
product.setProductDescription(request.getParameter("description"));
|
||||||
|
product.setPictureAddress(request.getParameter("address"));
|
||||||
|
int result= addPro.add(product);
|
||||||
|
response.setContentType("text/hmtl;charset=utf-8");
|
||||||
|
writer=response.getWriter();
|
||||||
|
if(result==1){
|
||||||
|
writer.write("增加成功");
|
||||||
|
return "/";//返回增加删除修改的总页面
|
||||||
|
}
|
||||||
|
writer.write("增加失败");
|
||||||
|
return "/";//返回增加的页面
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
if(writer!=null){
|
||||||
|
writer.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "页面出错";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
package com.example.demo.productService.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import com.example.demo.productService.tools.deletePro;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class deleteController {
|
||||||
|
Product product;
|
||||||
|
deletePro deletes;
|
||||||
|
@RequestMapping("/deleteproduct")
|
||||||
|
public String doPost(HttpServletResponse response, HttpServletRequest request){
|
||||||
|
PrintWriter writer=null;
|
||||||
|
try{
|
||||||
|
int productNum=Integer.parseInt(request.getParameter("productNum"));
|
||||||
|
int result= deletes.delete(productNum);
|
||||||
|
response.setContentType("text/hmtl;charset=utf-8");
|
||||||
|
writer=response.getWriter();
|
||||||
|
if(result==1){
|
||||||
|
writer.write("删除成功");
|
||||||
|
return "/";//返回增加删除修改的总页面
|
||||||
|
}
|
||||||
|
writer.write("删除失败");
|
||||||
|
return "/";//返回删除的页面
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
if(writer!=null){
|
||||||
|
writer.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "页面出错";
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.example.demo.productService.controller;
|
||||||
|
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import com.example.demo.productService.tools.updatePro;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class updateController {
|
||||||
|
Product product;
|
||||||
|
updatePro updatePro;
|
||||||
|
@RequestMapping("/updateproduct")
|
||||||
|
public String doPost(HttpServletResponse response, HttpServletRequest request){
|
||||||
|
PrintWriter writer=null;
|
||||||
|
try{
|
||||||
|
product.setProductNum(Integer.parseInt(request.getParameter("productNum")));
|
||||||
|
product.setProductName(request.getParameter("productName"));
|
||||||
|
product.setBankNum(Integer.parseInt(request.getParameter("bankNum")));
|
||||||
|
product.setCategory(request.getParameter("productName"));
|
||||||
|
product.setIntrate(Integer.parseInt(request.getParameter("intrate")));
|
||||||
|
product.setProductDescription(request.getParameter("description"));
|
||||||
|
product.setPictureAddress(request.getParameter("address"));
|
||||||
|
int result= updatePro.update(product);
|
||||||
|
response.setContentType("text/hmtl;charset=utf-8");
|
||||||
|
writer=response.getWriter();
|
||||||
|
if(result==1){
|
||||||
|
writer.write("修改成功");
|
||||||
|
return "/";//返回增加删除修改的总页面
|
||||||
|
}
|
||||||
|
writer.write("修改失败");
|
||||||
|
return "/";//返回修改的页面
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
if(writer!=null){
|
||||||
|
writer.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "页面出错";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.example.demo.productService.tools;
|
||||||
|
|
||||||
|
import com.example.demo.Dao.productHistroyMapper;
|
||||||
|
import com.example.demo.Dao.productMapper;
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import com.example.demo.bean.ProductHistroy;
|
||||||
|
|
||||||
|
public class addPro {
|
||||||
|
private com.example.demo.productService.tools.nowTime nowTime;
|
||||||
|
private productMapper productMapper;
|
||||||
|
private productHistroyMapper proHisMapper;
|
||||||
|
private ProductHistroy productHistroy;
|
||||||
|
|
||||||
|
public int add(Product product1){
|
||||||
|
productMapper.addProduct(product1);
|
||||||
|
productHistroy.setProductNum(product1.getProductNum());
|
||||||
|
productHistroy.setProductName(product1.getProductName());
|
||||||
|
productHistroy.setBankNum(product1.getBankNum());
|
||||||
|
productHistroy.setCategory(product1.getCategory());
|
||||||
|
productHistroy.setIntrate(product1.getIntrate());
|
||||||
|
//productHistroy.setManagerNum(); manager.setManagerNum();调用登陆里面的一个接口得到managerNum
|
||||||
|
productHistroy.setProductDescription(product1.getProductDescription());
|
||||||
|
productHistroy.setUpLoadTime(nowTime.nowTime());
|
||||||
|
proHisMapper.addProductHistroy(productHistroy);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.example.demo.productService.tools;
|
||||||
|
|
||||||
|
import com.example.demo.Dao.productHistroyMapper;
|
||||||
|
import com.example.demo.bean.ProductHistroy;
|
||||||
|
|
||||||
|
public class deletePro {
|
||||||
|
private com.example.demo.productService.tools.nowTime nowTime;
|
||||||
|
private com.example.demo.Dao.productMapper productMapper;
|
||||||
|
private productHistroyMapper proHisMapper;
|
||||||
|
private ProductHistroy productHistroy;
|
||||||
|
|
||||||
|
public int delete(int productNum){
|
||||||
|
productMapper.deleteProduct(productNum);
|
||||||
|
productHistroy.setProductNum(productNum);
|
||||||
|
//productHistroy.setManagerNum(); manager.setManagerNum();调用登陆里面的一个接口得到managerNum
|
||||||
|
productHistroy.setUpLoadTime(nowTime.nowTime());
|
||||||
|
proHisMapper.addProductHistroy(productHistroy);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.example.demo.productService.tools;
|
||||||
|
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
public class nowTime{
|
||||||
|
public String nowTime(){
|
||||||
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
|
||||||
|
String time=(String)df.format(new Date());
|
||||||
|
return time;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.example.demo.productService.tools;
|
||||||
|
|
||||||
|
import com.example.demo.Dao.productHistroyMapper;
|
||||||
|
import com.example.demo.Dao.productMapper;
|
||||||
|
import com.example.demo.bean.Product;
|
||||||
|
import com.example.demo.bean.ProductHistroy;
|
||||||
|
|
||||||
|
public class updatePro {
|
||||||
|
private com.example.demo.productService.tools.nowTime nowTime;
|
||||||
|
private productMapper productMapper;
|
||||||
|
private productHistroyMapper proHisMapper;
|
||||||
|
private ProductHistroy productHistroy;
|
||||||
|
|
||||||
|
public int update(Product product1){
|
||||||
|
productMapper.updateProduct(product1);
|
||||||
|
productHistroy.setProductNum(product1.getProductNum());
|
||||||
|
productHistroy.setProductName(product1.getProductName());
|
||||||
|
productHistroy.setBankNum(product1.getBankNum());
|
||||||
|
productHistroy.setCategory(product1.getCategory());
|
||||||
|
productHistroy.setIntrate(product1.getIntrate());
|
||||||
|
//productHistroy.setManagerNum(); manager.setManagerNum();调用登陆里面的一个接口得到managerNum
|
||||||
|
productHistroy.setProductDescription(product1.getProductDescription());
|
||||||
|
productHistroy.setAlterTime(nowTime.nowTime());
|
||||||
|
proHisMapper.addProductHistroy(productHistroy);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
spring:
|
||||||
|
mvc:
|
||||||
|
view:
|
||||||
|
prefix: /WEB-INF/views/
|
||||||
|
suffix: .jsp
|
||||||
|
datasource:
|
||||||
|
url: jdbc:mysql://localhost:3306/loan?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
|
||||||
|
username: root
|
||||||
|
password: 12345678
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
mybatis:
|
||||||
|
type-aliases-package: com.example.demo.Dao
|
@ -1,11 +1,13 @@
|
|||||||
package com.example.demo.circulator.service.controller;
|
package com.example.demo.circulator.controller;
|
||||||
|
|
||||||
import com.example.demo.circulator.service.PayCirService;
|
import com.example.demo.circulator.service.PayCirService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class PayCirController {
|
public class PayCirController {
|
||||||
|
@Autowired
|
||||||
PayCirService payCirService;
|
PayCirService payCirService;
|
||||||
|
|
||||||
@PostMapping("/pay")
|
@PostMapping("/pay")
|
@ -0,0 +1,155 @@
|
|||||||
|
/*
|
||||||
|
Navicat Premium Data Transfer
|
||||||
|
|
||||||
|
Source Server : mysql
|
||||||
|
Source Server Type : MySQL
|
||||||
|
Source Server Version : 80013
|
||||||
|
Source Host : localhost:3306
|
||||||
|
Source Schema : finance
|
||||||
|
|
||||||
|
Target Server Type : MySQL
|
||||||
|
Target Server Version : 80013
|
||||||
|
File Encoding : 65001
|
||||||
|
|
||||||
|
Date: 07/01/2019 12:14:02
|
||||||
|
*/
|
||||||
|
|
||||||
|
SET NAMES utf8mb4;
|
||||||
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for audit
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `audit`;
|
||||||
|
CREATE TABLE `audit` (
|
||||||
|
`checkNum` int(10) NOT NULL,
|
||||||
|
`userNum` int(10) NOT NULL,
|
||||||
|
`productNum` int(10) NOT NULL,
|
||||||
|
`bankAccount` varchar(20) NOT NULL,
|
||||||
|
`checkState` int(2) NOT NULL,
|
||||||
|
`contractNum` int(10) DEFAULT NULL,
|
||||||
|
`isSignContract` tinyint(1) DEFAULT NULL,
|
||||||
|
`year` int(2) NOT NULL,
|
||||||
|
`amount` double(20,0) NOT NULL,
|
||||||
|
`applyTime` varchar(20) NOT NULL,
|
||||||
|
`equation` int(2) NOT NULL,
|
||||||
|
PRIMARY KEY (`checkNum`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for bank
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `bank`;
|
||||||
|
CREATE TABLE `bank` (
|
||||||
|
`bankNum` int(10) NOT NULL,
|
||||||
|
`bankName` varchar(20) NOT NULL,
|
||||||
|
`contact` varchar(20) NOT NULL,
|
||||||
|
PRIMARY KEY (`bankNum`),
|
||||||
|
KEY `bankNum` (`bankNum`,`bankName`,`contact`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for manager
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `manager`;
|
||||||
|
CREATE TABLE `manager` (
|
||||||
|
`managerNum` int(10) NOT NULL,
|
||||||
|
`managerName` varchar(20) NOT NULL,
|
||||||
|
`managerPwd` varchar(20) NOT NULL,
|
||||||
|
`managerRight` varchar(2) NOT NULL,
|
||||||
|
`telephoneNum` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`managerNum`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for product
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `product`;
|
||||||
|
CREATE TABLE `product` (
|
||||||
|
`productNum` int(10) NOT NULL,
|
||||||
|
`productName` varchar(20) NOT NULL,
|
||||||
|
`category` varchar(20) NOT NULL,
|
||||||
|
`intrate` float(10,0) NOT NULL,
|
||||||
|
`bankNum` int(10) NOT NULL,
|
||||||
|
`productDescription` text,
|
||||||
|
`pictureAddress` varchar(255) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for productHistory
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `productHistory`;
|
||||||
|
CREATE TABLE `productHistory` (
|
||||||
|
`productNum` int(10) NOT NULL,
|
||||||
|
`productName` varchar(20) NOT NULL,
|
||||||
|
`category` varchar(20) NOT NULL,
|
||||||
|
`intrate` float(10,0) NOT NULL,
|
||||||
|
`bankNum` int(10) NOT NULL,
|
||||||
|
`productDescription` text NOT NULL,
|
||||||
|
`uploadTime` varchar(20) NOT NULL,
|
||||||
|
`deleteTime` varchar(20) NOT NULL,
|
||||||
|
`alterTime` varchar(20) NOT NULL,
|
||||||
|
PRIMARY KEY (`productNum`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for transaction
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `transaction`;
|
||||||
|
CREATE TABLE `transaction` (
|
||||||
|
`transactionNum` int(10) NOT NULL,
|
||||||
|
`payer` int(10) NOT NULL,
|
||||||
|
`payee` int(10) NOT NULL,
|
||||||
|
`transactionTime` float(20,0) NOT NULL,
|
||||||
|
`transactionAmount` double(20,0) NOT NULL,
|
||||||
|
`note` text,
|
||||||
|
PRIMARY KEY (`transactionNum`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for usageData
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `usageData`;
|
||||||
|
CREATE TABLE `usageData` (
|
||||||
|
`checkNum` int(10) NOT NULL,
|
||||||
|
`productNum` int(10) NOT NULL,
|
||||||
|
`userNum` int(10) NOT NULL,
|
||||||
|
`bankAccount` varchar(20) NOT NULL,
|
||||||
|
`bankNum` int(10) NOT NULL,
|
||||||
|
`year` int(2) NOT NULL,
|
||||||
|
`amount` double(20,0) NOT NULL,
|
||||||
|
`startTime` varchar(20) NOT NULL,
|
||||||
|
`equation` int(2) NOT NULL,
|
||||||
|
PRIMARY KEY (`checkNum`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for user
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `user`;
|
||||||
|
CREATE TABLE `user` (
|
||||||
|
`userNum` int(10) NOT NULL,
|
||||||
|
`userName` varchar(20) NOT NULL,
|
||||||
|
`userPwd` varchar(20) NOT NULL,
|
||||||
|
`userRight` varchar(2) NOT NULL,
|
||||||
|
`tureName` varchar(20) DEFAULT NULL,
|
||||||
|
`idNum` varchar(18) DEFAULT NULL,
|
||||||
|
`telephoneNum` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
|
||||||
|
`address` varchar(50) DEFAULT NULL,
|
||||||
|
`isIdentify` tinyint(1) DEFAULT NULL,
|
||||||
|
`registerTime` varchar(20) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`userNum`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for userBankIdentify
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `userBankIdentify`;
|
||||||
|
CREATE TABLE `userBankIdentify` (
|
||||||
|
`userNum` int(10) NOT NULL,
|
||||||
|
`bankAccount` varchar(20) NOT NULL,
|
||||||
|
`bankAccountIdentify` tinyint(1) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`userNum`,`bankAccount`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
SET FOREIGN_KEY_CHECKS = 1;
|
@ -0,0 +1,136 @@
|
|||||||
|
/*
|
||||||
|
Navicat Premium Data Transfer
|
||||||
|
|
||||||
|
Source Server : localhost_3306
|
||||||
|
Source Server Type : MySQL
|
||||||
|
Source Server Version : 80013
|
||||||
|
Source Host : localhost:3306
|
||||||
|
Source Schema : finance
|
||||||
|
|
||||||
|
Target Server Type : MySQL
|
||||||
|
Target Server Version : 80013
|
||||||
|
File Encoding : 65001
|
||||||
|
|
||||||
|
Date: 03/01/2019 20:20:18
|
||||||
|
*/
|
||||||
|
|
||||||
|
SET NAMES utf8mb4;
|
||||||
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for audit
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `audit`;
|
||||||
|
CREATE TABLE `audit` (
|
||||||
|
`checkNum` varchar(20) NOT NULL,
|
||||||
|
`userNum` varchar(20) NOT NULL,
|
||||||
|
`productNum` varchar(20) NOT NULL,
|
||||||
|
`bankAccount` varchar(20) NOT NULL,
|
||||||
|
`checkState` int(2) NOT NULL,
|
||||||
|
`contractNum` varchar(20) DEFAULT NULL,
|
||||||
|
`isSignContract` tinyint(1) DEFAULT NULL,
|
||||||
|
`year` int(2) NOT NULL,
|
||||||
|
`amount` float(20,0) NOT NULL,
|
||||||
|
`applyTime` varchar(20) NOT NULL,
|
||||||
|
PRIMARY KEY (`checkNum`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for bank
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `bank`;
|
||||||
|
CREATE TABLE `bank` (
|
||||||
|
`bankNum` varchar(10) NOT NULL,
|
||||||
|
`bankName` varchar(20) NOT NULL,
|
||||||
|
`contact` varchar(20) NOT NULL,
|
||||||
|
PRIMARY KEY (`bankNum`),
|
||||||
|
KEY `bankNum` (`bankNum`,`bankName`,`contact`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for manager
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `manager`;
|
||||||
|
CREATE TABLE `manager` (
|
||||||
|
`managerNum` varchar(10) NOT NULL,
|
||||||
|
`managerName` varchar(20) NOT NULL,
|
||||||
|
`managerPwd` varchar(20) NOT NULL,
|
||||||
|
`managerRight` varchar(2) NOT NULL,
|
||||||
|
`telephoneNum` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`managerNum`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for product
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `product`;
|
||||||
|
CREATE TABLE `product` (
|
||||||
|
`productNum` varchar(20) NOT NULL,
|
||||||
|
`productName` varchar(20) NOT NULL,
|
||||||
|
`category` varchar(20) NOT NULL,
|
||||||
|
`intrate` float(10,0) NOT NULL,
|
||||||
|
`bankNum` varchar(20) NOT NULL,
|
||||||
|
`productDescription` text,
|
||||||
|
`pictureAddress` varchar(255) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for transaction
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `transaction`;
|
||||||
|
CREATE TABLE `transaction` (
|
||||||
|
`transactionNum` varchar(20) NOT NULL,
|
||||||
|
`payer` varchar(20) NOT NULL,
|
||||||
|
`payee` varchar(20) NOT NULL,
|
||||||
|
`transactionTime` float(20,0) NOT NULL,
|
||||||
|
`transactionAmount` float(20,0) NOT NULL,
|
||||||
|
`note` text,
|
||||||
|
PRIMARY KEY (`transactionNum`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for usageData
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `usageData`;
|
||||||
|
CREATE TABLE `usageData` (
|
||||||
|
`checkNum` varchar(20) NOT NULL,
|
||||||
|
`productNum` varchar(20) NOT NULL,
|
||||||
|
`userNum` varchar(20) NOT NULL,
|
||||||
|
`bankAccount` varchar(20) NOT NULL,
|
||||||
|
`bankNum` varchar(20) NOT NULL,
|
||||||
|
`year` int(2) NOT NULL,
|
||||||
|
`amount` float(20,0) NOT NULL,
|
||||||
|
`startTime` varchar(20) NOT NULL,
|
||||||
|
PRIMARY KEY (`checkNum`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for user
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `user`;
|
||||||
|
CREATE TABLE `user` (
|
||||||
|
`userNum` varchar(10) NOT NULL,
|
||||||
|
`userName` varchar(20) NOT NULL,
|
||||||
|
`userPwd` varchar(20) NOT NULL,
|
||||||
|
`userRight` varchar(2) NOT NULL,
|
||||||
|
`tureName` varchar(20) DEFAULT NULL,
|
||||||
|
`idNum` varchar(18) DEFAULT NULL,
|
||||||
|
`telephoneNum` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
|
||||||
|
`address` varchar(50) DEFAULT NULL,
|
||||||
|
`isIdentify` tinyint(1) DEFAULT NULL,
|
||||||
|
`registerTime` varchar(20) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`userNum`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for userBankIdentify
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `userBankIdentify`;
|
||||||
|
CREATE TABLE `userBankIdentify` (
|
||||||
|
`userName` varchar(20) NOT NULL,
|
||||||
|
`bankAccount` varchar(20) NOT NULL,
|
||||||
|
`bankAccountIdentify` tinyint(1) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`userName`,`bankAccount`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
SET FOREIGN_KEY_CHECKS = 1;
|
@ -0,0 +1,274 @@
|
|||||||
|
*{
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'neo';
|
||||||
|
src: url("NEOTERICc-1.ttf")/*tpa=http://www.17sucai.com/preview/384665/2018-12-28/login/css/font/NEOTERICc.ttf*/;
|
||||||
|
}
|
||||||
|
input:focus{
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
.form input{
|
||||||
|
width: 300px;
|
||||||
|
height: 30px;
|
||||||
|
font-size: 18px;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
border-bottom: 1px solid #fff;
|
||||||
|
color: #fff;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.form input::placeholder{
|
||||||
|
color: rgba(255,255,255,0.8);
|
||||||
|
font-size: 18px;
|
||||||
|
font-family: "neo";
|
||||||
|
}
|
||||||
|
.confirm{
|
||||||
|
height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: .25s;
|
||||||
|
}
|
||||||
|
.btn{
|
||||||
|
width:140px;
|
||||||
|
height: 40px;
|
||||||
|
border: 1px solid #fff;
|
||||||
|
background: none;
|
||||||
|
font-size:20px;
|
||||||
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-top: 25px;
|
||||||
|
font-family: "neo";
|
||||||
|
transition: .25s;
|
||||||
|
}
|
||||||
|
.btn:hover{
|
||||||
|
background: rgba(255,255,255,.25);
|
||||||
|
}
|
||||||
|
#login_wrap{
|
||||||
|
width: 980px;
|
||||||
|
min-height: 500px;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-family: "neo";
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0px 0px 120px rgba(0, 0, 0, 0.25);
|
||||||
|
position: fixed;
|
||||||
|
top: 50%;
|
||||||
|
right: 50%;
|
||||||
|
margin-top: -250px;
|
||||||
|
margin-right: -490px;
|
||||||
|
}
|
||||||
|
#login{
|
||||||
|
width: 50%;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 500px;
|
||||||
|
background: linear-gradient(45deg, #9a444e, #e06267);
|
||||||
|
position: relative;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
#login #status{
|
||||||
|
width: 90px;
|
||||||
|
height: 35px;
|
||||||
|
margin: 40px auto;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 30px;
|
||||||
|
font-weight: 600;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
#login #status i{
|
||||||
|
font-style: normal;
|
||||||
|
position: absolute;
|
||||||
|
transition: .5s
|
||||||
|
}
|
||||||
|
#login span{
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -150px;
|
||||||
|
top: 52%;
|
||||||
|
margin-top: -140px;
|
||||||
|
}
|
||||||
|
#login span a{
|
||||||
|
text-decoration: none;
|
||||||
|
color: #fff;
|
||||||
|
display: block;
|
||||||
|
margin-top: 80px;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
#bg{
|
||||||
|
background: linear-gradient(45deg, #211136, #bf5853);
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
/*绘图*/
|
||||||
|
#login_img{
|
||||||
|
width: 50%;
|
||||||
|
min-height: 500px;
|
||||||
|
background: linear-gradient(45deg, #221334, #6c3049);
|
||||||
|
float: left;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
#login_img span{
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
#login_img .circle{
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: linear-gradient(45deg, #df5555, #ef907a);
|
||||||
|
top: 70px;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -100px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
#login_img .circle span{
|
||||||
|
width: 150px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 50px;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
#login_img .circle span:nth-child(1){
|
||||||
|
top: 30px;
|
||||||
|
left: -38px;
|
||||||
|
background: #c55c59;
|
||||||
|
}
|
||||||
|
#login_img .circle span:nth-child(2){
|
||||||
|
bottom: 20px;
|
||||||
|
right: -35px;
|
||||||
|
background: #934555;
|
||||||
|
}
|
||||||
|
#login_img .star span{
|
||||||
|
background: radial-gradient(#fff 10%,#fff 20%,rgba(72, 34, 64, 0));
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 0 7px #fff;
|
||||||
|
}
|
||||||
|
#login_img .star span:nth-child(1){
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
top: 50px;
|
||||||
|
left: 30px;
|
||||||
|
}
|
||||||
|
#login_img .star span:nth-child(2){
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
left: 360px;
|
||||||
|
top: 80px;
|
||||||
|
}
|
||||||
|
#login_img .star span:nth-child(3){
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
top: 400px;
|
||||||
|
left: 80px;
|
||||||
|
}
|
||||||
|
#login_img .star span:nth-child(4){
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
top: 240px;
|
||||||
|
left: 60px;
|
||||||
|
}
|
||||||
|
#login_img .star span:nth-child(5){
|
||||||
|
width: 4px;
|
||||||
|
height: 4px;
|
||||||
|
top: 20px;
|
||||||
|
left: 200px;
|
||||||
|
}
|
||||||
|
#login_img .star span:nth-child(6){
|
||||||
|
width: 4px;
|
||||||
|
height: 4px;
|
||||||
|
top: 460px;
|
||||||
|
left: 410px;
|
||||||
|
}
|
||||||
|
#login_img .star span:nth-child(7){
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
top: 250px;
|
||||||
|
left: 350px;
|
||||||
|
}
|
||||||
|
#login_img .fly_star span{
|
||||||
|
width: 90px;
|
||||||
|
height: 3px;
|
||||||
|
background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
|
||||||
|
background: -o-linear-gradient(left, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
|
||||||
|
background: linear-gradient(to right, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
#login_img .fly_star span:nth-child(1){
|
||||||
|
top:60px;
|
||||||
|
left: 80px;
|
||||||
|
}
|
||||||
|
#login_img .fly_star span:nth-child(2){
|
||||||
|
top: 210px;
|
||||||
|
left: 332px;
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
#login_img p{
|
||||||
|
text-align: center;
|
||||||
|
color: #af4b55;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-top: 365px;
|
||||||
|
font-size: 25px;
|
||||||
|
}
|
||||||
|
#login_img p i{
|
||||||
|
font-style: normal;
|
||||||
|
margin-right: 45px;
|
||||||
|
}
|
||||||
|
#login_img p i:nth-last-child(1){
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
/*提示*/
|
||||||
|
#hint{
|
||||||
|
width: 100%;
|
||||||
|
line-height: 70px;
|
||||||
|
background: linear-gradient(-90deg, #9b494d, #bf5853);
|
||||||
|
text-align: center;
|
||||||
|
font-size: 25px;
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: 0 0 20px #733544;
|
||||||
|
display: none;
|
||||||
|
opacity: 0;
|
||||||
|
transition: .5s;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
/* 响应式 */
|
||||||
|
@media screen and (max-width:1000px ) {
|
||||||
|
#login_img{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#login_wrap{
|
||||||
|
width: 490px;
|
||||||
|
margin-right: -245px;
|
||||||
|
}
|
||||||
|
#login{
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (max-width:560px ) {
|
||||||
|
#login_wrap{
|
||||||
|
width: 330px;
|
||||||
|
margin-right: -165px;
|
||||||
|
}
|
||||||
|
#login span{
|
||||||
|
margin-left: -125px;
|
||||||
|
}
|
||||||
|
.form input{
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
.btn{
|
||||||
|
width: 113px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (max-width:345px ) {
|
||||||
|
#login_wrap {
|
||||||
|
width: 290px;
|
||||||
|
margin-right: -145px;
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 651 KiB |
Loading…
Reference in new issue