From dc5be7d38446f70e6ff86df311119c32b41fe7f8 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 28 十一月 2020 16:37:05 +0800 Subject: [PATCH] 大淘客搜索接口升级 --- fanli/src/main/java/com/yeshi/fanli/util/factory/RedPackDetailFactory.java | 26 +++++++++++++++++++++++++- 1 files changed, 25 insertions(+), 1 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 e97dc28..3b92d95 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 @@ -165,6 +165,7 @@ RedPackDetail detail = new RedPackDetail(); detail.setId(id); detail.setDisplay(true); + detail.setRemark("棰嗗彇浜篒D:" + giveRecord.getReceiveUid()); detail.setType(RedPackDetailTypeEnum.giveOthersSucceed); detail.setTitle(RedPackDetailTypeEnum.giveOthersSucceed.getDesc()); detail.setIdentifyCode( @@ -251,7 +252,7 @@ public static RedPackDetail createNewUserReward(Long uid, Integer num, BigDecimal money) throws RedPackDetailException { if (uid == null || num == null || money == null) throw new RedPackDetailException(1, "鑾峰緱璁板綍涓嶈兘涓虹┖"); - // 绾㈠寘鏄庣粏- 閫�鍥炵孩鍖� + // 绾㈠寘鏄庣粏- 閫�鍥炵孩鍖� RedPackDetail detail = new RedPackDetail(); detail.setDisplay(true); detail.setUid(uid); @@ -354,4 +355,27 @@ return detail; } + /** + * + * @param uid + * @param money + * @param date + * @return + * @throws RedPackDetailException + */ + public static RedPackDetail createByMonth(Long uid, BigDecimal money, Date date) throws RedPackDetailException { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd"); + String time = sdf.format(date); + + String title = sdf.format(date) + "閭�璇风孩鍖�"; + RedPackDetail detail = new RedPackDetail(); + detail.setDisplay(true); + detail.setUid(uid); + detail.setMoney(money); + detail.setTitle(title); + detail.setType(RedPackDetailTypeEnum.redMonthly); + detail.setIdentifyCode(StringUtil.Md5(RedPackDetailTypeEnum.redMonthly.name() + ":" + time)); + detail.setCreateTime(new Date()); + return detail; + } } -- Gitblit v1.8.0