|
@@ -27,6 +27,18 @@
|
|
|
<result column="op_db_user" property="opDbUser"/>
|
|
<result column="op_db_user" property="opDbUser"/>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap id="BaseResultMapResponse" type="com.dk.mdm.model.response.mst.SaleChannelResponse">
|
|
|
|
|
+ <id column="channel_id" property="channelId"/>
|
|
|
|
|
+ <result column="channel_code" property="channelCode"/>
|
|
|
|
|
+ <result column="channel_name" property="channelName"/>
|
|
|
|
|
+ <result column="sys_code" property="sysCode"/>
|
|
|
|
|
+ <result column="display_no" property="displayNo"/>
|
|
|
|
|
+ <result column="remarks" property="remarks"/>
|
|
|
|
|
+ <result column="flg_valid" property="flgValid"/>
|
|
|
|
|
+ <result column="cp_id" property="cpId"/>
|
|
|
|
|
+
|
|
|
|
|
+ </resultMap>
|
|
|
<!-- 通用条件列 -->
|
|
<!-- 通用条件列 -->
|
|
|
<sql id="Condition">
|
|
<sql id="Condition">
|
|
|
<where>
|
|
<where>
|
|
@@ -84,10 +96,10 @@
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
<!-- 查询表t_mst_sale_channel,(条件查询+分页)列表 -->
|
|
<!-- 查询表t_mst_sale_channel,(条件查询+分页)列表 -->
|
|
|
- <select id="selectByCond" resultMap="BaseResultMap">
|
|
|
|
|
|
|
+ <select id="selectByCond" resultMap="BaseResultMapResponse">
|
|
|
SELECT
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM t_mst_sale_channel
|
|
|
|
|
|
|
+ FROM dkic_b.t_mst_sale_channel
|
|
|
<include refid="Condition"/>
|
|
<include refid="Condition"/>
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
limit #{end} offset #{start}
|
|
limit #{end} offset #{start}
|
|
@@ -98,7 +110,7 @@
|
|
|
<select id="countByCond" resultType="Long">
|
|
<select id="countByCond" resultType="Long">
|
|
|
SELECT
|
|
SELECT
|
|
|
count(1)
|
|
count(1)
|
|
|
- FROM t_mst_sale_channel
|
|
|
|
|
|
|
+ FROM dkic_b.t_mst_sale_channel
|
|
|
<include refid="Condition"/>
|
|
<include refid="Condition"/>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
@@ -106,7 +118,7 @@
|
|
|
<select id="selectById" resultMap="BaseResultMap">
|
|
<select id="selectById" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM t_mst_sale_channel
|
|
|
|
|
|
|
+ FROM dkic_b.t_mst_sale_channel
|
|
|
WHERE channel_id = #{channelId}::uuid
|
|
WHERE channel_id = #{channelId}::uuid
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
@@ -114,7 +126,7 @@
|
|
|
<select id="selectByIdForUpdate" resultMap="BaseResultMap">
|
|
<select id="selectByIdForUpdate" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM t_mst_sale_channel
|
|
|
|
|
|
|
+ FROM dkic_b.t_mst_sale_channel
|
|
|
WHERE channel_id = #{channelId}
|
|
WHERE channel_id = #{channelId}
|
|
|
for update
|
|
for update
|
|
|
</select>
|
|
</select>
|
|
@@ -123,13 +135,13 @@
|
|
|
<select id="selectByIdsForUpdate" resultMap="BaseResultMap">
|
|
<select id="selectByIdsForUpdate" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
<include refid="Base_Column_List"/>
|
|
|
- FROM t_mst_sale_channel
|
|
|
|
|
|
|
+ FROM dkic_b.t_mst_sale_channel
|
|
|
<include refid="idsForeach"/>
|
|
<include refid="idsForeach"/>
|
|
|
for update
|
|
for update
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<insert id="insertBatch">
|
|
<insert id="insertBatch">
|
|
|
- insert into t_mst_sale_channel
|
|
|
|
|
|
|
+ insert into dkic_b.t_mst_sale_channel
|
|
|
(
|
|
(
|
|
|
<trim suffixOverrides=",">
|
|
<trim suffixOverrides=",">
|
|
|
channel_code,
|
|
channel_code,
|
|
@@ -156,4 +168,9 @@
|
|
|
)
|
|
)
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectDisplayNo" resultType="Integer">
|
|
|
|
|
+ SELECT MAX(display_no) + 1 FROM dkic_b.t_mst_sale_channel
|
|
|
|
|
+ <include refid="Condition"/>
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|