master
Aokiso 7 years ago
parent 541e0e7bf3
commit 635bbb8f3b

@ -34,12 +34,15 @@ public interface userMapper {
"#{telephoneNum},#{address},#{isIdentify},#{registerTime})") "#{telephoneNum},#{address},#{isIdentify},#{registerTime})")
public void addUser(User user); public void addUser(User user);
@Update("update user set userNum=#{userNum},userName=#{userName}" + @Update("update user set isIdentify=#{isIdentify} where userNum=#{userNum}")
",userPwd=#{userPwd},userRight=#{userRight}," + public void updateIsId(long userNum);
"telephoneNum=#{telephoneNum},address=#{address}," +
"isIdentify=#{isIdentify},registerTime=#{registerTime}where userNum=#{userNum}") // @Update("update user set userNum=#{userNum},userName=#{userName}" +
public void updateUser(User user); // ",userPwd=#{userPwd},userRight=#{userRight}," +
// "telephoneNum=#{telephoneNum},address=#{address}," +
@Delete("delete from user where userNum=#{userNum}") // "isIdentify=#{isIdentify},registerTime=#{registerTime}where userNum=#{userNum}")
public void deleteUser(long 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; package com.example.demo.register.controller;
import com.example.demo.Dao.userMapper;
import com.example.demo.bean.User; import com.example.demo.bean.User;
import com.example.demo.bean.UserBankIdentify; import com.example.demo.bean.UserBankIdentify;
import com.example.demo.register.identify; import com.example.demo.register.identify;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -17,6 +19,8 @@ import java.io.IOException;
public class bankCardController extends HttpServlet { public class bankCardController extends HttpServlet {
private identify identify=new identify(); private identify identify=new identify();
@Autowired
private userMapper userMapper;
@RequestMapping("/binding")//卡号绑定界面 @RequestMapping("/binding")//卡号绑定界面
public void doPost(HttpServletResponse response, HttpServletRequest request)throws IOException { public void doPost(HttpServletResponse response, HttpServletRequest request)throws IOException {
@ -34,6 +38,7 @@ public class bankCardController extends HttpServlet {
userBankIdentify.setUserNum(num); userBankIdentify.setUserNum(num);
userBankIdentify.setBankAccountIdentify(result); userBankIdentify.setBankAccountIdentify(result);
identify.identify(userBankIdentify); identify.identify(userBankIdentify);
userMapper.updateIsId(user.getUserNum());
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} }

Loading…
Cancel
Save