【发布单操实训共享字段添加】

This commit is contained in:
weizhihong 2023-04-13 17:39:53 +08:00
parent 593504950d
commit f33ac9c2c4
5 changed files with 36 additions and 13 deletions

View File

@ -0,0 +1 @@
ALTER TABLE `joylink`.`rts_published_training2` ADD COLUMN `shared` int NULL DEFAULT 0 COMMENT '0 不共享1共享' AFTER `client`;

View File

@ -52,7 +52,7 @@ public interface PublishedTraining2DAO {
@Insert(value = "<script>" +
"insert into published_training2 (name, map_id, description, type, label_json, map_location_json, bg_scene_json," +
" run_plan_id, opera_json, step_json, scoring_rule_json, member_json, player_id_json, failure_condition_json," +
" creator_id, create_time, update_time, state, final_scenes_json, org_id, client)" +
" creator_id, create_time, update_time, state, final_scenes_json, org_id, client, shared)" +
"values " +
" <foreach collection=\"list\" item=\"entity\" separator=\",\"> " +
" (#{entity.name,jdbcType=VARCHAR}, #{entity.mapId,jdbcType=BIGINT}, #{entity.description,jdbcType=VARCHAR}, " +
@ -61,7 +61,7 @@ public interface PublishedTraining2DAO {
" #{entity.stepJson,jdbcType=LONGVARCHAR}, #{entity.scoringRuleJson,jdbcType=LONGVARCHAR}, #{entity.memberJson,jdbcType=LONGVARCHAR}," +
" #{entity.playerIdJson,jdbcType=LONGVARCHAR}, #{entity.failureConditionJson,jdbcType=VARCHAR}, #{entity.creatorId,jdbcType=BIGINT}," +
" #{entity.createTime,jdbcType=DATETIME}, #{entity.updateTime,jdbcType=DATETIME}, #{entity.state,jdbcType=INT}," +
" #{entity.finalScenesJson,jdbcType=LONGVARCHAR}, #{entity.orgId,jdbcType=BIGINT}, #{entity.client,jdbcType=VARCHAR})" +
" #{entity.finalScenesJson,jdbcType=LONGVARCHAR}, #{entity.orgId,jdbcType=BIGINT}, #{entity.client,jdbcType=VARCHAR}, #{entity.shared, jdbcType=INT})" +
" </foreach>" +
"</script>")
void batchInsert(@Param("list") PublishedTraining2 list);

View File

@ -78,5 +78,10 @@ public class PublishedTraining2 implements Serializable {
private String client;
/**
* 是否共享0 不共享1共享
*/
private Integer shared;
private static final long serialVersionUID = 1L;
}

View File

@ -154,6 +154,7 @@ public class Training2Rule {
copyTraining2.setUpdateTime(LocalDateTime.now());
copyTraining2.setClient(this.client);
copyTraining2.setState(1);
copyTraining2.setShared(1);
return copyTraining2;
}
}

View File

@ -18,6 +18,7 @@
<result column="org_id" jdbcType="BIGINT" property="orgId"/>
<result column="player_id_json" jdbcType="LONGVARCHAR" property="playerIdJson"/>
<result column="client" jdbcType="VARCHAR" property="client"/>
<result column="shared" jdbcType="INTEGER" property="shared"/>
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs"
type="club.joylink.rtss.entity.training2.PublishedTraining2WithBLOBs">
@ -89,7 +90,7 @@
</sql>
<sql id="Base_Column_List">
id, `name`, map_id, map_system, terminal,description, `type`, label_json, map_location_json, run_plan_id,
failure_condition_json, creator_id, create_time, update_time, `state`, org_id, player_id_json, client
failure_condition_json, creator_id, create_time, update_time, `state`, org_id, player_id_json, client, shared
</sql>
<sql id="Blob_Column_List">
bg_scene_json, opera_json, step_json, scoring_rule_json, member_json
@ -154,8 +155,7 @@
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from rts_published_training2
where id = #{id,jdbcType=BIGINT}
delete from rts_published_training2 where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.training2.PublishedTraining2Example">
@ -169,7 +169,7 @@
insert into rts_published_training2 (
id, `name`, map_id, description, `type`, label_json,
map_location_json, run_plan_id, failure_condition_json, creator_id, create_time, update_time,
`state`, org_id, bg_scene_json, opera_json, step_json, scoring_rule_json, member_json, player_id_json,client
`state`, org_id, bg_scene_json, opera_json, step_json, scoring_rule_json, member_json, player_id_json,client,shared
)
values (
#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{mapId,jdbcType=BIGINT},
@ -178,7 +178,7 @@
#{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{state,jdbcType=INTEGER}, #{orgId,jdbcType=BIGINT}, #{bgSceneJson,jdbcType=LONGVARCHAR},
#{operaJson,jdbcType=LONGVARCHAR}, #{stepJson,jdbcType=LONGVARCHAR}, #{scoringRuleJson,jdbcType=LONGVARCHAR},
#{memberJson,jdbcType=LONGVARCHAR}, #{playerIdJson,jdbcType=LONGVARCHAR},#{client,jdbcType=VARCHAR}
#{memberJson,jdbcType=LONGVARCHAR}, #{playerIdJson,jdbcType=LONGVARCHAR},#{client,jdbcType=VARCHAR}, #{shared,jdbcType=INTEGER}
)
</insert>
@ -186,7 +186,7 @@
insert into rts_published_training2 (
`name`, map_id, description, `type`, label_json, map_location_json, run_plan_id, failure_condition_json,
creator_id, create_time, update_time, `state`, org_id, bg_scene_json, opera_json, step_json, scoring_rule_json,
member_json, player_id_json, client
member_json, player_id_json, client, shared
)
values
<foreach collection="list" item="entity" separator=",">
@ -197,7 +197,7 @@
#{entity.createTime,jdbcType=TIMESTAMP}, #{entity.updateTime,jdbcType=TIMESTAMP}, #{entity.state,jdbcType=INTEGER},
#{entity.orgId,jdbcType=BIGINT}, #{entity.bgSceneJson,jdbcType=LONGVARCHAR}, #{entity.operaJson,jdbcType=LONGVARCHAR},
#{entity.stepJson,jdbcType=LONGVARCHAR}, #{entity.scoringRuleJson,jdbcType=LONGVARCHAR}, #{entity.memberJson,jdbcType=LONGVARCHAR},
#{entity.playerIdJson,jdbcType=LONGVARCHAR},#{entity.client,jdbcType=VARCHAR}
#{entity.playerIdJson,jdbcType=LONGVARCHAR},#{entity.client,jdbcType=VARCHAR},#{entity.shared,jdbcType=INTEGER}
)
</foreach>
</insert>
@ -268,6 +268,9 @@
<if test="client != null">
client,
</if>
<if test="shared != null">
shared,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -333,6 +336,9 @@
<if test="client != null">
#{client,jdbcType=VARCHAR},
</if>
<if test="shared != null">
#{shared,jdbcType=INTEGER},
</if>
</trim>
</insert>
@ -410,6 +416,9 @@
<if test="record.client != null">
client = #{record.client,jdbcType=VARCHAR},
</if>
<if test="record.shared != null">
shared = #{record.shared,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
@ -438,7 +447,8 @@
scoring_rule_json = #{record.scoringRuleJson,jdbcType=LONGVARCHAR},
member_json = #{record.memberJson,jdbcType=LONGVARCHAR},
player_id_json = #{record.playerIdJson,jdbcType=LONGVARCHAR},
client = #{record.client,jdbcType=VARCHAR}
client = #{record.client,jdbcType=VARCHAR},
shared = #{record.shared,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
@ -460,7 +470,8 @@
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
`state` = #{record.state,jdbcType=INTEGER},
org_id = #{record.orgId,jdbcType=BIGINT},
client = #{record.client,jdbcType=VARCHAR}
client = #{record.client,jdbcType=VARCHAR},
shared = #{record.shared,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
@ -530,6 +541,9 @@
<if test="client != null">
client = #{client,jdbcType=VARCHAR},
</if>
<if test="shared != null">
shared = #{shared,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@ -556,7 +570,8 @@
scoring_rule_json = #{scoringRuleJson,jdbcType=LONGVARCHAR},
member_json = #{memberJson,jdbcType=LONGVARCHAR},
player_id_json = #{playerIdJson,jdbcType=LONGVARCHAR},
client = #{record.client,jdbcType=VARCHAR}
client = #{client,jdbcType=VARCHAR},
shared = #{shared,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
@ -575,7 +590,8 @@
update_time = #{updateTime,jdbcType=TIMESTAMP},
`state` = #{state,jdbcType=INTEGER},
org_id = #{orgId,jdbcType=BIGINT},
client = #{record.client,jdbcType=VARCHAR}
client = #{client,jdbcType=VARCHAR},
shared = #{shared,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>