| | |
| | | } |
| | | strategy.setUpdateTime(new Date()); |
| | | CacheUtil.clear(SYS_CACHE, Boolean.FALSE); |
| | | boolean temp1 = super.saveOrUpdate(strategy); |
| | | boolean temp1 = this.update(strategy,Wrappers.<Strategy>update().lambda().eq(Strategy::getId,strategy.getId())); |
| | | boolean temp2 = false; |
| | | if(Func.isNotEmpty(oldIsDefaultStrategy)){ |
| | | temp2 = updateUserStrategyDefault(temp1, oldIsDefaultStrategy); |
| | |
| | | if(Func.isNotEmpty(strategy.getRequiredType()) && (strategy.getMinPwdLen() < strategy.getRequiredType() || strategy.getMaxPwdLen() < strategy.getRequiredType())){ |
| | | throw new ServiceException("密码最小长度不能小于必填种类的值!"); |
| | | } |
| | | if(strategy.getExpirationTime() <= strategy.getReminderTime()){ |
| | | throw new ServiceException("过期时间不能小于提醒时间!"); |
| | | } |
| | | //判断前端是否未提交,是否默认字段 |
| | | if(Func.isEmpty(strategy.getIsDefault())){ |
| | | strategy.setIsDefault(0L); |