| | |
| | | * @return success为true为可以删除,false表示有数据引用,obj为true表示有下级 |
| | | */ |
| | | private R checkIsCanDeleteForDO(CodeFixedValueDTO codeFixedValueDTO, CodeFixedValue codeFixedValueDO) { |
| | | if (checkTs(codeFixedValueDTO)) { |
| | | if(!checkTs(codeFixedValueDTO,codeFixedValueDO)) { |
| | | return R.fail(TS_NOT_PROCESS); |
| | | } |
| | | if(!checkIsLinked(codeFixedValueDO.getOid())) { |
| | |
| | | * @param tempDO |
| | | * @return |
| | | */ |
| | | private boolean checkTs(CodeFixedValueDTO tempDO){ |
| | | LambdaQueryWrapper<CodeFixedValue> wrapper = Wrappers.<CodeFixedValue>query() |
| | | .lambda().eq(CodeFixedValue::getOid,tempDO.getOid()).select(CodeFixedValue::getTs); |
| | | long dbTs = codeFixedValueMapper.selectById(wrapper).getTs().getTime(); |
| | | long currentTs = tempDO.getTs().getTime(); |
| | | if(dbTs == currentTs){ |
| | | private boolean checkTs(CodeFixedValueDTO tempDO,CodeFixedValue codeFixedValueDO){ |
| | | Date dbTs = codeFixedValueDO.getTs(); |
| | | Date currentTs = tempDO.getTs(); |
| | | if(currentTs == null ? dbTs == null:currentTs.compareTo(dbTs)==0){ |
| | | return true; |
| | | } |
| | | return false; |