|
@@ -7,6 +7,7 @@ import com.template.common.utils.PasswordChecker;
|
|
|
import com.template.model.dto.CustomKeyCardDto;
|
|
import com.template.model.dto.CustomKeyCardDto;
|
|
|
import com.template.model.dto.CustomKeyFingerprintDto;
|
|
import com.template.model.dto.CustomKeyFingerprintDto;
|
|
|
import com.template.model.dto.CustomKeyPassWordDto;
|
|
import com.template.model.dto.CustomKeyPassWordDto;
|
|
|
|
|
+import com.template.model.dto.UpdateLockDto;
|
|
|
import com.template.model.pojo.*;
|
|
import com.template.model.pojo.*;
|
|
|
import com.template.model.result.CommonResult;
|
|
import com.template.model.result.CommonResult;
|
|
|
import com.template.services.*;
|
|
import com.template.services.*;
|
|
@@ -240,5 +241,31 @@ public class UnlockingCustomController implements UnlockingCustomControllerAPI {
|
|
|
return CommonResult.ok();
|
|
return CommonResult.ok();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public CommonResult updateLock(UpdateLockDto updateLockDto) {
|
|
|
|
|
+ UnlockingCustom byId = unlockingCustomService.getById(updateLockDto.getUnlockingAdminId());
|
|
|
|
|
+ if (ObjectUtils.isEmpty(byId)) {
|
|
|
|
|
+ return CommonResult.fail("不存在该记录");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ String lockStatus = byId.getLockStatus();
|
|
|
|
|
+ if (!"1".equals(lockStatus)) {
|
|
|
|
|
+ return CommonResult.fail("只有密码用户才能修改时效");
|
|
|
|
|
+ }
|
|
|
|
|
+ String lockUserId = byId.getLockUserId();
|
|
|
|
|
+ String luid = byId.getLuid();
|
|
|
|
|
+ String startTime = updateLockDto.getStartTime();
|
|
|
|
|
+ String endTime = updateLockDto.getEndTime();
|
|
|
|
|
+
|
|
|
|
|
+ passwordIssController.updateLock(lockUserId,luid,startTime,endTime);
|
|
|
|
|
+
|
|
|
|
|
+ byId.setStartTime(startTime);
|
|
|
|
|
+ byId.setEndTime(endTime);
|
|
|
|
|
+
|
|
|
|
|
+ unlockingCustomService.updateById(byId);
|
|
|
|
|
+
|
|
|
|
|
+ return CommonResult.ok();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|