mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 16:30:25 +08:00 
			
		
		
		
	
		
			
	
	
		
			21 lines
		
	
	
		
			551 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			21 lines
		
	
	
		
			551 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package persistence
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import (
							 | 
						||
| 
								 | 
							
									"mayfly-go/base/biz"
							 | 
						||
| 
								 | 
							
									"mayfly-go/base/model"
							 | 
						||
| 
								 | 
							
									"mayfly-go/server/devops/domain/entity"
							 | 
						||
| 
								 | 
							
									"mayfly-go/server/devops/domain/repository"
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								type projectEnvRepo struct{}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								var ProjectEnvRepo repository.ProjectEnv = &projectEnvRepo{}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func (p *projectEnvRepo) ListEnv(condition *entity.ProjectEnv, toEntity interface{}, orderBy ...string) {
							 | 
						||
| 
								 | 
							
									model.ListByOrder(condition, toEntity, orderBy...)
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func (p *projectEnvRepo) Save(entity *entity.ProjectEnv) {
							 | 
						||
| 
								 | 
							
									biz.ErrIsNilAppendErr(model.Insert(entity), "保存环境失败:%s")
							 | 
						||
| 
								 | 
							
								}
							 |