admin
2019-11-05 842eb968e0b892a69bae1c215c1db67d350fe35a
fanli/src/main/java/com/yeshi/fanli/util/factory/RedPackDetailFactory.java
@@ -190,5 +190,25 @@
      detail.setDesc(setName);
      return detail;
   }
   public static RedPackDetail createShopOrderDrawBack(Long orderId, Long uid, String title, String setName,
         BigDecimal money) throws RedPackDetailException {
      if (orderId == null)
         throw new RedPackDetailException(1, "订单ID不能为空");
      if (uid == null)
         throw new RedPackDetailException(1, "用户ID不能为空");
      RedPackDetail detail = new RedPackDetail();
      detail.setDisplay(false);
      detail.setUid(uid);
      detail.setMoney(money);
      detail.setType(RedPackDetailTypeEnum.shopOrderDrawBack);
      detail.setTitle(title);
      detail.setIdentifyCode(StringUtil.Md5(RedPackDetailTypeEnum.shopOrderDrawBack.name() + "-" + orderId));
      detail.setCreateTime(new Date());
      detail.setDesc(setName);
      return detail;
   }
}