From ef95fee62006d542819c2ad246c458f4f02de978 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Wed, 17 Nov 2021 12:10:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=9D=E8=B4=B9=E8=AE=A2?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bweb/controller/OutRechargeOrderController.java | 6 ++++++ .../cweb/controller/OutRechargeOrderController.java | 12 +++++++----- .../java/com/hai/dao/OutRechargeOrderMapperExt.java | 11 +++++------ .../service/impl/OutRechargeOrderServiceImpl.java | 4 ++++ 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/hai-bweb/src/main/java/com/bweb/controller/OutRechargeOrderController.java b/hai-bweb/src/main/java/com/bweb/controller/OutRechargeOrderController.java index 95431ccd..be546e0a 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/OutRechargeOrderController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/OutRechargeOrderController.java @@ -131,6 +131,7 @@ public class OutRechargeOrderController { @RequestParam(name = "rechargeModel", required = false) String rechargeModel, @RequestParam(name = "rechargeContent", required = false) String rechargeContent, @RequestParam(name = "userPhone", required = false) String userPhone, + @RequestParam(name = "idCard", required = false) String idCard, @RequestParam(name = "payType", required = false) Integer payType, @RequestParam(name = "code", required = false) Integer code, @RequestParam(name = "payTimeS", required = false) Long payTimeS, @@ -159,6 +160,9 @@ public class OutRechargeOrderController { if (StringUtils.isNotBlank(userPhone)) { map.put("userPhone", userPhone); } + if (StringUtils.isNotBlank(idCard)) { + map.put("idCard", idCard); + } if (payType != null) { map.put("payType" , payType.toString()); } @@ -203,6 +207,7 @@ public class OutRechargeOrderController { @RequestParam(name = "rechargeModel", required = false) String rechargeModel, @RequestParam(name = "rechargeContent", required = false) String rechargeContent, @RequestParam(name = "userPhone", required = false) String userPhone, + @RequestParam(name = "idCard", required = false) String idCard, @RequestParam(name = "payType", required = false) Integer payType, @RequestParam(name = "code", required = false) Integer code, @RequestParam(name = "createTimeS", required = false) Long createTimeS, @@ -217,6 +222,7 @@ public class OutRechargeOrderController { map.put("rechargeModel", rechargeModel); map.put("rechargeContent", rechargeContent); map.put("userPhone", userPhone); + map.put("idCard", idCard); map.put("payType", payType); map.put("code", code); map.put("createTimeS", createTimeS); diff --git a/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java index a351d06d..a97226a0 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java @@ -79,17 +79,14 @@ public class OutRechargeOrderController { @Resource private HighProfitSharingRecordService highProfitSharingRecordService; - @Resource - private CommonService commonService; - @Resource private SecConfigService secConfigService; @Resource - private HighUserPayPasswordService highUserPayPasswordService; + private HighUserCardService highUserCardService; @Resource - private HighUserCardService highUserCardService; + private HighUserPayPasswordService highUserPayPasswordService; @Resource private UnionPayConfig unionPayConfig; @@ -131,9 +128,14 @@ public class OutRechargeOrderController { log.error("orderToPay error!"); throw ErrorHelp.genException(SysCode.System, ErrorCode.PHONE_NUM_IS_ERROR); } + + HighUserCard highUserCard = highUserCardService.getUserHtlCardNo(userInfoModel.getHighUser().getId()); + outRechargeOrder.setRemarks(remarks); + outRechargeOrder.setRechargeName(remarks); outRechargeOrder.setOrderNo("CZ" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5)); outRechargeOrder.setUserId(userInfoModel.getHighUser().getId()); + outRechargeOrder.setIdCard(highUserCard.getCardNo()); outRechargeOrder.setUserName(userInfoModel.getHighUser().getName()); outRechargeOrder.setUserPhone(userInfoModel.getHighUser().getPhone()); diff --git a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java index 11a7406c..0d7b59a8 100644 --- a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java +++ b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java @@ -66,9 +66,9 @@ public interface OutRechargeOrderMapperExt { " a.user_phone userPhone," + " case a.recharge_model when 1 then '电信话费' when 2 then '移动话费' when 3 then '联通话费' end rechargeModelName," + " a.recharge_content rechargeContent," + - " a.recharge_name rechargeName," + - " a.id_card rechargeIdCard," + " a.remarks remarks," + + " a.id_card cardNo," + + " a.recharge_name rechargeName," + " case a.pay_type when 1 then '微信' when 2 then '工会卡' when 3 then '积分' when 4 then '银联' end payTypeName," + " a.order_price orderPrice," + " a.pay_price payPrice," + @@ -81,22 +81,21 @@ public interface OutRechargeOrderMapperExt { " a.refund_time refundTime," + " a.refund_fee refundFee," + " a.out_refund_no outRefundNo," + - " a.refund_id refundId," + - " b.card_no cardNo" + + " a.refund_id refundId" + " FROM" + - " out_recharge_order a join high_user_card b on a.user_id = b.user_id where 1 = 1 " + + " out_recharge_order a where 1 = 1 " + " and a.`status` = #{map.status} ", " and a.`pay_type` = #{map.payType} ", " and a.`Identification_code` = #{map.code} ", " and a.`order_no` = #{map.orderNo} ", " and a.`recharge_model` = #{map.rechargeModel} ", " and a.`recharge_content` LIKE '%${map.rechargeContent}%' ", + " and a.`id_card` LIKE '%${map.idCard}%' ", " and a.`user_phone` = #{map.userPhone} ", " = #{map.createTimeS} ]]> ", " ", " = #{map.payTimeS} ]]> ", " ", - " group by pay_time " + " ORDER BY" + " a.create_timed DESC " + "" diff --git a/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java index 302c696f..cb15c5ec 100644 --- a/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java @@ -73,6 +73,10 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { criteria.andOrderNoLike("%" + MapUtils.getString(map, "orderNo") + "%"); } + if (MapUtils.getString(map, "idCard") != null) { + criteria.andIdCardLike("%" + MapUtils.getString(map, "idCard") + "%"); + } + if (MapUtils.getString(map, "userPhone") != null) { criteria.andUserPhoneEqualTo(MapUtils.getString(map, "userPhone")); }