@@ -203,14 +217,17 @@ public class CollectModule {
...
@@ -203,14 +217,17 @@ public class CollectModule {
map.put("cardId",cardId);
map.put("cardId",cardId);
Stringsql="SELECT * FROM ckvtable.tb_kvtable_"+tag+" where consumer_id = '"+consumerId+"' and vkey = 'cl_good_cid_itemId_"+consumerId+"_"+cardId+"';";
//String sql = "SELECT * FROM ckvtable.tb_kvtable_"+tag+" where consumer_id = '"+consumerId+"' and vkey = 'cl_good_cid_itemId_"+consumerId+"_"+cardId+"';";
Stringsql="SELECT * FROM collect_card_consumer.tb_collect_card_info_"+tag+" where consumer_id = '"+consumerId+"' and item_id = '"+cardId+"';";
sqlService.update("update ckvtable.tb_kvtable_"+tag+" set int_value = '"+count+"' where consumer_id = '"+consumerId+"' and vkey = 'cl_good_cid_itemId_"+consumerId+"_"+cardId+"'");
//sqlService.update("update ckvtable.tb_kvtable_"+tag+" set int_value = '"+count+"' where consumer_id = '"+consumerId+"' and vkey = 'cl_good_cid_itemId_"+consumerId+"_"+cardId+"'");
sqlService.update("update collect_card_consumer.tb_collect_card_info_"+tag+" set item_count = '"+count+"',item_total_count = '"+count+"' where consumer_id = '"+consumerId+"' and item_id = '"+cardId+"'");
System.out.println("如果卡片原本有值,重置成功!");
System.out.println("如果卡片原本有值,重置成功!");
map.put("success","true");
map.put("success","true");
...
@@ -244,21 +263,27 @@ public class CollectModule {
...
@@ -244,21 +263,27 @@ public class CollectModule {
Stringsql="SELECT * FROM ckvtable.tb_kvtable_"+tag+" where consumer_id = '"+consumerId+"' and vkey = 'cl_good_cid_Crule_grade_"+consumerId+"_"+ruleId+"_"+termId+"'";
//String sql = "SELECT * FROM ckvtable.tb_kvtable_"+tag+" where consumer_id = '"+consumerId+"' and vkey = 'cl_good_cid_Crule_grade_"+consumerId+"_"+ruleId+"_"+termId+"'";
Stringsql="SELECT * FROM collect_card.tb_collect_card_win_record where consumer_id = '"+consumerId+"' and rule_id = '"+ruleId+"' and grade_level = '"+termId+"'";
System.out.println("sql为:"+sql);
System.out.println("sql为:"+sql);
// jdbc = MysqlUtils.mysqlDuiba("ckvtable");
// jdbc = MysqlUtils.mysqlDuiba("ckvtable");
...
@@ -284,7 +311,7 @@ public class CollectModule {
...
@@ -284,7 +311,7 @@ public class CollectModule {
}else{
}else{
try{
try{
//jdbc.update("delete FROM tb_kvtable_"+tag+" where consumer_id = '"+consumerId+"' and vkey = 'cl_good_cid_Crule_grade_"+consumerId+"_"+ruleId+"_"+termId+"'");
//jdbc.update("delete FROM tb_kvtable_"+tag+" where consumer_id = '"+consumerId+"' and vkey = 'cl_good_cid_Crule_grade_"+consumerId+"_"+ruleId+"_"+termId+"'");
sqlService.update("delete FROM ckvtable.tb_kvtable_"+tag+" where consumer_id = '"+consumerId+"' and vkey = 'cl_good_cid_Crule_grade_"+consumerId+"_"+ruleId+"_"+termId+"'");
sqlService.update("delete FROM collect_card.tb_collect_card_win_record where consumer_id = '"+consumerId+"' and rule_id = '"+ruleId+"' and grade_level = '"+termId+"'");