mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	refactor: 引入日志切割库、indexApi拆分等
This commit is contained in:
		@@ -23,7 +23,7 @@ type MachineScript interface {
 | 
			
		||||
type machineScriptAppImpl struct {
 | 
			
		||||
	base.AppImpl[*entity.MachineScript, repository.MachineScript]
 | 
			
		||||
 | 
			
		||||
	MachineApp Machine `inject:""`
 | 
			
		||||
	machineApp Machine `inject:"MachineApp"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 注入MachineScriptRepo
 | 
			
		||||
@@ -42,7 +42,7 @@ func (m *machineScriptAppImpl) GetPageList(condition *entity.MachineScript, page
 | 
			
		||||
func (m *machineScriptAppImpl) Save(ctx context.Context, ms *entity.MachineScript) error {
 | 
			
		||||
	// 如果机器id不为公共脚本id,则校验机器是否存在
 | 
			
		||||
	if machineId := ms.MachineId; machineId != Common_Script_Machine_Id {
 | 
			
		||||
		_, err := m.MachineApp.GetById(new(entity.Machine), machineId, "Name")
 | 
			
		||||
		_, err := m.machineApp.GetById(new(entity.Machine), machineId, "Name")
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return errorx.NewBiz("该机器不存在")
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user