wupengfei 2 年 前
コミット
ee833ac89f

+ 6 - 5
.idea/workspace.xml

@@ -3,7 +3,8 @@
   <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/operate/controller/Recruit.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/Recruit.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/common/model/PlatformSwitch.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/common/model/PlatformSwitch.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/operate/controller/SupplierGoods.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/SupplierGoods.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -298,7 +299,7 @@
       <workItem from="1682038348727" duration="20430000" />
       <workItem from="1682125691470" duration="22160000" />
       <workItem from="1682211747955" duration="24164000" />
-      <workItem from="1682297702251" duration="20042000" />
+      <workItem from="1682297702251" duration="21378000" />
     </task>
     <servers />
   </component>
@@ -424,10 +425,10 @@
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
     <state x="1211" y="541" key="#com.intellij.fileTypes.FileTypeChooser/0.0.2560.1400@0.0.2560.1400" timestamp="1675311007920" />
-    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1682217181159">
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1682325943813">
       <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="1682217181159" />
+    <state x="1106" y="469" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1682325943813" />
     <state x="420" y="147" width="1942" height="1088" key="DiffContextDialog" timestamp="1681953355372">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
@@ -497,7 +498,7 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" type="php">
           <url>file://$PROJECT_DIR$/application/operate/controller/SupplierGoods.php</url>
-          <line>157</line>
+          <line>158</line>
           <option name="timeStamp" value="7" />
         </line-breakpoint>
       </breakpoints>

+ 6 - 0
application/common/model/PlatformSwitch.php

@@ -2,6 +2,8 @@
 namespace app\common\model;
 use library\tools\Data;
 use think\Model;
+use function Symfony\Component\String\b;
+
 // 用户开关
 class PlatformSwitch extends Model
 {
@@ -70,6 +72,10 @@ class PlatformSwitch extends Model
                 $module = 'datum';
                 $content = '您订阅的【'.$up_title.'】'.$title.'已更新!';
                 break;
+            case 5:
+                $module = 'supplier';
+                $content = '您订阅的【'.$up_title.'】'.$title.'已更新!';
+                break;
         }
         $all_user = static::where(['type'=>$type,'switch_id'=>$id,'switch_value'=>1])->column('user_id');
         array_walk($all_user,function ($v) use ($module,$type,$id,$content,$children_id){

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

@@ -1,6 +1,7 @@
 <?php
 namespace app\operate\controller;
 use app\common\model\DatumIntro;
+use app\common\model\PlatformSwitch;
 use app\common\model\User;
 use library\Controller;
 use think\Db;
@@ -202,6 +203,11 @@ class SupplierGoods extends Controller
 
     protected function _form_result($id)
     {
+
+        if($this->request->action() == 'add'){
+            $supplier_name = \app\common\model\Supplier::where('id',$this->request->post('supplier_id'))->value('title');
+            if($supplier_name)PlatformSwitch::followMsg(5,$this->request->post('supplier_id'),$supplier_name,$this->request->post('title'),$id);
+        }
         $this->success('操作成功', 'javascript:history.back()');
     }