Commit 2f71ddc1 authored by 黎博's avatar 黎博

清除数据接口报错修复

parent d4def5a1
...@@ -34,10 +34,10 @@ public class ClearDataServiceImpl implements ClearDataService { ...@@ -34,10 +34,10 @@ public class ClearDataServiceImpl implements ClearDataService {
if (orderList.size() > 0) { if (orderList.size() > 0) {
for (Map<String, Object> map: orderList) { for (Map<String, Object> map: orderList) {
String orderNo = map.get("order_no").toString(); String orderNo = map.get("order_no").toString();
jdbcTemplate.execute("DELETE FROM `t_order_sku` WHERE order_no = " + orderNo); jdbcTemplate.execute(String.format("DELETE FROM `t_order_sku` WHERE order_no = '%s'", orderNo));
jdbcTemplate.execute("DELETE FROM `t_order_coupon` WHERE order_no = " + orderNo); jdbcTemplate.execute(String.format("DELETE FROM `t_order_coupon` WHERE order_no = '%s'", orderNo));
jdbcTemplate.execute("DELETE FROM `t_order_refund_apply` WHERE order_no = " + orderNo); jdbcTemplate.execute(String.format("DELETE FROM `t_order_refund_apply` WHERE order_no = '%s'", orderNo));
jdbcTemplate.execute("DELETE FROM `t_order_refund_proof` WHERE order_no = " + orderNo); jdbcTemplate.execute(String.format("DELETE FROM `t_order_refund_proof` WHERE order_no = '%s'", orderNo));
} }
} }
jdbcTemplate.execute("DELETE FROM `t_user_shop_cart` WHERE user_id = " + userId); jdbcTemplate.execute("DELETE FROM `t_user_shop_cart` WHERE user_id = " + userId);
...@@ -60,7 +60,7 @@ public class ClearDataServiceImpl implements ClearDataService { ...@@ -60,7 +60,7 @@ public class ClearDataServiceImpl implements ClearDataService {
jdbcTemplate.execute("DELETE FROM `credit_trade_record` WHERE user_id = " + userId); jdbcTemplate.execute("DELETE FROM `credit_trade_record` WHERE user_id = " + userId);
jdbcTemplate.execute("DELETE FROM `debit_account` WHERE user_id = " + userId); jdbcTemplate.execute("DELETE FROM `debit_account` WHERE user_id = " + userId);
jdbcTemplate.execute("DELETE FROM `debit_record` WHERE user_id = " + userId); jdbcTemplate.execute("DELETE FROM `debit_record` WHERE user_id = " + userId);
jdbcTemplate.execute("DELETE FROM `msg_record` WHERE phone_no = " + phoneNo); jdbcTemplate.execute(String.format("DELETE FROM `msg_record` WHERE phone_no = '%s'", phoneNo));
jdbcTemplate.execute("DELETE FROM `order_record` WHERE user_id = " + userId); jdbcTemplate.execute("DELETE FROM `order_record` WHERE user_id = " + userId);
jdbcTemplate.execute("DELETE FROM `trade_record` WHERE user_id = " + userId); jdbcTemplate.execute("DELETE FROM `trade_record` WHERE user_id = " + userId);
...@@ -70,13 +70,12 @@ public class ClearDataServiceImpl implements ClearDataService { ...@@ -70,13 +70,12 @@ public class ClearDataServiceImpl implements ClearDataService {
jdbcTemplate.execute("DELETE FROM `acs_bill` WHERE user_id = " + userId); jdbcTemplate.execute("DELETE FROM `acs_bill` WHERE user_id = " + userId);
jdbcTemplate.execute("DELETE FROM `acs_cash_account` WHERE user_id = " + userId); jdbcTemplate.execute("DELETE FROM `acs_cash_account` WHERE user_id = " + userId);
jdbcTemplate.execute("DELETE FROM `acs_cash_account_record` WHERE user_id = " + userId); jdbcTemplate.execute("DELETE FROM `acs_cash_account_record` WHERE user_id = " + userId);
// jdbcTemplate.execute("DELETE FROM `acs_capital_transfer_plan` WHERE user_id = " + userId);
jdbcTemplate.execute("DELETE FROM `acs_commodity` WHERE user_id = " + userId); jdbcTemplate.execute("DELETE FROM `acs_commodity` WHERE user_id = " + userId);
jdbcTemplate.execute("DELETE FROM `acs_customer` WHERE uuid = '" + uuid + "'"); jdbcTemplate.execute(String.format("DELETE FROM `acs_customer` WHERE uuid = '%s'", uuid));
jdbcTemplate.execute("DELETE FROM `acs_pay_order` WHERE user_id = " + userId); jdbcTemplate.execute("DELETE FROM `acs_pay_order` WHERE user_id = " + userId);
jdbcTemplate.execute("DELETE FROM `acs_payment_order` WHERE user_id = " + userId); jdbcTemplate.execute("DELETE FROM `acs_payment_order` WHERE user_id = " + userId);
jdbcTemplate.execute("DELETE FROM `acs_plan` WHERE user_id = " + userId); jdbcTemplate.execute("DELETE FROM `acs_plan` WHERE user_id = " + userId);
jdbcTemplate.execute("DELETE FROM `acs_sms` WHERE mobile_no = " + phoneNo); jdbcTemplate.execute(String.format("DELETE FROM `acs_sms` WHERE mobile_no = ''", phoneNo));
jdbcTemplate.execute("DELETE FROM `acs_trans` WHERE user_id = " + userId); jdbcTemplate.execute("DELETE FROM `acs_trans` WHERE user_id = " + userId);
log.info("开始删除{}环境{}用户vcc_quota中的数据!", namespace, phoneNo); log.info("开始删除{}环境{}用户vcc_quota中的数据!", namespace, phoneNo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment