| | |
| | | continue; |
| | | } |
| | | |
| | | if(Constants.POINT_GOODS_STATUS.A.name().equals(status)){ |
| | | if(p.getStock() == null || p.getStock() <= 0){ |
| | | throw new ValidationException("商品" + p.getName() + "库存为0不能上架"); |
| | | } |
| | | } |
| | | |
| | | p.setStatus(status); |
| | | p.update(SecurityUtils.getUserId()); |
| | | pointGoodsMapper.updateById(p); |
| | |
| | | record.setCover(p.getCover()); |
| | | record.setRedeemCode(UUIDGenerator.getUUID()); |
| | | record.setStatus(Constants.POINT_GOODS_RECORD_STATUS.A.name());//未使用 |
| | | record.create(SecurityUtils.getUserId()); |
| | | pointGoodsRecordMapper.insert(record); |
| | | |
| | | //更新积分汇总 |