suochencheng 7 years ago
parent
commit
5faff24464
1 changed files with 13 additions and 5 deletions
  1. 13 5
      src/main/java/com/izouma/awesomeadmin/dao/OrderImageMapper.xml

+ 13 - 5
src/main/java/com/izouma/awesomeadmin/dao/OrderImageMapper.xml

@@ -215,7 +215,15 @@
                 original_size= #{originalSize,jdbcType=DECIMAL},
             </if>
             <if test="finishedImage != null">
-                finished_image= #{finishedImage,jdbcType=VARCHAR},
+                <choose>
+                    <when test="'null'.toString()==finishedImage">
+                        finished_image = null,
+                    </when>
+                    <otherwise>
+                        finished_image= #{finishedImage,jdbcType=VARCHAR},
+                    </otherwise>
+                </choose>
+
             </if>
             <if test="finishedSize != null">
                 finished_size= #{finishedSize,jdbcType=DECIMAL},
@@ -318,10 +326,10 @@
             </if>
             <if test="record.unFinished != null and !&quot;&quot;.equals(record.unFinished)">
                 <if test="'1'.toString()==record.unFinished">
-                    and (finished_image is null or  finished_image = '')
+                    and (finished_image is null or finished_image = '')
                 </if>
                 <if test="'0'.toString()==record.unFinished">
-                    and (finished_image is not null and  finished_image != '')
+                    and (finished_image is not null and finished_image != '')
                 </if>
             </if>
             <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
@@ -450,10 +458,10 @@
             </if>
             <if test="unFinished != null and !&quot;&quot;.equals(unFinished)">
                 <if test="'1'.toString()==unFinished">
-                    and (finished_image is null or  finished_image = '')
+                    and (finished_image is null or finished_image = '')
                 </if>
                 <if test="'0'.toString()==unFinished">
-                    and (finished_image is not null and  finished_image != '')
+                    and (finished_image is not null and finished_image != '')
                 </if>
             </if>
             <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">