| | |
| | | } else { |
| | | g.setPrice(dto.getPrice()); |
| | | g.setStock(dto.getStock()); |
| | | g.setLimited(dto.getLimited()); |
| | | } |
| | | |
| | | g.update(SecurityUtils.getUserId()); |
| | |
| | | public Long editFlowerAdmin(FlowerUpdateAdminDTO dto){ |
| | | Flower g = flowerMapper.selectById(dto.getId()); |
| | | g.setSales(dto.getSales()); |
| | | g.setLimited(dto.getLimited()); |
| | | g.update(SecurityUtils.getUserId()); |
| | | flowerMapper.updateById(g); |
| | | |
| | |
| | | return flowerDeleteDO; |
| | | } |
| | | |
| | | public void setFlowersLimited(FlowerLimitedDTO dto) { |
| | | List<Long> ids = dto.getIds(); |
| | | if (ids == null || ids.size() == 0) { |
| | | throw new ValidationException("请选择商品"); |
| | | } |
| | | for (Long id : ids) { |
| | | Flower f = flowerMapper.selectById(id); |
| | | f.setLimited(dto.getLimited()); |
| | | flowerMapper.updateById(f); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |