Commit 4f01d931 by 苗权威

10.9

parent 57788ede
......@@ -7,17 +7,21 @@
<component name="ChangeListManager">
<list default="true" id="4a2f3afc-3cd8-46bb-9e78-9759246c43dc" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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$/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/temple/CollectHistoryPagePojo.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/CollectHistoryPagePojo.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/CollectHistoryUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/CollectHistoryUtils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/TempleUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/TempleUtils.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/PlayPojo.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/play/PlayPojo.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/productInfo/ProductInfoUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/productInfo/ProductInfoUtils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/recommand/RecommandPojo.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/recommand/RecommandPojo.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/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/pojo/TestBuild.java" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/TestBuild.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/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/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/resources/static/json/firstPage.json" beforeDir="false" afterPath="$PROJECT_DIR$/xiaoduhome/src/main/resources/static/json/firstPage.json" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
<ignored path="$PROJECT_DIR$/target/" />
......@@ -61,68 +65,65 @@
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<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/service/DplBotService.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="129">
<caret line="748" column="34" lean-forward="true" selection-start-line="748" selection-start-column="34" selection-end-line="748" selection-end-column="34" />
<state relative-caret-position="408">
<caret line="192" column="5" lean-forward="true" selection-start-line="192" selection-start-column="5" selection-end-line="192" selection-end-column="5" />
<folding>
<element signature="e#30771#30772#0" expanded="true" />
<element signature="e#30829#30830#0" expanded="true" />
<element signature="e#76158#76228#0" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<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/onLunch/LunchUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3556">
<caret line="1271" column="17" selection-start-line="1271" selection-start-column="17" selection-end-line="1271" selection-end-column="17" />
<state relative-caret-position="1540">
<caret line="75" column="29" selection-start-line="75" selection-start-column="29" selection-end-line="75" selection-end-column="29" />
<folding>
<element signature="e#30643#30644#0" expanded="true" />
<element signature="e#30701#30702#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Initialize.java">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/productInfo/ProductInfoUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="5940">
<caret line="300" column="44" selection-start-line="300" selection-start-column="44" selection-end-line="300" selection-end-column="44" />
<folding>
<element signature="e#10163#10164#0" expanded="true" />
<element signature="e#10201#10202#0" expanded="true" />
<element signature="e#10871#10872#0" expanded="true" />
<element signature="e#10923#10924#0" expanded="true" />
</folding>
<state relative-caret-position="990">
<caret line="48" column="41" selection-start-line="48" selection-start-column="41" selection-end-line="48" selection-end-column="41" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/recommand/RecommendUtil.java">
<file pinned="false" current-in-tab="true">
<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">
<state relative-caret-position="440">
<caret line="115" column="43" lean-forward="true" selection-start-line="115" selection-start-column="43" selection-end-line="115" selection-end-column="43" />
<state relative-caret-position="328">
<caret line="269" column="31" selection-start-line="269" selection-start-column="31" selection-end-line="269" selection-end-column="31" />
</state>
</provider>
</entry>
</file>
<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/common/temple/recommand/RecommendUtil.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="264">
<caret line="27" column="11" selection-start-line="27" selection-start-column="11" selection-end-line="27" selection-end-column="11" />
<state relative-caret-position="7458">
<caret line="352" column="14" selection-start-line="352" selection-start-column="14" selection-end-line="352" selection-end-column="14" />
</state>
</provider>
</entry>
</file>
<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/common/temple/CollectHistoryUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="382">
<caret line="303" column="57" selection-start-line="303" selection-start-column="40" selection-end-line="303" selection-end-column="57" />
<state relative-caret-position="2662">
<caret line="126" column="34" selection-start-line="126" selection-start-column="34" selection-end-line="126" selection-end-column="34" />
<folding>
<element signature="e#13719#13720#0" expanded="true" />
<element signature="e#13756#13757#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
......@@ -131,29 +132,26 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/TempleUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="327">
<caret line="158" column="53" selection-start-line="158" selection-start-column="53" selection-end-line="158" selection-end-column="53" />
<state relative-caret-position="4752">
<caret line="256" column="86" selection-start-line="256" selection-start-column="81" selection-end-line="256" selection-end-column="86" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplbotServiceUtil.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">
<state relative-caret-position="309">
<caret line="82" column="35" selection-start-line="82" selection-start-column="29" selection-end-line="82" selection-end-column="35" />
<state relative-caret-position="2442">
<caret line="145" column="51" selection-start-line="145" selection-start-column="51" selection-end-line="145" selection-end-column="51" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Test.java">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/Constants.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="716">
<caret line="267" column="45" selection-start-line="267" selection-start-column="45" selection-end-line="267" selection-end-column="45" />
<folding>
<element signature="e#9253#9303#0" />
</folding>
<state relative-caret-position="770">
<caret line="35" column="32" selection-start-line="35" selection-start-column="32" selection-end-line="35" selection-end-column="32" />
</state>
</provider>
</entry>
......@@ -172,36 +170,36 @@
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>variableText</find>
<find>csvUtilByCommon</find>
<find>filePath</find>
<find>pattern</find>
<find>data</find>
<find>log.info</find>
<find>folder</find>
<find>hasCombineAndMarchAlsoHas</find>
<find>text</find>
<find>recordFolder</find>
<find>filePathList</find>
<find>COMBINE_FILE</find>
<find>THIRD_PARTY_WITH_ITS_PER</find>
<find>jump</find>
<find>ONLINE_ID_2_URL</find>
<find>URL_2_PERSON_TON</find>
<find>OFFLINE_SERVER</find>
<find>tts</find>
<find>delRecordCallbackUrl</find>
<find>init_person</find>
<find>PERSON_INFO_ONLINE</find>
<find>PERSON_INFO_OFFLINE</find>
<find>OFFLINE_2_ONLINE</find>
<find>16</find>
<find>RECOMMEND_LIST</find>
<find>tts_ls</find>
<find>ALL_ON_PRODUCT</find>
<find>$</find>
<find>Constants.PRE_PRODUCT_IMG</find>
<find>pageNum</find>
<find>rootFolder</find>
<find>uploadFolder</find>
<find>imgSrc</find>
<find>imgName</find>
<find>productName</find>
<find>n</find>
<find>mainTemplate</find>
<find>ranking</find>
<find>count</find>
<find>&quot;count&quot;</find>
<find>RANKING_LIST</find>
<find>RECOMMEND_LIST</find>
<find>ALL_ON_PRODUCT</find>
<find>PRODUCT_NAME_DETAIL</find>
<find>System.out.println</find>
<find>ASIDE_IMG</find>
<find>allProductCount</find>
<find>CATEGORY_PRODUCT_ID_LIST</find>
<find>16</find>
<find>recommand</find>
<find>onIntent</find>
<find>rankDocument</find>
<find>RANK_ORDER_IDs</find>
<find>buildImgFrmTxtContainerFirstRow</find>
<find>LUNCH_LIST_CATEGORY_CON</find>
<find>setMarginBottom</find>
<find>Task</find>
</findStrings>
<replaceStrings>
<replace>OPENID_CACHE</replace>
......@@ -217,13 +215,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/xiaoduhome/start.sh" />
<option value="$PROJECT_DIR$/xiaoduhome/readme.md" />
<option value="$PROJECT_DIR$/readme.md" />
<option value="$PROJECT_DIR$/xiaoai/src/main/java/ai/qiwu/mi/xiaoai/service/XiaoAiService.java" />
<option value="$PROJECT_DIR$/xiaoai/src/main/java/ai/qiwu/mi/xiaoai/controller/XiaoAiController.java" />
<option value="$PROJECT_DIR$/xiaoai/src/main/java/ai/qiwu/mi/xiaoai/commons/OkHttp3Utils.java" />
<option value="$PROJECT_DIR$/xiaoai/src/main/java/ai/qiwu/mi/xiaoai/commons/RequestTerminal.java" />
<option value="$PROJECT_DIR$/xiaoai/src/main/java/ai/qiwu/mi/xiaoai/commons/RequestTerminateFail.java" />
<option value="$PROJECT_DIR$/xiaoai/src/main/java/ai/qiwu/mi/xiaoai/commons/RequestWordNullException.java" />
<option value="$PROJECT_DIR$/xiaoai/src/main/java/ai/qiwu/mi/xiaoai/commons/Utils.java" />
......@@ -238,7 +229,6 @@
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/pcm/WavUtils.java" />
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/pcm/ByteUtils.java" />
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/CallPython.java" />
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/ChangeSound.java" />
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/Config.java" />
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/ErrorMsgEnum.java" />
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/OkHttp3Utils.java" />
......@@ -257,17 +247,25 @@
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/TestBuild.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/resources/application.yml" />
<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/controller/XiaoDuHomeController.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplBotService.java" />
<option value="$PROJECT_DIR$/xiaoduhome/pom.xml" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/resources/static/json/firstPage.json" />
<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/repository/primary/GameProjectTbRepository.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/recommand/RecommandPojo.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/service/TTService.java" />
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/ChangeSound.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/service/ScheduleService.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/common/temple/TempleUtils.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/onLunch/LunchUtils.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/CollectHistoryPagePojo.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/recommand/RecommandPojo.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/recommand/RecommendUtil.java" />
<option value="$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTService.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/common/temple/CollectHistoryUtils.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/productInfo/ProductInfoUtils.java" />
<option value="$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/play/PlayPojo.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/common/temple/play/PlayUtils.java" />
</list>
</option>
</component>
......@@ -300,8 +298,8 @@
<option name="skipTests" value="true" />
</component>
<component name="ProjectFrameBounds">
<option name="x" value="264" />
<option name="y" value="78" />
<option name="x" value="165" />
<option name="y" value="86" />
<option name="width" value="1438" />
<option name="height" value="973" />
</component>
......@@ -313,8 +311,6 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="PackagesPane" />
<pane id="ProjectPane">
<subPane>
<expand>
......@@ -325,51 +321,36 @@
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="tts_service" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="tts_service" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="tts_service" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="tts_service" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="src" 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="tts_service" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="tts_service" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
<item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="tts_service" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="tts_service" 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="xiaoduhome" type="462c0819:PsiDirectoryNode" />
</path>
<path>
......@@ -377,21 +358,10 @@
<item name="smartbox" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" 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" />
</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="java" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="common" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
......@@ -401,6 +371,8 @@
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="common" type="462c0819:PsiDirectoryNode" />
<item name="temple" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
......@@ -411,6 +383,8 @@
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="common" type="462c0819:PsiDirectoryNode" />
<item name="temple" type="462c0819:PsiDirectoryNode" />
<item name="onLunch" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
......@@ -422,6 +396,7 @@
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="common" type="462c0819:PsiDirectoryNode" />
<item name="temple" type="462c0819:PsiDirectoryNode" />
<item name="play" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
......@@ -433,7 +408,7 @@
<item name="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="common" type="462c0819:PsiDirectoryNode" />
<item name="temple" type="462c0819:PsiDirectoryNode" />
<item name="recommand" type="462c0819:PsiDirectoryNode" />
<item name="productInfo" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="smartbox" type="b2602c69:ProjectViewProjectNode" />
......@@ -476,10 +451,20 @@
<item name="xiaoduhome" 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="xiaoduhome" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="resources" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="PackagesPane" />
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
......@@ -493,7 +478,7 @@
<property name="RequestMappingsPanelWidth2" value="75" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1569840066344" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1570588793299" />
<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_npm_path_reset_for_default_project" value="true" />
......@@ -1064,7 +1049,9 @@
<workItem from="1569634565277" duration="5949000" />
<workItem from="1569640662065" duration="20492000" />
<workItem from="1569721461065" duration="35662000" />
<workItem from="1569807566791" duration="21860000" />
<workItem from="1569807566791" duration="21995000" />
<workItem from="1570498050838" duration="35975000" />
<workItem from="1570585052437" duration="3314000" />
</task>
<servers />
</component>
......@@ -1074,7 +1061,7 @@
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="2447098000" />
<option name="totallyTimeSpent" value="2486522000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
......@@ -1086,7 +1073,7 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="264" y="78" width="1438" height="973" extended-state="0" />
<frame x="165" y="86" width="1438" height="973" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Designer" order="0" />
......@@ -1096,17 +1083,17 @@
<window_info id="Favorites" order="4" sideWeight="0.5085366" side_tool="true" weight="0.18992805" />
<window_info id="Alibaba Cloud Explorer" order="5" sideWeight="0.49941108" weight="0.32843497" />
<window_info id="Web" order="6" sideWeight="0.5085366" side_tool="true" weight="0.18992805" />
<window_info active="true" content_ui="combo" id="Project" order="7" sideWeight="0.49146342" visible="true" weight="0.22805755" />
<window_info content_ui="combo" id="Project" order="7" sideWeight="0.49146342" weight="0.23165467" />
<window_info id="Structure" order="8" sideWeight="0.5134264" weight="0.19568345" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" weight="0.25243902" />
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.28780487" />
<window_info anchor="bottom" id="Run" order="2" weight="0.28780487" />
<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="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" weight="0.32873562" />
<window_info anchor="bottom" id="Spring" order="7" weight="0.32867885" />
<window_info anchor="bottom" id="Terminal" order="8" weight="0.31707317" />
<window_info anchor="bottom" id="Terminal" order="8" weight="0.3163017" />
<window_info anchor="bottom" id="Docker" order="9" show_stripe_button="false" />
<window_info anchor="bottom" id="Event Log" order="10" side_tool="true" weight="0.32804877" />
<window_info anchor="bottom" id="Java Enterprise" order="11" />
......@@ -1173,384 +1160,384 @@
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/pcm/WavHeader.java">
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/GlobalExceptionHandler.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-88">
<caret line="8" column="14" selection-start-line="8" selection-start-column="14" selection-end-line="8" selection-end-column="14" />
<state relative-caret-position="374">
<caret line="26" column="31" selection-start-line="26" selection-start-column="18" selection-end-line="26" selection-end-column="31" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/pcm/ByteUtils.java">
<entry file="file://$PROJECT_DIR$/tts_service/src/main/resources/tts.properties">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/controller/TTSController.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="110">
<caret line="6" column="16" selection-start-line="6" selection-start-column="16" selection-end-line="6" selection-end-column="16" />
<state relative-caret-position="187">
<caret line="54" column="79" selection-start-line="54" selection-start-column="79" selection-end-line="54" selection-end-column="79" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/CallPython.java">
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/upload/UploadOneSenData.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-148">
<caret line="176" column="42" selection-start-line="176" selection-start-column="42" selection-end-line="176" selection-end-column="42" />
<state relative-caret-position="264">
<caret line="16" column="13" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/Config.java">
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/LieHuSchedule.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="349">
<caret line="49" column="30" selection-start-line="49" selection-start-column="30" selection-end-line="49" selection-end-column="30" />
<state relative-caret-position="86">
<caret line="14" column="28" selection-start-line="14" selection-start-column="28" selection-end-line="14" selection-end-column="28" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/ErrorMsgEnum.java">
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/MultipartResolver.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="440">
<caret line="23" column="34" lean-forward="true" selection-start-line="23" selection-start-column="34" selection-end-line="23" selection-end-column="34" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/TtsServiceApplication.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="110">
<caret line="6" column="10" selection-start-line="6" selection-start-column="10" selection-end-line="6" selection-end-column="10" />
<caret line="9" column="6" selection-start-line="9" selection-start-column="6" selection-end-line="9" selection-end-column="6" />
<folding>
<element signature="e#639#640#0" expanded="true" />
<element signature="e#711#712#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/pcm/WavUtils.java">
<entry file="jar://$PROJECT_DIR$/../../../../maven/myRepository/org/apache/commons/commons-lang3/3.9/commons-lang3-3.9-sources.jar!/org/apache/commons/lang3/exception/ExceptionUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-288">
<caret line="8" column="17" selection-start-line="8" selection-start-column="17" selection-end-line="8" selection-end-column="17" />
<state relative-caret-position="286">
<caret line="575" column="29" selection-start-line="575" selection-start-column="27" selection-end-line="575" selection-end-column="29" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoai/src/main/java/ai/qiwu/mi/xiaoai/commons/OkHttp3Utils.java">
<entry file="file://$PROJECT_DIR$/tts_service/document/index.html">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/primary/AllOnProductInfoRepository.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="336">
<caret line="214" column="28" lean-forward="true" selection-start-line="214" selection-start-column="28" selection-end-line="214" selection-end-column="28" />
<state relative-caret-position="198">
<caret line="13" column="74" selection-start-line="13" selection-start-column="74" selection-end-line="13" selection-end-column="74" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/OkHttp3Utils.java">
<entry file="file://$PROJECT_DIR$/xiaoduhome/pom.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="292">
<caret line="411" column="21" selection-start-line="411" selection-start-column="21" selection-end-line="411" selection-end-column="21" />
<state relative-caret-position="490">
<caret line="110" column="65" selection-start-line="110" selection-start-column="65" selection-end-line="110" selection-end-column="65" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/SpecialCharURLConfig.java">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/dpl/MyDocument.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="352">
<caret line="19" column="23" lean-forward="true" selection-start-line="19" selection-start-column="23" selection-end-line="19" selection-end-column="23" />
<state relative-caret-position="286">
<caret line="17" column="23" selection-start-line="17" selection-start-column="23" selection-end-line="17" selection-end-column="23" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTSConstants.java">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/dpl/MyMainTemplate.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-178">
<caret line="5" column="7" selection-start-line="5" selection-start-column="7" selection-end-line="5" selection-end-column="7" />
<state relative-caret-position="286">
<caret line="20" column="20" selection-start-line="20" selection-start-column="20" selection-end-line="20" selection-end-column="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTServiceUtil.java">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/UserBehaviorData.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="16" column="8" selection-start-line="16" selection-start-column="8" selection-end-line="16" selection-end-column="8" />
<state relative-caret-position="374">
<caret line="22" column="43" selection-start-line="22" selection-start-column="43" selection-end-line="22" selection-end-column="43" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/ResponseCodeWithData.java">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/dpl/Item.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="242">
<caret line="13" column="13" selection-start-line="13" selection-start-column="13" selection-end-line="13" selection-end-column="13" />
<state relative-caret-position="66">
<caret line="21" column="13" selection-start-line="21" selection-start-column="13" selection-end-line="21" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/ChangeSound.java">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/TestBuild.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="393">
<caret line="77" column="46" selection-start-line="77" selection-start-column="46" selection-end-line="77" selection-end-column="46" />
<state relative-caret-position="2418">
<caret line="382" column="47" selection-start-line="382" selection-start-column="47" selection-end-line="382" selection-end-column="47" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/entity/SpeakersInfo.java">
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Initialize.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="110">
<caret line="11" column="21" selection-start-line="11" selection-start-column="21" selection-end-line="11" selection-end-column="21" />
<state relative-caret-position="6006">
<caret line="300" column="44" selection-start-line="300" selection-start-column="44" selection-end-line="300" selection-end-column="44" />
<folding>
<element signature="e#10163#10164#0" expanded="true" />
<element signature="e#10201#10202#0" expanded="true" />
<element signature="e#10871#10872#0" expanded="true" />
<element signature="e#10923#10924#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/repository/SpeakerInfoRepository.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">
<state relative-caret-position="110">
<caret line="8" column="12" selection-start-line="8" selection-start-column="12" selection-end-line="8" selection-end-column="12" />
<state relative-caret-position="748">
<caret line="82" column="35" selection-start-line="82" selection-start-column="29" selection-end-line="82" selection-end-column="35" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/baidu/ThirdPartyService.java">
<entry file="jar://$PROJECT_DIR$/../../../../java/jdk1.8.0_211/src.zip!/java/lang/String.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="578">
<caret line="138" column="17" selection-start-line="138" selection-start-column="17" selection-end-line="138" selection-end-column="17" />
<state relative-caret-position="264">
<caret line="1696" column="15" selection-start-line="1696" selection-start-column="15" selection-end-line="1696" selection-end-column="15" />
<folding>
<element signature="e#5514#5515#0" expanded="true" />
<element signature="e#5585#5586#0" expanded="true" />
<element signature="e#66457#66458#0" expanded="true" />
<element signature="e#66495#66496#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/GlobalExceptionHandler.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">
<state relative-caret-position="374">
<caret line="26" column="31" selection-start-line="26" selection-start-column="18" selection-end-line="26" selection-end-column="31" />
<state relative-caret-position="320">
<caret line="270" column="53" selection-start-line="270" selection-start-column="53" selection-end-line="270" selection-end-column="53" />
<folding>
<element signature="e#9253#9303#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/resources/tts.properties">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/controller/TTSController.java">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/rank/RankUtil.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="187">
<caret line="54" column="79" selection-start-line="54" selection-start-column="79" selection-end-line="54" selection-end-column="79" />
<state relative-caret-position="454">
<caret line="176" column="37" selection-start-line="176" selection-start-column="37" selection-end-line="176" selection-end-column="37" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/upload/UploadOneSenData.java">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/primary/GameProjectTbRepository.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="264">
<caret line="16" column="13" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" />
<state relative-caret-position="242">
<caret line="17" column="24" selection-start-line="17" selection-start-column="24" selection-end-line="17" selection-end-column="24" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/LieHuSchedule.java">
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/ChangeSound.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="86">
<caret line="14" column="28" selection-start-line="14" selection-start-column="28" selection-end-line="14" selection-end-column="28" />
<state relative-caret-position="256">
<caret line="27" column="9" selection-start-line="27" selection-start-column="9" selection-end-line="27" selection-end-column="9" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/MultipartResolver.java">
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/CallPython.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="440">
<caret line="23" column="34" lean-forward="true" selection-start-line="23" selection-start-column="34" selection-end-line="23" selection-end-column="34" />
<state relative-caret-position="-3550">
<caret line="16" column="13" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/TtsServiceApplication.java">
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTServiceUtil.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="110">
<caret line="9" column="6" selection-start-line="9" selection-start-column="6" selection-end-line="9" selection-end-column="6" />
<folding>
<element signature="e#639#640#0" expanded="true" />
<element signature="e#711#712#0" expanded="true" />
</folding>
<state relative-caret-position="-2502">
<caret line="16" column="8" selection-start-line="16" selection-start-column="8" selection-end-line="16" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/../../../../maven/myRepository/org/apache/commons/commons-lang3/3.9/commons-lang3-3.9-sources.jar!/org/apache/commons/lang3/exception/ExceptionUtils.java">
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTSUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="286">
<caret line="575" column="29" selection-start-line="575" selection-start-column="27" selection-end-line="575" selection-end-column="29" />
<state relative-caret-position="6582">
<caret line="561" column="26" selection-start-line="561" selection-start-column="8" selection-end-line="561" selection-end-column="26" />
<folding>
<element signature="e#1301#1302#0" expanded="true" />
<element signature="e#1332#1333#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/document/index.html">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/resources/application.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="132">
<state relative-caret-position="-2">
<caret line="6" column="57" lean-forward="true" selection-start-line="6" selection-start-column="57" selection-end-line="6" selection-end-column="57" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/repository/primary/AllOnProductInfoRepository.java">
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/Config.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
<caret line="13" column="74" selection-start-line="13" selection-start-column="74" selection-end-line="13" selection-end-column="74" />
<state relative-caret-position="220">
<caret line="20" column="13" selection-start-line="20" selection-start-column="13" selection-end-line="20" selection-end-column="13" />
</state>
</provider>
</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/entity/primary/OnProductDetail.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="438">
<caret line="31" column="14" selection-start-line="31" selection-start-column="14" selection-end-line="31" selection-end-column="14" />
<state relative-caret-position="-68">
<caret line="20" column="13" selection-start-line="20" selection-start-column="13" selection-end-line="20" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/pom.xml">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/recommand/RecommandMainTemplate.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="490">
<caret line="110" column="65" selection-start-line="110" selection-start-column="65" selection-end-line="110" selection-end-column="65" />
<state relative-caret-position="264">
<caret line="16" column="32" selection-start-line="16" selection-start-column="32" selection-end-line="16" selection-end-column="32" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/resources/application.yml">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/resources/static/json/firstPage.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="220">
<caret line="10" column="28" selection-start-line="10" selection-start-column="16" selection-end-line="10" selection-end-column="28" />
<state relative-caret-position="374">
<caret line="17" column="30" lean-forward="true" selection-start-line="17" selection-start-column="30" selection-end-line="17" selection-end-column="30" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/dpl/MyDocument.java">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/resources/application.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="286">
<caret line="17" column="23" selection-start-line="17" selection-start-column="23" selection-end-line="17" selection-end-column="23" />
<state relative-caret-position="528">
<caret line="24" column="19" lean-forward="true" selection-start-line="24" selection-start-column="19" selection-end-line="24" selection-end-column="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/dpl/MyMainTemplate.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">
<state relative-caret-position="286">
<caret line="20" column="20" selection-start-line="20" selection-start-column="20" selection-end-line="20" selection-end-column="20" />
<state relative-caret-position="264">
<caret line="17" column="13" selection-start-line="17" selection-start-column="13" selection-end-line="17" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/UserBehaviorData.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">
<state relative-caret-position="374">
<caret line="22" column="43" selection-start-line="22" selection-start-column="43" selection-end-line="22" selection-end-column="43" />
<state relative-caret-position="405">
<caret line="29" column="35" selection-start-line="29" selection-start-column="35" selection-end-line="29" selection-end-column="35" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/dpl/Item.java">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/funny/FunnyPojo.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="66">
<caret line="21" column="13" selection-start-line="21" selection-start-column="13" selection-end-line="21" selection-end-column="13" />
<state relative-caret-position="375">
<caret line="52" column="28" lean-forward="true" selection-start-line="52" selection-start-column="28" selection-end-line="52" selection-end-column="28" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/resources/static/json/firstPage.json">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/funny/FunnyUtil.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
<caret line="17" column="30" lean-forward="true" selection-start-line="17" selection-start-column="30" selection-end-line="17" selection-end-column="30" />
<state relative-caret-position="462">
<caret line="61" column="17" lean-forward="true" selection-start-line="61" selection-start-column="17" selection-end-line="61" selection-end-column="17" />
</state>
</provider>
</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/pojo/QiWuResponse.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="242">
<caret line="17" column="63" selection-start-line="17" selection-start-column="24" selection-end-line="17" selection-end-column="63" />
<state relative-caret-position="198">
<caret line="12" column="19" selection-start-line="12" selection-start-column="19" selection-end-line="12" selection-end-column="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/recommand/RecommandPojo.java">
<entry file="jar://$PROJECT_DIR$/../../../../java/jdk1.8.0_211/src.zip!/java/util/List.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="614">
<caret line="54" column="33" lean-forward="true" selection-start-line="54" selection-start-column="33" selection-end-line="54" selection-end-column="33" />
<state relative-caret-position="264">
<caret line="599" column="6" selection-start-line="599" selection-start-column="6" selection-end-line="599" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/entity/primary/OnProductDetail.java">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/CollectHistoryPagePojo.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="462">
<caret line="32" column="22" selection-start-line="32" selection-start-column="17" selection-end-line="32" selection-end-column="22" />
<state relative-caret-position="242">
<caret line="26" column="24" selection-start-line="26" selection-start-column="24" selection-end-line="26" selection-end-column="24" />
</state>
</provider>
</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/recommand/RecommandPojo.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="382">
<caret line="303" column="57" selection-start-line="303" selection-start-column="40" selection-end-line="303" selection-end-column="57" />
<folding>
<element signature="e#13719#13720#0" expanded="true" />
<element signature="e#13756#13757#0" expanded="true" />
</folding>
<state relative-caret-position="308">
<caret line="27" column="24" selection-start-line="27" selection-start-column="24" selection-end-line="27" selection-end-column="24" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/onLunch/LunchUtils.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">
<state relative-caret-position="388">
<caret line="32" column="95" lean-forward="true" selection-start-line="32" selection-start-column="95" selection-end-line="32" selection-end-column="95" />
<state relative-caret-position="15246">
<caret line="722" column="48" selection-start-line="722" selection-start-column="48" selection-end-line="722" selection-end-column="48" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/CollectHistoryUtils.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">
<state relative-caret-position="3460">
<caret line="178" column="44" lean-forward="true" selection-start-line="178" selection-start-column="44" selection-end-line="178" selection-end-column="44" />
<state relative-caret-position="1540">
<caret line="75" column="29" selection-start-line="75" selection-start-column="29" selection-end-line="75" selection-end-column="29" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</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/common/temple/productInfo/ProductInfoUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="264">
<caret line="27" column="11" selection-start-line="27" selection-start-column="11" selection-end-line="27" selection-end-column="11" />
<state relative-caret-position="990">
<caret line="48" column="41" selection-start-line="48" selection-start-column="41" selection-end-line="48" selection-end-column="41" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTSUtils.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">
<state relative-caret-position="256">
<caret line="43" column="32" selection-start-line="43" selection-start-column="32" selection-end-line="43" selection-end-column="32" />
<folding>
<element signature="e#1301#1302#0" expanded="true" />
<element signature="e#1332#1333#0" expanded="true" />
</folding>
<state relative-caret-position="7458">
<caret line="352" column="14" selection-start-line="352" selection-start-column="14" selection-end-line="352" selection-end-column="14" />
</state>
</provider>
</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/CollectHistoryUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3556">
<caret line="1271" column="17" selection-start-line="1271" selection-start-column="17" selection-end-line="1271" selection-end-column="17" />
<state relative-caret-position="2662">
<caret line="126" column="34" selection-start-line="126" selection-start-column="34" selection-end-line="126" selection-end-column="34" />
<folding>
<element signature="e#30643#30644#0" expanded="true" />
<element signature="e#30701#30702#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<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">
<state relative-caret-position="440">
<caret line="115" column="43" lean-forward="true" selection-start-line="115" selection-start-column="43" selection-end-line="115" selection-end-column="43" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/pojo/TestBuild.java">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/TempleUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2418">
<caret line="382" column="47" selection-start-line="382" selection-start-column="47" selection-end-line="382" selection-end-column="47" />
<state relative-caret-position="4752">
<caret line="256" column="86" selection-start-line="256" selection-start-column="81" selection-end-line="256" selection-end-column="86" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplbotServiceUtil.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">
<state relative-caret-position="309">
<caret line="82" column="35" selection-start-line="82" selection-start-column="29" selection-end-line="82" selection-end-column="35" />
<state relative-caret-position="2442">
<caret line="145" column="51" selection-start-line="145" selection-start-column="51" selection-end-line="145" selection-end-column="51" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Initialize.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">
<state relative-caret-position="5940">
<caret line="300" column="44" selection-start-line="300" selection-start-column="44" selection-end-line="300" selection-end-column="44" />
<folding>
<element signature="e#10163#10164#0" expanded="true" />
<element signature="e#10201#10202#0" expanded="true" />
<element signature="e#10871#10872#0" expanded="true" />
<element signature="e#10923#10924#0" expanded="true" />
</folding>
<state relative-caret-position="770">
<caret line="35" column="32" selection-start-line="35" selection-start-column="32" selection-end-line="35" selection-end-column="32" />
</state>
</provider>
</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/common/temple/play/PlayPojo.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="129">
<caret line="748" column="34" lean-forward="true" selection-start-line="748" selection-start-column="34" selection-end-line="748" selection-end-column="34" />
<state relative-caret-position="330">
<caret line="22" column="25" selection-start-line="22" selection-start-column="25" selection-end-line="22" selection-end-column="25" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/common/temple/TempleUtils.java">
<entry file="file://$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/DplBotService.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="327">
<caret line="158" column="53" selection-start-line="158" selection-start-column="53" selection-end-line="158" selection-end-column="53" />
<state relative-caret-position="408">
<caret line="192" column="5" lean-forward="true" selection-start-line="192" selection-start-column="5" selection-end-line="192" selection-end-column="5" />
<folding>
<element signature="e#30771#30772#0" expanded="true" />
<element signature="e#30829#30830#0" expanded="true" />
<element signature="e#76158#76228#0" />
</folding>
</state>
</provider>
</entry>
<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/common/temple/play/PlayUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="716">
<caret line="267" column="45" selection-start-line="267" selection-start-column="45" selection-end-line="267" selection-end-column="45" />
<folding>
<element signature="e#9253#9303#0" />
</folding>
<state relative-caret-position="328">
<caret line="269" column="31" selection-start-line="269" selection-start-column="31" selection-end-line="269" selection-end-column="31" />
</state>
</provider>
</entry>
......
......@@ -232,6 +232,9 @@ public class TTService {
}
List<Future<ResponseCodeWithData>> futures = new ArrayList<>();
List<String> file_ls = new ArrayList<>();
String rootFolder = new StringBuilder(Initialize.getAudioDir()).append(File.separator).append(botName).append(File.separator).toString();
String uploadFolder = new StringBuilder(rootFolder).append(Initialize.getUploadedDir()).append(File.separator).toString();
//String combineFolder = new StringBuilder(rootFolder).append("combine").append(File.separator).toString();
// 第三方语音是否生成,为0则代表不处理该第三方语音
boolean geneThird = request.getGen3rd() == null || request.getGen3rd() != 0;
if (infoList != null && infoList.size() != 0) {
......@@ -247,8 +250,10 @@ public class TTService {
String url = null; //moodUrl
String tone = "正常"; // 第三方请求的情绪为:正常
// 是否是第三方请求
boolean isPersonThirdParty = Initialize.getThirdPartyTts().contains(person);
// 非第三方请求需要对person及tone进行校正,以得到确实存在的url
if (!isPersonThirdParty) {
// person不存在则置为默认person
......@@ -280,24 +285,22 @@ public class TTService {
String fileName = TTSUtils.buildMP3Filename(text);
// 含有npcName字段则先去人工合成目录下找寻,人工没有则去合成目录寻找
if (StringUtils.isNotBlank(npcName)) {
String path = StringUtils.join(new String[]{Initialize.getAudioDir(), botName, Initialize.getUploadedDir(),npcName, fileName}, File.separator);
String path = new StringBuilder(uploadFolder).append(npcName).append(File.separator).append(fileName).toString();
//String path = StringUtils.join(new String[]{Initialize.getAudioDir(), botName, Initialize.getUploadedDir(),npcName, fileName}, File.separator);
// log.info("111");
if (TTSUtils.doesFileExist(path)) {
filepath = path;
}
// else {
// Pattern pattern = Pattern.compile(TTSUtils.getAbRegex());
// if (pattern.matcher(text).find()) {
// String combineRecordPath = StringUtils.join(new String[]{Initialize.getAudioDir(), botName, person, tone, Initialize.getUploadedDir(), fileName}, File.separator);
// if (TTSUtils.doesFileExist(combineRecordPath)) filepath = combineRecordPath;
// }
// else if (text.indexOf("\uD83C\uDD70") != -1){
//
// }
//log.info("222");
}
if (filepath == null) {
//log.info("333");
// 目录为:(audio_dir)/botname/person/tone
String folder = StringUtils.join(new String[]{Initialize.getAudioDir(), botName, person, tone}, File.separator);
String folder = new StringBuilder(rootFolder).append(person).append(File.separator).append(tone).toString();
//String folder = StringUtils.join(new String[]{Initialize.getAudioDir(), botName, person, tone}, File.separator);
boolean createDirRes = TTSUtils.makedir(folder);
if (!createDirRes) {
log.error("tts_ls创建目录:{}失败",folder);
......
......@@ -268,6 +268,6 @@ public class Test {
System.out.println(mr.replaceAll("\\W", ""));
String ssss = "你当{/dang1/}前分{/fen1/}数{/shu4/}是\uD83C\uDD700\uD83C\uDD71。";
System.out.println(TTSUtils.buildMP3Filename(ssss));
System.out.println(ssss.indexOf("\uD83C\uDD70"));
}
}
......@@ -34,7 +34,7 @@ public interface Constants {
String UNIT_PRICE = "1";
Integer CO_HI_PAGE_SIZE = 4;
Integer RE_RA_CA_PAGE_SIZE = 16;
Integer RE_RA_CA_PAGE_SIZE = 12;
interface DPL_COMPONENT_ID {
String FLOWE = "flowe";
......
......@@ -24,6 +24,7 @@ public class CollectHistoryPagePojo {
private String type;
private String position;
private String left;
private String right;
private String width;
private String bottom;
private String height;
......
......@@ -31,7 +31,7 @@ public class CollectHistoryUtils {
allContainer.setWidth("100%");
allContainer.setPaddingRight("15dp");
allContainer.setPaddingLeft("15dp");
allContainer.setPaddingBottom("180dp");
allContainer.setPaddingBottom("130dp");
CollectHistoryPagePojo list = new CollectHistoryPagePojo();
list.setType("List");
......@@ -109,24 +109,24 @@ public class CollectHistoryUtils {
author.setMarginLeft("100dp");
author.setTextOverflow("ellipsis");
// divide
CollectHistoryPagePojo divide = new CollectHistoryPagePojo();
divide.setType("Frame");
divide.setPosition("absolute");
divide.setMarginTop("90dp");
divide.setWidth("100%");
divide.setBorderColor("rgba(255,255,255,0.5)");
divide.setBorderWidth("1dp");
// // divide
// CollectHistoryPagePojo divide = new CollectHistoryPagePojo();
// divide.setType("Frame");
// divide.setPosition("absolute");
// divide.setMarginTop("90dp");
// divide.setWidth("100%");
// divide.setBorderColor("rgba(255,255,255,0.3)");
// divide.setBorderWidth("0.5dp");
main.setItems(Arrays.asList(num,image, nameIntroCon, author, divide));
main.setItems(Arrays.asList(num,image, nameIntroCon, author));
return main;
}
private static CollectHistoryPagePojo buildPageButton(int curIndex, int num) {
CollectHistoryPagePojo fCon = new CollectHistoryPagePojo();
fCon.setType("Container");
fCon.setLeft("447dp");
fCon.setBottom("70dp");
fCon.setTop("20dp");
fCon.setRight("15dp");
fCon.setPosition("absolute");
CollectHistoryPagePojo frame = new CollectHistoryPagePojo();
......
......@@ -59,7 +59,7 @@ public class TempleUtils {
FRAME_RAKKING.getItems().get(1).getItems().get(0).setText("小度小度,打开排行榜");
FRAME_RAKKING.getItems().get(0).setText("排行榜");
FRAME_RECOMMAND = JSON.parseObject(getDPLTemple("static/json/frame.json"), FrameTemple.class);
FRAME_RECOMMAND.getItems().get(1).getItems().get(0).setText("小度小度,打开推荐");
FRAME_RECOMMAND.getItems().get(1).getItems().get(0).setText("小度小度,打开推荐页");
FRAME_RECOMMAND.getItems().get(0).setText("推荐作品");
FRAME_CATEGORY = JSON.parseObject(getDPLTemple("static/json/frame.json"), FrameTemple.class);
FRAME_CATEGORY.getItems().get(1).getItems().get(0).setText("小度小度,打开第二十一个");
......@@ -269,11 +269,11 @@ public class TempleUtils {
public static List<LunchBotData> buildCategoryDataList() {
ArrayList<LunchBotData> dataList = new ArrayList<>();
int i = 21;
int i = 17;
for (String cateName : ScheduleService.getCATEGORY()) {
String imageId = new StringBuilder(PRE_CATEGORY).append(cateName).toString();
String imgSrc = new StringBuilder(IMG_CUSTOM_PREFIX)
.append(ScheduleService.getCategoryCharac()[i-21]).append(".png").toString();
.append(ScheduleService.getCategoryCharac()[i-17]).append(".png").toString();
LunchBotData data = new LunchBotData(imgSrc, imageId, cateName);
data.setNum(i++);
dataList.add(data);
......
......@@ -4,7 +4,6 @@ import ai.qiwu.com.xiaoduhome.common.temple.TempleUtils;
import ai.qiwu.com.xiaoduhome.pojo.dpl.Event;
import ai.qiwu.com.xiaoduhome.service.ScheduleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.*;
......@@ -34,7 +33,7 @@ public class LunchUtils {
conRecommend.setFirstItem(Collections.singletonList(TempleUtils.getFrameRecommand()));
conRecommend.setMarginTop("30dp");
LunchPojo conRanking = buildLunchList(TempleUtils.buildDataList(ScheduleService.getRankingList(), 11));
LunchPojo conRanking = buildLunchList(TempleUtils.buildDataList(ScheduleService.getRankingList(), 9));
conRanking.setFirstItem(Collections.singletonList(TempleUtils.getFrameRakking()));
LunchPojo conCategory = buildLunchCategoryList(TempleUtils.buildCategoryDataList());
......@@ -217,7 +216,7 @@ public class LunchUtils {
LunchPojo logo = new LunchPojo();
logo.setType("Image");
logo.setPosition("absolute");
logo.setSrc("https://aliyun-hz1.chewrobot.com/xiaoduhome/image/uncollec.png");
logo.setSrc("https://aliyun-hz1.chewrobot.com/xiaoduhome/image/collec.png");
logo.setWidth("40dp");
logo.setHeight("40dp");
logo.setScaleType("centerInside");
......
......@@ -20,6 +20,7 @@ public class PlayPojo {
private String position;
private String left;
private String top;
private String bottom;
private String src;
private String height;
private String width;
......
......@@ -22,20 +22,67 @@ public class PlayUtils {
private static final PlayPojo PLAY_UN_COLLECT = buildUnCollect();
public static PlayDocument getPlayDocument(String headerName, String aside, String asideImg,
String audio, String text, boolean collected) {
String audio, String text) {
PlayDocument document = new PlayDocument();
document.setDuration(180000);
PlayMainTemplate mainTemplate = new PlayMainTemplate();
document.setMainTemplate(mainTemplate);
PlayPojo collectComponent = PLAY_COLLECT;
if (!collected) collectComponent = PLAY_UN_COLLECT;
//if (!collected) collectComponent = PLAY_UN_COLLECT;
mainTemplate.setItems(Arrays.asList(PLAY_BACK_IMG, buildLunchHead(headerName), PLAY_LOGO,
buildAside(aside), buildAsideImage(asideImg), buildWholeContainer(audio, text)
,collectComponent, PLAY_FLOWER, PLAY_HINT));
return document;
}
public static PlayPojo buildCollect() {
private static PlayPojo buildFlower() {
PlayPojo backGroundImg = new PlayPojo();
backGroundImg.setType("Image");
backGroundImg.setPosition("absolute");
backGroundImg.setRight("120dp");
backGroundImg.setTop("20dp");
backGroundImg.setHeight("50dp");
backGroundImg.setWidth("50dp");
backGroundImg.setSrc("https://aliyun-hz1.chewrobot.com/xiaoduhome/image/flower.png");
backGroundImg.setOnClick(Collections.singletonList(new Event("SendEvent", "playButton")));
backGroundImg.setScaleType("fitCenter");
return backGroundImg;
}
private static PlayPojo buildCollect() {
PlayPojo backGroundImg = new PlayPojo();
backGroundImg.setType("Image");
backGroundImg.setPosition("absolute");
backGroundImg.setRight("30dp");
backGroundImg.setTop("20dp");
backGroundImg.setHeight("50dp");
backGroundImg.setWidth("50dp");
backGroundImg.setComponentId("playCollect");
backGroundImg.setSrc("https://aliyun-hz1.chewrobot.com/xiaoduhome/image/collec.png");
backGroundImg.setOnClick(Collections.singletonList(new Event("SendEvent", "playButton")));
backGroundImg.setScaleType("fitCenter");
return backGroundImg;
}
private static PlayPojo buildUnCollect() {
PlayPojo backGroundImg = new PlayPojo();
backGroundImg.setType("Image");
backGroundImg.setPosition("absolute");
backGroundImg.setRight("30dp");
backGroundImg.setTop("20dp");
backGroundImg.setHeight("50dp");
backGroundImg.setWidth("50dp");
backGroundImg.setComponentId("playCollect");
backGroundImg.setSrc("https://aliyun-hz1.chewrobot.com/xiaoduhome/image/uncollec.png");
backGroundImg.setOnClick(Collections.singletonList(new Event("SendEvent", "playButton")));
backGroundImg.setScaleType("fitCenter");
return backGroundImg;
}
private static PlayPojo buildCollectFrame() {
PlayPojo collectCon = new PlayPojo();
collectCon.setType("Container");
collectCon.setLeft("300dp");
......@@ -71,7 +118,7 @@ public class PlayUtils {
return collectCon;
}
public static PlayPojo buildUnCollect() {
private static PlayPojo buildUnCollectFrame() {
PlayPojo collectCon = new PlayPojo();
collectCon.setType("Container");
collectCon.setLeft("300dp");
......@@ -107,7 +154,7 @@ public class PlayUtils {
return collectCon;
}
public static PlayPojo buildFlower() {
private static PlayPojo buildFlowerFrame() {
PlayPojo flowerCon = new PlayPojo();
flowerCon.setType("Container");
flowerCon.setLeft("600dp");
......@@ -142,7 +189,7 @@ public class PlayUtils {
return flowerCon;
}
public static PlayPojo buildWholeContainer(String audioSrc, String textContent) {
private static PlayPojo buildWholeContainer(String audioSrc, String textContent) {
PlayPojo whole = new PlayPojo();
whole.setType("Container");
whole.setHeight("100%");
......@@ -153,7 +200,7 @@ public class PlayUtils {
textContainer.setType("Container");
textContainer.setPadding("35dp");
textContainer.setPosition("absolute");
textContainer.setTop("140dp");
textContainer.setBottom("250dp");
PlayPojo text = new PlayPojo();
text.setType("Text");
......@@ -206,8 +253,8 @@ public class PlayUtils {
logo.setSrc("https://aliyun-hz1.chewrobot.com/xiaoduhome/image/logo.png");
logo.setWidth("200dp");
logo.setHeight("60dp");
logo.setTop("10dp");
logo.setRight("10dp");
logo.setTop("20dp");
logo.setLeft("10dp");
return logo;
}
......@@ -215,11 +262,12 @@ public class PlayUtils {
PlayPojo asideContainer = new PlayPojo();
asideContainer.setType("Container");
asideContainer.setPosition("absolute");
asideContainer.setLeft("130dp");
asideContainer.setTop("135dp");
asideContainer.setLeft("115dp");
asideContainer.setTop("185dp");
PlayPojo frame = new PlayPojo();
frame.setType("Frame");
frame.setWidth("70dp");
frame.setPaddingLeft("50dp");
frame.setPaddingRight("15dp");
frame.setPaddingVertical("10dp");
......@@ -241,8 +289,8 @@ public class PlayUtils {
PlayPojo asideContainer = new PlayPojo();
asideContainer.setType("Container");
asideContainer.setPosition("absolute");
asideContainer.setLeft("60dp");
asideContainer.setTop("120dp");
asideContainer.setLeft("35dp");
asideContainer.setTop("167dp");
PlayPojo frame = new PlayPojo();
frame.setType("Frame");
......
......@@ -46,7 +46,7 @@ public class ProductInfoUtils {
coverImage.setWidth("280dp");
coverImage.setHeight("280dp");
coverImage.setBorderRadius("30dp");
coverImage.setScaleType("fitCenter");
coverImage.setScaleType("fitXY");
coverImage.setMarginLeft("50dp");
coverImage.setMarginTop("12dp");
coverImage.setComponentId("imgPro");
......@@ -153,7 +153,7 @@ public class ProductInfoUtils {
iconCon.setType("Container");
iconCon.setPosition("absolute");
iconCon.setFlexDirection("row");
iconCon.setBottom("160dp");
iconCon.setBottom("170dp");
iconCon.setItems(Arrays.asList(buildStart(startComponId), buildFlower(flowerId, flowerText),
buildCollect(collectId, collectSrc, collectText)));
return iconCon;
......@@ -187,7 +187,7 @@ public class ProductInfoUtils {
ProductInfoPojo flowerCon = new ProductInfoPojo();
flowerCon.setType("Container");
flowerCon.setAlignItems("center");
flowerCon.setMarginLeft("130dp");
flowerCon.setMarginLeft("120dp");
flowerCon.setOnClick(Collections.singletonList(new Event("SendEvent", flowerId)));
ProductInfoPojo image = new ProductInfoPojo();
......
......@@ -25,6 +25,7 @@ public class RecommandPojo {
private String position;
private String top;
private String left;
private String right;
private String src;
private String headerTitle;
private Boolean hasBackIcon;
......@@ -53,5 +54,8 @@ public class RecommandPojo {
private String backgroundColor;
@JsonProperty("flex-direction")
private String flexDirection;
@JsonProperty("justify-content")
private String justifyContent;
private String looping;
private String autoplay;
}
......@@ -8,6 +8,8 @@ import ai.qiwu.com.xiaoduhome.entity.primary.OnProductDetail;
import ai.qiwu.com.xiaoduhome.pojo.dpl.Data;
import ai.qiwu.com.xiaoduhome.pojo.dpl.Event;
import ai.qiwu.com.xiaoduhome.service.ScheduleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.io.File;
import java.util.*;
......@@ -18,22 +20,31 @@ import static ai.qiwu.com.xiaoduhome.common.Constants.RE_RA_CA_PAGE_SIZE;
* @author 苗权威
* @dateTime 19-9-5 上午11:25
*/
@Slf4j
public class RecommendUtil {
private static final RecommandPojo RECOM_BACK_IMG = buildRecomendBackgroundImg();
private static final RecommandPojo RECOM_HEAD = buildRecommendHead();
private static final RecommandPojo RANK_HEAD = buildRankHead();
private static final RecommandPojo FUNNY_HEAD = buildFunnyHead();
private static final RecommandPojo RECOM_FOOTER = buildRecommendFooter();
private static final RecommandPojo RANK_CATEGORY_FOOTER = buildRankCategoryFooter();
private static final RecommandPojo FUNNY_FOOTER = buildFunnyFooter();
private static final RecommandPojo RECOM_LIST_CON = buildImgFrmTxtContainer();
private static final RecommandPojo FUNNY_LIST_CON = buildImgFrmTxtContainerFunny();
private static volatile RecommandDocument rankDocument;
public static RecommandDocument getRecommendDocument(int num) {
RecommandDocument document = new RecommandDocument();
document.setDuration(120000);
RecommandMainTemplate mainTemplate = new RecommandMainTemplate();
document.setMainTemplate(mainTemplate);
RecommandPojo scrollView = new RecommandPojo();
scrollView.setType("ScrollView");
scrollView.setWidth("100%");
scrollView.setMarginBottom("93dp");
scrollView.setMarginBottom("140dp");
scrollView.setDirection("vertical");
List<RecommandPojo> scrollList = new ArrayList<>();
scrollView.setItems(scrollList);
......@@ -64,13 +75,14 @@ public class RecommendUtil {
public static RecommandDocument getCategory(int num, String category) {
RecommandDocument document = new RecommandDocument();
document.setDuration(120000);
RecommandMainTemplate mainTemplate = new RecommandMainTemplate();
document.setMainTemplate(mainTemplate);
RecommandPojo scrollView = new RecommandPojo();
scrollView.setType("ScrollView");
scrollView.setWidth("100%");
scrollView.setMarginBottom("93dp");
scrollView.setMarginBottom("140dp");
scrollView.setDirection("vertical");
List<RecommandPojo> scrollList = new ArrayList<>();
scrollView.setItems(scrollList);
......@@ -88,32 +100,36 @@ public class RecommendUtil {
String botId = categoryIdList.get(i);
bots.add((ScheduleService.getProductIdDetail().get(botId)));
}
StringBuilder botIds = new StringBuilder();
//StringBuilder botIds = new StringBuilder();
int count = 0;
while (begin < bound) {
end = begin+4 <= bound ? begin+4 : bound;
scrollList.add(buildRecommendList(getListData(count, begin, end, bots, botIds)));
scrollList.add(buildRecommendList(getListDataNoIds(count, begin, end, bots)));
count++;
begin = end;
}
mainTemplate.getItems().addAll(Arrays.asList(RECOM_BACK_IMG,buildRecommendCollectHead(category),scrollView,RECOM_FOOTER));
int pageSize = categoryIdList.size() / RE_RA_CA_PAGE_SIZE + (categoryIdList.size()%RE_RA_CA_PAGE_SIZE == 0 ? 0:1);
mainTemplate.getItems().addAll(Arrays.asList(RECOM_BACK_IMG,buildRecommendCollectHead(category),
scrollView,buildPageButton(num+1, pageSize),RANK_CATEGORY_FOOTER));
botIds.deleteCharAt(botIds.length()-1);
String idToken = Base64.getEncoder().encodeToString(botIds.toString().getBytes());
document.setRecommendIdList(idToken);
// botIds.deleteCharAt(botIds.length()-1);
// String idToken = Base64.getEncoder().encodeToString(botIds.toString().getBytes());
// document.setRecommendIdList(idToken);
return document;
}
public static RecommandDocument getRankDocumentFirstPage() {
if (rankDocument != null) return rankDocument;
RecommandDocument document = new RecommandDocument();
document.setDuration(120000);
RecommandMainTemplate mainTemplate = new RecommandMainTemplate();
document.setMainTemplate(mainTemplate);
RecommandPojo scrollView = new RecommandPojo();
scrollView.setType("ScrollView");
scrollView.setWidth("100%");
scrollView.setMarginBottom("93dp");
scrollView.setMarginBottom("140dp");
scrollView.setDirection("vertical");
List<RecommandPojo> scrollList = new ArrayList<>();
scrollView.setItems(scrollList);
......@@ -121,27 +137,190 @@ public class RecommendUtil {
RecommandPojo rowContainer = new RecommandPojo();
rowContainer.setType("Container");
rowContainer.setFlexDirection("row");
rowContainer.setMarginLeft("20dp");
rowContainer.setMarginBottom("55dp");
StringBuilder botIds = new StringBuilder();
List<OnProductDetail> list = ScheduleService.getRANK_ORDER_IDs();
//log.info("RANK_ORDER_ID_LIST size = "+list.size());
OnProductDetail first = list.get(0);
botIds.append(first.getBotAccount()).append(File.separator);
OnProductDetail second = list.get(1);
botIds.append(second.getBotAccount()).append(File.separator);
OnProductDetail third = list.get(2);
botIds.append(third.getBotAccount()).append(File.separator);
OnProductDetail forth = list.get(3);
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(),
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(),
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(),
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()));
rowContainer.setItems(Arrays.asList(pojoFirst, pojoSe, pojoThird, pojoFourth));
scrollList.add();
scrollList.add(rowContainer);
for (int i = 4; i < ; i++) {
scrollList.add(buildRecommendList(getListData(1, 4, 8, list, botIds)));
scrollList.add(buildRecommendList(getListData(2, 8, 12, list, botIds)));
//scrollList.add(buildRecommendList(getListData(3, 12, 16, list, botIds)));
mainTemplate.getItems().addAll(Arrays.asList(RECOM_BACK_IMG,RANK_HEAD,scrollView,buildPageButton(1,
ScheduleService.getRankPageSize()),RANK_CATEGORY_FOOTER));
botIds.deleteCharAt(botIds.length()-1);
String idToken = Base64.getEncoder().encodeToString(botIds.toString().getBytes());
document.setRecommendIdList(idToken);
rankDocument = document;
return document;
}
public static RecommandDocument getRankOtherPageDocument(int num) {
RecommandDocument document = new RecommandDocument();
document.setDuration(120000);
RecommandMainTemplate mainTemplate = new RecommandMainTemplate();
document.setMainTemplate(mainTemplate);
RecommandPojo scrollView = new RecommandPojo();
scrollView.setType("ScrollView");
scrollView.setWidth("100%");
scrollView.setMarginBottom("140dp");
scrollView.setDirection("vertical");
List<RecommandPojo> scrollList = new ArrayList<>();
scrollView.setItems(scrollList);
List<OnProductDetail> list = ScheduleService.getRANK_ORDER_IDs();
int bound = list.size();
int begin = num*RE_RA_CA_PAGE_SIZE;
int end;
if (begin >= bound) return null;
bound = begin+RE_RA_CA_PAGE_SIZE <= bound ? begin+RE_RA_CA_PAGE_SIZE : bound;
StringBuilder botIds = new StringBuilder();
int row = 0;
while (begin < bound) {
end = begin+4 <= bound ? begin+4 : bound;
scrollList.add(buildRecommendList(getListData(row, begin, end, list, botIds)));
row++;
begin = end;
}
mainTemplate.getItems().addAll(Arrays.asList(RECOM_BACK_IMG,RANK_HEAD,scrollView,
buildPageButton(num+1, ScheduleService.getRankPageSize()),RANK_CATEGORY_FOOTER));
botIds.deleteCharAt(botIds.length()-1);
String idToken = Base64.getEncoder().encodeToString(botIds.toString().getBytes());
document.setRecommendIdList(idToken);
return document;
}
public static RecommandDocument getFunnyDocument(List<OnProductDetail> bots, String audio) {
RecommandDocument document = new RecommandDocument();
document.setDuration(90000);
RecommandMainTemplate mainTemplate = new RecommandMainTemplate();
document.setMainTemplate(mainTemplate);
List<RecommandBotInfo> data = new ArrayList<>();
StringBuilder botIds = new StringBuilder();
int num = 0;
for (OnProductDetail bot: bots) {
String imgSrc = new StringBuilder(Constants.IMG_PREFIX).append(bot.getBannerImgUrl()).toString();
String imageId = new StringBuilder(Constants.PRE_PRODUCT_IMG).append(bot.getName()).toString();
RecommandBotInfo detail = new RecommandBotInfo(imgSrc,imageId, TempleUtils.correctName(bot.getName()));
detail.setNum(++num);
data.add(detail);
botIds.append(bot.getBotAccount()).append(File.separator);
}
getListData()
mainTemplate.getItems().addAll(Arrays.asList(RECOM_BACK_IMG, FUNNY_HEAD, buildFunnyList(data), buildFunnyAudio(audio),FUNNY_FOOTER));
botIds.deleteCharAt(botIds.length()-1);
String idToken = Base64.getEncoder().encodeToString(botIds.toString().getBytes());
document.setRecommendIdList(idToken);
return document;
}
private static RecommandPojo buildFunnyAudio(String audioSrc) {
RecommandPojo audio = new RecommandPojo();
audio.setType("Audio");
audio.setComponentId("audioCom");
audio.setSrc(audioSrc);
audio.setLooping("false");
audio.setAutoplay("true");
return audio;
}
private static RecommandPojo buildFunnyList(List<RecommandBotInfo> data) {
// RecommandPojo con = new RecommandPojo();
// con.setType("Container");
// con.setHeight("100%");
// con.setWidth("100%");
// con.setAlignItems("center");
RecommandPojo list = new RecommandPojo();
list.setType("List");
list.setDirection("horizontal");
list.setMarginTop("65dp");
list.setMarginLeft("25dp");
list.setData(data);
list.setItems(Collections.singletonList(FUNNY_LIST_CON));
// con.setItems(Collections.singletonList(list));
return list;
}
private static RecommandPojo buildImgFrmTxtContainerFunny() {
RecommandPojo container = new RecommandPojo();
container.setType("Container");
container.setWidth("275dp");
container.setMarginLeft("30dp");
//image
RecommandPojo image = new RecommandPojo();
image.setType("Image");
image.setWidth("230dp");
image.setHeight("230dp");
image.setMarginLeft("7dp");
image.setMarginTop("7dp");
image.setPosition("absolute");
image.setScaleType("fitXY");
image.setBorderRadius("22dp");
image.setSrc("${data.imageSrc}");
image.setOnClick(Collections.singletonList(new Event("SendEvent", "${data.imageId}")));
//frame
RecommandPojo frame = new RecommandPojo();
frame.setType("Frame");
frame.setWidth("40dp");
frame.setHeight("40dp");
frame.setBackgroundColor("rgba(0,0,0,0.9)");
frame.setBorderRadius("15dp");
RecommandPojo frmCon = new RecommandPojo();
frmCon.setType("Container");
frmCon.setWidth("100%");
frmCon.setHeight("100%");
frmCon.setAlignItems("center");
frmCon.setJustifyContent("center");
RecommandPojo frmText = new RecommandPojo();
frmText.setType("Text");
frmText.setText("${data.num}");
frmText.setFontSize("25dp");
frmCon.setItems(Collections.singletonList(frmText));
frame.setItems(Collections.singletonList(frmCon));
//text
RecommandPojo text = new RecommandPojo();
text.setType("Text");
text.setFontSize("33dp");
text.setMarginTop("200dp");
text.setMarginLeft("7dp");
text.setText("${data.imageName}");
container.setItems(Arrays.asList(image,frame,text));
return container;
}
private static RecommandPojo buildImgFrmTxtContainerFirstRow(String imgSrc, String imgId, String productName, String rankImgSrc) {
......@@ -160,21 +339,22 @@ public class RecommendUtil {
image.setPosition("absolute");
image.setScaleType("fitXY");
image.setBorderRadius("15dp");
image.setSrc(new StringBuilder("https://aliyun-hz1.chewrobot.com/xiaoduhome/image/").append(imgSrc).toString());
image.setSrc(imgSrc);
image.setOnClick(Collections.singletonList(new Event("SendEvent", imgId)));
//frame
RecommandPojo rankImg = new RecommandPojo();
rankImg.setType("Image");
rankImg.setWidth("55dp");
rankImg.setHeight("55dp");
image.setSrc(rankImgSrc);
rankImg.setScaleType("fitXY");
rankImg.setWidth("45dp");
rankImg.setHeight("60dp");
rankImg.setSrc(new StringBuilder("https://aliyun-hz1.chewrobot.com/xiaoduhome/image/").append(rankImgSrc).toString());
//text
RecommandPojo text = new RecommandPojo();
text.setType("Text");
text.setFontSize("25dp");
text.setMarginTop("160dp");
text.setMarginTop("145dp");
text.setMarginLeft("7dp");
text.setText(productName);
......@@ -182,7 +362,7 @@ public class RecommendUtil {
return container;
}
private static RecommandPojo buildImgFrmTxtContainerFourth(String imgSrc, String imgName) {
private static RecommandPojo buildImgFrmTxtContainerFourth(String imgSrc, String imgId, String productName) {
RecommandPojo container = new RecommandPojo();
container.setType("Container");
container.setWidth("220dp");
......@@ -198,8 +378,8 @@ public class RecommendUtil {
image.setPosition("absolute");
image.setScaleType("fitXY");
image.setBorderRadius("15dp");
image.setSrc(new StringBuilder("https://aliyun-hz1.chewrobot.com/xiaoduhome/image/").append(imgSrc).toString());
image.setOnClick(Collections.singletonList(new Event("SendEvent", "${data.imageId}")));
image.setSrc(imgSrc);
image.setOnClick(Collections.singletonList(new Event("SendEvent", imgId)));
//frame
RecommandPojo frame = new RecommandPojo();
......@@ -227,16 +407,43 @@ public class RecommendUtil {
RecommandPojo text = new RecommandPojo();
text.setType("Text");
text.setFontSize("25dp");
text.setMarginTop("160dp");
text.setMarginTop("165dp");
text.setMarginLeft("7dp");
text.setText(imgName);
text.setText(productName);
container.setItems(Arrays.asList(image,frame,text));
return container;
}
public static RecommandDocument getRankDocument() {
private static RecommandPojo buildPageButton(int curIndex, int num) {
RecommandPojo fCon = new RecommandPojo();
fCon.setType("Container");
fCon.setTop("20dp");
fCon.setRight("15dp");
fCon.setPosition("absolute");
RecommandPojo frame = new RecommandPojo();
frame.setType("Frame");
frame.setBorderRadius("40dp");
frame.setBackgroundColor("rgba(0,0,0,0.5)");
RecommandPojo sCon = new RecommandPojo();
sCon.setType("Container");
sCon.setWidth("130dp");
sCon.setHeight("35dp");
sCon.setAlignItems("center");
sCon.setJustifyContent("center");
RecommandPojo text = new RecommandPojo();
text.setType("Text");
text.setFontSize("22dp");
if (num == 0) text.setText("第"+curIndex+"页");
else text.setText(curIndex+"/"+num);
sCon.setItems(Collections.singletonList(text));
frame.setItems(Collections.singletonList(sCon));
fCon.setItems(Collections.singletonList(frame));
return fCon;
}
private static List<RecommandBotInfo> getListData(int row,int begin, int end, List<OnProductDetail> bots, StringBuilder botIds) {
......@@ -254,13 +461,27 @@ public class RecommendUtil {
return data;
}
private static List<RecommandBotInfo> getListDataNoIds(int row,int begin, int end, List<OnProductDetail> bots) {
List<RecommandBotInfo> data = new ArrayList<>();
int n = 1+row*4;
for (int i = begin; i < end; i++) {
OnProductDetail bot = bots.get(i);
String imgSrc = new StringBuilder(Constants.IMG_PREFIX).append(bot.getBannerImgUrl()).toString();
String imageId = new StringBuilder(Constants.PRE_PRODUCT_IMG).append(bot.getName()).toString();
RecommandBotInfo detail = new RecommandBotInfo(imgSrc,imageId, TempleUtils.correctName(bot.getName()));
detail.setNum(i-begin+n);
data.add(detail);
}
return data;
}
private static RecommandPojo buildRecommendList(List<RecommandBotInfo> data) {
RecommandPojo list = new RecommandPojo();
list.setType("List");
list.setWidth("100%");
list.setHeight("240dp");
list.setMarginLeft("20dp");
list.setMarginBottom("35dp");
list.setMarginBottom("55dp");
list.setDirection("horizontal");
list.setData(data);
list.setItems(Collections.singletonList(RECOM_LIST_CON));
......@@ -313,7 +534,7 @@ public class RecommendUtil {
RecommandPojo text = new RecommandPojo();
text.setType("Text");
text.setFontSize("25dp");
text.setMarginTop("160dp");
text.setMarginTop("165dp");
text.setMarginLeft("7dp");
text.setText("${data.imageName}");
......@@ -338,6 +559,40 @@ public class RecommendUtil {
return footerCon;
}
private static RecommandPojo buildRankCategoryFooter() {
RecommandPojo footerCon = new RecommandPojo();
footerCon.setType("Container");
footerCon.setPosition("absolute");
footerCon.setWidth("100%");
footerCon.setLeft("0");
footerCon.setBottom("0");
RecommandPojo footer = new RecommandPojo();
footer.setType("Footer");
footer.setHints(Arrays.asList("打开第一个","下一页","上一页","跳到第三页","返回"));
footerCon.setItems(Collections.singletonList(footer));
return footerCon;
}
private static RecommandPojo buildFunnyFooter() {
RecommandPojo footerCon = new RecommandPojo();
footerCon.setType("Container");
footerCon.setPosition("absolute");
footerCon.setWidth("100%");
footerCon.setLeft("0");
footerCon.setBottom("0");
RecommandPojo footer = new RecommandPojo();
footer.setType("Footer");
footer.setHints(Arrays.asList("打开第一个","返回"));
footerCon.setItems(Collections.singletonList(footer));
return footerCon;
}
private static RecommandPojo buildRecomendBackgroundImg() {
RecommandPojo backGroundImg = new RecommandPojo();
backGroundImg.setType("Image");
......@@ -361,6 +616,24 @@ public class RecommendUtil {
return head;
}
private static RecommandPojo buildRankHead() {
RecommandPojo head = new RecommandPojo();
head.setType("Header");
head.setHeaderTitle("排行榜");
head.setHasBackIcon(false);
return head;
}
private static RecommandPojo buildFunnyHead() {
RecommandPojo head = new RecommandPojo();
head.setType("Header");
head.setHeaderTitle("精品推荐");
head.setHasBackIcon(false);
return head;
}
private static RecommandPojo buildRecommendCollectHead(String category) {
RecommandPojo head = new RecommandPojo();
head.setType("Header");
......@@ -369,4 +642,12 @@ public class RecommendUtil {
return head;
}
// public static RecommandDocument getRankDocument() {
// return rankDocument;
// }
//
public static void setRankDocument(RecommandDocument rankDocument) {
RecommendUtil.rankDocument = rankDocument;
}
}
......@@ -29,7 +29,7 @@ public class XiaoDuHomeController {
//service.disableVerify();
service.enableVerify();
String str = service.run();
//log.info("响应信息:{}", str);
log.info("响应信息:{}", str);
return str;
} catch (Exception e) {
e.printStackTrace();
......
......@@ -85,7 +85,7 @@ public class DplBotService extends BaseBot {
private static final ConcurrentHashMap<String, OverTimeDetail> LAST_OUTTIME_RESULT = new ConcurrentHashMap<>();
private static volatile FunnyDocument FUNNY_DEFAULT_DOCUMENT;
private static volatile RecommandDocument FUNNY_DEFAULT_DOCUMENT;
static {
FIRST_PAGE = JSON.parseObject(DplbotServiceUtil.getDPLTemple("static/json/firstPage.json"), MyDocument.class);
......@@ -131,7 +131,7 @@ public class DplBotService extends BaseBot {
Future future = DplbotServiceUtil.getPOOL().submit(new Task(intentRequest));
future.get(2200, TimeUnit.MILLISECONDS);
} catch (InterruptedException | ExecutionException e) {
log.error("获取任务执行结果出错:{}", e.toString());
log.error("获取任务执行结果出错:{}", ExceptionUtils.getStackTrace(e));
return buildErrorResponse(SORRY_UNCATCH);
} catch (TimeoutException e) {
log.info("超时,让用户再说一遍:{}",e.toString());
......@@ -143,7 +143,7 @@ public class DplBotService extends BaseBot {
return buildErrorResponse(SORRY_UNCATCH);
}
} catch (Exception all) {
log.error("任务执行发生了错误:{}", all.toString());
log.error("任务执行发生了错误:{}", ExceptionUtils.getStackTrace(all));
return buildErrorResponse(SORRY_UNCATCH);
}
return LAST_OUTTIME_RESULT.remove(getUserId()).getResponse();
......@@ -177,7 +177,7 @@ public class DplBotService extends BaseBot {
text = text.substring(text.indexOf("】")+1);
log.info("旁白名字:{}",aside);
PlayDocument document = PlayUtils.getPlayDocument(productName, aside, ScheduleService.getAsideImgUrl(botID, aside),
data.getAudio(), text, DplbotServiceUtil.doesUserCollectThisBot(botID, getAccessToken(), getUserId()));
data.getAudio(), text);
RenderDocument render = new RenderDocument(document);
this.setSessionAttribute(PRE_COLLE, null);
......@@ -212,7 +212,7 @@ public class DplBotService extends BaseBot {
String productName = componentId.substring(5);
OnProductDetail productDetail = ScheduleService.PRODUCT_NAME_DETAIL.get(productName);
if (productDetail == null && !productName.equals("清新传")) {
if (productDetail == null && !productName.equals("清新传{/zhuan4/}")) {
return buildErrorResponse("目前不支持该作品");
}
String imgUrl = new StringBuilder(Constants.IMG_PREFIX).append(productDetail.getBannerImgUrl()).toString();
......@@ -300,8 +300,7 @@ public class DplBotService extends BaseBot {
if (keng.equals("清新传")) keng = "清新传{/zhuan4/}";
String botID = ScheduleService.getProductNameDetail().get(keng).getBotAccount();
PlayDocument document = PlayUtils.getPlayDocument(productName, aside, ScheduleService.getAsideImgUrl(botID, aside),
data.getAudio(), text, DplbotServiceUtil.didUserCollecThisProduct(botID, getUserId(),
getAccessToken(), getSessionAttribute("userId")));
data.getAudio(), text);
RenderDocument render = new RenderDocument(document);
this.setSessionAttribute(PRE_COLLE, null);
......@@ -353,8 +352,8 @@ public class DplBotService extends BaseBot {
RecommandDocument document = RecommendUtil.getCategory(0, category);
if (document == null) return buildErrorResponse("不好意思该分类还没有作品");
RenderDocument render = new RenderDocument(document);
this.setSessionAttribute("category",category);
this.addDirective(render);
this.setSessionAttribute("category",category);
this.setSessionAttribute("trace","05");
} else if ("playButton".equals(componentId)) {
return buildErrorResponse("您可以直接对我说我要送花或者我要收藏或取消收藏");
......@@ -387,7 +386,6 @@ public class DplBotService extends BaseBot {
RenderDocument render = new RenderDocument(document);
addDirective(render);
setSessionAttribute(PRE_COLLE,document.getIdToken());
setSessionAttribute("ranking", null);
setSessionAttribute("recommand", null);
setSessionAttribute("comCnt", null);
setSessionAttribute(BACK_TRACE, "02");
......@@ -700,10 +698,60 @@ public class DplBotService extends BaseBot {
dealCollectHistoryJump(index, false, detail, userId);
break;
}
case '4' : {
dealRankJump(index, detail);
break;
}
case '5' : {
dealCategoryJump(index, detail);
break;
}
default : {
detail.setResponse(buildErrorResponse("该页面不支持跳转"));
}
}
LAST_OUTTIME_RESULT.put(userId,detail);
}
private void dealRankJump(int index, OverTimeDetail detail) {
index = index == 0 ? index : index-1;
RecommandDocument document;
if (index == 0) document = RecommendUtil.getRankDocumentFirstPage();
else document = RecommendUtil.getRankOtherPageDocument(index);
if (document == null) {
detail.setResponse(buildErrorResponse("超出了范围,无法跳转"));
return;
}
RenderDocument render = new RenderDocument(document);
addDirective(render);
detail.getDirectives().add(render);
String cmt = String.valueOf(index+1);
setSessionAttribute("comCnt",cmt);
setSessionAttribute("recommand", document.getRecommendIdList());
detail.getAttributes().put("recommand", document.getRecommendIdList());
detail.getAttributes().put("comCnt", cmt);
}
private void dealCategoryJump(int index, OverTimeDetail detail) {
index = index == 0 ? index : index-1;
String category = getSessionAttribute("category");
if (category == null) {
detail.setResponse(buildErrorResponse("无法跳转,请说返回然后重新进入当前分类"));
return;
}
RecommandDocument document = RecommendUtil.getCategory(index, category);
if (document == null) {
detail.setResponse(buildErrorResponse("超出了范围,无法跳转"));
return;
}
RenderDocument render = new RenderDocument(document);
addDirective(render);
detail.getDirectives().add(render);
String cmt = String.valueOf(index+1);
setSessionAttribute("comCnt",cmt);
detail.getAttributes().put("comCnt", cmt);
}
private void dealCollectHistoryJump(int index, boolean collect, OverTimeDetail detail, String userId) {
index = index == 0 ? index : index-1;
int start = index*CO_HI_PAGE_SIZE;
......@@ -894,20 +942,20 @@ public class DplBotService extends BaseBot {
}
private void dealRankIntent(OverTimeDetail detail, String userId) {
RankingDocument document = RankUtil.getRankDocument();
RecommandDocument document = RecommendUtil.getRankDocumentFirstPage();
RenderDocument render = new RenderDocument();
render.setDocument(document);
addDirective(render);
detail.getDirectives().add(render);
String token = document.getRankBotIds();
String token = document.getRecommendIdList();
if (token != null) {
setSessionAttribute("ranking", token);
setSessionAttribute("recommand", null);
setSessionAttribute("recommand", token);
setSessionAttribute(PRE_COLLE, null);
setSessionAttribute("comCnt", null);
detail.getAttributes().put("ranking", token);
detail.getAttributes().put("recommand", null);
detail.getAttributes().put("recommand", token);
detail.getAttributes().put(PRE_COLLE, null);
detail.getAttributes().put("comCnt", null);
}
setSessionAttribute(BACK_TRACE, "04");
detail.getAttributes().put(BACK_TRACE, "04");
......@@ -924,15 +972,11 @@ public class DplBotService extends BaseBot {
if (token != null) {
setSessionAttribute("recommand", token);
setSessionAttribute(PRE_COLLE, null);
setSessionAttribute("ranking", null);
setSessionAttribute("comCnt", null);
setSessionAttribute("count", recommandDocument.getCount());
detail.getAttributes().put("comCnt", null);
detail.getAttributes().put("ranking", null);
detail.getAttributes().put("recommand", token);
detail.getAttributes().put(PRE_COLLE, null);
detail.getAttributes().put("count", recommandDocument.getCount());
}
setSessionAttribute(BACK_TRACE, "03");
detail.getAttributes().put(BACK_TRACE,"03");
......@@ -950,14 +994,12 @@ public class DplBotService extends BaseBot {
addDirective(render);
//dplBotService.addDirective(new PushStack());
setSessionAttribute(PRE_COLLE,document.getIdToken());
setSessionAttribute("ranking", null);
setSessionAttribute("recommand", null);
setSessionAttribute("comCnt", null);
setSessionAttribute(BACK_TRACE, "02");
detail.getDirectives().add(render);
detail.getAttributes().put("comCnt", null);
detail.getAttributes().put("ranking", null);
detail.getAttributes().put("recommand", null);
detail.getAttributes().put(PRE_COLLE,document.getIdToken());
detail.getAttributes().put(BACK_TRACE, "02");
......@@ -973,7 +1015,6 @@ public class DplBotService extends BaseBot {
return;
}
char sign = signPage.charAt(1);
int index = 0;
switch (sign) {
case '1': {
String recommendNextCount = getSessionAttribute("comCnt");
......@@ -1020,17 +1061,6 @@ public class DplBotService extends BaseBot {
}
break;
}
case '6': {
ExecuteCommands executeCommands = new ExecuteCommands();
SetPageCommand setPage = new SetPageCommand();
setPage.setComponentId("funnyPage");
setPage.setPosition(SetPageCommand.Position.RELATIVE);
setPage.setValue(1);
executeCommands.addCommand(setPage);
addDirective(executeCommands);
detail.getDirectives().add(executeCommands);
break;
}
case '3': {
String recommendNextCount = getSessionAttribute("comCnt");
int count = 1;
......@@ -1051,51 +1081,22 @@ public class DplBotService extends BaseBot {
break;
}
case '4': {
String pageIndex = getSessionAttribute("pageIndex");
int count = 15;
String countStr = getSessionAttribute("count");
if (countStr != null) count = Integer.parseInt(countStr);
if (intentRequest.getQuery().getOriginal().contains("页")) {
//update
String updateCount = getSessionAttribute("updateCount");
int update = 1;
if (updateCount != null) update = Integer.valueOf(updateCount);
RankingDocument document = RankUtil.updateRankDocument(update);
if (document == null) {
detail.setResponse(buildErrorResponse("排行榜已经被您翻到底啦,没有了"));
break;
}
count = Integer.parseInt(document.getCount());
RenderDocument render = new RenderDocument(document);
addDirective(render);
detail.getDirectives().add(render);
setSessionAttribute("pageIndex",null);
detail.getAttributes().put("pageIndex",null);
setSessionAttribute("count", document.getCount());
detail.getAttributes().put("count", document.getCount());
setSessionAttribute("updateCount", String.valueOf(update+1));
detail.getAttributes().put("updateCount", String.valueOf(update+1));
detail.setResponse(buildErrorResponse(new StringBuilder("为您刷新排行榜,下面是排行")
.append(update*15).append("到").append(update*15+count).append("的作品").toString()));
break;
}
index = 0;
if (pageIndex != null) index = Integer.parseInt(pageIndex);
ExecuteCommands executeCommands = new ExecuteCommands();
ScrollToIndexCommand scroll = new ScrollToIndexCommand();
scroll.setComponentId("scrollToIndex");
index += 4;
if (index >= count) {
detail.setResponse(buildErrorResponse("请说下一页刷新榜单"));
String recommendNextCount = getSessionAttribute("comCnt");
int count = 1;
if (recommendNextCount != null) count = Integer.parseInt(recommendNextCount);
RecommandDocument document = RecommendUtil.getRankOtherPageDocument(count);
if (document == null) {
detail.setResponse(buildErrorResponse("客观你已经翻到底了,没有更多了"));
break;
}
scroll.setIndex(index);
scroll.setAlign(ScrollToIndexCommand.AlignType.FIRST);
executeCommands.addCommand(scroll);
addDirective(executeCommands);
detail.getDirectives().add(executeCommands);
setSessionAttribute("pageIndex", String.valueOf(index));
detail.getAttributes().put("pageIndex", String.valueOf(index));
RenderDocument render = new RenderDocument(document);
addDirective(render);
detail.getDirectives().add(render);
String token = document.getRecommendIdList();
setSessionAttribute("recommand", token);
detail.getAttributes().put("recommand",token);
setSessionAttribute("comCnt",String.valueOf(count+1));
detail.getAttributes().put("comCnt",String.valueOf(count+1));
break;
}
case '5':{
......@@ -1132,7 +1133,6 @@ public class DplBotService extends BaseBot {
return;
}
char sign = signPage.charAt(1);
int index;
switch (sign) {
case '1':{
String recommendNextCount = getSessionAttribute("comCnt");
......@@ -1177,17 +1177,6 @@ public class DplBotService extends BaseBot {
}
break;
}
case '6': {
ExecuteCommands executeCommands = new ExecuteCommands();
SetPageCommand setPage = new SetPageCommand();
setPage.setComponentId("funnyPage");
setPage.setPosition(SetPageCommand.Position.RELATIVE);
setPage.setValue(-1);
executeCommands.addCommand(setPage);
addDirective(executeCommands);
detail.getDirectives().add(executeCommands);
break;
}
case '3': {
String recommendNextCount = getSessionAttribute("comCnt");
if (recommendNextCount == null || "1".equals(recommendNextCount)) {
......@@ -1207,42 +1196,23 @@ public class DplBotService extends BaseBot {
break;
}
case '4': {
String pageIndex = getSessionAttribute("pageIndex");
index = 0;
if (pageIndex != null) index = Integer.parseInt(pageIndex);
ExecuteCommands executeCommands = new ExecuteCommands();
ScrollToIndexCommand scroll = new ScrollToIndexCommand();
scroll.setComponentId("scrollToIndex");
String updateCount = getSessionAttribute("updateCount");
if (intentRequest.getQuery().getOriginal().contains("页") && updateCount != null && !"0".equals(updateCount)) {
int update = Integer.valueOf(updateCount);
RankingDocument document = RankUtil.updateRankDocument(update-1);
if (document == null) {
detail.setResponse(buildErrorResponse("排行榜已经被您翻到底啦,没有了"));
break;
}
RenderDocument render = new RenderDocument(document);
addDirective(render);
detail.getDirectives().add(render);
setSessionAttribute("pageIndex",null);
detail.getAttributes().put("pageIndex",null);
setSessionAttribute("count", document.getCount());
detail.getAttributes().put("count", document.getCount());
setSessionAttribute("updateCount", String.valueOf(update-1));
detail.getAttributes().put("updateCount", String.valueOf(update-1));
detail.setResponse(buildErrorResponse(new StringBuilder("为您刷新排行榜,下面是排行")
.append(update*15).append("到").append(update*15+15).append("的作品").toString()));
String recommendNextCount = getSessionAttribute("comCnt");
if (recommendNextCount == null || "1".equals(recommendNextCount)) {
detail.setResponse(buildErrorResponse("客观,前面没啦,没法往前翻了"));
break;
}
index -= 4;
if (index < 0) index = 0;
scroll.setIndex(index);
scroll.setAlign(ScrollToIndexCommand.AlignType.FIRST);
executeCommands.addCommand(scroll);
addDirective(executeCommands);
detail.getDirectives().add(executeCommands);
setSessionAttribute("pageIndex", String.valueOf(index));
detail.getAttributes().put("pageIndex", String.valueOf(index));
int count = Integer.parseInt(recommendNextCount);
RecommandDocument document;
if (count == 2) document = RecommendUtil.getRankDocumentFirstPage();
else document = RecommendUtil.getRankOtherPageDocument(count-2);
RenderDocument render = new RenderDocument(document);
addDirective(render);
detail.getDirectives().add(render);
String token = document.getRecommendIdList();
setSessionAttribute("recommand", token);
detail.getAttributes().put("recommand",token);
setSessionAttribute("comCnt",String.valueOf(count-1));
detail.getAttributes().put("comCnt",String.valueOf(count-1));
break;
}
case '5':{
......@@ -1288,8 +1258,9 @@ public class DplBotService extends BaseBot {
case '1':
case '2': detail.setResponse(dealOpenNum(getSessionAttribute(PRE_COLLE), detail)); break;
case '3': detail.setResponse(dealOpenNumInRecommend(getSessionAttribute("recommand"),detail)); break;
case '4': detail.setResponse(dealOpenNum(getSessionAttribute("ranking"),detail)); break;
case '4': detail.setResponse(dealOpenNumInRecommend(getSessionAttribute("recommand"),detail)); break;
case '5': detail.setResponse(dealOpenNumInCategory(userId, detail));break;
case '6': detail.setResponse(dealOpenNumInRecommend(getSessionAttribute("recommand"), detail));break;
default:{
OutputSpeech outputSpeech = new OutputSpeech(OutputSpeech.SpeechType.PlainText, "屏幕上的图标都是可以点击的哦");
detail.getResponse().setOutputSpeech(outputSpeech);
......@@ -1323,9 +1294,11 @@ public class DplBotService extends BaseBot {
RenderDocument render = new RenderDocument(document);
addDirective(render);
setSessionAttribute(PRE_COLLE,document.getIdToken());
setSessionAttribute("recommand", null);
setSessionAttribute(BACK_TRACE, "01");
setSessionAttribute("comCnt", null);
detail.getAttributes().put("comCnt", null);
detail.getAttributes().put("recommand", null);
detail.getAttributes().put(PRE_COLLE, document.getIdToken());
detail.getAttributes().put(BACK_TRACE,"01");
detail.getDirectives().add(render);
......@@ -1413,6 +1386,15 @@ public class DplBotService extends BaseBot {
int count = 1;
if (recommendNextCount != null) count = Integer.parseInt(recommendNextCount);
RecommandDocument recommandDocument = RecommendUtil.getRecommendDocument(count-1);
if (recommandDocument == null) {
RenderDocument render = new RenderDocument();
render.setDocument(LunchUtils.getLunchDocument());
addDirective(render);
detail.getDirectives().add(render);
setSessionAttribute(BACK_TRACE, null);
detail.getAttributes().put(BACK_TRACE, null);
break;
}
RenderDocument render = new RenderDocument();
render.setDocument(recommandDocument);
addDirective(render);
......@@ -1424,23 +1406,38 @@ public class DplBotService extends BaseBot {
setSessionAttribute(BACK_TRACE, "03");
detail.getAttributes().put(BACK_TRACE, "03");
detail.getDirectives().add(render);
detail.setResponse(buildErrorResponse(new StringBuilder("已为您返回到推荐页").toString()));
detail.setResponse(buildErrorResponse("已为您返回到推荐页"));
break;
}
case '4': {
//rank
RankingDocument document = RankUtil.getRankDocument();
String recommendNextCount = getSessionAttribute("comCnt");
int count = 1;
if (recommendNextCount != null) count = Integer.parseInt(recommendNextCount);
RecommandDocument recommandDocument;
if (count == 1) recommandDocument = RecommendUtil.getRankDocumentFirstPage();
else recommandDocument = RecommendUtil.getRankOtherPageDocument(count-1);
if (recommandDocument == null) {
RenderDocument render = new RenderDocument();
render.setDocument(LunchUtils.getLunchDocument());
addDirective(render);
detail.getDirectives().add(render);
setSessionAttribute(BACK_TRACE, null);
detail.getAttributes().put(BACK_TRACE, null);
break;
}
RenderDocument render = new RenderDocument();
render.setDocument(document);
render.setDocument(recommandDocument);
addDirective(render);
detail.getDirectives().add(render);
String token = document.getRankBotIds();
String token = recommandDocument.getRecommendIdList();
if (token != null) {
setSessionAttribute("ranking", token);
detail.getAttributes().put("ranking",token);
setSessionAttribute("recommand", token);
detail.getAttributes().put("recommand",token);
}
setSessionAttribute(BACK_TRACE, "04");
detail.getAttributes().put(BACK_TRACE, "04");
detail.getDirectives().add(render);
detail.setResponse(buildErrorResponse("已为您返回到排行榜"));
break;
}
case '5':{
......@@ -1498,13 +1495,17 @@ public class DplBotService extends BaseBot {
}
String text = data.getText();
if ("funny".equals(intentName) || data.getAipioneerUsername().equals("4151097686")) {
FunnyDocument document = displayFunnyRecommandPage(text);
RecommandDocument document = displayFunnyRecommandPage(text, data.getAudio());
if (document != null) {
document.getMainTemplate().getItems().get(2).setSrc(data.getAudio());
FUNNY_DEFAULT_DOCUMENT = document;
RenderDocument render = new RenderDocument(document);
addDirective(render);
detail.getDirectives().add(render);
setSessionAttribute("recommand", document.getRecommendIdList());
setSessionAttribute(BACK_TRACE, "06");
detail.getAttributes().put(BACK_TRACE, "06");
detail.getAttributes().put("recommand", document.getRecommendIdList());
LAST_OUTTIME_RESULT.put(userId, detail);
return;
}
......@@ -1534,7 +1535,7 @@ public class DplBotService extends BaseBot {
PlayDocument document = PlayUtils.getPlayDocument(correctName(productName), aside,
ScheduleService.getAsideImgUrl(botAccount, aside),
data.getAudio(), text,DplbotServiceUtil.doesUserCollectThisBot(botAccount, getAccessToken(), userId));
data.getAudio(), text);
RenderDocument render = new RenderDocument(document);
addDirective(render);
detail.getDirectives().add(render);
......@@ -1584,7 +1585,7 @@ public class DplBotService extends BaseBot {
String productName = ScheduleService.PRODUCT_ID_DETAIL.get(botAccount).getName();
PlayDocument document = PlayUtils.getPlayDocument(correctName(productName), aside,
ScheduleService.getAsideImgUrl(botAccount, aside),
data.getAudio(), text,DplbotServiceUtil.doesUserCollectThisBot(botAccount, getAccessToken(), userId));
data.getAudio(), text);
RenderDocument render = new RenderDocument(document);
addDirective(render);
detail.getDirectives().add(render);
......@@ -1593,6 +1594,9 @@ public class DplBotService extends BaseBot {
}
private Response dealOpenNumInRecommend(String idsToken, OverTimeDetail overDetail) {
if (idsToken == null) {
return buildErrorResponse("请重新进入当前页面");
}
int collectNum = Integer.parseInt(getSlot("sys.number"));
String[] tokenList = new String(Base64.getDecoder().decode(idsToken)).split(File.separator);
if (collectNum > tokenList.length || collectNum <= 0) return buildErrorResponse("这个数字超出了范围");
......@@ -1613,13 +1617,14 @@ public class DplBotService extends BaseBot {
int num = 1;
if (numStr != null) num = Integer.parseInt(numStr);
List<String> categoryBots = ScheduleService.getCategoryProductIdList().get(getSessionAttribute("category"));
if (num <= 0 || num > categoryBots.size()) {
num = pageIndex*RE_RA_CA_PAGE_SIZE+num-1;
if (num < 0 || num >= categoryBots.size()) {
Response response = buildErrorResponse("这个数字超出了范围,作品的序号已显示在图片左上角");
detail.setResponse(response);
LAST_OUTTIME_RESULT.put(userId, detail);
return response;
}
String botId = categoryBots.get(pageIndex*16+num-1);
String botId = categoryBots.get(num);
String name = ScheduleService.getProductIdDetail().get(botId).getName();
Response response;
if (DplbotServiceUtil.doesUserPlayed(botId, getUserId(), getAccessToken())) response = directInProduct(correctName(name), botId, detail);
......@@ -1674,7 +1679,7 @@ public class DplBotService extends BaseBot {
String aside = DplbotServiceUtil.getAsideText(text);
text = text.substring(text.indexOf("】")+1);
PlayDocument document = PlayUtils.getPlayDocument(productName, aside,ScheduleService.getAsideImgUrl(botId, aside),
data.getAudio(), text,DplbotServiceUtil.doesUserCollectThisBot(botId, getAccessToken(), getUserId()));
data.getAudio(), text);
RenderDocument render = new RenderDocument(document);
this.setSessionAttribute(PRE_COLLE, null);
......@@ -1766,7 +1771,7 @@ public class DplBotService extends BaseBot {
return new Response();
}
private FunnyDocument displayFunnyRecommandPage(String word) {
private RecommandDocument displayFunnyRecommandPage(String word, String audio) {
try {
List<String> botNames = Utils.getRecommandBotNames(word);
log.info("botNames:{}",botNames);
......@@ -1777,7 +1782,7 @@ public class DplBotService extends BaseBot {
if (detail == null) continue;
bots.add(detail);
}
if (bots.size() != 0) return TempleUtils.getFunnyDocument(bots);
if (bots.size() != 0) return RecommendUtil.getFunnyDocument(bots, audio);
} catch (Exception e) {
log.error("获取funny页出错:{}",e.toString());
}
......
......@@ -4,6 +4,7 @@ import ai.qiwu.com.xiaoduhome.common.BaseHolder;
import ai.qiwu.com.xiaoduhome.common.Config;
import ai.qiwu.com.xiaoduhome.common.OkHttp3Utils;
import ai.qiwu.com.xiaoduhome.common.temple.onLunch.LunchUtils;
import ai.qiwu.com.xiaoduhome.common.temple.recommand.RecommendUtil;
import ai.qiwu.com.xiaoduhome.entity.primary.GameProjectTb;
import ai.qiwu.com.xiaoduhome.entity.primary.OnProductDetail;
import ai.qiwu.com.xiaoduhome.entity.secondary.XiaoDuHistoryTB;
......@@ -29,6 +30,7 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import static ai.qiwu.com.xiaoduhome.common.Constants.DPL_COMPONENT_ID.DEFAULT_ASIDE_IMG_URL;
import static ai.qiwu.com.xiaoduhome.common.Constants.RE_RA_CA_PAGE_SIZE;
import static ai.qiwu.com.xiaoduhome.common.Constants.UNIT_PRICE;
import static ai.qiwu.com.xiaoduhome.common.Constants.XIAOWU_API.ASIDE_IMG_URL;
......@@ -39,15 +41,16 @@ import static ai.qiwu.com.xiaoduhome.common.Constants.XIAOWU_API.ASIDE_IMG_URL;
@Slf4j
@Component
public class ScheduleService implements InitializingBean {
private static int allProductCount;
private static volatile int allProductCount;
private static volatile int rankPageSize;
private static volatile List<GameProjectTb> RANKING_LIST = new ArrayList<>();
private static volatile List<GameProjectTb> RECOMMEND_LIST = new ArrayList<>();
private static volatile List<OnProductDetail> ALL_ON_PRODUCT = new ArrayList<>();
private static volatile List<OnProductDetail> RANK_ORDER_IDs = new ArrayList<>();
static final HashMap<String, OnProductDetail> PRODUCT_NAME_DETAIL = new HashMap<>();
static final HashMap<String, OnProductDetail> PRODUCT_ID_DETAIL = new HashMap<>();
static volatile HashMap<String, OnProductDetail> PRODUCT_NAME_DETAIL = new HashMap<>();
static volatile HashMap<String, OnProductDetail> PRODUCT_ID_DETAIL = new HashMap<>();
private static final HashMap<String, Map<String,String>> ASIDE_IMG = new HashMap<>();
private static volatile HashMap<String, Map<String,String>> ASIDE_IMG = new HashMap<>();
private static final HashMap<String, String> NX2_BOT_TO_HZ1 = new HashMap<>();
private static final HashMap<String, String> HZ1_BOT_TO_NX2 = new HashMap<>();
......@@ -56,7 +59,7 @@ public class ScheduleService implements InitializingBean {
static final String[] CATEGORY = {"古风", "儿童", "科幻", "占星", "恋爱", "灾难", "架空", "经营", "冒险", "武侠"};
private static final String[] CATEGORY_CHARAC={"gufeng","child","kehuan","zhanxing","lianai","zainan","jiakong","jingying","maoxian","wuxia"};
private static final HashMap<String,List<String>> CATEGORY_PRODUCT_ID_LIST = new HashMap<>();
private static volatile HashMap<String,List<String>> CATEGORY_PRODUCT_ID_LIST = new HashMap<>();
private final GameProjectTbRepository gameProjectTbRepository;
......@@ -151,18 +154,24 @@ public class ScheduleService implements InitializingBean {
new Thread(() -> {
ALL_ON_PRODUCT = allOnProductInfoRepository.findAllByApplyStatus(1);
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);
PRODUCT_NAME_DETAIL.put(productName, item);
PRODUCT_ID_DETAIL.put(botAccount, item);
nd.put(productName, item);
id.put(botAccount, item);
rankOrder.put(item.getWatch(), item);
}
RANK_ORDER_IDs.addAll(rankOrder.values());
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());
......@@ -171,13 +180,15 @@ public class ScheduleService implements InitializingBean {
@Scheduled(cron = "0 0 1 * * ?")
public void initProductList() {
new Thread(() -> {
HashMap<String,List<String>> ci = new HashMap<>();
for (String category: CATEGORY) {
//List<GameProjectTb> list = gameProjectTbRepository.categoryProject(category);
List<String> idList = gameProjectTbRepository.categoryProList(category);
CATEGORY_PRODUCT_ID_LIST.put(category, idList);
ci.put(category, idList);
//CATEGORY_PRODUCT_LIST.put(category, list);
//log.info("分类{},作品列表{}", category, list);
}
CATEGORY_PRODUCT_ID_LIST = ci;
}).start();
//log.error("更新分类作品列表出错:{}", e.getMessage());
}
......@@ -213,6 +224,7 @@ public class ScheduleService implements InitializingBean {
private void getAsideImg() {
DplbotServiceUtil.getPOOL().submit(() -> {
List<String> botIds = gameProjectTbRepository.getAllOnTableProductIds();
HashMap<String, Map<String,String>> ai = new HashMap<>();
for (String botId: botIds) {
try {
String nxBotId = HZ1_BOT_TO_NX2.get(botId);
......@@ -225,11 +237,12 @@ public class ScheduleService implements InitializingBean {
params.put("aipioneerUsername",nxBotId);
String str = OkHttp3Utils.doGet(ASIDE_IMG_URL, params);
AsideImageResponse response = JSON.parseObject(str, AsideImageResponse.class);
ASIDE_IMG.put(botId, response.getData().getNpcHeadImgUrl());
ai.put(botId, response.getData().getNpcHeadImgUrl());
} catch (Exception e) {
log.error("定时获取头像出错:botId:{},{}",botId, ScheduleService.getProductIdDetail().get(botId).getName());
}
}
ASIDE_IMG = ai;
});
}
......@@ -360,4 +373,8 @@ public class ScheduleService implements InitializingBean {
if (url == null) url = DEFAULT_ASIDE_IMG_URL;
return url;
}
public static int getRankPageSize() {
return rankPageSize;
}
}
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