指定时间同步订单数据

20230922-ljl-fixBug
daixiaogang 1 year ago
parent 6a38aa8a73
commit cc77d4293a

@ -0,0 +1,16 @@
package com.ms.api.dto.order;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.springframework.util.StringUtils;
/*
*
*/
@Data
public class RsyncFullOrderRequestDTO {
private String rsyncOrderDate;
}

@ -1,111 +0,0 @@
package com.ms.api.dto.order;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.springframework.util.StringUtils;
/*
*
*/
@Data
public class SearchDsTabOrderTotalCountRequestDTO {
private Integer authShopIds;
/*
* tabwaitPurchase:,waitPay,waitSend,hasSend,refunding退,finish,close,isolation,all
*/
private String purchaseOrderTab;
/*
*
*/
private String orderStartTime;
/*
*
*/
private String orderEndTime;
/*
*
*/
private String orderIds;
/*
*
*/
private String purchaseOrderSn;
/*
* 10:
*/
private Integer onlyShowMoreThanTwoHoursOrder;
/*
*
*/
private String purchaseOrderSeller;
/*
*
*/
private String productName;
/*
* id
*/
private String productId;
/*
* [buyer:,seller,app]
*/
private String remarkType;
/*
* [remarkType]
*/
private String orderRemark;
/*
*
*/
private String fullname;
/*
*
*/
private String mobile;
/*
*
*/
private String skuSubName;
/*
*
*/
private String purchaseOrderStatus;
private String dsSourcePlatform;
/*
*
*/
private String logisticsCode;
/*
* []
*/
private String receiverInfo;
private Boolean isPriorirtyDelivery;
private String orderFilterDatePickTime;
private String hasAfterSale;
private Integer skipSearchWithEs;
private Integer delaySendStatus;
private Boolean isReceiverAddressChanged;
private Object sellerRemarkStars;
@JsonIgnore
public boolean checkParams() {
return StringUtils.isEmpty(purchaseOrderTab)
|| StringUtils.isEmpty(orderStartTime)
|| StringUtils.isEmpty(orderEndTime);
}
}

@ -5,9 +5,7 @@ import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
public class RedisKeyConst {
public static final String REDIS_TYPE_BIZ_CACHE = "bizCache";
@ -15,22 +13,22 @@ public class RedisKeyConst {
public static final String REDIS_TYPE_SOLID_CACHE = "solidCache";
public static final String REDIS_TYPE_TIMER_CACHE = "timerCache";
public static final String MOVE_PRODUCT_PUBLISH_QUEUE_SELF = "dd_move_item_publish_queue_self";
public static final String MOVE_PRODUCT_PUBLISH_QUEUE = "dd_move_item_publish_queue";
public static final String MOVE_PRODUCT_PUBLISH_QUEUE_SELF = "dd_move_item_publish_queue_self";
public static final String MOVE_PRODUCT_PUBLISH_QUEUE = "dd_move_item_publish_queue";
public static final String SHOP_DENY_REQUEST_SHOP_IDS = "dd_shop_deny_request_shop_ids";
public static final String SHOP_REQUEST_TS_MAP = "dd_shop_request_ts_map";
public static final String SHOP_REQUEST_ABNORMAL_SET = "dd_shop_request_abnormal_set";
public static final String SHOP_MOVE_PUBLISH_COUNT = "dd_shop_move_publish_count";
public static final String SHOP_MOVE_PUBLISH_COST_TIME_COUNT = "dd_shop_move_publish_cost_time_count";
public static final String SHOP_DENY_REQUEST_SHOP_IDS = "dd_shop_deny_request_shop_ids";
public static final String SHOP_REQUEST_TS_MAP = "dd_shop_request_ts_map";
public static final String SHOP_REQUEST_ABNORMAL_SET = "dd_shop_request_abnormal_set";
public static final String SHOP_MOVE_PUBLISH_COUNT = "dd_shop_move_publish_count";
public static final String SHOP_MOVE_PUBLISH_COST_TIME_COUNT = "dd_shop_move_publish_cost_time_count";
public static final String ADMIN_SELF_SHOP_INFO = "dd_admin_self_shop_info";
public static final String ADMIN_SELF_SHOP_INFO = "dd_admin_self_shop_info";
public static final String MOVE_SETTING_SEARCH_JSON_TS = "dd_move_setting_search_json_ts";
public static final String MOVE_SETTING_SEARCH_JSON_TS = "dd_move_setting_search_json_ts";
public static final String MOVE_REWRITE_CID_RULES = "dd_move_rewrite_cid_rules";
public static final String MOVE_REWRITE_CID_RULES = "dd_move_rewrite_cid_rules";
public static final String LEAF_CATE_LIST = "dd_leaf_cate_list_v2";
public static final String LEAF_CATE_LIST = "dd_leaf_cate_list_v2";
public static final String OP_ORDER_PURCHASE_OUTSTORAGE_BUFFER = "op_order_purchase_outstorage_buffer";
@ -70,18 +68,18 @@ public class RedisKeyConst {
public static final String JMONITOR_LOG = "jmonitor_log";
public static final String DB_ERROR_LOG = "db_error_log";
public static final String SHOP_ALL_ROUTE_REQ_STAT_LIST_HEAP_UP_WARNING_FLAG = "shop_all_route_req_stat_list_heap_up_warning_flag";
public static final String SHOP_ALL_ROUTE_REQ_STAT_LIST_HEAP_UP_WARNING_FLAG = "shop_all_route_req_stat_list_heap_up_warning_flag";
public static final String STOP_PULL_DY_CLOUD_DATA = "stop_pull_dy_cloud_data";
public static final String STOP_PULL_DY_CLOUD_DATA = "stop_pull_dy_cloud_data";
public static final String TIMER_MONITOR_TIMER_CODE_LOCK_KEY = "timer:monitor_timer_code";
public static final int KEY_TYPE_NOT_FOUND = 0;
public static final int KEY_TYPE_STRING = 1;
public static final int KEY_TYPE_SET = 2;
public static final int KEY_TYPE_LIST = 3;
public static final int KEY_TYPE_ZSET = 4;
public static final int KEY_TYPE_HASH = 5;
public static final int KEY_TYPE_NOT_FOUND = 0;
public static final int KEY_TYPE_STRING = 1;
public static final int KEY_TYPE_SET = 2;
public static final int KEY_TYPE_LIST = 3;
public static final int KEY_TYPE_ZSET = 4;
public static final int KEY_TYPE_HASH = 5;
public static String buildOrderRsyncCountStatMapKey() {
LocalDate currentDate = LocalDate.now();
@ -90,12 +88,20 @@ public class RedisKeyConst {
}
public static String buildPayingNewOrderStatBizKey(Date date) {
LocalDate currentDate = ObjectUtil.isEmpty(date)? LocalDate.now(): date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
LocalDate currentDate = ObjectUtil.isEmpty(date) ? LocalDate.now() : date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
return "paying_new_order_stat_" + currentDate.format(formatter);
}
public static String buildOrderStatBizKey(boolean isSelf) {
return ORDER_STAT_BIZ_KEY + (isSelf ? "_self" : "");
}
public static String getQueueRedisKey(String queueName, boolean isAdminSelf) {
if (isAdminSelf) {
return (queueName.concat("_self"));
} else {
return queueName;
}
}
}

@ -7,6 +7,7 @@ import com.ms.api.dto.order.OriginalAndCustomConsigneeInfoRequestDTO;
import com.ms.api.dto.order.OriginalAndCustomConsigneeInfoResponseDTO;
import com.ms.dal.entity.OpOrder;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -78,4 +79,6 @@ public interface OpOrderService {
* @return
*/
Boolean batchCancelIsolation(String shopId, List<String> orderIds);
Long tryRsyncOpOrder(Long shopid, String app, Integer priority, Date forceStart);
}

@ -1,6 +1,14 @@
package com.ms.api.service.impl;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@ -44,16 +52,25 @@ import com.doudian.open.api.order_searchList.OrderSearchListResponse;
import com.doudian.open.api.order_searchList.param.OrderSearchListParam;
import com.ms.api.common.ApiResult;
import com.ms.api.consts.AfterSaleConst;
import com.ms.api.consts.*;
import com.ms.api.consts.DsOrderConst;
import com.ms.api.consts.OrderChildTagConst;
import com.ms.api.consts.OrderConst;
import com.ms.api.consts.PurchaseOrderConst;
import com.ms.api.consts.RedisKeyConst;
import com.ms.api.consts.StatusConst;
import com.ms.api.dto.order.DsPurchaseSettingDTO;
import com.ms.api.dto.order.OrderMultiPackageOutstorageDTO;
import com.ms.api.dto.order.OriginalAndCustomConsigneeInfoRequestDTO;
import com.ms.api.dto.order.OriginalAndCustomConsigneeInfoResponseDTO;
import com.ms.api.service.*;
import com.ms.api.service.OpOrderDsService;
import com.ms.api.service.OpOrderExtService;
import com.ms.api.service.OpOrderSellerWordsUpdateLogService;
import com.ms.api.service.OpOrderService;
import com.ms.api.service.OrderPrintService;
import com.ms.api.service.PurchaseOrderService;
import com.ms.api.service.ShopService;
import com.ms.api.tool.CommonTool;
import com.ms.api.tool.DsOrderTool;
import com.ms.api.util.DdRequestUtil;
import com.ms.dal.entity.*;
import com.ms.dal.entity.DsAutoPurchaseOrderBuffer;
import com.ms.dal.entity.OpCouponInfo;
import com.ms.dal.entity.OpOrder;
@ -73,11 +90,13 @@ import com.ms.dal.entity.OpOrderExt;
import com.ms.dal.entity.OpOrderGivenProduct;
import com.ms.dal.entity.OpOrderPhase;
import com.ms.dal.entity.OpOrderPriceProtection;
import com.ms.dal.entity.OpOrderRsyncQueue;
import com.ms.dal.entity.OpOrderSellerWordsUpdateLog;
import com.ms.dal.entity.OpOrderSensitive;
import com.ms.dal.entity.ProductToDsItem;
import com.ms.dal.entity.PurchaseOrder;
import com.ms.dal.entity.PurchaseOrderItem;
import com.ms.dal.entity.Shop;
import com.ms.dal.mapper.DsAutoPurchaseOrderBufferMapper;
import com.ms.dal.mapper.OpCouponInfoMapper;
import com.ms.dal.mapper.OpOrderAddressHistoryEncryptIndexMapper;
@ -98,6 +117,7 @@ import com.ms.dal.mapper.OpOrderNoIndexEncryptMapper;
import com.ms.dal.mapper.OpOrderPhaseMapper;
import com.ms.dal.mapper.OpOrderPriceProtectionMapper;
import com.ms.dal.mapper.OpOrderPurchaseOutstorageQueueMapper;
import com.ms.dal.mapper.OpOrderRsyncQueueMapper;
import com.ms.dal.mapper.OpOrderSensitiveMapper;
import com.ms.dal.mapper.ProductToDsItemMapper;
import com.ms.dal.mapper.PurchaseOrderItemMapper;
@ -105,6 +125,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.data.redis.core.ListOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -138,7 +159,7 @@ public class OpOrderServiceImpl implements OpOrderService {
@Lazy
@Autowired
private OrderPrintService orderPrintService;
private OrderPrintService orderPrintService;
private final OpOrderEncryptIndexMapper opOrderEncryptIndexMapper;
@ -175,6 +196,8 @@ public class OpOrderServiceImpl implements OpOrderService {
private final OpOrderAddressHistoryEncryptMapper opOrderAddressHistoryEncryptMapper;
private final OpOrderAddressHistorySensitiveMapper opOrderAddressHistorySensitiveMapper;
private final OpOrderRsyncQueueMapper opOrderRsyncQueueMapper;
@Lazy
@Autowired
private OpOrderSellerWordsUpdateLogService opOrderSellerWordsUpdateLogService;
@ -183,7 +206,6 @@ public class OpOrderServiceImpl implements OpOrderService {
@Autowired
private ShopService shopService;
@Override
public int deleteByPrimaryKey(Long id) {
return opOrderMapper.deleteByPrimaryKey(id);
@ -1546,14 +1568,14 @@ public class OpOrderServiceImpl implements OpOrderService {
}
List<PackListItem> itemList = new ArrayList<>();
packageList.stream().forEach(e->{
packageList.stream().forEach(e -> {
PackListItem item = new PackListItem();
BeanUtil.copyProperties(e, item);
List<ShippedOrderInfoItem> infoItems = new ArrayList<>();
item.setShippedOrderInfo(infoItems);
if (CollectionUtil.isNotEmpty(e.getShippedOrderInfo())) {
e.getShippedOrderInfo().stream().forEach(it->{
e.getShippedOrderInfo().stream().forEach(it -> {
ShippedOrderInfoItem infoItem = new ShippedOrderInfoItem();
BeanUtil.copyProperties(it, infoItem);
infoItems.add(infoItem);
@ -1587,8 +1609,8 @@ public class OpOrderServiceImpl implements OpOrderService {
}
List<String> invalidStatusOrderIds = orderList.stream()
.filter(e-> (OrderConst.ORDER_STATUS_WAIT_SELLER_SEND_GOODS.equals(e.getOrderStatus())||OrderConst.ORDER_STATUS_PART_DELIVERY.equals(e.getOrderStatus())))
.map(e-> e.getOrderId()).collect(Collectors.toList());
.filter(e -> (OrderConst.ORDER_STATUS_WAIT_SELLER_SEND_GOODS.equals(e.getOrderStatus()) || OrderConst.ORDER_STATUS_PART_DELIVERY.equals(e.getOrderStatus())))
.map(e -> e.getOrderId()).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(invalidStatusOrderIds)) {
throw new RuntimeException(String.format("订单:%s 当前状态不能进行发货操作", invalidStatusOrderIds.toString()));
}
@ -1617,14 +1639,14 @@ public class OpOrderServiceImpl implements OpOrderService {
List<String> childOrderIds = new ArrayList<>();
for (OrderMultiPackageOutstorageDTO.PackageInfoDTO packageInfoDTO : packageList) {
if (CollectionUtil.isNotEmpty(packageInfoDTO.getShippedOrderInfo())) {
packageInfoDTO.getShippedOrderInfo().stream().forEach(e->{
packageInfoDTO.getShippedOrderInfo().stream().forEach(e -> {
childOrderIds.add(e.getShippedOrderId());
});
}
}
if (CollectionUtil.isNotEmpty(goingChildOrderIdList)) {
goingChildOrderIdList.stream().forEach(e->{
goingChildOrderIdList.stream().forEach(e -> {
if (!childOrderIds.contains(e)) {
childOrderIds.add(e);
}
@ -1662,6 +1684,47 @@ public class OpOrderServiceImpl implements OpOrderService {
}
return true;
}
@Override
public Long tryRsyncOpOrder(Long shopid, String app, Integer priority, Date forceStart) {
OpOrderRsyncQueue queueInfo = opOrderRsyncQueueMapper.getByShopId(shopid);
Long queueId = 0L;
if (ObjectUtil.isNull(queueInfo)) {
queueInfo = new OpOrderRsyncQueue();
queueInfo.setShopId(shopid);
queueInfo.setApp(app);
queueInfo.setGmtForceStart(forceStart);
queueInfo.setGmtModified(new Date());
queueInfo.setPriority(priority);
queueInfo.setLocked(0L);
queueInfo.setOrderTotal(0L);
queueInfo.setCompleted(0L);
queueInfo.setStatus(StatusConst.wait);
queueInfo.setGmtCreate(new Date());
opOrderRsyncQueueMapper.insert(queueInfo);
queueId = queueInfo.getOpOrderRsyncQueueId();
if (ObjectUtil.isNotNull(queueId) && queueId > 0) {
String queueRedisKey = RedisKeyConst.getQueueRedisKey("op_order_rsync_queue", true);
ListOperations<String, String> listOps = redisTemplate.opsForList();
if (priority > 99) {
listOps.leftPush(queueRedisKey, queueId.toString());
} else {
listOps.rightPush(queueRedisKey, queueId.toString());
}
return queueId;
}
}
queueInfo.setGmtModified(new Date());
queueInfo.setPriority(priority < queueInfo.getPriority() ? priority : queueInfo.getPriority());
if (ObjectUtil.isNotNull(forceStart)){
queueInfo.setGmtForceStart(forceStart);
}
opOrderRsyncQueueMapper.updateByPrimaryKey(queueInfo);
return queueInfo.getOpOrderRsyncQueueId();
}
}

@ -0,0 +1,33 @@
package com.ms.api.spi.order;
import javax.annotation.Resource;
import com.jinritemai.cloud.base.api.BaseRequest;
import com.jinritemai.cloud.base.api.BaseResponse;
import com.jinritemai.cloud.base.api.ExtensionService;
import com.jinritemai.cloud.base.api.ExtensionServiceHandler;
import com.ms.api.common.ApiResult;
import com.ms.api.common.R;
import com.ms.api.common.Ret;
import com.ms.api.dto.order.RsyncFullOrderRequestDTO;
import com.ms.api.util.OrderUtil;
import lombok.extern.slf4j.Slf4j;
@ExtensionService("rsyncFullOrder")
@Slf4j
public class RsyncFullOrderService implements ExtensionServiceHandler<RsyncFullOrderRequestDTO, Ret> {
@Resource
private OrderUtil orderUtil;
@Override
public BaseResponse<Ret> handle(BaseRequest<RsyncFullOrderRequestDTO> req) {
String shopId = req.getAuthId();
RsyncFullOrderRequestDTO dto = req.getData();
ApiResult ret = orderUtil.rsyncFullOrder(shopId, dto.getRsyncOrderDate(), true);
if (!ret.isSuccess()) {
return R.ok(Ret.fail(ret.getMsg()));
}
return R.ok(Ret.success());
}
}

@ -1,18 +1,21 @@
package com.ms.api.util;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ms.api.common.ApiResult;
import com.ms.api.service.OpOrderService;
import com.ms.api.service.OrderPrintService;
import com.ms.api.service.ShopService;
import com.ms.api.tool.CommonTool;
import com.ms.dal.entity.Shop;
import com.ms.dal.entity.OpOrderRsyncInfo;
import com.ms.dal.mapper.OpOrderRsyncInfoMapper;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@ -27,6 +30,10 @@ public class OrderUtil {
private final OpOrderService opOrderService;
private final OpOrderRsyncInfoMapper opOrderRsyncInfoMapper;
private final OrderPrintService orderPrintService;
@Transactional(rollbackFor = Exception.class)
public ApiResult rsyncOrder(String targetShopId, List<String> orderIds, String paramsRoute) {
if (ObjectUtil.isEmpty(orderIds)) {
@ -40,8 +47,8 @@ public class OrderUtil {
// }
JSONObject ret = opOrderService.rsyncOpOrderByOrderIds(targetShopId, orderIds, new HashMap<>(), false, paramsRoute);
if (ret.containsKey("orderIdAndFailReasonMap")) {
Map<String,String> orderIdAndFailReasonMap =(Map<String, String>) JSON.parseObject(ret.getString("orderIdAndFailReasonMap"), Map.class);
if (ObjectUtil.isEmpty(orderIdAndFailReasonMap)){
Map<String, String> orderIdAndFailReasonMap = (Map<String, String>) JSON.parseObject(ret.getString("orderIdAndFailReasonMap"), Map.class);
if (ObjectUtil.isEmpty(orderIdAndFailReasonMap)) {
return ApiResult.ok();
}
StringBuilder failReason = new StringBuilder();
@ -52,4 +59,26 @@ public class OrderUtil {
}
return ApiResult.ok();
}
public ApiResult rsyncFullOrder(String shopId, String rsyncOrderDate, boolean isManual) {
if (!Arrays.asList("3", "7", "15", "20", "30", "60", "90").contains(rsyncOrderDate)) {
return ApiResult.fail("参数不合法");
}
List<String> authShopIds = Arrays.asList(shopId);
Map<Long, OpOrderRsyncInfo> orderRsyncInfoMap = opOrderRsyncInfoMapper.getOpOrderRsyncInfoByShopIds(authShopIds).stream().collect(Collectors.toMap(OpOrderRsyncInfo::getShopId, x -> x));
for (String authShopId : authShopIds) {
Long shopid = Long.valueOf(authShopId);
if (!orderRsyncInfoMap.containsKey(shopid)) {
continue;
}
Date lastRsyncOrderTime = orderRsyncInfoMap.get(shopid).getGmtOpEnd();
System.out.println(System.currentTimeMillis() );
System.out.println(lastRsyncOrderTime.getTime() );
if (!isManual && ObjectUtil.isEmpty(lastRsyncOrderTime) && (System.currentTimeMillis() - lastRsyncOrderTime.getTime()) <= 300000) {
continue;
}
opOrderService.tryRsyncOpOrder(shopid,"appName",100,null);
}
return ApiResult.ok();
}
}

@ -1,7 +1,10 @@
package com.ms.dal.mapper;
import java.util.List;
import com.ms.dal.entity.OpOrderRsyncInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* @Entity com.ms.dal.entity.OpOrderRsyncInfo
@ -21,4 +24,5 @@ public interface OpOrderRsyncInfoMapper {
int updateByPrimaryKey(OpOrderRsyncInfo record);
List<OpOrderRsyncInfo> getOpOrderRsyncInfoByShopIds(@Param("shopIds") List<String> asList);
}

@ -2,6 +2,7 @@ package com.ms.dal.mapper;
import com.ms.dal.entity.OpOrderRsyncQueue;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* @Entity com.ms.dal.entity.OpOrderRsyncQueue
@ -21,4 +22,5 @@ public interface OpOrderRsyncQueueMapper {
int updateByPrimaryKey(OpOrderRsyncQueue record);
OpOrderRsyncQueue getByShopId(@Param("shopId") Long shopid);
}

@ -24,6 +24,17 @@
from op_order_rsync_info
where op_order_rsync_info_id = #{opOrderRsyncInfoId,jdbcType=BIGINT}
</select>
<select id="getOpOrderRsyncInfoByShopIds" resultType="com.ms.dal.entity.OpOrderRsyncInfo">
select *
from op_order_rsync_info
where 1=1
<if test="shopIds!=null and shopIds.size>0">
AND shop_id IN
<foreach collection="shopIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from op_order_rsync_info

@ -40,6 +40,11 @@
from op_order_rsync_queue
where op_order_rsync_queue_id = #{opOrderRsyncQueueId,jdbcType=BIGINT}
</select>
<select id="getByShopId" resultType="com.ms.dal.entity.OpOrderRsyncQueue">
select *
from op_order_rsync_queue
where shop_id = #{shopId}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from op_order_rsync_queue

@ -17,6 +17,7 @@ import com.ms.api.common.Ret;
import com.ms.api.consts.AppConst;
import com.ms.api.consts.DsOrderConst;
import com.ms.api.consts.PurchaseOrderConst;
import com.ms.api.dto.order.RsyncFullOrderRequestDTO;
import com.ms.api.dto.order.SearchDsOrderFilterDTO;
import com.ms.api.dto.order.SearchDsOrderListRequestDTO;
import com.ms.api.service.OpOrderExtService;
@ -69,6 +70,18 @@ public class OrderTestController {
return R.ok(pager);
}
@GetMapping("/rsyncFullOrder")
public BaseResponse<Ret> rsyncFullOrder() {
String shopId = AppConst.TEST_SHOP_ID;
RsyncFullOrderRequestDTO dto = new RsyncFullOrderRequestDTO();
dto.setRsyncOrderDate("7");
ApiResult ret = orderUtil.rsyncFullOrder(shopId, dto.getRsyncOrderDate(), true);
if (!ret.isSuccess()) {
return R.ok(Ret.fail(ret.getMsg()));
}
return R.ok(Ret.success());
}
@GetMapping("/getDsOrderCount")
public BaseResponse<Ret> getDsOrderCount() {
String shopId = AppConst.TEST_SHOP_ID;

Loading…
Cancel
Save