作者 lyh

gx

@@ -69,7 +69,6 @@ class ServerConfigLogic extends BaseLogic @@ -69,7 +69,6 @@ class ServerConfigLogic extends BaseLogic
69 */ 69 */
70 public function serviceConfigSave() 70 public function serviceConfigSave()
71 { 71 {
72 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($this->param, true) . PHP_EOL, FILE_APPEND);  
73 $project = new Project(); 72 $project = new Project();
74 $project_list = $project->read(['id'=>$this->param['project_id']]); 73 $project_list = $project->read(['id'=>$this->param['project_id']]);
75 if($project_list === false){ 74 if($project_list === false){
@@ -22,13 +22,6 @@ class ServerConfig extends Base @@ -22,13 +22,6 @@ class ServerConfig extends Base
22 */ 22 */
23 protected $table = 'gl_server_config'; 23 protected $table = 'gl_server_config';
24 24
25 - /**  
26 - * @var array  
27 - */  
28 - protected $guarded = ['updated_at'];  
29 -  
30 - const UPDATED_AT = null;  
31 -  
32 25
33 /** 26 /**
34 * 1:服务器, 2:MySQL, 3:Redis 27 * 1:服务器, 2:MySQL, 3:Redis
@@ -37,68 +30,5 @@ class ServerConfig extends Base @@ -37,68 +30,5 @@ class ServerConfig extends Base
37 const TYPE_MYSQL = 2; 30 const TYPE_MYSQL = 2;
38 const TYPE_REDIS = 3; 31 const TYPE_REDIS = 3;
39 32
40 - /**  
41 - * @return string[]  
42 - * @author zbj  
43 - * @date 2023/4/23  
44 - */  
45 - public static function typeMap(){  
46 - return [  
47 - self::TYPE_SERVER => '服务器',  
48 - self::TYPE_MYSQL => 'MySQL',  
49 -// self::TYPE_REDIS => 'Redis',  
50 - ];  
51 - }  
52 -  
53 - /**  
54 - * 用户名加密  
55 - * @param $value  
56 - */  
57 - public function setUserAttribute($value)  
58 - {  
59 - $this->attributes['user'] = encrypt($value);  
60 - }  
61 -  
62 - /**  
63 - * 密码加密  
64 - * @param $value  
65 - */  
66 - public function setPasswordAttribute($value)  
67 - {  
68 - $this->attributes['password'] = encrypt($value);  
69 - }  
70 -  
71 - /**  
72 - * 端口加密  
73 - * @param $value  
74 - */  
75 - public function setPortAttribute($value)  
76 - {  
77 - $this->attributes['Port'] = encrypt($value);  
78 - }  
79 -  
80 - /**  
81 - * @return mixed  
82 - */  
83 - public function getUserAttribute($value)  
84 - {  
85 - return decrypt($value);  
86 - }  
87 -  
88 - /**  
89 - * @return mixed  
90 - */  
91 - public function getPasswordAttribute($value)  
92 - {  
93 - return decrypt($value);  
94 - }  
95 -  
96 - /**  
97 - * @return mixed  
98 - */  
99 - public function getPortAttribute($value)  
100 - {  
101 - return decrypt($value);  
102 - }  
103 33
104 } 34 }