Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
bd5fda0ecc
@ -1,6 +1,5 @@
|
||||
package cn.iocoder.yudao.module.llm.service.basemodel;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import cn.iocoder.yudao.module.llm.controller.admin.basemodel.vo.BaseModelSaveReqVO;
|
||||
import cn.iocoder.yudao.module.llm.dal.dataobject.basemodel.BaseModelDO;
|
||||
import cn.iocoder.yudao.module.llm.service.basemodel.vo.ModelListRes;
|
||||
@ -8,16 +7,14 @@ import cn.iocoder.yudao.module.llm.service.http.TrainHttpService;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.esotericsoftware.minlog.Log;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableScheduling
|
||||
@Component
|
||||
public class BaseModelTaskService {
|
||||
|
||||
@Resource
|
||||
@ -64,5 +61,19 @@ public class BaseModelTaskService {
|
||||
baseModelService.updateBaseModel(baseModelSaveReqVO);
|
||||
}
|
||||
}
|
||||
|
||||
List<BaseModelDO> baseModelList = baseModelService.getBaseModelList();
|
||||
|
||||
List<Long> ids = modelListRes.stream().map(ModelListRes::getId).collect(Collectors.toList());
|
||||
|
||||
for (BaseModelDO baseModelDO : baseModelList) {
|
||||
if(baseModelDO.getAigcId() == null){
|
||||
continue;
|
||||
}
|
||||
if(!ids.contains(baseModelDO.getAigcId())){
|
||||
baseModelService.deleteBaseModel(baseModelDO.getId());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.server;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
* 项目的启动类
|
||||
@ -14,6 +15,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${yudao.info.base-package}
|
||||
@EnableScheduling
|
||||
@SpringBootApplication(scanBasePackages = {"${yudao.info.base-package}.server", "${yudao.info.base-package}.module"})
|
||||
public class YudaoServerApplication {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user