数据分发

dev
lisai17@sina.com 2021-10-16 22:55:25 +08:00
parent ff181c2aa0
commit 33a418516e
3 changed files with 19 additions and 19 deletions

View File

@ -103,7 +103,7 @@ public class Config extends JFinalConfig {
public static DeviceThread deviceThread = new DeviceThread(); public static DeviceThread deviceThread = new DeviceThread();
public static SocketIOService socketio = null; public static SocketIOService socketio = null;
private static boolean client_run = true; private static boolean client_run = true;
public static final String CLINET_VERSION = "20210927"; public static final String CLINET_VERSION = "20211016";
public static String getRootPath() { public static String getRootPath() {
return PathKit.getWebRootPath() return PathKit.getWebRootPath()

View File

@ -203,7 +203,7 @@ public class TruckWeightLimitSyncService extends BaseSyncService {
return Result.failed(false, "按主键未找到对应记录"); return Result.failed(false, "按主键未找到对应记录");
} }
if (!model.hasDelKey()) { if (!oldobj.hasDelKey()) {
return Result.failed(false, "不存在逻辑删除字段"); return Result.failed(false, "不存在逻辑删除字段");
} }

View File

@ -314,7 +314,7 @@ public class SyncTaskService {
if (Blacklist.dao.getTablename().equals(tablename) if (Blacklist.dao.getTablename().equals(tablename)
|| "truck_weight_limit".equals(tablename) || "truck_weight_limit".equals(tablename)
|| "truck_weight_limit_modify_log".equals(tablename) || "truck_weight_limit_modify_log".equals(tablename)
) { ) {
for (Map.Entry<Integer, Supermarket> entry : SvrCacheData.SUP_CACHE.entrySet()) { for (Map.Entry<Integer, Supermarket> entry : SvrCacheData.SUP_CACHE.entrySet()) {
Supermarket supermarket = entry.getValue(); Supermarket supermarket = entry.getValue();
@ -390,7 +390,7 @@ public class SyncTaskService {
if (Blacklist.dao.getTablename().equals(tablename) if (Blacklist.dao.getTablename().equals(tablename)
|| "truck_weight_limit".equals(tablename) || "truck_weight_limit".equals(tablename)
|| "truck_weight_limit_modify_log".equals(tablename) || "truck_weight_limit_modify_log".equals(tablename)
) { ) {
for (Map.Entry<Integer, Supermarket> entry : SvrCacheData.SUP_CACHE.entrySet()) { for (Map.Entry<Integer, Supermarket> entry : SvrCacheData.SUP_CACHE.entrySet()) {
Supermarket supermarket = entry.getValue(); Supermarket supermarket = entry.getValue();
@ -517,24 +517,24 @@ public class SyncTaskService {
} }
if (!sts.isEmpty()) { if (!sts.isEmpty()) {
for(SyncTask st : sts){ for (SyncTask st : sts) {
if(st.getSaveData() == null && st.getUpdateData() == null && st.getDeleteData() == null && st.getIncrementData() == null){ if (!st.save()) {
log.error("错误数据 %s", recvdata.toJSONString());
}
}
int[] ret = Db.batchSave(sts, sts.size());
if (ret.length != sts.size()) {
return false;
}
for (int i : ret) {
// 必须是每条 sql 修改一条记录
if (i != 1) {
return false; return false;
} }
} }
// int[] ret = Db.batchSave(sts, sts.size());
//
// if (ret.length != sts.size()) {
// return false;
// }
//
// for (int i : ret) {
// // 必须是每条 sql 修改一条记录
// if (i != 1) {
// return false;
// }
// }
} }
// if (!saveauthlics.isEmpty() || !deleteauthlics.isEmpty()) { // if (!saveauthlics.isEmpty() || !deleteauthlics.isEmpty()) {