소스 검색

修改付款列表付款详情接口sql(状态查询条件)

LiFei 3 년 전
부모
커밋
116d85af0f

+ 11 - 3
happy-cloud-wisdom/happy-cloud-wisdom-biz/src/main/java/org/jeecg/modules/hlwpayment/mapper/xml/HlwPaymentDetailMapper.xml

@@ -414,9 +414,17 @@
 			<if test="hlwPaymentDetail.paymentId != null">
 				and a.payment_id = #{hlwPaymentDetail.paymentId}
 			</if>
-			<if test="hlwPaymentDetail.status != null">
-				and a.status = #{hlwPaymentDetail.status}
-			</if>
+			<choose>
+				<when test="hlwPaymentDetail.status =='-1'.toString()">
+					and a.status is null
+				</when>
+				<when test="hlwPaymentDetail.status =='99'.toString()">
+					and (a.status = 1 or a.status = 2)
+				</when>
+				<otherwise>
+					and a.status = #{hlwPaymentDetail.status}
+				</otherwise>
+			</choose>
 			<if test="hlwPaymentDetail.userCode != null and hlwPaymentDetail.userCode != ''">
 				and hu.user_code = #{hlwPaymentDetail.userCode}
 			</if>

+ 11 - 3
happy-cloud-wisdom/happy-cloud-wisdom-biz/src/main/java/org/jeecg/modules/hlwpayment/mapper/xml/HlwPaymentMapper.xml

@@ -422,9 +422,17 @@
 			<if test="hlwPayment.companyName != null and hlwPayment.companyName !=''">
 				and com.company_name like concat(concat('%',#{hlwPayment.companyName}),'%')
 			</if>
-			<if test="hlwPayment.status != null">
-				and a.status = #{hlwPayment.status}
-			</if>
+			<choose>
+				<when test="hlwPayment.status =='-1'.toString()">
+					and a.status is null
+				</when>
+				<when test="hlwPayment.status =='99'.toString()">
+					and (a.status = 1 or a.status = 2)
+				</when>
+				<otherwise>
+					and a.status = #{hlwPayment.status}
+				</otherwise>
+			</choose>
 			<if test="hlwPayment.invoiceCategoryName != null and hlwPayment.invoiceCategoryName !=''">
 				and hi.invoice_category_name like concat('%',#{hlwPayment.invoiceCategoryName},'%')
 			</if>