作者 xiaohu thinkpad

测试获取当前时段的老师

... ... @@ -3,6 +3,7 @@
<component name="ChangeListManager">
<list default="true" id="03b59864-5835-4588-bfae-54004809f199" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/portal/controller/ToolController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/portal/controller/ToolController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/user/controller/YuyueController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/user/controller/YuyueController.php" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
... ... @@ -20,8 +21,8 @@
<file leaf-file-name="YuyueController.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/app/user/controller/YuyueController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="147">
<caret line="48" column="21" selection-start-line="48" selection-start-column="21" selection-end-line="48" selection-end-column="21" />
<state relative-caret-position="357">
<caret line="63" lean-forward="true" selection-start-line="63" selection-end-line="63" />
<folding>
<element signature="e#636#668#0#PHP" expanded="true" />
<element signature="e#911#990#0#PHP" />
... ... @@ -163,8 +164,8 @@
<file leaf-file-name="ToolController.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/portal/controller/ToolController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="462">
<caret line="33" column="3" lean-forward="true" selection-start-line="33" selection-start-column="3" selection-end-line="33" selection-end-column="3" />
<state relative-caret-position="147">
<caret line="18" column="1" selection-start-line="18" selection-start-column="1" selection-end-line="18" selection-end-column="1" />
</state>
</provider>
</entry>
... ... @@ -378,7 +379,7 @@
<workItem from="1535458114609" duration="13848000" />
<workItem from="1535514127808" duration="727000" />
<workItem from="1535532970259" duration="2527000" />
<workItem from="1535546044129" duration="10189000" />
<workItem from="1535546044129" duration="10661000" />
</task>
<task id="LOCAL-00001" summary="修复预约后不能再预约的问题">
<created>1535458170068</created>
... ... @@ -520,11 +521,25 @@
<option name="project" value="LOCAL" />
<updated>1535559508443</updated>
</task>
<option name="localTasksCounter" value="21" />
<task id="LOCAL-00021" summary="测试获取当前时段的老师">
<created>1535559794285</created>
<option name="number" value="00021" />
<option name="presentableId" value="LOCAL-00021" />
<option name="project" value="LOCAL" />
<updated>1535559794285</updated>
</task>
<task id="LOCAL-00022" summary="测试获取当前时段的老师">
<created>1535559978125</created>
<option name="number" value="00022" />
<option name="presentableId" value="LOCAL-00022" />
<option name="project" value="LOCAL" />
<updated>1535559978125</updated>
</task>
<option name="localTasksCounter" value="23" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="43827000" />
<option name="totallyTimeSpent" value="44299000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
... ... @@ -871,13 +886,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/portal/controller/IndexController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1134">
<caret line="65" column="23" lean-forward="true" selection-start-line="65" selection-start-column="23" selection-end-line="65" selection-end-column="23" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/SysconfigController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="405">
... ... @@ -892,24 +900,31 @@
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/ProfileController.php">
<entry file="file://$PROJECT_DIR$/app/portal/controller/IndexController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3507">
<caret line="175" column="36" lean-forward="true" selection-start-line="175" selection-start-column="36" selection-end-line="175" selection-end-column="36" />
<state relative-caret-position="1134">
<caret line="65" column="23" lean-forward="true" selection-start-line="65" selection-start-column="23" selection-end-line="65" selection-end-column="23" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/portal/controller/ToolController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="462">
<caret line="33" column="3" lean-forward="true" selection-start-line="33" selection-start-column="3" selection-end-line="33" selection-end-column="3" />
<state relative-caret-position="147">
<caret line="18" column="1" selection-start-line="18" selection-start-column="1" selection-end-line="18" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/Documents/NetSarang/Xftp/Temporary/Temporary/ProfileController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3507">
<caret line="175" column="36" lean-forward="true" selection-start-line="175" selection-start-column="36" selection-end-line="175" selection-end-column="36" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/user/controller/YuyueController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="147">
<caret line="48" column="21" selection-start-line="48" selection-start-column="21" selection-end-line="48" selection-end-column="21" />
<state relative-caret-position="357">
<caret line="63" lean-forward="true" selection-start-line="63" selection-end-line="63" />
<folding>
<element signature="e#636#668#0#PHP" expanded="true" />
<element signature="e#911#990#0#PHP" />
... ...
... ... @@ -17,7 +17,6 @@ use think\Db;
class ToolController extends HomeBaseController
{
public function isMixTime($begintime1,$endtime1,$begintime2,$endtime2)
{
$status = $begintime2 - $begintime1;
... ...
... ... @@ -61,8 +61,7 @@ class YuyueController extends UserBaseController
//获取当前时段已被预约的教练
$ex = '';
$res1 = $tool->isMixTime(1,9,2,3);
var_dump($res1);
foreach ($rr as $v) {
// $day_find = [];
// for ($i = $v['yuyue_begin']; $i <= $v['yuyue_end']; $i++) {
... ... @@ -76,11 +75,12 @@ class YuyueController extends UserBaseController
// $ex .= $v['teach_id'] . ',';
// }
$res = $tool->isMixTime($bbegin,$eend,$v['yuyue_begin'],$v['yuyue_end']);
var_dump($res);
$res && $ex .= $v['teach_id'] . ',';
}
var_dump($res);
var_dump($ex);
//获取当前时段有时间的教练
$where['user_type'] = 3;
$where['id'] = array('not in', $ex);
... ...