Commit 84cb5794 authored by sml's avatar sml

代码提交

parent 0ee7d414
......@@ -268,19 +268,27 @@ public class DmpProjectConfigInfoServiceImpl extends BaseService implements DmpP
//保存选择的引擎
List<DmpProjectConfigEngine> dmpProjectConfigEngines = dmpProjectConfigInfo.getDmpProjectConfigEngines();
dmpProjectConfigEngines = dmpProjectConfigEngines.stream().map(x->{
x.setConfigId(dmpProjectConfigInfo.getProjectConfigId());
return x;
}).collect(Collectors.toList());
for (DmpProjectConfigEngine dmpProjectConfigEngine : dmpProjectConfigEngines) {
dmpProjectConfigEngineMapper.insertBatch(dmpProjectConfigEngines);
dmpProjectConfigEngine.setConfigId(dmpProjectConfigInfo.getProjectConfigId());
dmpProjectConfigEngine.setDataStatus("1");
dmpProjectConfigEngine.setCreateUserId(getHttpRequestUserId(httpRequest));
dmpProjectConfigEngine.setCreateTime(new Date());
dmpProjectConfigEngineMapper.insert(dmpProjectConfigEngine);
//保存填写的私有引擎参数
List<DmpProjectEngineParam> dmpProjectEngineParams = dmpProjectConfigEngines.stream()
.flatMap(x->{
return x.getDmpProjectEngineParams().stream();
List<DmpProjectEngineParam> dmpProjectEngineParams = dmpProjectConfigEngine.getDmpProjectEngineParams();
dmpProjectEngineParams = dmpProjectEngineParams.stream().map(x->{
x.setConfigEngineId(dmpProjectConfigEngine.getConfigEngineId());
x.setDataStatus("1");
x.setCreateUserId(getHttpRequestUserId(httpRequest));
x.setCreateTime(new Date());
return x;
}).collect(Collectors.toList());
dmpProjectEngineParamMapper.insertBatch(dmpProjectEngineParams);
}
baseBeanResponse.setCode(StatuConstant.SUCCESS_CODE);
baseBeanResponse.setMessage("新增成功");
......
......@@ -137,7 +137,7 @@
</update>
<!-- 插入项目配置计算引擎关系表 -->
<insert id="insert" parameterType="com.jz.dmp.modules.model.DmpProjectConfigEngine">
<insert id="insert" parameterType="com.jz.dmp.modules.model.DmpProjectConfigEngine" useGeneratedKeys="true" keyProperty="configEngineId">
insert into dmp_project_config_engine (
config_engine_id, config_id, engine_id, remark, data_status,
create_user_id, create_time, update_user_id, update_time
......@@ -164,7 +164,7 @@
</insert>
<!-- 选择性插入项目配置计算引擎关系表 -->
<insert id="insertSelective" parameterType="com.jz.dmp.modules.model.DmpProjectConfigEngine">
<insert id="insertSelective" parameterType="com.jz.dmp.modules.model.DmpProjectConfigEngine" useGeneratedKeys="true" keyProperty="configEngineId">
insert into dmp_project_config_engine
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="configEngineId != null" >
......
......@@ -185,7 +185,7 @@
</update>
<!-- 插入项目配置表 -->
<insert id="insert" parameterType="com.jz.dmp.modules.model.DmpProjectConfigInfo">
<insert id="insert" parameterType="com.jz.dmp.modules.model.DmpProjectConfigInfo" useGeneratedKeys="true" keyProperty="projectConfigId">
insert into dmp_project_config_info (
project_config_id, project_id, remark, data_status, create_user_id,
create_time, update_user_id, update_time
......@@ -212,7 +212,7 @@
</insert>
<!-- 选择性插入项目配置表 -->
<insert id="insertSelective" parameterType="com.jz.dmp.modules.model.DmpProjectConfigInfo">
<insert id="insertSelective" parameterType="com.jz.dmp.modules.model.DmpProjectConfigInfo" useGeneratedKeys="true" keyProperty="projectConfigId">
insert into dmp_project_config_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="projectConfigId != null" >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment