|
|
@ -6,6 +6,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.ruoyi.flyingbook.domain.ErpLarkRelation" id="ErpLarkRelationResult">
|
|
|
|
<resultMap type="com.ruoyi.flyingbook.domain.ErpLarkRelation" id="ErpLarkRelationResult">
|
|
|
|
<result property="id" column="id"/>
|
|
|
|
<result property="id" column="id"/>
|
|
|
|
|
|
|
|
<result property="cjtId" column="cjt_id"/>
|
|
|
|
|
|
|
|
<result property="larkTable" column="lark_table"/>
|
|
|
|
<result property="key" column="key"/>
|
|
|
|
<result property="key" column="key"/>
|
|
|
|
<result property="method" column="method"/>
|
|
|
|
<result property="method" column="method"/>
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
@ -18,7 +20,7 @@
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectErpLarkRelationVo">
|
|
|
|
<sql id="selectErpLarkRelationVo">
|
|
|
|
select id, key, method, create_by, create_time, update_by, update_time, flag, remark, lark_key
|
|
|
|
select id,cjt_id, `key`,lark_table, `method`, create_by, create_time, update_by, update_time, flag, remark, lark_key
|
|
|
|
from erp_lark_relation_main
|
|
|
|
from erp_lark_relation_main
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
@ -26,10 +28,13 @@
|
|
|
|
resultMap="ErpLarkRelationResult">
|
|
|
|
resultMap="ErpLarkRelationResult">
|
|
|
|
<include refid="selectErpLarkRelationVo"/>
|
|
|
|
<include refid="selectErpLarkRelationVo"/>
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="key != null and key != ''">and key = #{key}</if>
|
|
|
|
<if test="cjtId != null and cjtId != ''">and cjt_id = #{cjtId}</if>
|
|
|
|
<if test="method != null and method != ''">and method = #{method}</if>
|
|
|
|
<if test="larkTable != null and larkTable != ''">and lark_table = #{larkTable}</if>
|
|
|
|
|
|
|
|
<if test="key != null and key != ''">and `key` = #{key}</if>
|
|
|
|
|
|
|
|
<if test="method != null and method != ''">and `method` = #{method}</if>
|
|
|
|
<if test="larkKey != null and larkKey != ''">and lark_key = #{larkKey}</if>
|
|
|
|
<if test="larkKey != null and larkKey != ''">and lark_key = #{larkKey}</if>
|
|
|
|
<if test="flag != null ">and flag = #{flag}</if>
|
|
|
|
<if test="flag != null ">and flag = #{flag}</if>
|
|
|
|
|
|
|
|
<if test="remark != null ">and remark = #{remark}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
@ -49,7 +54,7 @@
|
|
|
|
<select id="queryListByKeyListAndRemark" resultMap="ErpLarkRelationResult">
|
|
|
|
<select id="queryListByKeyListAndRemark" resultMap="ErpLarkRelationResult">
|
|
|
|
select `key`, `method`,lark_key
|
|
|
|
select `key`, `method`,lark_key
|
|
|
|
from erp_lark_relation_main
|
|
|
|
from erp_lark_relation_main
|
|
|
|
where `method` = #{method} and remark = #{remark} and `key` in
|
|
|
|
where `method` = #{method} and lark_table = #{tableId} and remark = #{remark} and `key` in
|
|
|
|
<foreach collection="keyList" open="(" separator="," close=")" item="item">
|
|
|
|
<foreach collection="keyList" open="(" separator="," close=")" item="item">
|
|
|
|
#{item}
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
@ -74,15 +79,17 @@
|
|
|
|
select id, `key`, `method`, lark_key
|
|
|
|
select id, `key`, `method`, lark_key
|
|
|
|
from erp_lark_relation_main
|
|
|
|
from erp_lark_relation_main
|
|
|
|
where `method` = #{method}
|
|
|
|
where `method` = #{method}
|
|
|
|
and `key` like CONCAT('%', #{key}, '%')
|
|
|
|
and `key` = #{key}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertErpLarkRelation" parameterType="com.ruoyi.flyingbook.domain.ErpLarkRelation"
|
|
|
|
<insert id="insertErpLarkRelation" parameterType="com.ruoyi.flyingbook.domain.ErpLarkRelation"
|
|
|
|
useGeneratedKeys="true" keyProperty="id">
|
|
|
|
useGeneratedKeys="true" keyProperty="id">
|
|
|
|
insert into erp_lark_relation_main
|
|
|
|
insert into erp_lark_relation_main
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="key != null">key,</if>
|
|
|
|
<if test="cjtId != null and cjtId != ''">cjt_id,</if>
|
|
|
|
<if test="method != null">method,</if>
|
|
|
|
<if test="larkTable != null and larkTable != ''">cjt_id,</if>
|
|
|
|
|
|
|
|
<if test="key != null">`key`,</if>
|
|
|
|
|
|
|
|
<if test="method != null">`method`,</if>
|
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
@ -92,6 +99,8 @@
|
|
|
|
<if test="larkKey != null">lark_key,</if>
|
|
|
|
<if test="larkKey != null">lark_key,</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="cjtId != null and cjtId != ''">#{cjtId},</if>
|
|
|
|
|
|
|
|
<if test="larkTable != null and larkTable != ''">#{larkTable},</if>
|
|
|
|
<if test="key != null">#{key},</if>
|
|
|
|
<if test="key != null">#{key},</if>
|
|
|
|
<if test="method != null">#{method},</if>
|
|
|
|
<if test="method != null">#{method},</if>
|
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
@ -105,11 +114,13 @@
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
<insert id="batchInsert" parameterType="com.ruoyi.flyingbook.domain.ErpLarkRelation" useGeneratedKeys="true"
|
|
|
|
<insert id="batchInsert" parameterType="com.ruoyi.flyingbook.domain.ErpLarkRelation" useGeneratedKeys="true"
|
|
|
|
keyProperty="id">
|
|
|
|
keyProperty="id">
|
|
|
|
insert into erp_lark_relation_main(`key`,`method`,create_by,create_time,flag,lark_key,remark,update_time)
|
|
|
|
insert into erp_lark_relation_main(cjt_id,lark_table,`key`,`method`,create_by,create_time,flag,lark_key,remark,update_time)
|
|
|
|
values
|
|
|
|
values
|
|
|
|
<foreach collection="erpLarkRelationList" item="relation" separator=",">
|
|
|
|
<foreach collection="erpLarkRelationList" item="relation" separator=",">
|
|
|
|
(
|
|
|
|
(
|
|
|
|
#{relation.key}
|
|
|
|
#{relation.cjtId}
|
|
|
|
|
|
|
|
,#{relation.larkTable}
|
|
|
|
|
|
|
|
,#{relation.key}
|
|
|
|
,#{relation.method}
|
|
|
|
,#{relation.method}
|
|
|
|
,#{relation.createBy}
|
|
|
|
,#{relation.createBy}
|
|
|
|
,#{relation.createTime}
|
|
|
|
,#{relation.createTime}
|
|
|
@ -124,6 +135,8 @@
|
|
|
|
<update id="updateErpLarkRelation" parameterType="com.ruoyi.flyingbook.domain.ErpLarkRelation">
|
|
|
|
<update id="updateErpLarkRelation" parameterType="com.ruoyi.flyingbook.domain.ErpLarkRelation">
|
|
|
|
update erp_lark_relation_main
|
|
|
|
update erp_lark_relation_main
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="cjtId != null and cjtId != ''">cjt_id = #{cjtId},</if>
|
|
|
|
|
|
|
|
<if test="larkTable != null and larkTable != ''">lark_table = #{larkTable},</if>
|
|
|
|
<if test="key != null">key = #{key},</if>
|
|
|
|
<if test="key != null">key = #{key},</if>
|
|
|
|
<if test="method != null">method = #{method},</if>
|
|
|
|
<if test="method != null">method = #{method},</if>
|
|
|
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
|
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
|
|