60 lines
1.9 KiB
XML
60 lines
1.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<Package>
|
|
<Function name="UPLOAD_FILE">
|
|
|
|
<DynSentence name="QRY_TOKEN">
|
|
<Sentence>
|
|
select P_VALUES TOKEN FROM CAPPARAMTER where P_KEY = 'FIL_TOKEN'
|
|
</Sentence>
|
|
<Fields>|</Fields>
|
|
</DynSentence>
|
|
<DynSentence name="QRY_TOKEN_URL">
|
|
<Sentence>
|
|
select P_VALUES URL FROM CAPPARAMTER where P_KEY = 'FIL_TOKEN_URL'
|
|
</Sentence>
|
|
<Fields>|</Fields>
|
|
</DynSentence>
|
|
|
|
<Process>
|
|
<Delete>OUT_DAT</Delete>
|
|
<Exec func="PUB:ReadRecord" error="IGNORE">
|
|
<Arg name="SqlCmd" value="QRY_TOKEN"/>
|
|
</Exec>
|
|
<If condition="~RetCod!=0">
|
|
<Exec func="PUB:CmpSetMsg">
|
|
<Arg name="MsgCd" value="CAP99999"/>
|
|
</Exec>
|
|
<Return/>
|
|
</If>
|
|
<Exec func="PUB:ReadRecord" error="IGNORE">
|
|
<Arg name="SqlCmd" value="QRY_TOKEN_URL"/>
|
|
</Exec>
|
|
<If condition="~RetCod!=0">
|
|
<Exec func="PUB:CmpSetMsg">
|
|
<Arg name="MsgCd" value="CAP99999"/>
|
|
</Exec>
|
|
<Return/>
|
|
</If>
|
|
<!--调用文件上传接口-->
|
|
<Exec func="CTG:uploadFile">
|
|
<Arg name="token" value="$TOKEN"/>
|
|
<Arg name="url" value="$URL"/>
|
|
<Arg name="filePath" value="$FILE_NAME"/>
|
|
</Exec>
|
|
<If condition="~RetCod!=0">
|
|
<Exec func="PUB:CmpSetMsg">
|
|
<Arg name="MsgCd" value="CAP99999"/>
|
|
</Exec>
|
|
<Return/>
|
|
</If>
|
|
<Set>FILE_URL=STRCAT($URL,/file/download/,$OUT_DAT.FILE_ID,?token=)</Set>
|
|
<Set>OUT_DAT.FILE_URL=$FILE_URL</Set>
|
|
<Set>OUT_DAT.TOKEN=$TOKEN</Set>
|
|
<Exec func="PUB:CmpSetMsg">
|
|
<Arg name="MsgCd" value="CAP00000"/>
|
|
</Exec>
|
|
|
|
</Process>
|
|
</Function>
|
|
</Package>
|