Commit 5cb44bee authored by liwei's avatar liwei

修改了留言和点赞

parent 45672db0
...@@ -835,7 +835,7 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo> ...@@ -835,7 +835,7 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
//扣除该用户的金币数量 //扣除该用户的金币数量
DictData dictData4 = userLikeConfig.stream().filter(item -> item.getDictLabel().equals("pay_count")).findFirst().orElse(null); DictData dictData4 = userLikeConfig.stream().filter(item -> item.getDictLabel().equals("pay_count")).findFirst().orElse(null);
Integer payCount = Integer.valueOf(dictData4.getDictValue()); Integer payCount = Integer.valueOf(dictData4.getDictValue());
MemInfo memInfo = memInfoRepository.selectByOpenId(likeDTO.getWxOpenid()); MemInfo memInfo = memInfoRepository.selectByUserId(userId);
if (memInfo.getGoldCoinsCount() - payCount < 0){ if (memInfo.getGoldCoinsCount() - payCount < 0){
throw new CyServiceException(1003,"金币不足,请先充值"); throw new CyServiceException(1003,"金币不足,请先充值");
} }
......
...@@ -359,7 +359,7 @@ public class MemLeaveMessageServiceImpl extends ServiceImpl<MemLeaveMessageRepos ...@@ -359,7 +359,7 @@ public class MemLeaveMessageServiceImpl extends ServiceImpl<MemLeaveMessageRepos
//扣除该用户的金币数量 //扣除该用户的金币数量
DictData dictData4 = leaveMessageConfig.stream().filter(item -> item.getDictLabel().equals("pay_count")).findFirst().orElse(null); DictData dictData4 = leaveMessageConfig.stream().filter(item -> item.getDictLabel().equals("pay_count")).findFirst().orElse(null);
Integer payCount = Integer.valueOf(dictData4.getDictValue()); Integer payCount = Integer.valueOf(dictData4.getDictValue());
MemInfo memInfo = memInfoRepository.selectByOpenId(memLeaveMessage.getWxOpenid()); MemInfo memInfo = memInfoRepository.selectByUserId(userId);
if (memInfo.getGoldCoinsCount() - payCount < 0){ if (memInfo.getGoldCoinsCount() - payCount < 0){
throw new CyServiceException(1003,"金币不足,请先充值!"); throw new CyServiceException(1003,"金币不足,请先充值!");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment