From d9d51bcc6ad0a1af35231a8259dbcb524b141f94 Mon Sep 17 00:00:00 2001 From: cuibaocheng Date: Mon, 6 Sep 2021 11:13:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E5=AD=97=E9=95=BF?= =?UTF-8?q?=E5=BA=A6=E8=87=AA=E5=8A=A8=E8=AE=BE=E7=BD=AE/=E6=A0=8F?= =?UTF-8?q?=E7=9B=AE=E5=A2=9E=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AccountWithdrawAppController.java | 2 +- .../cardcharge/impl/CardChargeServiceImpl.java | 18 ++++++++++++++++-- .../com/tenlion/systemcard/util/PayUtil.java | 5 +---- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/main/java/cn/com/tenlion/systemcard/controller/app/api/accountwithdraw/AccountWithdrawAppController.java b/src/main/java/cn/com/tenlion/systemcard/controller/app/api/accountwithdraw/AccountWithdrawAppController.java index 9b525b0..0d3485d 100644 --- a/src/main/java/cn/com/tenlion/systemcard/controller/app/api/accountwithdraw/AccountWithdrawAppController.java +++ b/src/main/java/cn/com/tenlion/systemcard/controller/app/api/accountwithdraw/AccountWithdrawAppController.java @@ -39,7 +39,7 @@ public class AccountWithdrawAppController extends DefaultBaseController { @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @PostMapping("save") @CheckRequestBodyAnnotation - public SuccessResult save(@RequestHeader("token") String token, @RequestBody AccountWithdrawVO accountWithdrawVO) { + public synchronized SuccessResult save(@RequestHeader("token") String token, @RequestBody AccountWithdrawVO accountWithdrawVO) { accountWithdrawService.save(token, accountWithdrawVO); return new SuccessResult(); } diff --git a/src/main/java/cn/com/tenlion/systemcard/service/cardcharge/impl/CardChargeServiceImpl.java b/src/main/java/cn/com/tenlion/systemcard/service/cardcharge/impl/CardChargeServiceImpl.java index 675cae1..cddca1a 100644 --- a/src/main/java/cn/com/tenlion/systemcard/service/cardcharge/impl/CardChargeServiceImpl.java +++ b/src/main/java/cn/com/tenlion/systemcard/service/cardcharge/impl/CardChargeServiceImpl.java @@ -115,6 +115,19 @@ public class CardChargeServiceImpl extends DefaultBaseService implements ICardCh * @param cardChargeDTO */ private void accountItemAdd(CardChargeDTO cardChargeDTO) { + /** + * 查询我的缴费记录列表 , 判断是否存在缴费 , 存在则为续费 , 不存在则为缴费 + */ + Map query = getHashMap(2); + query.put("cardChargeUserId" , cardChargeDTO.getCardChargeUserId()); + List list = list(query); + for(CardChargeDTO dTO : list) { + // 说明在本次缴费之前 , 已经有过缴费记录 , 本次属于续费 , 没有提成 + if ("2".equals(dTO.getCardChargeOrderStatus()) && !cardChargeDTO.getCardChargeId().equals(dTO.getCardChargeId())) { + return; + } + } + /** * 缴费成功到账到公司账户后 , 给予邀请人账户提成 */ @@ -133,13 +146,13 @@ public class CardChargeServiceImpl extends DefaultBaseService implements ICardCh MiniappUserPO miniappUserPO = iMiniappUserService.getPOByUserCode(userIdOrUserCode); if(miniappUserPO != null) { invitationUserId = miniappUserPO.getUserId(); - invitationType = "邀请码.邀请" + userPO.getNickName() + "创建名片"; + invitationType = "邀请码.邀请" + userPO.getNickName() + "使用名片服务"; invitationProp = roleDTO.getCardChargeRoleInvitationProp().intValue();// 邀请码邀请的提成比例 // 判断是否为userId }else { MiniappUserPO miniappUser = iMiniappUserService.getPO(userIdOrUserCode); invitationUserId = miniappUser.getUserId(); - invitationType = "转发.邀请" + userPO.getNickName() + "创建名片"; + invitationType = "转发.邀请" + userPO.getNickName() + "使用名片服务"; invitationProp = roleDTO.getCardChargeRoleDispatchProp().intValue(); // 转发邀请的提成比例 } } @@ -249,6 +262,7 @@ public class CardChargeServiceImpl extends DefaultBaseService implements ICardCh if(StringUtils.isEmpty(prepayId)) { throw new SaveException("创建付款订单失败"); } + LOG.info("新的缴费预支付订单创建:" + payPlaceOrder); return payDTO; } diff --git a/src/main/java/cn/com/tenlion/systemcard/util/PayUtil.java b/src/main/java/cn/com/tenlion/systemcard/util/PayUtil.java index 64d6f76..1a2ad19 100644 --- a/src/main/java/cn/com/tenlion/systemcard/util/PayUtil.java +++ b/src/main/java/cn/com/tenlion/systemcard/util/PayUtil.java @@ -19,9 +19,6 @@ public class PayUtil { } public static void main(String[] args) { - - for(long i = 1 ; i < 13 ; i++) { - System.out.println( ShareCodeUtil.gen(i)); - } + System.out.println("逯"); } }