chuweiqiang 1 year ago
parent
commit
09b55be72c
2 changed files with 8 additions and 4 deletions
  1. 2 2
      .idea/workspace.xml
  2. 6 2
      application/operate/controller/ActivityApplyItem.php

+ 2 - 2
.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/common/service/OrderCallback.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/common/service/OrderCallback.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/operate/controller/ActivityApplyItem.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/ActivityApplyItem.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -577,7 +577,7 @@
       <workItem from="1711499544175" duration="25349000" />
       <workItem from="1711585940957" duration="2980000" />
       <workItem from="1711588946025" duration="20811000" />
-      <workItem from="1711672177712" duration="8144000" />
+      <workItem from="1711672177712" duration="8189000" />
     </task>
     <servers />
   </component>

+ 6 - 2
application/operate/controller/ActivityApplyItem.php

@@ -150,7 +150,9 @@ class ActivityApplyItem extends Controller
                             'end_time' => $nextYear,
                             'end_int' => strtotime($nextYear)
                         ];
-                        UserLearn::create($arr);
+                        if(!UserLearn::where('type',1)->where('first_id',$act['datum_id'])->where('user_id',$ticket_info['user_id'])->find()) {
+                            UserLearn::create($arr);
+                        }
                     }
                     //资料
                     if($act['datum_id'] && $act['datum_id'] != 0){
@@ -176,7 +178,9 @@ class ActivityApplyItem extends Controller
                             'end_time' => $nextYear,
                             'end_int' => strtotime($nextYear)
                         ];
-                        UserLearn::create($arr);
+                        if(!UserLearn::where('type',3)->where('first_id',$act['datum_id'])->where('user_id',$ticket_info['user_id'])->find()) {
+                            UserLearn::create($arr);
+                        }
                     }
                     //新增内容end