From 486762daea891ba12f58b4bbfb71436eb7c68768 Mon Sep 17 00:00:00 2001 From: tangxinyuan Date: Thu, 20 Mar 2025 22:58:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/springboot/newBank/.idea/compiler.xml | 1 + code/springboot/newBank/.idea/misc.xml | 1 + .../src/main/java/demo/liaofeifei/ins.java | 9 +- .../src/main/java/demo/liaofeifei/login.java | 3 + .../main/java/demo/liaofeifei/register.java | 6 +- .../java/demo/liaofeifei/staffController.java | 79 +++- .../weiyichi/controller/TransferAccount.java | 404 +++++++++--------- .../node_modules/.vite/vitest/results.json | 1 + 8 files changed, 277 insertions(+), 227 deletions(-) create mode 100644 code/vue/chuxu/node_modules/.vite/vitest/results.json diff --git a/code/springboot/newBank/.idea/compiler.xml b/code/springboot/newBank/.idea/compiler.xml index b4e1d0853..a44f8d7a2 100644 --- a/code/springboot/newBank/.idea/compiler.xml +++ b/code/springboot/newBank/.idea/compiler.xml @@ -11,6 +11,7 @@ + diff --git a/code/springboot/newBank/.idea/misc.xml b/code/springboot/newBank/.idea/misc.xml index 4b661a5ff..0e1d18878 100644 --- a/code/springboot/newBank/.idea/misc.xml +++ b/code/springboot/newBank/.idea/misc.xml @@ -7,6 +7,7 @@ + diff --git a/code/springboot/newBank/src/main/java/demo/liaofeifei/ins.java b/code/springboot/newBank/src/main/java/demo/liaofeifei/ins.java index ab9f8d4fc..19b2a0405 100644 --- a/code/springboot/newBank/src/main/java/demo/liaofeifei/ins.java +++ b/code/springboot/newBank/src/main/java/demo/liaofeifei/ins.java @@ -18,11 +18,14 @@ public class ins { @RequestMapping("/ins") - public String getAllNewTableData_ins(HttpServletRequest request) { + public Object getAllNewTableData_ins(HttpServletRequest request) { String ins_id = request.getParameter("ins_id");//获取机构号 + if (ins_id == null) { + ins_id = ""; // 如果 ins_id 为 null,则使用空字符串 + } + String sql = "select * from ins where ins_id like '%" + ins_id + "%'";// 编辑查询数据库语句 - String sql = "select * from ins where ins_id ='" + ins_id + "'";//编辑查询数据库语句 String result=""; List> list = jdbcTemplate.queryForList(sql);//数据库语句执行 @@ -30,7 +33,7 @@ public class ins { if(list.size() > 0)//判断上面sql语句的查询结果,是否存在(数据库是否存在有与浏览器输入的ID一样的结果,有则list1.size()大于0) { - result=list.toString();//结果存在返回查询结果 + return list;//结果存在返回查询结果 } else { result="0";//不存在输出0 diff --git a/code/springboot/newBank/src/main/java/demo/liaofeifei/login.java b/code/springboot/newBank/src/main/java/demo/liaofeifei/login.java index 24c73f95d..b9f81c50f 100644 --- a/code/springboot/newBank/src/main/java/demo/liaofeifei/login.java +++ b/code/springboot/newBank/src/main/java/demo/liaofeifei/login.java @@ -26,6 +26,9 @@ public class login { List> list=jdbcTemplate.queryForList(sql); List> list_zt=jdbcTemplate.queryForList(sql_zt); + if(list_zt.isEmpty()){ + return "0"; + } String re= (String) list_zt.get(0).get("cancel"); String result=""; diff --git a/code/springboot/newBank/src/main/java/demo/liaofeifei/register.java b/code/springboot/newBank/src/main/java/demo/liaofeifei/register.java index d797f4623..ca2d389c8 100644 --- a/code/springboot/newBank/src/main/java/demo/liaofeifei/register.java +++ b/code/springboot/newBank/src/main/java/demo/liaofeifei/register.java @@ -22,7 +22,7 @@ public class register { private JdbcTemplate jdbcTemplate; @RequestMapping("/staffregister") - public String getAllNewTableData1(HttpServletRequest request) { + public Object getAllNewTableData1(HttpServletRequest request) { // String staffNo=request.getParameter("staffNo"); // String password=request.getParameter("password");//前端送过来的密码 @@ -75,7 +75,7 @@ public class register { { //result="1查询不到相同身份正"; List> list= jdbcTemplate.queryForList(sql2);//当满足浏览器输入身份证不为空,且浏览器输入的身份证信息,在数据库中没有记录,则执行下一步,查询最后一条工号信息 - //查询表中是否有数据>0为有数据 + //查询表中是否有数据>0为有数据 if(list.size()>0 && list.get(0).get("staffNo")!=null)//对获取到的数据库工号进行判断,list.size()>0,则说明数据库有工号数据,则将数据库最后一条记录的工号的值加1作为新工号的值,若数据库查询不到数据,则不执行下面if语句,默认使用上面int staffNo1 =1;的值 { staffNo = (String) list.get(0).get("staffNo");//获取工号 @@ -100,7 +100,7 @@ public class register { { //System.out.println("注册成功!");//数据插入成功! - result = "1"; + result = staffNo; } else { //System.out.println("注册失败!");//数据插入失败! diff --git a/code/springboot/newBank/src/main/java/demo/liaofeifei/staffController.java b/code/springboot/newBank/src/main/java/demo/liaofeifei/staffController.java index 079a80d4f..8cd6b5b07 100644 --- a/code/springboot/newBank/src/main/java/demo/liaofeifei/staffController.java +++ b/code/springboot/newBank/src/main/java/demo/liaofeifei/staffController.java @@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; +import java.text.DecimalFormat; import java.util.List; //import java.util.list; import java.util.Map; @@ -22,10 +23,12 @@ public class staffController{ String staffNo=request.getParameter("staffNo");//员工号 + if (staffNo == null) { + staffNo = ""; // 如果 ins_id 为 null,则使用空字符串 + } + String sql = "select * from staff where staffNo like '%" + staffNo + "%'";// 编辑查询数据库语句 - String sql="select * from staff s where staffNo ='"+staffNo+"'"; - List> list=jdbcTemplate.queryForList(sql); System.out.println("测试:"+list.toString()); @@ -33,33 +36,71 @@ public class staffController{ return list; } - @RequestMapping("/addStaffwww") + @RequestMapping("/addStaff") public int addStaff(HttpServletRequest request){ - String staffNo=request.getParameter("staffNo"); - String staffName=request.getParameter("staffName"); - String gender=request.getParameter("gender"); - String birthday=request.getParameter("birthday"); - - String sql="INSERT INTO staff (staffNo,staffName,gender,birthday) VALUES"+ - "('"+staffNo+"','"+staffName+"','"+gender+"','"+birthday+"')"; - int i=jdbcTemplate.update(sql); + String staffNo = request.getParameter("staffNo"); + String staffName = request.getParameter("staffName"); + String gender = request.getParameter("gender"); + String birthday = request.getParameter("birthday"); + + String department = request.getParameter("department"); + String position = request.getParameter("position"); + String company = request.getParameter("company"); + String contractType = request.getParameter("contractType"); + String phone = request.getParameter("phone"); + String password = request.getParameter("password"); + String address = request.getParameter("address"); + + + int staffNo1 =1;//新工号的初始值默认为1,防止出现数据库没有员工数据的情况出现 + String sql2 = "SELECT staffNo from staff ORDER BY staffNo DESC LIMIT 1";//查看最后一条工号 + + List> list=jdbcTemplate.queryForList(sql2); + if(list.size()>0 && list.get(0).get("staffNo")!=null)//对获取到的数据库工号进行判断,list.size()>0,则说明数据库有工号数据,则将数据库最后一条记录的工号的值加1作为新工号的值,若数据库查询不到数据,则不执行下面if语句,默认使用上面int staffNo1 =1;的值 + { + staffNo = (String) list.get(0).get("staffNo");//获取工号 + staffNo1 = Integer.parseInt(staffNo) + 1;//将工号转化为int型,便于+ + + //定义一个规则用来规范工号的位数为三位 + DecimalFormat df = new DecimalFormat("000"); // 创建一个DecimalFormat对象,模式为000 + staffNo = df.format(staffNo1);//将整形型的staffN1,规范化并转化为String字符串型 + } + + String sql = "INSERT INTO staff (staffNo, staffName, gender, birthday, department, job, company, contract, phone, password,address) " + + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?)"; + int i = jdbcTemplate.update(sql, staffNo, staffName, gender, birthday, department, position, company, contractType, phone, password,address); return i; } + @RequestMapping("/updateStaff") public int updateStaff(HttpServletRequest request){ - String staffNo=request.getParameter("staffNo"); - String staffName=request.getParameter("staffName"); - String gender=request.getParameter("gender"); - String birthday=request.getParameter("birthday"); - - String sql="UPDATE staff set staffName='"+staffName+"',gender='"+gender+"',"+ - "birthday='"+birthday+"'where staffNo='"+staffNo+"'"; - int i=jdbcTemplate.update(sql); + String staffNo = request.getParameter("staffNo"); + String staffName = request.getParameter("staffName"); + String gender = request.getParameter("gender"); + String birthday = request.getParameter("birthday"); + String department = request.getParameter("department"); + String position = request.getParameter("position"); + String company = request.getParameter("company"); + String contractType = request.getParameter("contract"); + String education = request.getParameter("education"); + String major = request.getParameter("major"); + String marriage = request.getParameter("marriage"); + String place = request.getParameter("place"); + String nation = request.getParameter("nation"); + String politicalStatus = request.getParameter("politicalStatus"); + String phone = request.getParameter("phone"); + String address = request.getParameter("address"); + String idCard = request.getParameter("ID"); + + String sql = "UPDATE staff SET staffName=?, gender=?, birthday=?, department=?, job=?, company=?, contract=?, education=?, major=?, marriage=?, place=?, nation=?, politicalStatus=?, phone=?, address=?, ID=? WHERE staffNo=?"; + int i = jdbcTemplate.update(sql, staffName, gender, birthday, department, position, company, contractType, education, major, marriage, place, nation, politicalStatus, phone, address, idCard, staffNo); return i; } + + @RequestMapping("/delStaff") public int delStaff(HttpServletRequest request) { String staffNo = request.getParameter("staffNo"); diff --git a/code/springboot/newBank/src/main/java/demo/weiyichi/controller/TransferAccount.java b/code/springboot/newBank/src/main/java/demo/weiyichi/controller/TransferAccount.java index d47230fce..8dec8c3d6 100644 --- a/code/springboot/newBank/src/main/java/demo/weiyichi/controller/TransferAccount.java +++ b/code/springboot/newBank/src/main/java/demo/weiyichi/controller/TransferAccount.java @@ -1,202 +1,202 @@ -package demo.weiyichi.controller; - - -import demo.weiyichi.model.AccountTab; -import demo.weiyichi.model.ApiResponse; -import demo.weiyichi.model.RecordTable; -import demo.weiyichi.model.WithdrawMoneyDTO; -import demo.weiyichi.model.TransferDTO; -import demo.weiyichi.model.QueryDTO; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jdbc.core.JdbcTemplate; - -import org.springframework.util.CollectionUtils; -import org.springframework.web.bind.annotation.*; - -import javax.transaction.Transactional; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@RestController -@RequestMapping("/weiyichi") -public class TransferAccount { - - // add 01 - @Autowired - private JdbcTemplate jdbcTemplate; - - //转账 - @Transactional - @PostMapping("/transfer") - public ApiResponse transfer(@RequestBody TransferDTO transferDTO) { - try { - // 参数校验 - if (transferDTO.getOutCardNo() == null || transferDTO.getInCardNo() == null) { - return ApiResponse.error("INVALID_CARDNO", "卡号不能为空"); - } - if (transferDTO.getAmount() == null || transferDTO.getAmount() <= 0) { - return ApiResponse.error("INVALID_AMOUNT", "转账金额必须大于0"); - } - - // 验证转出账户 - String outSql = "SELECT * FROM account_tab WHERE cardNo = ?"; - List> outAccount = jdbcTemplate.queryForList(outSql, transferDTO.getOutCardNo()); - if (CollectionUtils.isEmpty(outAccount)) { - return ApiResponse.error("ACCOUNT_NOT_FOUND", "转出账户不存在"); - } - - // 验证密码 - if (!verifyAccountPassword(transferDTO.getOutCardNo(), transferDTO.getPassword())) { - return ApiResponse.error("PASSWORD_MISMATCH", "密码错误"); - } - - // 验证转入账户 - String inSql = "SELECT * FROM account_tab WHERE cardNo = ?"; - if (CollectionUtils.isEmpty(jdbcTemplate.queryForList(inSql, transferDTO.getInCardNo()))) { - return ApiResponse.error("ACCOUNT_NOT_FOUND", "转入账户不存在"); - } - - // 检查余额 - double outBalance = Double.parseDouble(outAccount.get(0).get("balance").toString()); - if (outBalance < transferDTO.getAmount()) { - return ApiResponse.error("INSUFFICIENT_BALANCE", "余额不足"); - } - - // 更新余额 - jdbcTemplate.update("UPDATE account_tab SET balance = ? WHERE cardNo = ?", - outBalance - transferDTO.getAmount(), transferDTO.getOutCardNo()); - jdbcTemplate.update("UPDATE account_tab SET balance = balance + ? WHERE cardNo = ?", - transferDTO.getAmount(), transferDTO.getInCardNo()); - - // 生成流水记录 - generateTransferRecords(transferDTO, outBalance); - logger.info("转账成功:从 {} 到 {},金额 {}", - transferDTO.getOutCardNo(), transferDTO.getInCardNo(), transferDTO.getAmount()); - return ApiResponse.success(null); - } catch (Exception e) { - logger.error("转账失败:{}", e.getMessage()); - return ApiResponse.error("TRANSFER_FAILED", "转账失败"); - } - } - - - - // 账户查询 - @GetMapping("/query") - public ApiResponse> query( - @RequestParam String cardNo, - @RequestParam(required = false) String type, - @RequestParam(required = false) String filter, - @RequestParam(required = false) String startDate, - @RequestParam(required = false) String endDate) { - - // 参数校验 - if (cardNo == null || !cardNo.matches("\\d{16}")) { - return ApiResponse.error("INVALID_CARDNO", "卡号格式错误"); - } - - Map result = new HashMap<>(); - - // 余额查询 - if (type == null || "balance".equals(type)) { - try { - String balanceSql = "SELECT balance FROM account_tab WHERE cardNo = ?"; - Double balance = jdbcTemplate.queryForObject(balanceSql, Double.class, cardNo); - result.put("balance", balance); - } catch (Exception e) { - return ApiResponse.error("BALANCE_QUERY_FAILED", "余额查询失败"); - } - } - - // 交易记录查询 - if (type == null || "transactions".equals(type)) { - try { - String transSql = buildTransactionSql(filter, startDate, endDate); - List> transactions = jdbcTemplate.queryForList(transSql, cardNo); - result.put("transactions", transactions); - } catch (Exception e) { - return ApiResponse.error("TRANSACTION_QUERY_FAILED", "交易记录查询失败"); - } - } - - return ApiResponse.success(result); - } - - //构建交易记录查询 - private String buildTransactionSql(String filter, String startDate, String endDate) { - String sql = "SELECT " + - "date, cardNo, money, " + - "CASE serviceTy " + - "WHEN '1' THEN '存款' " + - "WHEN '2' THEN '取款' " + - "WHEN '3' THEN '转账' " + - "ELSE '未知' " + - "END AS serviceDesc, " + - "balance, recordNo " + - "FROM recordtable " + - "WHERE cardNo = ?"; - - if ("income".equals(filter)) { - sql += " AND serviceTy = '1'"; - } else if ("expense".equals(filter)) { - sql += " AND serviceTy IN ('2', '3')"; - } - - if (startDate != null && endDate != null) { - sql += " AND date BETWEEN ? AND ?"; - } - - return sql; - } - - //销户接口 - @PostMapping("/closeAccount") - public ApiResponse closeAccount( - @RequestParam String cardNo, - @RequestParam String password, - @RequestParam String staffNo, - @RequestParam String organiNm) { - - // 参数校验 - if (cardNo == null || cardNo.trim().isEmpty()) { - return ApiResponse.error("INVALID_CARDNO", "卡号不能为空"); - } - if (password == null || password.trim().isEmpty()) { - return ApiResponse.error("INVALID_PASSWORD", "密码不能为空"); - } - - // 验证密码 - if (!verifyAccountPassword(cardNo, password)) { - return ApiResponse.error("PASSWORD_MISMATCH", "密码错误"); - } - - // 检查余额 - Double balance = getBalance(cardNo).getData(); - if (balance == null || balance != 0) { - return ApiResponse.error("BALANCE_NOT_ZERO", "账户余额不为0,无法销户"); - } - - try { - // 更新账户状态 - String updateSql = "UPDATE account_tab SET status = '2' WHERE cardNo = ?"; - jdbcTemplate.update(updateSql, cardNo); - - // 生成销户流水记录 - RecordTable record = new RecordTable(); - record.setCardNo(cardNo); - record.setServiceTy("4"); // 4-销户 - record.setRecordNo(getRecordNo(staffNo, organiNm)); - saveRecordTable(record); - - logger.info("账户 {} 已销户,操作员工:{}", cardNo, staffNo); - return ApiResponse.success(null); - } catch (Exception e) { - logger.error("销户失败:{}", e.getMessage()); - return ApiResponse.error("CLOSE_FAILED", "销户失败"); - } - } - -} \ No newline at end of file +//package demo.weiyichi.controller; +// +// +//import demo.weiyichi.model.AccountTab; +//import demo.weiyichi.model.ApiResponse; +//import demo.weiyichi.model.RecordTable; +//import demo.weiyichi.model.WithdrawMoneyDTO; +//import demo.weiyichi.model.TransferDTO; +//import demo.weiyichi.model.QueryDTO; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.jdbc.core.JdbcTemplate; +// +//import org.springframework.util.CollectionUtils; +//import org.springframework.web.bind.annotation.*; +// +//import javax.transaction.Transactional; +//import java.time.LocalDateTime; +//import java.time.format.DateTimeFormatter; +//import java.util.HashMap; +//import java.util.List; +//import java.util.Map; +// +//@RestController +//@RequestMapping("/weiyichi") +//public class TransferAccount { +// +// // add 01 +// @Autowired +// private JdbcTemplate jdbcTemplate; +// +// //转账 +// @Transactional +// @PostMapping("/transfer") +// public ApiResponse transfer(@RequestBody TransferDTO transferDTO) { +// try { +// // 参数校验 +// if (transferDTO.getOutCardNo() == null || transferDTO.getInCardNo() == null) { +// return ApiResponse.error("INVALID_CARDNO", "卡号不能为空"); +// } +// if (transferDTO.getAmount() == null || transferDTO.getAmount() <= 0) { +// return ApiResponse.error("INVALID_AMOUNT", "转账金额必须大于0"); +// } +// +// // 验证转出账户 +// String outSql = "SELECT * FROM account_tab WHERE cardNo = ?"; +// List> outAccount = jdbcTemplate.queryForList(outSql, transferDTO.getOutCardNo()); +// if (CollectionUtils.isEmpty(outAccount)) { +// return ApiResponse.error("ACCOUNT_NOT_FOUND", "转出账户不存在"); +// } +// +//// // 验证密码 +//// if (!verifyAccountPassword(transferDTO.getOutCardNo(), transferDTO.getPassword())) { +//// return ApiResponse.error("PASSWORD_MISMATCH", "密码错误"); +//// } +// +// // 验证转入账户 +// String inSql = "SELECT * FROM account_tab WHERE cardNo = ?"; +// if (CollectionUtils.isEmpty(jdbcTemplate.queryForList(inSql, transferDTO.getInCardNo()))) { +// return ApiResponse.error("ACCOUNT_NOT_FOUND", "转入账户不存在"); +// } +// +// // 检查余额 +// double outBalance = Double.parseDouble(outAccount.get(0).get("balance").toString()); +// if (outBalance < transferDTO.getAmount()) { +// return ApiResponse.error("INSUFFICIENT_BALANCE", "余额不足"); +// } +// +// // 更新余额 +// jdbcTemplate.update("UPDATE account_tab SET balance = ? WHERE cardNo = ?", +// outBalance - transferDTO.getAmount(), transferDTO.getOutCardNo()); +// jdbcTemplate.update("UPDATE account_tab SET balance = balance + ? WHERE cardNo = ?", +// transferDTO.getAmount(), transferDTO.getInCardNo()); +// +// // 生成流水记录 +// generateTransferRecords(transferDTO, outBalance); +// logger.info("转账成功:从 {} 到 {},金额 {}", +// transferDTO.getOutCardNo(), transferDTO.getInCardNo(), transferDTO.getAmount()); +// return ApiResponse.success(null); +// } catch (Exception e) { +// logger.error("转账失败:{}", e.getMessage()); +// return ApiResponse.error("TRANSFER_FAILED", "转账失败"); +// } +// } +// +// +// +// // 账户查询 +// @GetMapping("/query") +// public ApiResponse> query( +// @RequestParam String cardNo, +// @RequestParam(required = false) String type, +// @RequestParam(required = false) String filter, +// @RequestParam(required = false) String startDate, +// @RequestParam(required = false) String endDate) { +// +// // 参数校验 +// if (cardNo == null || !cardNo.matches("\\d{16}")) { +// return ApiResponse.error("INVALID_CARDNO", "卡号格式错误"); +// } +// +// Map result = new HashMap<>(); +// +// // 余额查询 +// if (type == null || "balance".equals(type)) { +// try { +// String balanceSql = "SELECT balance FROM account_tab WHERE cardNo = ?"; +// Double balance = jdbcTemplate.queryForObject(balanceSql, Double.class, cardNo); +// result.put("balance", balance); +// } catch (Exception e) { +// return ApiResponse.error("BALANCE_QUERY_FAILED", "余额查询失败"); +// } +// } +// +// // 交易记录查询 +// if (type == null || "transactions".equals(type)) { +// try { +// String transSql = buildTransactionSql(filter, startDate, endDate); +// List> transactions = jdbcTemplate.queryForList(transSql, cardNo); +// result.put("transactions", transactions); +// } catch (Exception e) { +// return ApiResponse.error("TRANSACTION_QUERY_FAILED", "交易记录查询失败"); +// } +// } +// +// return ApiResponse.success(result); +// } +// +// //构建交易记录查询 +// private String buildTransactionSql(String filter, String startDate, String endDate) { +// String sql = "SELECT " + +// "date, cardNo, money, " + +// "CASE serviceTy " + +// "WHEN '1' THEN '存款' " + +// "WHEN '2' THEN '取款' " + +// "WHEN '3' THEN '转账' " + +// "ELSE '未知' " + +// "END AS serviceDesc, " + +// "balance, recordNo " + +// "FROM recordtable " + +// "WHERE cardNo = ?"; +// +// if ("income".equals(filter)) { +// sql += " AND serviceTy = '1'"; +// } else if ("expense".equals(filter)) { +// sql += " AND serviceTy IN ('2', '3')"; +// } +// +// if (startDate != null && endDate != null) { +// sql += " AND date BETWEEN ? AND ?"; +// } +// +// return sql; +// } +// +// //销户接口 +// @PostMapping("/closeAccount") +// public ApiResponse closeAccount( +// @RequestParam String cardNo, +// @RequestParam String password, +// @RequestParam String staffNo, +// @RequestParam String organiNm) { +// +// // 参数校验 +// if (cardNo == null || cardNo.trim().isEmpty()) { +// return ApiResponse.error("INVALID_CARDNO", "卡号不能为空"); +// } +// if (password == null || password.trim().isEmpty()) { +// return ApiResponse.error("INVALID_PASSWORD", "密码不能为空"); +// } +// +// // 验证密码 +// if (!verifyAccountPassword(cardNo, password)) { +// return ApiResponse.error("PASSWORD_MISMATCH", "密码错误"); +// } +// +// // 检查余额 +// Double balance = getBalance(cardNo).getData(); +// if (balance == null || balance != 0) { +// return ApiResponse.error("BALANCE_NOT_ZERO", "账户余额不为0,无法销户"); +// } +// +// try { +// // 更新账户状态 +// String updateSql = "UPDATE account_tab SET status = '2' WHERE cardNo = ?"; +// jdbcTemplate.update(updateSql, cardNo); +// +// // 生成销户流水记录 +// RecordTable record = new RecordTable(); +// record.setCardNo(cardNo); +// record.setServiceTy("4"); // 4-销户 +// record.setRecordNo(getRecordNo(staffNo, organiNm)); +// saveRecordTable(record); +// +// logger.info("账户 {} 已销户,操作员工:{}", cardNo, staffNo); +// return ApiResponse.success(null); +// } catch (Exception e) { +// logger.error("销户失败:{}", e.getMessage()); +// return ApiResponse.error("CLOSE_FAILED", "销户失败"); +// } +// } +// +//} \ No newline at end of file diff --git a/code/vue/chuxu/node_modules/.vite/vitest/results.json b/code/vue/chuxu/node_modules/.vite/vitest/results.json new file mode 100644 index 000000000..232d5b2d2 --- /dev/null +++ b/code/vue/chuxu/node_modules/.vite/vitest/results.json @@ -0,0 +1 @@ +{"version":"2.1.3","results":[[":src/components/__tests__/HelloWorld.spec.ts",{"duration":0,"failed":false}]]} \ No newline at end of file