Commit bb499f4a authored by 年畅's avatar 年畅 🛀

fix

parent d03da5cb
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,6 +2,7 @@ package com.zm.order.tool.server.controller; ...@@ -2,6 +2,7 @@ package com.zm.order.tool.server.controller;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.zm.order.tool.server.constants.ListConst3; import com.zm.order.tool.server.constants.ListConst3;
import com.zm.order.tool.server.constants.ListConst6;
import com.zm.order.tool.server.dao.OrderDao; import com.zm.order.tool.server.dao.OrderDao;
import com.zm.order.tool.server.model.Order; import com.zm.order.tool.server.model.Order;
import com.zm.order.tool.server.newdatasource.NewDataSourceOrderDao; import com.zm.order.tool.server.newdatasource.NewDataSourceOrderDao;
...@@ -403,6 +404,19 @@ public class OrderConvertController { ...@@ -403,6 +404,19 @@ public class OrderConvertController {
return Result.successNullData(); return Result.successNullData();
} }
@ApiOperation("单个评价数据缺失补偿")
@RequestMapping(value = "/comment/repair", method = RequestMethod.POST)
public Result commentRepair(@RequestBody Order order) {
logger.info("commentRepair start!");
try {
service.handlerEachComment(order.getOrderNo());
} catch (Exception e) {
logger.error("TemporaryController[commentRepair]failed,request:{},cause by: {}", e);
return Result.failureData(e.getMessage());
}
return Result.successNullData();
}
/** -------------- */ /** -------------- */
@ApiOperation("订单同步冷库") @ApiOperation("订单同步冷库")
......
...@@ -32,7 +32,7 @@ public interface OrderItemCommentDao { ...@@ -32,7 +32,7 @@ public interface OrderItemCommentDao {
* @return * @return
* Date: 2021/5/27 4:20 下午 * Date: 2021/5/27 4:20 下午
*/ */
List<RecommendItem> selectByUserId(@Param("orderNo") String orderNo, @Param("sellerId") Long sellerId); List<OrderItemComment> selectByUserId(@Param("orderNo") String orderNo, @Param("sellerId") Long sellerId);
/** /**
* 查询单条 * 查询单条
......
...@@ -138,6 +138,12 @@ public class TempOrderRoutingServiceImpl implements InitializingBean { ...@@ -138,6 +138,12 @@ public class TempOrderRoutingServiceImpl implements InitializingBean {
@Autowired @Autowired
private NewDataSourceOrderCommentDao newCommentDao; private NewDataSourceOrderCommentDao newCommentDao;
@Autowired
private OrderCommentDao commentDao;
@Autowired
private OrderItemCommentDao itemCommentDao;
@Autowired @Autowired
private NewDataSourceOrderItemCommentDao newItemCommentDao; private NewDataSourceOrderItemCommentDao newItemCommentDao;
...@@ -2269,6 +2275,25 @@ public class TempOrderRoutingServiceImpl implements InitializingBean { ...@@ -2269,6 +2275,25 @@ public class TempOrderRoutingServiceImpl implements InitializingBean {
@Autowired @Autowired
private HistoryDataCommentDao historyDataCommentDao; private HistoryDataCommentDao historyDataCommentDao;
public void handlerEachComment(String orderNo) {
OrderIndex index = indexDao.selectOne(orderNo);
if (index != null) {
OrderComment comment = commentDao.selectOne(index.getOrderNo(), index.getUserId());
if (comment != null) {
int db = (int) (comment.getSellerId() % 32);
int tb = (int) (comment.getSellerId() / 32 % 8);
executeComment11(Lists.newArrayList(comment), db, tb);
}
List<OrderItemComment> itemCommentList =
itemCommentDao.selectByOrderNoList(Lists.newArrayList(index.getOrderNo()), index.getUserId());
if (!CollectionUtils.isEmpty(itemCommentList)) {
int db = (int) (itemCommentList.get(0).getSellerId() % 32);
int tb = (int) (itemCommentList.get(0).getSellerId() / 32 % 8);
executeItemComment1123(itemCommentList, db, tb);
}
}
}
private void executeComment11(List<OrderComment> list, int i, int j) { private void executeComment11(List<OrderComment> list, int i, int j) {
while (workQueue.remainingCapacity() < 20) { while (workQueue.remainingCapacity() < 20) {
logger.info("workQueue size:{}", workQueue.size()); logger.info("workQueue size:{}", workQueue.size());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment