| | |
| | | this.update(Wrappers.<Strategy>update().lambda() |
| | | .set(Strategy::getIsDefault,CommonConstant.NOT_SEALED_ID) |
| | | .eq(Strategy::getIsDefault,CommonConstant.DATA_SCOPE_CATEGORY)); |
| | | }else { |
| | | if(Func.isEmpty(queryByIsDefault())){ |
| | | throw new ServiceException("默认密码策略必须有且仅有一条!"); |
| | | } |
| | | } |
| | | if(Func.isEmpty(strategy.getUpdateTime())){ |
| | | strategy.setUpdateTime(new Date()); |
| | |
| | | return tenantTemp; |
| | | } |
| | | |
| | | /** |
| | | * 查询默认密码策略 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Long queryByIsDefault() { |
| | | return this.getOne(Wrappers.<Strategy>query().lambda() |
| | | .eq(Strategy::getIsDefault, CommonConstant.DATA_SCOPE_CATEGORY)).getId(); |
| | | } |
| | | |
| | | } |