|
@@ -22,7 +22,6 @@ import com.qs.mp.common.core.page.TableDataInfo;
|
|
|
import com.qs.mp.common.enums.*;
|
|
|
import com.qs.mp.common.pulsar.PulsarClientService;
|
|
|
import com.qs.mp.common.utils.AESUtil;
|
|
|
-import com.qs.mp.common.utils.LogUtil;
|
|
|
import com.qs.mp.common.utils.RSAUtil;
|
|
|
import com.qs.mp.utils.ExcelUtil;
|
|
|
import com.qs.mp.web.controller.common.BaseApiController;
|
|
@@ -30,9 +29,6 @@ import io.swagger.annotations.*;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Comparator;
|
|
|
import java.util.List;
|
|
|
-import java.util.concurrent.CountDownLatch;
|
|
|
-import java.util.concurrent.ExecutorService;
|
|
|
-import java.util.concurrent.Executors;
|
|
|
import java.util.stream.Collectors;
|
|
|
import ma.glasnost.orika.MapperFacade;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -81,9 +77,6 @@ public class TicketBoxMgrController extends BaseApiController {
|
|
|
@Autowired
|
|
|
private ITicketBoxGoodsService ticketBoxGoodsService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private ITicketPackageService ticketPackageService;
|
|
|
-
|
|
|
@Value("${mp.exportUrl}")
|
|
|
private String exportUrl;
|
|
|
|
|
@@ -498,64 +491,10 @@ public class TicketBoxMgrController extends BaseApiController {
|
|
|
if (null == ticketBox) {
|
|
|
return AjaxResult.error("参数异常,盲票组不存在");
|
|
|
}
|
|
|
- //更新盲票列表的状态
|
|
|
-// List<Ticket> ticketList = ticketService
|
|
|
-// .list(new LambdaQueryWrapper<Ticket>().eq(Ticket::getBoxId, ticketBox.getBoxId()).eq(Ticket::getStatus,TicketStatusEnum.NOT_PAY));
|
|
|
- //更新盲票包的状态
|
|
|
-// List<TicketPackage> ticketPackageList = ticketPackageService.list(new LambdaQueryWrapper<TicketPackage>()
|
|
|
-// .eq(TicketPackage::getBoxId, ticketBox.getBoxId()));
|
|
|
if((ticketBox.getStatus() == TicketBoxStatusEnum.PUT_ON || ticketBox.getStatus() == TicketBoxStatusEnum.PUT_OFF) && ticketBox.getType() == TicketTypeEnum.OFFLINE){
|
|
|
ticketBoxService.update(new LambdaUpdateWrapper<TicketBox>()
|
|
|
.set(TicketBox::getStatus, TicketBoxStatusEnum.STOP)
|
|
|
.eq(TicketBox::getBoxId, ticketBox.getBoxId()));
|
|
|
-// if(ticketPackageList != null && ticketPackageList.size()>0){
|
|
|
-// for(TicketPackage ticketPackage : ticketPackageList){
|
|
|
-// ticketPackage.setStatus(TicketPkgStatusEnum.STOP);
|
|
|
-// ticketPackageService.saveOrUpdate(ticketPackage);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// if(ticketList == null || ticketList.size() == 0){
|
|
|
-// return AjaxResult.error("盲票不存在");
|
|
|
-// }
|
|
|
-// //创建线程
|
|
|
-// int threadNumber = 5;//线程数量
|
|
|
-// long start = System.currentTimeMillis();//开始时间
|
|
|
-// long begin = start / 1000;
|
|
|
-// LogUtil.warn(logger,"开始时间{------------------------------} S",begin);
|
|
|
-// // 线程总数的基数处理数据的条数
|
|
|
-// int threadTotalStep = ticketList.size() / threadNumber;
|
|
|
-// // 数据余数
|
|
|
-// int remainderNumber = ticketList.size() % threadNumber;
|
|
|
-// // 创建线程池,实际使用推荐用自定义线程池
|
|
|
-// ExecutorService executorService = Executors.newFixedThreadPool(threadNumber);
|
|
|
-// CountDownLatch countDownLatch = new CountDownLatch(threadNumber);
|
|
|
-
|
|
|
-// for (int i = 0; i < threadNumber; i++) {
|
|
|
-// // 计算当前线程的总数
|
|
|
-// int threadTotal = threadTotalStep;
|
|
|
-// if (remainderNumber > 0 && i == threadNumber - 1) {
|
|
|
-// threadTotal += remainderNumber;
|
|
|
-// }
|
|
|
-// executorService.execute(() -> {
|
|
|
-// for(Ticket ticket : ticketList){
|
|
|
-// try {
|
|
|
-// Thread.sleep(1);
|
|
|
-// } catch (InterruptedException e) {
|
|
|
-// e.printStackTrace();
|
|
|
-// }
|
|
|
-// ticket.setStatus(TicketStatusEnum.STOP);
|
|
|
-// ticketService.saveOrUpdate(ticket);
|
|
|
-// }
|
|
|
-// countDownLatch.countDown();
|
|
|
-// });
|
|
|
-// }
|
|
|
-// try {
|
|
|
-// countDownLatch.await();
|
|
|
-// } catch (InterruptedException e) {
|
|
|
-// e.printStackTrace();
|
|
|
-// }
|
|
|
-// long end = (System.currentTimeMillis() - start) / 1000;
|
|
|
-// LogUtil.warn(logger,"总耗时间{------------------------------} S", end);
|
|
|
}else {
|
|
|
return AjaxResult.error("当前不是已上架或者已下架的线下盲票,不能进行停售操作");
|
|
|
}
|