yujian
2019-08-20 df300df7832cc3d24f1b09297998e8bee8cfd126
fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralTaskRecordServiceImpl.java
@@ -131,6 +131,36 @@
   
   @Override
   @Transactional
   public Integer receiveGoldCoinALL(Long uid) throws IntegralTaskRecordException   {
      UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
      if (userInfoExtra == null)
         throw new IntegralTaskRecordException(1, "用户信息不全");
      int totalGoldCoin = integralTaskRecordMapper.countTotalGoldCoin(uid);
      if (totalGoldCoin > 0) {
         integralTaskRecordMapper.updateReceived(uid);
      }
      Integer goldCoin = userInfoExtra.getGoldCoin();
      if (goldCoin == null)
         goldCoin = 0;
      UserInfoExtra extra = new UserInfoExtra();
      extra.setId(userInfoExtra.getId());
      extra.setGoldCoin(goldCoin + totalGoldCoin);
      try {
         userInfoExtraService.saveUserInfoExtra(extra);
      } catch (UserInfoExtraException e) {
         throw new IntegralTaskRecordException(1, "用户信息不全");
      }
      return extra.getGoldCoin();
   }
   @Override
   @Transactional
   public Integer receiveGoldCoin(Long uid, Set<Long> idList) throws IntegralTaskRecordException   {
      if(idList == null || idList.size() == 0) {
         throw new IntegralTaskRecordException(1, "id为空");