mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-01-19 09:21:00 +08:00
first commit
This commit is contained in:
53
chat/knowledge/src/main/resources/mapper/DictConfMapper.xml
Normal file
53
chat/knowledge/src/main/resources/mapper/DictConfMapper.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.tencent.supersonic.knowledge.infrastructure.custom.DictConfMapper">
|
||||
|
||||
<resultMap id="DictConfPO"
|
||||
type="com.tencent.supersonic.knowledge.domain.dataobject.DictConfPO">
|
||||
<id column="id" property="id"/>
|
||||
<result column="domain_id" property="domainId"/>
|
||||
<result column="dim_value_infos" property="dimValueInfos"/>
|
||||
<result column="created_at" property="createdAt"/>
|
||||
<result column="updated_at" property="updatedAt"/>
|
||||
<result column="created_by" property="createdBy"/>
|
||||
<result column="updated_by" property="updatedBy"/>
|
||||
</resultMap>
|
||||
|
||||
<insert id="createDictConf">
|
||||
insert into s2_dictionary
|
||||
(`domain_id`, dim_value_infos, created_at, updated_at, created_by, updated_by)
|
||||
values
|
||||
(#{domainId}, #{dimValueInfos}, #{createdAt}, #{updatedAt}, #{createdBy}, #{updatedBy})
|
||||
</insert>
|
||||
|
||||
<insert id="upsertDictInfo">
|
||||
insert into s2_dictionary
|
||||
(`domain_id`, dim_value_infos, created_at, updated_at, created_by, updated_by)
|
||||
values
|
||||
(#{domainId}, #{dimValueInfos}, #{createdAt}, #{updatedAt}, #{createdBy}, #{updatedBy})
|
||||
on duplicate key update
|
||||
dim_value_infos = #{dimValueInfos},
|
||||
updated_at = #{updatedAt},
|
||||
updated_by = #{updatedBy}
|
||||
</insert>
|
||||
|
||||
<update id="editDictConf">
|
||||
update s2_dictionary
|
||||
set dim_value_infos = #{dimValueInfos},
|
||||
updated_at = #{updatedAt},
|
||||
updated_by = #{updatedBy}
|
||||
where domain_id = #{domainId}
|
||||
and status = 0
|
||||
</update>
|
||||
|
||||
<select id="getDictInfoByDomainId" resultMap="DictConfPO">
|
||||
select *
|
||||
from s2_dictionary
|
||||
where domain_id = #{domainId}
|
||||
and status = 0
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user