|
|
@@ -21,6 +21,8 @@
|
|
|
<result column="image_name" property="imageName" jdbcType="VARCHAR"/>
|
|
|
<result column="original_artwork" property="originalArtwork" jdbcType="VARCHAR"/>
|
|
|
<result column="finished_artwork" property="finishedArtwork" jdbcType="VARCHAR"/>
|
|
|
+ <result column="download_flag" property="downloadFlag" jdbcType="CHAR"/>
|
|
|
+ <result column="clean_flag" property="cleanFlag" jdbcType="CHAR"/>
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
<trim suffixOverrides=",">
|
|
|
@@ -62,6 +64,10 @@
|
|
|
|
|
|
finished_artwork,
|
|
|
|
|
|
+ download_flag,
|
|
|
+
|
|
|
+ clean_flag,
|
|
|
+
|
|
|
</trim>
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
|
|
@@ -265,6 +271,12 @@
|
|
|
<if test="finishedArtwork != null">
|
|
|
finished_artwork= #{finishedArtwork,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="downloadFlag != null">
|
|
|
+ download_flag= #{downloadFlag,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="cleanFlag != null">
|
|
|
+ clean_flag= #{cleanFlag,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
@@ -304,6 +316,9 @@
|
|
|
<if test="record.delFlag != null and !"".equals(record.delFlag)">
|
|
|
and del_flag = #{record.delFlag}
|
|
|
</if>
|
|
|
+ <if test="record.delFlag != null and !"".equals(record.delFlag)">
|
|
|
+ and del_flag = #{record.delFlag}
|
|
|
+ </if>
|
|
|
<if test="record.updateTime != null and !"".equals(record.updateTime)">
|
|
|
and update_time = #{record.updateTime}
|
|
|
</if>
|
|
|
@@ -357,6 +372,12 @@
|
|
|
and (finished_image is not null and finished_image != '')
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="record.downloadFlag != null and !"".equals(record.downloadFlag)">
|
|
|
+ and download_flag = #{record.downloadFlag}
|
|
|
+ </if>
|
|
|
+ <if test="record.cleanFlag != null and !"".equals(record.cleanFlag)">
|
|
|
+ and clean_flag = #{record.cleanFlag}
|
|
|
+ </if>
|
|
|
<if test="record.searchKey != null and !"".equals(record.searchKey)">
|
|
|
<trim prefix="and (" suffix=")" prefixOverrides="OR">
|
|
|
OR order_id LIKE concat('%',#{record.searchKey},'%')
|
|
|
@@ -489,6 +510,12 @@
|
|
|
and (finished_image is not null and finished_image != '')
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="downloadFlag != null and !"".equals(downloadFlag)">
|
|
|
+ and download_flag = #{downloadFlag}
|
|
|
+ </if>
|
|
|
+ <if test="cleanFlag != null and !"".equals(cleanFlag)">
|
|
|
+ and clean_flag = #{cleanFlag}
|
|
|
+ </if>
|
|
|
<if test="searchKey != null and !"".equals(searchKey)">
|
|
|
<trim prefix="and (" suffix=")" prefixOverrides="OR">
|
|
|
OR order_id LIKE concat('%',#{searchKey},'%')
|
|
|
@@ -619,8 +646,8 @@
|
|
|
<select id="getMemorySize" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderImage">
|
|
|
SELECT
|
|
|
store_id,
|
|
|
- ROUND(SUM(original_size) / 1024 / 1024) AS original_size,
|
|
|
- ROUND(SUM(finished_size) / 1024 / 1024) AS finished_size,
|
|
|
+ ROUND(SUM(original_size) / 1024 / 1024) AS original_size,
|
|
|
+ ROUND(SUM(finished_size) / 1024 / 1024) AS finished_size,
|
|
|
ROUND(
|
|
|
SUM(original_size) / 1024 / 1024 + SUM(finished_size) / 1024 / 1024
|
|
|
) AS total_size
|
|
|
@@ -679,6 +706,12 @@
|
|
|
<if test="imageName != null and !"".equals(imageName)">
|
|
|
and image_name = #{imageName}
|
|
|
</if>
|
|
|
+ <if test="downloadFlag != null and !"".equals(downloadFlag)">
|
|
|
+ and download_flag = #{downloadFlag}
|
|
|
+ </if>
|
|
|
+ <if test="cleanFlag != null and !"".equals(cleanFlag)">
|
|
|
+ and clean_flag = #{cleanFlag}
|
|
|
+ </if>
|
|
|
|
|
|
</where>
|
|
|
GROUP BY
|
|
|
@@ -699,5 +732,41 @@
|
|
|
</where>
|
|
|
order by id desc
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="queryAutoCleanOrderImage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderImage">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ from order_image
|
|
|
+ <where>
|
|
|
+ and del_flag = 'N'
|
|
|
+ and download_flag = 'Y'
|
|
|
+ and clean_flag = 'N'
|
|
|
+ and order_id in (
|
|
|
+ SELECT
|
|
|
+ id
|
|
|
+ FROM
|
|
|
+ user_order
|
|
|
+ WHERE
|
|
|
+ del_flag = 'N'
|
|
|
+ AND status_flag >= 5
|
|
|
+ <![CDATA[AND confirm_time < DATE_ADD(NOW(), INTERVAL - 7 DAY)]]>
|
|
|
+ )
|
|
|
+ <if test="orderId != null and !"".equals(orderId)">
|
|
|
+ and order_id = #{orderId}
|
|
|
+ </if>
|
|
|
+ <if test="userId != null and !"".equals(userId)">
|
|
|
+ and user_id = #{userId}
|
|
|
+ </if>
|
|
|
+ <if test="storeId != null and !"".equals(storeId)">
|
|
|
+ and store_id = #{storeId}
|
|
|
+ </if>
|
|
|
+ <if test="statusFlag != null and !"".equals(statusFlag)">
|
|
|
+ and status_flag = #{statusFlag}
|
|
|
+ </if>
|
|
|
+ <if test="remark != null and !"".equals(remark)">
|
|
|
+ and remark = #{remark}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|
|
|
|