作者 郭盛
1 个管道 的构建 通过 耗费 1 秒

修改通过详情页搜索

@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 <component name="ChangeListManager"> 6 <component name="ChangeListManager">
7 <list default="true" id="e93f11c2-a7d9-4d35-8b1c-8dd18e7f5fef" name="Default" comment=""> 7 <list default="true" id="e93f11c2-a7d9-4d35-8b1c-8dd18e7f5fef" name="Default" comment="">
8 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/api/controller/User.php" afterPath="$PROJECT_DIR$/application/api/controller/User.php" /> 8 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/api/controller/User.php" afterPath="$PROJECT_DIR$/application/api/controller/User.php" />
  9 + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/api.html" afterPath="$PROJECT_DIR$/public/api.html" />
9 </list> 10 </list>
10 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> 11 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
11 <option name="TRACKING_ENABLED" value="true" /> 12 <option name="TRACKING_ENABLED" value="true" />
@@ -19,8 +20,8 @@ @@ -19,8 +20,8 @@
19 <file leaf-file-name="User.php" pinned="false" current-in-tab="true"> 20 <file leaf-file-name="User.php" pinned="false" current-in-tab="true">
20 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php"> 21 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
21 <provider selected="true" editor-type-id="text-editor"> 22 <provider selected="true" editor-type-id="text-editor">
22 - <state relative-caret-position="-252">  
23 - <caret line="623" column="13" lean-forward="false" selection-start-line="623" selection-start-column="13" selection-end-line="623" selection-end-column="13" /> 23 + <state relative-caret-position="455">
  24 + <caret line="918" column="44" lean-forward="true" selection-start-line="918" selection-start-column="44" selection-end-line="918" selection-end-column="44" />
24 <folding> 25 <folding>
25 <element signature="e#535#1273#0#PHP" expanded="false" /> 26 <element signature="e#535#1273#0#PHP" expanded="false" />
26 <element signature="e#1278#2941#0#PHP" expanded="false" /> 27 <element signature="e#1278#2941#0#PHP" expanded="false" />
@@ -47,59 +48,60 @@ @@ -47,59 +48,60 @@
47 <element signature="e#14837#16157#0#PHP" expanded="false" /> 48 <element signature="e#14837#16157#0#PHP" expanded="false" />
48 <element signature="e#16163#16739#0#PHP" expanded="false" /> 49 <element signature="e#16163#16739#0#PHP" expanded="false" />
49 <element signature="e#16744#17356#0#PHP" expanded="false" /> 50 <element signature="e#16744#17356#0#PHP" expanded="false" />
  51 + <element signature="e#17362#18078#0#PHP" expanded="false" />
  52 + <element signature="e#18083#21577#0#PHP" expanded="false" />
50 <element signature="e#21583#22513#0#PHP" expanded="false" /> 53 <element signature="e#21583#22513#0#PHP" expanded="false" />
51 <element signature="e#22518#26568#0#PHP" expanded="false" /> 54 <element signature="e#22518#26568#0#PHP" expanded="false" />
52 <element signature="e#26574#26951#0#PHP" expanded="false" /> 55 <element signature="e#26574#26951#0#PHP" expanded="false" />
53 <element signature="e#26956#27395#0#PHP" expanded="false" /> 56 <element signature="e#26956#27395#0#PHP" expanded="false" />
54 - <element signature="e#27401#28136#0#PHP" expanded="false" />  
55 - <element signature="e#28141#29813#0#PHP" expanded="false" />  
56 - <element signature="e#29819#30324#0#PHP" expanded="false" />  
57 - <element signature="e#30329#30580#0#PHP" expanded="false" />  
58 - <element signature="e#30586#31065#0#PHP" expanded="false" />  
59 - <element signature="e#31070#31827#0#PHP" expanded="false" />  
60 - <element signature="e#31833#32314#0#PHP" expanded="false" />  
61 - <element signature="e#32319#33089#0#PHP" expanded="false" />  
62 - <element signature="e#33095#33458#0#PHP" expanded="false" />  
63 - <element signature="e#33463#33654#0#PHP" expanded="false" />  
64 - <element signature="e#33660#34018#0#PHP" expanded="false" />  
65 - <element signature="e#34023#34214#0#PHP" expanded="false" />  
66 - <element signature="e#34220#35363#0#PHP" expanded="false" />  
67 - <element signature="e#35368#38033#0#PHP" expanded="false" />  
68 - <element signature="e#38039#38537#0#PHP" expanded="false" />  
69 - <element signature="e#38542#40288#0#PHP" expanded="false" />  
70 - <element signature="e#40294#40707#0#PHP" expanded="false" />  
71 - <element signature="e#40712#41191#0#PHP" expanded="false" />  
72 - <element signature="e#41197#41731#0#PHP" expanded="false" />  
73 - <element signature="e#41736#43121#0#PHP" expanded="false" />  
74 - <element signature="e#43127#43781#0#PHP" expanded="false" />  
75 - <element signature="e#43786#45801#0#PHP" expanded="false" />  
76 - <element signature="e#45807#46567#0#PHP" expanded="false" />  
77 - <element signature="e#46572#49281#0#PHP" expanded="false" />  
78 - <element signature="e#49307#50138#0#PHP" expanded="false" />  
79 - <element signature="e#50144#50564#0#PHP" expanded="false" />  
80 - <element signature="e#50569#51052#0#PHP" expanded="false" />  
81 - <element signature="e#51058#51864#0#PHP" expanded="false" />  
82 - <element signature="e#51869#55027#0#PHP" expanded="false" />  
83 - <element signature="e#53662#55021#0#PHP" expanded="false" />  
84 - <element signature="e#55042#56377#0#PHP" expanded="false" />  
85 - <element signature="e#55158#55560#0#PHP" expanded="false" />  
86 - <element signature="e#56393#57427#0#PHP" expanded="false" />  
87 - <element signature="e#57433#58191#0#PHP" expanded="false" />  
88 - <element signature="e#58196#61939#0#PHP" expanded="false" />  
89 - <element signature="e#61945#62337#0#PHP" expanded="false" />  
90 - <element signature="e#62342#63294#0#PHP" expanded="false" />  
91 - <element signature="e#63318#63891#0#PHP" expanded="false" />  
92 - <element signature="e#63897#64496#0#PHP" expanded="false" />  
93 - <element signature="e#64501#65428#0#PHP" expanded="false" />  
94 - <element signature="e#65434#66148#0#PHP" expanded="false" />  
95 - <element signature="e#66154#66581#0#PHP" expanded="false" />  
96 - <element signature="e#66586#67055#0#PHP" expanded="false" />  
97 - <element signature="e#67062#68267#0#PHP" expanded="false" />  
98 - <element signature="e#68272#69975#0#PHP" expanded="false" />  
99 - <element signature="e#69981#70758#0#PHP" expanded="false" />  
100 - <element signature="e#70763#74701#0#PHP" expanded="false" />  
101 - <element signature="e#74707#75216#0#PHP" expanded="false" />  
102 - <element signature="e#75221#75893#0#PHP" expanded="false" /> 57 + <element signature="e#28673#31625#0#PHP" expanded="false" />
  58 + <element signature="e#31637#32142#0#PHP" expanded="false" />
  59 + <element signature="e#32147#32398#0#PHP" expanded="false" />
  60 + <element signature="e#32404#32883#0#PHP" expanded="false" />
  61 + <element signature="e#32888#33645#0#PHP" expanded="false" />
  62 + <element signature="e#33651#34132#0#PHP" expanded="false" />
  63 + <element signature="e#34137#34907#0#PHP" expanded="false" />
  64 + <element signature="e#34913#35276#0#PHP" expanded="false" />
  65 + <element signature="e#35281#35472#0#PHP" expanded="false" />
  66 + <element signature="e#35478#35836#0#PHP" expanded="false" />
  67 + <element signature="e#35841#36032#0#PHP" expanded="false" />
  68 + <element signature="e#36038#37181#0#PHP" expanded="false" />
  69 + <element signature="e#37186#39851#0#PHP" expanded="false" />
  70 + <element signature="e#39857#40355#0#PHP" expanded="false" />
  71 + <element signature="e#40360#42106#0#PHP" expanded="false" />
  72 + <element signature="e#42112#42525#0#PHP" expanded="false" />
  73 + <element signature="e#42530#43009#0#PHP" expanded="false" />
  74 + <element signature="e#43015#43549#0#PHP" expanded="false" />
  75 + <element signature="e#43554#44939#0#PHP" expanded="false" />
  76 + <element signature="e#44945#45599#0#PHP" expanded="false" />
  77 + <element signature="e#45604#47619#0#PHP" expanded="false" />
  78 + <element signature="e#47625#48385#0#PHP" expanded="false" />
  79 + <element signature="e#48390#51099#0#PHP" expanded="false" />
  80 + <element signature="e#51125#51956#0#PHP" expanded="false" />
  81 + <element signature="e#51962#52382#0#PHP" expanded="false" />
  82 + <element signature="e#52387#52870#0#PHP" expanded="false" />
  83 + <element signature="e#52876#53682#0#PHP" expanded="false" />
  84 + <element signature="e#53687#56845#0#PHP" expanded="false" />
  85 + <element signature="e#55480#56839#0#PHP" expanded="false" />
  86 + <element signature="e#56860#58195#0#PHP" expanded="false" />
  87 + <element signature="e#56976#57378#0#PHP" expanded="false" />
  88 + <element signature="e#58211#59245#0#PHP" expanded="false" />
  89 + <element signature="e#59251#60009#0#PHP" expanded="false" />
  90 + <element signature="e#60014#63757#0#PHP" expanded="false" />
  91 + <element signature="e#63763#64155#0#PHP" expanded="false" />
  92 + <element signature="e#64160#65112#0#PHP" expanded="false" />
  93 + <element signature="e#65136#65709#0#PHP" expanded="false" />
  94 + <element signature="e#65715#66314#0#PHP" expanded="false" />
  95 + <element signature="e#66319#67246#0#PHP" expanded="false" />
  96 + <element signature="e#67252#67966#0#PHP" expanded="false" />
  97 + <element signature="e#67972#68399#0#PHP" expanded="false" />
  98 + <element signature="e#68404#68873#0#PHP" expanded="false" />
  99 + <element signature="e#68880#70085#0#PHP" expanded="false" />
  100 + <element signature="e#70090#71793#0#PHP" expanded="false" />
  101 + <element signature="e#71799#72576#0#PHP" expanded="false" />
  102 + <element signature="e#72581#76519#0#PHP" expanded="false" />
  103 + <element signature="e#76525#77034#0#PHP" expanded="false" />
  104 + <element signature="e#77039#77711#0#PHP" expanded="false" />
103 </folding> 105 </folding>
104 </state> 106 </state>
105 </provider> 107 </provider>
@@ -206,9 +208,9 @@ @@ -206,9 +208,9 @@
206 <sorting>DEFINITION_ORDER</sorting> 208 <sorting>DEFINITION_ORDER</sorting>
207 </component> 209 </component>
208 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" /> 210 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
209 - <component name="ProjectFrameBounds">  
210 - <option name="x" value="372" />  
211 - <option name="y" value="119" /> 211 + <component name="ProjectFrameBounds" extendedState="1">
  212 + <option name="x" value="150" />
  213 + <option name="y" value="87" />
212 <option name="width" value="1652" /> 214 <option name="width" value="1652" />
213 <option name="height" value="917" /> 215 <option name="height" value="917" />
214 </component> 216 </component>
@@ -397,7 +399,7 @@ @@ -397,7 +399,7 @@
397 <workItem from="1583799928944" duration="18981000" /> 399 <workItem from="1583799928944" duration="18981000" />
398 <workItem from="1583826020973" duration="10927000" /> 400 <workItem from="1583826020973" duration="10927000" />
399 <workItem from="1583848752159" duration="3638000" /> 401 <workItem from="1583848752159" duration="3638000" />
400 - <workItem from="1583886688361" duration="15391000" /> 402 + <workItem from="1583886688361" duration="16488000" />
401 </task> 403 </task>
402 <task id="LOCAL-00001" summary="调试"> 404 <task id="LOCAL-00001" summary="调试">
403 <created>1574145133364</created> 405 <created>1574145133364</created>
@@ -424,7 +426,7 @@ @@ -424,7 +426,7 @@
424 <servers /> 426 <servers />
425 </component> 427 </component>
426 <component name="TimeTrackingManager"> 428 <component name="TimeTrackingManager">
427 - <option name="totallyTimeSpent" value="612530000" /> 429 + <option name="totallyTimeSpent" value="613627000" />
428 </component> 430 </component>
429 <component name="TodoView"> 431 <component name="TodoView">
430 <todo-panel id="selected-file"> 432 <todo-panel id="selected-file">
@@ -436,7 +438,7 @@ @@ -436,7 +438,7 @@
436 </todo-panel> 438 </todo-panel>
437 </component> 439 </component>
438 <component name="ToolWindowManager"> 440 <component name="ToolWindowManager">
439 - <frame x="372" y="119" width="1652" height="917" extended-state="0" /> 441 + <frame x="150" y="87" width="1652" height="917" extended-state="1" />
440 <layout> 442 <layout>
441 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.16520101" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" /> 443 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.16520101" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
442 <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32912987" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" /> 444 <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32912987" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
@@ -891,8 +893,8 @@ @@ -891,8 +893,8 @@
891 </entry> 893 </entry>
892 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php"> 894 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
893 <provider selected="true" editor-type-id="text-editor"> 895 <provider selected="true" editor-type-id="text-editor">
894 - <state relative-caret-position="-252">  
895 - <caret line="623" column="13" lean-forward="false" selection-start-line="623" selection-start-column="13" selection-end-line="623" selection-end-column="13" /> 896 + <state relative-caret-position="455">
  897 + <caret line="918" column="44" lean-forward="true" selection-start-line="918" selection-start-column="44" selection-end-line="918" selection-end-column="44" />
896 <folding> 898 <folding>
897 <element signature="e#535#1273#0#PHP" expanded="false" /> 899 <element signature="e#535#1273#0#PHP" expanded="false" />
898 <element signature="e#1278#2941#0#PHP" expanded="false" /> 900 <element signature="e#1278#2941#0#PHP" expanded="false" />
@@ -919,59 +921,60 @@ @@ -919,59 +921,60 @@
919 <element signature="e#14837#16157#0#PHP" expanded="false" /> 921 <element signature="e#14837#16157#0#PHP" expanded="false" />
920 <element signature="e#16163#16739#0#PHP" expanded="false" /> 922 <element signature="e#16163#16739#0#PHP" expanded="false" />
921 <element signature="e#16744#17356#0#PHP" expanded="false" /> 923 <element signature="e#16744#17356#0#PHP" expanded="false" />
  924 + <element signature="e#17362#18078#0#PHP" expanded="false" />
  925 + <element signature="e#18083#21577#0#PHP" expanded="false" />
922 <element signature="e#21583#22513#0#PHP" expanded="false" /> 926 <element signature="e#21583#22513#0#PHP" expanded="false" />
923 <element signature="e#22518#26568#0#PHP" expanded="false" /> 927 <element signature="e#22518#26568#0#PHP" expanded="false" />
924 <element signature="e#26574#26951#0#PHP" expanded="false" /> 928 <element signature="e#26574#26951#0#PHP" expanded="false" />
925 <element signature="e#26956#27395#0#PHP" expanded="false" /> 929 <element signature="e#26956#27395#0#PHP" expanded="false" />
926 - <element signature="e#27401#28136#0#PHP" expanded="false" />  
927 - <element signature="e#28141#29813#0#PHP" expanded="false" />  
928 - <element signature="e#29819#30324#0#PHP" expanded="false" />  
929 - <element signature="e#30329#30580#0#PHP" expanded="false" />  
930 - <element signature="e#30586#31065#0#PHP" expanded="false" />  
931 - <element signature="e#31070#31827#0#PHP" expanded="false" />  
932 - <element signature="e#31833#32314#0#PHP" expanded="false" />  
933 - <element signature="e#32319#33089#0#PHP" expanded="false" />  
934 - <element signature="e#33095#33458#0#PHP" expanded="false" />  
935 - <element signature="e#33463#33654#0#PHP" expanded="false" />  
936 - <element signature="e#33660#34018#0#PHP" expanded="false" />  
937 - <element signature="e#34023#34214#0#PHP" expanded="false" />  
938 - <element signature="e#34220#35363#0#PHP" expanded="false" />  
939 - <element signature="e#35368#38033#0#PHP" expanded="false" />  
940 - <element signature="e#38039#38537#0#PHP" expanded="false" />  
941 - <element signature="e#38542#40288#0#PHP" expanded="false" />  
942 - <element signature="e#40294#40707#0#PHP" expanded="false" />  
943 - <element signature="e#40712#41191#0#PHP" expanded="false" />  
944 - <element signature="e#41197#41731#0#PHP" expanded="false" />  
945 - <element signature="e#41736#43121#0#PHP" expanded="false" />  
946 - <element signature="e#43127#43781#0#PHP" expanded="false" />  
947 - <element signature="e#43786#45801#0#PHP" expanded="false" />  
948 - <element signature="e#45807#46567#0#PHP" expanded="false" />  
949 - <element signature="e#46572#49281#0#PHP" expanded="false" />  
950 - <element signature="e#49307#50138#0#PHP" expanded="false" />  
951 - <element signature="e#50144#50564#0#PHP" expanded="false" />  
952 - <element signature="e#50569#51052#0#PHP" expanded="false" />  
953 - <element signature="e#51058#51864#0#PHP" expanded="false" />  
954 - <element signature="e#51869#55027#0#PHP" expanded="false" />  
955 - <element signature="e#53662#55021#0#PHP" expanded="false" />  
956 - <element signature="e#55042#56377#0#PHP" expanded="false" />  
957 - <element signature="e#55158#55560#0#PHP" expanded="false" />  
958 - <element signature="e#56393#57427#0#PHP" expanded="false" />  
959 - <element signature="e#57433#58191#0#PHP" expanded="false" />  
960 - <element signature="e#58196#61939#0#PHP" expanded="false" />  
961 - <element signature="e#61945#62337#0#PHP" expanded="false" />  
962 - <element signature="e#62342#63294#0#PHP" expanded="false" />  
963 - <element signature="e#63318#63891#0#PHP" expanded="false" />  
964 - <element signature="e#63897#64496#0#PHP" expanded="false" />  
965 - <element signature="e#64501#65428#0#PHP" expanded="false" />  
966 - <element signature="e#65434#66148#0#PHP" expanded="false" />  
967 - <element signature="e#66154#66581#0#PHP" expanded="false" />  
968 - <element signature="e#66586#67055#0#PHP" expanded="false" />  
969 - <element signature="e#67062#68267#0#PHP" expanded="false" />  
970 - <element signature="e#68272#69975#0#PHP" expanded="false" />  
971 - <element signature="e#69981#70758#0#PHP" expanded="false" />  
972 - <element signature="e#70763#74701#0#PHP" expanded="false" />  
973 - <element signature="e#74707#75216#0#PHP" expanded="false" />  
974 - <element signature="e#75221#75893#0#PHP" expanded="false" /> 930 + <element signature="e#28673#31625#0#PHP" expanded="false" />
  931 + <element signature="e#31637#32142#0#PHP" expanded="false" />
  932 + <element signature="e#32147#32398#0#PHP" expanded="false" />
  933 + <element signature="e#32404#32883#0#PHP" expanded="false" />
  934 + <element signature="e#32888#33645#0#PHP" expanded="false" />
  935 + <element signature="e#33651#34132#0#PHP" expanded="false" />
  936 + <element signature="e#34137#34907#0#PHP" expanded="false" />
  937 + <element signature="e#34913#35276#0#PHP" expanded="false" />
  938 + <element signature="e#35281#35472#0#PHP" expanded="false" />
  939 + <element signature="e#35478#35836#0#PHP" expanded="false" />
  940 + <element signature="e#35841#36032#0#PHP" expanded="false" />
  941 + <element signature="e#36038#37181#0#PHP" expanded="false" />
  942 + <element signature="e#37186#39851#0#PHP" expanded="false" />
  943 + <element signature="e#39857#40355#0#PHP" expanded="false" />
  944 + <element signature="e#40360#42106#0#PHP" expanded="false" />
  945 + <element signature="e#42112#42525#0#PHP" expanded="false" />
  946 + <element signature="e#42530#43009#0#PHP" expanded="false" />
  947 + <element signature="e#43015#43549#0#PHP" expanded="false" />
  948 + <element signature="e#43554#44939#0#PHP" expanded="false" />
  949 + <element signature="e#44945#45599#0#PHP" expanded="false" />
  950 + <element signature="e#45604#47619#0#PHP" expanded="false" />
  951 + <element signature="e#47625#48385#0#PHP" expanded="false" />
  952 + <element signature="e#48390#51099#0#PHP" expanded="false" />
  953 + <element signature="e#51125#51956#0#PHP" expanded="false" />
  954 + <element signature="e#51962#52382#0#PHP" expanded="false" />
  955 + <element signature="e#52387#52870#0#PHP" expanded="false" />
  956 + <element signature="e#52876#53682#0#PHP" expanded="false" />
  957 + <element signature="e#53687#56845#0#PHP" expanded="false" />
  958 + <element signature="e#55480#56839#0#PHP" expanded="false" />
  959 + <element signature="e#56860#58195#0#PHP" expanded="false" />
  960 + <element signature="e#56976#57378#0#PHP" expanded="false" />
  961 + <element signature="e#58211#59245#0#PHP" expanded="false" />
  962 + <element signature="e#59251#60009#0#PHP" expanded="false" />
  963 + <element signature="e#60014#63757#0#PHP" expanded="false" />
  964 + <element signature="e#63763#64155#0#PHP" expanded="false" />
  965 + <element signature="e#64160#65112#0#PHP" expanded="false" />
  966 + <element signature="e#65136#65709#0#PHP" expanded="false" />
  967 + <element signature="e#65715#66314#0#PHP" expanded="false" />
  968 + <element signature="e#66319#67246#0#PHP" expanded="false" />
  969 + <element signature="e#67252#67966#0#PHP" expanded="false" />
  970 + <element signature="e#67972#68399#0#PHP" expanded="false" />
  971 + <element signature="e#68404#68873#0#PHP" expanded="false" />
  972 + <element signature="e#68880#70085#0#PHP" expanded="false" />
  973 + <element signature="e#70090#71793#0#PHP" expanded="false" />
  974 + <element signature="e#71799#72576#0#PHP" expanded="false" />
  975 + <element signature="e#72581#76519#0#PHP" expanded="false" />
  976 + <element signature="e#76525#77034#0#PHP" expanded="false" />
  977 + <element signature="e#77039#77711#0#PHP" expanded="false" />
975 </folding> 978 </folding>
976 </state> 979 </state>
977 </provider> 980 </provider>
@@ -817,6 +817,7 @@ class User extends Api @@ -817,6 +817,7 @@ class User extends Api
817 * @ApiRoute (/api/user/search_key) 817 * @ApiRoute (/api/user/search_key)
818 * 818 *
819 * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") 819 * @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
  820 + * @ApiHeaders (name=type, type=string, required=true, description="类型(视频1图片2)")
820 * @ApiParams (name="keyword", type=string, required=true, description="关键字") 821 * @ApiParams (name="keyword", type=string, required=true, description="关键字")
821 * @ApiParams (name="page", type="inter", required=false, description="当前页(默认1)") 822 * @ApiParams (name="page", type="inter", required=false, description="当前页(默认1)")
822 * @ApiParams (name="pageNum", type="inter", required=false, description="每页显示数据个数(默认10)") 823 * @ApiParams (name="pageNum", type="inter", required=false, description="每页显示数据个数(默认10)")
@@ -840,45 +841,85 @@ class User extends Api @@ -840,45 +841,85 @@ class User extends Api
840 $page = $this->request->param('page',1,'intval'); 841 $page = $this->request->param('page',1,'intval');
841 $pageNum = $this->request->param('pageNum',10,'intval'); 842 $pageNum = $this->request->param('pageNum',10,'intval');
842 $keyword = $this->request->param('keyword'); 843 $keyword = $this->request->param('keyword');
843 - if(empty($keyword)){ 844 + $type = $this->request->param('type');
  845 + if(empty($type) || empty($keyword)){
844 $this->error(['code'=>2,'msg'=>'缺少必要参数']); 846 $this->error(['code'=>2,'msg'=>'缺少必要参数']);
845 } 847 }
846 - //查出所有手动写入该关键词的素材ID  
847 - $hand_ids = Db::name('video')  
848 - ->where('keyword','like',"%$keyword%")  
849 - ->column('id');  
850 -  
851 - //根据用户点选的关键词搜索对应的关键词表找出该关键词是否存在,如果存在找出ID,继续查素材含有该ID的素材ID  
852 - $words_id = Db::name('words')  
853 - ->where('name',$keyword)  
854 - ->find();  
855 - if(empty($words_id)){  
856 - $words_ids = [];  
857 - }else{  
858 - if($words_id['type'] == 1){  
859 - $address_id = ','.$words_id['id'].',';  
860 - $words_ids = Db::name('video')  
861 - ->where('address_ids','like',"%$address_id%")  
862 - ->column('id'); 848 + if($type == 1){
  849 + //查出所有手动写入该关键词的素材ID
  850 + $hand_ids = Db::name('video')
  851 + ->where('keyword','like',"%$keyword%")
  852 + ->column('id');
  853 + //根据用户点选的关键词搜索对应的关键词表找出该关键词是否存在,如果存在找出ID,继续查素材含有该ID的素材ID
  854 + $words_id = Db::name('words')
  855 + ->where('name',$keyword)
  856 + ->find();
  857 + if(empty($words_id)){
  858 + $words_ids = [];
  859 + }else{
  860 + if($words_id['type'] == 1){
  861 + $address_id = ','.$words_id['id'].',';
  862 + $words_ids = Db::name('video')
  863 + ->where('address_ids','like',"%$address_id%")
  864 + ->column('id');
  865 + }
  866 + if($words_id['type'] == 2){
  867 + $text_id = ','.$words_id['id'].',';
  868 + $words_ids = Db::name('video')
  869 + ->where('text_ids','like',"%$text_id%")
  870 + ->column('id');
  871 + }
863 } 872 }
864 - if($words_id['type'] == 2){  
865 - $text_id = ','.$words_id['id'].',';  
866 - $words_ids = Db::name('video')  
867 - ->where('text_ids','like',"%$text_id%")  
868 - ->column('id'); 873 + //合并所有查出的数组ID
  874 + $public_ids = array_merge($hand_ids,$words_ids);
  875 + $data = Db::name('video')
  876 + ->whereIn('id',$public_ids)
  877 + ->field('id,title,thumbnail')
  878 + ->page($page,$pageNum)
  879 + ->select();
  880 + foreach ($data as &$v){
  881 + $v['thumbnail'] = $rule.$v['thumbnail'];
869 } 882 }
  883 + $this->success('SUCCESS',$data);
  884 + }elseif ($type == 2){
  885 + //查出所有手动写入该关键词的素材ID
  886 + $hand_ids = Db::name('pic')
  887 + ->where('keyword','like',"%$keyword%")
  888 + ->column('id');
  889 + //根据用户点选的关键词搜索对应的关键词表找出该关键词是否存在,如果存在找出ID,继续查素材含有该ID的素材ID
  890 + $words_id = Db::name('words')
  891 + ->where('name',$keyword)
  892 + ->find();
  893 + if(empty($words_id)){
  894 + $words_ids = [];
  895 + }else{
  896 + if($words_id['type'] == 1){
  897 + $address_id = ','.$words_id['id'].',';
  898 + $words_ids = Db::name('pic')
  899 + ->where('address_ids','like',"%$address_id%")
  900 + ->column('id');
  901 + }
  902 + if($words_id['type'] == 2){
  903 + $text_id = ','.$words_id['id'].',';
  904 + $words_ids = Db::name('pic')
  905 + ->where('text_ids','like',"%$text_id%")
  906 + ->column('id');
  907 + }
  908 + }
  909 + //合并所有查出的数组ID
  910 + $public_ids = array_merge($hand_ids,$words_ids);
  911 + $data = Db::name('pic')
  912 + ->whereIn('id',$public_ids)
  913 + ->field('id,title,thumbnail')
  914 + ->page($page,$pageNum)
  915 + ->select();
  916 + foreach ($data as &$v){
  917 + $v['thumbnail'] = $rule.$v['thumbnail'];
  918 + }
  919 + $this->success('SUCCESS',$data);
  920 + }else{
  921 + $this->error('参数错误');
870 } 922 }
871 - //合并所有查出的数组ID  
872 - $public_ids = array_merge($hand_ids,$words_ids);  
873 - $data = Db::name('video')  
874 - ->whereIn('id',$public_ids)  
875 - ->field('id,title,thumbnail')  
876 - ->page($page,$pageNum)  
877 - ->select();  
878 - foreach ($data as &$v){  
879 - $v['thumbnail'] = $rule.$v['thumbnail'];  
880 - }  
881 - $this->success('SUCCESS',$data);  
882 } 923 }
883 924
884 /** 925 /**
@@ -6828,6 +6828,12 @@ @@ -6828,6 +6828,12 @@
6828 <td></td> 6828 <td></td>
6829 <td>请求的Token</td> 6829 <td>请求的Token</td>
6830 </tr> 6830 </tr>
  6831 + <tr>
  6832 + <td>type</td>
  6833 + <td>string</td>
  6834 + <td></td>
  6835 + <td>类型(视频1图片2</td>
  6836 + </tr>
6831 </tbody> 6837 </tbody>
6832 </table> 6838 </table>
6833 </div> 6839 </div>
@@ -6885,6 +6891,10 @@ @@ -6885,6 +6891,10 @@
6885 <label class="control-label" for="token">token</label> 6891 <label class="control-label" for="token">token</label>
6886 <input type="string" class="form-control input-sm" id="token" required placeholder="请求的Token - Ex: " name="token"> 6892 <input type="string" class="form-control input-sm" id="token" required placeholder="请求的Token - Ex: " name="token">
6887 </div> 6893 </div>
  6894 + <div class="form-group">
  6895 + <label class="control-label" for="type">type</label>
  6896 + <input type="string" class="form-control input-sm" id="type" required placeholder="类型(视频1图片2 - Ex: " name="type">
  6897 + </div>
6888 </div> 6898 </div>
6889 </div> 6899 </div>
6890 </div> 6900 </div>
@@ -7530,7 +7540,7 @@ @@ -7530,7 +7540,7 @@
7530 7540
7531 <div class="row mt0 footer"> 7541 <div class="row mt0 footer">
7532 <div class="col-md-6" align="left"> 7542 <div class="col-md-6" align="left">
7533 - Generated on 2020-03-11 14:34:55 </div> 7543 + Generated on 2020-03-11 15:08:02 </div>
7534 <div class="col-md-6" align="right"> 7544 <div class="col-md-6" align="right">
7535 <a href="https://www.fastadmin.net" target="_blank">FastAdmin</a> 7545 <a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
7536 </div> 7546 </div>