28 lines
1.5 KiB
XML
28 lines
1.5 KiB
XML
|
|
<?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.yunzhupaas.base.mapper.PcmContractMapper">
|
||
|
|
<insert id="addPcmDocument">
|
||
|
|
insert into pcm_document (document_id,file_size,file_name,file_ext_name,local_path)
|
||
|
|
values (#{fileId},#{fileSize},#{name},#{fileExtension},#{url})
|
||
|
|
</insert>
|
||
|
|
<insert id="addPcmBusinessDocument">
|
||
|
|
insert into pcm_business_document (table_name,business_object_id,document_id)
|
||
|
|
values (#{tableName},#{businessObjectId},#{documentId})
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
|
||
|
|
<delete id="deleteByBusinessObjectId">
|
||
|
|
delete from pcm_business_document where business_object_id=#{businessObjectId} and table_name =#{tableName}
|
||
|
|
</delete>
|
||
|
|
<select id="selectByIdAndTableName" resultType="com.yunzhupaas.base.model.pcmcontract.PcmDocument">
|
||
|
|
select document.document_id fileId,document.file_size fileSize,document.
|
||
|
|
file_name 'name',document.file_ext_name fileExtension,document.local_path url
|
||
|
|
from pcm_business_document business
|
||
|
|
left join pcm_document document on business.document_id=document.document_id
|
||
|
|
where business.table_name=#{tableName} and business.business_object_id=#{id}
|
||
|
|
</select>
|
||
|
|
<select id="selectByFEnCode" resultType="java.lang.String">
|
||
|
|
select f_full_name from base_dictionary_data where f_en_code=#{resourcesName} and f_dictionary_type_id='808608974935952773'
|
||
|
|
</select>
|
||
|
|
</mapper>
|