|
|
@@ -295,6 +295,7 @@ public class FsIntegralOrderServiceImpl implements IFsIntegralOrderService
|
|
|
FsUser user=fsUserMapper.selectFsUserByUserId(param.getUserId());
|
|
|
FsUserAddress address=fsUserAddressMapper.selectFsUserAddressByAddressId(param.getAddressId());
|
|
|
FsIntegralGoods integralGoods=fsIntegralGoodsMapper.selectFsIntegralGoodsByGoodsId(param.getGoodsId());
|
|
|
+
|
|
|
if (Objects.isNull(user)) {
|
|
|
return R.error("用户不存在");
|
|
|
}
|
|
|
@@ -310,6 +311,9 @@ public class FsIntegralOrderServiceImpl implements IFsIntegralOrderService
|
|
|
if(user.getIntegral()<integralGoods.getIntegral()){
|
|
|
return R.error("积分不足");
|
|
|
}
|
|
|
+ if (integralGoods.getStatus() == 0) {
|
|
|
+ return R.error("商品已经停用,请联系客户进行处理!");
|
|
|
+ }
|
|
|
|
|
|
// 减库存
|
|
|
if (fsIntegralGoodsMapper.subStock(integralGoods.getGoodsId(), 1) <= 0) {
|
|
|
@@ -816,7 +820,7 @@ public class FsIntegralOrderServiceImpl implements IFsIntegralOrderService
|
|
|
fsUserIntegralLogs.setBalance(fsUser.getIntegral());
|
|
|
fsUserIntegralLogs.setBusinessId(fsIntegralOrder.getOrderId().toString());
|
|
|
fsUserIntegralLogs.setUserId(fsIntegralOrder.getUserId());
|
|
|
- fsUserIntegralLogs.setLogType(20);
|
|
|
+ fsUserIntegralLogs.setLogType(27);
|
|
|
fsUserIntegralLogs.setIntegral(Long.parseLong(fsIntegralOrder.getIntegral()));
|
|
|
fsUserIntegralLogs.setBusinessType(2);
|
|
|
fsUserIntegralLogs.setStatus(0);
|