yujian
2019-08-27 d8359ddb48dab5cc797a9d552e11fde571f4920c
fanli/src/main/java/com/yeshi/fanli/util/factory/UserMoneyDetailFactory.java
@@ -15,6 +15,7 @@
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.TimeUtil;
import com.yeshi.fanli.util.account.UserUtil;
public class UserMoneyDetailFactory {
@@ -62,8 +63,8 @@
    * @return
    * @throws UserMoneyDetailException
    */
   public static UserMoneyDetail createShare(Long uid,int orderType, int validCount, int weiQuanCount, int invalidCount,
         BigDecimal money, Date time) throws UserMoneyDetailException {
   public static UserMoneyDetail createShare(Long uid, int orderType, int validCount, int weiQuanCount,
         int invalidCount, BigDecimal money, Date time) throws UserMoneyDetailException {
      if (money == null)
         throw new UserMoneyDetailException(1, "返利金额为空");
@@ -104,8 +105,8 @@
    * @return
    * @throws UserMoneyDetailException
    */
   public static UserMoneyDetail createInvite(Long uid,int orderType, int validCount, int weiQuanCount, int invalidCount,
         BigDecimal money, Date time) throws UserMoneyDetailException {
   public static UserMoneyDetail createInvite(Long uid, int orderType, int validCount, int weiQuanCount,
         int invalidCount, BigDecimal money, Date time) throws UserMoneyDetailException {
      if (money == null)
         throw new UserMoneyDetailException(1, "返利金额为空");
@@ -208,7 +209,7 @@
      detail.setSubTitle("订单维权");
      detail.setType(UserMoneyDetailTypeEnum.shareWeiQuan);
      detail.setSourceIdentifyId(drawBack.getId());
      detail.setDescInfo("订单号:" + drawBack.getOrderId());
      detail.setDescInfo("订单号:" + UserUtil.filterOrderId(drawBack.getOrderId()));
      detail.setUpdateTime(new Date());
      detail.setUserInfo(new UserInfo(uid));
      detail.setOrderType(Constant.SOURCE_TYPE_TAOBAO);
@@ -248,7 +249,7 @@
      detail.setSubTitle("订单维权");
      detail.setType(UserMoneyDetailTypeEnum.inviteWeiQuan);
      detail.setSourceIdentifyId(drawBack.getId());
      detail.setDescInfo("订单号:" + drawBack.getOrderId());
      detail.setDescInfo("订单号:" + UserUtil.filterOrderId(drawBack.getOrderId()));
      detail.setUpdateTime(new Date());
      detail.setUserInfo(new UserInfo(uid));
      detail.setOrderType(Constant.SOURCE_TYPE_TAOBAO);
@@ -422,7 +423,7 @@
    * @return
    * @throws UserMoneyDetailException
    */
   public static UserMoneyDetail createOrderReward(String orderId,int orderType, BigDecimal money, UserInfo user)
   public static UserMoneyDetail createOrderReward(String orderId, int orderType, BigDecimal money, UserInfo user)
         throws UserMoneyDetailException {
      if (StringUtil.isNullOrEmpty(orderId))
         throw new UserMoneyDetailException(1, "订单号不能为空");
@@ -453,7 +454,7 @@
    * @return
    * @throws UserMoneyDetailException
    */
   public static UserMoneyDetail createRepeatStatistic(String orderId,int orderType,  BigDecimal money, UserInfo user)
   public static UserMoneyDetail createRepeatStatistic(String orderId, int orderType, BigDecimal money, UserInfo user)
         throws UserMoneyDetailException {
      if (StringUtil.isNullOrEmpty(orderId))
         throw new UserMoneyDetailException(1, "订单号不能为空");
@@ -497,10 +498,8 @@
      }
      return detail;
   }
   public static UserMoneyDetail createScoreConvert(BigDecimal money, UserInfo user)
         throws UserMoneyDetailException {
   public static UserMoneyDetail createScoreConvert(BigDecimal money, UserInfo user) throws UserMoneyDetailException {
      if (user == null)
         throw new UserMoneyDetailException(1, "UID不能为空");
      if (money == null)
@@ -515,7 +514,7 @@
      detail.setType(UserMoneyDetailTypeEnum.scoreConvert);
      detail.setUpdateTime(new Date());
      detail.setUserInfo(user);
      return detail;
   }