审核订单取消申请接口修改
parent
4c8f0b6822
commit
17a4448fb6
|
|
@ -335,7 +335,7 @@ public class SyncTaskService {
|
|||
}
|
||||
}
|
||||
|
||||
list = listFilter(tablename,list);
|
||||
list = listFilter(tablename, list);
|
||||
|
||||
int[] ret = Db.batchSave(tablename, list, list.size());
|
||||
|
||||
|
|
@ -576,49 +576,51 @@ public class SyncTaskService {
|
|||
private List<Record> listFilter(String tablename, List<Record> list) {
|
||||
|
||||
List<Record> removeList = new ArrayList<>();
|
||||
if ("order_temp".equals(tablename)){
|
||||
if ("order_temp".equals(tablename)) {
|
||||
// sn
|
||||
for (Record o : list) {
|
||||
String sn = o.getStr("sn");
|
||||
Record first = Db.findFirst("select * from " + tablename + " where sn = ?", sn);
|
||||
if (o.toJson().equals(first.toJson())){
|
||||
if (o.toJson().equals(first.toJson())) {
|
||||
removeList.add(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ("ticket_log".equals(tablename)){
|
||||
if ("ticket_log".equals(tablename)) {
|
||||
// id
|
||||
for (Record o : list) {
|
||||
String id = o.getStr("id");
|
||||
Record first = Db.findFirst("select * from " + tablename + " where sn = ?", id);
|
||||
if (o.toJson().equals(first.toJson())){
|
||||
if (o.toJson().equals(first.toJson())) {
|
||||
removeList.add(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ("action_cmd_log".equals(tablename)){
|
||||
if ("action_cmd_log".equals(tablename)) {
|
||||
// id
|
||||
for (Record o : list) {
|
||||
String id = o.getStr("id");
|
||||
Record first = Db.findFirst("select * from " + tablename + " where sn = ?", id);
|
||||
if (o.toJson().equals(first.toJson())){
|
||||
if (o.toJson().equals(first.toJson())) {
|
||||
removeList.add(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ("transport".equals(tablename)){
|
||||
if ("transport".equals(tablename)) {
|
||||
// id
|
||||
for (Record o : list) {
|
||||
String id = o.getStr("id");
|
||||
Record first = Db.findFirst("select * from " + tablename + " where sn = ?", id);
|
||||
if (o.toJson().equals(first.toJson())){
|
||||
if (o.toJson().equals(first.toJson())) {
|
||||
removeList.add(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (CollectionUtils.isNotEmpty(removeList)){
|
||||
if (CollectionUtils.isNotEmpty(removeList)) {
|
||||
log.debug("新增条数" + list.size());
|
||||
list.removeAll(removeList);
|
||||
log.debug("删除后条数" + list.size());
|
||||
}
|
||||
|
||||
return list;
|
||||
|
|
|
|||
Loading…
Reference in New Issue