dengzedong
2024-12-12 94c169d9c7809ae78927608ef55c61d24459fdab
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ModelMethodServiceImpl.java
@@ -6,12 +6,14 @@
import com.iailab.module.model.mpk.dao.ModelMethodDao;
import com.iailab.module.model.mpk.dto.ModelMethodDTO;
import com.iailab.module.model.mpk.entity.ModelMethodEntity;
import com.iailab.module.model.mpk.service.MethodSettingService;
import com.iailab.module.model.mpk.service.ModelMethodService;
import com.iailab.module.model.mpk.service.SettingSelectService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.HashMap;
import java.util.List;
@@ -28,7 +30,7 @@
public class ModelMethodServiceImpl extends BaseServiceImpl<ModelMethodDao, ModelMethodEntity> implements ModelMethodService {
    @Autowired
    private SettingSelectService settingSelectService;
    private MethodSettingService methodSettingService;
    @Override
    public void deleteByMap(Map<String, Object> map) {
@@ -52,7 +54,9 @@
            entity.setMpkFileId(fileId);
            entity.setSort(i);
            baseDao.insert(entity);
            settingSelectService.insertList(list.get(i).getMethodSettings(), entity.getId());
            if (!CollectionUtils.isEmpty(list.get(i).getMethodSettings())) {
                methodSettingService.insertList(list.get(i).getMethodSettings(), entity.getId());
            }
        }
    }