wupengfei 2 jaren geleden
bovenliggende
commit
16e759d926
2 gewijzigde bestanden met toevoegingen van 10 en 4 verwijderingen
  1. 4 4
      .idea/workspace.xml
  2. 6 0
      application/operate/controller/Demand.php

+ 4 - 4
.idea/workspace.xml

@@ -3,7 +3,7 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" 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$/application/api/controller/Demand.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Demand.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/operate/controller/Demand.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/Demand.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -202,7 +202,7 @@
       <workItem from="1670547445908" duration="12147000" />
       <workItem from="1670633686675" duration="15717000" />
       <workItem from="1670719843429" duration="8446000" />
-      <workItem from="1670807412269" duration="6437000" />
+      <workItem from="1670807412269" duration="6690000" />
     </task>
     <servers />
   </component>
@@ -272,10 +272,10 @@
     </option>
   </component>
   <component name="WindowStateProjectService">
-    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1670813365117">
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1670816215887">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
-    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1670813365117" />
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1670816215887" />
     <state x="283" y="145" width="1942" height="1088" key="DiffContextDialog" timestamp="1670291222413">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>

+ 6 - 0
application/operate/controller/Demand.php

@@ -1,5 +1,6 @@
 <?php
 namespace app\operate\controller;
+use app\common\model\User;
 use app\common\model\UserMessage;
 use library\Controller;
 use think\Db;
@@ -79,6 +80,11 @@ class Demand extends Controller
         {
             $user_demand = Db::name('user_demand')->find($data['id']);
            // if($user_demand['status'] != 0) $this->error('不能重复审核');
+            if(!empty($data['phone'])) {
+                $user_id = User::where('phone|email',$data['phone'])->value('id');
+                if(!$user_id) $this->error('账号未注册');
+                $data['user_id'] = $user_id;
+            }
             if($data['status'] > 0 )   UserMessage::sendUserMessage($data['user_id'],'demand',2,$data['status']-1,0,$data['id']);
         }