| | |
| | | StandardTemplate::getNumber); |
| | | standardTemplate.setNumber(giveCode); |
| | | } |
| | | if (standardTemplate.getPrice() == null) { |
| | | standardTemplate.setPrice(java.math.BigDecimal.ZERO); |
| | | } |
| | | if (StringUtils.isNotBlank(standardTemplate.getThing())) { |
| | | standardTemplate.setThing(GZipUtil.compress(standardTemplate.getThing())); |
| | | } else { |
| | |
| | | |
| | | @Override |
| | | public int upStandardTemplate(StandardTemplate standardTemplate) { |
| | | if (standardTemplate.getPrice() == null) { |
| | | standardTemplate.setPrice(java.math.BigDecimal.ZERO); |
| | | } |
| | | if (StringUtils.isNotBlank(standardTemplate.getThing())) { |
| | | standardTemplate.setThing(GZipUtil.compress(standardTemplate.getThing())); |
| | | } else { |
| | |
| | | // 查询旧模板 |
| | | StandardTemplate standardTemplate = baseMapper.selectById(newTemplate.getId()); |
| | | newTemplate.setThing(standardTemplate.getThing()); |
| | | if (newTemplate.getPrice() == null) { |
| | | newTemplate.setPrice(java.math.BigDecimal.ZERO); |
| | | } |
| | | |
| | | if (StringUtils.isBlank(newTemplate.getNumber())) { |
| | | String giveCode = numberGenerator.generateNumberWithPrefix(5, |