Commit 07a5b650 by 苗权威

2.17

parent fa1dfaf3
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<module name="open" options="-parameters" /> <module name="open" options="-parameters" />
<module name="rokid" options="-parameters" /> <module name="rokid" options="-parameters" />
<module name="ruoqi" options="-parameters" /> <module name="ruoqi" options="-parameters" />
<module name="spirit" options="-parameters -extdirs /usr/local/intellij/workplace/smartbox/spirit/src/main/resources/lib" /> <module name="spirit" options="-parameters -extdirs $PROJECT_DIR$/spirit/src/main/resources/lib" />
<module name="third_party_load" options="-parameters" /> <module name="third_party_load" options="-parameters" />
<module name="tts_offline" options="-parameters" /> <module name="tts_offline" options="-parameters" />
<module name="tts_service" options="-parameters" /> <module name="tts_service" options="-parameters" />
......
...@@ -10,44 +10,37 @@ ...@@ -10,44 +10,37 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="4a2f3afc-3cd8-46bb-9e78-9759246c43dc" name="Default Changelist" comment=""> <list default="true" id="4a2f3afc-3cd8-46bb-9e78-9759246c43dc" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/controller/SpiritController.java" beforeDir="false" afterPath="$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/controller/SpiritController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/spirit/SpiritAudioUpload.java" beforeDir="false" afterPath="$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/spirit/SpiritAudioUpload.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/spirit/SpiritAudioUpload.java" beforeDir="false" afterPath="$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/spirit/SpiritAudioUpload.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/spirit/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/spirit/src/main/resources/application.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/third_party_load/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/third_party_load/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTSUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTSUtils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTServiceUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTServiceUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/controller/TTSController.java" beforeDir="false" afterPath="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/controller/TTSController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTService.java" beforeDir="false" afterPath="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTService.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTService.java" beforeDir="false" afterPath="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Test.java" beforeDir="false" afterPath="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Test.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Test.java" beforeDir="false" afterPath="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Test.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/pom.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Constants.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/OkHttp3Utils.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/OkHttp3Utils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Utils.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Utils.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Utils.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Utils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/AudioGetController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/AudioGetController.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/onLunch/LunchUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/onLunch/LunchUtils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/play/PlayUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/play/PlayUtils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/recommand/RecommendUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/recommand/RecommendUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/SpiritController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/SpiritController.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/SpiritController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/SpiritController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/WebSocketLogController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/WebSocketLogController.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/WebSocketLogController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/WebSocketLogController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoAiController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoAiController.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoAiController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoAiController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoDuHomeController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoDuHomeController.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoDuHomeController.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoDuHomeController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/entity/primary/GameProjectTb.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/entity/primary/GameProjectTb.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/entity/primary/OnProductDetail.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/entity/primary/OnProductDetail.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/OverTimeDetail.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/OverTimeDetail.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/OverTimeDetail.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/OverTimeDetail.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/primary/AllOnProductInfoRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/primary/AllOnProductInfoRepository.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/UserBehaviorData.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/UserBehaviorData.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/primary/GameProjectTbRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/primary/GameProjectTbRepository.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/secondary/XiaoDuOrderTbRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/secondary/XiaoDuOrderTbRepository.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplBotService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplBotService.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplbotServiceUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplbotServiceUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/RequestTerminal.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/RequestTerminal.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/RequestTerminal.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/RequestTerminal.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/ScheduleService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/ScheduleService.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/ScheduleService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/ScheduleService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/InitialData.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/InitialData.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/InitialData.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/InitialData.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/SpiritService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/SpiritService.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/SpiritService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/SpiritService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/RequestTerminal.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/RequestTerminal.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/RequestTerminal.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/RequestTerminal.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/Utils.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/Utils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/XiaoAiConstants.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/XiaoAiConstants.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/XiaoAiConstants.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/XiaoAiConstants.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/request/innerRequest/Request.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/request/innerRequest/Request.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/XiaoAiResponse.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/XiaoAiResponse.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/toDisplay/ToDisplay.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/toDisplay/ToDisplay.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/Response.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/Response.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/actionProperty/ActionProperty.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/actionProperty/ActionProperty.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiService.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiTestService.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiTestService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/resources/application.yml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/resources/application.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/resources/templates/LoadFailed.html" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/resources/templates/LoadFailed.html" afterDir="false" /> <change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/resources/xiaodu.properties" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/resources/xiaodu.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/resources/templates/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/resources/templates/index.html" afterDir="false" />
</list> </list>
<ignored path="$PROJECT_DIR$/out/" /> <ignored path="$PROJECT_DIR$/out/" />
<ignored path="$PROJECT_DIR$/target/" /> <ignored path="$PROJECT_DIR$/target/" />
...@@ -91,35 +84,39 @@ ...@@ -91,35 +84,39 @@
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiTestService.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplBotServiceBoth.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2882"> <state relative-caret-position="566">
<caret line="173" column="9" selection-start-line="173" selection-start-column="9" selection-end-line="173" selection-end-column="9" /> <caret line="723" column="68" selection-start-line="723" selection-start-column="68" selection-end-line="723" selection-end-column="68" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#54236#54237#0" expanded="true" />
<element signature="e#54293#54294#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/SpiritService.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/onLunch/LunchUtils.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="720"> <state relative-caret-position="158">
<caret line="67" column="76" selection-start-line="67" selection-start-column="76" selection-end-line="67" selection-end-column="76" /> <caret line="33" column="38" lean-forward="true" selection-start-line="33" selection-start-column="38" selection-end-line="33" selection-end-column="38" />
<folding> <folding>
<element signature="e#1795#1796#0" expanded="true" /> <element signature="e#8250#8251#0" expanded="true" />
<element signature="e#1847#1848#0" expanded="true" /> <element signature="e#8286#8287#0" expanded="true" />
<element signature="e#8358#8359#0" expanded="true" />
<element signature="e#8414#8415#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiService.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/ScheduleServiceNew.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="327"> <state relative-caret-position="288">
<caret line="80" column="5" selection-start-line="80" selection-start-column="5" selection-end-line="80" selection-end-column="5" /> <caret line="22" column="10" selection-start-line="22" selection-start-column="10" selection-end-line="22" selection-end-column="10" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
</folding> </folding>
...@@ -128,46 +125,56 @@ ...@@ -128,46 +125,56 @@
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoAiController.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/RequestTerminal.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374"> <state relative-caret-position="598">
<caret line="52" column="39" selection-start-line="52" selection-start-column="39" selection-end-line="52" selection-end-column="39" /> <caret line="58" column="40" selection-start-line="58" selection-start-column="40" selection-end-line="58" selection-end-column="40" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/SpiritController.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplbotServiceUtil.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374"> <state relative-caret-position="258">
<caret line="44" column="46" selection-start-line="44" selection-start-column="46" selection-end-line="44" selection-end-column="46" /> <caret line="249" column="16" selection-start-line="249" selection-start-column="16" selection-end-line="249" selection-end-column="16" />
<folding>
<element signature="e#30969#30970#0" expanded="true" />
<element signature="e#30996#30997#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/toDisplay/ToDisplay.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplBotRedisService.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374"> <state relative-caret-position="578">
<caret line="20" column="27" selection-start-line="20" selection-start-column="27" selection-end-line="20" selection-end-column="27" /> <caret line="1118" column="74" lean-forward="true" selection-start-line="1118" selection-start-column="38" selection-end-line="1118" selection-end-column="74" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/ScheduleService.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/secondary/XiaoDuOrderTbRepository.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="366"> <state relative-caret-position="430">
<caret line="342" column="73" lean-forward="true" selection-start-line="342" selection-start-column="73" selection-end-line="342" selection-end-column="73" /> <caret line="31" column="9" selection-start-line="31" selection-start-column="9" selection-end-line="31" selection-end-column="9" />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Constants.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/ScheduleService.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="455"> <state relative-caret-position="258">
<caret line="177" column="78" selection-start-line="177" selection-start-column="32" selection-end-line="177" selection-end-column="78" /> <caret line="74" column="24" selection-start-line="74" selection-start-column="24" selection-end-line="74" selection-end-column="24" />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -187,36 +194,36 @@ ...@@ -187,36 +194,36 @@
</component> </component>
<component name="FindInProjectRecents"> <component name="FindInProjectRecents">
<findStrings> <findStrings>
<find>LAST_OUTTIME_RESULT</find> <find>dealNextPageIntent</find>
<find>buildLogOutResponse</find> <find>dealLastPageIntent</find>
<find>request</find> <find>channelId</find>
<find>secret</find> <find>backToBotIntro</find>
<find>zOQuywFuKjlhbTMr4dHwFA==</find> <find>dealBackIntent</find>
<find>channelId2RecommendBotAcc</find> <find>dealStartIntent</find>
<find>dealT</find> <find>OnProductDetail</find>
<find>channel2Bots</find> <find>s1</find>
<find>刚才走</find> <find>dealOpenNum</find>
<find>jiaoyouChannel2Bots</find> <find>jytId</find>
<find>request.getSession().getUser()</find> <find>dealCollectHistoryJump</find>
<find>commons-lang3</find> <find>dealJumpIntent</find>
<find>org.apache.commons</find>
<find>NUM_OR_ALPHA</find>
<find>customUserId</find>
<find>getUserId</find>
<find>LAST_AUDIO_PLAY</find>
<find>buildCancelTextResponse</find>
<find>dealWithEndRequest</find>
<find>userId</find> <find>userId</find>
<find>yQiYt_RTsMxH92Tn4QsGNdwx</find> <find>baidu-screen-jiaoyou-audio-test</find>
<find>OJPfsbbA5Qoac2XN3dKRj4Cx</find> <find>null</find>
<find>C1vISzheJtVumYBwGK0IekCtSzSeVyX6lbRIegoew28</find> <find>DplbotServiceUtil.sendOneFlowerByCharge</find>
<find>csvDic</find> <find>PlayUtils.getPlayDocument</find>
<find>EtfZNKr3Nzh8+y3u1wQ11fYq2aAY+GWGJHyqmZUDHk8=</find> <find>XIAOAI_MP3_MARK</find>
<find>buildResponseBeforeLoadout</find> <find>RequestTerminal</find>
<find>4</find> <find>DplbotServiceUtil.doesUserCollectThisBot</find>
<find>PhoneTemplate</find> <find>curTime</find>
<find>ASIDE_IMG</find> <find>userU</find>
<find>log.info</find> <find>dealCollectOrUnCollectIntent</find>
<find>jytUserId</find>
<find>onInte</find>
<find>onIn</find>
<find>requestTerminate</find>
<find>ScheduleService</find>
<find>Task</find>
<find>lunchDocument</find>
</findStrings> </findStrings>
<replaceStrings> <replaceStrings>
<replace>OPENID_CACHE</replace> <replace>OPENID_CACHE</replace>
...@@ -236,57 +243,57 @@ ...@@ -236,57 +243,57 @@
<component name="IdeDocumentHistory"> <component name="IdeDocumentHistory">
<option name="CHANGED_PATHS"> <option name="CHANGED_PATHS">
<list> <list>
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTService.java" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Constants.java" />
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/controller/TTSController.java" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/request/innerRequest/Request.java" />
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTServiceUtil.java" /> <option value="$PROJECT_DIR$/third_party_load/pom.xml" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/resources/templates/index.html" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/chatsLog/ChatLogsController.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/resources/templates/Log5.html" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/resources/templates/Log5(1).html" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/chatsLog/LoginData.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/chatsLog/LogResponse.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/resources/templates/ChatLog.html" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/chatsLog/ChatLogs.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/resources/static/layui.css" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/resources/templates/LoadFailed.html" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/resources/templates/LookLogLogin.html" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/resources/templates/ChatLogChoose.html" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/XiaoduhomeApplication.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/WebSocketLogController.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/entity/primary/OnProductDetail.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/primary/AllOnProductInfoRepository.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Utils.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/resources/application.yml" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/OverTimeDetail.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/XiaoAiConstants.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/RequestTerminal.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/OkHttp3Utils.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoDuHomeController.java" />
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Test.java" />
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTSUtils.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/RequestTerminal.java" />
<option value="$PROJECT_DIR$/xiaoduhome/pom.xml" /> <option value="$PROJECT_DIR$/xiaoduhome/pom.xml" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/Utils.java" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/config/RedisAutoConfiguration.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/toDisplay/CardParams.java" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/XiaoAiConstants.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/toDisplay/PhoneTemplate.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplBotService.java" />
<option value="$PROJECT_DIR$/spirit/src/main/resources/application.yml" /> <option value="$PROJECT_DIR$/spirit/src/main/resources/application.yml" />
<option value="$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/controller/SpiritController.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/AudioGetController.java" />
<option value="$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/spirit/SpiritAudioUpload.java" /> <option value="$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/spirit/SpiritAudioUpload.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/toDisplay/ToDisplay.java" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplBotService.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoAiController.java" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/AudioPlayService.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/primary/GameProjectTbRepository.java" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiService.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/WebSocketLogController.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/InitialData.java" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/InitialData.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/entity/primary/GameProjectTb.java" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/SpiritService.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Constants.java" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/XiaoAiResponse.java" />
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTService.java" />
<option value="$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/service/Test.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/Response.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/actionProperty/ActionProperty.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/actionProperty/AppIntentInfo.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiTestService.java" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiTestService.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/request/innerRequest/Request.java" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/resources/application.yml" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiService.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/SpiritController.java" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/SpiritController.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/SpiritService.java" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/OverTimeDetail.java" />
<option value="$PROJECT_DIR$/third_party_load/pom.xml" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/config/RedisConfig.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/XiaoDuNoScreenStore.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/SpiritRedisService.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoAiController.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoDuHomeController.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/RequestTerminal.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiServiceRedis.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplBotRedisService.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/resources/xiaodu.properties" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/UserBehaviorData.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/data/ProjectData.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/recommand/RecommendUtil.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Utils.java" />
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Test.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/ActorWithWord.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/play/PlayUtils.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/ApiChatRequest.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/ApiChatResponse.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/ApiChatResponseDialog.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/ScheduleService.java" /> <option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/ScheduleService.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/SendFlowerVO.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/secondary/XiaoDuOrderTbRepository.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/RequestTerminal.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplbotServiceUtil.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplBotServiceBoth.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/ScheduleServiceNew.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/onLunch/LunchUtils.java" />
</list> </list>
</option> </option>
</component> </component>
...@@ -304,11 +311,11 @@ ...@@ -304,11 +311,11 @@
<expand> <expand>
<path> <path>
<item name="" type="16c1761:MavenProjectsStructure$RootNode" /> <item name="" type="16c1761:MavenProjectsStructure$RootNode" />
<item name="spirit" type="9519ce18:MavenProjectsStructure$ProjectNode" /> <item name="tts_service" type="9519ce18:MavenProjectsStructure$ProjectNode" />
</path> </path>
<path> <path>
<item name="" type="16c1761:MavenProjectsStructure$RootNode" /> <item name="" type="16c1761:MavenProjectsStructure$RootNode" />
<item name="spirit" type="9519ce18:MavenProjectsStructure$ProjectNode" /> <item name="tts_service" type="9519ce18:MavenProjectsStructure$ProjectNode" />
<item name="Lifecycle" type="58874e2:MavenProjectsStructure$LifecycleNode" /> <item name="Lifecycle" type="58874e2:MavenProjectsStructure$LifecycleNode" />
</path> </path>
<path> <path>
...@@ -329,7 +336,7 @@ ...@@ -329,7 +336,7 @@
</component> </component>
<component name="ProjectFrameBounds"> <component name="ProjectFrameBounds">
<option name="x" value="437" /> <option name="x" value="437" />
<option name="y" value="78" /> <option name="y" value="50" />
<option name="width" value="1378" /> <option name="width" value="1378" />
<option name="height" value="979" /> <option name="height" value="979" />
</component> </component>
...@@ -351,25 +358,25 @@ ...@@ -351,25 +358,25 @@
<path> <path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" /> <item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" /> <item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" /> <item name="spirit" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" /> <item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" /> <item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" /> <item name="spirit" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" /> <item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" /> <item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" /> <item name="spirit" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" /> <item name="main" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" /> <item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" /> <item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" /> <item name="spirit" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" /> <item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" /> <item name="java" type="462c0819:PsiDirectoryNode" />
...@@ -377,10 +384,43 @@ ...@@ -377,10 +384,43 @@
<path> <path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" /> <item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" /> <item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" /> <item name="spirit" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" /> <item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" /> <item name="java" type="462c0819:PsiDirectoryNode" />
<item name="spirit" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="spirit" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="spirit" type="462c0819:PsiDirectoryNode" />
<item name="controller" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="spirit" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="spirit" type="462c0819:PsiDirectoryNode" />
<item name="service" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="spirit" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" /> <item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
...@@ -388,10 +428,21 @@ ...@@ -388,10 +428,21 @@
<item name="smartbox" type="462c0819:PsiDirectoryNode" /> <item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" /> <item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" /> <item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" /> </path>
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" /> <item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="controller" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" /> <item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
...@@ -401,7 +452,6 @@ ...@@ -401,7 +452,6 @@
<item name="main" type="462c0819:PsiDirectoryNode" /> <item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" /> <item name="java" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" /> <item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="repository" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" /> <item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
...@@ -411,8 +461,7 @@ ...@@ -411,8 +461,7 @@
<item name="main" type="462c0819:PsiDirectoryNode" /> <item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" /> <item name="java" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" /> <item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="repository" type="462c0819:PsiDirectoryNode" /> <item name="common" type="462c0819:PsiDirectoryNode" />
<item name="primary" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" /> <item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
...@@ -422,7 +471,8 @@ ...@@ -422,7 +471,8 @@
<item name="main" type="462c0819:PsiDirectoryNode" /> <item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" /> <item name="java" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" /> <item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="spirit" type="462c0819:PsiDirectoryNode" /> <item name="common" type="462c0819:PsiDirectoryNode" />
<item name="config" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" /> <item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
...@@ -432,7 +482,7 @@ ...@@ -432,7 +482,7 @@
<item name="main" type="462c0819:PsiDirectoryNode" /> <item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" /> <item name="java" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" /> <item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="xiaoai" type="462c0819:PsiDirectoryNode" /> <item name="controller" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" /> <item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
...@@ -442,8 +492,7 @@ ...@@ -442,8 +492,7 @@
<item name="main" type="462c0819:PsiDirectoryNode" /> <item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" /> <item name="java" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" /> <item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="xiaoai" type="462c0819:PsiDirectoryNode" /> <item name="pojo" type="462c0819:PsiDirectoryNode" />
<item name="service" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" /> <item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
...@@ -451,7 +500,9 @@ ...@@ -451,7 +500,9 @@
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" /> <item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" /> <item name="main" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" /> <item name="java" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="service" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" /> <item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
...@@ -460,7 +511,6 @@ ...@@ -460,7 +511,6 @@
<item name="src" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" /> <item name="main" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" /> <item name="resources" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" /> <item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
...@@ -470,25 +520,20 @@ ...@@ -470,25 +520,20 @@
<item name="main" type="462c0819:PsiDirectoryNode" /> <item name="main" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" /> <item name="resources" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" /> <item name="static" type="462c0819:PsiDirectoryNode" />
<item name="aligenie" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" /> <item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" /> <item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" /> <item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" /> <item name="test" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
<item name="aligenie" type="462c0819:PsiDirectoryNode" />
<item name="aliGenie-intent-sematic.jar" type="ab9368bb:PsiFileNode" />
</path> </path>
</expand> </expand>
<select /> <select />
</subPane> </subPane>
</pane> </pane>
<pane id="PackagesPane" />
<pane id="Scope" /> <pane id="Scope" />
<pane id="PackagesPane" />
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
...@@ -502,7 +547,7 @@ ...@@ -502,7 +547,7 @@
<property name="RequestMappingsPanelWidth2" value="75" /> <property name="RequestMappingsPanelWidth2" value="75" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" /> <property name="aspect.path.notification.shown" value="true" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1578490149125" /> <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1579264165919" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../game_editor/backend_rebuild" /> <property name="last_opened_file_path" value="$PROJECT_DIR$/../game_editor/backend_rebuild" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" /> <property name="nodejs_npm_path_reset_for_default_project" value="true" />
...@@ -528,11 +573,11 @@ ...@@ -528,11 +573,11 @@
<recent name="$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/po" /> <recent name="$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/po" />
</key> </key>
<key name="CopyClassDialog.RECENTS_KEY"> <key name="CopyClassDialog.RECENTS_KEY">
<recent name="ai.qiwu.com.xiaoduhome.service" />
<recent name="ai.qiwu.com.xiaoduhome.spirit" /> <recent name="ai.qiwu.com.xiaoduhome.spirit" />
<recent name="ai.qiwu.tmall.spirit.common" /> <recent name="ai.qiwu.tmall.spirit.common" />
<recent name="ai.qiwu.tmall.spirit.repository.gameditor" /> <recent name="ai.qiwu.tmall.spirit.repository.gameditor" />
<recent name="ai.qiwu.tmall.spirit.entity.gameditor" /> <recent name="ai.qiwu.tmall.spirit.entity.gameditor" />
<recent name="ai.qiwu.tmall.spirit.service" />
</key> </key>
<key name="MoveFile.RECENT_KEYS"> <key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/xiaoduhome/src/main/resources/templates" /> <recent name="$PROJECT_DIR$/xiaoduhome/src/main/resources/templates" />
...@@ -554,13 +599,13 @@ ...@@ -554,13 +599,13 @@
</list> </list>
</option> </option>
</component> </component>
<component name="RunManager" selected="Application.XiaoAiTestService"> <component name="RunManager" selected="Application.Test (1)">
<configuration name="TTSUtils" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <configuration name="DplBotRedisService" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="ai.qiwu.com.tts_service.common.TTSUtils" /> <option name="MAIN_CLASS_NAME" value="ai.qiwu.com.xiaoduhome.service.DplBotRedisService" />
<module name="tts_service" /> <module name="xiaoduhome" />
<extension name="coverage"> <extension name="coverage">
<pattern> <pattern>
<option name="PATTERN" value="ai.qiwu.com.tts_service.common.*" /> <option name="PATTERN" value="ai.qiwu.com.xiaoduhome.service.*" />
<option name="ENABLED" value="true" /> <option name="ENABLED" value="true" />
</pattern> </pattern>
</extension> </extension>
...@@ -568,8 +613,8 @@ ...@@ -568,8 +613,8 @@
<option name="Make" enabled="true" /> <option name="Make" enabled="true" />
</method> </method>
</configuration> </configuration>
<configuration name="Test" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <configuration name="TTService" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="ai.qiwu.com.tts_service.service.Test" /> <option name="MAIN_CLASS_NAME" value="ai.qiwu.com.tts_service.service.TTService" />
<module name="tts_service" /> <module name="tts_service" />
<extension name="coverage"> <extension name="coverage">
<pattern> <pattern>
...@@ -581,12 +626,12 @@ ...@@ -581,12 +626,12 @@
<option name="Make" enabled="true" /> <option name="Make" enabled="true" />
</method> </method>
</configuration> </configuration>
<configuration name="Utils" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <configuration name="Test (1)" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="ai.qiwu.com.xiaoduhome.xiaoai.common.Utils" /> <option name="MAIN_CLASS_NAME" value="ai.qiwu.com.tts_service.service.Test" />
<module name="xiaoduhome" /> <module name="tts_service" />
<extension name="coverage"> <extension name="coverage">
<pattern> <pattern>
<option name="PATTERN" value="ai.qiwu.com.xiaoduhome.xiaoai.common.*" /> <option name="PATTERN" value="ai.qiwu.com.tts_service.service.*" />
<option name="ENABLED" value="true" /> <option name="ENABLED" value="true" />
</pattern> </pattern>
</extension> </extension>
...@@ -594,12 +639,12 @@ ...@@ -594,12 +639,12 @@
<option name="Make" enabled="true" /> <option name="Make" enabled="true" />
</method> </method>
</configuration> </configuration>
<configuration name="XiaoAiService (1)" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <configuration name="Test" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="ai.qiwu.com.xiaoduhome.xiaoai.service.XiaoAiService" /> <option name="MAIN_CLASS_NAME" value="ai.qiwu.tmall.spirit.service.Test" />
<module name="xiaoduhome" /> <module name="spirit" />
<extension name="coverage"> <extension name="coverage">
<pattern> <pattern>
<option name="PATTERN" value="ai.qiwu.com.xiaoduhome.xiaoai.service.*" /> <option name="PATTERN" value="ai.qiwu.tmall.spirit.service.*" />
<option name="ENABLED" value="true" /> <option name="ENABLED" value="true" />
</pattern> </pattern>
</extension> </extension>
...@@ -607,12 +652,12 @@ ...@@ -607,12 +652,12 @@
<option name="Make" enabled="true" /> <option name="Make" enabled="true" />
</method> </method>
</configuration> </configuration>
<configuration name="XiaoAiTestService" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <configuration name="Utils (1)" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="ai.qiwu.com.xiaoduhome.xiaoai.service.XiaoAiTestService" /> <option name="MAIN_CLASS_NAME" value="ai.qiwu.com.xiaoduhome.common.Utils" />
<module name="xiaoduhome" /> <module name="xiaoduhome" />
<extension name="coverage"> <extension name="coverage">
<pattern> <pattern>
<option name="PATTERN" value="ai.qiwu.com.xiaoduhome.xiaoai.service.*" /> <option name="PATTERN" value="ai.qiwu.com.xiaoduhome.common.*" />
<option name="ENABLED" value="true" /> <option name="ENABLED" value="true" />
</pattern> </pattern>
</extension> </extension>
...@@ -929,11 +974,8 @@ ...@@ -929,11 +974,8 @@
</method> </method>
</configuration> </configuration>
<list> <list>
<item itemvalue="Application.XiaoAiService (1)" /> <item itemvalue="Application.TTService" />
<item itemvalue="Application.Utils" />
<item itemvalue="Application.Test" /> <item itemvalue="Application.Test" />
<item itemvalue="Application.TTSUtils" />
<item itemvalue="Application.XiaoAiTestService" />
<item itemvalue="ECS on Alibaba Cloud.dingdong" /> <item itemvalue="ECS on Alibaba Cloud.dingdong" />
<item itemvalue="ECS on Alibaba Cloud.xiaodu" /> <item itemvalue="ECS on Alibaba Cloud.xiaodu" />
<item itemvalue="ECS on Alibaba Cloud.rokid" /> <item itemvalue="ECS on Alibaba Cloud.rokid" />
...@@ -954,14 +996,17 @@ ...@@ -954,14 +996,17 @@
<item itemvalue="Spring Boot.XiaoduhomeApplication" /> <item itemvalue="Spring Boot.XiaoduhomeApplication" />
<item itemvalue="Spring Boot.TtsServiceApplication" /> <item itemvalue="Spring Boot.TtsServiceApplication" />
<item itemvalue="Spring Boot.TtsOfflineApplication" /> <item itemvalue="Spring Boot.TtsOfflineApplication" />
<item itemvalue="Application.DplBotRedisService" />
<item itemvalue="Application.Utils (1)" />
<item itemvalue="Application.Test (1)" />
</list> </list>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="Application.XiaoAiTestService" /> <item itemvalue="Application.Test (1)" />
<item itemvalue="Application.Utils" /> <item itemvalue="Application.Utils (1)" />
<item itemvalue="Application.XiaoAiService (1)" /> <item itemvalue="Application.DplBotRedisService" />
<item itemvalue="Application.TTSUtils" />
<item itemvalue="Application.Test" /> <item itemvalue="Application.Test" />
<item itemvalue="Application.TTService" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
...@@ -1136,6 +1181,11 @@ ...@@ -1136,6 +1181,11 @@
<workItem from="1577671390539" duration="63746000" /> <workItem from="1577671390539" duration="63746000" />
<workItem from="1577930175214" duration="71225000" /> <workItem from="1577930175214" duration="71225000" />
<workItem from="1578297701567" duration="53397000" /> <workItem from="1578297701567" duration="53397000" />
<workItem from="1578490295278" duration="91000" />
<workItem from="1578533983020" duration="27920000" />
<workItem from="1578569974425" duration="33987000" />
<workItem from="1578708050668" duration="1295000" />
<workItem from="1578881450854" duration="99516000" />
</task> </task>
<servers /> <servers />
</component> </component>
...@@ -1145,7 +1195,7 @@ ...@@ -1145,7 +1195,7 @@
</history-entry> </history-entry>
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="3631386000" /> <option name="totallyTimeSpent" value="3794195000" />
</component> </component>
<component name="TodoView"> <component name="TodoView">
<todo-panel id="selected-file"> <todo-panel id="selected-file">
...@@ -1157,7 +1207,7 @@ ...@@ -1157,7 +1207,7 @@
</todo-panel> </todo-panel>
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="437" y="78" width="1378" height="979" extended-state="0" /> <frame x="437" y="50" width="1378" height="979" extended-state="0" />
<editor active="true" /> <editor active="true" />
<layout> <layout>
<window_info id="Designer" order="0" /> <window_info id="Designer" order="0" />
...@@ -1167,11 +1217,11 @@ ...@@ -1167,11 +1217,11 @@
<window_info id="Favorites" order="4" sideWeight="0.5091352" side_tool="true" weight="0.21595185" /> <window_info id="Favorites" order="4" sideWeight="0.5091352" side_tool="true" weight="0.21595185" />
<window_info id="Alibaba Cloud Explorer" order="5" sideWeight="0.49941108" weight="0.32781956" /> <window_info id="Alibaba Cloud Explorer" order="5" sideWeight="0.49941108" weight="0.32781956" />
<window_info id="Web" order="6" sideWeight="0.5085366" side_tool="true" weight="0.18992805" /> <window_info id="Web" order="6" sideWeight="0.5085366" side_tool="true" weight="0.18992805" />
<window_info id="Structure" order="7" sideWeight="0.5134264" weight="0.19473684" /> <window_info id="Structure" order="7" sideWeight="0.5134264" weight="0.31954888" />
<window_info content_ui="combo" id="Project" order="8" sideWeight="0.4908648" weight="0.21203007" /> <window_info content_ui="combo" id="Project" order="8" sideWeight="0.4908648" weight="0.218797" />
<window_info anchor="bottom" id="Message" order="0" /> <window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" weight="0.25181597" /> <window_info anchor="bottom" id="Find" order="1" weight="0.25181597" />
<window_info anchor="bottom" id="Run" order="2" sideWeight="0.49962378" weight="0.3196126" /> <window_info anchor="bottom" id="Run" order="2" sideWeight="0.49962378" weight="0.25544795" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.39885056" /> <window_info anchor="bottom" id="Debug" order="3" weight="0.39885056" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
...@@ -1179,23 +1229,23 @@ ...@@ -1179,23 +1229,23 @@
<window_info anchor="bottom" id="Spring" order="7" weight="0.32867885" /> <window_info anchor="bottom" id="Spring" order="7" weight="0.32867885" />
<window_info anchor="bottom" id="Docker" order="8" show_stripe_button="false" /> <window_info anchor="bottom" id="Docker" order="8" show_stripe_button="false" />
<window_info anchor="bottom" id="Event Log" order="9" sideWeight="0.5003762" side_tool="true" weight="0.28450364" /> <window_info anchor="bottom" id="Event Log" order="9" sideWeight="0.5003762" side_tool="true" weight="0.28450364" />
<window_info anchor="bottom" id="Java Enterprise" order="10" /> <window_info anchor="bottom" id="Java Enterprise" order="10" weight="0.3292978" />
<window_info anchor="bottom" id="Database Changes" order="11" show_stripe_button="false" /> <window_info anchor="bottom" id="Database Changes" order="11" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" order="12" weight="0.32975295" /> <window_info anchor="bottom" id="Version Control" order="12" weight="0.32975295" />
<window_info anchor="bottom" id="Alibaba Cloud View" order="13" weight="0.32979977" /> <window_info anchor="bottom" id="Alibaba Cloud View" order="13" weight="0.32979977" />
<window_info anchor="bottom" id="Messages" order="14" weight="0.28450364" /> <window_info anchor="bottom" id="Messages" order="14" weight="0.28450364" />
<window_info anchor="bottom" id="Terminal" order="15" weight="0.5496368" /> <window_info anchor="bottom" id="Terminal" order="15" weight="0.3200483" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.24964029" /> <window_info anchor="right" id="Ant Build" order="1" weight="0.24964029" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" /> <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="right" id="Maven" order="3" weight="0.2639098" /> <window_info anchor="right" id="Maven" order="3" weight="0.35789475" />
<window_info anchor="right" id="Palette" order="4" /> <window_info anchor="right" id="Palette" order="4" />
<window_info anchor="right" id="Capture Analysis" order="5" /> <window_info anchor="right" id="Capture Analysis" order="5" />
<window_info anchor="right" id="Palette&#9;" order="6" /> <window_info anchor="right" id="Palette&#9;" order="6" />
<window_info anchor="right" id="Theme Preview" order="7" /> <window_info anchor="right" id="Theme Preview" order="7" />
<window_info anchor="right" id="Alibaba Log Console" order="8" /> <window_info anchor="right" id="Alibaba Log Console" order="8" />
<window_info anchor="right" id="Database" order="9" weight="0.32706767" /> <window_info anchor="right" id="Bean Validation" order="9" weight="0.32857144" />
<window_info anchor="right" id="Bean Validation" order="10" weight="0.328777" /> <window_info anchor="right" id="Database" order="10" weight="0.32706767" />
<window_info anchor="right" id="JSF" order="11" /> <window_info anchor="right" id="JSF" order="11" />
<window_info anchor="right" id="CDI" order="12" /> <window_info anchor="right" id="CDI" order="12" />
</layout> </layout>
...@@ -1208,396 +1258,429 @@ ...@@ -1208,396 +1258,429 @@
<option name="FILTER_TARGETS" value="false" /> <option name="FILTER_TARGETS" value="false" />
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Test.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/SpiritRedisService.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1143"> <state relative-caret-position="5262">
<caret line="290" column="65" selection-start-line="290" selection-start-column="65" selection-end-line="290" selection-end-column="65" /> <caret line="345" column="10" selection-start-line="345" selection-start-column="10" selection-end-line="345" selection-end-column="10" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/request/innerRequest/EventProperty.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/XiaoAiConstants.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="242"> <state relative-caret-position="264">
<caret line="13" column="13" selection-start-line="13" selection-start-column="13" selection-end-line="13" selection-end-column="13" /> <caret line="12" column="71" lean-forward="true" selection-start-line="12" selection-start-column="71" selection-end-line="12" selection-end-column="71" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/XiaoAiConstants.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/RequestTerminal.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="418"> <state relative-caret-position="544">
<caret line="19" lean-forward="true" selection-start-line="19" selection-end-line="19" /> <caret line="57" column="67" selection-start-line="57" selection-start-column="67" selection-end-line="57" selection-end-column="67" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/resources/templates/linPicture.html"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiServiceRedis.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="352"> <state relative-caret-position="918">
<caret line="16" column="35" selection-start-line="16" selection-start-column="35" selection-end-line="16" selection-end-column="35" /> <caret line="335" column="9" lean-forward="true" selection-start-line="335" selection-start-column="9" selection-end-line="335" selection-end-column="9" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/LoadBySMS.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/AudioGetController.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1166"> <state relative-caret-position="301">
<caret line="71" selection-start-line="71" selection-end-line="71" /> <caret line="53" column="29" selection-start-line="53" selection-start-column="29" selection-end-line="53" selection-end-column="29" />
<folding>
<element signature="e#436#471#0" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="jar://$PROJECT_DIR$/../../../../java/jdk1.8.0_211/src.zip!/java/util/Map.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/Oauth2Controller.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="266"> <state relative-caret-position="266">
<caret line="211" column="6" selection-start-line="211" selection-start-column="6" selection-end-line="211" selection-end-column="6" /> <caret line="29" column="13" selection-start-line="29" selection-start-column="13" selection-end-line="29" selection-end-column="13" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/RequestTerminal.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/UpLoadImgController.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-220"> <state relative-caret-position="103">
<caret line="33" column="18" selection-start-line="33" selection-start-column="18" selection-end-line="33" selection-end-column="18" /> <caret line="15" column="13" selection-start-line="15" selection-start-column="13" selection-end-line="15" selection-end-column="13" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/baidu/ThirdPartyService.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/WebSocketLog.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="396"> <state relative-caret-position="242">
<caret line="31" column="21" lean-forward="true" selection-start-line="31" selection-start-column="21" selection-end-line="31" selection-end-column="21" /> <caret line="23" column="13" selection-start-line="23" selection-start-column="13" selection-end-line="23" selection-end-column="13" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="jar://$PROJECT_DIR$/../../../../maven/myRepository/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar!/org/apache/commons/lang3/StringEscapeUtils.class"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/WebSocketLogController.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="176"> <state relative-caret-position="1156">
<caret line="23" column="30" selection-start-line="23" selection-start-column="13" selection-end-line="23" selection-end-column="30" /> <caret line="125" column="25" selection-start-line="125" selection-start-column="25" selection-end-line="125" selection-end-column="25" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/pom.xml"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoAiController.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="410"> <state relative-caret-position="-450">
<caret line="139" column="23" selection-start-line="139" selection-start-column="23" selection-end-line="139" selection-end-column="23" /> <caret line="82" column="59" selection-start-line="82" selection-start-column="59" selection-end-line="82" selection-end-column="59" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/OkHttp3Utils.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/resources/static/json/firstPage.json">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="610"> <state relative-caret-position="440">
<caret line="102" column="43" selection-start-line="102" selection-start-column="43" selection-end-line="102" selection-end-column="43" /> <caret line="20" column="32" lean-forward="true" selection-start-line="20" selection-start-column="32" selection-end-line="20" selection-end-column="32" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/Utils.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Constants.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="412"> <state relative-caret-position="266">
<caret line="106" column="46" lean-forward="true" selection-start-line="106" selection-start-column="46" selection-end-line="106" selection-end-column="46" /> <caret line="105" column="15" selection-start-line="105" selection-start-column="15" selection-end-line="105" selection-end-column="15" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/Response.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/secondary/XiaoDuHistoryTBRepository.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="286"> <state relative-caret-position="609">
<caret line="22" column="21" selection-start-line="22" selection-start-column="12" selection-end-line="22" selection-end-column="21" /> <caret line="36" column="26" selection-start-line="36" selection-start-column="26" selection-end-line="36" selection-end-column="26" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/toDisplay/CardParams.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/resources/application.yml">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="352"> <state relative-caret-position="191">
<caret line="16" lean-forward="true" selection-start-line="16" selection-end-line="16" /> <caret line="32" column="14" lean-forward="true" selection-start-line="32" selection-start-column="14" selection-end-line="32" selection-end-column="14" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/toDisplay/PhoneTemplate.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/data.java">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplBotService.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330"> <state relative-caret-position="490">
<caret line="15" column="26" selection-start-line="15" selection-start-column="13" selection-end-line="15" selection-end-column="26" /> <caret line="1997" column="13" lean-forward="true" selection-start-line="1997" selection-start-column="13" selection-end-line="1997" selection-end-column="13" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#8632#8705#0" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/service/SpiritService.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/InitialData.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="242"> <state relative-caret-position="-394">
<caret line="30" column="13" selection-start-line="30" selection-start-column="13" selection-end-line="30" selection-end-column="13" /> <caret line="39" column="41" selection-start-line="39" selection-start-column="41" selection-end-line="39" selection-end-column="41" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/controller/IdentifiedController.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/resources/xiaodu.properties">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198"> <state relative-caret-position="22">
<caret line="12" column="13" selection-start-line="12" selection-start-column="13" selection-end-line="12" selection-end-column="13" /> <caret line="1" column="49" lean-forward="true" selection-start-line="1" selection-start-column="49" selection-end-line="1" selection-end-column="49" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/spirit/pom.xml"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/OkHttp3Utils.java">
<provider selected="true" editor-type-id="text-editor" /> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="266">
<caret line="66" column="72" selection-start-line="66" selection-start-column="58" selection-end-line="66" selection-end-column="72" />
</state>
</provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/jdwhale/src/main/java/ai/qiwu/mqw/jdwhale/service/RequestTerminate.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/recommand/RecommandDocument.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state> <state relative-caret-position="264">
<caret line="25" column="13" selection-start-line="25" selection-start-column="13" selection-end-line="25" selection-end-column="13" /> <caret line="17" column="13" selection-start-line="17" selection-start-column="13" selection-end-line="17" selection-end-column="13" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/request/context/Context.java"> <entry file="jar://$PROJECT_DIR$/../../../../maven/myRepository/com/baidu/dueros/bot-sdk/1.2.0/bot-sdk-1.2.0.jar!/com/baidu/dueros/bot/BaseBot.class">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="242"> <state relative-caret-position="266">
<caret line="15" column="13" selection-start-line="15" selection-start-column="13" selection-end-line="15" selection-end-column="13" /> <caret line="159" column="21" selection-start-line="159" selection-start-column="21" selection-end-line="159" selection-end-column="21" />
<folding>
<element signature="e#7321#7322#0" expanded="true" />
<element signature="e#7403#7404#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/common/RequestTerminal.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/JYTUserResponse.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="367"> <state relative-caret-position="286">
<caret line="65" column="23" selection-start-line="65" selection-start-column="23" selection-end-line="65" selection-end-column="23" /> <caret line="16" column="26" lean-forward="true" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/AudioGetController.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Config.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="396"> <state relative-caret-position="510">
<caret line="53" column="29" selection-start-line="53" selection-start-column="29" selection-end-line="53" selection-end-column="29" /> <caret line="34" column="36" selection-start-line="34" selection-start-column="25" selection-end-line="34" selection-end-column="36" />
<folding>
<element signature="e#436#471#0" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/spirit/src/main/resources/application.yml"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/CollectHistoryDocument.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154"> <state relative-caret-position="330">
<caret line="7" column="40" lean-forward="true" selection-start-line="7" selection-start-column="40" selection-end-line="7" selection-end-column="40" /> <caret line="20" column="19" selection-start-line="20" selection-start-column="19" selection-end-line="20" selection-end-column="19" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/InitialData.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/entity/primary/OnProductDetail.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1012"> <state relative-caret-position="-128">
<caret line="64" column="41" lean-forward="true" selection-start-line="64" selection-start-column="41" selection-end-line="64" selection-end-column="41" /> <caret line="20" column="13" selection-start-line="20" selection-start-column="13" selection-end-line="20" selection-end-column="13" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/controller/SpiritController.java"> <entry file="jar://$PROJECT_DIR$/../../../../java/jdk1.8.0_211/src.zip!/java/util/TreeMap.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="342"> <state relative-caret-position="258">
<caret line="133" column="5" lean-forward="true" selection-start-line="133" selection-start-column="5" selection-end-line="133" selection-end-column="5" /> <caret line="1251" column="8" selection-start-line="1251" selection-start-column="8" selection-end-line="1251" selection-end-column="8" />
<folding> <folding>
<element signature="e#4573#4574#0" expanded="true" /> <element signature="e#44320#44321#0" expanded="true" />
<element signature="e#4637#4638#0" expanded="true" /> <element signature="e#44356#44357#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/entity/secondary/XiaoDuHistoryTB.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Utils.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="266"> <state relative-caret-position="446">
<caret line="22" column="13" selection-start-line="22" selection-start-column="13" selection-end-line="22" selection-end-column="13" /> <caret line="264" column="13" lean-forward="true" selection-start-line="264" selection-start-column="13" selection-end-line="264" selection-end-column="13" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/entity/primary/GameProjectTb.java"> <entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Test.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="356"> <state relative-caret-position="408">
<caret line="38" lean-forward="true" selection-start-line="38" selection-end-line="38" /> <caret line="331" column="46" lean-forward="true" selection-start-line="331" selection-start-column="46" selection-end-line="331" selection-end-column="46" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoDuHomeController.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoDuHomeController.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="110"> <state relative-caret-position="-1066">
<caret line="71" column="47" selection-start-line="71" selection-start-column="47" selection-end-line="71" selection-end-column="47" /> <caret line="122" column="61" selection-start-line="122" selection-start-column="61" selection-end-line="122" selection-end-column="61" />
<folding>
<element signature="e#1688#1715#0" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplBotService.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/recommand/RecommendUtil.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="632"> <state relative-caret-position="258">
<caret line="452" column="66" selection-start-line="452" selection-start-column="57" selection-end-line="452" selection-end-column="66" /> <caret line="182" column="36" selection-start-line="182" selection-start-column="36" selection-end-line="182" selection-end-column="36" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTService.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/ActorWithWord.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3064"> <state relative-caret-position="286">
<caret line="998" column="56" selection-start-line="998" selection-start-column="56" selection-end-line="998" selection-end-column="56" /> <caret line="13" column="26" selection-start-line="13" selection-start-column="13" selection-end-line="13" selection-end-column="26" />
<folding> <folding>
<element signature="e#44768#44852#0" /> <element signature="imports" expanded="true" />
<element signature="e#45768#45882#0" />
<element signature="e#63557#63627#0" />
<element signature="e#71471#71480#0" />
<element signature="e#90875#90909#0" />
<element signature="e#101950#102035#0" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/spirit/src/main/java/ai/qiwu/tmall/spirit/spirit/SpiritAudioUpload.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/data/ProjectData.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1348"> <state relative-caret-position="506">
<caret line="61" column="48" selection-start-line="61" selection-start-column="48" selection-end-line="61" selection-end-column="48" /> <caret line="23" column="33" selection-start-line="23" selection-start-column="33" selection-end-line="23" selection-end-column="33" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/primary/GameProjectTbRepository.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/play/PlayUtils.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="572"> <state relative-caret-position="288">
<caret line="32" column="17" selection-start-line="32" selection-start-column="17" selection-end-line="32" selection-end-column="17" /> <caret line="31" column="56" selection-start-line="31" selection-start-column="56" selection-end-line="31" selection-end-column="56" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Constants.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/QiWuRequest.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="455"> <state relative-caret-position="242">
<caret line="177" column="78" selection-start-line="177" selection-start-column="32" selection-end-line="177" selection-end-column="78" /> <caret line="13" column="13" selection-start-line="13" selection-start-column="13" selection-end-line="13" selection-end-column="13" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiTestService.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/ApiChatRequest.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2882"> <state relative-caret-position="352">
<caret line="173" column="9" selection-start-line="173" selection-start-column="9" selection-end-line="173" selection-end-column="9" /> <caret line="16" column="37" lean-forward="true" selection-start-line="16" selection-start-column="37" selection-end-line="16" selection-end-column="37" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/response/innerResponse/toDisplay/ToDisplay.java"> <entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTService.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374"> <state relative-caret-position="784">
<caret line="20" column="27" selection-start-line="20" selection-start-column="27" selection-end-line="20" selection-end-column="27" /> <caret line="2179" column="45" lean-forward="true" selection-start-line="2179" selection-start-column="45" selection-end-line="2179" selection-end-column="45" />
<folding>
<element signature="e#44768#44852#0" />
<element signature="e#45768#45882#0" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/request/innerRequest/Request.java"> <entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/ApiAudioData.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="286"> <state relative-caret-position="308">
<caret line="16" column="19" selection-start-line="16" selection-start-column="19" selection-end-line="16" selection-end-column="19" /> <caret line="19" column="21" lean-forward="true" selection-start-line="19" selection-start-column="21" selection-end-line="19" selection-end-column="21" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/model/request/XiaoAiRequest.java"> <entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/Dialog.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374"> <state relative-caret-position="462">
<caret line="23" column="16" selection-start-line="23" selection-start-column="16" selection-end-line="23" selection-end-column="16" /> <caret line="23" lean-forward="true" selection-start-line="23" selection-end-line="23" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/xiaoai/service/XiaoAiService.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/ApiChatResponseDialog.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="327"> <state relative-caret-position="374">
<caret line="80" column="5" selection-start-line="80" selection-start-column="5" selection-end-line="80" selection-end-column="5" /> <caret line="17" column="11" selection-start-line="17" selection-start-column="11" selection-end-line="17" selection-end-column="11" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/XiaoAiController.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/ApiChatResponse.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
<caret line="52" column="39" selection-start-line="52" selection-start-column="39" selection-end-line="52" selection-end-column="39" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/spirit/SpiritService.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="720"> <state relative-caret-position="418">
<caret line="67" column="76" selection-start-line="67" selection-start-column="76" selection-end-line="67" selection-end-column="76" /> <caret line="19" column="11" selection-start-line="19" selection-start-column="11" selection-end-line="19" selection-end-column="11" />
<folding> <folding>
<element signature="e#1795#1796#0" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#1847#1848#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="jar://$PROJECT_DIR$/xiaoduhome/src/main/resources/static/aligenie/aliGenie-intent-sematic.jar!/com/alibaba/da/coin/ide/spi/meta/ConversationRecord.class"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/UserBehaviorData.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="132"> <state relative-caret-position="484">
<caret line="9" column="13" selection-start-line="9" selection-start-column="13" selection-end-line="9" selection-end-column="13" /> <caret line="28" column="1" lean-forward="true" selection-start-line="28" selection-start-column="1" selection-end-line="28" selection-end-column="1" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="jar://$PROJECT_DIR$/xiaoduhome/src/main/resources/static/aligenie/aliGenie-intent-sematic.jar!/com/alibaba/da/coin/ide/spi/meta/SessionEntry.class"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/ScheduleService.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="88"> <state relative-caret-position="258">
<caret line="7" column="13" selection-start-line="7" selection-start-column="13" selection-end-line="7" selection-end-column="13" /> <caret line="74" column="24" selection-start-line="74" selection-start-column="24" selection-end-line="74" selection-end-column="24" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="jar://$PROJECT_DIR$/xiaoduhome/src/main/resources/static/aligenie/aliGenie-intent-sematic.jar!/com/alibaba/da/coin/ide/spi/standard/TaskQuery.class"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/entity/secondary/XiaoDuOrderTB.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="352"> <state relative-caret-position="-40">
<caret line="24" column="49" lean-forward="true" selection-start-line="24" selection-start-column="49" selection-end-line="24" selection-end-column="49" /> <caret line="21" column="13" selection-start-line="21" selection-start-column="13" selection-end-line="21" selection-end-column="13" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/third_party_load/pom.xml"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/SendFlowerVO.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="672"> <state relative-caret-position="132">
<caret line="90" column="96" selection-start-line="90" selection-start-column="96" selection-end-line="90" selection-end-column="96" /> <caret line="6" column="3" lean-forward="true" selection-start-line="6" selection-start-column="3" selection-end-line="6" selection-end-column="3" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="jar://$PROJECT_DIR$/third_party_load/src/main/resources/static/aliGenie-intent-sematic.jar!/com/alibaba/da/coin/ide/spi/standard/TaskResult.class"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/secondary/XiaoDuOrderTbRepository.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="132"> <state relative-caret-position="430">
<caret line="17" column="13" selection-start-line="17" selection-start-column="13" selection-end-line="17" selection-end-column="13" /> <caret line="31" column="9" selection-start-line="31" selection-start-column="9" selection-end-line="31" selection-end-column="9" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="jar://$PROJECT_DIR$/third_party_load/src/main/resources/static/aliGenie-intent-sematic.jar!/com/alibaba/da/coin/ide/spi/standard/TaskQuery.class"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/RequestTerminal.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="264"> <state relative-caret-position="598">
<caret line="20" column="20" selection-start-line="20" selection-start-column="20" selection-end-line="20" selection-end-column="20" /> <caret line="58" column="40" selection-start-line="58" selection-start-column="40" selection-end-line="58" selection-end-column="40" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="jar://$PROJECT_DIR$/xiaoduhome/src/main/resources/static/aligenie/aliGenie-intent-sematic.jar!/com/alibaba/da/coin/ide/spi/trans/MetaFormat.class"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplbotServiceUtil.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="286"> <state relative-caret-position="258">
<caret line="19" column="84" lean-forward="true" selection-start-line="19" selection-start-column="84" selection-end-line="19" selection-end-column="84" /> <caret line="249" column="16" selection-start-line="249" selection-start-column="16" selection-end-line="249" selection-end-column="16" />
<folding>
<element signature="e#30969#30970#0" expanded="true" />
<element signature="e#30996#30997#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/SpiritController.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplBotRedisService.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374"> <state relative-caret-position="578">
<caret line="44" column="46" selection-start-line="44" selection-start-column="46" selection-end-line="44" selection-end-column="46" /> <caret line="1118" column="74" lean-forward="true" selection-start-line="1118" selection-start-column="38" selection-end-line="1118" selection-end-column="74" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/playAside/AsideImage.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplBotServiceBoth.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="242"> <state relative-caret-position="566">
<caret line="15" column="13" selection-start-line="15" selection-start-column="13" selection-end-line="15" selection-end-column="13" /> <caret line="723" column="68" selection-start-line="723" selection-start-column="68" selection-end-line="723" selection-end-column="68" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#54236#54237#0" expanded="true" />
<element signature="e#54293#54294#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/playAside/AsideImageResponse.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/ScheduleServiceNew.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="308"> <state relative-caret-position="288">
<caret line="16" column="17" lean-forward="true" selection-start-line="16" selection-start-column="17" selection-end-line="16" selection-end-column="17" /> <caret line="22" column="10" selection-start-line="22" selection-start-column="10" selection-end-line="22" selection-end-column="10" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/ScheduleService.java"> <entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/onLunch/LunchUtils.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="366"> <state relative-caret-position="158">
<caret line="342" column="73" lean-forward="true" selection-start-line="342" selection-start-column="73" selection-end-line="342" selection-end-column="73" /> <caret line="33" column="38" lean-forward="true" selection-start-line="33" selection-start-column="38" selection-end-line="33" selection-end-column="38" />
<folding>
<element signature="e#8250#8251#0" expanded="true" />
<element signature="e#8286#8287#0" expanded="true" />
<element signature="e#8358#8359#0" expanded="true" />
<element signature="e#8414#8415#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
......
package ai.qiwu.tmall.spirit.service;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
/**
* @author 苗权威
* @dateTime 20-1-10 下午1:29
*/
public class Test {
private static void testTts(String path) throws IOException {
List<String> lines = Files.readAllLines(Paths.get(path));
List<String> postList = new ArrayList<>();
List<String> getDuList = new ArrayList<>();
List<String> getAiList = new ArrayList<>();
// lines.forEach(s -> {
// String time = s.substring(s.indexOf("bytes")+6, s.indexOf(" ms"));
// if (!s.contains("444920673") && Integer.parseInt(time) > 1000) {
// System.out.println(s);
// }
// });
String s;
for (int i = 0; i < lines.size(); i++) {
s = lines.get(i);
if (s.contains("POST /api/audio")) {
for (int j=i+1; j < lines.size(); j++) {
s = lines.get(j);
if (lines.get(j).contains("GET /api/audio/get")) {
break;
} else if (s.contains("POST /api/audio")) {
getDuList.add(s);
break;
}
}
}
}
getDuList.forEach(System.out::println);
// System.out.println(postList.size());
// System.out.println("du:"+getDuList.size());
// System.out.println("ai:"+getAiList.size());
}
public static void main(String[] args) throws IOException {
testTts("/home/yf01/下载/SpiritAudioCsv/ttsLog/access_log.2020-01-05.log");
}
}
...@@ -50,9 +50,9 @@ public class SpiritAudioUpload { ...@@ -50,9 +50,9 @@ public class SpiritAudioUpload {
@Value("${csvDicForBotChange}") @Value("${csvDicForBotChange}")
private String csvDicForBotChange; private String csvDicForBotChange;
private volatile String cookie = "cna=qsWIFY5RHlMCAXeJN3DsHj3O; isg=BISEdD_3hmKO7DG5UmXTs1qBVgu2NamassKvzp4kp88kySaTxK3xlqOrCaG0SuBf; CNZZDATA1261708326=1797143004-1560414985-%7C1578471815; _cnzz_CV1261708326=52463%7C%F0%9F%8C%8E%20skill-audio%2F%E9%9F%B3%E9%A2%91%E5%88%97%E8%A1%A8%E4%BF%A1%E6%81%AF%7Cp; enc=GlWCH0jde0teESrXYo%2BHF75NARTOPv7uKzyscUHesjr8NqyYTkHf%2BD6PG2iP4gPoGIsaO8aq%2BG41Q6kPPhYpvw%3D%3D; UM_distinctid=16ef9e5d343206-06ea6f889716618-76256753-1fa400-16ef9e5d344241; uc1=pas=0&cookie21=UtASsssme%2BBq&tag=8&cookie14=UoTbmEnmIFxXUw%3D%3D&existShop=false&cookie15=Vq8l%2BKCLz3%2F65A%3D%3D&lng=zh_CN&cookie16=VFC%2FuZ9az08KUQ56dCrZDlbNdA%3D%3D; t=925ffaa4a0ded6c2dc567c2eedd425f0; _tb_token_=3a3eeb3e68337; cookie2=145c78f447bf6a4cafb894c15072214f; dnk=tb13503054; tracknick=tb13503054; _l_g_=Ug%3D%3D; unb=1038446007; cookie1=UNMubI1eQ0gVOzLdxFCJj7hzIKFouglcA%2BlE1IYgcZQ%3D; login=true; cookie17=UoH8Vd06g9TEfA%3D%3D; _nk_=tb13503054; sg=47f; csg=f8c7b18a; ctoken=xWUW4TnhPzTyPnCGVcBbhyoc; EGG_SESS=OG910qv3Q3gsrSK4yqRmX3-1-P_ARlUIzlqweqLqnRF5dKELPTe4hiVT80Slz3WPDCsXS99IeB9EJ08mKe1fnB-ky5BqlihGxghSrDaTuitC4LiUArU9fvgELyGofw_TmBaNcyEfrWqC-x_N6rsy8fAw2Pnp69phx2I3tEHsYh8UPT0miVV8Iz9v1Gp1EBu-x7IkCs02BFaNjygAZj4yG5Q0XFHJIVNHemQrHeuxJonSTlJkY2dqCYo_wOLIM5KLVZFHGxoxDIPcuXi37C_MOfK9Sac-zJndlvITiVSRplldFUDbSnyGTHbkxO76r76v-8Pr05wfiN1zzWuCXeZ-ATYX0IDdKpdESz--8JEeGAA-CKkMaOU0K7eXljgXRjsiDcx7bszIDb68PlwlPJV_Ehu3_D2KxVdU_wzX2bzcl-wNpjjmLFUzhoA8YzGs_JsJ2t6rSnRnegg7T0ge7PayU5pvqzfy3hUlevZmqDjZsg2hhW0kAbxkakAlZo7pCAZ-eRFZP_B2VO1qF5N95H2FSGa6CZnH9Rqe1uvQH63cnoppDsHsTis8SMxgvkYBurwjdwjbCqu_DeDR5N_XCsTFRf5Q1Idgcn38mMvfA1PT1Nk2Ye9iWTshl4PD9e3kWc2o3RTKdJNlFkjGb1AUObOobAv1XUXhX0Lx4Ypm6JQIN-2LKqOO4yoqPThj2nfiL6-FVqgNOK0IAHr0EYZS-QXMIBPP5sTUOjOjPPPHc3hJWu0yytS19l7OrV6r5UPVflEJ6_nK_1la9e6AJuDlxI_-mx_qjLXU4cEGYWTF56qcmzXyIRWh0d-rud90Ags2e17C6bzH4ijeY3vQTR9Jezzz_CjiDaT43KLQ_71bHgRYF3DL0xn-HR6QzD0HFtIUHpW_dkeC4l7Lev5zvnXeGKEUE4H-aemCRcmnTW5Rso4-_m2uW6RfUEQ0RlfpFzixKujRu9qZkWDgDTCtEEmSErJ561-mO6PDKLgTifklbRkWLc0oNBuqO0gFdkb58O8lSNum8dwGslDo-eRzKrdB-D8B1-TISMLZm1tL2Aecn9MlXkZUPc62doJjHugczHRbNONrqKkcb0d-HVmOscGgnvl9unbt-fD0wm7225k0ZJ65jESe1LipeVth8W_6hQr2IFktNRqjrN_J8IEgY7NyTauVMDRfhlK1kJ75IPWfqomMQyi30wr2R0_k8rDunfbqf726gZTdKZ109dIsXcxpWsj4v9LGolfXDQQTEFURIXI-lsn1DFkz_LL51K5R9FAIAX00-c5weol75Jgdp1auJfGYuxMlApg8QpbyxL2jReOorI5ioYN76VpQ7RRvHxO1ZMRjNvYUjdHygMcvIqeNArccASaH4Qt5RQ1jrNUFcJ84KPd709GBLt8kxgtEttev9YFHdL3YwLeEJo70Q03BXA7acYQtSQ6iUMoVrR8chjwUJ10zpzcY8QucfrA6p4DdbotQq_n2dFQlWeGGVQUZc11Qr39fekHEc68vjl9TlqSOTqjgASSzg67U6vi3s6LbS1AYMATWzTd0AC281UkjEIkmsLbdinnBtddW5bHZhGeLF01AkvwtUW9oebboJY-4onsMwNivqv6Al7QaWehDeG7kdzWLrU-g9s-ZKa3bwhuMC3VOpgC1y5Vepe9xQilNube431z6JGGW484fbkPcqHG2lrg9uPW-faND328H16PwsihwptEE14JlvxPGLDAZnldYh3RBfhJ2JBR8uhyw7ll7qjAIEud0oOA9EXQg6ppi-KeA0Jvuu5g8a_DbWrg06oV_ZZEl9BUtA_3oCD6rV4Y8PeQqPgiv9cAAUz5c2d40Mmb4GOlJnFzmXxGMa9wZ7X6exvktUmqOrxU7dHEsiFS8XHPIAtBhV7naaoIHLGVxZXHv5Wgy0wPkZMRBJa1l4ipqptNfdz6wGD_M3Nf8feP0UrBOau7VQtqc01R4eXmScY9xoBubyfajp9xkMqJsptAUbE7wZuYNRGq8CwWw8zaDRSpSf3EKEh-THO5tESoXc12mIUn5wBT8kUtE2O828HMeGcJ3PI89QRNcYQeaTmikpzqQf0MiNIaJjsD1PdPC9pVjPQ-9HXWQLylSmgAEHvcqe-s1pCk-g03koACUqKUBnCxIjBaI_By_kMkg1-kuM7TVHTLXzaWGR0cWC6RifnJPC4TBDc7KX-QUsg9GzvDibKY-ZiKULXYQCZTr_p0nKpDqSDZTuEzD14S9m9zMxJXBYI4De-FwMlWjePQkyOME4omwfDrovY33_Hbch8-aOTleVR5BfsOyVhEUdN3Dqs5ARG6AQznfH-pmHLvERYC3-Q==; accountType=TB; accountId=52463; token=+yKlBN44OA/SyckKeOJUlJVzFRetm5fqY9FVaEzSRPE=; confirmProtocolVersion=1"; private volatile String cookie = "cna=qsWIFY5RHlMCAXeJN3DsHj3O; isg=BNvaVmpjAXQDU34UoTi0hnnkaTaFGO4vMccg480nj1B7rE6P6IAnA6zqRsyHl0eq; CNZZDATA1261708326=1797143004-1560414985-%7C1578545339; _cnzz_CV1261708326=52463%7C%F0%9F%8C%8E%20skill%2F%E6%9F%A5%E8%AF%A2%E6%8A%80%E8%83%BD%7C0; enc=GlWCH0jde0teESrXYo%2BHF75NARTOPv7uKzyscUHesjr8NqyYTkHf%2BD6PG2iP4gPoGIsaO8aq%2BG41Q6kPPhYpvw%3D%3D; UM_distinctid=16ef9e5d343206-06ea6f889716618-76256753-1fa400-16ef9e5d344241; EGG_SESS=IdVWNkN2sAOQi1tLSNGnFK5nME5CTP2gTPH6kr89V-k6w6DhWzXgemwSZ-CtWPAe1Stlw2LZewllSuXxWuMyHGx_BNyTHR0DuqWpWr_t58VOdEaFO1qmpqmMOT0CSjxA5Rabb7w5lcyTHTy3w39hDbFqVW8sPjLq4KBzMvs1LcRawoGhgCaPLZ54bK7jJ41CgCLMRjekHPTq9HtHxzo2CEsmlBjYzt016HULppaaulo4FCE5d5IUGtVTmUeN3ufsxLeWrHSQFGz-s_XVflwSrlgtdjI3pKHw_fgunw-4bt8uFk8cG5dWYGacE6xkfq_KavlI2Ar_T61bhkdmvMFQhFRoqe_Qp8loplzIND3_jeoBHjQ25nmlzlYfsBHHIyOhbvwdPymLCcpmFkX2JpT5ovEHqUKV-lU45C93xsDPOY-9s2UrGPMRTAmGY84Kol57qfCNOXUl2wnfirzBKGeJEJo2o-v2T6qyeIFCc4WQqxOGKVYv30TvKQseKeLHFW0q31G-HzDYBoHAelres1yneHO_RLh61tsaYRvTAL4baQ2W5wKF2oxMf6pPtrP1gfmgCYdaW-Sf5WX3oAOTit-HBEGSS0tmQNX50yJprlGExPAPEMR2mzkyWaQhIIrcfXz4Cl8LgJasQZ12EbqbqxZA1x_G1_Bz7spmbOOAP6G97G_o2jQDNCh2_AtrIwFVA77nFIXPBru9FEjdGxyBk0xLqmsF5UClGg9ihLzZGEf8gF_-5BaRKhRXa0TPsYjLYkgUZVy9IHDmQLiMt7aSjZNtVdNJCbP8l5TNQ9wuKoslyb7sL--Jty-GiRWwQZEeqvMWois_KEqfsd3rLVrOUWDFeIPL_6hmvDxwYZgqOFWHjSeYc0bjntQRDpzG3oxMNBkHIM-rcy0eg1UiA1DvomfHYnyayFjqIXMxcOeH7v6l7_EGv9NKlUuHgvOjxwhl8MDfLWJ5jtEpjua6Idg8JH1FCth2icJTmwT9CfWWKWOYTYcwGKJuUiSA6T-Y2J-OHa4wmZwDU3bTggZDrSX_dmCFXbm_gxk2-FhunFJmZ9eWIl4_2YmPuAn7TKi8JBNxap5QGdpNF_XKN-78hyJR92_daoIv0IagZbvfdU1zGeNxpZeeudnraum8pNUXWtUWZlzuKs8OpjvY8JUuoK0Dx_mbZCQmY3-77ltZa5Z4PigPWMGMkYlGr1lusivSDqEW3fonRH5q79xvVIV2D61khPR2halgopkf87LBnnw53ym5i0Ne0q7oEbDzjgbsOliWWv6BUaCd6rg4lF3xWSM0vzvlAgu_R9cDy26h5t9ppxChHtzqw3sn-lFiOuuzgXwMh-uka3oLpvdgCHb2pXHBu-cU9ezQsSz5VA2jvDqbVHGpOFdK9YBoUNhNro4bwszvK_zWgPJiTTi1jx5VqQFWI61aIZnVrZUSVoq0kOuRK79-jTzOcsCqVY1gHCHPEvAw16BKQ584CW1QSFN52_ZsLlrP-SkkrjUJ7GZOMn_um9kbc-a68PKpBDVROG2rXvx8j5p66qY4vIFS9ayQJOeSQyHriQchweqHGeUEs4ngLcBdpeFk8JuAi-xJLUII3Rmt88vKax4SaZOg-9XKkvtef5jRE16NOPUXCiLD_0r9-Lbo0yKVSX3Wjim2gJXWvahilTtV8hBCw7VlQpbiwvAygEsrSFL9-B6dq-FS5cHbTqOZqTThxGdCRrAdMMVzPsfxR7UmSA8ykHRfmHgj3R6Xc1RyloPWr2JMKd9cf6wA03BV_XlpmfdoPzW8OH-cg0pcznY1dGmvkELbEI3RQk-2vDWhIBtcK6TR16wBTn955ZfI0tetTFMh9nD1i1E8qyDGqWJvC7WpikhlekHS3E_40Cvo-d5Kvs4oqrWLqWat-MNE61F-PCC7SDOiflXuf4agWpEWIeHwxaithtv0_32QWCzMGM_8lyGvRdazKMW_H4q7KiT0jtgTB4Tptjjtzs-DUeDXnuoVVNgIZ6evNQGi3QHGZgL3Okbhjn41elMxuu2COG3TgGfj-RfRc6Qlmj_da_Nzk54AkGkhCl_dS2XpmqCGdIrZg1PHjFaPvd_jktehC2kjN9IPdTt_9_BemwXUAJr2jRgcQKwMect1YMfehwG81w6Y3aLs4qXaPJXoEq8Tm03wuZ-uZBE6iGjNuIxe_gboReXulcdvWnxf-b7CoWpUgJBcO-h9bX3y6BS2RLVsPe-BJ0PLF1speq4GJlOYmkzjqt0caUtw83Bd5nXb-AP0jaEBxsdB0N0Nh23tFkjSGKbsCSS6WUOQ5jFDow9o7dld7NG-4g0UTU8fqiW5gjZ80gi8Vgh7kABVkypdeszxFUFdh06YsMe9pEJH8Su_vl4Rq6HL3ztMYA73Cq7SSh047A==; accountType=TB; confirmProtocolVersion=1; ctoken=hIPnBFZTxO70xYEKMWiVP5pJ; hng=CN%7Czh-CN%7CCNY%7C156; t=925ffaa4a0ded6c2dc567c2eedd425f0; tracknick=%5Cu9F50%5Cu609F%5Cu667A%5Cu80FD%5Cu8BED%5Cu97F3; lid=%E9%BD%90%E6%82%9F%E6%99%BA%E8%83%BD%E8%AF%AD%E9%9F%B3; _tb_token_=eebee77e7787e; cookie2=1bc42d8261746e9bfec4fbfb79e712fd; dnk=%5Cu9F50%5Cu609F%5Cu667A%5Cu80FD%5Cu8BED%5Cu97F3; uc1=lng=zh_CN&cookie16=VFC%2FuZ9az08KUQ56dCrZDlbNdA%3D%3D&pas=0&cookie15=V32FPkk%2Fw0dUvg%3D%3D&cookie21=V32FPkk%2FhSg%2F&existShop=false&cookie14=UoTbldffztSu3A%3D%3D&tag=8; _l_g_=Ug%3D%3D; unb=2201499686434; cookie1=BxSjQCQ6sp%2FKUbmJMrRM%2B%2FTeMnxnfP3Ky2LamSxw1u4%3D; login=true; cookie17=UUphy%2FZzlNvrKtsbCQ%3D%3D; _nk_=%5Cu9F50%5Cu609F%5Cu667A%5Cu80FD%5Cu8BED%5Cu97F3; sg=%E9%9F%B343; csg=04a77d7a; accountId=52463; token=t6PHfzW5l84NHrDFNmRRJVHclpUlndw3wDDsqNMRtbE=";
private volatile String token = "+yKlBN44OA/SyckKeOJUlJVzFRetm5fqY9FVaEzSRPE="; private volatile String token = "t6PHfzW5l84NHrDFNmRRJVHclpUlndw3wDDsqNMRtbE=";
private volatile String csrfToken = "xWUW4TnhPzTyPnCGVcBbhyoc"; private volatile String csrfToken = "hIPnBFZTxO70xYEKMWiVP5pJ";
public void updateCookie(String cookie) { public void updateCookie(String cookie) {
this.cookie = cookie; this.cookie = cookie;
...@@ -221,7 +221,7 @@ public class SpiritAudioUpload { ...@@ -221,7 +221,7 @@ public class SpiritAudioUpload {
ArrayList<DicUploadInfo> datas = new ArrayList<>(); ArrayList<DicUploadInfo> datas = new ArrayList<>();
List<DicUploadErrorInfo> errorDatas = new ArrayList<>(); List<DicUploadErrorInfo> errorDatas = new ArrayList<>();
int ln = 8; int ln = 9;
int count = 0; int count = 0;
// int errorCount = 0; // int errorCount = 0;
...@@ -651,7 +651,7 @@ public class SpiritAudioUpload { ...@@ -651,7 +651,7 @@ public class SpiritAudioUpload {
List<DicUploadErrorInfo> errorDatas = new ArrayList<>(); List<DicUploadErrorInfo> errorDatas = new ArrayList<>();
List<DicUploadInfo> datas = new ArrayList<>(); List<DicUploadInfo> datas = new ArrayList<>();
String description; String description;
int ln = 8; int ln = 9;
int count = 0; int count = 0;
if (Boolean.TRUE.equals(record)) { if (Boolean.TRUE.equals(record)) {
String root = "/root/TTS-service/audio/"+botAccount+"/record/"; String root = "/root/TTS-service/audio/"+botAccount+"/record/";
...@@ -848,7 +848,7 @@ public class SpiritAudioUpload { ...@@ -848,7 +848,7 @@ public class SpiritAudioUpload {
String mp3FileName = path.substring(path.lastIndexOf("/")+1); String mp3FileName = path.substring(path.lastIndexOf("/")+1);
String randomMp3Name; String randomMp3Name;
int i = 0; int i = 0;
int ln = 8; int ln = 9;
do { do {
if (i++ == 60) { if (i++ == 60) {
i = 0; i = 0;
......
...@@ -1173,7 +1173,7 @@ public class TTService { ...@@ -1173,7 +1173,7 @@ public class TTService {
String.valueOf(pitch), mp3FilePath); String.valueOf(pitch), mp3FilePath);
// log.info("CallPython.changeSoundByPython 耗时:{}",System.currentTimeMillis()-start); // log.info("CallPython.changeSoundByPython 耗时:{}",System.currentTimeMillis()-start);
if (!TTSUtils.doesFileExist(mp3FilePath)) { if (!TTSUtils.doesFileExist(mp3FilePath)) {
log.error("python代码出错,mp3文件没有创建成功"); log.error("python代码出错,mp3文件没有创建成功.{},{},{},{}", wavFilename, volume, speed, pitch);
res = new ResponseCodeWithData(555); res = new ResponseCodeWithData(555);
} }
//long changeSoundEndTime = System.currentTimeMillis(); //long changeSoundEndTime = System.currentTimeMillis();
...@@ -2120,10 +2120,12 @@ public class TTService { ...@@ -2120,10 +2120,12 @@ public class TTService {
if (xiaoAi) { if (xiaoAi) {
OkHttp3Utils.backPostAsync(audioUrl+type); OkHttp3Utils.backPostAsync(audioUrl+type);
} }
int count = 0;
if (Files.exists((pt = Paths.get(path)))) { if (Files.exists((pt = Paths.get(path)))) {
while (XIAOAI_MP3_MARK.contains(path)) { while (XIAOAI_MP3_MARK.contains(path) && count < 20) {
try { try {
Thread.sleep(500); Thread.sleep(500);
count++;
} catch (Exception e) {} } catch (Exception e) {}
} }
TTServiceUtil.buildMp3ResponseForAudioNoRange(response, path, xiaoAi); TTServiceUtil.buildMp3ResponseForAudioNoRange(response, path, xiaoAi);
...@@ -2132,9 +2134,10 @@ public class TTService { ...@@ -2132,9 +2134,10 @@ public class TTService {
Thread.sleep(1500); Thread.sleep(1500);
} catch (Exception e) {} } catch (Exception e) {}
if (Files.exists(pt)) { if (Files.exists(pt)) {
while (XIAOAI_MP3_MARK.contains(path)) { while (XIAOAI_MP3_MARK.contains(path) && count < 20) {
try { try {
Thread.sleep(300); Thread.sleep(300);
count++;
} catch (Exception e) {} } catch (Exception e) {}
} }
TTServiceUtil.buildMp3ResponseForAudioNoRange(response, path, xiaoAi); TTServiceUtil.buildMp3ResponseForAudioNoRange(response, path, xiaoAi);
...@@ -2316,9 +2319,9 @@ public class TTService { ...@@ -2316,9 +2319,9 @@ public class TTService {
} }
} }
public static void main(String[] args) { public static void main(String[] args) throws UnsupportedEncodingException {
System.out.println(URLEncoder.encode("正常0c60f9484eaa35aa7a9e2879c574e8a3.mp3")); System.out.println(URLEncoder.encode("Ls69sFTjXN%2F6831N1VVdfw%3D%3D", "UTF-8"));
System.out.println(URLEncoder.encode("正常24f87c9e922d063260634941f5f75be2.mp3")); System.out.println(URLEncoder.encode("%2BnzkUO6JnLrmiWSlBQaZ9g%3D%3D", "UTF-8"));
System.out.println(URLEncoder.encode("正常d1a75129c54ef3037bd44e25ab6eeb9a.mp3")); System.out.println(URLEncoder.encode("EksNVVSieFTobNBZFEOeyw%3D%3D", "UTF-8"));
} }
} }
...@@ -280,6 +280,43 @@ public class Test { ...@@ -280,6 +280,43 @@ public class Test {
} }
} }
private static int changeHanToNum(String numStr) {
List<String> list = Arrays.asList("零", "一", "二", "三", "四", "五", "六", "七", "八", "九");
StringBuilder num = new StringBuilder();
boolean first = true;
for (String str: numStr.split("")) {
int i;
if (first) {
first = false;
if (str.equals("十")) num.append(1);
else if ((i = list.indexOf(str)) != -1) num.append(i);
}
else if ((i = list.indexOf(str)) != -1) num.append(i);
}
return Integer.parseInt(num.toString());
}
private static Integer extractNum(String numStr) {
int num;
try {
num = Integer.parseInt(numStr);
return num;
} catch (Exception e) {
int i;
if ((i=numStr.indexOf("第")) != -1) {
String str = numStr.substring(i+1, numStr.length()-1);
try {
num = Integer.parseInt(str);
} catch (Exception e1) {
num = changeHanToNum(str);
}
} else {
num = changeHanToNum(numStr);
}
}
return num;
}
public static void main(String[] args) { public static void main(String[] args) {
Date date = new Date(1572522571234L); Date date = new Date(1572522571234L);
...@@ -291,6 +328,14 @@ public class Test { ...@@ -291,6 +328,14 @@ public class Test {
Pattern pattern = Pattern.compile(TTSUtils.getAbRegex()); Pattern pattern = Pattern.compile(TTSUtils.getAbRegex());
String[] notVariableTextArray = pattern.split("\uD83C\uDD70会数学的杰瑞的类型为:儿童、简单、益智、休闲、教育、学生、免费\uD83C\uDD71"); String[] notVariableTextArray = pattern.split("\uD83C\uDD70会数学的杰瑞的类型为:儿童、简单、益智、休闲、教育、学生、免费\uD83C\uDD71");
System.out.println(TTSUtils.buildMP3Filename("为您推荐以上作品:《妖刀异闻录》、《小太阳》、《遇见伽利略》,你可以说:打开某作品")); System.out.println(extractNum("27"));
System.out.println(extractNum("二十六"));
System.out.println(extractNum("十六"));
System.out.println(extractNum("六"));
System.out.println(extractNum("第五个"));
System.out.println(extractNum("第十五个"));
System.out.println(extractNum("第二十六个"));
System.out.println(extractNum("第7个"));
System.out.println(extractNum("第17个"));
} }
} }
...@@ -32,6 +32,10 @@ ...@@ -32,6 +32,10 @@
<artifactId>spring-boot-starter-websocket</artifactId> <artifactId>spring-boot-starter-websocket</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope> <scope>runtime</scope>
...@@ -144,7 +148,6 @@ ...@@ -144,7 +148,6 @@
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
<version>3.9</version> <version>3.9</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -11,10 +11,7 @@ import java.nio.charset.StandardCharsets; ...@@ -11,10 +11,7 @@ import java.nio.charset.StandardCharsets;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/** /**
* @author 苗权威 * @author 苗权威
...@@ -30,6 +27,9 @@ public class Utils { ...@@ -30,6 +27,9 @@ public class Utils {
private static final String REGEX_SEPERATE = "【(.+?)】"; private static final String REGEX_SEPERATE = "【(.+?)】";
private static final String[] s1 = { "零", "一", "二", "三", "四", "五", "六", "七", "八", "九" };
// private static final String[] s2 = { "十", "百", "千"};
public static HttpServletRequest getHttpServletRequest() { public static HttpServletRequest getHttpServletRequest() {
return ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder return ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder
.getRequestAttributes())).getRequest(); .getRequestAttributes())).getRequest();
...@@ -252,13 +252,29 @@ public class Utils { ...@@ -252,13 +252,29 @@ public class Utils {
} }
} }
public static int changeHanToNum(String numStr) {
List<String> list = Arrays.asList(s1);
StringBuilder num = new StringBuilder();
boolean first = true;
for (String str: numStr.split("")) {
int i;
if (first) {
first = false;
if (str.equals("十")) num.append(1);
else if ((i = list.indexOf(str)) != -1) num.append(i);
}
else if ((i = list.indexOf(str)) != -1) num.append(i);
}
return Integer.parseInt(num.toString());
}
public static void main(String[] args) throws ParseException { public static void main(String[] args) throws ParseException {
String s = "[{\"type\": \"SendEvent\",\"componentId\":\"%s\"}]"; String s = "[{\"type\": \"SendEvent\",\"componentId\":\"%s\"}]";
//System.out.println(String.format(s, "gsagh")); //System.out.println(String.format(s, "gsagh"));
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String time = format.format(System.currentTimeMillis()); String time = format.format(System.currentTimeMillis());
Timestamp timestamp = Timestamp.valueOf(time); Timestamp timestamp = Timestamp.valueOf(time);
System.out.println(timestamp);
System.out.println(format.format(new Date(System.currentTimeMillis())));
} }
} }
package ai.qiwu.com.xiaoduhome.common.config;
import ai.qiwu.com.xiaoduhome.pojo.OverTimeDetail;
import ai.qiwu.com.xiaoduhome.pojo.XiaoDuNoScreenStore;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
/**
* @author 苗权威
* @dateTime 20-1-9 下午7:54
*/
@Configuration
public class RedisConfig {
@Bean
public RedisTemplate<String, XiaoDuNoScreenStore> xiaoduRedisTemplate(RedisConnectionFactory redisConnectionFactory) {
RedisTemplate<String, XiaoDuNoScreenStore> redisTemplate = new RedisTemplate<>();
redisTemplate.setConnectionFactory(redisConnectionFactory);
Jackson2JsonRedisSerializer serializer = new Jackson2JsonRedisSerializer(XiaoDuNoScreenStore.class);
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
objectMapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
serializer.setObjectMapper(objectMapper);
redisTemplate.setKeySerializer(new StringRedisSerializer());
redisTemplate.setValueSerializer(serializer);
redisTemplate.setHashKeySerializer(new StringRedisSerializer());
redisTemplate.setHashValueSerializer(serializer);
redisTemplate.afterPropertiesSet();
return redisTemplate;
}
}
...@@ -17,6 +17,7 @@ import ai.qiwu.com.xiaoduhome.common.temple.recommand.RecommandPojo; ...@@ -17,6 +17,7 @@ import ai.qiwu.com.xiaoduhome.common.temple.recommand.RecommandPojo;
import ai.qiwu.com.xiaoduhome.entity.primary.GameProjectTb; import ai.qiwu.com.xiaoduhome.entity.primary.GameProjectTb;
import ai.qiwu.com.xiaoduhome.entity.primary.OnProductDetail; import ai.qiwu.com.xiaoduhome.entity.primary.OnProductDetail;
import ai.qiwu.com.xiaoduhome.entity.secondary.XiaoDuHistoryBotIdTime; import ai.qiwu.com.xiaoduhome.entity.secondary.XiaoDuHistoryBotIdTime;
import ai.qiwu.com.xiaoduhome.pojo.data.ProjectData;
import ai.qiwu.com.xiaoduhome.pojo.dpl.Item; import ai.qiwu.com.xiaoduhome.pojo.dpl.Item;
import ai.qiwu.com.xiaoduhome.pojo.dpl.MyDocument; import ai.qiwu.com.xiaoduhome.pojo.dpl.MyDocument;
import ai.qiwu.com.xiaoduhome.pojo.pageData.HistoryData; import ai.qiwu.com.xiaoduhome.pojo.pageData.HistoryData;
...@@ -254,9 +255,9 @@ public class TempleUtils { ...@@ -254,9 +255,9 @@ public class TempleUtils {
return collect; return collect;
} }
public static List<LunchBotData> buildDataList(List<GameProjectTb> list, int begin) { public static List<LunchBotData> buildDataList(List<ProjectData> list, int begin) {
ArrayList<LunchBotData> dataList = new ArrayList<>(); ArrayList<LunchBotData> dataList = new ArrayList<>();
for (GameProjectTb projectInfo : list) { for (ProjectData projectInfo : list) {
String productName = correctName(projectInfo.getName()); String productName = correctName(projectInfo.getName());
String imageId = new StringBuilder(Constants.PRE_PRODUCT_IMG).append(projectInfo.getName()).toString(); String imageId = new StringBuilder(Constants.PRE_PRODUCT_IMG).append(projectInfo.getName()).toString();
String src = new StringBuilder(IMG_PREFIX).append(projectInfo.getBannerImgUrl()).toString(); String src = new StringBuilder(IMG_PREFIX).append(projectInfo.getBannerImgUrl()).toString();
......
...@@ -3,6 +3,7 @@ package ai.qiwu.com.xiaoduhome.common.temple.onLunch; ...@@ -3,6 +3,7 @@ package ai.qiwu.com.xiaoduhome.common.temple.onLunch;
import ai.qiwu.com.xiaoduhome.common.temple.TempleUtils; import ai.qiwu.com.xiaoduhome.common.temple.TempleUtils;
import ai.qiwu.com.xiaoduhome.pojo.dpl.Event; import ai.qiwu.com.xiaoduhome.pojo.dpl.Event;
import ai.qiwu.com.xiaoduhome.service.ScheduleService; import ai.qiwu.com.xiaoduhome.service.ScheduleService;
import ai.qiwu.com.xiaoduhome.service.ScheduleServiceNew;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.*; import java.util.*;
...@@ -21,26 +22,53 @@ public class LunchUtils { ...@@ -21,26 +22,53 @@ public class LunchUtils {
private static final LunchPojo LUNCH_LOGO_IMG = buildLogoImage(); private static final LunchPojo LUNCH_LOGO_IMG = buildLogoImage();
private static final LunchPojo LUNCH_HSITORY_IMG = buildHistoryImg(); private static final LunchPojo LUNCH_HSITORY_IMG = buildHistoryImg();
private static final LunchPojo LUNCH_COLLECT_IMG = buildCollectImg(); private static final LunchPojo LUNCH_COLLECT_IMG = buildCollectImg();
private volatile static LunchDocument lunchDocument = buildLunchDocument(); private volatile static LunchDocument lunchDocument = buildLunchNewDocument();
public static LunchDocument buildLunchDocument() {
private static LunchDocument buildLunchNewDocument() {
LunchDocument document = new LunchDocument(); LunchDocument document = new LunchDocument();
document.setDuration(240000); document.setDuration(240000);
LunchMainTemplate mainTemplate = new LunchMainTemplate(); LunchMainTemplate mainTemplate = new LunchMainTemplate();
document.setMainTemplate(mainTemplate); document.setMainTemplate(mainTemplate);
LunchPojo conRecommend = buildLunchList(TempleUtils.buildDataList(ScheduleService.getRecommendList(),1)); int size = ScheduleServiceNew.allProjects.size();
conRecommend.setFirstItem(Collections.singletonList(TempleUtils.getFrameRecommand())); int rows = size/4 + (size%4 == 0?0:1);
conRecommend.setMarginTop("8dp"); int i = 0;
List<LunchPojo> list = new ArrayList<>();
LunchPojo rowCon;
int begin, end;
while (i < rows) {
begin = i*4;
end = begin+4 > size ? size : begin+4;
rowCon = buildLunchList(TempleUtils.buildDataList(ScheduleServiceNew.allProjects.subList(begin, end),begin+1));
list.add(rowCon);
i++;
}
LunchPojo scroll = buildLunchScroll();
scroll.setItems(list);
mainTemplate.getItems().addAll(Arrays.asList(LUNCH_BACK_IMG,LUNCH_HEAD,LUNCH_LOGO_IMG,LUNCH_HSITORY_IMG,LUNCH_COLLECT_IMG,scroll));
return document;
}
public static LunchDocument buildLunchDocument() {
LunchDocument document = new LunchDocument();
document.setDuration(240000);
LunchMainTemplate mainTemplate = new LunchMainTemplate();
document.setMainTemplate(mainTemplate);
LunchPojo conRanking = buildLunchList(TempleUtils.buildDataList(ScheduleService.getRankingList(), 9)); // LunchPojo conRecommend = buildLunchList(TempleUtils.buildDataList(ScheduleService.getRecommendList(),1));
conRanking.setFirstItem(Collections.singletonList(TempleUtils.getFrameRakking())); // conRecommend.setFirstItem(Collections.singletonList(TempleUtils.getFrameRecommand()));
// conRecommend.setMarginTop("8dp");
//
// LunchPojo conRanking = buildLunchList(TempleUtils.buildDataList(ScheduleService.getRankingList(), 9));
// conRanking.setFirstItem(Collections.singletonList(TempleUtils.getFrameRakking()));
LunchPojo conCategory = buildLunchCategoryList(TempleUtils.buildCategoryDataList()); LunchPojo conCategory = buildLunchCategoryList(TempleUtils.buildCategoryDataList());
conCategory.setFirstItem(Collections.singletonList(TempleUtils.getFrameCategory())); conCategory.setFirstItem(Collections.singletonList(TempleUtils.getFrameCategory()));
LunchPojo scroll = buildLunchScroll(); LunchPojo scroll = buildLunchScroll();
scroll.setItems(Arrays.asList(conRecommend,conRanking,conCategory)); // scroll.setItems(Arrays.asList(conRecommend,conRanking,conCategory));
mainTemplate.getItems().addAll(Arrays.asList(LUNCH_BACK_IMG,LUNCH_HEAD,LUNCH_LOGO_IMG,LUNCH_HSITORY_IMG,LUNCH_COLLECT_IMG,scroll)); mainTemplate.getItems().addAll(Arrays.asList(LUNCH_BACK_IMG,LUNCH_HEAD,LUNCH_LOGO_IMG,LUNCH_HSITORY_IMG,LUNCH_COLLECT_IMG,scroll));
return document; return document;
......
package ai.qiwu.com.xiaoduhome.common.temple.play; package ai.qiwu.com.xiaoduhome.common.temple.play;
import ai.qiwu.com.xiaoduhome.pojo.ActorWithWord;
import ai.qiwu.com.xiaoduhome.pojo.dpl.Event; import ai.qiwu.com.xiaoduhome.pojo.dpl.Event;
import ai.qiwu.com.xiaoduhome.pojo.playAside.PlayPageData; import ai.qiwu.com.xiaoduhome.pojo.playAside.PlayPageData;
import ai.qiwu.com.xiaoduhome.service.ScheduleService; import ai.qiwu.com.xiaoduhome.service.ScheduleService;
import com.baidu.dueros.data.response.directive.audioplayer.Play;
import java.util.*; import java.util.*;
...@@ -22,7 +22,7 @@ public class PlayUtils { ...@@ -22,7 +22,7 @@ public class PlayUtils {
private static final PlayPojo PLAY_LIST_ITEM = buildContent(); private static final PlayPojo PLAY_LIST_ITEM = buildContent();
public static PlayDocument getPlayDocument(String headerName, List<String> actors, String[] actorWord, public static PlayDocument getPlayDocument(String headerName, List<ActorWithWord> aws,
String audio, String botAccount) { String audio, String botAccount) {
PlayDocument document = new PlayDocument(); PlayDocument document = new PlayDocument();
document.setDuration(110000); document.setDuration(110000);
...@@ -30,10 +30,9 @@ public class PlayUtils { ...@@ -30,10 +30,9 @@ public class PlayUtils {
document.setMainTemplate(mainTemplate); document.setMainTemplate(mainTemplate);
List<PlayPageData> dataList = new ArrayList<>(); List<PlayPageData> dataList = new ArrayList<>();
int i = 0; for (ActorWithWord aw: aws) {
for (String actor: actors) { PlayPageData data = new PlayPageData(aw.getActor(), ScheduleService.getAsideImgUrl(botAccount, aw.getActor()),
PlayPageData data = new PlayPageData(actor, ScheduleService.getAsideImgUrl(botAccount, actor), aw.getText().replaceAll("<br>","\n"));
actorWord[i++].replaceAll("<br>","\n"));
dataList.add(data); dataList.add(data);
} }
......
...@@ -3,13 +3,12 @@ package ai.qiwu.com.xiaoduhome.common.temple.recommand; ...@@ -3,13 +3,12 @@ package ai.qiwu.com.xiaoduhome.common.temple.recommand;
import ai.qiwu.com.xiaoduhome.common.Constants; import ai.qiwu.com.xiaoduhome.common.Constants;
import ai.qiwu.com.xiaoduhome.common.temple.TempleUtils; import ai.qiwu.com.xiaoduhome.common.temple.TempleUtils;
import ai.qiwu.com.xiaoduhome.entity.primary.GameProjectTb;
import ai.qiwu.com.xiaoduhome.entity.primary.OnProductDetail; import ai.qiwu.com.xiaoduhome.entity.primary.OnProductDetail;
import ai.qiwu.com.xiaoduhome.pojo.dpl.Data; import ai.qiwu.com.xiaoduhome.pojo.data.ProjectData;
import ai.qiwu.com.xiaoduhome.pojo.dpl.Event; import ai.qiwu.com.xiaoduhome.pojo.dpl.Event;
import ai.qiwu.com.xiaoduhome.service.ScheduleService; import ai.qiwu.com.xiaoduhome.service.ScheduleService;
import ai.qiwu.com.xiaoduhome.service.ScheduleServiceNew;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.io.File; import java.io.File;
import java.util.*; import java.util.*;
...@@ -35,7 +34,7 @@ public class RecommendUtil { ...@@ -35,7 +34,7 @@ public class RecommendUtil {
private static volatile RecommandDocument rankDocument; private static volatile RecommandDocument rankDocument;
public static RecommandDocument getRecommendDocument(int num) { public static RecommandDocument getRecommendDocument(int num, String channelId) {
RecommandDocument document = new RecommandDocument(); RecommandDocument document = new RecommandDocument();
document.setDuration(120000); document.setDuration(120000);
RecommandMainTemplate mainTemplate = new RecommandMainTemplate(); RecommandMainTemplate mainTemplate = new RecommandMainTemplate();
...@@ -49,8 +48,8 @@ public class RecommendUtil { ...@@ -49,8 +48,8 @@ public class RecommendUtil {
List<RecommandPojo> scrollList = new ArrayList<>(); List<RecommandPojo> scrollList = new ArrayList<>();
scrollView.setItems(scrollList); scrollView.setItems(scrollList);
int bound = ScheduleService.getAllProductCount(); List<ProjectData> bots = ScheduleServiceNew.getTheChannelAllProjectData(channelId);
List<OnProductDetail> bots = ScheduleService.getAllOnProduct(); int bound = bots.size();
StringBuilder botIds = new StringBuilder(); StringBuilder botIds = new StringBuilder();
int begin = num*RE_RA_CA_PAGE_SIZE; int begin = num*RE_RA_CA_PAGE_SIZE;
...@@ -105,7 +104,7 @@ public class RecommendUtil { ...@@ -105,7 +104,7 @@ public class RecommendUtil {
int count = 0; int count = 0;
while (begin < bound) { while (begin < bound) {
end = begin+4 <= bound ? begin+4 : bound; end = begin+4 <= bound ? begin+4 : bound;
scrollList.add(buildRecommendList(getListDataNoIds(count, begin, end, bots))); scrollList.add(buildRecommendList(getListDataNoIds(count, begin, end, null)));
count++; count++;
begin = end; begin = end;
} }
...@@ -119,7 +118,7 @@ public class RecommendUtil { ...@@ -119,7 +118,7 @@ public class RecommendUtil {
return document; return document;
} }
public static RecommandDocument getRankDocumentFirstPage() { public static RecommandDocument getRankDocumentFirstPage(String channelId) {
if (rankDocument != null) return rankDocument; if (rankDocument != null) return rankDocument;
RecommandDocument document = new RecommandDocument(); RecommandDocument document = new RecommandDocument();
document.setDuration(120000); document.setDuration(120000);
...@@ -141,23 +140,27 @@ public class RecommendUtil { ...@@ -141,23 +140,27 @@ public class RecommendUtil {
rowContainer.setMarginBottom("55dp"); rowContainer.setMarginBottom("55dp");
StringBuilder botIds = new StringBuilder(); StringBuilder botIds = new StringBuilder();
List<OnProductDetail> list = ScheduleService.getRANK_ORDER_IDs(); List<ProjectData> list = ScheduleServiceNew.getTheChannelProjectsByWatch(channelId);
//log.info("RANK_ORDER_ID_LIST size = "+list.size()); //log.info("RANK_ORDER_ID_LIST size = "+list.size());
OnProductDetail first = list.get(0); ProjectData first = list.get(0);
botIds.append(first.getBotAccount()).append(File.separator); botIds.append(first.getBotAccount()).append(File.separator);
OnProductDetail second = list.get(1); ProjectData second = list.get(1);
botIds.append(second.getBotAccount()).append(File.separator); botIds.append(second.getBotAccount()).append(File.separator);
OnProductDetail third = list.get(2); ProjectData third = list.get(2);
botIds.append(third.getBotAccount()).append(File.separator); botIds.append(third.getBotAccount()).append(File.separator);
OnProductDetail forth = list.get(3); ProjectData forth = list.get(3);
botIds.append(forth.getBotAccount()).append(File.separator); botIds.append(forth.getBotAccount()).append(File.separator);
RecommandPojo pojoFirst = buildImgFrmTxtContainerFirstRow(new StringBuilder(Constants.IMG_PREFIX).append(first.getBannerImgUrl()).toString(), new StringBuilder(Constants.PRE_PRODUCT_IMG).append(first.getName()).toString(), RecommandPojo pojoFirst = buildImgFrmTxtContainerFirstRow(new StringBuilder(Constants.IMG_PREFIX)
.append(first.getBannerImgUrl()).toString(), new StringBuilder(Constants.PRE_PRODUCT_IMG).append(first.getName()).toString(),
TempleUtils.correctName(first.getName()), "first.png"); TempleUtils.correctName(first.getName()), "first.png");
RecommandPojo pojoSe = buildImgFrmTxtContainerFirstRow(new StringBuilder(Constants.IMG_PREFIX).append(second.getBannerImgUrl()).toString(), new StringBuilder(Constants.PRE_PRODUCT_IMG).append(second.getName()).toString(), RecommandPojo pojoSe = buildImgFrmTxtContainerFirstRow(new StringBuilder(Constants.IMG_PREFIX)
.append(second.getBannerImgUrl()).toString(), new StringBuilder(Constants.PRE_PRODUCT_IMG).append(second.getName()).toString(),
TempleUtils.correctName(second.getName()), "second.png"); TempleUtils.correctName(second.getName()), "second.png");
RecommandPojo pojoThird = buildImgFrmTxtContainerFirstRow(new StringBuilder(Constants.IMG_PREFIX).append(third.getBannerImgUrl()).toString(), new StringBuilder(Constants.PRE_PRODUCT_IMG).append(third.getName()).toString(), RecommandPojo pojoThird = buildImgFrmTxtContainerFirstRow(new StringBuilder(Constants.IMG_PREFIX)
.append(third.getBannerImgUrl()).toString(), new StringBuilder(Constants.PRE_PRODUCT_IMG).append(third.getName()).toString(),
TempleUtils.correctName(third.getName()), "third.png"); TempleUtils.correctName(third.getName()), "third.png");
RecommandPojo pojoFourth = buildImgFrmTxtContainerFourth(new StringBuilder(Constants.IMG_PREFIX).append(forth.getBannerImgUrl()).toString(), new StringBuilder(Constants.PRE_PRODUCT_IMG).append(forth.getName()).toString(), RecommandPojo pojoFourth = buildImgFrmTxtContainerFourth(new StringBuilder(Constants.IMG_PREFIX)
.append(forth.getBannerImgUrl()).toString(), new StringBuilder(Constants.PRE_PRODUCT_IMG).append(forth.getName()).toString(),
TempleUtils.correctName(forth.getName())); TempleUtils.correctName(forth.getName()));
rowContainer.setItems(Arrays.asList(pojoFirst, pojoSe, pojoThird, pojoFourth)); rowContainer.setItems(Arrays.asList(pojoFirst, pojoSe, pojoThird, pojoFourth));
...@@ -168,7 +171,7 @@ public class RecommendUtil { ...@@ -168,7 +171,7 @@ public class RecommendUtil {
//scrollList.add(buildRecommendList(getListData(3, 12, 16, list, botIds))); //scrollList.add(buildRecommendList(getListData(3, 12, 16, list, botIds)));
mainTemplate.getItems().addAll(Arrays.asList(RECOM_BACK_IMG,RANK_HEAD,scrollView,buildPageButton(1, mainTemplate.getItems().addAll(Arrays.asList(RECOM_BACK_IMG,RANK_HEAD,scrollView,buildPageButton(1,
ScheduleService.getRankPageSize()),RANK_CATEGORY_FOOTER)); list.size()),RANK_CATEGORY_FOOTER));
botIds.deleteCharAt(botIds.length()-1); botIds.deleteCharAt(botIds.length()-1);
String idToken = Base64.getEncoder().encodeToString(botIds.toString().getBytes()); String idToken = Base64.getEncoder().encodeToString(botIds.toString().getBytes());
...@@ -177,7 +180,7 @@ public class RecommendUtil { ...@@ -177,7 +180,7 @@ public class RecommendUtil {
return document; return document;
} }
public static RecommandDocument getRankOtherPageDocument(int num) { public static RecommandDocument getRankOtherPageDocument(int num, String channelId) {
RecommandDocument document = new RecommandDocument(); RecommandDocument document = new RecommandDocument();
document.setDuration(120000); document.setDuration(120000);
RecommandMainTemplate mainTemplate = new RecommandMainTemplate(); RecommandMainTemplate mainTemplate = new RecommandMainTemplate();
...@@ -191,7 +194,7 @@ public class RecommendUtil { ...@@ -191,7 +194,7 @@ public class RecommendUtil {
List<RecommandPojo> scrollList = new ArrayList<>(); List<RecommandPojo> scrollList = new ArrayList<>();
scrollView.setItems(scrollList); scrollView.setItems(scrollList);
List<OnProductDetail> list = ScheduleService.getRANK_ORDER_IDs(); List<ProjectData> list = ScheduleServiceNew.getTheChannelProjectsByWatch(channelId);
int bound = list.size(); int bound = list.size();
int begin = num*RE_RA_CA_PAGE_SIZE; int begin = num*RE_RA_CA_PAGE_SIZE;
int end; int end;
...@@ -207,7 +210,7 @@ public class RecommendUtil { ...@@ -207,7 +210,7 @@ public class RecommendUtil {
begin = end; begin = end;
} }
mainTemplate.getItems().addAll(Arrays.asList(RECOM_BACK_IMG,RANK_HEAD,scrollView, mainTemplate.getItems().addAll(Arrays.asList(RECOM_BACK_IMG,RANK_HEAD,scrollView,
buildPageButton(num+1, ScheduleService.getRankPageSize()),RANK_CATEGORY_FOOTER)); buildPageButton(num+1, list.size()),RANK_CATEGORY_FOOTER));
botIds.deleteCharAt(botIds.length()-1); botIds.deleteCharAt(botIds.length()-1);
String idToken = Base64.getEncoder().encodeToString(botIds.toString().getBytes()); String idToken = Base64.getEncoder().encodeToString(botIds.toString().getBytes());
...@@ -215,7 +218,7 @@ public class RecommendUtil { ...@@ -215,7 +218,7 @@ public class RecommendUtil {
return document; return document;
} }
public static RecommandDocument getFunnyDocument(List<OnProductDetail> bots, String audio) { public static RecommandDocument getFunnyDocument(List<ProjectData> bots, String audio) {
RecommandDocument document = new RecommandDocument(); RecommandDocument document = new RecommandDocument();
document.setDuration(90000); document.setDuration(90000);
RecommandMainTemplate mainTemplate = new RecommandMainTemplate(); RecommandMainTemplate mainTemplate = new RecommandMainTemplate();
...@@ -224,7 +227,7 @@ public class RecommendUtil { ...@@ -224,7 +227,7 @@ public class RecommendUtil {
List<RecommandBotInfo> data = new ArrayList<>(); List<RecommandBotInfo> data = new ArrayList<>();
StringBuilder botIds = new StringBuilder(); StringBuilder botIds = new StringBuilder();
int num = 0; int num = 0;
for (OnProductDetail bot: bots) { for (ProjectData bot: bots) {
String imgSrc = new StringBuilder(Constants.IMG_PREFIX).append(bot.getBannerImgUrl()).toString(); String imgSrc = new StringBuilder(Constants.IMG_PREFIX).append(bot.getBannerImgUrl()).toString();
String imageId = new StringBuilder(Constants.PRE_PRODUCT_IMG).append(bot.getName()).toString(); String imageId = new StringBuilder(Constants.PRE_PRODUCT_IMG).append(bot.getName()).toString();
RecommandBotInfo detail = new RecommandBotInfo(imgSrc,imageId, TempleUtils.correctName(bot.getName())); RecommandBotInfo detail = new RecommandBotInfo(imgSrc,imageId, TempleUtils.correctName(bot.getName()));
...@@ -446,11 +449,11 @@ public class RecommendUtil { ...@@ -446,11 +449,11 @@ public class RecommendUtil {
return fCon; return fCon;
} }
private static List<RecommandBotInfo> getListData(int row,int begin, int end, List<OnProductDetail> bots, StringBuilder botIds) { private static List<RecommandBotInfo> getListData(int row,int begin, int end, List<ProjectData> bots, StringBuilder botIds) {
List<RecommandBotInfo> data = new ArrayList<>(); List<RecommandBotInfo> data = new ArrayList<>();
int n = 1+row*4; int n = 1+row*4;
for (int i = begin; i < end; i++) { for (int i = begin; i < end; i++) {
OnProductDetail bot = bots.get(i); ProjectData bot = bots.get(i);
botIds.append(bot.getBotAccount()).append(File.separator); botIds.append(bot.getBotAccount()).append(File.separator);
String imgSrc = new StringBuilder(Constants.IMG_PREFIX).append(bot.getBannerImgUrl()).toString(); String imgSrc = new StringBuilder(Constants.IMG_PREFIX).append(bot.getBannerImgUrl()).toString();
String imageId = new StringBuilder(Constants.PRE_PRODUCT_IMG).append(bot.getName()).toString(); String imageId = new StringBuilder(Constants.PRE_PRODUCT_IMG).append(bot.getName()).toString();
...@@ -461,11 +464,11 @@ public class RecommendUtil { ...@@ -461,11 +464,11 @@ public class RecommendUtil {
return data; return data;
} }
private static List<RecommandBotInfo> getListDataNoIds(int row,int begin, int end, List<OnProductDetail> bots) { private static List<RecommandBotInfo> getListDataNoIds(int row,int begin, int end, List<ProjectData> bots) {
List<RecommandBotInfo> data = new ArrayList<>(); List<RecommandBotInfo> data = new ArrayList<>();
int n = 1+row*4; int n = 1+row*4;
for (int i = begin; i < end; i++) { for (int i = begin; i < end; i++) {
OnProductDetail bot = bots.get(i); ProjectData bot = bots.get(i);
String imgSrc = new StringBuilder(Constants.IMG_PREFIX).append(bot.getBannerImgUrl()).toString(); String imgSrc = new StringBuilder(Constants.IMG_PREFIX).append(bot.getBannerImgUrl()).toString();
String imageId = new StringBuilder(Constants.PRE_PRODUCT_IMG).append(bot.getName()).toString(); String imageId = new StringBuilder(Constants.PRE_PRODUCT_IMG).append(bot.getName()).toString();
RecommandBotInfo detail = new RecommandBotInfo(imgSrc,imageId, TempleUtils.correctName(bot.getName())); RecommandBotInfo detail = new RecommandBotInfo(imgSrc,imageId, TempleUtils.correctName(bot.getName()));
......
...@@ -8,6 +8,7 @@ import com.alibaba.da.coin.ide.spi.trans.MetaFormat; ...@@ -8,6 +8,7 @@ import com.alibaba.da.coin.ide.spi.trans.MetaFormat;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -27,6 +28,9 @@ public class SpiritController { ...@@ -27,6 +28,9 @@ public class SpiritController {
this.spiritService = spiritService; this.spiritService = spiritService;
} }
@Value("${num}")
private String num;
/** /**
* 利用天猫精灵打开发包解析请求并从构造响应数据返回 * 利用天猫精灵打开发包解析请求并从构造响应数据返回
* @param taskQuery 请求的参数信息 * @param taskQuery 请求的参数信息
...@@ -39,7 +43,7 @@ public class SpiritController { ...@@ -39,7 +43,7 @@ public class SpiritController {
// build response // build response
ResultModel<TaskResult> resultModel = new ResultModel<>(); ResultModel<TaskResult> resultModel = new ResultModel<>();
TaskResult taskResult = spiritService.getResponse(query, 1); TaskResult taskResult = spiritService.getResponse(query, 4);
resultModel.setReturnCode("0"); resultModel.setReturnCode("0");
resultModel.setReturnValue(taskResult); resultModel.setReturnValue(taskResult);
// log.info("天猫响应信息:"+ JSON.toJSONString(resultModel)); // log.info("天猫响应信息:"+ JSON.toJSONString(resultModel));
...@@ -107,4 +111,13 @@ public class SpiritController { ...@@ -107,4 +111,13 @@ public class SpiritController {
return resultModel; return resultModel;
} }
@PostMapping("/update/{one}")
public void updateCsvMap(@RequestBody String secId, @PathVariable String one) {
if ("qiwuAudioMqw123.".equals(secId)) {
if (one.equals(num)) {
spiritService.updateSpiritCsv();
}
}
}
} }
...@@ -17,7 +17,7 @@ import java.util.concurrent.ConcurrentHashMap; ...@@ -17,7 +17,7 @@ import java.util.concurrent.ConcurrentHashMap;
* @author 苗权威 * @author 苗权威
* @dateTime 19-11-18 下午6:37 * @dateTime 19-11-18 下午6:37
*/ */
//@Controller @Controller
@Slf4j @Slf4j
public class WebSocketLogController { public class WebSocketLogController {
......
...@@ -6,6 +6,7 @@ import ai.qiwu.com.xiaoduhome.xiaoai.model.response.XiaoAiResponse; ...@@ -6,6 +6,7 @@ import ai.qiwu.com.xiaoduhome.xiaoai.model.response.XiaoAiResponse;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.Response; import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.Response;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.toSpeak.ToSpeak; import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.toSpeak.ToSpeak;
import ai.qiwu.com.xiaoduhome.xiaoai.service.XiaoAiService; import ai.qiwu.com.xiaoduhome.xiaoai.service.XiaoAiService;
import ai.qiwu.com.xiaoduhome.xiaoai.service.XiaoAiServiceRedis;
import ai.qiwu.com.xiaoduhome.xiaoai.service.XiaoAiTestService; import ai.qiwu.com.xiaoduhome.xiaoai.service.XiaoAiTestService;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -34,6 +35,7 @@ public class XiaoAiController { ...@@ -34,6 +35,7 @@ public class XiaoAiController {
private final XiaoAiService xiaoAiService; private final XiaoAiService xiaoAiService;
private final XiaoAiTestService xiaoAiTestService; private final XiaoAiTestService xiaoAiTestService;
private final XiaoAiServiceRedis xiaoAiServiceRedis;
/** /**
* Controller控制器 * Controller控制器
...@@ -94,7 +96,7 @@ public class XiaoAiController { ...@@ -94,7 +96,7 @@ public class XiaoAiController {
log.info("请求:"+str); log.info("请求:"+str);
XiaoAiRequest request = JSON.parseObject(str, XiaoAiRequest.class); XiaoAiRequest request = JSON.parseObject(str, XiaoAiRequest.class);
request.setType(5); request.setType(5);
XiaoAiResponse response = xiaoAiTestService.getResponse(request); XiaoAiResponse response = xiaoAiServiceRedis.getResponse(request);
log.info("响应:"+response); log.info("响应:"+response);
return response; return response;
} catch (Exception e) { } catch (Exception e) {
...@@ -110,6 +112,33 @@ public class XiaoAiController { ...@@ -110,6 +112,33 @@ public class XiaoAiController {
// return xiaoAiService.getResponse(request); // return xiaoAiService.getResponse(request);
} }
@PostMapping("/phone") //互动故事
// @RequestBody XiaoAiRequest request,
public XiaoAiResponse xiaoaiPhoneStory(HttpServletRequest servletRequest) {
// long start = System.currentTimeMillis();
// if (!Utils.encry(3, servletRequest)) return null;
// log.info("encry:"+(System.currentTimeMillis()-start));
try (InputStream stream = servletRequest.getInputStream()){
StringBuilder sb = new StringBuilder();
byte[] b = new byte[4096];
for (int n; (n = stream.read(b)) != -1;)
{
sb.append(new String(b, 0, n));
}
String str = sb.toString();
log.info("请求:"+str);
XiaoAiRequest request = JSON.parseObject(str, XiaoAiRequest.class);
request.setType(5);
XiaoAiResponse response = xiaoAiTestService.getResponse(request);
log.info("响应:"+response);
return response;
} catch (Exception e) {
}
return null;
}
@PostMapping("/adult") @PostMapping("/adult")
public XiaoAiResponse xiaoaiAdult(@RequestBody XiaoAiRequest request, HttpServletRequest servletRequest) { // 智能小说 public XiaoAiResponse xiaoaiAdult(@RequestBody XiaoAiRequest request, HttpServletRequest servletRequest) { // 智能小说
//log.info("请求:"+request); //log.info("请求:"+request);
...@@ -141,8 +170,8 @@ public class XiaoAiController { ...@@ -141,8 +170,8 @@ public class XiaoAiController {
@GetMapping("/audio/play") @GetMapping("/audio/play")
public void xiaoaiPlayed(String userId) { public void xiaoaiPlayed(String userId) {
if (StringUtils.isNotBlank(userId)) { if (StringUtils.isNotBlank(userId)) {
// log.info("小爱确认音频播放:"+userId); log.info("小爱确认音频播放:"+userId);
// xiaoAiService.changeAudioPlayMark(userId); xiaoAiServiceRedis.theAudioAlreadyPlay(userId);
} }
else log.error("/xiaoai/audio/play userId is null"); else log.error("/xiaoai/audio/play userId is null");
} }
......
package ai.qiwu.com.xiaoduhome.controller; package ai.qiwu.com.xiaoduhome.controller;
import ai.qiwu.com.xiaoduhome.common.Utils; import ai.qiwu.com.xiaoduhome.common.Utils;
import ai.qiwu.com.xiaoduhome.pojo.OverTimeDetail;
import ai.qiwu.com.xiaoduhome.service.DplBotRedisService;
import ai.qiwu.com.xiaoduhome.service.DplBotService; import ai.qiwu.com.xiaoduhome.service.DplBotService;
import ai.qiwu.com.xiaoduhome.service.ResponseEncapsulation; import ai.qiwu.com.xiaoduhome.service.ResponseEncapsulation;
import ai.qiwu.com.xiaoduhome.spirit.SpiritService; import ai.qiwu.com.xiaoduhome.spirit.SpiritService;
...@@ -15,6 +17,8 @@ import com.fasterxml.jackson.databind.exc.MismatchedInputException; ...@@ -15,6 +17,8 @@ import com.fasterxml.jackson.databind.exc.MismatchedInputException;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.util.ResourceUtils; import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -41,6 +45,13 @@ public class XiaoDuHomeController { ...@@ -41,6 +45,13 @@ public class XiaoDuHomeController {
private int test = 0; private int test = 0;
private final StringRedisTemplate stringRedisTemplate;
@Autowired
public XiaoDuHomeController(StringRedisTemplate stringRedisTemplate) {
this.stringRedisTemplate = stringRedisTemplate;
}
@RequestMapping(value = "/chat", method = RequestMethod.HEAD) @RequestMapping(value = "/chat", method = RequestMethod.HEAD)
public void chatHead(HttpServletResponse response) { public void chatHead(HttpServletResponse response) {
// if (test++ < 5) { // if (test++ < 5) {
...@@ -104,16 +115,17 @@ public class XiaoDuHomeController { ...@@ -104,16 +115,17 @@ public class XiaoDuHomeController {
} }
@PostMapping("/story") //交互故事 @PostMapping("/story") //交互故事
public String story() { public String story(HttpServletRequest request) {
try { try {
//log.info("--------------分界线-------------------"); //log.info("--------------分界线-------------------");
DplBotService service = new DplBotService(Utils.getHttpServletRequest(), 5); // DplBotService service = new DplBotService(Utils.getHttpServletRequest(), 5);
// log.info("请求信息中的attributes:{}", service.getRequest().getSession().getAttributes()); // log.info("请求信息中的attributes:{}", service.getRequest().getSession().getAttributes());
log.info(service.getStrRequest()); DplBotRedisService service = new DplBotRedisService(request, 5, stringRedisTemplate);
// log.info(service.getStrRequest());
//service.disableVerify(); //service.disableVerify();
service.enableVerify(); service.enableVerify();
String str = service.run(); String str = service.run();
log.info("响应信息:{}", str); // log.info("响应信息:{}", str);
return str; return str;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
package ai.qiwu.com.xiaoduhome.pojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
* @author 苗权威
* @dateTime 20-1-17 下午2:40
*/
@Getter
@Setter
@ToString
public class ActorWithWord {
private String actor;
private String text;
}
...@@ -5,7 +5,9 @@ import com.baidu.dueros.model.Response; ...@@ -5,7 +5,9 @@ import com.baidu.dueros.model.Response;
import lombok.Data; import lombok.Data;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import lombok.ToString;
import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -17,8 +19,11 @@ import java.util.Map; ...@@ -17,8 +19,11 @@ import java.util.Map;
*/ */
@Getter @Getter
@Setter @Setter
public class OverTimeDetail { @ToString
public class OverTimeDetail implements Serializable {
private static final long serialVersionUID = 1L;
private final List<Directive> directives = new ArrayList<>(); private final List<Directive> directives = new ArrayList<>();
private final Map<String, String> attributes = new HashMap<>(); private final Map<String, String> attributes = new HashMap<>();
private volatile Response response = new Response(); private volatile Response response;
} }
package ai.qiwu.com.xiaoduhome.pojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
* @author 苗权威
* @dateTime 20-1-17 下午7:45
*/
@Getter
@Setter
@ToString
public class SendFlowerVO {
private String botAccount;
private Long num;
private Double unitPrice;
private String userId;
private String name;
private String channelId;
private Long orderId;
}
...@@ -6,6 +6,7 @@ import lombok.ToString; ...@@ -6,6 +6,7 @@ import lombok.ToString;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @author 苗权威 * @author 苗权威
...@@ -16,11 +17,11 @@ import java.util.List; ...@@ -16,11 +17,11 @@ import java.util.List;
@ToString @ToString
public class UserBehaviorData { public class UserBehaviorData {
// 用户浏览历史 // 用户浏览历史
private volatile HashMap<String, Long> userBotId2History = new HashMap<>(); private volatile Map<String, Long> userBotId2History = new HashMap<>();
// 用户对作品所送花的数目 // 用户对作品所送花的数目
private volatile HashMap<String, Long> userBotId2Flowers = new HashMap<>(); private volatile Map<String, Long> userBotId2Flowers = new HashMap<>();
// 用户是否收藏该作品 // 用户是否收藏该作品
private volatile HashMap<String, Long> userBotId2Collected = new HashMap<>(); private volatile Map<String, Long> userBotId2Collected = new HashMap<>();
// 标记清除,每半小时标记一次 // 标记清除,每半小时标记一次
private volatile Byte mark = 1; private volatile Byte mark = 1;
......
package ai.qiwu.com.xiaoduhome.pojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
* @author 苗权威
* @dateTime 20-1-13 下午1:35
*/
@Getter
@Setter
@ToString
public class XiaoDuNoScreenStore {
private volatile String audio;
private volatile String noPlay;
}
package ai.qiwu.com.xiaoduhome.pojo.data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.sql.Timestamp;
import java.util.List;
/**
* @author 苗权威
* @dateTime 20-1-15 下午8:30
*/
@Getter
@Setter
@ToString
public class ProjectData {
private String name;
private String intro;
private String authorName;
private Boolean free;
private String botAccount;
private String bannerImgUrl;
private Timestamp createTime;
private List<String> labels;
}
...@@ -24,6 +24,8 @@ public interface XiaoDuOrderTbRepository extends JpaRepository<XiaoDuOrderTB, Lo ...@@ -24,6 +24,8 @@ public interface XiaoDuOrderTbRepository extends JpaRepository<XiaoDuOrderTB, Lo
@Override @Override
<S extends XiaoDuOrderTB> S saveAndFlush(S s); <S extends XiaoDuOrderTB> S saveAndFlush(S s);
XiaoDuOrderTB getByChOrderId (String chOrderId);
@Modifying @Modifying
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Query(value = "UPDATE xiaodu_order_tb SET order_id=?1,status=1,update_time=now() WHERE ch_order_id=?2",nativeQuery = true) @Query(value = "UPDATE xiaodu_order_tb SET order_id=?1,status=1,update_time=now() WHERE ch_order_id=?2",nativeQuery = true)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -10,9 +10,8 @@ import ai.qiwu.com.xiaoduhome.entity.primary.OnProductDetail; ...@@ -10,9 +10,8 @@ import ai.qiwu.com.xiaoduhome.entity.primary.OnProductDetail;
import ai.qiwu.com.xiaoduhome.entity.secondary.XiaoDuHistoryBotIdTime; import ai.qiwu.com.xiaoduhome.entity.secondary.XiaoDuHistoryBotIdTime;
import ai.qiwu.com.xiaoduhome.entity.secondary.XiaoDuHistoryTB; import ai.qiwu.com.xiaoduhome.entity.secondary.XiaoDuHistoryTB;
import ai.qiwu.com.xiaoduhome.entity.secondary.XiaoDuOrderTB; import ai.qiwu.com.xiaoduhome.entity.secondary.XiaoDuOrderTB;
import ai.qiwu.com.xiaoduhome.pojo.JYTUserResponse; import ai.qiwu.com.xiaoduhome.pojo.*;
import ai.qiwu.com.xiaoduhome.pojo.UserBehaviorData; import ai.qiwu.com.xiaoduhome.pojo.data.ProjectData;
import ai.qiwu.com.xiaoduhome.pojo.UserInfoByTokenResult;
import ai.qiwu.com.xiaoduhome.pojo.pageData.HistoryData; import ai.qiwu.com.xiaoduhome.pojo.pageData.HistoryData;
import ai.qiwu.com.xiaoduhome.repository.primary.AppFavoriteTBRepository; import ai.qiwu.com.xiaoduhome.repository.primary.AppFavoriteTBRepository;
import ai.qiwu.com.xiaoduhome.repository.primary.AppFlowerTBRepository; import ai.qiwu.com.xiaoduhome.repository.primary.AppFlowerTBRepository;
...@@ -21,6 +20,8 @@ import ai.qiwu.com.xiaoduhome.repository.secondary.XiaoDuHistoryBotTimeRepositor ...@@ -21,6 +20,8 @@ import ai.qiwu.com.xiaoduhome.repository.secondary.XiaoDuHistoryBotTimeRepositor
import ai.qiwu.com.xiaoduhome.repository.secondary.XiaoDuHistoryTBRepository; import ai.qiwu.com.xiaoduhome.repository.secondary.XiaoDuHistoryTBRepository;
import ai.qiwu.com.xiaoduhome.repository.secondary.XiaoDuOrderTbRepository; import ai.qiwu.com.xiaoduhome.repository.secondary.XiaoDuOrderTbRepository;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baidu.dueros.data.request.pay.event.ChargeEvent; import com.baidu.dueros.data.request.pay.event.ChargeEvent;
import com.baidu.dueros.data.request.pay.event.Payload; import com.baidu.dueros.data.request.pay.event.Payload;
import com.baidu.dueros.data.response.directive.pay.Charge; import com.baidu.dueros.data.response.directive.pay.Charge;
...@@ -28,7 +29,9 @@ import lombok.extern.slf4j.Slf4j; ...@@ -28,7 +29,9 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.springframework.data.domain.Example; import org.springframework.data.domain.Example;
import org.springframework.util.CollectionUtils;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
...@@ -56,6 +59,11 @@ import static ai.qiwu.com.xiaoduhome.service.ScheduleService.curTime; ...@@ -56,6 +59,11 @@ import static ai.qiwu.com.xiaoduhome.service.ScheduleService.curTime;
*/ */
@Slf4j @Slf4j
public class DplbotServiceUtil { public class DplbotServiceUtil {
final static String HOST_UTL;
static {
HOST_UTL = Config.getProperty("requestHost", "http://didi-gz4.jiaoyou365.com:18082/");
log.info("hostUrl:"+HOST_UTL);
}
private static final int CORE = Runtime.getRuntime().availableProcessors(); private static final int CORE = Runtime.getRuntime().availableProcessors();
static final ThreadPoolExecutor POOL = new ThreadPoolExecutor(CORE+1, 1500, static final ThreadPoolExecutor POOL = new ThreadPoolExecutor(CORE+1, 1500,
...@@ -88,21 +96,24 @@ public class DplbotServiceUtil { ...@@ -88,21 +96,24 @@ public class DplbotServiceUtil {
} }
} }
static String getUsUserId(String userId, String accessToken) { static String getUsUserId(String userId, String accessToken, String channelId) {
UserBehaviorData data = USER_HISTORY.computeIfAbsent(userId, s -> new UserBehaviorData()); UserBehaviorData data = USER_HISTORY.get(userId);
String usId = data.getJytUserId(); String jytId;
if (usId == null) { if (data == null) {
log.info("getUsUserId:请求getUserIdByToken"); jytId = getUserIdByToken(accessToken, channelId);
usId = getUserIdByToken(accessToken); onLunchFillUserBehaviorData(userId, channelId, jytId);
data.setJytUserId(usId); return jytId;
} else if (StringUtils.isBlank(data.getJytUserId())) {
jytId = getUserIdByToken(accessToken, channelId);
data.setJytUserId(jytId);
} }
return usId; return data.getJytUserId();
} }
static String getUserIdByToken(String accessToken) { static String getUserIdByToken(String accessToken, String channelId) {
try { try {
HashMap<String, String> headers = new HashMap<>(); HashMap<String, String> headers = new HashMap<>();
headers.put("App-Channel-Id", "JIAOYOUTIANXIA"); // headers.put("App-Channel-Id", channelId);
headers.put("Authorization", new StringBuilder(BEARER).append(accessToken).toString()); headers.put("Authorization", new StringBuilder(BEARER).append(accessToken).toString());
String str = OkHttp3Utils.doGet(USER_ID_BY_TOKEN, new HashMap<>(), headers); String str = OkHttp3Utils.doGet(USER_ID_BY_TOKEN, new HashMap<>(), headers);
log.info("getUserIdByToken:{}",str); log.info("getUserIdByToken:{}",str);
...@@ -121,38 +132,74 @@ public class DplbotServiceUtil { ...@@ -121,38 +132,74 @@ public class DplbotServiceUtil {
return null; return null;
} }
static void onLunchGetUserHistory(final String userId) { // static void onLunchGetUserHistory(final String userId) {
// POOL.submit(() -> {
// XiaoDuHistoryTBRepository repository = BaseHolder.getBean("xiaoDuHistoryTBRepository");
// UserBehaviorData data = USER_HISTORY.computeIfAbsent(userId, s -> new UserBehaviorData());
// HashMap<String,Long> userBotId2History = data.getUserBotId2History();
// for (XiaoDuHistoryTB historyTB: repository.getByXiaoduUserId(userId)) {
// userBotId2History.put(historyTB.getBotId(), historyTB.getLastTime());
// }
// //log.info("用户历史记录:{}",USER_HISTORY);
// });
// }
static void onLunchFillUserBehaviorData(final String userId, final String channelId, final String jytUserId) {
POOL.submit(() -> { POOL.submit(() -> {
XiaoDuHistoryTBRepository repository = BaseHolder.getBean("xiaoDuHistoryTBRepository"); Map<String, String> params = new HashMap<>();
UserBehaviorData data = USER_HISTORY.computeIfAbsent(userId, s -> new UserBehaviorData()); params.put("userId", userId);
HashMap<String,Long> userBotId2History = data.getUserBotId2History(); params.put("channelId", channelId);
for (XiaoDuHistoryTB historyTB: repository.getByXiaoduUserId(userId)) { try {
userBotId2History.put(historyTB.getBotId(), historyTB.getLastTime()); String response = OkHttp3Utils.doGet(HOST_UTL+"/audio_box/behavior", params);
if (StringUtils.isNotBlank(response)) {
JSONObject result = JSON.parseObject(response);
if (NumberUtils.INTEGER_ONE.equals(result.getInteger("code"))) {
result = result.getJSONObject("data");
Map<String, Long> botAccount2HistoryTime = result.getObject("history", Map.class);
Map<String, Long> botAccount2Flowers = result.getObject("flowers", Map.class);
Map<String, Long> botAccount2FavoriteTime = result.getObject("favorite", Map.class);
UserBehaviorData data = new UserBehaviorData();
if (!CollectionUtils.isEmpty(botAccount2HistoryTime)) data.setUserBotId2History(botAccount2HistoryTime);
if (!CollectionUtils.isEmpty(botAccount2FavoriteTime)) data.setUserBotId2Collected(botAccount2FavoriteTime);
if (!CollectionUtils.isEmpty(botAccount2Flowers)) data.setUserBotId2Flowers(botAccount2Flowers);
data.setJytUserId(jytUserId);
USER_HISTORY.put(userId, data);
}
}
} catch (Exception e) {
log.warn("onLunch,获取用户信息失败:"+userId);
} }
//log.info("用户历史记录:{}",USER_HISTORY);
}); });
} }
static void onLunchFillUserBehaviorData(final String accessToken, final String userId) { private static UserBehaviorData onLunchFillUserBehaviorDataInMaster(final String userId,
POOL.submit(() -> { final String channelId, final String jytUserId) {
XiaoDuHistoryTBRepository repository = BaseHolder.getBean("xiaoDuHistoryTBRepository"); Map<String, String> params = new HashMap<>();
UserBehaviorData data = USER_HISTORY.computeIfAbsent(userId, s -> new UserBehaviorData()); params.put("userId", userId);
HashMap<String,Long> userBotId2History = data.getUserBotId2History(); params.put("channelId", channelId);
for (XiaoDuHistoryTB historyTB: repository.getByXiaoduUserId(userId)) { try {
userBotId2History.put(historyTB.getBotId(), historyTB.getLastTime()); String response = OkHttp3Utils.doGet(HOST_UTL+"/audio_box/behavior", params);
} if (StringUtils.isNotBlank(response)) {
if (accessToken != null) { JSONObject result = JSON.parseObject(response);
log.info("onLunchFillUserBehaviorData:请求getUserIdByToken"); if (NumberUtils.INTEGER_ONE.equals(result.getInteger("code"))) {
String jytUserId = DplbotServiceUtil.getUserIdByToken(accessToken); result = result.getJSONObject("data");
if (jytUserId != null) { Map<String, Long> botAccount2HistoryTime = result.getObject("history", Map.class);
Map<String, Long> botAccount2Flowers = result.getObject("flowers", Map.class);
Map<String, Long> botAccount2FavoriteTime = result.getObject("favorite", Map.class);
UserBehaviorData data = new UserBehaviorData();
if (!CollectionUtils.isEmpty(botAccount2HistoryTime)) data.setUserBotId2History(botAccount2HistoryTime);
if (!CollectionUtils.isEmpty(botAccount2FavoriteTime)) data.setUserBotId2Collected(botAccount2FavoriteTime);
if (!CollectionUtils.isEmpty(botAccount2Flowers)) data.setUserBotId2Flowers(botAccount2Flowers);
data.setJytUserId(jytUserId); data.setJytUserId(jytUserId);
getUserFavorite(userId, jytUserId); USER_HISTORY.put(userId, data);
getUserSendFlowerInfo(userId,jytUserId); return data;
} }
} }
}); } catch (Exception e) {
log.warn("onLunch,获取用户信息失败:"+userId);
}
return null;
} }
public static ThreadPoolExecutor getPOOL() { public static ThreadPoolExecutor getPOOL() {
return POOL; return POOL;
...@@ -180,28 +227,16 @@ public class DplbotServiceUtil { ...@@ -180,28 +227,16 @@ public class DplbotServiceUtil {
return builder.toString(); return builder.toString();
} }
static boolean doesUserCollectThisBot(String botID, String accessToken, String userId) { static boolean doesUserCollectThisBot(String botID, String accessToken, String userId, String channelId, String jytUserId) {
boolean collected = false; boolean collected = false;
if (accessToken != null) { if (accessToken != null) {
UserBehaviorData userData = USER_HISTORY.get(userId); UserBehaviorData userData = USER_HISTORY.get(userId);
if (userData != null) { if (userData == null) {
collected = userData.getUserBotId2Collected().containsKey(botID); if (StringUtils.isBlank(jytUserId)) jytUserId = getUserIdByToken(accessToken, channelId);
} else { userData = onLunchFillUserBehaviorDataInMaster(userId, channelId, jytUserId);
POOL.submit(() -> getUserFavorite(userId, getUsUserId(userId, accessToken))); if (userData == null) return false;
try {
String jytUserId = getUsUserId(userId, accessToken);
if (jytUserId != null) {
AppFavoriteTBRepository repository = BaseHolder.getBean("appFavoriteTBRepository");
// AppFavoriteTB tb = new AppFavoriteTB();
// tb.setBotId(botID);
// tb.setUserId(Long.parseLong(jytUserId));
// Example<AppFavoriteTB> example = Example.of(tb);
// collected = repository.exists(example);
collected = repository.existsByBotIdAndUserId(botID, jytUserId);
}
} catch (Exception e) {
}
} }
collected = userData.getUserBotId2Collected().containsKey(botID);
} }
return collected; return collected;
} }
...@@ -212,107 +247,60 @@ public class DplbotServiceUtil { ...@@ -212,107 +247,60 @@ public class DplbotServiceUtil {
return text.substring(i1+1, i2); return text.substring(i1+1, i2);
} }
static Long getUserSendFlowerNum(String botAccount, String userID, String accessToken) { static Long getUserSendFlowerNum(String botAccount, String userID, String channelId, String accessToken, String jytUserId) {
if (accessToken != null) {
UserBehaviorData data = USER_HISTORY.get(userID); UserBehaviorData data = USER_HISTORY.get(userID);
if (data != null) { if (data == null) {
if (StringUtils.isBlank(jytUserId)) jytUserId = getUserIdByToken(accessToken, channelId);
data = onLunchFillUserBehaviorDataInMaster(userID, channelId, jytUserId);
if (data == null) return 0L;
}
Long count = data.getUserBotId2Flowers().get(botAccount); Long count = data.getUserBotId2Flowers().get(botAccount);
if (count == null) count = 0L; if (count == null) count = 0L;
return count; return count;
} else {
onLunchFillUserBehaviorData(accessToken, userID);
AppFlowerTBTintRepository repository = BaseHolder.getBean("appFlowerTBTintRepository");
List<AppFlowerTBTiny> tinies = repository.getByUserIdAndBotId(userID, botAccount);
if (tinies != null) {
long sum = 0;
for (AppFlowerTBTiny tiny:tinies) {
sum += tiny.getNumber();
}
return sum;
}
} }
return 0L; return 0L;
} }
static boolean didUserCollecThisProduct(String botAccount, String userID, String accessToken, String jytUserId) { static boolean didUserCollecThisProduct(String botAccount, String userID,
String jytUserId, String channelId) {
UserBehaviorData data = USER_HISTORY.get(userID); UserBehaviorData data = USER_HISTORY.get(userID);
if (data != null) { if (data == null) data = onLunchFillUserBehaviorDataInMaster(userID, channelId, jytUserId);
if (data == null) return false;
Long time = data.getUserBotId2Collected().get(botAccount); Long time = data.getUserBotId2Collected().get(botAccount);
return time != null; return time != null;
} else {
onLunchFillUserBehaviorData(accessToken, userID);
if (jytUserId == null) {
log.info("didUserCollecThisProduct:请求getUserIdByToken");
jytUserId = getUserIdByToken(accessToken);
}
if (jytUserId == null) return false;
AppFavoriteTBRepository repository = BaseHolder.getBean("appFavoriteTBRepository");
// AppFavoriteTB favorite = new AppFavoriteTB();
// favorite.setUserId(Long.parseLong(jytUserId));
// favorite.setBotId(botAccount);
// Example<AppFavoriteTB> example = Example.of(favorite);
// return repository.exists(example);
return repository.existsByBotIdAndUserId(botAccount, jytUserId);
}
}
static void userUnCollectTheBotInPool(final String userId, final String botAccount, final String accessToken) {
POOL.submit(() -> userUnCollectTheBot(userId, botAccount, accessToken));
}
private static void userUnCollectTheBot(String userId, String botAccount, String accessToken) {
String jytUserId = getUsUserId(userId, accessToken);
if (jytUserId != null) {
AppFavoriteTBRepository repository = BaseHolder.getBean("appFavoriteTBRepository");
repository.deleteByBotIdAndUserId(botAccount, jytUserId);
} }
static void userUnCollectTheBot(final String userId, final String botAccount, String channelId,
String jytUserId, String accessToken) {
UserBehaviorData behaviorData = USER_HISTORY.get(userId); UserBehaviorData behaviorData = USER_HISTORY.get(userId);
if (behaviorData == null) {
if (StringUtils.isBlank(jytUserId)) jytUserId = getUserIdByToken(accessToken, channelId);
behaviorData = onLunchFillUserBehaviorDataInMaster(userId, channelId, jytUserId);
}
if (behaviorData != null) { if (behaviorData != null) {
behaviorData.getUserBotId2Collected().remove(botAccount); behaviorData.getUserBotId2Collected().remove(botAccount);
} else {
if (jytUserId != null) {
UserBehaviorData data = USER_HISTORY.computeIfAbsent(userId, s -> new UserBehaviorData());
data.setJytUserId(jytUserId);
getUserFavorite(userId, jytUserId);
getUserSendFlowerInfo(userId, jytUserId);
}
}
} }
static void userCollectTheBotInPool(final String userId, final String botAccount, final String accessToken) {
POOL.submit(() -> userCollectTheBot(userId, botAccount, accessToken));
} }
private static void userCollectTheBot(String userId, String botAccount, String accessToken) { static void userCollectTheBot(String userId, String botAccount, String channelId, String jytUserId, String accessToken) {
String jytUserId = getUsUserId(userId, accessToken);
if (jytUserId != null) {
AppFavoriteTBRepository repository = BaseHolder.getBean("appFavoriteTBRepository");
AppFavoriteTB entity = new AppFavoriteTB();
entity.setBotId(botAccount);
entity.setUserId(jytUserId);
entity.setModule(0);
repository.save(entity);
}
UserBehaviorData behaviorData = USER_HISTORY.get(userId); UserBehaviorData behaviorData = USER_HISTORY.get(userId);
if (behaviorData == null) {
if (StringUtils.isBlank(jytUserId)) jytUserId = getUserIdByToken(accessToken, channelId);
behaviorData = onLunchFillUserBehaviorDataInMaster(userId, channelId, jytUserId);
}
if (behaviorData != null) { if (behaviorData != null) {
behaviorData.getUserBotId2Collected().put(botAccount, curTime); behaviorData.getUserBotId2Collected().put(botAccount, curTime);
} else {
if (jytUserId != null) {
UserBehaviorData data = USER_HISTORY.computeIfAbsent(userId, s -> new UserBehaviorData());
data.setJytUserId(jytUserId);
getUserFavorite(userId, jytUserId);
getUserSendFlowerInfo(userId, jytUserId);
}
} }
} }
static Charge sendOneFlowerByCharge(String userId, String jytUserId, String accessToken, String trace) { static Charge sendOneFlowerByCharge(String userId, String jytUserId, String accessToken, String trace, String channelId) {
String price = ScheduleService.FLOWER_UNIT_PRICE; String price = ScheduleService.FLOWER_UNIT_PRICE;
int unitPrice = Integer.parseInt(price); int unitPrice = Integer.parseInt(price);
String amount = String.valueOf(unitPrice/100.0); String amount = String.valueOf(unitPrice/100.0);
String orderId = new StringBuilder(userId).append(System.currentTimeMillis()).toString(); String orderId = new StringBuilder(userId).append("_").append(System.currentTimeMillis()).toString();
if (jytUserId == null) { if (jytUserId == null) {
jytUserId = getUsUserId(userId, accessToken); jytUserId = getUsUserId(userId, accessToken, channelId);
if (jytUserId == null) return null; if (jytUserId == null) return null;
} }
String botId; String botId;
...@@ -357,29 +345,23 @@ public class DplbotServiceUtil { ...@@ -357,29 +345,23 @@ public class DplbotServiceUtil {
return xiaoDuOrderTB; return xiaoDuOrderTB;
} }
static boolean doesUserPlayed(String botAccount, String userId, String accessToken) { static boolean doesUserPlayed(String botAccount, String userId, String channelId) {
UserBehaviorData data = USER_HISTORY.get(userId); UserBehaviorData data = USER_HISTORY.get(userId);
if (data != null) return data.getUserBotId2History().containsKey(botAccount); if (data == null) data = onLunchFillUserBehaviorDataInMaster(userId, channelId, null);
onLunchFillUserBehaviorData(accessToken, userId); if (data == null) return false;
return false; return data.getUserBotId2History().containsKey(botAccount);
} }
static void updateTheUserHistory(final String userId,final String botAccount, final String accessToken) { static void updateTheUserHistory(final String userId,final String botAccount, final String accessToken,
final String channelId) {
POOL.submit(() -> { POOL.submit(() -> {
UserBehaviorData data = USER_HISTORY.get(userId); UserBehaviorData data = USER_HISTORY.get(userId);
if (data == null) { if (data == null) {
XiaoDuHistoryTBRepository repository = BaseHolder.getBean("xiaoDuHistoryTBRepository"); String jytUserId = null;
XiaoDuHistoryTB historyTB = repository.getByXiaoduUserIdAndBotId(userId, botAccount); if (accessToken != null) {
if (historyTB == null) { jytUserId = getUserIdByToken(accessToken, channelId);
historyTB = new XiaoDuHistoryTB();
historyTB.setLastTime(curTime);
historyTB.setBotId(botAccount);
historyTB.setXiaoduUserId(userId);
} else {
historyTB.setLastTime(curTime);
} }
repository.save(historyTB); onLunchFillUserBehaviorDataInMaster(userId, channelId, jytUserId);
onLunchFillUserBehaviorData(accessToken, userId);
} else { } else {
data.getUserBotId2History().put(botAccount, curTime); data.getUserBotId2History().put(botAccount, curTime);
} }
...@@ -425,7 +407,10 @@ public class DplbotServiceUtil { ...@@ -425,7 +407,10 @@ public class DplbotServiceUtil {
final String num = token.substring(sepIndex+1); final String num = token.substring(sepIndex+1);
POOL.submit(() -> { POOL.submit(() -> {
XiaoDuOrderTbRepository repository = BaseHolder.getBean("xiaoDuOrderTbRepository"); XiaoDuOrderTbRepository repository = BaseHolder.getBean("xiaoDuOrderTbRepository");
Long id = 0L;
try { try {
XiaoDuOrderTB tb = repository.getByChOrderId(chOrderId);
id = tb.getId();
repository.updateAterSeccessPayed(baiduOrderReferenceId,chOrderId); repository.updateAterSeccessPayed(baiduOrderReferenceId,chOrderId);
} catch (Exception e) { } catch (Exception e) {
// StringWriter writer = new StringWriter(); // StringWriter writer = new StringWriter();
...@@ -433,30 +418,28 @@ public class DplbotServiceUtil { ...@@ -433,30 +418,28 @@ public class DplbotServiceUtil {
log.error("更新用户{}的支付状态出错:{},订单信息:订单号:{}.baiduOrderId:{},createTime:{}", log.error("更新用户{}的支付状态出错:{},订单信息:订单号:{}.baiduOrderId:{},createTime:{}",
e.toString(),userId, chOrderId, baiduOrderReferenceId, createTimestamp); e.toString(),userId, chOrderId, baiduOrderReferenceId, createTimestamp);
} }
try { try {
String appUserId = jytUserId; String appUserId = jytUserId;
if (StringUtils.isBlank(jytUserId)) appUserId = getUsUserId(userId,accessToken); if (StringUtils.isBlank(appUserId)) appUserId = getUsUserId(userId,accessToken, channelId);
if (StringUtils.isBlank(jytUserId)) { if (StringUtils.isBlank(appUserId)) {
log.error("像app_flower_tb中添加数据失败因为无法获取到用户的id,数据信息:botAccount:{},num:{},xiaoduUserId:{}", log.error("像app_flower_tb中添加数据失败因为无法获取到用户的id,数据信息:botAccount:{},num:{},xiaoduUserId:{}",
botAccount,num,userId); botAccount,num,userId);
return; return;
} }
if ("null".equals(jytUserId)) { if ("null".equals(appUserId)) {
log.error("小度无屏在向app-flower_tb插入数据时没有获取到此用户登录的userID,数据信息:botAccount:{},num:{},xiaoduUserId:{}", log.error("小度无屏在向app-flower_tb插入数据时没有获取到此用户登录的userID,数据信息:botAccount:{},num:{},xiaoduUserId:{}",
botAccount,num,userId); botAccount,num,userId);
} }
AppFlowerTBRepository flower = BaseHolder.getBean("appFlowerTBRepository"); SendFlowerVO vo = new SendFlowerVO();
AppFlowerTB flowerTB = new AppFlowerTB(); vo.setBotAccount(botAccount);
flowerTB.setBotName(botAccount); vo.setChannelId(channelId);
flowerTB.setModule(0); vo.setName(workName);
flowerTB.setNumber(Long.parseLong(num)); vo.setNum(Long.parseLong(num));
flowerTB.setOrderId(0L); vo.setUnitPrice(Double.parseDouble(Config.getProperty("unitPrice", Constants.UNIT_PRICE))/100);
flowerTB.setStatus(1); vo.setOrderId(id);
flowerTB.setUnitPrice(Double.parseDouble(Config.getProperty("unitPrice", Constants.UNIT_PRICE))/100); vo.setUserId(appUserId);
flowerTB.setUserId(appUserId); OkHttp3Utils.doPostJsonStr(HOST_UTL+"/audio_box/flower", JSON.toJSONString(vo));
flowerTB.setWorkName(workName);
flowerTB.setChannelId(channelId);
flower.save(flowerTB);
} catch (Exception e) { } catch (Exception e) {
log.error("像app_flower_tb中添加数据失败,{},数据信息:botAccount:{},num:{},xiaoduUserId:{}", log.error("像app_flower_tb中添加数据失败,{},数据信息:botAccount:{},num:{},xiaoduUserId:{}",
e.toString(),botAccount,num,userId); e.toString(),botAccount,num,userId);
...@@ -473,56 +456,39 @@ public class DplbotServiceUtil { ...@@ -473,56 +456,39 @@ public class DplbotServiceUtil {
} }
} }
static void updateTheUserBehaviorDataMark(final String userId, final String botAccount, final String accessToken) { static void updateTheUserBehaviorDataMark(final String userId, final String botAccount,
final String accessToken, final String jytUserId) {
POOL.submit(() -> { POOL.submit(() -> {
UserBehaviorData data = USER_HISTORY.get(userId); UserBehaviorData data = USER_HISTORY.get(userId);
if (data != null) { if (data != null) {
data.setMark((byte) 1); data.setMark((byte) 1);
data.getUserBotId2History().put(botAccount, curTime); data.getUserBotId2History().put(botAccount, curTime);
} else { } else {
XiaoDuHistoryTBRepository repository = BaseHolder.getBean("xiaoDuHistoryTBRepository"); onLunchFillUserBehaviorDataInMaster(userId, accessToken, jytUserId);
UserBehaviorData behaviorData = USER_HISTORY.computeIfAbsent(userId, s -> new UserBehaviorData());
HashMap<String,Long> userBotId2History = behaviorData.getUserBotId2History();
for (XiaoDuHistoryTB historyTB: repository.getByXiaoduUserId(userId)) {
userBotId2History.put(historyTB.getBotId(), historyTB.getLastTime());
}
userBotId2History.put(botAccount, curTime);
behaviorData.setMark((byte) 1);
if (accessToken != null) {
log.info("onLunchFillUserBehaviorData:请求getUserIdByToken");
String jytUserId = DplbotServiceUtil.getUserIdByToken(accessToken);
if (jytUserId != null) {
behaviorData.setJytUserId(jytUserId);
getUserFavorite(userId, jytUserId);
getUserSendFlowerInfo(userId,jytUserId);
}
}
} }
}); });
} }
static CollectHistoryDocument getCollectPage(String userId, String accessToken, String jytId, int start) { static CollectHistoryDocument getCollectPage(String userId, String accessToken, String jytId, int start, String channelId) {
List<String> favoriteProducts = new ArrayList<>();
UserBehaviorData behaviorData = USER_HISTORY.get(userId); UserBehaviorData behaviorData = USER_HISTORY.get(userId);
int pageNum = 0; int pageNum;
if (behaviorData == null) { if (behaviorData == null) {
onLunchFillUserBehaviorData(accessToken, userId); if (StringUtils.isBlank(jytId)) jytId = getUserIdByToken(accessToken,channelId);
if (jytId == null) jytId = getUserIdByToken(accessToken); behaviorData = onLunchFillUserBehaviorDataInMaster(userId, channelId, jytId);
if (jytId != null) { if (behaviorData == null) return null;
AppFavoriteTBRepository favorite = BaseHolder.getBean("appFavoriteTBRepository");
favoriteProducts = favorite.getFavoriteLimit(jytId, start);
} }
}else { Map<String, Long> userBotId2Collected = behaviorData.getUserBotId2Collected();
int bound = behaviorData.getUserBotId2Collected().size(); int bound = userBotId2Collected.size();
if (start >= bound) { if (start >= bound) {
return null; return null;
} }
pageNum = bound/CO_HI_PAGE_SIZE + (bound%CO_HI_PAGE_SIZE == 0 ? 0 : 1); pageNum = bound/CO_HI_PAGE_SIZE + (bound%CO_HI_PAGE_SIZE == 0 ? 0 : 1);
log.info("collect/history: pagesize:{},bound{}",pageNum,bound); log.info("collect/history: pagesize:{},bound{}",pageNum,bound);
TreeMap<Long, String> order = new TreeMap<>((o1, o2) -> (o1 < o2) ? 1 : ((o1.equals(o2)) ? 0 : -1)); TreeMap<Long, String> order = new TreeMap<>((o1, o2) -> (o1 < o2) ? 1 : ((o1.equals(o2)) ? 0 : -1));
for (Map.Entry<String, Long> entry: behaviorData.getUserBotId2Collected().entrySet()) { for (Map.Entry<String, Long> entry: userBotId2Collected.entrySet()) {
order.put(entry.getValue(), entry.getKey()); order.put(entry.getValue(), entry.getKey());
} }
List<String> favoriteProducts = new ArrayList<>();
int i = 0, e = start+CO_HI_PAGE_SIZE; int i = 0, e = start+CO_HI_PAGE_SIZE;
for (Map.Entry<Long, String> entry: order.entrySet()) { for (Map.Entry<Long, String> entry: order.entrySet()) {
if (i == e) break; if (i == e) break;
...@@ -530,23 +496,23 @@ public class DplbotServiceUtil { ...@@ -530,23 +496,23 @@ public class DplbotServiceUtil {
favoriteProducts.add(entry.getValue()); favoriteProducts.add(entry.getValue());
} }
} }
}
log.info("favoriteProducts length:{}, start:{}", favoriteProducts.size(), start); log.info("favoriteProducts length:{}, start:{}", favoriteProducts.size(), start);
if (favoriteProducts.size() == 0) return null; if (favoriteProducts.size() == 0) return null;
ArrayList<HistoryData> projectInfoList = new ArrayList<>(); ArrayList<HistoryData> projectInfoList = new ArrayList<>();
int i = 1; int j = 1;
//log.info("id list:{}", favoriteProducts); //log.info("id list:{}", favoriteProducts);
final StringBuilder build = new StringBuilder(); final StringBuilder build = new StringBuilder();
for (String botAccount :favoriteProducts) { for (String botAccount :favoriteProducts) {
build.append(botAccount).append(File.separator); build.append(botAccount).append(File.separator);
OnProductDetail productDetail = ScheduleService.getProductIdDetail().get(botAccount); ProjectData productDetail = ScheduleServiceNew.getProjectByBotAccount(botAccount);
String intro = productDetail.getIntro(); String intro = productDetail.getIntro();
if (StringUtils.isBlank(intro)) intro = "作者太懒没写介绍"; if (StringUtils.isBlank(intro)) intro = "作者太懒没写介绍";
String imgUrl = new StringBuilder(IMG_PREFIX).append(productDetail.getBannerImgUrl()).toString(); String imgUrl = new StringBuilder(IMG_PREFIX).append(productDetail.getBannerImgUrl()).toString();
String botAccountId = new StringBuilder(Constants.PRE_PRODUCT_IMG).append(correctName(productDetail.getName())).toString(); String botAccountId = new StringBuilder(Constants.PRE_PRODUCT_IMG).append(correctName(productDetail.getName())).toString();
String name = productDetail.getName(); String name = productDetail.getName();
HistoryData data = new HistoryData(botAccountId, i++, imgUrl, correctName(name), intro); HistoryData data = new HistoryData(botAccountId, j++, imgUrl, correctName(name), intro);
data.setAuthorName(productDetail.getAuthorName()); data.setAuthorName(productDetail.getAuthorName());
projectInfoList.add(data); projectInfoList.add(data);
} }
...@@ -561,15 +527,15 @@ public class DplbotServiceUtil { ...@@ -561,15 +527,15 @@ public class DplbotServiceUtil {
return collectHistoryDocument; return collectHistoryDocument;
} }
static CollectHistoryDocument getHistory(String userId, String accessToken, int start) { static CollectHistoryDocument getHistory(String userId, String accessToken,String jytUserId, int start, String channelId) {
List<XiaoDuHistoryBotIdTime> historyProducts = new ArrayList<>(); List<XiaoDuHistoryBotIdTime> historyProducts = new ArrayList<>();
UserBehaviorData behaviorData = USER_HISTORY.get(userId); UserBehaviorData behaviorData = USER_HISTORY.get(userId);
int pageNum = 0; int pageNum = 0;
if (behaviorData == null) { if (behaviorData == null) {
onLunchFillUserBehaviorData(accessToken, userId); if (StringUtils.isBlank(jytUserId) && StringUtils.isNotBlank(accessToken)) jytUserId = getUserIdByToken(accessToken, channelId);
XiaoDuHistoryBotTimeRepository historyRepository = BaseHolder.getBean("xiaoDuHistoryBotTimeRepository"); behaviorData = onLunchFillUserBehaviorDataInMaster(userId, channelId, jytUserId);
historyProducts = historyRepository.getByXiaoduUserIdLimit(userId, start); }
} else { if (behaviorData != null) {
try { try {
int bound = behaviorData.getUserBotId2History().size(); int bound = behaviorData.getUserBotId2History().size();
if (start >= bound) return null; if (start >= bound) return null;
...@@ -589,7 +555,6 @@ public class DplbotServiceUtil { ...@@ -589,7 +555,6 @@ public class DplbotServiceUtil {
} }
} }
} catch (Exception e){} } catch (Exception e){}
}
if (historyProducts.size() == 0) return null; if (historyProducts.size() == 0) return null;
ArrayList<HistoryData> projectInfoList = new ArrayList<>(); ArrayList<HistoryData> projectInfoList = new ArrayList<>();
...@@ -622,6 +587,8 @@ public class DplbotServiceUtil { ...@@ -622,6 +587,8 @@ public class DplbotServiceUtil {
} }
return document; return document;
} }
return null;
}
private static String correctName(String name) { private static String correctName(String name) {
int brace = name.indexOf("{"); int brace = name.indexOf("{");
...@@ -640,6 +607,23 @@ public class DplbotServiceUtil { ...@@ -640,6 +607,23 @@ public class DplbotServiceUtil {
return actorList; return actorList;
} }
static List<ActorWithWord> getTheActorsWithWords(JSONArray array) {
if (array != null && array.size() > 0) {
JSONObject job;
ActorWithWord aw;
List<ActorWithWord> list= new ArrayList<>();
for (Object ob: array) {
job = (JSONObject)ob;
aw = new ActorWithWord();
aw.setActor(job.getString("npcName"));
aw.setText(job.getString("text"));
list.add(aw);
}
return list;
}
return null;
}
public static String[] seperateActorWord(String text, Pattern pattern) { public static String[] seperateActorWord(String text, Pattern pattern) {
String[] actorWords = pattern.split(text); String[] actorWords = pattern.split(text);
if (StringUtils.startsWith(text.trim(), "【")) { if (StringUtils.startsWith(text.trim(), "【")) {
......
...@@ -2,27 +2,15 @@ package ai.qiwu.com.xiaoduhome.service; ...@@ -2,27 +2,15 @@ package ai.qiwu.com.xiaoduhome.service;
import ai.qiwu.com.xiaoduhome.common.Constants; import ai.qiwu.com.xiaoduhome.common.Constants;
import ai.qiwu.com.xiaoduhome.common.OkHttp3Utils; import ai.qiwu.com.xiaoduhome.common.OkHttp3Utils;
import ai.qiwu.com.xiaoduhome.common.Utils;
import ai.qiwu.com.xiaoduhome.pojo.QiWuRequest; import ai.qiwu.com.xiaoduhome.pojo.QiWuRequest;
import ai.qiwu.com.xiaoduhome.pojo.QiWuResponse; import ai.qiwu.com.xiaoduhome.pojo.QiWuResponse;
import ai.qiwu.com.xiaoduhome.pojo.playAside.AsideImageResponse; import ai.qiwu.com.xiaoduhome.pojo.playAside.AsideImageResponse;
import ai.qiwu.com.xiaoduhome.spirit.SpiritTerminateRequest; import ai.qiwu.com.xiaoduhome.spirit.SpiritTerminateRequest;
import ai.qiwu.com.xiaoduhome.xiaoai.common.XiaoAiConstants;
import ai.qiwu.com.xiaoduhome.xiaoai.service.XiaoAiService;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.http.HttpServletRequest;
import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.Enumeration;
import java.util.HashMap; import java.util.HashMap;
import java.util.Random;
/** /**
* @author 苗权威 * @author 苗权威
...@@ -64,8 +52,8 @@ class RequestTerminal { ...@@ -64,8 +52,8 @@ class RequestTerminal {
// case 4 : headers.put("App-Channel-Id", "jiaoyou-audio-adult-test");break; // case 4 : headers.put("App-Channel-Id", "jiaoyou-audio-adult-test");break;
// default: headers.put("App-Channel-Id", "jiaoyou-audio-test"); // default: headers.put("App-Channel-Id", "jiaoyou-audio-test");
// } // }
return OkHttp3Utils.doPostJsonStr(Constants.QI_WU_INTERFACE, requestJsonStr, headers); // return OkHttp3Utils.doPostJsonStr(Constants.QI_WU_INTERFACE, requestJsonStr, headers);
// return OkHttp3Utils.doPostJsonStr("http://didi-gz5.jiaoyou365.com:8070/api/chat2", requestJsonStr, headers); return OkHttp3Utils.doPostJsonStr("http://didi-gz5.jiaoyou365.com:8070/api/chat2", requestJsonStr, headers);
} }
static QiWuResponse requestTerminate(String userWord, String userId, int type) throws IOException { static QiWuResponse requestTerminate(String userWord, String userId, int type) throws IOException {
...@@ -117,8 +105,8 @@ class RequestTerminal { ...@@ -117,8 +105,8 @@ class RequestTerminal {
requestPojo.setUid(userId); requestPojo.setUid(userId);
requestPojo.setMsg("退出"); requestPojo.setMsg("退出");
String requestJsonStr = JSON.toJSONString(requestPojo); String requestJsonStr = JSON.toJSONString(requestPojo);
// OkHttp3Utils.backPostAsync("http://didi-gz5.jiaoyou365.com:8070/api/chat2", requestJsonStr, type); OkHttp3Utils.backPostAsync("http://didi-gz5.jiaoyou365.com:8070/api/chat2", requestJsonStr, type);
OkHttp3Utils.backPostAsync(Constants.QI_WU_INTERFACE, requestJsonStr, type); // OkHttp3Utils.backPostAsync(Constants.QI_WU_INTERFACE, requestJsonStr, type);
} }
static void backRequestDU2(String userId, int type) { static void backRequestDU2(String userId, int type) {
......
...@@ -106,8 +106,36 @@ public class ScheduleService implements InitializingBean { ...@@ -106,8 +106,36 @@ public class ScheduleService implements InitializingBean {
// }); // });
// } // }
@Scheduled(cron = "0 */30 * * * ?") @Scheduled(cron = "0 0 17 * * ?")
public void cleatUserBehaviorData() { public void initAllOnTableProductInfo() {
new Thread(() -> {
ALL_ON_PRODUCT = allOnProductInfoRepository.findAllByApplyStatusAndScoreNot(1, 0f);
allProductCount = ALL_ON_PRODUCT.size();
rankPageSize = allProductCount / RE_RA_CA_PAGE_SIZE + (allProductCount%RE_RA_CA_PAGE_SIZE == 0 ? 0:1);
TreeMap<Long, OnProductDetail> rankOrder = new TreeMap<>((o1, o2) -> o1-o2 < 0 ? 1 :(o1.equals(o2) ? 0 : -1));
HashMap<String, OnProductDetail> nd = new HashMap<>();
HashMap<String, OnProductDetail> id = new HashMap<>();
for (OnProductDetail item : ALL_ON_PRODUCT) {
String productName = item.getName();
String botAccount = item.getBotAccount();
List<String> labels = projectLabelRepository.productLabels(item.getId());
//PRODUCT_LABELS.put(productName, labels);
item.setLabels(labels);
nd.put(productName, item);
id.put(botAccount, item);
rankOrder.put(item.getWatch(), item);
}
PRODUCT_NAME_DETAIL = nd;
PRODUCT_ID_DETAIL = id;
RANK_ORDER_IDs = new ArrayList<>(rankOrder.values());
RecommendUtil.setRankDocument(null);
//log.info("作品详细信息:{}", PRODUCT_NAME_DETAIL);
}).start();
//log.error("更新推荐页出错:{}", e.getMessage());
}
@Scheduled(cron = "0 * */1 * * ?")
public void clearUserBehaviorData() {
DplbotServiceUtil.POOL.submit(() -> { DplbotServiceUtil.POOL.submit(() -> {
List<String> needClear = new ArrayList<>(); List<String> needClear = new ArrayList<>();
for (String userId: DplbotServiceUtil.USER_HISTORY.keySet()) { for (String userId: DplbotServiceUtil.USER_HISTORY.keySet()) {
...@@ -116,25 +144,6 @@ public class ScheduleService implements InitializingBean { ...@@ -116,25 +144,6 @@ public class ScheduleService implements InitializingBean {
if (data.getMark() == 1) data.setMark((byte) 0); if (data.getMark() == 1) data.setMark((byte) 0);
else { else {
needClear.add(userId); needClear.add(userId);
XiaoDuHistoryTBRepository repository = BaseHolder.getBean("xiaoDuHistoryTBRepository");
for (Map.Entry<String, Long> entry: data.getUserBotId2History().entrySet()) {
String botId = entry.getKey();
Long time = entry.getValue();
XiaoDuHistoryTB historyTB = repository.getByXiaoduUserIdAndBotId(userId, botId);
if (historyTB == null) {
historyTB = new XiaoDuHistoryTB();
historyTB.setLastTime(time);
historyTB.setBotId(botId);
historyTB.setXiaoduUserId(userId);
} else {
if (historyTB.getLastTime().equals(time)) continue;
historyTB.setLastTime(time);
}
repository.save(historyTB);
}
data.setUserBotId2Collected(null);
data.setUserBotId2Flowers(null);
data.setUserBotId2History(null);
} }
} }
} }
...@@ -142,12 +151,12 @@ public class ScheduleService implements InitializingBean { ...@@ -142,12 +151,12 @@ public class ScheduleService implements InitializingBean {
}); });
} }
// @Scheduled(cron = "*/10 * * * * ?") @Scheduled(cron = "*/30 * * * * ?")
public void updateTheCurTime() { public void updateTheCurTime() {
DplbotServiceUtil.POOL.submit(() -> curTime = System.currentTimeMillis()); DplbotServiceUtil.POOL.submit(() -> curTime = System.currentTimeMillis());
} }
@Scheduled(cron = "0 0 19 * * ?") // @Scheduled(cron = "0 0 19 * * ?")
public void initRankingList() { public void initRankingList() {
new Thread(() -> { new Thread(() -> {
RANKING_LIST = gameProjectTbRepository.findFirst8(); RANKING_LIST = gameProjectTbRepository.findFirst8();
...@@ -157,7 +166,7 @@ public class ScheduleService implements InitializingBean { ...@@ -157,7 +166,7 @@ public class ScheduleService implements InitializingBean {
//log.error("更新排行榜出错:{}", e.getMessage()); //log.error("更新排行榜出错:{}", e.getMessage());
} }
@Scheduled(cron = "0 0 */2 * * ?") // @Scheduled(cron = "0 0 */2 * * ?")
public void initRecommendList() { public void initRecommendList() {
new Thread(() -> { new Thread(() -> {
RECOMMEND_LIST = gameProjectTbRepository.recommendList(); RECOMMEND_LIST = gameProjectTbRepository.recommendList();
...@@ -167,34 +176,6 @@ public class ScheduleService implements InitializingBean { ...@@ -167,34 +176,6 @@ public class ScheduleService implements InitializingBean {
//log.error("更新推荐页出错:{}", e.getMessage()); //log.error("更新推荐页出错:{}", e.getMessage());
} }
@Scheduled(cron = "0 0 17 * * ?")
public void initAllOnTableProductInfo() {
new Thread(() -> {
ALL_ON_PRODUCT = allOnProductInfoRepository.findAllByApplyStatusAndScoreNot(1, 0f);
allProductCount = ALL_ON_PRODUCT.size();
rankPageSize = allProductCount / RE_RA_CA_PAGE_SIZE + (allProductCount%RE_RA_CA_PAGE_SIZE == 0 ? 0:1);
TreeMap<Long, OnProductDetail> rankOrder = new TreeMap<>((o1, o2) -> o1-o2 < 0 ? 1 :(o1.equals(o2) ? 0 : -1));
HashMap<String, OnProductDetail> nd = new HashMap<>();
HashMap<String, OnProductDetail> id = new HashMap<>();
for (OnProductDetail item : ALL_ON_PRODUCT) {
String productName = item.getName();
String botAccount = item.getBotAccount();
List<String> labels = projectLabelRepository.productLabels(item.getId());
//PRODUCT_LABELS.put(productName, labels);
item.setLabels(labels);
nd.put(productName, item);
id.put(botAccount, item);
rankOrder.put(item.getWatch(), item);
}
PRODUCT_NAME_DETAIL = nd;
PRODUCT_ID_DETAIL = id;
RANK_ORDER_IDs = new ArrayList<>(rankOrder.values());
RecommendUtil.setRankDocument(null);
//log.info("作品详细信息:{}", PRODUCT_NAME_DETAIL);
}).start();
//log.error("更新推荐页出错:{}", e.getMessage());
}
@Scheduled(cron = "0 0 1 * * ?") @Scheduled(cron = "0 0 1 * * ?")
public void initProductList() { public void initProductList() {
new Thread(() -> { new Thread(() -> {
......
package ai.qiwu.com.xiaoduhome.service;
import ai.qiwu.com.xiaoduhome.common.OkHttp3Utils;
import ai.qiwu.com.xiaoduhome.pojo.data.ProjectData;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author 苗权威
* @dateTime 20-1-15 下午8:24
*/
@Slf4j
@Component
public class ScheduleServiceNew implements InitializingBean {
public static volatile List<ProjectData> allProjects = new ArrayList<>();
private static volatile Map<String, ProjectData> botAccount2Project = new HashMap<>();
private static volatile Map<String, ProjectData> name2Project = new HashMap<>();
private static volatile Map<String, Map<String, Long>> channel2BotAccountList = new HashMap<>();
@Override
public void afterPropertiesSet() throws Exception {
getAllProjects();
}
private void getAllProjects() {
new Thread(() -> {
try {
String response = OkHttp3Utils.doGet(DplbotServiceUtil.HOST_UTL+"/audio_box/project");
if (StringUtils.isNotBlank(response)) {
JSONObject object = JSON.parseObject(response);
List<ProjectData> list = object.getObject("bots", List.class);
Map<String, Map<String, Long>> map = object.getObject("channelAcc", Map.class);
if (!CollectionUtils.isEmpty(list)) {
final Map<String, ProjectData> botAcc = new HashMap<>();
final Map<String, ProjectData> name = new HashMap<>();
list.forEach(projectData -> {
botAcc.put(projectData.getBotAccount(), projectData);
name.put(projectData.getName(), projectData);
});
botAccount2Project = botAcc;
name2Project = name;
allProjects = list;
}
if (!CollectionUtils.isEmpty(map)) {
channel2BotAccountList = map;
}
}
} catch (Exception e) {
log.warn("ScheduleServiceNew#getAllProjects获取所有作品信息失败:"+e);
}
}).start();
}
static ProjectData getProjectByName(String name) {
return name2Project.get(name);
}
static ProjectData getProjectByBotAccount(String botAccount) {
return botAccount2Project.get(botAccount);
}
public static List<ProjectData> getTheChannelAllProjectData(String channel) {
return channel2BotAccountList.get(channel).keySet().stream().map(s -> botAccount2Project.get(s)).collect(Collectors.toList());
}
public static List<ProjectData> getTheChannelProjectsByWatch(String channel) {
TreeMap<Long, String> order = new TreeMap<>(Comparator.reverseOrder());
channel2BotAccountList.get(channel).forEach((key, value) -> order.put(value, key));
List<ProjectData> datas = new ArrayList<>();
for (String botAcc: order.values()) {
datas.add(botAccount2Project.get(botAcc));
}
return datas;
}
}
...@@ -30,8 +30,13 @@ public class InitialData implements InitializingBean { ...@@ -30,8 +30,13 @@ public class InitialData implements InitializingBean {
@Value("${csvDic}") @Value("${csvDic}")
private String csvDic; private String csvDic;
private static volatile Map<String, Map<String, Map<String, String>>> recordMap; @Value("${csvChildDic}")
private static volatile Map<String, Map<String, Map<String, Map<String, String>>>> audioMap; private String csvChildDic;
static volatile Map<String, Map<String, Map<String, String>>> recordMap;
static volatile Map<String, Map<String, Map<String, String>>> childRecordMap;
static volatile Map<String, Map<String, Map<String, Map<String, String>>>> audioMap;
static volatile Map<String, Map<String, Map<String, Map<String, String>>>> childAudioMap;
static volatile Map<String, Boolean> botAccount2ItsCache; static volatile Map<String, Boolean> botAccount2ItsCache;
static { static {
...@@ -106,6 +111,71 @@ public class InitialData implements InitializingBean { ...@@ -106,6 +111,71 @@ public class InitialData implements InitializingBean {
} catch (Exception e) { } catch (Exception e) {
log.error(e.toString()); log.error(e.toString());
} }
try {
File[] csvFiles = new File(csvChildDic).listFiles((dir, name) -> StringUtils.endsWith(name, ".csv"));
if (csvFiles != null && csvFiles.length != 0) {
CSVParser reader;
for (File file: csvFiles) {
String fileName = file.getName();
int i = fileName.indexOf("_");
String botAccount = fileName.substring(0, i);
boolean record = Integer.valueOf(fileName.substring(i+1, i+2)) == 1;
reader = CSVFormat.EXCEL.parse(new BufferedReader(new InputStreamReader(
new FileInputStream(file), Charset.forName("UTF-8"))));
if (record) {
if (childRecordMap.containsKey(botAccount)) {
log.error("重复:{}",fileName);
continue;
}
Map<String, Map<String, String>> npcName2nameId = childRecordMap.computeIfAbsent(botAccount, s -> new HashMap<>());
int j = 0;
// "person", "mood", "md5", "id", "upUrl"
for (CSVRecord line: reader) {
if (j == 0) {
j++;
continue;
}
String npcName = line.get(0);
String md5 = line.get(2);
md5 = md5.substring(0, md5.indexOf("."));
String id = line.get(3);
Map<String, String> mp3Name2Id = npcName2nameId.computeIfAbsent(npcName, s -> new HashMap<>());
mp3Name2Id.put(md5, id);
}
botAccount2ItsCache.put(botAccount, true);
} else {
if (childAudioMap.containsKey(botAccount)) {
log.error("重复:{}",fileName);
continue;
}
Map<String, Map<String, Map<String, String>>> person2toneMd5Id = childAudioMap.computeIfAbsent(botAccount, s -> new HashMap<>());
int j = 0;
for (CSVRecord line: reader) {
if (j == 0) {
j++;
continue;
}
String person = line.get(0);
String mood = line.get(1);
String md5 = line.get(2);
if (StringUtils.endsWith(md5, ".wav")) continue;
md5 = md5.substring(0, md5.indexOf("."));
String id = line.get(3);
Map<String, Map<String, String>> tone2Md5Id = person2toneMd5Id.computeIfAbsent(person, s -> new HashMap<>());
Map<String, String> md52Id = tone2Md5Id.computeIfAbsent(mood, s -> new HashMap<>());
md52Id.put(md5, id);
}
botAccount2ItsCache.put(botAccount, false);
}
reader.close();
}
} else {
log.warn("没有数据文件");
}
} catch (Exception e) {
log.error(e.toString());
}
} }
static String getRecordId(String botAccount, String npcName, String text) { static String getRecordId(String botAccount, String npcName, String text) {
......
package ai.qiwu.com.xiaoduhome.spirit;
import ai.qiwu.com.xiaoduhome.common.OkHttp3Utils;
import ai.qiwu.com.xiaoduhome.common.Utils;
import ai.qiwu.com.xiaoduhome.service.DplbotServiceUtil;
import ai.qiwu.com.xiaoduhome.xiaoai.common.XiaoAiConstants;
import com.alibaba.da.coin.ide.spi.meta.Action;
import com.alibaba.da.coin.ide.spi.meta.AskedInfoMsg;
import com.alibaba.da.coin.ide.spi.meta.ExecuteCode;
import com.alibaba.da.coin.ide.spi.meta.ResultType;
import com.alibaba.da.coin.ide.spi.standard.TaskQuery;
import com.alibaba.da.coin.ide.spi.standard.TaskResult;
import com.alibaba.fastjson.JSON;
import com.baidu.dueros.data.response.directive.Directive;
import com.baidu.dueros.data.response.directive.audioplayer.AudioPlayerDirective;
import com.baidu.dueros.model.Response;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVParser;
import org.apache.commons.csv.CSVRecord;
import org.apache.commons.lang3.RandomUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.io.*;
import java.nio.charset.Charset;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import static ai.qiwu.com.xiaoduhome.spirit.InitialData.*;
import static ai.qiwu.com.xiaoduhome.spirit.InitialData.botAccount2ItsCache;
/**
* @author 苗权威
* 20-1-9 下午5:04
*/
@Service
@Slf4j
public class SpiritRedisService {
@Value("${csvDic}")
private String csvDic;
@Value("${csvChildDic}")
private String csvChildDic;
private static final String AB_REGEX = "\uD83C\uDD70(.*?)\uD83C\uDD71";
private final StringRedisTemplate stringRedisTemplate;
public static final String PREFIX_REDIS = "audio_box_";
public static final String PREFIX_REDIS_IDLE = "audio_idle_";
public SpiritRedisService(StringRedisTemplate stringRedisTemplate) {
this.stringRedisTemplate = stringRedisTemplate;
}
/**
* 获取返回给天猫的数据
* @param request 请求参数
* @return 返回数据封装在开发包中的TaskResult
*/
public TaskResult getResponse(TaskQuery request, int type) {
return getNeededParam(request, type);
}
/**
* 解析获取需要的参数信息:用户的话,用户的id,意图id
* @param request 请求参数
* @return 返回数据封装在开发包中的TaskResult
*/
private TaskResult getNeededParam(TaskQuery request, int type) {
String userId = getUserId(request);
String redisId = PREFIX_REDIS+userId;
if (StringUtils.isBlank(userId)) return buildTextTaskResult("不好意思好像出了什么问题,正在抓紧修复中", request.getIntentId());
Long intentId = request.getIntentId();
try {
// long start = System.currentTimeMillis();
String data = stringRedisTemplate.opsForValue().get(redisId);
// log.info("redis get cost:"+(System.currentTimeMillis()-start));
if (StringUtils.isNotBlank(data)) {
String redisIdleId = PREFIX_REDIS_IDLE+userId;
if (data.equals("out")) {
String idleNum = stringRedisTemplate.opsForValue().get(redisIdleId);
boolean firstIdle;
if ((firstIdle = StringUtils.isBlank(idleNum)) || idleNum.equals("1")) {
try {
Thread.sleep(1000);
} catch (Exception e){}
data = stringRedisTemplate.opsForValue().get(redisId);
if (StringUtils.isNotBlank(data) && !data.equals("out")) {
stringRedisTemplate.delete(redisIdleId);
stringRedisTemplate.delete(redisId);
return buildAudioTaskResult(Arrays.asList(data.split(",")), intentId);
}
if (firstIdle) idleNum = "1";
else idleNum = "2";
stringRedisTemplate.opsForValue().set(redisIdleId, idleNum, 10, TimeUnit.SECONDS);
return buildTextTaskResult((RandomUtils.nextInt() & 1) == 1 ? XiaoAiConstants.TTS.WAIT_WORD_1 :
XiaoAiConstants.TTS.WAIT_WORD_2, intentId);
} else {
stringRedisTemplate.delete(redisIdleId);
stringRedisTemplate.delete(redisId);
}
} else {
stringRedisTemplate.delete(redisId);
stringRedisTemplate.delete(redisIdleId);
return buildAudioTaskResult(Arrays.asList(data.split(",")), intentId);
}
}
} catch (Exception e) {
log.error("tmall redis error:"+e);
}
String userWord = request.getUtterance();
// log.info("天猫精灵用户说的话:"+userWord);
try {
Future<TaskResult> future = DplbotServiceUtil.getPOOL().submit(() -> requestTerminate(userId, userWord, type, intentId));
return future.get(1700, TimeUnit.MILLISECONDS);
} catch (InterruptedException | ExecutionException e) {
log.error("天猫精灵出现问题:{}", ExceptionUtils.getStackTrace(e));
} catch (TimeoutException e) {
log.warn("超时");
stringRedisTemplate.opsForValue().setIfAbsent(redisId, "out", 20, TimeUnit.SECONDS);
return buildTextTaskResult("不好意思晓悟没有听清您刚才说的话,请再重复一遍吧", intentId);
}
return buildTextTaskResult("不好意思请再说一遍吧", intentId);
}
private TaskResult requestTerminate(String userId, String userWord, Integer type, Long intentId) throws IOException {
SpiritTerminateRequest requestPojo = new SpiritTerminateRequest();
requestPojo.setUid(userId);
// requestPojo.setAccess(XiaoAiConstants.DEVICE_NAME);
requestPojo.setMsg(userWord);
String requestJsonStr = JSON.toJSONString(requestPojo);
//log.info("向终端发出请求的参数信息:{}", requestJsonStr);
HashMap<String, String> headers = new HashMap<>();
headers.put("Content-Type", "application/json;charset=utf-8");
String channelId;
switch (type) {
case 2:
case 4: channelId = "tianmao-jiaoyou-audio-child-test";break;
case 3:
case 5: channelId= "tianmao-jiaoyou-audio-adult-test";break;
default: channelId = "tianmao-jiaoyou-audio-test";
}
headers.put("App-Channel-Id", channelId);
String resStr= OkHttp3Utils.doPostJsonStr(XiaoAiConstants.QI_WU_TERMINATE_DIDI, requestJsonStr, headers);
if (resStr == null) {
return null;
}
// log.info("天猫精灵晓悟返回:"+resStr);
TaskResult taskResult = null;
try {
final SpiritTerminateResponse response = JSON.parseObject(resStr, SpiritTerminateResponse.class);
if (CollectionUtils.isEmpty(response.getDialogs())) {
taskResult = buildTextTaskResult("不好意思晓悟没有听清您刚才说的话,请再重复一遍吧", intentId);
return taskResult;
}
List<String> list = dealResponse(response, userId);
if (CollectionUtils.isEmpty(list)) {
StringBuilder builder = new StringBuilder();
response.getDialogs().forEach(dialog -> builder.append(buildText(dialog.getText())));
if (builder.length() != 0) taskResult = buildTextTaskResult(builder.toString(), intentId);
} else {
taskResult = buildAudioTaskResult(list, intentId);
}
} catch (Exception e) {
log.error(e.toString());
}
if (taskResult == null) {
taskResult = buildTextTaskResult("不好意思晓悟没有听清您刚才说的话,请再重复一遍吧", intentId);
}
return taskResult;
}
private List<String> dealResponse(SpiritTerminateResponse response, String userId) {
List<String> idList = new ArrayList<>();
List<Dialog> dialogs = response.getDialogs();
String botAccount, npcName, id, person, mood;
for (Dialog dialog: dialogs) {
botAccount = dialog.getBotAccount();
Boolean record = botAccount2ItsCache.get(botAccount);
if (record == null) return null;
else if (record) {
npcName = dialog.getNpcName();
Collection<String> ls = dealWithSep(dialog, true, botAccount, npcName, null);
if (CollectionUtils.isEmpty(ls)) {
id = InitialData.getRecordId(botAccount, npcName, dialog.getText());
if (StringUtils.isNotBlank(id)) idList.add(id);
else return null;
} else {
idList.addAll(ls);
}
} else {
person = dialog.getPerson();
mood = dialog.getTone();
Collection<String> ls = dealWithSep(dialog, false, botAccount, person, mood);
if (CollectionUtils.isEmpty(ls)) {
id = InitialData.getAudioId(botAccount, person, mood, dialog.getText());
if (StringUtils.isNotBlank(id)) idList.add(id);
else return null;
} else {
idList.addAll(ls);
}
}
}
if (idList.size() > 0) {
stringRedisTemplate.opsForValue().setIfPresent(PREFIX_REDIS+userId, StringUtils.join(idList, ","), 20, TimeUnit.SECONDS);
}
return idList;
}
private Collection<String> dealWithSep(Dialog dialog, Boolean record, String botAccount,
String porn, String mood) {
String text = dialog.getText();
List<String> variableTextList = new ArrayList<>();
// 获取AB之间的变量,为空则忽略
Pattern pattern = Pattern.compile(AB_REGEX);
Matcher matcher = pattern.matcher(text);
while (matcher.find()) {
String variableText = matcher.group(1);
if (StringUtils.isNotBlank(variableText)) variableTextList.add(variableText);
}
if (variableTextList.size() != 0) {
TreeMap<String, String> combineMp3Text2FilePath = new TreeMap<>(Comparator.comparingInt(text::indexOf));
// 非变量部分
String[] notVariableTextArray = pattern.split(text);
int i = 0;
for (String notVariableText: notVariableTextArray) {
if (StringUtils.isBlank(notVariableText)) {
++i;
continue;
}
if (i++ == notVariableTextArray.length-1) {
//log.info("888");
boolean notVariableLast = text.lastIndexOf(notVariableText)+notVariableText.length() == text.length();
//log.info("notVariableLast:{}", notVariableLast);
if (notVariableLast) {
String last = notVariableText;
last = last.replaceAll("\\p{P}", "");
if (StringUtils.isBlank(last)) {
//log.info("last is empty");
break;
}
}
}
String id;
if (record) {
id = InitialData.getRecordId(botAccount, porn, notVariableText);
} else {
id = InitialData.getAudioId(botAccount, porn, mood, notVariableText);
}
if (StringUtils.isBlank(id)) return null;
combineMp3Text2FilePath.put(notVariableText, id);
}
for (String variableText: variableTextList) {
String id;
if (record) {
id = InitialData.getRecordId(botAccount, porn, variableText);
} else {
id = InitialData.getAudioId(botAccount, porn, mood, variableText);
}
if (StringUtils.isBlank(id)) return null;
combineMp3Text2FilePath.put(variableText, id);
}
return combineMp3Text2FilePath.values();
}
return null;
}
/**
* 封装返回数据在TaskResult中
* @param text TTS文本内容
* @param intentId 意图id
* @return 返回数据封装在开发包中的TaskResult
*/
private TaskResult buildTextTaskResult(String text, Long intentId) {
TaskResult result = new TaskResult();
result.setReply(buildText(text));
result.setResultType(ResultType.ASK_INF);
result.setExecuteCode(ExecuteCode.SUCCESS);
result.setAskedInfos(Collections.singletonList(new AskedInfoMsg("any", intentId)));
return result;
}
private TaskResult buildAudioTaskResult(List<String> ids, Long intentId) {
TaskResult result = new TaskResult();
result.setReply("叮咚");
result.setResultType(ResultType.ASK_INF);
result.setExecuteCode(ExecuteCode.SUCCESS);
result.setAskedInfos(Collections.singletonList(new AskedInfoMsg("any", intentId)));
List<Action> actions = ids.stream().filter(StringUtils::isNotBlank).map(s -> {
Action action = new Action("audioPlayGenieSource");
action.addProperty("audioGenieId", s);
return action;
}).collect(Collectors.toList());
result.setActions(actions);
return result;
}
private String buildText(String text) {
Pattern pattern = Pattern.compile(Utils.getRegexSeperate());
StringBuilder builder = new StringBuilder();
List<String> actors = DplbotServiceUtil.seperateActor(text, pattern);
String[] word = DplbotServiceUtil.seperateActorWord(text, pattern);
int i = 0;
for (String actor: actors) {
builder.append(actor).append("说:").append(word[i].replaceAll("\\p{P}", "")).append("。");
i++;
}
if (builder.length() == 0) builder.append(text);
return builder.toString();
}
private String getUserId(TaskQuery query) {
log.warn("requestData:{}", query.getRequestData());
String userId = query.getRequestData().get("userOpenId");
if (StringUtils.isBlank(userId)) {
userId = query.getRequestData().get("deviceOpenId");
}
if (StringUtils.isBlank(userId)) log.error("天猫精灵无法获取到唯一标识的id");
return userId;
}
public void updateSpiritCsv() {
Map<String, Boolean> botAccount2ItsCacheTemp = new HashMap<>();
try {
Map<String, Map<String, Map<String, String>>> recordMapTemp = new HashMap<>();
Map<String, Map<String, Map<String, Map<String, String>>>> audioMapTemp = new HashMap<>();
File[] csvFiles = new File(csvDic).listFiles((dir, name) -> StringUtils.endsWith(name, ".csv"));
if (csvFiles != null && csvFiles.length != 0) {
CSVParser reader;
for (File file: csvFiles) {
String fileName = file.getName();
int i = fileName.indexOf("_");
String botAccount = fileName.substring(0, i);
boolean record = Integer.valueOf(fileName.substring(i+1, i+2)) == 1;
reader = CSVFormat.EXCEL.parse(new BufferedReader(new InputStreamReader(
new FileInputStream(file), Charset.forName("UTF-8"))));
if (record) {
if (recordMapTemp.containsKey(botAccount)) {
log.error("重复:{}",fileName);
continue;
}
Map<String, Map<String, String>> npcName2nameId = recordMapTemp.computeIfAbsent(botAccount, s -> new HashMap<>());
int j = 0;
// "person", "mood", "md5", "id", "upUrl"
for (CSVRecord line: reader) {
if (j == 0) {
j++;
continue;
}
String npcName = line.get(0);
String md5 = line.get(2);
md5 = md5.substring(0, md5.indexOf("."));
String id = line.get(3);
Map<String, String> mp3Name2Id = npcName2nameId.computeIfAbsent(npcName, s -> new HashMap<>());
mp3Name2Id.put(md5, id);
}
botAccount2ItsCacheTemp.put(botAccount, true);
} else {
if (audioMapTemp.containsKey(botAccount)) {
log.error("重复:{}",fileName);
continue;
}
Map<String, Map<String, Map<String, String>>> person2toneMd5Id = audioMapTemp.computeIfAbsent(botAccount, s -> new HashMap<>());
int j = 0;
for (CSVRecord line: reader) {
if (j == 0) {
j++;
continue;
}
String person = line.get(0);
String mood = line.get(1);
String md5 = line.get(2);
if (StringUtils.endsWith(md5, ".wav")) continue;
md5 = md5.substring(0, md5.indexOf("."));
String id = line.get(3);
Map<String, Map<String, String>> tone2Md5Id = person2toneMd5Id.computeIfAbsent(person, s -> new HashMap<>());
Map<String, String> md52Id = tone2Md5Id.computeIfAbsent(mood, s -> new HashMap<>());
md52Id.put(md5, id);
}
botAccount2ItsCacheTemp.put(botAccount, false);
}
reader.close();
}
if (recordMapTemp.size() != 0) {
log.info("recordMapTemp:"+recordMapTemp.size());
recordMap = recordMapTemp;
}
if (audioMapTemp.size() != 0) {
log.info("audioMapTemp:"+audioMapTemp.size());
audioMap = audioMapTemp;
}
} else {
log.warn("没有数据文件");
}
} catch (Exception e) {
log.error(e.toString());
}
try {
Map<String, Map<String, Map<String, String>>> childRecordMapTemp = new HashMap<>();
Map<String, Map<String, Map<String, Map<String, String>>>> childAudioMapTemp = new HashMap<>();
File[] csvFiles = new File(csvChildDic).listFiles((dir, name) -> StringUtils.endsWith(name, ".csv"));
if (csvFiles != null && csvFiles.length != 0) {
CSVParser reader;
for (File file: csvFiles) {
String fileName = file.getName();
int i = fileName.indexOf("_");
String botAccount = fileName.substring(0, i);
boolean record = Integer.valueOf(fileName.substring(i+1, i+2)) == 1;
reader = CSVFormat.EXCEL.parse(new BufferedReader(new InputStreamReader(
new FileInputStream(file), Charset.forName("UTF-8"))));
if (record) {
if (childRecordMapTemp.containsKey(botAccount)) {
log.error("重复:{}",fileName);
continue;
}
Map<String, Map<String, String>> npcName2nameId = childRecordMapTemp.computeIfAbsent(botAccount, s -> new HashMap<>());
int j = 0;
// "person", "mood", "md5", "id", "upUrl"
for (CSVRecord line: reader) {
if (j == 0) {
j++;
continue;
}
String npcName = line.get(0);
String md5 = line.get(2);
md5 = md5.substring(0, md5.indexOf("."));
String id = line.get(3);
Map<String, String> mp3Name2Id = npcName2nameId.computeIfAbsent(npcName, s -> new HashMap<>());
mp3Name2Id.put(md5, id);
}
botAccount2ItsCacheTemp.put(botAccount, true);
} else {
if (childAudioMapTemp.containsKey(botAccount)) {
log.error("重复:{}",fileName);
continue;
}
Map<String, Map<String, Map<String, String>>> person2toneMd5Id = childAudioMapTemp.computeIfAbsent(botAccount, s -> new HashMap<>());
int j = 0;
for (CSVRecord line: reader) {
if (j == 0) {
j++;
continue;
}
String person = line.get(0);
String mood = line.get(1);
String md5 = line.get(2);
if (StringUtils.endsWith(md5, ".wav")) continue;
md5 = md5.substring(0, md5.indexOf("."));
String id = line.get(3);
Map<String, Map<String, String>> tone2Md5Id = person2toneMd5Id.computeIfAbsent(person, s -> new HashMap<>());
Map<String, String> md52Id = tone2Md5Id.computeIfAbsent(mood, s -> new HashMap<>());
md52Id.put(md5, id);
}
botAccount2ItsCacheTemp.put(botAccount, false);
}
reader.close();
}
if (childRecordMapTemp.size() != 0) {
log.info("childRecordMapTemp:"+childRecordMapTemp.size());
childRecordMap = childRecordMapTemp;
}
if (childAudioMapTemp.size() != 0) {
log.info("childAudioMapTemp:"+childAudioMapTemp.size());
childAudioMap = childAudioMapTemp;
}
} else {
log.warn("没有数据文件");
}
} catch (Exception e) {
log.error(e.toString());
}
if (botAccount2ItsCacheTemp.size() != 0) {
log.info("botAccount2ItsCacheTemp:"+botAccount2ItsCacheTemp.size());
botAccount2ItsCache = botAccount2ItsCacheTemp;
}
}
}
...@@ -12,20 +12,25 @@ import com.alibaba.da.coin.ide.spi.standard.TaskQuery; ...@@ -12,20 +12,25 @@ import com.alibaba.da.coin.ide.spi.standard.TaskQuery;
import com.alibaba.da.coin.ide.spi.standard.TaskResult; import com.alibaba.da.coin.ide.spi.standard.TaskResult;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVParser;
import org.apache.commons.csv.CSVRecord;
import org.apache.commons.lang3.RandomUtils; import org.apache.commons.lang3.RandomUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.commons.lang3.exception.ExceptionUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.io.*; import java.io.*;
import java.nio.charset.Charset;
import java.util.*; import java.util.*;
import java.util.concurrent.*; import java.util.concurrent.*;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static ai.qiwu.com.xiaoduhome.spirit.InitialData.botAccount2ItsCache; import static ai.qiwu.com.xiaoduhome.spirit.InitialData.*;
import static ai.qiwu.com.xiaoduhome.xiaoai.service.XiaoAiService.LAST_OUTTIME_MARK; import static ai.qiwu.com.xiaoduhome.xiaoai.service.XiaoAiService.LAST_OUTTIME_MARK;
import static ai.qiwu.com.xiaoduhome.xiaoai.service.XiaoAiService.OUTTIME_TYPE_0; import static ai.qiwu.com.xiaoduhome.xiaoai.service.XiaoAiService.OUTTIME_TYPE_0;
...@@ -38,6 +43,12 @@ import static ai.qiwu.com.xiaoduhome.xiaoai.service.XiaoAiService.OUTTIME_TYPE_0 ...@@ -38,6 +43,12 @@ import static ai.qiwu.com.xiaoduhome.xiaoai.service.XiaoAiService.OUTTIME_TYPE_0
@Slf4j @Slf4j
public class SpiritService { public class SpiritService {
@Value("${csvDic}")
private String csvDic;
@Value("${csvChildDic}")
private String csvChildDic;
private static final String AB_REGEX = "\uD83C\uDD70(.*?)\uD83C\uDD71"; private static final String AB_REGEX = "\uD83C\uDD70(.*?)\uD83C\uDD71";
private static final ConcurrentHashMap<String, TaskResult> LAST_OUTTIME_RESULT = new ConcurrentHashMap<>(); private static final ConcurrentHashMap<String, TaskResult> LAST_OUTTIME_RESULT = new ConcurrentHashMap<>();
...@@ -307,6 +318,163 @@ public class SpiritService { ...@@ -307,6 +318,163 @@ public class SpiritService {
return userId; return userId;
} }
public void updateSpiritCsv() {
Map<String, Boolean> botAccount2ItsCacheTemp = new HashMap<>();
try {
Map<String, Map<String, Map<String, String>>> recordMapTemp = new HashMap<>();
Map<String, Map<String, Map<String, Map<String, String>>>> audioMapTemp = new HashMap<>();
File[] csvFiles = new File(csvDic).listFiles((dir, name) -> StringUtils.endsWith(name, ".csv"));
if (csvFiles != null && csvFiles.length != 0) {
CSVParser reader;
for (File file: csvFiles) {
String fileName = file.getName();
int i = fileName.indexOf("_");
String botAccount = fileName.substring(0, i);
boolean record = Integer.valueOf(fileName.substring(i+1, i+2)) == 1;
reader = CSVFormat.EXCEL.parse(new BufferedReader(new InputStreamReader(
new FileInputStream(file), Charset.forName("UTF-8"))));
if (record) {
if (recordMapTemp.containsKey(botAccount)) {
log.error("重复:{}",fileName);
continue;
}
Map<String, Map<String, String>> npcName2nameId = recordMapTemp.computeIfAbsent(botAccount, s -> new HashMap<>());
int j = 0;
// "person", "mood", "md5", "id", "upUrl"
for (CSVRecord line: reader) {
if (j == 0) {
j++;
continue;
}
String npcName = line.get(0);
String md5 = line.get(2);
md5 = md5.substring(0, md5.indexOf("."));
String id = line.get(3);
Map<String, String> mp3Name2Id = npcName2nameId.computeIfAbsent(npcName, s -> new HashMap<>());
mp3Name2Id.put(md5, id);
}
botAccount2ItsCacheTemp.put(botAccount, true);
} else {
if (audioMapTemp.containsKey(botAccount)) {
log.error("重复:{}",fileName);
continue;
}
Map<String, Map<String, Map<String, String>>> person2toneMd5Id = audioMapTemp.computeIfAbsent(botAccount, s -> new HashMap<>());
int j = 0;
for (CSVRecord line: reader) {
if (j == 0) {
j++;
continue;
}
String person = line.get(0);
String mood = line.get(1);
String md5 = line.get(2);
if (StringUtils.endsWith(md5, ".wav")) continue;
md5 = md5.substring(0, md5.indexOf("."));
String id = line.get(3);
Map<String, Map<String, String>> tone2Md5Id = person2toneMd5Id.computeIfAbsent(person, s -> new HashMap<>());
Map<String, String> md52Id = tone2Md5Id.computeIfAbsent(mood, s -> new HashMap<>());
md52Id.put(md5, id);
}
botAccount2ItsCacheTemp.put(botAccount, false);
}
reader.close();
}
if (recordMapTemp.size() != 0) {
log.info("recordMapTemp:"+recordMapTemp.size());
recordMap = recordMapTemp;
}
if (audioMapTemp.size() != 0) {
log.info("audioMapTemp:"+audioMapTemp.size());
audioMap = audioMapTemp;
}
} else {
log.warn("没有数据文件");
}
} catch (Exception e) {
log.error(e.toString());
}
try {
Map<String, Map<String, Map<String, String>>> childRecordMapTemp = new HashMap<>();
Map<String, Map<String, Map<String, Map<String, String>>>> childAudioMapTemp = new HashMap<>();
File[] csvFiles = new File(csvChildDic).listFiles((dir, name) -> StringUtils.endsWith(name, ".csv"));
if (csvFiles != null && csvFiles.length != 0) {
CSVParser reader;
for (File file: csvFiles) {
String fileName = file.getName();
int i = fileName.indexOf("_");
String botAccount = fileName.substring(0, i);
boolean record = Integer.valueOf(fileName.substring(i+1, i+2)) == 1;
reader = CSVFormat.EXCEL.parse(new BufferedReader(new InputStreamReader(
new FileInputStream(file), Charset.forName("UTF-8"))));
if (record) {
if (childRecordMapTemp.containsKey(botAccount)) {
log.error("重复:{}",fileName);
continue;
}
Map<String, Map<String, String>> npcName2nameId = childRecordMapTemp.computeIfAbsent(botAccount, s -> new HashMap<>());
int j = 0;
// "person", "mood", "md5", "id", "upUrl"
for (CSVRecord line: reader) {
if (j == 0) {
j++;
continue;
}
String npcName = line.get(0);
String md5 = line.get(2);
md5 = md5.substring(0, md5.indexOf("."));
String id = line.get(3);
Map<String, String> mp3Name2Id = npcName2nameId.computeIfAbsent(npcName, s -> new HashMap<>());
mp3Name2Id.put(md5, id);
}
botAccount2ItsCacheTemp.put(botAccount, true);
} else {
if (childAudioMapTemp.containsKey(botAccount)) {
log.error("重复:{}",fileName);
continue;
}
Map<String, Map<String, Map<String, String>>> person2toneMd5Id = childAudioMapTemp.computeIfAbsent(botAccount, s -> new HashMap<>());
int j = 0;
for (CSVRecord line: reader) {
if (j == 0) {
j++;
continue;
}
String person = line.get(0);
String mood = line.get(1);
String md5 = line.get(2);
if (StringUtils.endsWith(md5, ".wav")) continue;
md5 = md5.substring(0, md5.indexOf("."));
String id = line.get(3);
Map<String, Map<String, String>> tone2Md5Id = person2toneMd5Id.computeIfAbsent(person, s -> new HashMap<>());
Map<String, String> md52Id = tone2Md5Id.computeIfAbsent(mood, s -> new HashMap<>());
md52Id.put(md5, id);
}
botAccount2ItsCacheTemp.put(botAccount, false);
}
reader.close();
}
if (childRecordMapTemp.size() != 0) {
log.info("childRecordMapTemp:"+childRecordMapTemp.size());
childRecordMap = childRecordMapTemp;
}
if (childAudioMapTemp.size() != 0) {
log.info("childAudioMapTemp:"+childAudioMapTemp.size());
childAudioMap = childAudioMapTemp;
}
} else {
log.warn("没有数据文件");
}
} catch (Exception e) {
log.error(e.toString());
}
if (botAccount2ItsCacheTemp.size() != 0) {
log.info("botAccount2ItsCacheTemp:"+botAccount2ItsCacheTemp.size());
botAccount2ItsCache = botAccount2ItsCacheTemp;
}
}
public static void main(String[] args) { public static void main(String[] args) {
// System.out.println(buildText("【小悟@正常】推荐如下作品:《小狗小白》、《妖刀异闻录》、《星球问答》 。你可以说:“打开某作品”")); // System.out.println(buildText("【小悟@正常】推荐如下作品:《小狗小白》、《妖刀异闻录》、《星球问答》 。你可以说:“打开某作品”"));
// System.out.println(buildText("不好意思请在说一遍吧")); // System.out.println(buildText("不好意思请在说一遍吧"));
......
...@@ -54,7 +54,8 @@ public class RequestTerminal { ...@@ -54,7 +54,8 @@ public class RequestTerminal {
case 2: headers = ADULT_HEADERS; break; case 2: headers = ADULT_HEADERS; break;
default: headers = ALL_HEADERS; break; default: headers = ALL_HEADERS; break;
} }
String resStr = OkHttp3Utils.doPostJsonStr(XiaoAiConstants.QI_WU_TERMINATE_DIDI, requestJsonStr, headers);; // String resStr = OkHttp3Utils.doPostJsonStr(XiaoAiConstants.QI_WU_TERMINATE_DIDI, requestJsonStr, headers);;
String resStr = OkHttp3Utils.doPostJsonStr("http://didi-gz5.jiaoyou365.com:8070/api/chat2", requestJsonStr, headers);;
// if (userId.equals(XiaoAiService.deviceId)) { // if (userId.equals(XiaoAiService.deviceId)) {
// resStr = OkHttp3Utils.doPostJsonStr(XiaoAiConstants.QI_WU_TERMINATE_DIDI, requestJsonStr, headers); // resStr = OkHttp3Utils.doPostJsonStr(XiaoAiConstants.QI_WU_TERMINATE_DIDI, requestJsonStr, headers);
// }else { // }else {
......
...@@ -20,7 +20,7 @@ public interface XiaoAiConstants { ...@@ -20,7 +20,7 @@ public interface XiaoAiConstants {
interface ERROR_MSG { interface ERROR_MSG {
String SORRY_REPEAT = "不好意思,请再说一遍吧"; String SORRY_REPEAT = "不好意思,请再说一遍吧";
String TIME_OUT = "请稍等"; String TIME_OUT = "不好意思我没听清,请再说一遍吧";
String TERMINATE_IO_EXCEPTION = "请求终端接口时发生IO错误"; String TERMINATE_IO_EXCEPTION = "请求终端接口时发生IO错误";
String HTTP_CONNECTION_CLOSE_EXCEPTION = "关闭与终端接口链接时出错"; String HTTP_CONNECTION_CLOSE_EXCEPTION = "关闭与终端接口链接时出错";
} }
......
package ai.qiwu.com.xiaoduhome.xiaoai.model.response; package ai.qiwu.com.xiaoduhome.xiaoai.model.response;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.Response; import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.Response;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import lombok.ToString; import lombok.ToString;
...@@ -14,6 +15,7 @@ import java.util.Map; ...@@ -14,6 +15,7 @@ import java.util.Map;
@Getter @Getter
@Setter @Setter
@ToString @ToString
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public class XiaoAiResponse { public class XiaoAiResponse {
private String version; private String version;
private Map<String, String> session_attributes; private Map<String, String> session_attributes;
......
...@@ -5,6 +5,7 @@ import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.directive.Dire ...@@ -5,6 +5,7 @@ import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.directive.Dire
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.registerEvent.RegisterEvent; import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.registerEvent.RegisterEvent;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.toDisplay.ToDisplay; import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.toDisplay.ToDisplay;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.toSpeak.ToSpeak; import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.toSpeak.ToSpeak;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import lombok.ToString; import lombok.ToString;
...@@ -18,6 +19,7 @@ import java.util.List; ...@@ -18,6 +19,7 @@ import java.util.List;
@Getter @Getter
@Setter @Setter
@ToString @ToString
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public class Response { public class Response {
private ToSpeak to_speak; private ToSpeak to_speak;
private ToDisplay to_display; private ToDisplay to_display;
......
package ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.actionProperty; package ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.actionProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import lombok.ToString; import lombok.ToString;
...@@ -13,6 +14,11 @@ import java.util.List; ...@@ -13,6 +14,11 @@ import java.util.List;
@Getter @Getter
@Setter @Setter
@ToString @ToString
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public class ActionProperty { public class ActionProperty {
private List<Long> file_id_list; private List<Long> file_id_list;
private AppIntentInfo app_intent_info;
private String app_h5_url;
private String quick_app_path;
} }
package ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.actionProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
* @author 苗权威
* @dateTime 20-1-10 下午2:33
*/
@Getter
@Setter
@ToString
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public class AppIntentInfo {
private String intent_type;
private String uri;
}
...@@ -18,6 +18,8 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,6 +18,8 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.RandomUtils; import org.apache.commons.lang3.RandomUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.io.File; import java.io.File;
...@@ -61,7 +63,7 @@ public class XiaoAiService { ...@@ -61,7 +63,7 @@ public class XiaoAiService {
private static final Byte OUTTIME_TYPE_1 = 1; private static final Byte OUTTIME_TYPE_1 = 1;
private static final Byte OUTTIME_TYPE_2 = 2; private static final Byte OUTTIME_TYPE_2 = 2;
public static final String deviceId = "XIAOAI_nbNGwoZIS8AmRGVqHog==";//XIAOAI_nbNGwoZIS8AmRGVqHog==,XIAOAI_oIOWfYEFbZGFHB5DzoMA== // public static final String deviceId = "XIAOAI_nbNGwoZIS8AmRGVqHog==";//XIAOAI_nbNGwoZIS8AmRGVqHog==,XIAOAI_oIOWfYEFbZGFHB5DzoMA==
/** /**
* 处理不同意图,type为0则说明是启动,为1则说明是会话进行中,为2则说明用户退出 * 处理不同意图,type为0则说明是启动,为1则说明是会话进行中,为2则说明用户退出
...@@ -410,10 +412,6 @@ public class XiaoAiService { ...@@ -410,10 +412,6 @@ public class XiaoAiService {
// return Utils.modifyDeviceId(userId); // return Utils.modifyDeviceId(userId);
} }
private XiaoAiResponse getLastResult(String userId) {
return LAST_OUTTIME_RESULT.remove(userId);
}
private void task(String userId, String userWord, Integer type) { private void task(String userId, String userWord, Integer type) {
XiaoAiResponse xiaoAiResponse; XiaoAiResponse xiaoAiResponse;
if (userWord == null) { if (userWord == null) {
......
package ai.qiwu.com.xiaoduhome.xiaoai.service;
import ai.qiwu.com.xiaoduhome.common.Constants;
import ai.qiwu.com.xiaoduhome.common.OkHttp3Utils;
import ai.qiwu.com.xiaoduhome.service.DplbotServiceUtil;
import ai.qiwu.com.xiaoduhome.spirit.SpiritRedisService;
import ai.qiwu.com.xiaoduhome.xiaoai.common.RequestTerminal;
import ai.qiwu.com.xiaoduhome.xiaoai.common.RequestWordNullException;
import ai.qiwu.com.xiaoduhome.xiaoai.common.Utils;
import ai.qiwu.com.xiaoduhome.xiaoai.common.XiaoAiConstants;
import ai.qiwu.com.xiaoduhome.xiaoai.model.request.XiaoAiRequest;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.XiaoAiResponse;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.Response;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.directive.AudioItem.AudioItem;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.directive.AudioItem.AudioStream;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.directive.Directive;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.toSpeak.ToSpeak;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.RandomUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.*;
import static ai.qiwu.com.xiaoduhome.common.Constants.TTS_DIDI3_GET_XIAOAI;
import static ai.qiwu.com.xiaoduhome.common.Constants.WelcomeWord.*;
import static ai.qiwu.com.xiaoduhome.service.ScheduleService.jiaoyouChannel2Bots;
import static ai.qiwu.com.xiaoduhome.xiaoai.common.XiaoAiConstants.ERROR_MSG.SORRY_REPEAT;
import static ai.qiwu.com.xiaoduhome.xiaoai.common.XiaoAiConstants.PREFIX_USERID;
import static ai.qiwu.com.xiaoduhome.xiaoai.common.XiaoAiConstants.TTS.WELCOME_WORD_DEFAULT;
/**
* @author mqw
* 20-1-9 上午10:43
*/
@Service
@Slf4j
public class XiaoAiServiceRedis {
private final StringRedisTemplate stringRedisTemplate;
@Autowired
public XiaoAiServiceRedis(StringRedisTemplate stringRedisTemplate) {
this.stringRedisTemplate = stringRedisTemplate;
}
/**
* 处理不同意图,type为0则说明是启动,为1则说明是会话进行中,为2则说明用户退出
* @param request 封装请求信息
* @return 响应结果
*/
public XiaoAiResponse getResponse(XiaoAiRequest request) {
String userId = getUserId(request);
// String userId = "%2FScfTGmNbhn%2Fs8KXMJfZY4nQ%2F";
int type = request.getRequest().getType();
if (Boolean.TRUE.equals(request.getRequest().getIs_monitor())) {
log.info("小爱monitor请求:"+userId);
return buildTextResponse("判定为监控请求,过滤");
}
switch (type) {
case 0 : return dealWithLaunchRequest(request, userId);
case 1 : return dealWithIntentRequest(request, userId);
case 2 : return dealWithEndRequest(userId, request.getType());
default: return buildTextResponse(SORRY_REPEAT);
}
}
/**
* 构建基础返回信息,注意is_session_end字段置为false,
* open_mic这个字段很重要,他会在播放音频或是tts结束后,开麦收音,因为默认麦是关闭的,若不主动打开则小爱在一次会话后退出技能。
* @return 小爱返回信息
*/
private XiaoAiResponse buildResponse() {
XiaoAiResponse response = new XiaoAiResponse();
response.setVersion("1.0");
response.setIs_session_end(false);
Response responseInfo = new Response();
// 这个字段很重要,他会在播放音频或是tts结束后,开麦收音,因为默认麦是关闭的,
// 若不主动打开则小爱在一次会话后退出技能。
responseInfo.setOpen_mic(true);
response.setResponse(responseInfo);
return response;
}
private XiaoAiResponse buildResponseBeforeLoadout(String text) {
XiaoAiResponse response = new XiaoAiResponse();
response.setVersion("1.0");
response.setIs_session_end(true);
Response responseInfo = new Response();
ToSpeak toSpeak = new ToSpeak();
toSpeak.setType(0);
toSpeak.setText(text);
responseInfo.setTo_speak(toSpeak);
response.setResponse(responseInfo);
return response;
}
/**
* 构建语音返回信息
* @param audioUrl 音频文件地址
* @return 小爱返回信息
*/
private XiaoAiResponse buildAudioResponse(String audioUrl) {
XiaoAiResponse response = buildResponse();
Response responseInfo = response.getResponse();
Directive directive = new Directive();
directive.setType("audio");
AudioItem audioItem = new AudioItem();
AudioStream audioStream = new AudioStream();
audioStream.setUrl(audioUrl);
audioItem.setStream(audioStream);
directive.setAudio_item(audioItem);
List<Directive> directives = new ArrayList<>();
directives.add(directive);
responseInfo.setDirectives(directives);
return response;
}
/**
* 构建文字返回信息
* @param text 文字
* @return 小爱返回信息
*/
private XiaoAiResponse buildTextResponse(String text) {
XiaoAiResponse response = buildResponse();
Response responseInfo = response.getResponse();
ToSpeak toSpeak = new ToSpeak();
toSpeak.setType(0);
toSpeak.setText(text);
responseInfo.setTo_speak(toSpeak);
return response;
}
private XiaoAiResponse buildCancelTextResponse(String text) {
XiaoAiResponse response = new XiaoAiResponse();
response.setVersion("1.0");
response.setIs_session_end(true);
Response responseInfo = new Response();
// 这个字段很重要,他会在播放音频或是tts结束后,开麦收音,因为默认麦是关闭的,
// 若不主动打开则小爱在一次会话后退出技能。
responseInfo.setOpen_mic(false);
ToSpeak toSpeak = new ToSpeak();
toSpeak.setType(0);
toSpeak.setText(text);
responseInfo.setTo_speak(toSpeak);
response.setResponse(responseInfo);
return response;
}
/**
* 处理启动意图,返回欢迎语
* @param request 请求信息
* @return 响应信息
*/
private XiaoAiResponse dealWithLaunchRequest(XiaoAiRequest request, String userId) {
String welcomeWord = null;
stringRedisTemplate.delete(SpiritRedisService.PREFIX_REDIS+userId);
String num = RandomStringUtils.randomNumeric(3);
Integer type = request.getType();
switch (type) {
case 1 : {
// welcomeWord = WELCOME_SMART_FORMAT_AI;
// try {
// List<String> botList = channel2Bots.get("xiaoai-jiaoyou-audio-child-test");
// String name = botList.get(Integer.parseInt(num)%botList.size());
// welcomeWord = String.format(welcomeWord, name,name);
// } catch (Exception e) {
// log.error("onLaunch welcomeWord type:{}, error:{}", type, e);
// welcomeWord = WELCOME_SMART;
// }
welcomeWord = WELCOME_SMART;
break;
}
case 2 : {
// welcomeWord = WELCOME_NOVEL_FORMAT;
// try {
// List<String> botList = channel2Bots.get("xiaoai-jiaoyou-audio-adult-test");
// String name = botList.get(Integer.parseInt(num)%botList.size());
// welcomeWord = String.format(welcomeWord, name,name);
// } catch (Exception e) {
// log.error("onLaunch welcomeWord type:{}, error:{}", type, e);
// welcomeWord = WELCOME_NOVEL;
// }
welcomeWord = WELCOME_NOVEL;
break;
}
case 5 : {
welcomeWord = WELCOME_FORMAT;
try {
List<String> botList = jiaoyouChannel2Bots.get("xiaoai-jiaoyou-audio-adult-test");
String name = botList.get(Integer.parseInt(num)%botList.size());
welcomeWord = String.format(welcomeWord, name,name);
} catch (Exception e) {
log.error("onLaunch welcomeWord type:{}, error:{}", type, e);
welcomeWord = WELCOME;
}
break;
}
}
if (welcomeWord == null) welcomeWord = WELCOME_WORD_DEFAULT;
return buildTextResponse(welcomeWord);
}
/**
* 处理正常会话意图;
* 将任务提交线程池,监控其执行时间,若1.8s内没有返回则判为超时,提示用户稍等,下一次再将结果返回给用户
* @param request 请求信息
* @param userId 用户在小爱上的id
* @return 响应信息
*/
private XiaoAiResponse dealWithIntentRequest(final XiaoAiRequest request, final String userId) {
Boolean idle = request.getRequest().getNo_response();
String redisId = SpiritRedisService.PREFIX_REDIS+userId;
try {
// long start = System.currentTimeMillis();
String data = stringRedisTemplate.opsForValue().get(redisId);
// log.info("redis get cost:"+(System.currentTimeMillis()-start));
if (StringUtils.isNotBlank(data)) {
log.info("超时redis获取信息:"+data);
String redisIdleId = SpiritRedisService.PREFIX_REDIS_IDLE+userId;
if (data.equals("out")) {
String idleNum = stringRedisTemplate.opsForValue().get(redisIdleId);
boolean firstIdle;
if ((firstIdle = StringUtils.isBlank(idleNum)) || idleNum.equals("1")) {
try {
Thread.sleep(1000);
} catch (Exception e){}
data = stringRedisTemplate.opsForValue().get(redisId);
if (StringUtils.isNotBlank(data) && !data.equals("out")) {
stringRedisTemplate.delete(redisIdleId);
stringRedisTemplate.delete(redisId);
return buildAudioResponse(changeAudioUrl(data, userId));
}
if (firstIdle) idleNum = "1";
else idleNum = "2";
stringRedisTemplate.opsForValue().set(redisIdleId, idleNum, 10, TimeUnit.SECONDS);
return buildTextResponse((RandomUtils.nextInt() & 1) == 1 ? XiaoAiConstants.TTS.WAIT_WORD_1 :
XiaoAiConstants.TTS.WAIT_WORD_2);
} else {
stringRedisTemplate.delete(redisIdleId);
stringRedisTemplate.delete(redisId);
}
} else {
stringRedisTemplate.delete(redisIdleId);
stringRedisTemplate.delete(redisId);
return buildAudioResponse(changeAudioUrl(data, userId));
}
}
} catch (Exception e) {
log.error("xiaoai redis error:"+e);
}
if (Boolean.TRUE.equals(idle)) {
try {
//log.info("开始等待");
Thread.sleep(1500);
//log.info("等待OVER");
} catch (InterruptedException e) {
log.warn("等待中断");
}
return buildTextResponse((RandomUtils.nextInt() & 1) == 1 ? XiaoAiConstants.TTS.USER_IDLE :
XiaoAiConstants.TTS.ANOTHER_USER_IDLE);
}
try {
Future<XiaoAiResponse> future = DplbotServiceUtil.getPool().submit(() -> task(userId, request.getQuery(), request.getType()));
return future.get(2200, TimeUnit.MILLISECONDS);
} catch (InterruptedException | ExecutionException e) {
log.error("获取任务执行结果出错:{}", e.toString());
return buildTextResponse(SORRY_REPEAT);
} catch (TimeoutException e) {
log.info("超时,让用户再说一遍:{}",e.toString());
stringRedisTemplate.opsForValue().setIfAbsent(redisId, "out", 10, TimeUnit.SECONDS);
return buildTextResponse(XiaoAiConstants.ERROR_MSG.TIME_OUT);
} catch (Exception all) {
log.error("任务执行发生了错误:{}", all.toString());
return buildTextResponse(SORRY_REPEAT);
}
}
/**
* 处理用户退出意图,先向中控发送“退出”,之后返回结束语
* @param userId 用户id
* @return 返回信息
*/
private XiaoAiResponse dealWithEndRequest(String userId, Integer type) {
// if (!monitor) RequestTerminal.backBotRequest(userId, type);
// else {
// log.info("小爱monitor退出请求:"+userId);
// }
RequestTerminal.backBotRequest(userId, type);
String byeWord;
switch (type) {
case 1: byeWord = Constants.EndMsg.END_BYE_STORY;break;
case 2: byeWord = Constants.EndMsg.END_BYE_NOVEL;break;
case 5: byeWord = Constants.EndMsg.END_BYE_JIAOYOU;break;
default: byeWord = Constants.EndMsg.END_BYE_DEFAULT;break;
}
return buildCancelTextResponse(byeWord);
}
/**
* 获取用户id
* @param request 请求信息
* @return 用户id
*/
private String getUserId(XiaoAiRequest request) {
String userId = request.getSession().getUser().getUser_id();
if (userId == null) {
userId = request.getContext().getDevice_id();
if (userId != null) userId = Utils.modifyDeviceId(userId);
}
if (userId == null) {
userId = Utils.useIPAsItsID();
}
try {
return PREFIX_USERID+ URLEncoder.encode(userId, "UTF-8");
} catch (Exception e) {
log.error("xiaoai userid encode error:{}, {}",e, userId);
return PREFIX_USERID+ userId.replaceAll("/", "");
}
}
private XiaoAiResponse task(String userId, String userWord, Integer type) {
XiaoAiResponse xiaoAiResponse;
if (userWord == null) {
log.warn("请求中没有带有用户的话");
throw new RequestWordNullException("user word can not be null");
}
String response;
try {
response = RequestTerminal.requestTerminate(userId, userWord, type);
log.info("小爱,小悟返回:{}", response);
} catch (Exception e) {
log.error("向终端发出的请求信息失败:{}", e.toString());
return buildTextResponse(SORRY_REPEAT);
}
if (StringUtils.isBlank(response)) {
log.error("中控返回结果为空");
xiaoAiResponse = buildTextResponse(SORRY_REPEAT);
} else {
try {
// log.info(response);
JSONObject object = JSON.parseObject(response);
JSONArray commands = object.getJSONArray("commands");
if (commands != null && commands.size() != 0) {
String txt;
for (Object ob: commands) {
txt = ((JSONObject) ob).getString("text");
int i;
if (StringUtils.isNotBlank(txt) && (i=txt.indexOf("out")) != -1) {
log.info("小爱,推荐bot退出:{},userId:{}", userWord, userId);
String content = txt.substring(i+3, txt.indexOf("☚")).trim();
String skillName, outWord;
switch (type) {
case 1: {
skillName = SKILL_SMART;
outWord = Constants.EndMsg.END_BYE_STORY;
break;
}
case 2: {
skillName = SKILL_NOVEL;
outWord = Constants.EndMsg.END_BYE_NOVEL;
break;
}
default: {
skillName = SKILL;
outWord = Constants.EndMsg.END_BYE_JIAOYOU;
}
}
RequestTerminal.backBotRequest(userId, type);
if (StringUtils.isNotBlank(content)) {
content = content.replaceAll("\\{/.*?/}", "")+skillName;
return buildResponseBeforeLoadout(content);
} else {
JSONArray dialogs = object.getJSONArray("dialogs");
if (dialogs != null && dialogs.size() != 0) {
String str = ((JSONObject)dialogs.get(0)).getString("text");
if (StringUtils.isNotBlank(str)) {
str = str.replaceAll("\\{/.*?/}", "")+skillName;
return buildResponseBeforeLoadout(str);
}
}
return buildResponseBeforeLoadout(outWord);
}
}
}
}
} catch (Exception e) {
log.error("推荐bot退出解析出错:"+e);
}
String path;
try {
// path = OkHttp3Utils.doPostJsonStr(XiaoAiConstants.TTS_DIDI3, response);
path = OkHttp3Utils.doPostJsonStr("http://didi-gz5.jiaoyou365.com:9663/api/audio", response);
if (StringUtils.isBlank(path) || path.equals("null")) {
log.error("没有获取到TTS返回的路径path");
return buildTextResponse(SORRY_REPEAT);
}
xiaoAiResponse = buildAudioResponse(changeAudioUrl(path, userId));
log.info("Redis 写入:"+path);
stringRedisTemplate.opsForValue().set(SpiritRedisService.PREFIX_REDIS+userId, path, 10, TimeUnit.SECONDS);
// LAST_AUDIO_PLAY.put(userId, path);
} catch (Exception e) {
log.error("没有获取到TTS返回的路径path");
xiaoAiResponse = buildTextResponse(SORRY_REPEAT);
}
}
return xiaoAiResponse;
}
private String changeAudioUrl(String path, String userId) {
path = path.replaceAll("%2F", "/");
// return new StringBuilder(TTS_DIDI3_GET_XIAOAI).append(userId).append("&path=").append(path).toString();
return new StringBuilder("http://didi-gz5.jiaoyou365.com:9663/api/audio/get?type=").append(userId).append("&path=").append(path).toString();
}
public void theAudioAlreadyPlay(String userId) {
Boolean result = stringRedisTemplate.delete(SpiritRedisService.PREFIX_REDIS+userId);
log.info("回调删除:"+result);
}
}
...@@ -11,6 +11,8 @@ import ai.qiwu.com.xiaoduhome.xiaoai.common.XiaoAiConstants; ...@@ -11,6 +11,8 @@ import ai.qiwu.com.xiaoduhome.xiaoai.common.XiaoAiConstants;
import ai.qiwu.com.xiaoduhome.xiaoai.model.request.XiaoAiRequest; import ai.qiwu.com.xiaoduhome.xiaoai.model.request.XiaoAiRequest;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.XiaoAiResponse; import ai.qiwu.com.xiaoduhome.xiaoai.model.response.XiaoAiResponse;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.Response; import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.Response;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.actionProperty.ActionProperty;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.actionProperty.AppIntentInfo;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.directive.AudioItem.AudioItem; import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.directive.AudioItem.AudioItem;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.directive.AudioItem.AudioStream; import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.directive.AudioItem.AudioStream;
import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.directive.Directive; import ai.qiwu.com.xiaoduhome.xiaoai.model.response.innerResponse.directive.Directive;
...@@ -72,6 +74,8 @@ public class XiaoAiTestService { ...@@ -72,6 +74,8 @@ public class XiaoAiTestService {
int type = request.getRequest().getType(); int type = request.getRequest().getType();
switch (type) { switch (type) {
case 0 : return dealWithLaunchRequest(request); case 0 : return dealWithLaunchRequest(request);
// case 0 : return dealWithLaunchRequestPhone();
// case 1 : return dealWithLaunchRequestPhone2();
case 1 : return dealWithIntentRequest(request, userId); case 1 : return dealWithIntentRequest(request, userId);
case 2 : return dealWithEndRequest(userId, request.getType()); case 2 : return dealWithEndRequest(userId, request.getType());
default: return buildTextResponse(SORRY_REPEAT); default: return buildTextResponse(SORRY_REPEAT);
...@@ -234,6 +238,70 @@ public class XiaoAiTestService { ...@@ -234,6 +238,70 @@ public class XiaoAiTestService {
return response; return response;
} }
private XiaoAiResponse dealWithLaunchRequestPhone() {
XiaoAiResponse response = new XiaoAiResponse();
response.setVersion("1.0");
response.setIs_session_end(true);
Response responseInfo = new Response();
// 这个字段很重要,他会在播放音频或是tts结束后,开麦收音,因为默认麦是关闭的,
// 若不主动打开则小爱在一次会话后退出技能。
responseInfo.setOpen_mic(false);
responseInfo.setAction("App.LaunchIntent");
ActionProperty actionProperty = new ActionProperty();
AppIntentInfo appIntentInfo = new AppIntentInfo();
appIntentInfo.setIntent_type("activity");
appIntentInfo.setUri("com.qiwu.life.ui.activity.LaunchActivity");
actionProperty.setApp_intent_info(appIntentInfo);
responseInfo.setAction_property(actionProperty);
ToDisplay toDisplay = new ToDisplay();
// toDisplay.setType(3);
toDisplay.setUi_type("phone");
PhoneTemplate phoneTemplate = new PhoneTemplate();
phoneTemplate.setTemplate_name("load");
toDisplay.setPhone_template(phoneTemplate);
responseInfo.setTo_display(toDisplay);
ToSpeak toSpeak = new ToSpeak();
toSpeak.setType(0);
toSpeak.setText("请下载app后体验");
responseInfo.setTo_speak(toSpeak);
response.setResponse(responseInfo);
return response;
}
private XiaoAiResponse dealWithLaunchRequestPhone2() {
XiaoAiResponse response = new XiaoAiResponse();
response.setVersion("1.0");
response.setIs_session_end(true);
Response responseInfo = new Response();
// 这个字段很重要,他会在播放音频或是tts结束后,开麦收音,因为默认麦是关闭的,
// 若不主动打开则小爱在一次会话后退出技能。
responseInfo.setOpen_mic(false);
responseInfo.setAction("App.LaunchIntent");
ActionProperty actionProperty = new ActionProperty();
AppIntentInfo appIntentInfo = new AppIntentInfo();
appIntentInfo.setUri("com.qiwu.life.ui.activity.LaunchActivity");
actionProperty.setApp_intent_info(appIntentInfo);
responseInfo.setAction_property(actionProperty);
ToSpeak toSpeak = new ToSpeak();
toSpeak.setType(0);
toSpeak.setText("请下载app后体验");
responseInfo.setTo_speak(toSpeak);
response.setResponse(responseInfo);
return response;
}
/** /**
* 处理启动意图,返回欢迎语 * 处理启动意图,返回欢迎语
* @param request 请求信息 * @param request 请求信息
......
...@@ -37,6 +37,11 @@ spring: ...@@ -37,6 +37,11 @@ spring:
enabled: detect enabled: detect
thymeleaf: thymeleaf:
cache: false cache: false
redis:
host: localhost
port: 6379
timeout: 1000
logging: logging:
path: /home/dc2-user/projects/audiobox/duai/logs path: /home/dc2-user/projects/audiobox/duai/logs
level: level:
...@@ -45,3 +50,5 @@ logging: ...@@ -45,3 +50,5 @@ logging:
OkHttpClient: FINE OkHttpClient: FINE
csvDic: /home/dc2-user/projects/audiobox/duai/csv/ csvDic: /home/dc2-user/projects/audiobox/duai/csv/
csvChildDic: /home/dc2-user/projects/audiobox/duai/childCsv/
num: 1
\ No newline at end of file
Jfc4Z4Ur15JwUBuvUQD5wg7Nu8+l+HscqYlfofbyJdZjy0poyKQz138bj7SDJK4P
\ No newline at end of file
unitPrice=1 unitPrice=1
requestHost=http://didi-gz4.jiaoyou365.com:18082/
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment