mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +08:00
update 批量更新订单审核
This commit is contained in:
@@ -113,6 +113,8 @@ public interface OrderBasicInfoService{
|
||||
|
||||
OrderBasicInfo saveOrderForEBike(GenerateOrderDTO dto) throws ParseException;
|
||||
|
||||
List<OrderListVO> selectOrderListByDateTime(LocalDateTime start, LocalDateTime end);
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*
|
||||
@@ -631,6 +633,8 @@ public interface OrderBasicInfoService{
|
||||
|
||||
void checkOrUpdateOrderSplitRecord(AfterSettleOrderDTO afterSettleOrderDTO);
|
||||
|
||||
int updateOrderReviewFlagTemp(List<String> codes);
|
||||
|
||||
List<StationSplitConfig> queryOrderSplitConfigList(String orderCode);
|
||||
|
||||
/**
|
||||
|
||||
@@ -55,6 +55,7 @@ import com.jsowell.pile.service.programlogic.ProgramLogicFactory;
|
||||
import com.jsowell.pile.transaction.dto.ClearingBillTransactionDTO;
|
||||
import com.jsowell.pile.transaction.dto.OrderTransactionDTO;
|
||||
import com.jsowell.pile.transaction.service.TransactionService;
|
||||
import com.jsowell.pile.util.MerchantUtils;
|
||||
import com.jsowell.pile.util.UserUtils;
|
||||
import com.jsowell.pile.vo.OrderInfoDetailVO;
|
||||
import com.jsowell.pile.vo.OrderPayRecordVO;
|
||||
@@ -989,6 +990,17 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
return orderBasicInfoMapper.selectOrderBasicInfoList(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderListVO> selectOrderListByDateTime(LocalDateTime start, LocalDateTime end) {
|
||||
QueryOrderDTO dto = QueryOrderDTO.builder()
|
||||
.startTime(DateUtils.formatDateTime(start))
|
||||
.endTime(DateUtils.formatDateTime(end))
|
||||
.payMode(OrderPayModeEnum.PAYMENT_OF_WECHATPAY.getValue())
|
||||
.orderStatus(OrderStatusEnum.ORDER_COMPLETE.getValue())
|
||||
.build();
|
||||
return orderBasicInfoMapper.selectOrderBasicInfoList(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*
|
||||
@@ -6237,6 +6249,14 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateOrderReviewFlagTemp(List<String> codes) {
|
||||
List<String> l = MerchantUtils.getRandomNinetyPercent(codes);
|
||||
UpdateOrderReviewDTO dto = new UpdateOrderReviewDTO();
|
||||
dto.setOrderCodeList(l);
|
||||
return batchUpdateOrderReview(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StationSplitConfig> queryOrderSplitConfigList(String orderCode) {
|
||||
List<StationSplitConfig> resultList = Lists.newArrayList();
|
||||
|
||||
@@ -2,6 +2,10 @@ package com.jsowell.pile.util;
|
||||
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运营商工具类
|
||||
*/
|
||||
@@ -57,4 +61,16 @@ public class MerchantUtils {
|
||||
System.out.println(getOperatorID(organizationCode));
|
||||
}
|
||||
|
||||
public static List<String> getRandomNinetyPercent(List<String> list) {
|
||||
if (list == null || list.isEmpty()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
int total = list.size();
|
||||
int removeCount = (int) Math.ceil(total * 0.1);
|
||||
int keepCount = Math.max(1, total - removeCount);
|
||||
List<String> shuffled = new ArrayList<>(list);
|
||||
Collections.shuffle(shuffled);
|
||||
return new ArrayList<>(shuffled.subList(0, keepCount));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user