mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-17 23:00:24 +08:00
refactor: base.repo与app重构优化
This commit is contained in:
@@ -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(machineId, "Name")
|
||||
if err != nil {
|
||||
return errorx.NewBiz("该机器不存在")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user