From c23bccf7f39ebae903cc20d255b014d3e80c0221 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 06 十一月 2019 18:50:04 +0800 Subject: [PATCH] 红包H5接口修改 --- fanli/src/main/java/com/yeshi/fanli/util/factory/RedPackDetailFactory.java | 32 +++++++++++++++++--------------- 1 files changed, 17 insertions(+), 15 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/util/factory/RedPackDetailFactory.java b/fanli/src/main/java/com/yeshi/fanli/util/factory/RedPackDetailFactory.java index 29291de..0966a61 100644 --- a/fanli/src/main/java/com/yeshi/fanli/util/factory/RedPackDetailFactory.java +++ b/fanli/src/main/java/com/yeshi/fanli/util/factory/RedPackDetailFactory.java @@ -25,7 +25,7 @@ RedPackDetail detail = new RedPackDetail(); detail.setDisplay(false); - detail.setDescInfo( "绛夊緟浜哄伐瀹℃牳"); + detail.setDescInfo("绛夊緟浜哄伐瀹℃牳"); detail.setUid(exchange.getUid()); detail.setMoney(new BigDecimal("-" + exchange.getMoney())); detail.setType(RedPackDetailTypeEnum.redExchange); @@ -169,6 +169,7 @@ } /** + * 鏉挎牀鍟嗗煄浣跨敤 * * @param giveRecord * @return @@ -183,7 +184,7 @@ RedPackDetail detail = new RedPackDetail(); detail.setDisplay(false); detail.setUid(uid); - detail.setMoney(money); + detail.setMoney(new BigDecimal(0).subtract(money)); detail.setType(RedPackDetailTypeEnum.useByShopOrder); detail.setTitle(title); detail.setIdentifyCode(StringUtil.Md5(RedPackDetailTypeEnum.useByShopOrder.name() + "-" + orderId)); @@ -191,10 +192,10 @@ detail.setDescInfo(setName); return detail; } - - + /** - * 鏂颁汉濂栧姳 + * 鏂颁汉濂栧姳 + * * @param winInvite * @return * @throws RedPackDetailException @@ -202,7 +203,7 @@ public static RedPackDetail createNewUserReward(RedPackWinInvite winInvite) throws RedPackDetailException { if (winInvite == null) throw new RedPackDetailException(1, "鑾峰緱璁板綍涓嶈兘涓虹┖"); - + // 绾㈠寘鏄庣粏- 閫�鍥炵孩鍖� RedPackDetail detail = new RedPackDetail(); detail.setDisplay(true); @@ -215,9 +216,10 @@ detail.setCreateTime(new Date()); return detail; } - + /** * 绔嬪緱鐜伴噾 + * * @param winInvite * @return * @throws RedPackDetailException @@ -225,7 +227,7 @@ public static RedPackDetail createInvite(RedPackWinInvite winInvite) throws RedPackDetailException { if (winInvite == null) throw new RedPackDetailException(1, "鑾峰緱璁板綍涓嶈兘涓虹┖"); - + // 绾㈠寘鏄庣粏- 閫�鍥炵孩鍖� RedPackDetail detail = new RedPackDetail(); detail.setDisplay(true); @@ -238,9 +240,10 @@ detail.setCreateTime(new Date()); return detail; } - + /** * 閫掑濂栧姳 + 濂藉弸瀹屾垚鍒嗕韩璁㈠崟 + * * @param winInvite * @return * @throws RedPackDetailException @@ -248,7 +251,7 @@ public static RedPackDetail createIncreaseReward(RedPackWinInvite winInvite) throws RedPackDetailException { if (winInvite == null) throw new RedPackDetailException(1, "鑾峰緱璁板綍涓嶈兘涓虹┖"); - + // 绾㈠寘鏄庣粏- 閫�鍥炵孩鍖� RedPackDetail detail = new RedPackDetail(); detail.setDisplay(true); @@ -261,10 +264,10 @@ detail.setCreateTime(new Date()); return detail; } - - + /** * 杩炵画濂栧姳 + 濂藉弸瀹屾垚鍒嗕韩璁㈠崟 + * * @param winInvite * @return * @throws RedPackDetailException @@ -272,7 +275,7 @@ public static RedPackDetail createSeriesReward(RedPackWinInvite winInvite) throws RedPackDetailException { if (winInvite == null) throw new RedPackDetailException(1, "鑾峰緱璁板綍涓嶈兘涓虹┖"); - + // 绾㈠寘鏄庣粏- 閫�鍥炵孩鍖� RedPackDetail detail = new RedPackDetail(); detail.setDisplay(true); @@ -285,8 +288,7 @@ detail.setCreateTime(new Date()); return detail; } - - + public static RedPackDetail createShopOrderDrawBack(Long orderId, Long uid, String title, String setName, BigDecimal money) throws RedPackDetailException { if (orderId == null) -- Gitblit v1.8.0