123 lines
6.0 KiB
XML
123 lines
6.0 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.bms.price.mapper.PrcPriceExcelFileMapper">
|
|
|
|
<resultMap type="PrcPriceExcelFile" id="PrcPriceExcelFileResult">
|
|
<id property="pefId" column="pef_id" />
|
|
<result property="excelType" column="excel_type" />
|
|
<result property="psvId" column="psv_id" />
|
|
<result property="effectiveTime" column="effective_time" />
|
|
<result property="fileName" column="file_name" />
|
|
<result property="filePath" column="file_path" />
|
|
<result property="fileSize" column="file_size" />
|
|
<result property="contentType" column="content_type" />
|
|
<result property="fileExtension" column="file_extension" />
|
|
<result property="ossId" column="oss_id" />
|
|
<result property="sheetNames" column="sheet_names" />
|
|
<result property="remark" column="remark" />
|
|
<result property="createBy" column="created_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="updated_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
</resultMap>
|
|
|
|
<sql id="selectPrcPriceExcelFileVo">
|
|
select pef_id, excel_type, psv_id, effective_time, file_name, file_path, file_size, content_type,
|
|
file_extension, oss_id, sheet_names, remark, created_by, create_time, updated_by, update_time
|
|
from prc_price_excel_file
|
|
</sql>
|
|
|
|
<select id="selectPrcPriceExcelFileById" parameterType="Long" resultMap="PrcPriceExcelFileResult">
|
|
<include refid="selectPrcPriceExcelFileVo"/>
|
|
where pef_id = #{pefId}
|
|
</select>
|
|
|
|
<select id="selectPrcPriceExcelFileList" parameterType="PrcPriceExcelFile" resultMap="PrcPriceExcelFileResult">
|
|
<include refid="selectPrcPriceExcelFileVo"/>
|
|
<where>
|
|
<if test="excelType != null and excelType != ''">
|
|
AND excel_type = #{excelType}
|
|
</if>
|
|
<if test="psvId != null">
|
|
AND psv_id = #{psvId}
|
|
</if>
|
|
<if test="fileName != null and fileName != ''">
|
|
AND file_name like concat('%', #{fileName}, '%')
|
|
</if>
|
|
</where>
|
|
order by pef_id desc
|
|
</select>
|
|
|
|
<select id="selectByPsvId" resultMap="PrcPriceExcelFileResult">
|
|
<include refid="selectPrcPriceExcelFileVo"/>
|
|
where psv_id = #{psvId}
|
|
order by effective_time desc, pef_id desc
|
|
</select>
|
|
|
|
<insert id="insertPrcPriceExcelFile" parameterType="PrcPriceExcelFile" useGeneratedKeys="true" keyProperty="pefId">
|
|
insert into prc_price_excel_file (
|
|
<if test="excelType != null and excelType != ''">excel_type,</if>
|
|
<if test="psvId != null">psv_id,</if>
|
|
<if test="effectiveTime != null">effective_time,</if>
|
|
<if test="fileName != null and fileName != ''">file_name,</if>
|
|
<if test="filePath != null and filePath != ''">file_path,</if>
|
|
<if test="fileSize != null">file_size,</if>
|
|
<if test="contentType != null">content_type,</if>
|
|
<if test="fileExtension != null">file_extension,</if>
|
|
<if test="ossId != null">oss_id,</if>
|
|
<if test="sheetNames != null">sheet_names,</if>
|
|
<if test="remark != null">remark,</if>
|
|
<if test="createBy != null and createBy != ''">created_by,</if>
|
|
create_time
|
|
) values (
|
|
<if test="excelType != null and excelType != ''">#{excelType},</if>
|
|
<if test="psvId != null">#{psvId},</if>
|
|
<if test="effectiveTime != null">#{effectiveTime},</if>
|
|
<if test="fileName != null and fileName != ''">#{fileName},</if>
|
|
<if test="filePath != null and filePath != ''">#{filePath},</if>
|
|
<if test="fileSize != null">#{fileSize},</if>
|
|
<if test="contentType != null">#{contentType},</if>
|
|
<if test="fileExtension != null">#{fileExtension},</if>
|
|
<if test="ossId != null">#{ossId},</if>
|
|
<if test="sheetNames != null">#{sheetNames},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
sysdate()
|
|
)
|
|
</insert>
|
|
|
|
<update id="updatePrcPriceExcelFile" parameterType="PrcPriceExcelFile">
|
|
update prc_price_excel_file
|
|
<set>
|
|
<if test="excelType != null and excelType != ''">excel_type = #{excelType},</if>
|
|
<if test="psvId != null">psv_id = #{psvId},</if>
|
|
<if test="effectiveTime != null">effective_time = #{effectiveTime},</if>
|
|
<if test="fileName != null and fileName != ''">file_name = #{fileName},</if>
|
|
<if test="filePath != null and filePath != ''">file_path = #{filePath},</if>
|
|
<if test="fileSize != null">file_size = #{fileSize},</if>
|
|
<if test="contentType != null">content_type = #{contentType},</if>
|
|
<if test="fileExtension != null">file_extension = #{fileExtension},</if>
|
|
<if test="ossId != null">oss_id = #{ossId},</if>
|
|
<if test="sheetNames != null">sheet_names = #{sheetNames},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="updateBy != null and updateBy != ''">updated_by = #{updateBy},</if>
|
|
update_time = sysdate()
|
|
</set>
|
|
where pef_id = #{pefId}
|
|
</update>
|
|
|
|
<delete id="deletePrcPriceExcelFileByIds" parameterType="Long">
|
|
delete from prc_price_excel_file where pef_id in
|
|
<foreach item="pefId" collection="array" open="(" separator="," close=")">
|
|
#{pefId}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<delete id="physicalDeleteByPsvId">
|
|
delete from prc_price_excel_file where psv_id = #{psvId}
|
|
</delete>
|
|
|
|
</mapper>
|