164 lines
6.0 KiB
XML
164 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.alonginfo.project.gansu.mapper.UploadNoticeMapper">
|
||
|
<select id="getSeqList" resultType="java.util.Map">
|
||
|
SELECT trade_seq_id tradeSeqId, trade_seq_name tradeSeqName, upload_name uploadName, upload_path uploadPath,
|
||
|
DATE_FORMAT(date_time, '%Y-%m-%d %H:%m:%i') dateTime
|
||
|
FROM
|
||
|
upload_notice_notes
|
||
|
<where>
|
||
|
<if test="searchParam.seqId != null and searchParam.seqId != ''">
|
||
|
AND trade_seq_id LIKE CONCAT('%', #{searchParam.seqId}, '%')
|
||
|
</if>
|
||
|
<if test="searchParam.seqName != null and searchParam.seqName != ''">
|
||
|
AND trade_seq_name LIKE CONCAT('%', #{searchParam.seqName} ,'%')
|
||
|
</if>
|
||
|
</where>
|
||
|
ORDER BY
|
||
|
date_time DESC
|
||
|
</select>
|
||
|
|
||
|
<!-- 交易公告上传 -->
|
||
|
<insert id="upload">
|
||
|
INSERT INTO upload_notice_notes
|
||
|
<trim prefix="(" suffix=") VALUES" suffixOverrides=",">
|
||
|
<if test="uuid != null and uuid != ''">
|
||
|
upload_id,
|
||
|
</if>
|
||
|
<if test="seqId != null and seqId != ''">
|
||
|
trade_seq_id,
|
||
|
</if>
|
||
|
<if test="seqName != null and seqName != ''">
|
||
|
trade_seq_name,
|
||
|
</if>
|
||
|
<if test="fileName != null and fileName !=''">
|
||
|
upload_name,
|
||
|
</if>
|
||
|
<if test="encodeName != null and encodeName !=''">
|
||
|
upload_encode_name,
|
||
|
</if>
|
||
|
<if test="visitPath != null and visitPath != ''">
|
||
|
upload_path,
|
||
|
</if>
|
||
|
</trim>
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="uuid != null and uuid != ''">
|
||
|
#{uuid},
|
||
|
</if>
|
||
|
<if test="seqId != null and seqId != ''">
|
||
|
#{seqId},
|
||
|
</if>
|
||
|
<if test="seqName != null and seqName != ''">
|
||
|
#{seqName},
|
||
|
</if>
|
||
|
<if test="fileName != null and fileName !=''">
|
||
|
#{fileName},
|
||
|
</if>
|
||
|
<if test="encodeName != null and encodeName !=''">
|
||
|
#{encodeName},
|
||
|
</if>
|
||
|
<if test="visitPath != null and visitPath != ''">
|
||
|
#{visitPath},
|
||
|
</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<!-- 检查该交易序列是否已经上传交易公告 -->
|
||
|
<select id="checkUpload" resultType="java.util.Map">
|
||
|
SELECT upload_id uploadId,
|
||
|
trade_seq_id tradeSeqId,
|
||
|
trade_seq_name tradeSeqName,
|
||
|
upload_name uploadName,
|
||
|
upload_path uploadPath
|
||
|
FROM upload_notice_notes
|
||
|
WHERE trade_seq_id = #{seqId}
|
||
|
</select>
|
||
|
|
||
|
<!-- 删除mysql交易公告记录 -->
|
||
|
<delete id="delNoticeNotes">
|
||
|
DELETE
|
||
|
FROM upload_notice_notes
|
||
|
WHERE trade_seq_id = #{seqId}
|
||
|
</delete>
|
||
|
|
||
|
<insert id="uploadMarketBuild">
|
||
|
INSERT INTO upload_market_build
|
||
|
<trim prefix="(" suffix=") VALUES" suffixOverrides=",">
|
||
|
<if test="uuid != null and uuid != ''">
|
||
|
upload_id,
|
||
|
</if>
|
||
|
<if test="fileTitle != null and fileTitle != ''">
|
||
|
file_title,
|
||
|
</if>
|
||
|
<if test="imageName != null and imageName != ''">
|
||
|
image_real_name,
|
||
|
</if>
|
||
|
<if test="imageEncodeName != null and imageEncodeName !=''">
|
||
|
image_encode_name,
|
||
|
</if>
|
||
|
<if test="imageVisitPath != null and imageVisitPath !=''">
|
||
|
image_upload_path,
|
||
|
</if>
|
||
|
<if test="noticeFileName != null and noticeFileName != ''">
|
||
|
file_real_name,
|
||
|
</if>
|
||
|
<if test="fileEncodeName != null and fileEncodeName != ''">
|
||
|
file_encode_name,
|
||
|
</if>
|
||
|
<if test="fileVisitPath != null and fileVisitPath != ''">
|
||
|
file_upload_path,
|
||
|
</if>
|
||
|
</trim>
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="uuid != null and uuid != ''">
|
||
|
#{uuid},
|
||
|
</if>
|
||
|
<if test="fileTitle != null and fileTitle != ''">
|
||
|
#{fileTitle},
|
||
|
</if>
|
||
|
<if test="imageName != null and imageName != ''">
|
||
|
#{imageName},
|
||
|
</if>
|
||
|
<if test="imageEncodeName != null and imageEncodeName !=''">
|
||
|
#{imageEncodeName},
|
||
|
</if>
|
||
|
<if test="imageVisitPath != null and imageVisitPath !=''">
|
||
|
#{imageVisitPath},
|
||
|
</if>
|
||
|
<if test="noticeFileName != null and noticeFileName != ''">
|
||
|
#{noticeFileName},
|
||
|
</if>
|
||
|
<if test="fileEncodeName != null and fileEncodeName != ''">
|
||
|
#{fileEncodeName},
|
||
|
</if>
|
||
|
<if test="fileVisitPath != null and fileVisitPath != ''">
|
||
|
#{fileVisitPath},
|
||
|
</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<select id="getMarketList" resultType="java.util.Map">
|
||
|
SELECT file_title fileTitle, image_real_name imageRealName, file_real_name fileRealName,
|
||
|
image_upload_path imageUploadPath, file_upload_path fileUploadPath, DATE_FORMAT(date_time, '%Y-%m-%d %H:%m:%i') dateTime
|
||
|
FROM
|
||
|
upload_market_build
|
||
|
<where>
|
||
|
<if test="searchParam.fileTitle != null and searchParam.fileTitle != ''">
|
||
|
file_title LIKE CONCAT('%', #{searchParam.fileTitle}, '%')
|
||
|
</if>
|
||
|
</where>
|
||
|
ORDER BY
|
||
|
date_time DESC
|
||
|
</select>
|
||
|
|
||
|
<delete id="delMarketImageAndFile">
|
||
|
DELETE
|
||
|
FROM upload_market_build
|
||
|
WHERE file_title = #{fileTitle}
|
||
|
</delete>
|
||
|
|
||
|
<select id="checkMarketBuildHave" resultType="java.util.Map">
|
||
|
SELECT * FROM upload_market_build
|
||
|
WHERE file_title = #{fileTitle}
|
||
|
</select>
|
||
|
</mapper>
|