jk-GitHub-coder 3 tahun lalu
induk
melakukan
45d3b76eb9

+ 4 - 2
YijiaRestful/src/main/resources/mapper/PayOrderMapper.xml

@@ -442,8 +442,9 @@
     FROM
         station_personnel AS A
     <where>
+        A.del_flag ="0"
       <if test="oliGunNo != null and oliGunNo !=''">
-        FIND_IN_SET(#{oliGunNo}, A.gun_no)
+        AND FIND_IN_SET(#{oliGunNo}, A.gun_no)
       </if>
       <if test="stationId !=null and stationId !=''">
         AND A.station_id = #{stationId}
@@ -464,8 +465,9 @@
         LEFT JOIN station_oil_price AS B ON A.oil_name = B.oil_name AND A.station_id = B.station_id
         LEFT JOIN station_personnel AS C ON A.oil_gun_no = C.gun_no AND A.station_id = C.station_id
     <where>
+        C.del_flag = "0"
         <if test="oliGunNo != null and oliGunNo !=''">
-          A.oil_gun_no = #{oliGunNo}
+          AND A.oil_gun_no = #{oliGunNo}
         </if>
         <if test="stationId !=null and stationId !=''">
           AND A.station_id = #{stationId}

+ 2 - 1
YijiaRestful/src/main/resources/mapper/StationOilGunMapper.xml

@@ -309,8 +309,9 @@
         FROM        station_personnel    AS T1
         LEFT JOIN   station_oil_gun      AS T2 ON FIND_IN_SET(T2.oil_gun_no, T1.gun_no) AND T1.station_id = T2.station_id
         <where>
+          T1.del_flag = "0"
           <if test="personnelId != null and personnelId !=''">
-            personnel_id = #{personnelId}
+            AND personnel_id = #{personnelId}
           </if>
         </where>
   </select>