Commit 2442c1f6 by fz

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

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