yujian
2020-05-09 7e7db2fa55a9a3af46d4fd8ede0dee147f101d64
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserRankingsServiceImpl.java
@@ -16,9 +16,9 @@
import java.util.UUID;
import javax.annotation.Resource;
import javax.transaction.Transactional;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import org.yeshi.utils.tencentcloud.COSManager;
@@ -26,9 +26,10 @@
import com.yeshi.fanli.dto.money.InviteGetMoney;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.bus.user.UserRankings;
import com.yeshi.fanli.exception.UserRankingsException;
import com.yeshi.fanli.exception.user.UserRankingsException;
import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
import com.yeshi.fanli.service.inter.user.UserRankingsService;
import com.yeshi.fanli.util.FilePathEnum;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.vo.order.HongBaoV2VO;
@@ -62,7 +63,7 @@
   }
   @Override
   @Transactional
   @Transactional(rollbackFor=Exception.class)
   public int deleteBatchById(Long id) throws UserRankingsException {
      return userRankingsMapper.deleteByPrimaryKey(id);
   }
@@ -75,7 +76,7 @@
   @Override
   @Transactional
   @Transactional(rollbackFor=Exception.class)
   public int deleteBatchByPrimaryKey(List<Long> arrayID) throws UserRankingsException {
      for (Long id : arrayID) {
@@ -134,7 +135,7 @@
      String type = contentType.substring(contentType.indexOf("/") + 1);
      // 上传文件相对位置
      String fileUrl = "userRankings/" + UUID.randomUUID().toString().replace("-", "") + "." + type;
      String fileUrl = FilePathEnum.userRankings.getPath() + UUID.randomUUID().toString().replace("-", "") + "." + type;
      InputStream inputStream = file.getInputStream();
      String uploadFilePath = COSManager.getInstance().uploadFile(inputStream, fileUrl).getUrl();
@@ -173,7 +174,7 @@
   }
   @Override
   @Transactional
   @Transactional(rollbackFor=Exception.class)
   public void setRewardtBatch(List<Long> idList, Integer type, Double reward, Double startReward, Double endReward) throws Exception {
      for (Long id : idList) {
@@ -210,7 +211,7 @@
   }
   @Override
   @Transactional
   @Transactional(rollbackFor=Exception.class)
   public void setStateBatch(List<Long> idList, Integer type, Integer state) throws Exception {
      for (Long id : idList) {
@@ -242,7 +243,7 @@
   }
   @Override
   @Transactional
   @Transactional(rollbackFor=Exception.class)
   public void uploadFile(File file) throws Exception {
      List<UserRankings> list = new ArrayList<UserRankings>();
@@ -254,7 +255,7 @@
         System.out.println("name" + name);
         String prefix = name.substring(name.lastIndexOf(".") + 1);
         // 上传文件相对位置
         String fileUrl = "userRankings/" + UUID.randomUUID().toString().replace("-", "") + "." + prefix;
         String fileUrl = FilePathEnum.userRankings.getPath() + UUID.randomUUID().toString().replace("-", "") + "." + prefix;
         System.out.println(fileUrl);
         FileInputStream is = new FileInputStream(filePic);
@@ -278,7 +279,7 @@
   }
   @Override
   @Transactional
   @Transactional(rollbackFor=Exception.class)
   public void updateShowID(File file) throws Exception {
      List<String> listID = new ArrayList<String>();
@@ -304,7 +305,7 @@
   }
   @Override
   @Transactional
   @Transactional(rollbackFor=Exception.class)
   public void batchUpNickName(File file) throws Exception {
      List<String> listID = new ArrayList<String>();