| | |
| | | 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.service.inter.homemodule.SpecialCardService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SpecialPlaceService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SpecialService;
|
| | | import com.yeshi.fanli.util.FilePathEnum;
|
| | |
|
| | |
|
| | | @Service
|
| | |
| | | String type = contentType.substring(contentType.indexOf("/") + 1);
|
| | |
|
| | | // 文件路径
|
| | | String filePath="/img/SpecialCard/"+UUID.randomUUID().toString().replace("-", "") + "." + type;
|
| | | String filePath=FilePathEnum.specialCard.getPath() +UUID.randomUUID().toString().replace("-", "") + "." + type;
|
| | | // 执行上传
|
| | | String fileLink= COSManager.getInstance().uploadFile(inputStream, filePath).getUrl();
|
| | |
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | public int deleteBatchByPrimaryKey(List<Long> list) throws Exception{
|
| | | specialService.deleteBatchByCardID(list);
|
| | | return specialCardMapper.deleteBatchByPrimaryKey(list);
|
| | |
| | | }
|
| | |
|
| | | for (SpecialCard specialCard: listObj) {
|
| | | long totalSpecial= specialService.countlistQueryByCard(specialCard.getId(), null);
|
| | | long totalSpecial= specialService.countlistQueryByCard(specialCard.getId(), null, null);
|
| | | specialCard.setTotalSpecial(totalSpecial);
|
| | |
|
| | | Date startTime = specialCard.getStartTime();
|