master
Aokiso 7 years ago
parent 541e0e7bf3
commit 635bbb8f3b

@ -34,12 +34,15 @@ public interface userMapper {
"#{telephoneNum},#{address},#{isIdentify},#{registerTime})")
public void addUser(User user);
@Update("update user set userNum=#{userNum},userName=#{userName}" +
",userPwd=#{userPwd},userRight=#{userRight}," +
"telephoneNum=#{telephoneNum},address=#{address}," +
"isIdentify=#{isIdentify},registerTime=#{registerTime}where userNum=#{userNum}")
public void updateUser(User user);
@Delete("delete from user where userNum=#{userNum}")
public void deleteUser(long userNum);
@Update("update user set isIdentify=#{isIdentify} where userNum=#{userNum}")
public void updateIsId(long userNum);
// @Update("update user set userNum=#{userNum},userName=#{userName}" +
// ",userPwd=#{userPwd},userRight=#{userRight}," +
// "telephoneNum=#{telephoneNum},address=#{address}," +
// "isIdentify=#{isIdentify},registerTime=#{registerTime}where userNum=#{userNum}")
// public void updateUser(User user);
//
// @Delete("delete from user where userNum=#{userNum}")
// public void deleteUser(long userNum);
}

@ -1,9 +1,11 @@
package com.example.demo.register.controller;
import com.example.demo.Dao.userMapper;
import com.example.demo.bean.User;
import com.example.demo.bean.UserBankIdentify;
import com.example.demo.register.identify;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@ -17,6 +19,8 @@ import java.io.IOException;
public class bankCardController extends HttpServlet {
private identify identify=new identify();
@Autowired
private userMapper userMapper;
@RequestMapping("/binding")//卡号绑定界面
public void doPost(HttpServletResponse response, HttpServletRequest request)throws IOException {
@ -34,6 +38,7 @@ public class bankCardController extends HttpServlet {
userBankIdentify.setUserNum(num);
userBankIdentify.setBankAccountIdentify(result);
identify.identify(userBankIdentify);
userMapper.updateIsId(user.getUserNum());
}catch (Exception e){
e.printStackTrace();
}

Loading…
Cancel
Save