| | |
| | | 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;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.UserRankingsMapper;
|
| | | import com.yeshi.fanli.entity.admin.InviteGetMoney;
|
| | | 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;
|
| | |
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | public int deleteBatchById(Long id) throws UserRankingsException {
|
| | | return userRankingsMapper.deleteByPrimaryKey(id);
|
| | | }
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | public int deleteBatchByPrimaryKey(List<Long> arrayID) throws UserRankingsException {
|
| | | for (Long id : arrayID) {
|
| | |
|
| | |
| | | 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();
|
| | |
| | | }
|
| | |
|
| | | @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) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | public void setStateBatch(List<Long> idList, Integer type, Integer state) throws Exception {
|
| | |
|
| | | for (Long id : idList) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | public void uploadFile(File file) throws Exception {
|
| | |
|
| | | List<UserRankings> list = new ArrayList<UserRankings>();
|
| | |
| | | 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);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | public void updateShowID(File file) throws Exception {
|
| | | List<String> listID = new ArrayList<String>();
|
| | |
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | public void batchUpNickName(File file) throws Exception {
|
| | | List<String> listID = new ArrayList<String>();
|
| | |
|