Commit 2442c1f6 by fz

1.分享车钥匙按照分享打开在前,关闭在后排序

2.分享状态修改  0:关闭  1:打开
1 parent d2b6f357
......@@ -58,7 +58,7 @@ public class SmartVehicleBlueShareKey implements Comparable<SmartVehicleBlueShar
private Date pickTime;
/**
* 分享状态 0:打开 1:关闭
* 分享状态 1:打开 0:关闭
*/
private Integer shareStatus;
......@@ -82,6 +82,6 @@ public class SmartVehicleBlueShareKey implements Comparable<SmartVehicleBlueShar
if (null == data2)
return -1;
return data2.compareTo(data);
return data.compareTo(data2);
}
}
\ No newline at end of file
......@@ -486,7 +486,7 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService {
newKey.setSn(sn);
newKey.setUserId(userId);
//默认打开共享
newKey.setShareStatus(0);
newKey.setShareStatus(1);
//crep用明文存储
newKey.setCrepCode(crep);
//默认密钥
......@@ -597,7 +597,7 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService {
//主钥匙如果关闭,将所有共享钥匙设置为停止共享
SmartVehicleBlueShareKey shareKey = new SmartVehicleBlueShareKey();
shareKey.setShareStatus(1);
shareKey.setShareStatus(0);
shareKey.setExpireTime(new Date());
SmartVehicleBlueShareKeyExample shareKeyExample = smartVehicleBlueShareKeyService.getBlueKeyShareExampleByCarKeyID(smartVehicleBlueKey.getId());
smartVehicleBlueShareKeyService.updateByExampleSelective(shareKey,shareKeyExample);
......@@ -692,7 +692,7 @@ public class AiLockingKeyServiceImpl implements AiLockingKeyService {
if (finalNowDate.after(expireDate)) {
expireList.add(key.getId());
//过期关闭
key.setShareStatus(1);
key.setShareStatus(0);
}
});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!