| | |
| | | return R.fail("兑换用户id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(goods.getGoodNum())) |
| | | { |
| | | return R.fail("商品库存不足"); |
| | | } |
| | | else |
| | | { |
| | | int goodNum=Integer.valueOf(goods.getGoodNum()); |
| | | if(goodNum<=0) |
| | | { |
| | | return R.fail("商品库存不足"); |
| | | } |
| | | |
| | | goodNum--; |
| | | |
| | | VolunteerIntegralMerchantVO vo=new VolunteerIntegralMerchantVO(); |
| | | vo.setId(goods.getId()); |
| | | vo.setGoodNum(goodNum+""); |
| | | goodsService.updateById(vo); |
| | | } |
| | | |
| | | |
| | | int num1=integral-Integer.valueOf(item.getPalyIntegral()); |
| | | loginUserInfoVOR.setLoveIntegral(num1+""); |
| | | userService.putUser(loginUserInfoVOR); |