用户认证信息和贷款流程修改

master
Aokiso 7 years ago
parent 40de9d9c6d
commit 558c156b36

@ -13,6 +13,9 @@ public interface auditMapper {
@Select("select * from audit") @Select("select * from audit")
public List<Audit> select(); public List<Audit> select();
@Select("select top 1 checkNum from audit order by checkNum DESC")
public Long selectBigCheckNum();
@Insert("insert into audit(checkNum, userNum, productNum, " + @Insert("insert into audit(checkNum, userNum, productNum, " +
"bankAccount, checkState, contractNum, " + "bankAccount, checkState, contractNum, " +
"isSignContract, year, amount, applyTime)" + "isSignContract, year, amount, applyTime)" +

@ -0,0 +1,38 @@
package com.example.demo.loanService.controller;
import com.example.demo.Dao.auditMapper;
import com.example.demo.bean.Audit;
import com.example.demo.loanService.service.message;
import com.example.demo.util.nowTime;
import org.springframework.beans.factory.annotation.Autowired;
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;
@Controller
public class messageController extends HttpServlet {
@Autowired
auditMapper auditMapper;
private nowTime nowTime=new nowTime();
private message message=new message();
@RequestMapping("")//填写贷款基本信息的界面
public String doPost(HttpServletResponse response, HttpServletRequest request){
long num=1;//从登陆那里得到登陆者的序号
Audit audit=new Audit();
audit.setUserNum(num);
audit.setAmount(Double.parseDouble(request.getParameter("amount")));
audit.setYear(Integer.parseInt(request.getParameter("year")));
audit.setBankAccount(request.getParameter("bankAccount"));
audit.setEquation(Integer.parseInt(request.getParameter("equation")));
audit.setApplyTime(nowTime.nowTime());
audit.setUserNum(Long.parseLong("d"));
message.message(audit);
return "";//审核界面
}
}

@ -20,9 +20,9 @@ public class startController {
public String doPost(HttpServletResponse response, HttpServletRequest request){ public String doPost(HttpServletResponse response, HttpServletRequest request){
int num=1;//从登陆那里得到登陆者的序号 int num=1;//从登陆那里得到登陆者的序号
user=userMapper.selectUserByuserNum(num); user=userMapper.selectUserByuserNum(num);
if(user.getIsIdentify()=="1"){ if(user.getIsIdentify()==1){
return "";//验证手机号的界面二号 return "";//验证手机号的界面二号
}if(user.getIsIdentify()=="0"){ }if(user.getIsIdentify()==0){
return "";//认证的界面 return "";//认证的界面
}else{ }else{
return "";//页面出错的界面 return "";//页面出错的界面

@ -0,0 +1,21 @@
package com.example.demo.loanService.service;
import com.example.demo.Dao.auditMapper;
import com.example.demo.bean.Audit;
import org.springframework.beans.factory.annotation.Autowired;
public class message {
@Autowired
auditMapper auditMapper;
public void message(Audit audit){
long contractNum=0;
short isSignContrat=0;
int checkState=0;
audit.setContractNum(contractNum);
audit.setIsSignContract(isSignContrat);
audit.setCheckNum(auditMapper.selectBigCheckNum());
audit.setCheckState(checkState);
auditMapper.addAudit(audit);
}
}

@ -4,12 +4,13 @@ import com.example.demo.Dao.productHistroyMapper;
import com.example.demo.Dao.productMapper; import com.example.demo.Dao.productMapper;
import com.example.demo.bean.Product; import com.example.demo.bean.Product;
import com.example.demo.bean.ProductHistroy; import com.example.demo.bean.ProductHistroy;
import com.example.demo.util.nowTime;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@Service @Service
public class addPro { public class addPro {
private nowTime nowTime=new nowTime(); private com.example.demo.util.nowTime nowTime=new nowTime();
@Autowired @Autowired
private productMapper productMapper; private productMapper productMapper;
@Autowired @Autowired

@ -4,12 +4,13 @@ import com.example.demo.Dao.productHistroyMapper;
import com.example.demo.Dao.productMapper; import com.example.demo.Dao.productMapper;
import com.example.demo.bean.Product; import com.example.demo.bean.Product;
import com.example.demo.bean.ProductHistroy; import com.example.demo.bean.ProductHistroy;
import com.example.demo.util.nowTime;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@Service @Service
public class deletePro { public class deletePro {
private nowTime nowTime = new nowTime(); private com.example.demo.util.nowTime nowTime = new nowTime();
@Autowired @Autowired
private productMapper productMapper; private productMapper productMapper;
@Autowired @Autowired

@ -4,12 +4,13 @@ import com.example.demo.Dao.productHistroyMapper;
import com.example.demo.Dao.productMapper; import com.example.demo.Dao.productMapper;
import com.example.demo.bean.Product; import com.example.demo.bean.Product;
import com.example.demo.bean.ProductHistroy; import com.example.demo.bean.ProductHistroy;
import com.example.demo.util.nowTime;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@Service @Service
public class updatePro { public class updatePro {
private nowTime nowTime=new nowTime(); private com.example.demo.util.nowTime nowTime=new nowTime();
@Autowired @Autowired
private productMapper productMapper; private productMapper productMapper;
@Autowired @Autowired

@ -1,9 +1,8 @@
package com.example.demo.register.controller; package com.example.demo.register.controller;
import com.example.demo.Dao.userBankIdMapper;
import com.example.demo.bean.UserBankIdentify; import com.example.demo.bean.UserBankIdentify;
import org.springframework.beans.factory.annotation.Autowired; import com.example.demo.register.identify;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -14,20 +13,21 @@ import javax.servlet.http.HttpServletResponse;
@Controller @Controller
public class bankCardController extends HttpServlet { public class bankCardController extends HttpServlet {
@Autowired private identify identify=new identify();
userBankIdMapper userBankIdMapper;
@RequestMapping("")//手机表单界面 @RequestMapping("")//手机表单界面
public String doPost(HttpServletResponse response, HttpServletRequest request){ public String doPost(HttpServletResponse response, HttpServletRequest request){
try{ try{
long num=1;//获取得到userNum long num=1;//获取得到userNum
short result=0;
UserBankIdentify userBankIdentify=new UserBankIdentify(); UserBankIdentify userBankIdentify=new UserBankIdentify();
userBankIdentify.setBankAccount(request.getParameter("mobile")); userBankIdentify.setBankAccount(request.getParameter("mobile"));
userBankIdentify.setTrueName(request.getParameter("realname")); userBankIdentify.setTrueName(request.getParameter("realname"));
userBankIdentify.setIdNum(request.getParameter("idNum")); userBankIdentify.setIdNum(request.getParameter("idNum"));
userBankIdentify.setTelephoneNum(request.getParameter("phoneNum")); userBankIdentify.setTelephoneNum(request.getParameter("phoneNum"));
userBankIdentify.setUserNum(num); userBankIdentify.setUserNum(num);
userBankIdMapper.addUserBankIdentify(userBankIdentify); userBankIdentify.setBankAccountIdentify(result);
identify.identify(userBankIdentify);
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} }

@ -0,0 +1,15 @@
package com.example.demo.register;
import com.example.demo.Dao.userBankIdMapper;
import com.example.demo.bean.UserBankIdentify;
import org.springframework.beans.factory.annotation.Autowired;
public class identify {
@Autowired
userBankIdMapper userBankIdMapper;
public void identify(UserBankIdentify userBankIdentify){
userBankIdMapper.addUserBankIdentify(userBankIdentify);
//调用银行的接口,将银行卡认证信息传过去
}
}

@ -1,4 +1,4 @@
package com.example.demo.productService.service; package com.example.demo.util;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
Loading…
Cancel
Save