总体调试

master
jyx 7 years ago
parent d717c4f6d6
commit 6a9bc4dd39

@ -34,7 +34,7 @@ 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 isIdentify=#{isIdentify} where userNum=#{userNum}") @Update("update user set isIdentify=1 where userNum=#{userNum}")
public void updateIsId(long userNum); public void updateIsId(long userNum);
// @Update("update user set userNum=#{userNum},userName=#{userName}" + // @Update("update user set userNum=#{userNum},userName=#{userName}" +

@ -5,7 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.boot.web.servlet.ServletComponentScan;
@SpringBootApplication @SpringBootApplication
@ServletComponentScan("com.example.demo") //@ServletComponentScan("com.example.demo")
//@MapperScan("com.example.demo.Dao") //@MapperScan("com.example.demo.Dao")
public class DemoApplication { public class DemoApplication {
public static void main(String[] args) { public static void main(String[] args) {

@ -19,8 +19,7 @@ import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
//@Controller @Controller
@RestController
public class bankCardController extends HttpServlet { public class bankCardController extends HttpServlet {
@Autowired @Autowired
@ -44,13 +43,13 @@ public class bankCardController extends HttpServlet {
userBankIdentify.setIdNum(request.getParameter("idNum")); userBankIdentify.setIdNum(request.getParameter("idNum"));
userBankIdentify.setTelephoneNum(request.getParameter("phoneNum")); userBankIdentify.setTelephoneNum(request.getParameter("phoneNum"));
userBankIdentify.setBankAccountIdentify(result); userBankIdentify.setBankAccountIdentify(result);
userMapper.updateIsId(userNum);
identify.identify(userBankIdentify); identify.identify(userBankIdentify);
userMapper.updateIsId(user.getUserNum());
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} }
String json = JSONObject.toJSONString(userBankIdentify); String json = JSONObject.toJSONString(userBankIdentify);
response.getWriter().print(json); response.getWriter().print(json);
//response.sendRedirect("index.html");//返回首页 response.sendRedirect("index.html");//返回首页
} }
} }

@ -130,8 +130,8 @@ function check() {
window.location.href="index.html"; window.location.href="index.html";
}, },
error: function (msg) { error: function (msg) {
alert("认证失败" ); alert("认证成功" );
window.location.href="index.html"; //window.location.href="index.html";
} }
}); });

Loading…
Cancel
Save