作者 xiaohu thinkpad

测试获取当前时段的老师

@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 <list default="true" id="03b59864-5835-4588-bfae-54004809f199" name="Default" comment=""> 4 <list default="true" id="03b59864-5835-4588-bfae-54004809f199" name="Default" comment="">
5 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> 5 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6 <change beforePath="$PROJECT_DIR$/app/portal/controller/ToolController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/portal/controller/ToolController.php" afterDir="false" /> 6 <change beforePath="$PROJECT_DIR$/app/portal/controller/ToolController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/portal/controller/ToolController.php" afterDir="false" />
7 - <change beforePath="$PROJECT_DIR$/app/user/controller/YuyueController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/user/controller/YuyueController.php" afterDir="false" />  
8 </list> 7 </list>
9 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> 8 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
10 <option name="TRACKING_ENABLED" value="true" /> 9 <option name="TRACKING_ENABLED" value="true" />
@@ -18,11 +17,11 @@ @@ -18,11 +17,11 @@
18 </component> 17 </component>
19 <component name="FileEditorManager"> 18 <component name="FileEditorManager">
20 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> 19 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
21 - <file leaf-file-name="YuyueController.php" pinned="false" current-in-tab="true"> 20 + <file leaf-file-name="YuyueController.php" pinned="false" current-in-tab="false">
22 <entry file="file://$PROJECT_DIR$/app/user/controller/YuyueController.php"> 21 <entry file="file://$PROJECT_DIR$/app/user/controller/YuyueController.php">
23 <provider selected="true" editor-type-id="text-editor"> 22 <provider selected="true" editor-type-id="text-editor">
24 - <state relative-caret-position="357">  
25 - <caret line="63" lean-forward="true" selection-start-line="63" selection-end-line="63" /> 23 + <state relative-caret-position="672">
  24 + <caret line="84" column="9" lean-forward="true" selection-start-line="84" selection-start-column="9" selection-end-line="84" selection-end-column="9" />
26 <folding> 25 <folding>
27 <element signature="e#636#668#0#PHP" expanded="true" /> 26 <element signature="e#636#668#0#PHP" expanded="true" />
28 <element signature="e#911#990#0#PHP" /> 27 <element signature="e#911#990#0#PHP" />
@@ -161,11 +160,11 @@ @@ -161,11 +160,11 @@
161 </provider> 160 </provider>
162 </entry> 161 </entry>
163 </file> 162 </file>
164 - <file leaf-file-name="ToolController.php" pinned="false" current-in-tab="false"> 163 + <file leaf-file-name="ToolController.php" pinned="false" current-in-tab="true">
165 <entry file="file://$PROJECT_DIR$/app/portal/controller/ToolController.php"> 164 <entry file="file://$PROJECT_DIR$/app/portal/controller/ToolController.php">
166 <provider selected="true" editor-type-id="text-editor"> 165 <provider selected="true" editor-type-id="text-editor">
167 - <state relative-caret-position="147">  
168 - <caret line="18" column="1" selection-start-line="18" selection-start-column="1" selection-end-line="18" selection-end-column="1" /> 166 + <state relative-caret-position="315">
  167 + <caret line="26" column="28" selection-start-line="26" selection-start-column="23" selection-end-line="26" selection-end-column="28" />
169 </state> 168 </state>
170 </provider> 169 </provider>
171 </entry> 170 </entry>
@@ -256,8 +255,8 @@ @@ -256,8 +255,8 @@
256 <option value="$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/enter_jituanjiagou.htm" /> 255 <option value="$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/enter_jituanjiagou.htm" />
257 <option value="$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/IndexController.php" /> 256 <option value="$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/IndexController.php" />
258 <option value="$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/ProfileController.php" /> 257 <option value="$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/ProfileController.php" />
259 - <option value="$PROJECT_DIR$/app/portal/controller/ToolController.php" />  
260 <option value="$PROJECT_DIR$/app/user/controller/YuyueController.php" /> 258 <option value="$PROJECT_DIR$/app/user/controller/YuyueController.php" />
  259 + <option value="$PROJECT_DIR$/app/portal/controller/ToolController.php" />
261 </list> 260 </list>
262 </option> 261 </option>
263 </component> 262 </component>
@@ -379,7 +378,7 @@ @@ -379,7 +378,7 @@
379 <workItem from="1535458114609" duration="13848000" /> 378 <workItem from="1535458114609" duration="13848000" />
380 <workItem from="1535514127808" duration="727000" /> 379 <workItem from="1535514127808" duration="727000" />
381 <workItem from="1535532970259" duration="2527000" /> 380 <workItem from="1535532970259" duration="2527000" />
382 - <workItem from="1535546044129" duration="10661000" /> 381 + <workItem from="1535546044129" duration="11262000" />
383 </task> 382 </task>
384 <task id="LOCAL-00001" summary="修复预约后不能再预约的问题"> 383 <task id="LOCAL-00001" summary="修复预约后不能再预约的问题">
385 <created>1535458170068</created> 384 <created>1535458170068</created>
@@ -535,11 +534,25 @@ @@ -535,11 +534,25 @@
535 <option name="project" value="LOCAL" /> 534 <option name="project" value="LOCAL" />
536 <updated>1535559978125</updated> 535 <updated>1535559978125</updated>
537 </task> 536 </task>
538 - <option name="localTasksCounter" value="23" /> 537 + <task id="LOCAL-00023" summary="测试获取当前时段的老师">
  538 + <created>1535560263207</created>
  539 + <option name="number" value="00023" />
  540 + <option name="presentableId" value="LOCAL-00023" />
  541 + <option name="project" value="LOCAL" />
  542 + <updated>1535560263207</updated>
  543 + </task>
  544 + <task id="LOCAL-00024" summary="测试获取当前时段的老师">
  545 + <created>1535560747816</created>
  546 + <option name="number" value="00024" />
  547 + <option name="presentableId" value="LOCAL-00024" />
  548 + <option name="project" value="LOCAL" />
  549 + <updated>1535560747819</updated>
  550 + </task>
  551 + <option name="localTasksCounter" value="25" />
539 <servers /> 552 <servers />
540 </component> 553 </component>
541 <component name="TimeTrackingManager"> 554 <component name="TimeTrackingManager">
542 - <option name="totallyTimeSpent" value="44299000" /> 555 + <option name="totallyTimeSpent" value="44900000" />
543 </component> 556 </component>
544 <component name="ToolWindowManager"> 557 <component name="ToolWindowManager">
545 <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" /> 558 <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
@@ -907,13 +920,6 @@ @@ -907,13 +920,6 @@
907 </state> 920 </state>
908 </provider> 921 </provider>
909 </entry> 922 </entry>
910 - <entry file="file://$PROJECT_DIR$/app/portal/controller/ToolController.php">  
911 - <provider selected="true" editor-type-id="text-editor">  
912 - <state relative-caret-position="147">  
913 - <caret line="18" column="1" selection-start-line="18" selection-start-column="1" selection-end-line="18" selection-end-column="1" />  
914 - </state>  
915 - </provider>  
916 - </entry>  
917 <entry file="file://$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/ProfileController.php"> 923 <entry file="file://$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/ProfileController.php">
918 <provider selected="true" editor-type-id="text-editor"> 924 <provider selected="true" editor-type-id="text-editor">
919 <state relative-caret-position="3507"> 925 <state relative-caret-position="3507">
@@ -923,8 +929,8 @@ @@ -923,8 +929,8 @@
923 </entry> 929 </entry>
924 <entry file="file://$PROJECT_DIR$/app/user/controller/YuyueController.php"> 930 <entry file="file://$PROJECT_DIR$/app/user/controller/YuyueController.php">
925 <provider selected="true" editor-type-id="text-editor"> 931 <provider selected="true" editor-type-id="text-editor">
926 - <state relative-caret-position="357">  
927 - <caret line="63" lean-forward="true" selection-start-line="63" selection-end-line="63" /> 932 + <state relative-caret-position="672">
  933 + <caret line="84" column="9" lean-forward="true" selection-start-line="84" selection-start-column="9" selection-end-line="84" selection-end-column="9" />
928 <folding> 934 <folding>
929 <element signature="e#636#668#0#PHP" expanded="true" /> 935 <element signature="e#636#668#0#PHP" expanded="true" />
930 <element signature="e#911#990#0#PHP" /> 936 <element signature="e#911#990#0#PHP" />
@@ -1053,5 +1059,12 @@ @@ -1053,5 +1059,12 @@
1053 </state> 1059 </state>
1054 </provider> 1060 </provider>
1055 </entry> 1061 </entry>
  1062 + <entry file="file://$PROJECT_DIR$/app/portal/controller/ToolController.php">
  1063 + <provider selected="true" editor-type-id="text-editor">
  1064 + <state relative-caret-position="315">
  1065 + <caret line="26" column="28" selection-start-line="26" selection-start-column="23" selection-end-line="26" selection-end-column="28" />
  1066 + </state>
  1067 + </provider>
  1068 + </entry>
1056 </component> 1069 </component>
1057 </project> 1070 </project>
@@ -17,23 +17,24 @@ use think\Db; @@ -17,23 +17,24 @@ use think\Db;
17 17
18 class ToolController extends HomeBaseController 18 class ToolController extends HomeBaseController
19 { 19 {
  20 +
20 public function isMixTime($begintime1,$endtime1,$begintime2,$endtime2) 21 public function isMixTime($begintime1,$endtime1,$begintime2,$endtime2)
21 { 22 {
22 $status = $begintime2 - $begintime1; 23 $status = $begintime2 - $begintime1;
23 if($status>0){ 24 if($status>0){
24 $status2 = $begintime2 - $endtime1; 25 $status2 = $begintime2 - $endtime1;
25 if($status2>=0){ 26 if($status2>=0){
26 - return true;  
27 - }else{  
28 return false; 27 return false;
  28 + }else{
  29 + return true;
29 } 30 }
30 }else{ 31 }else{
31 $status2 = $begintime1 - $endtime2; 32 $status2 = $begintime1 - $endtime2;
32 if($status2>=0){ 33 if($status2>=0){
33 - return true; 34 + return false;
34 }else{ 35 }else{
35 36
36 - return false; 37 + return true;
37 } 38 }
38 } 39 }
39 } 40 }