data_rec_test.bat
992 Bytes
@echo off
rem header
set header="Content-Type: application/json"
rem gateway
set gateway=http://test.gateway.diligrp.com:8285/ereport-start
rem url
set tool_url=%gateway%/tool/settleDateTime
set buyer_url=%gateway%/api/statistics/order/buyer/generateImage
set seller_url=%gateway%/api/statistics/order/seller/generateImage
set product_url=%gateway%/api/statistics/product/generateImage
rem parameter config
curl -X GET -H %header% %tool_url% >daytime.txt
set startSettleDate=2023-01-01
set endSettleDate=""
set /p endSettleDate=<daytime.txt
del %cd%\daytime.txt
set data="{\"startSettleDate\":\"%startSettleDate%\",\"endSettleDate\":\"%endSettleDate%\"}"
echo data recovery between %startSettleDate% and %endSettleDate%
rem run data_clean
echo "run buyer_recovery..."
curl -X POST -H %header% --data %data% %buyer_url%
echo "run seller_recovery..."
curl -X POST -H %header% --data %data% %seller_url%
echo "run product_recovery..."
curl -X POST -H %header% --data %data% %product_url%