| | |
| | | // ||Constants.formatIntegerNum(solutions.getPriceCycleUnit()) < 0 |
| | | ||Constants.formatIntegerNum(solutions.getInsureCycle()) < 0 |
| | | ||Constants.formatIntegerNum(solutions.getInsureCycleUnit()) < 0 |
| | | || solutions.getMinAge() >solutions.getMaxAge() |
| | | ||Constants.formatIntegerNum( solutions.getMinAge()) >Constants.formatIntegerNum(solutions.getMaxAge()) |
| | | || Constants.formatBigdecimal(solutions.getPrice()).compareTo(new BigDecimal(0)) !=1 |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | |
| | | } |
| | | //数据有效性校验 |
| | | initCreateParam(solutions); |
| | | solutions.setType(null);//不支持修改投保方案 |
| | | if(solutionsMapper.selectCount(new QueryWrapper<Solutions>().lambda() |
| | | .eq(Solutions::getName,solutions.getName()) |
| | | .eq(Solutions::getIsdeleted,Constants.ZERO) |
| | |
| | | .eq(Solutions::getDataType,Constants.TWO) |
| | | .last("limit 1") |
| | | ); |
| | | |
| | | |
| | | if(Objects.isNull(oldVersion)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到历史版本数据"); |
| | |
| | | |
| | | @Override |
| | | public List<Solutions> findList(Solutions solutions) { |
| | | LoginUserInfo user = (LoginUserInfo)SecurityUtils.getSubject().getPrincipal(); |
| | | solutions.setIsdeleted(Constants.ZERO); |
| | | solutions.setStatus(Constants.ZERO); |
| | | if(solutions.getDataType() == null){ |
| | | solutions.setDataType(Constants.TWO); |
| | | } |
| | | if(Constants.equalsObject(user.getType(),Constants.TWO)){ |
| | | //如果是删除 |
| | | solutions.setShopId(user.getCompanyId()); |
| | | } |
| | | QueryWrapper<Solutions> wrapper = new QueryWrapper<>(solutions); |
| | | |
| | | return solutionsMapper.selectList(wrapper); |
| | | } |
| | | |