| | |
| | | return p.getId(); |
| | | } |
| | | |
| | | public void deletePointGoods(Long id){ |
| | | pointGoodsMapper.deleteById(id); |
| | | public void deletePointGoods(String idStr){ |
| | | List<String> ids = splitParam(idStr); |
| | | if (ids != null && ids.size() > 0) { |
| | | for(String idd : ids) { |
| | | Long id = Long.parseLong(idd); |
| | | pointGoodsMapper.deleteById(id); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public Page<PointGoodsListDTO> selectGoodsList(Page page, PointGoodsQueryDTO dto){ |
| | |
| | | return dto; |
| | | } |
| | | |
| | | public void updateStatus(Long id, String status){ |
| | | PointGoods p = pointGoodsMapper.selectById(id); |
| | | if(p == null){ |
| | | throw new ValidationException("商品未找到"); |
| | | } |
| | | public void updateStatus(String idStr, String status){ |
| | | List<String> ids = splitParam(idStr); |
| | | if(ids != null && ids.size() > 0) { |
| | | for(String idd : ids) { |
| | | Long id = Long.parseLong(idd); |
| | | PointGoods p = pointGoodsMapper.selectById(id); |
| | | if (p == null) { |
| | | continue; |
| | | } |
| | | |
| | | p.setStatus(status); |
| | | p.update(SecurityUtils.getUserId()); |
| | | pointGoodsMapper.updateById(p); |
| | | p.setStatus(status); |
| | | p.update(SecurityUtils.getUserId()); |
| | | pointGoodsMapper.updateById(p); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public synchronized void exchangeGoods(ExchangeGoodsDTO dto) { |