data_rec_dev.bat 1.01 KB
@echo off

rem header
set header="Content-Type: application/json"
rem gateway
rem set gateway=http://test.gateway.diligrp.com:8285/ereport-start
set gateway=http://localhost:9853
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/order/seller/generateImage

rem parameter config
curl -X GET -H %header% %tool_url% >daytime.txt

set startSettleDate=2024-09-10
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%