作者 xiaohu thinkpad

测试获取当前时段的老师

@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
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/user/controller/YuyueController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/user/controller/YuyueController.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" />
7 </list> 8 </list>
8 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> 9 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -20,8 +21,8 @@ @@ -20,8 +21,8 @@
20 <file leaf-file-name="YuyueController.php" pinned="false" current-in-tab="true"> 21 <file leaf-file-name="YuyueController.php" pinned="false" current-in-tab="true">
21 <entry file="file://$PROJECT_DIR$/app/user/controller/YuyueController.php"> 22 <entry file="file://$PROJECT_DIR$/app/user/controller/YuyueController.php">
22 <provider selected="true" editor-type-id="text-editor"> 23 <provider selected="true" editor-type-id="text-editor">
23 - <state relative-caret-position="147">  
24 - <caret line="48" column="21" selection-start-line="48" selection-start-column="21" selection-end-line="48" selection-end-column="21" /> 24 + <state relative-caret-position="357">
  25 + <caret line="63" lean-forward="true" selection-start-line="63" selection-end-line="63" />
25 <folding> 26 <folding>
26 <element signature="e#636#668#0#PHP" expanded="true" /> 27 <element signature="e#636#668#0#PHP" expanded="true" />
27 <element signature="e#911#990#0#PHP" /> 28 <element signature="e#911#990#0#PHP" />
@@ -163,8 +164,8 @@ @@ -163,8 +164,8 @@
163 <file leaf-file-name="ToolController.php" pinned="false" current-in-tab="false"> 164 <file leaf-file-name="ToolController.php" pinned="false" current-in-tab="false">
164 <entry file="file://$PROJECT_DIR$/app/portal/controller/ToolController.php"> 165 <entry file="file://$PROJECT_DIR$/app/portal/controller/ToolController.php">
165 <provider selected="true" editor-type-id="text-editor"> 166 <provider selected="true" editor-type-id="text-editor">
166 - <state relative-caret-position="462">  
167 - <caret line="33" column="3" lean-forward="true" selection-start-line="33" selection-start-column="3" selection-end-line="33" selection-end-column="3" /> 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" />
168 </state> 169 </state>
169 </provider> 170 </provider>
170 </entry> 171 </entry>
@@ -378,7 +379,7 @@ @@ -378,7 +379,7 @@
378 <workItem from="1535458114609" duration="13848000" /> 379 <workItem from="1535458114609" duration="13848000" />
379 <workItem from="1535514127808" duration="727000" /> 380 <workItem from="1535514127808" duration="727000" />
380 <workItem from="1535532970259" duration="2527000" /> 381 <workItem from="1535532970259" duration="2527000" />
381 - <workItem from="1535546044129" duration="10189000" /> 382 + <workItem from="1535546044129" duration="10661000" />
382 </task> 383 </task>
383 <task id="LOCAL-00001" summary="修复预约后不能再预约的问题"> 384 <task id="LOCAL-00001" summary="修复预约后不能再预约的问题">
384 <created>1535458170068</created> 385 <created>1535458170068</created>
@@ -520,11 +521,25 @@ @@ -520,11 +521,25 @@
520 <option name="project" value="LOCAL" /> 521 <option name="project" value="LOCAL" />
521 <updated>1535559508443</updated> 522 <updated>1535559508443</updated>
522 </task> 523 </task>
523 - <option name="localTasksCounter" value="21" /> 524 + <task id="LOCAL-00021" summary="测试获取当前时段的老师">
  525 + <created>1535559794285</created>
  526 + <option name="number" value="00021" />
  527 + <option name="presentableId" value="LOCAL-00021" />
  528 + <option name="project" value="LOCAL" />
  529 + <updated>1535559794285</updated>
  530 + </task>
  531 + <task id="LOCAL-00022" summary="测试获取当前时段的老师">
  532 + <created>1535559978125</created>
  533 + <option name="number" value="00022" />
  534 + <option name="presentableId" value="LOCAL-00022" />
  535 + <option name="project" value="LOCAL" />
  536 + <updated>1535559978125</updated>
  537 + </task>
  538 + <option name="localTasksCounter" value="23" />
524 <servers /> 539 <servers />
525 </component> 540 </component>
526 <component name="TimeTrackingManager"> 541 <component name="TimeTrackingManager">
527 - <option name="totallyTimeSpent" value="43827000" /> 542 + <option name="totallyTimeSpent" value="44299000" />
528 </component> 543 </component>
529 <component name="ToolWindowManager"> 544 <component name="ToolWindowManager">
530 <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" /> 545 <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
@@ -871,13 +886,6 @@ @@ -871,13 +886,6 @@
871 </state> 886 </state>
872 </provider> 887 </provider>
873 </entry> 888 </entry>
874 - <entry file="file://$PROJECT_DIR$/app/portal/controller/IndexController.php">  
875 - <provider selected="true" editor-type-id="text-editor">  
876 - <state relative-caret-position="1134">  
877 - <caret line="65" column="23" lean-forward="true" selection-start-line="65" selection-start-column="23" selection-end-line="65" selection-end-column="23" />  
878 - </state>  
879 - </provider>  
880 - </entry>  
881 <entry file="file://$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/SysconfigController.php"> 889 <entry file="file://$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/SysconfigController.php">
882 <provider selected="true" editor-type-id="text-editor"> 890 <provider selected="true" editor-type-id="text-editor">
883 <state relative-caret-position="405"> 891 <state relative-caret-position="405">
@@ -892,24 +900,31 @@ @@ -892,24 +900,31 @@
892 </state> 900 </state>
893 </provider> 901 </provider>
894 </entry> 902 </entry>
895 - <entry file="file://$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/ProfileController.php"> 903 + <entry file="file://$PROJECT_DIR$/app/portal/controller/IndexController.php">
896 <provider selected="true" editor-type-id="text-editor"> 904 <provider selected="true" editor-type-id="text-editor">
897 - <state relative-caret-position="3507">  
898 - <caret line="175" column="36" lean-forward="true" selection-start-line="175" selection-start-column="36" selection-end-line="175" selection-end-column="36" /> 905 + <state relative-caret-position="1134">
  906 + <caret line="65" column="23" lean-forward="true" selection-start-line="65" selection-start-column="23" selection-end-line="65" selection-end-column="23" />
899 </state> 907 </state>
900 </provider> 908 </provider>
901 </entry> 909 </entry>
902 <entry file="file://$PROJECT_DIR$/app/portal/controller/ToolController.php"> 910 <entry file="file://$PROJECT_DIR$/app/portal/controller/ToolController.php">
903 <provider selected="true" editor-type-id="text-editor"> 911 <provider selected="true" editor-type-id="text-editor">
904 - <state relative-caret-position="462">  
905 - <caret line="33" column="3" lean-forward="true" selection-start-line="33" selection-start-column="3" selection-end-line="33" selection-end-column="3" /> 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">
  918 + <provider selected="true" editor-type-id="text-editor">
  919 + <state relative-caret-position="3507">
  920 + <caret line="175" column="36" lean-forward="true" selection-start-line="175" selection-start-column="36" selection-end-line="175" selection-end-column="36" />
906 </state> 921 </state>
907 </provider> 922 </provider>
908 </entry> 923 </entry>
909 <entry file="file://$PROJECT_DIR$/app/user/controller/YuyueController.php"> 924 <entry file="file://$PROJECT_DIR$/app/user/controller/YuyueController.php">
910 <provider selected="true" editor-type-id="text-editor"> 925 <provider selected="true" editor-type-id="text-editor">
911 - <state relative-caret-position="147">  
912 - <caret line="48" column="21" selection-start-line="48" selection-start-column="21" selection-end-line="48" selection-end-column="21" /> 926 + <state relative-caret-position="357">
  927 + <caret line="63" lean-forward="true" selection-start-line="63" selection-end-line="63" />
913 <folding> 928 <folding>
914 <element signature="e#636#668#0#PHP" expanded="true" /> 929 <element signature="e#636#668#0#PHP" expanded="true" />
915 <element signature="e#911#990#0#PHP" /> 930 <element signature="e#911#990#0#PHP" />
@@ -17,7 +17,6 @@ use think\Db; @@ -17,7 +17,6 @@ use think\Db;
17 17
18 class ToolController extends HomeBaseController 18 class ToolController extends HomeBaseController
19 { 19 {
20 -  
21 public function isMixTime($begintime1,$endtime1,$begintime2,$endtime2) 20 public function isMixTime($begintime1,$endtime1,$begintime2,$endtime2)
22 { 21 {
23 $status = $begintime2 - $begintime1; 22 $status = $begintime2 - $begintime1;
@@ -61,8 +61,7 @@ class YuyueController extends UserBaseController @@ -61,8 +61,7 @@ class YuyueController extends UserBaseController
61 61
62 //获取当前时段已被预约的教练 62 //获取当前时段已被预约的教练
63 $ex = ''; 63 $ex = '';
64 - $res1 = $tool->isMixTime(1,9,2,3);  
65 - var_dump($res1); 64 +
66 foreach ($rr as $v) { 65 foreach ($rr as $v) {
67 // $day_find = []; 66 // $day_find = [];
68 // for ($i = $v['yuyue_begin']; $i <= $v['yuyue_end']; $i++) { 67 // for ($i = $v['yuyue_begin']; $i <= $v['yuyue_end']; $i++) {
@@ -76,11 +75,12 @@ class YuyueController extends UserBaseController @@ -76,11 +75,12 @@ class YuyueController extends UserBaseController
76 // $ex .= $v['teach_id'] . ','; 75 // $ex .= $v['teach_id'] . ',';
77 // } 76 // }
78 $res = $tool->isMixTime($bbegin,$eend,$v['yuyue_begin'],$v['yuyue_end']); 77 $res = $tool->isMixTime($bbegin,$eend,$v['yuyue_begin'],$v['yuyue_end']);
79 - var_dump($res); 78 +
80 $res && $ex .= $v['teach_id'] . ','; 79 $res && $ex .= $v['teach_id'] . ',';
81 80
82 } 81 }
83 - 82 + var_dump($res);
  83 + var_dump($ex);
84 //获取当前时段有时间的教练 84 //获取当前时段有时间的教练
85 $where['user_type'] = 3; 85 $where['user_type'] = 3;
86 $where['id'] = array('not in', $ex); 86 $where['id'] = array('not in', $ex);