| | |
| | | package com.linghu.controller; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.linghu.config.FinalStatus; |
| | | import com.linghu.listener.KeywordExcelListener; |
| | | import com.linghu.model.common.ResponseResult; |
| | |
| | | import com.linghu.model.vo.ResultListVO; |
| | | import com.linghu.service.KeywordService; |
| | | |
| | | import com.linghu.service.OrderService; |
| | | import com.linghu.service.ReferenceService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @Autowired |
| | | private ReferenceService referenceService; |
| | | |
| | | @Autowired |
| | | private OrderService orderService; |
| | | |
| | | /** |
| | | * 关键词统计 EChart图 |
| | |
| | | if(FinalStatus.SUBMITTED.getValue().equals(keyword.getStatus())){ |
| | | return ResponseResult.error("关键词已开始采集或不允许删除!"); |
| | | } |
| | | |
| | | keywordService.removeById(keywordId); |
| | | //找到订单 |
| | | Orders order = orderService.getById(keyword.getOrder_id()); |
| | | //更新关键词数量 |
| | | LambdaQueryWrapper<Keyword> queryKeywordsQueryWrapper = new LambdaQueryWrapper<>(); |
| | | queryKeywordsQueryWrapper.eq(Keyword::getOrder_id, keyword.getOrder_id()); |
| | | int count1 = (int) keywordService.count(queryKeywordsQueryWrapper); |
| | | order.setKeyword_num(count1); |
| | | orderService.updateById(order); |
| | | |
| | | return ResponseResult.success("删除成功"); |
| | | } |
| | | |