活动增减增加日志
This commit is contained in:
		
							parent
							
								
									471dc1f040
								
							
						
					
					
						commit
						f7f6836d88
					
				@ -271,6 +271,8 @@ class NewActivity extends Base
 | 
				
			|||||||
    public function add(){
 | 
					    public function add(){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $this->transactionCheck();
 | 
					        $this->transactionCheck();
 | 
				
			||||||
 | 
					        file_put_contents('activity'.date('Y_m_d').'.log',date('Y-m-d H:i:s')."  ".json_encode($this->request->post()).PHP_EOL,FILE_APPEND);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //敏感词过滤
 | 
					        //敏感词过滤
 | 
				
			||||||
        $this->checkSensitivewords(["title","content"]);
 | 
					        $this->checkSensitivewords(["title","content"]);
 | 
				
			||||||
@ -356,6 +358,9 @@ class NewActivity extends Base
 | 
				
			|||||||
    public function edit($ids = null){
 | 
					    public function edit($ids = null){
 | 
				
			||||||
        if(!$ids) $ids = $this->request->post('ids/d', 0);
 | 
					        if(!$ids) $ids = $this->request->post('ids/d', 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        file_put_contents('activity'.date('Y_m_d').'.log',date('Y-m-d H:i:s')."  ".json_encode($this->request->post()).PHP_EOL,FILE_APPEND);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $this->transactionCheck();
 | 
					        $this->transactionCheck();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //敏感词过滤
 | 
					        //敏感词过滤
 | 
				
			||||||
 | 
				
			|||||||
@ -194,6 +194,7 @@ class ActivityDrafts extends Base
 | 
				
			|||||||
    public function add(){
 | 
					    public function add(){
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//        $this->transactionCheck();
 | 
					//        $this->transactionCheck();
 | 
				
			||||||
 | 
					        file_put_contents('activityDrafts'.date('Y_m_d').'.log',date('Y-m-d H:i:s')."  ".json_encode($this->request->post()).PHP_EOL,FILE_APPEND);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //敏感词过滤
 | 
					        //敏感词过滤
 | 
				
			||||||
        $this->checkSensitivewords(["title","content"]);
 | 
					        $this->checkSensitivewords(["title","content"]);
 | 
				
			||||||
@ -228,7 +229,6 @@ class ActivityDrafts extends Base
 | 
				
			|||||||
        $params["sign_time"] =  $this->request->post('sign_time/s', 0);
 | 
					        $params["sign_time"] =  $this->request->post('sign_time/s', 0);
 | 
				
			||||||
        $params["time"] =  $this->request->post('time/s', 0);
 | 
					        $params["time"] =  $this->request->post('time/s', 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
       //classes_type
 | 
					       //classes_type
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        try{
 | 
					        try{
 | 
				
			||||||
@ -273,6 +273,9 @@ class ActivityDrafts extends Base
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    public function edit($ids = null){
 | 
					    public function edit($ids = null){
 | 
				
			||||||
        if(!$ids) $ids = $this->request->post('ids/d', 0);
 | 
					        if(!$ids) $ids = $this->request->post('ids/d', 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        file_put_contents('activityDrafts'.date('Y_m_d').'.log',date('Y-m-d H:i:s')."  ".json_encode($this->request->post()).PHP_EOL,FILE_APPEND);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //敏感词过滤
 | 
					        //敏感词过滤
 | 
				
			||||||
        $this->checkSensitivewords(["title","content"]);
 | 
					        $this->checkSensitivewords(["title","content"]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -308,6 +311,8 @@ class ActivityDrafts extends Base
 | 
				
			|||||||
        $params["sign_time"] =  $this->request->post('sign_time/s', 0);
 | 
					        $params["sign_time"] =  $this->request->post('sign_time/s', 0);
 | 
				
			||||||
        $params["time"] =  $this->request->post('time/s', 0);
 | 
					        $params["time"] =  $this->request->post('time/s', 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        try{
 | 
					        try{
 | 
				
			||||||
            if(!config("site.miniapp_activity_swtich")) $this->error("已关闭发布渠道,请联系管理员后台添加!");
 | 
					            if(!config("site.miniapp_activity_swtich")) $this->error("已关闭发布渠道,请联系管理员后台添加!");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -394,6 +394,8 @@ class Activity extends BaseModel
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            $split_line = " - ";
 | 
					            $split_line = " - ";
 | 
				
			||||||
            $time_arr = explode($split_line,$time);
 | 
					            $time_arr = explode($split_line,$time);
 | 
				
			||||||
 | 
					            if(!$time_arr)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $params["sign_start_time"] = $time_arr[0] ;
 | 
					            $params["sign_start_time"] = $time_arr[0] ;
 | 
				
			||||||
            $params["sign_end_time"] = $time_arr[1];
 | 
					            $params["sign_end_time"] = $time_arr[1];
 | 
				
			||||||
            unset($params["sign_time"]);
 | 
					            unset($params["sign_time"]);
 | 
				
			||||||
@ -544,6 +546,13 @@ class Activity extends BaseModel
 | 
				
			|||||||
    $params["content"] = preg_replace($pattern, '', $params["content"]);
 | 
					    $params["content"] = preg_replace($pattern, '', $params["content"]);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if(!empty( $params["cate_ids"])){
 | 
				
			||||||
 | 
					          $cate_count = Cate::where("id" ,"in",$params["cate_ids"])->count();
 | 
				
			||||||
 | 
					          if($cate_count != count(explode(",", $params["cate_ids"]))){
 | 
				
			||||||
 | 
					              throw new \Exception("平台分类不存在");
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1359,10 +1368,15 @@ class Activity extends BaseModel
 | 
				
			|||||||
//            $row = self::get($id);
 | 
					//            $row = self::get($id);
 | 
				
			||||||
//            var_dump($row["audit_status"]);
 | 
					//            var_dump($row["audit_status"]);
 | 
				
			||||||
            //如果审核状态是审核中,并且时间已经到了3=待开始,4=进行中,则活动自动取消
 | 
					            //如果审核状态是审核中,并且时间已经到了3=待开始,4=进行中,则活动自动取消
 | 
				
			||||||
            if(($row["status"]=='3' || $row["status"]=='4' || $row["status"]=='-1') && $row["auth_status"]=='0'){
 | 
					            if(($row["status"]=='3' || $row["status"]=='4') && $row["auth_status"]=='0'){
 | 
				
			||||||
                  //直接改为审核失败
 | 
					                  //直接改为审核失败
 | 
				
			||||||
                $row["auth_time"] = time();
 | 
					                $row["auth_time"] = time();
 | 
				
			||||||
 | 
					                if($row["status"]=='-1'){
 | 
				
			||||||
 | 
					                    $row["reason"] = "主动取消审核自动失败";
 | 
				
			||||||
 | 
					                }else{
 | 
				
			||||||
                    $row["reason"] = "超期系统自动审核失败,请重发该活动";
 | 
					                    $row["reason"] = "超期系统自动审核失败,请重发该活动";
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                $row["auth_status"] = 2;
 | 
					                $row["auth_status"] = 2;
 | 
				
			||||||
                $row->save();
 | 
					                $row->save();
 | 
				
			||||||
                //审核不通过
 | 
					                //审核不通过
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user