Bläddra i källkod

奖金报错处理

anderx 3 år sedan
förälder
incheckning
49b818c283
1 ändrade filer med 14 tillägg och 5 borttagningar
  1. 14 5
      src/main/java/com/goafanti/common/mapper/TOrderBonusMapper.xml

+ 14 - 5
src/main/java/com/goafanti/common/mapper/TOrderBonusMapper.xml

@@ -568,9 +568,12 @@
 	<bind name="sn" value="'%' + salesName + '%'" />
 	and a.name like #{sn,jdbcType=VARCHAR}
 	</if>
-	<if test='departmentId != null and departmentId != ""'>
-	and a.department_id = #{departmentId,jdbcType=VARCHAR}
-	</if>
+	<if test='deps !=null '>
+	and a.department_id in
+    <foreach close=")" collection="deps" item="depId" open="(" separator=",">
+        #{depId}
+    </foreach>
+    </if>
 	<if test="grantStatus != null">
 	and b.grant_status = #{grantStatus,jdbcType=INTEGER}
 	</if>
@@ -649,8 +652,14 @@
 	<bind name="sn" value="'%' + salesName + '%'" />
 	and a.name like #{sn,jdbcType=VARCHAR}
 	</if>
-	<if test='departmentId != null and departmentId !=""'>
-	and a.department_id = #{departmentId,jdbcType=VARCHAR}
+	<if test='deps !=null'>
+	and a.department_id in
+        <if test='deps !=null '>
+            and a.department_id in
+            <foreach close=")" collection="deps" item="depId" open="(" separator=",">
+                #{depId}
+            </foreach>
+        </if>
 	</if>
 	<if test="grantStatus != null">
 	and b.grant_status = #{grantStatus,jdbcType=INTEGER}