From 1e18878c67a274ab3b1d598a301000af2075423a Mon Sep 17 00:00:00 2001 From: tiger_zhou <123456> Date: Sun, 9 Oct 2022 16:09:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9F=A5=E8=AF=A2=E7=BB=B4=E5=BA=A6(?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=EF=BC=8C=E5=9C=B0=E5=9B=BE=EF=BC=8C=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=EF=BC=8C=E6=A0=87=E7=AD=BE=E5=8F=8A=E7=BB=84=E7=BB=87?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/202201010-zhouyin.sql | 3 + .../TrainingDraftV2PublishController.java | 7 +- .../entity/training2/PublishedTraining2.java | 5 +- .../training2/PublishedTraining2Example.java | 104 +- .../PublishedTraining2WithBLOBs.java | 4 +- .../training2/Training2Convertor.java | 9 + .../Training2DraftPublishService.java | 3 +- .../training2/Training2PublishService.java | 43 +- .../PublishedTraining2InfoPageReqVo.java | 21 + .../mybatis/mapper/PublishedTraining2DAO.xml | 989 +++++++++--------- 10 files changed, 668 insertions(+), 520 deletions(-) create mode 100644 sql/202201010-zhouyin.sql diff --git a/sql/202201010-zhouyin.sql b/sql/202201010-zhouyin.sql new file mode 100644 index 000000000..c5ffd9ba8 --- /dev/null +++ b/sql/202201010-zhouyin.sql @@ -0,0 +1,3 @@ +-- 新实训标添加组织id +alter table published_training2 add column org_id bigint; + diff --git a/src/main/java/club/joylink/rtss/controller/training2/TrainingDraftV2PublishController.java b/src/main/java/club/joylink/rtss/controller/training2/TrainingDraftV2PublishController.java index 3af3adbc2..ab07eb778 100644 --- a/src/main/java/club/joylink/rtss/controller/training2/TrainingDraftV2PublishController.java +++ b/src/main/java/club/joylink/rtss/controller/training2/TrainingDraftV2PublishController.java @@ -2,11 +2,14 @@ package club.joylink.rtss.controller.training2; import club.joylink.rtss.services.training2.Training2DraftPublishService; import club.joylink.rtss.vo.AccountVO; +import club.joylink.rtss.vo.LoginUserInfoVO; import club.joylink.rtss.vo.training2.draft.TrainingDraftPublishReqVo; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import static club.joylink.rtss.controller.advice.AuthenticateInterceptor.LOGIN_INFO_KEY; + /** * 实训草稿发布管理接口 */ @@ -20,7 +23,7 @@ public class TrainingDraftV2PublishController { * 当前用户发布自己的实训草稿 */ @PostMapping - public void draftPublish(@RequestBody TrainingDraftPublishReqVo req, @RequestAttribute AccountVO user){ - this.publishService.draftPublish(req,user.getId()); + public void draftPublish(@RequestBody TrainingDraftPublishReqVo req, @RequestAttribute(name = LOGIN_INFO_KEY)LoginUserInfoVO userInfo){ + this.publishService.draftPublish(req,userInfo.getAccountVO().getId(),userInfo.getTopOrgId()); } } diff --git a/src/main/java/club/joylink/rtss/entity/training2/PublishedTraining2.java b/src/main/java/club/joylink/rtss/entity/training2/PublishedTraining2.java index dd1cb73b7..14bbeaa5c 100644 --- a/src/main/java/club/joylink/rtss/entity/training2/PublishedTraining2.java +++ b/src/main/java/club/joylink/rtss/entity/training2/PublishedTraining2.java @@ -2,6 +2,7 @@ package club.joylink.rtss.entity.training2; import java.io.Serializable; import java.time.LocalDateTime; +import java.util.Date; import lombok.Data; /** @@ -69,5 +70,7 @@ public class PublishedTraining2 implements Serializable { */ private Integer state; + private Long orgId; + private static final long serialVersionUID = 1L; -} \ No newline at end of file +} diff --git a/src/main/java/club/joylink/rtss/entity/training2/PublishedTraining2Example.java b/src/main/java/club/joylink/rtss/entity/training2/PublishedTraining2Example.java index 7cd42889d..befac2dcb 100644 --- a/src/main/java/club/joylink/rtss/entity/training2/PublishedTraining2Example.java +++ b/src/main/java/club/joylink/rtss/entity/training2/PublishedTraining2Example.java @@ -1,7 +1,7 @@ package club.joylink.rtss.entity.training2; -import java.time.LocalDateTime; import java.util.ArrayList; +import java.util.Date; import java.util.List; public class PublishedTraining2Example { @@ -795,52 +795,52 @@ public class PublishedTraining2Example { return (Criteria) this; } - public Criteria andCreateTimeEqualTo(LocalDateTime value) { + public Criteria andCreateTimeEqualTo(Date value) { addCriterion("create_time =", value, "createTime"); return (Criteria) this; } - public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + public Criteria andCreateTimeNotEqualTo(Date value) { addCriterion("create_time <>", value, "createTime"); return (Criteria) this; } - public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + public Criteria andCreateTimeGreaterThan(Date value) { addCriterion("create_time >", value, "createTime"); return (Criteria) this; } - public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { addCriterion("create_time >=", value, "createTime"); return (Criteria) this; } - public Criteria andCreateTimeLessThan(LocalDateTime value) { + public Criteria andCreateTimeLessThan(Date value) { addCriterion("create_time <", value, "createTime"); return (Criteria) this; } - public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { addCriterion("create_time <=", value, "createTime"); return (Criteria) this; } - public Criteria andCreateTimeIn(List values) { + public Criteria andCreateTimeIn(List values) { addCriterion("create_time in", values, "createTime"); return (Criteria) this; } - public Criteria andCreateTimeNotIn(List values) { + public Criteria andCreateTimeNotIn(List values) { addCriterion("create_time not in", values, "createTime"); return (Criteria) this; } - public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + public Criteria andCreateTimeBetween(Date value1, Date value2) { addCriterion("create_time between", value1, value2, "createTime"); return (Criteria) this; } - public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { addCriterion("create_time not between", value1, value2, "createTime"); return (Criteria) this; } @@ -855,52 +855,52 @@ public class PublishedTraining2Example { return (Criteria) this; } - public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + public Criteria andUpdateTimeEqualTo(Date value) { addCriterion("update_time =", value, "updateTime"); return (Criteria) this; } - public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + public Criteria andUpdateTimeNotEqualTo(Date value) { addCriterion("update_time <>", value, "updateTime"); return (Criteria) this; } - public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + public Criteria andUpdateTimeGreaterThan(Date value) { addCriterion("update_time >", value, "updateTime"); return (Criteria) this; } - public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { addCriterion("update_time >=", value, "updateTime"); return (Criteria) this; } - public Criteria andUpdateTimeLessThan(LocalDateTime value) { + public Criteria andUpdateTimeLessThan(Date value) { addCriterion("update_time <", value, "updateTime"); return (Criteria) this; } - public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { addCriterion("update_time <=", value, "updateTime"); return (Criteria) this; } - public Criteria andUpdateTimeIn(List values) { + public Criteria andUpdateTimeIn(List values) { addCriterion("update_time in", values, "updateTime"); return (Criteria) this; } - public Criteria andUpdateTimeNotIn(List values) { + public Criteria andUpdateTimeNotIn(List values) { addCriterion("update_time not in", values, "updateTime"); return (Criteria) this; } - public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + public Criteria andUpdateTimeBetween(Date value1, Date value2) { addCriterion("update_time between", value1, value2, "updateTime"); return (Criteria) this; } - public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { addCriterion("update_time not between", value1, value2, "updateTime"); return (Criteria) this; } @@ -964,6 +964,66 @@ public class PublishedTraining2Example { addCriterion("`state` not between", value1, value2, "state"); return (Criteria) this; } + + public Criteria andOrgIdIsNull() { + addCriterion("org_id is null"); + return (Criteria) this; + } + + public Criteria andOrgIdIsNotNull() { + addCriterion("org_id is not null"); + return (Criteria) this; + } + + public Criteria andOrgIdEqualTo(Long value) { + addCriterion("org_id =", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdNotEqualTo(Long value) { + addCriterion("org_id <>", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdGreaterThan(Long value) { + addCriterion("org_id >", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdGreaterThanOrEqualTo(Long value) { + addCriterion("org_id >=", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdLessThan(Long value) { + addCriterion("org_id <", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdLessThanOrEqualTo(Long value) { + addCriterion("org_id <=", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdIn(List values) { + addCriterion("org_id in", values, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdNotIn(List values) { + addCriterion("org_id not in", values, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdBetween(Long value1, Long value2) { + addCriterion("org_id between", value1, value2, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdNotBetween(Long value1, Long value2) { + addCriterion("org_id not between", value1, value2, "orgId"); + return (Criteria) this; + } } /** @@ -1060,4 +1120,4 @@ public class PublishedTraining2Example { this(condition, value, secondValue, null); } } -} \ No newline at end of file +} diff --git a/src/main/java/club/joylink/rtss/entity/training2/PublishedTraining2WithBLOBs.java b/src/main/java/club/joylink/rtss/entity/training2/PublishedTraining2WithBLOBs.java index 02ab8ac09..89d5c4625 100644 --- a/src/main/java/club/joylink/rtss/entity/training2/PublishedTraining2WithBLOBs.java +++ b/src/main/java/club/joylink/rtss/entity/training2/PublishedTraining2WithBLOBs.java @@ -40,9 +40,9 @@ public class PublishedTraining2WithBLOBs extends PublishedTraining2 implements S private String playerIdJson; /** - * 实训编制后的最终场景json数据 + * 实训编制后的最终场景json数据(删掉) */ private String finalScenesJson; private static final long serialVersionUID = 1L; -} \ No newline at end of file +} diff --git a/src/main/java/club/joylink/rtss/services/training2/Training2Convertor.java b/src/main/java/club/joylink/rtss/services/training2/Training2Convertor.java index cf3345af0..ad3fbe638 100644 --- a/src/main/java/club/joylink/rtss/services/training2/Training2Convertor.java +++ b/src/main/java/club/joylink/rtss/services/training2/Training2Convertor.java @@ -6,8 +6,10 @@ import club.joylink.rtss.entity.training2.PublishedTraining2; import club.joylink.rtss.entity.training2.PublishedTraining2WithBLOBs; import club.joylink.rtss.vo.training2.draft.DraftTraining2InfoVo; import club.joylink.rtss.vo.training2.publish.PublishedTraining2InfoRspVo; +import com.google.common.collect.Lists; import java.time.LocalDateTime; +import java.util.List; public class Training2Convertor { public static DraftTraining2InfoVo convertFrom(DraftTraining2 dt){ @@ -52,6 +54,13 @@ public class Training2Convertor { // return pub; } + + public static List convertFrom(List froms){ + List list = Lists.newArrayList(); + froms.forEach(d->list.add(convertFrom(d))); + return list; + } + public static PublishedTraining2InfoRspVo convertFrom(PublishedTraining2 from){ PublishedTraining2InfoRspVo rsp = new PublishedTraining2InfoRspVo(); rsp.setCreateTime(from.getCreateTime()); diff --git a/src/main/java/club/joylink/rtss/services/training2/Training2DraftPublishService.java b/src/main/java/club/joylink/rtss/services/training2/Training2DraftPublishService.java index 76293afc4..ff73e3421 100644 --- a/src/main/java/club/joylink/rtss/services/training2/Training2DraftPublishService.java +++ b/src/main/java/club/joylink/rtss/services/training2/Training2DraftPublishService.java @@ -29,7 +29,7 @@ public class Training2DraftPublishService { * 草稿发布 */ @Transactional(rollbackFor = Exception.class) - public void draftPublish(TrainingDraftPublishReqVo req, Long userId) { + public void draftPublish(TrainingDraftPublishReqVo req, Long userId,Long orgId) { Long draftId = Long.valueOf(req.getDraftId()); DraftTraining2Example dtExample = new DraftTraining2Example(); dtExample.createCriteria().andCreatorIdEqualTo(userId).andIdEqualTo(draftId); @@ -48,6 +48,7 @@ public class Training2DraftPublishService { PublishedTraining2Example ptExample = new PublishedTraining2Example(); ptExample.createCriteria().andNameEqualTo(pub.getName()).andMapIdEqualTo(pub.getMapId()); List ptFinds = this.publishedDao.selectByExample(ptExample); + pub.setOrgId(orgId); // if(null==ptFinds||ptFinds.isEmpty()){//同地图同名已发布实训不存在则直接存入 //发布 diff --git a/src/main/java/club/joylink/rtss/services/training2/Training2PublishService.java b/src/main/java/club/joylink/rtss/services/training2/Training2PublishService.java index 267657664..d78db2e46 100644 --- a/src/main/java/club/joylink/rtss/services/training2/Training2PublishService.java +++ b/src/main/java/club/joylink/rtss/services/training2/Training2PublishService.java @@ -6,15 +6,19 @@ import club.joylink.rtss.entity.training2.PublishedTraining2Example; import club.joylink.rtss.entity.training2.PublishedTraining2WithBLOBs; import club.joylink.rtss.vo.client.PageVO; import club.joylink.rtss.vo.training2.publish.*; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** * 已发布实训管理业务实现 @@ -38,12 +42,45 @@ public class Training2PublishService { */ @Transactional(readOnly = true) public PageVO publishedTrainingsPage(PublishedTraining2InfoPageReqVo req){ - PageVO page = new PageVO<>(); + + PageHelper.startPage(req.getPageNum(),req.getPageSize()); PublishedTraining2Example example = new PublishedTraining2Example(); PublishedTraining2Example.Criteria c =example.createCriteria(); - if(null!=req.getState()){ + if(Objects.nonNull(req.getState())){ c.andStateEqualTo(req.getState()); } + if(Objects.nonNull(req.getOrgId())){ + c.andOrgIdEqualTo(req.getOrgId()); + } + if(Objects.nonNull(req.getMapId())){ + c.andMapIdEqualTo(req.getMapId()); + } + if(Objects.nonNull(req.getType())){ + c.andTypeEqualTo(req.getType()); + } + if(StringUtils.hasText(req.getName())){ + c.andNameLike(String.format("%%%s%%",req.getName())); + } + if(Objects.equals(false,CollectionUtils.isEmpty(req.getLabelLikes()))){ + for (String ll : req.getLabelLikes()) { + c.andLabelJsonLike(String.format("%%%s%%",ll)); + } + } + String orderBy="create_time"; + switch(req.getOrderBy()){ +// case 1:orderBy="create_time";break; + case 2:orderBy="update_time";break; + case 3:orderBy="name";break; + case 4:orderBy="state";break; + } + if(req.getDesc()){ + example.setOrderByClause(String.format(" %s desc",orderBy)); + } + Page page = (Page)this.publishedDao.selectByExample(example); + List tmpList = Training2Convertor.convertFrom(page.getResult()); + + return PageVO.convert(page,tmpList); + /* PageVO page = new PageVO<>(); long sum = this.publishedDao.countByExample(example); page.setTotal(sum); page.setPageNum(req.getPageNum()); @@ -75,7 +112,7 @@ public class Training2PublishService { } } // - return page; + return page;*/ } /** * 已发布实训上架 diff --git a/src/main/java/club/joylink/rtss/vo/training2/publish/PublishedTraining2InfoPageReqVo.java b/src/main/java/club/joylink/rtss/vo/training2/publish/PublishedTraining2InfoPageReqVo.java index 711d206f6..58d2f9c1b 100644 --- a/src/main/java/club/joylink/rtss/vo/training2/publish/PublishedTraining2InfoPageReqVo.java +++ b/src/main/java/club/joylink/rtss/vo/training2/publish/PublishedTraining2InfoPageReqVo.java @@ -5,6 +5,8 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import java.util.List; + /** * 分页获取实训基础信息的请求 */ @@ -34,4 +36,23 @@ public class PublishedTraining2InfoPageReqVo extends PageQueryVO { */ private Boolean desc = true; + /** + * 实训名称 + */ + private String name; + /** + * 对应的组织id + */ + private Long orgId; + /** + * 地图id + */ + private Long mapId; + + /** + * 实训类型 (单操 single;场景scene) + */ + private String type; + + private List labelLikes; } diff --git a/src/main/resources/mybatis/mapper/PublishedTraining2DAO.xml b/src/main/resources/mybatis/mapper/PublishedTraining2DAO.xml index 09de29108..7a86a752e 100644 --- a/src/main/resources/mybatis/mapper/PublishedTraining2DAO.xml +++ b/src/main/resources/mybatis/mapper/PublishedTraining2DAO.xml @@ -1,530 +1,541 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + - - - - id, `name`, map_id, description, `type`, label_json, map_location_json, run_plan_id, - failure_condition_json, creator_id, create_time, update_time, `state` - - - bg_scene_json, opera_json, step_json, scoring_rule_json, member_json, player_id_json, - final_scenes_json - - - - - - delete from published_training2 - where id = #{id,jdbcType=BIGINT} - - - delete from published_training2 - - - - - - insert into 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`, bg_scene_json, opera_json, - step_json, scoring_rule_json, member_json, - player_id_json, final_scenes_json) - values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{mapId,jdbcType=BIGINT}, - #{description,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{labelJson,jdbcType=VARCHAR}, - #{mapLocationJson,jdbcType=VARCHAR}, #{runPlanId,jdbcType=BIGINT}, #{failureConditionJson,jdbcType=VARCHAR}, - #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, - #{state,jdbcType=INTEGER}, #{bgSceneJson,jdbcType=LONGVARCHAR}, #{operaJson,jdbcType=LONGVARCHAR}, - #{stepJson,jdbcType=LONGVARCHAR}, #{scoringRuleJson,jdbcType=LONGVARCHAR}, #{memberJson,jdbcType=LONGVARCHAR}, - #{playerIdJson,jdbcType=LONGVARCHAR}, #{finalScenesJson,jdbcType=LONGVARCHAR}) - - - insert into 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`, - - - bg_scene_json, - - - opera_json, - - - step_json, - - - scoring_rule_json, - - - member_json, - - - player_id_json, - - - final_scenes_json, - - - - - #{id,jdbcType=BIGINT}, - - - #{name,jdbcType=VARCHAR}, - - - #{mapId,jdbcType=BIGINT}, - - - #{description,jdbcType=VARCHAR}, - - - #{type,jdbcType=VARCHAR}, - - - #{labelJson,jdbcType=VARCHAR}, - - - #{mapLocationJson,jdbcType=VARCHAR}, - - - #{runPlanId,jdbcType=BIGINT}, - - - #{failureConditionJson,jdbcType=VARCHAR}, - - - #{creatorId,jdbcType=BIGINT}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{updateTime,jdbcType=TIMESTAMP}, - - - #{state,jdbcType=INTEGER}, - - - #{bgSceneJson,jdbcType=LONGVARCHAR}, - - - #{operaJson,jdbcType=LONGVARCHAR}, - - - #{stepJson,jdbcType=LONGVARCHAR}, - - - #{scoringRuleJson,jdbcType=LONGVARCHAR}, - - - #{memberJson,jdbcType=LONGVARCHAR}, - - - #{playerIdJson,jdbcType=LONGVARCHAR}, - - - #{finalScenesJson,jdbcType=LONGVARCHAR}, - - - - - - update published_training2 - - - id = #{record.id,jdbcType=BIGINT}, - - - `name` = #{record.name,jdbcType=VARCHAR}, - - - map_id = #{record.mapId,jdbcType=BIGINT}, - - - description = #{record.description,jdbcType=VARCHAR}, - - - `type` = #{record.type,jdbcType=VARCHAR}, - - - label_json = #{record.labelJson,jdbcType=VARCHAR}, - - - map_location_json = #{record.mapLocationJson,jdbcType=VARCHAR}, - - - run_plan_id = #{record.runPlanId,jdbcType=BIGINT}, - - - failure_condition_json = #{record.failureConditionJson,jdbcType=VARCHAR}, - - - creator_id = #{record.creatorId,jdbcType=BIGINT}, - - - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - - - update_time = #{record.updateTime,jdbcType=TIMESTAMP}, - - - `state` = #{record.state,jdbcType=INTEGER}, - - - bg_scene_json = #{record.bgSceneJson,jdbcType=LONGVARCHAR}, - - - opera_json = #{record.operaJson,jdbcType=LONGVARCHAR}, - - - step_json = #{record.stepJson,jdbcType=LONGVARCHAR}, - - - scoring_rule_json = #{record.scoringRuleJson,jdbcType=LONGVARCHAR}, - - - member_json = #{record.memberJson,jdbcType=LONGVARCHAR}, - - - player_id_json = #{record.playerIdJson,jdbcType=LONGVARCHAR}, - - - final_scenes_json = #{record.finalScenesJson,jdbcType=LONGVARCHAR}, - - - - - - - - update published_training2 - set id = #{record.id,jdbcType=BIGINT}, + + + + + 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, + final_scenes_json + + + + + + delete from published_training2 + where id = #{id,jdbcType=BIGINT} + + + delete from published_training2 + + + + + + insert into 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, final_scenes_json + ) + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{mapId,jdbcType=BIGINT}, + #{description,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{labelJson,jdbcType=VARCHAR}, + #{mapLocationJson,jdbcType=VARCHAR}, #{runPlanId,jdbcType=BIGINT}, #{failureConditionJson,jdbcType=VARCHAR}, + #{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}, #{finalScenesJson,jdbcType=LONGVARCHAR} + ) + + + insert into 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, + + + final_scenes_json, + + + + + #{id,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{mapId,jdbcType=BIGINT}, + + + #{description,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{labelJson,jdbcType=VARCHAR}, + + + #{mapLocationJson,jdbcType=VARCHAR}, + + + #{runPlanId,jdbcType=BIGINT}, + + + #{failureConditionJson,jdbcType=VARCHAR}, + + + #{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}, + + + #{finalScenesJson,jdbcType=LONGVARCHAR}, + + + + + + update published_training2 + + + id = #{record.id,jdbcType=BIGINT}, + + `name` = #{record.name,jdbcType=VARCHAR}, + + map_id = #{record.mapId,jdbcType=BIGINT}, + + description = #{record.description,jdbcType=VARCHAR}, + + `type` = #{record.type,jdbcType=VARCHAR}, + + label_json = #{record.labelJson,jdbcType=VARCHAR}, + + map_location_json = #{record.mapLocationJson,jdbcType=VARCHAR}, + + run_plan_id = #{record.runPlanId,jdbcType=BIGINT}, + + failure_condition_json = #{record.failureConditionJson,jdbcType=VARCHAR}, + + creator_id = #{record.creatorId,jdbcType=BIGINT}, + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + `state` = #{record.state,jdbcType=INTEGER}, + + + org_id = #{record.orgId,jdbcType=BIGINT}, + + bg_scene_json = #{record.bgSceneJson,jdbcType=LONGVARCHAR}, + + opera_json = #{record.operaJson,jdbcType=LONGVARCHAR}, + + step_json = #{record.stepJson,jdbcType=LONGVARCHAR}, + + scoring_rule_json = #{record.scoringRuleJson,jdbcType=LONGVARCHAR}, + + member_json = #{record.memberJson,jdbcType=LONGVARCHAR}, + + player_id_json = #{record.playerIdJson,jdbcType=LONGVARCHAR}, - final_scenes_json = #{record.finalScenesJson,jdbcType=LONGVARCHAR} - - - - - - update published_training2 - set id = #{record.id,jdbcType=BIGINT}, - `name` = #{record.name,jdbcType=VARCHAR}, - map_id = #{record.mapId,jdbcType=BIGINT}, - description = #{record.description,jdbcType=VARCHAR}, - `type` = #{record.type,jdbcType=VARCHAR}, - label_json = #{record.labelJson,jdbcType=VARCHAR}, - map_location_json = #{record.mapLocationJson,jdbcType=VARCHAR}, - run_plan_id = #{record.runPlanId,jdbcType=BIGINT}, - failure_condition_json = #{record.failureConditionJson,jdbcType=VARCHAR}, - creator_id = #{record.creatorId,jdbcType=BIGINT}, - create_time = #{record.createTime,jdbcType=TIMESTAMP}, - update_time = #{record.updateTime,jdbcType=TIMESTAMP}, - `state` = #{record.state,jdbcType=INTEGER} - - - - - - update published_training2 - - - `name` = #{name,jdbcType=VARCHAR}, - - - map_id = #{mapId,jdbcType=BIGINT}, - - - description = #{description,jdbcType=VARCHAR}, - - - `type` = #{type,jdbcType=VARCHAR}, - - - label_json = #{labelJson,jdbcType=VARCHAR}, - - - map_location_json = #{mapLocationJson,jdbcType=VARCHAR}, - - - run_plan_id = #{runPlanId,jdbcType=BIGINT}, - - - failure_condition_json = #{failureConditionJson,jdbcType=VARCHAR}, - - - creator_id = #{creatorId,jdbcType=BIGINT}, - - - create_time = #{createTime,jdbcType=TIMESTAMP}, - - - update_time = #{updateTime,jdbcType=TIMESTAMP}, - - - `state` = #{state,jdbcType=INTEGER}, - - - bg_scene_json = #{bgSceneJson,jdbcType=LONGVARCHAR}, - - - opera_json = #{operaJson,jdbcType=LONGVARCHAR}, - - - step_json = #{stepJson,jdbcType=LONGVARCHAR}, - - - scoring_rule_json = #{scoringRuleJson,jdbcType=LONGVARCHAR}, - - - member_json = #{memberJson,jdbcType=LONGVARCHAR}, - - - player_id_json = #{playerIdJson,jdbcType=LONGVARCHAR}, - - - final_scenes_json = #{finalScenesJson,jdbcType=LONGVARCHAR}, - - - where id = #{id,jdbcType=BIGINT} - - - update published_training2 - set `name` = #{name,jdbcType=VARCHAR}, + + + final_scenes_json = #{record.finalScenesJson,jdbcType=LONGVARCHAR}, + + + + + + + + update published_training2 + set id = #{record.id,jdbcType=BIGINT}, + `name` = #{record.name,jdbcType=VARCHAR}, + map_id = #{record.mapId,jdbcType=BIGINT}, + description = #{record.description,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + label_json = #{record.labelJson,jdbcType=VARCHAR}, + map_location_json = #{record.mapLocationJson,jdbcType=VARCHAR}, + run_plan_id = #{record.runPlanId,jdbcType=BIGINT}, + failure_condition_json = #{record.failureConditionJson,jdbcType=VARCHAR}, + creator_id = #{record.creatorId,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + `state` = #{record.state,jdbcType=INTEGER}, + org_id = #{record.orgId,jdbcType=BIGINT}, + bg_scene_json = #{record.bgSceneJson,jdbcType=LONGVARCHAR}, + opera_json = #{record.operaJson,jdbcType=LONGVARCHAR}, + step_json = #{record.stepJson,jdbcType=LONGVARCHAR}, + scoring_rule_json = #{record.scoringRuleJson,jdbcType=LONGVARCHAR}, + member_json = #{record.memberJson,jdbcType=LONGVARCHAR}, + player_id_json = #{record.playerIdJson,jdbcType=LONGVARCHAR}, + final_scenes_json = #{record.finalScenesJson,jdbcType=LONGVARCHAR} + + + + + + update published_training2 + set id = #{record.id,jdbcType=BIGINT}, + `name` = #{record.name,jdbcType=VARCHAR}, + map_id = #{record.mapId,jdbcType=BIGINT}, + description = #{record.description,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + label_json = #{record.labelJson,jdbcType=VARCHAR}, + map_location_json = #{record.mapLocationJson,jdbcType=VARCHAR}, + run_plan_id = #{record.runPlanId,jdbcType=BIGINT}, + failure_condition_json = #{record.failureConditionJson,jdbcType=VARCHAR}, + creator_id = #{record.creatorId,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + `state` = #{record.state,jdbcType=INTEGER}, + org_id = #{record.orgId,jdbcType=BIGINT} + + + + + + update published_training2 + + + `name` = #{name,jdbcType=VARCHAR}, + + map_id = #{mapId,jdbcType=BIGINT}, + + description = #{description,jdbcType=VARCHAR}, + + `type` = #{type,jdbcType=VARCHAR}, + + label_json = #{labelJson,jdbcType=VARCHAR}, + + map_location_json = #{mapLocationJson,jdbcType=VARCHAR}, + + run_plan_id = #{runPlanId,jdbcType=BIGINT}, + + failure_condition_json = #{failureConditionJson,jdbcType=VARCHAR}, + + creator_id = #{creatorId,jdbcType=BIGINT}, + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + `state` = #{state,jdbcType=INTEGER}, + + + org_id = #{orgId,jdbcType=BIGINT}, + + bg_scene_json = #{bgSceneJson,jdbcType=LONGVARCHAR}, + + opera_json = #{operaJson,jdbcType=LONGVARCHAR}, + + step_json = #{stepJson,jdbcType=LONGVARCHAR}, + + scoring_rule_json = #{scoringRuleJson,jdbcType=LONGVARCHAR}, + + member_json = #{memberJson,jdbcType=LONGVARCHAR}, + + player_id_json = #{playerIdJson,jdbcType=LONGVARCHAR}, - final_scenes_json = #{finalScenesJson,jdbcType=LONGVARCHAR} - where id = #{id,jdbcType=BIGINT} - - - update published_training2 - set `name` = #{name,jdbcType=VARCHAR}, - map_id = #{mapId,jdbcType=BIGINT}, - description = #{description,jdbcType=VARCHAR}, - `type` = #{type,jdbcType=VARCHAR}, - label_json = #{labelJson,jdbcType=VARCHAR}, - map_location_json = #{mapLocationJson,jdbcType=VARCHAR}, - run_plan_id = #{runPlanId,jdbcType=BIGINT}, - failure_condition_json = #{failureConditionJson,jdbcType=VARCHAR}, - creator_id = #{creatorId,jdbcType=BIGINT}, - create_time = #{createTime,jdbcType=TIMESTAMP}, - update_time = #{updateTime,jdbcType=TIMESTAMP}, - `state` = #{state,jdbcType=INTEGER} - where id = #{id,jdbcType=BIGINT} - - \ No newline at end of file + + + final_scenes_json = #{finalScenesJson,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update published_training2 + set `name` = #{name,jdbcType=VARCHAR}, + map_id = #{mapId,jdbcType=BIGINT}, + description = #{description,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR}, + label_json = #{labelJson,jdbcType=VARCHAR}, + map_location_json = #{mapLocationJson,jdbcType=VARCHAR}, + run_plan_id = #{runPlanId,jdbcType=BIGINT}, + failure_condition_json = #{failureConditionJson,jdbcType=VARCHAR}, + creator_id = #{creatorId,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + `state` = #{state,jdbcType=INTEGER}, + org_id = #{orgId,jdbcType=BIGINT}, + bg_scene_json = #{bgSceneJson,jdbcType=LONGVARCHAR}, + opera_json = #{operaJson,jdbcType=LONGVARCHAR}, + step_json = #{stepJson,jdbcType=LONGVARCHAR}, + scoring_rule_json = #{scoringRuleJson,jdbcType=LONGVARCHAR}, + member_json = #{memberJson,jdbcType=LONGVARCHAR}, + player_id_json = #{playerIdJson,jdbcType=LONGVARCHAR}, + final_scenes_json = #{finalScenesJson,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=BIGINT} + + + update published_training2 + set `name` = #{name,jdbcType=VARCHAR}, + map_id = #{mapId,jdbcType=BIGINT}, + description = #{description,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR}, + label_json = #{labelJson,jdbcType=VARCHAR}, + map_location_json = #{mapLocationJson,jdbcType=VARCHAR}, + run_plan_id = #{runPlanId,jdbcType=BIGINT}, + failure_condition_json = #{failureConditionJson,jdbcType=VARCHAR}, + creator_id = #{creatorId,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + `state` = #{state,jdbcType=INTEGER}, + org_id = #{orgId,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + +