فهرست منبع

接口—“付款详情”增加查询参数

ZhangWenQiang 3 سال پیش
والد
کامیت
ae6d1a4691

+ 12 - 0
happy-cloud-wisdom/happy-cloud-wisdom-biz/src/main/java/org/jeecg/modules/api/controller/HlwPaymentApiController.java

@@ -124,10 +124,22 @@ public class HlwPaymentApiController extends JeecgController<HlwPayment, IHlwPay
         Integer status = jsonObject.getInteger("status");
         Integer applicationId = jsonObject.getInteger("applicationId");
         String userCode = jsonObject.getString("userCode");
+        String paymentResultTimeBegin = jsonObject.getString("paymentResultTimeBegin");
+        String paymentResultTimeEnd = jsonObject.getString("paymentResultTimeEnd");
         HlwPaymentDetail hlwPaymentDetail = new HlwPaymentDetail();
         hlwPaymentDetail.setPaymentId(paymentId);
         hlwPaymentDetail.setStatus(status);
         if (pageSize == -1) {
+            if (StringUtils.isNotBlank(userCode)) {
+                hlwPaymentDetail.setUserCode(userCode);
+                hlwPaymentDetail.setApplicationId(applicationId);
+            }
+            if (StringUtils.isNotBlank(paymentResultTimeBegin)) {
+                hlwPaymentDetail.setPaymentResultTime_begin(paymentResultTimeBegin + "-01");
+            }
+            if (StringUtils.isNotBlank(paymentResultTimeEnd)) {
+                hlwPaymentDetail.setPaymentResultTime_end(paymentResultTimeEnd + "-01");
+            }
             List<HlwPaymentDetail> list = hlwPaymentDetailService.paymentDetailListNoPage(hlwPaymentDetail);
             return Result.ok(list);
         } else {

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

@@ -435,6 +435,7 @@
 		FROM hlw_payment_detail a
 		<include refid="hlwPaymentDetailJoins"/>
 		left join hlw_payment p on p.id = a.payment_id
+		left join hlw_user hu on hu.idcard_number = a.idcard_number
 		<where>
 			a.del_flag = 0
 			<if test="hlwPaymentDetail.paymentId != null">
@@ -443,6 +444,15 @@
 			<if test="hlwPaymentDetail.status != null">
 				and a.status = #{hlwPaymentDetail.status}
 			</if>
+			<if test="hlwPaymentDetail.userCode != null and hlwPaymentDetail.userCode != ''">
+				and hu.user_code = #{hlwPaymentDetail.userCode}
+			</if>
+			<if test="hlwPaymentDetail.applicationId != null">
+				and p.application_id = #{hlwPaymentDetail.applicationId}
+			</if>
+			<if test="hlwPaymentDetail.paymentResultTime_begin != null and hlwPaymentDetail.paymentResultTime_begin !=''">
+				and DATE_FORMAT(a.payment_result_time, '%Y%m') between DATE_FORMAT(#{hlwPaymentDetail.paymentResultTime_begin}, '%Y%m') and DATE_FORMAT(#{hlwPaymentDetail.paymentResultTime_end}, '%Y%m')
+			</if>
 		</where>
 		ORDER BY a.update_time DESC, a.id ASC
 	</select>