fix: 开放sn唯一校验
This commit is contained in:
1 parent
da65626cb7
commit
824ba341a2
1 file changed
+11
-11
+11
-11
@@ -274,17 +274,17 @@ public class LicenseServiceImpl implements LicenseService {
|
||||
if (StrUtil.isBlank(sn)) {
|
||||
return true;
|
||||
}
|
||||
// LicenseDO license = licenseMapper.selectBySn(sn);
|
||||
// if (license == null) {
|
||||
// return true;
|
||||
// }
|
||||
// // 如果 id 为空,说明不用比较是否为相同 id 的License
|
||||
// if (id == null) {
|
||||
// return false;
|
||||
// }
|
||||
// if (!license.getId().equals(id)) {
|
||||
// return false;
|
||||
// }
|
||||
LicenseDO license = licenseMapper.selectBySn(sn);
|
||||
if (license == null) {
|
||||
return true;
|
||||
}
|
||||
// 如果 id 为空,说明不用比较是否为相同 id 的License
|
||||
if (id == null) {
|
||||
return false;
|
||||
}
|
||||
if (!license.getId().equals(id)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user