jk-GitHub-coder преди 4 години
родител
ревизия
46e97dfaab
променени са 1 файла, в които са добавени 14 реда и са изтрити 8 реда
  1. 14 8
      YijiaRestful/src/main/resources/mapper/ElectronicMembershipCardMapper.xml

+ 14 - 8
YijiaRestful/src/main/resources/mapper/ElectronicMembershipCardMapper.xml

@@ -396,8 +396,11 @@
         FROM
             customer_electronic_card
         <where>
+            <if test="stationId !='' and stationId != null" >
+                station_id = #{stationId}
+            </if>
             <if test="unionId !=null and unionId !=''">
-                union_id = #{unionId}
+                AND union_id = #{unionId}
             </if>
             <if test="blogOpenId !=null and blogOpenId !=''">
                 AND blog_openid = #{blogOpenId}
@@ -408,9 +411,6 @@
             <if test="cardOilsType !=null and cardOilsType !=''">
                 AND card_oils_type = #{cardOilsType}
             </if>
-            <if test="stationId !='' and stationId != null" >
-                AND station_id = #{stationId}
-            </if>
         </where>
     </select>
 
@@ -499,15 +499,21 @@
             </if>
         </set>
         <where>
+            <if test="stationId !='' and stationId != null" >
+                station_id = #{stationId}
+            </if>
+            <if test="blogOpenId !=null and blogOpenId !=''">
+                AND blog_openid = #{blogOpenId}
+            </if>
+            <if test="minaOpenId !=null and minaOpenId !=''">
+                AND mina_openid = #{minaOpenId}
+            </if>
             <if test="unionId !=null and unionId != ''">
-                union_id = #{unionId}
+                AND union_id = #{unionId}
             </if>
             <if test="cardOilsType !='' and cardOilsType != null" >
                 AND card_oils_type = #{cardOilsType}
             </if>
-            <if test="stationId !='' and stationId != null" >
-                AND station_id = #{stationId}
-            </if>
         </where>
     </update>