yingzi 3 년 전
부모
커밋
559c223062
1개의 변경된 파일과 1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/system/controller/ShowTemplate.php

+ 1 - 1
app/system/controller/ShowTemplate.php

@@ -79,7 +79,6 @@ class ShowTemplate extends  BaseController{
         $id = empty($post["id"])?0:(int)$post["id"];
         $codeWhere[]=["code","=",$save["code"]];
         if($id>0){
-            $save["time"] = time();
             $codeWhere[]=["id","<>",$id];
         }
         $count = (new ShowTemplateModel)->where($codeWhere)->where("id","<>",$id)->count();
@@ -88,6 +87,7 @@ class ShowTemplate extends  BaseController{
         }
         $r=0;
         if(empty($id) || $id=="0"){
+            $save["time"] = time();
             $r = (new ShowTemplateModel)->insert($save);
         }else{
             $r = (new ShowTemplateModel)->where("id",$id)->update($save);