From 92edf51b040f057afa1fece88e0fbcd559baa27f Mon Sep 17 00:00:00 2001
From: songhuangfeng123 <shf18767906695@163.com>
Date: Tue, 05 Jul 2022 11:32:49 +0800
Subject: [PATCH] 初始化运行
---
emergency/emergency-service/src/main/resource/config/mapper/emergency/EmergencyTeamInfoMapper.xml | 36 ++++++++++++++++++++++++++++++++++--
1 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/emergency/emergency-service/src/main/resource/config/mapper/emergency/EmergencyTeamInfoMapper.xml b/emergency/emergency-service/src/main/resource/config/mapper/emergency/EmergencyTeamInfoMapper.xml
index e3ce3c2..13c15bc 100644
--- a/emergency/emergency-service/src/main/resource/config/mapper/emergency/EmergencyTeamInfoMapper.xml
+++ b/emergency/emergency-service/src/main/resource/config/mapper/emergency/EmergencyTeamInfoMapper.xml
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gkhy.safePlatform.emergency.repository.EmergencyTeamInfoRepository">
- <resultMap type="com.gkhy.safePlatform.emergency.entity.EmergencyTeamInfoPageDO" id="pageResult">
+ <resultMap type="com.gkhy.safePlatform.emergency.entity.EmergencyTeamInfoPageDO" id="emergencyTeamInfoPageResult">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="team_level" property="teamLevel" />
<result column="team_name" property="teamName" />
@@ -12,10 +12,42 @@
<result column="team_desc" property="teamDesc" />
</resultMap>
- <select id="selectEmergencyTeamList" resultMap="pageResult">
+ <select id="selectEmergencyTeamList" resultMap="emergencyTeamInfoPageResult">
select id,`team_level`,`team_name`,`principal_phone`,`team_desc` from emergency_team where del_flag = 0
<if test="query.teamName != null and query.teamName != ''"> and `team_name` like concat('%', #{query.teamName}, '%')</if>
<if test="query.teamLevel != null and query.teamLevel != ''"> and `team_level` = #{query.teamLevel}</if>
</select>
+ <insert id="addEmergencyTeam" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyTeamInfo">
+ insert into emergency_team(
+ <if test="id != null ">id,</if>
+ <if test="delFlag != null ">del_flag,</if>
+ <if test="gmtCreate != null and gmtCreate != ''">gmt_create,</if>
+ <if test="gmtModitify != null and gmtModitify != ''">gmt_moditify,</if>
+ <if test="createUid != null ">create_uid,</if>
+ <if test="updateUid != null ">update_uid,</if>
+ <if test="principalUid != null ">principal_uid,</if>
+ <if test="principalDepartmentId != null ">principal_department_id,</if>
+ <if test="teamLevel != null and teamLevel != ''">team_level,</if>
+ <if test="teamName != null and teamName != ''">team_name,</if>
+ <if test="principalPhone != null and principalPhone != ''">principal_phone,</if>
+ <if test="telephoneNumber != null and telephoneNumber != ''">telephone_number,</if>
+ <if test="teamDesc != null and teamDesc != ''">team_desc,</if>
+ )values(
+ <if test="id != null ">#{id},</if>
+ <if test="delFlag != null ">#{delFlag},</if>
+ <if test="gmtCreate != null and gmtCreate != ''">#{gmtCreate},</if>
+ <if test="gmtModitify != null and gmtModitify != ''">#{gmtModitify},</if>
+ <if test="createUid != null ">#{createUid},</if>
+ <if test="updateUid != null ">#{updateUid},</if>
+ <if test="principalUid != null ">#{principalUid},</if>
+ <if test="principalDepartmentId != null ">#{principalDepartmentId},</if>
+ <if test="teamLevel != null and teamLevel != ''">#{teamLevel},</if>
+ <if test="teamName != null and teamName != ''">#{teamName},</if>
+ <if test="principalPhone != null and principalPhone != ''">#{principalPhone},</if>
+ <if test="telephoneNumber != null and telephoneNumber != ''">#{telephoneNumber},</if>
+ <if test="teamDesc != null and teamDesc != ''">#{teamDesc},</if>
+ )
+ </insert>
+
</mapper>
--
Gitblit v1.9.2