admin
2019-10-29 c5edc037c088c812554b9aac16b9eadab2c4e1e6
消息整形,维权订单修改
12个文件已修改
114 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgAccountDetail.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgInviteDetail.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgMoneyDetail.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgOrderDetail.java 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgOtherDetail.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/money/UserMoneyDetail.java 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractAuditRecordServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/MsgMoneyDetailServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/HongBaoV2ServiceImpl.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/tb/TaoBaoWeiQuanOrderServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/UserMoneyDetailFactory.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgAccountDetail.java
@@ -16,7 +16,13 @@
@Table("yeshi_ec_msg_account")
public class MsgAccountDetail {
    public enum MsgTypeAccountTypeEnum {
        bingding("账号绑定"), cancelBinding("取消绑定"), bingdingChange("绑定更换"), update("账号修改"), level("账号等级"), connect("账号合并"),taoBaoAuthFail("账号绑定");
        bingding("账号绑定"),
        cancelBinding("取消绑定"),
        bingdingChange("绑定更换"),
        update("账号修改"),
        level("账号等级"),
        connect("账号合并"),
        taoBaoAuthFail("账号绑定");
        private final String desc;
        private MsgTypeAccountTypeEnum(String desc) {
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgInviteDetail.java
@@ -47,7 +47,6 @@
    private Date createTime;
    @Column(name="mi_update_time")
    private Date updateTime;
    public Long getId() {
        return id;
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgMoneyDetail.java
@@ -20,8 +20,19 @@
public class MsgMoneyDetail {
    public enum MsgTypeMoneyTypeEnum {
        share("分享奖金"), invite("邀请奖金"), fanli("返利到账"), extract("提现"), extractAutoWX("自动提现"), extractValid("提现账号验证"), shareWeiQuan(
                "分享奖金扣除"), inviteWeiQuan("邀请奖金扣除"), fanliWeiQuan("返利扣除"), orderReward("返利奖励"), systemEqualize("系统补齐"),fanliElme("返利到账"),subSidy("额外补贴");
        share("分享奖金"),
        invite("邀请奖金"),
        fanli("返利到账"),
        extract("提现"),
        extractAutoWX("自动提现"),
        extractValid("提现账号验证"),
        shareWeiQuan("分享奖金扣除"),
        inviteWeiQuan("邀请奖金扣除"),
        fanliWeiQuan("返利扣除"),
        orderReward("返利奖励"),
        systemEqualize("系统补齐"),
        fanliElme("返利到账"),
        subSidy("额外补贴");
        private final String desc;
        private MsgTypeMoneyTypeEnum(String desc) {
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgOrderDetail.java
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgOtherDetail.java
@@ -20,9 +20,17 @@
@Table("yeshi_ec_msg_other")
public class MsgOtherDetail {
    public enum MsgTypeOtherTypeEnum {
        couponMianDan("免单券"), couponWelfareMianDan("福利免单券"), freeCouponBuy("自购免单券"),
        freeCouponGive("赠送免单券"), couponReward("奖励券"), taoLiJin("推广红包"), give("赠送"), exchange("金币兑换")
        , couponActivate("免单券激活"), firstOrderReward("队员首单奖励邀请人金币"),systemGive("系统赠送");
        couponMianDan("免单券"),
        couponWelfareMianDan("福利免单券"),
        freeCouponBuy("自购免单券"),
        freeCouponGive("赠送免单券"),
        couponReward("奖励券"),
        taoLiJin("推广红包"),
        give("赠送"),
        exchange("金币兑换"),
        couponActivate("免单券激活"),
        firstOrderReward("队员首单奖励邀请人金币"),
        systemGive("系统赠送");
        
        private final String desc;
@@ -65,7 +73,6 @@
    
    // 金币兑换信息
    private MsgOtherExchangeContentDTO exchangeContent;
    
    public MsgOtherCouponContentDTO getCoupnContent() {
        return coupnContent;
fanli/src/main/java/com/yeshi/fanli/entity/money/UserMoneyDetail.java
@@ -26,17 +26,36 @@
    }
    public enum UserMoneyDetailTypeEnum {
        share("分享奖金", "http://img.flqapp.com/resource/money_detail/icon_share.png", ""), invite("邀请奖金", "http://img.flqapp.com/resource/money_detail/icon_invite.png", ""), inviteAndShare("奖金收入", "http://img.flqapp.com/resource/money_detail/icon_share.png", ""), fanli("返利到账", "http://img.flqapp.com/resource/money_detail/icon_fanli.png",
                ""), fanliWeiQuan("返利扣除", "http://img.flqapp.com/resource/money_detail/icon_fanli.png", "http://apph5.yeshitv.com/AppPage/1.8.0/all_help_content.html?id=214"), inviteWeiQuan("邀请奖金扣除", "http://img.flqapp.com/resource/money_detail/icon_invite.png", "http://apph5.yeshitv.com/AppPage/1.8.0/all_help_content.html?id=214"), shareWeiQuan("分享奖金扣除", "http://img.flqapp.com/resource/money_detail/icon_share.png",
                        "http://apph5.yeshitv.com/AppPage/1.8.0/all_help_content.html?id=214"), weiQuan("售后订单扣款", "http://img.flqapp.com/resource/money_detail/icon_fanli.png", "http://apph5.yeshitv.com/AppPage/1.8.0/all_help_content.html?id=214"), systemEqualize("系统补齐", "http://img.flqapp.com/resource/money_detail/icon_system.png", ""), scoreConvert("金币兑换", "http://img.flqapp.com/resource/money_detail/icon_score.png",
                                ""), hongbao("官方红包", "http://img.flqapp.com/resource/money_detail/icon_hongbao.png", ""), hongbaoDeduct("红包退款", "http://img.flqapp.com/resource/money_detail/icon_hongbao.png",
                                        ""), buyScore("购买积分", "http://img.flqapp.com/resource/money_detail/icon_score.png", ""), extract("提现", "http://img.flqapp.com/resource/money_detail/icon_extract.png",
                                                ""), extractVerify("提现验证", "http://img.flqapp.com/resource/money_detail/icon_extract.png", ""), extractReject("提现被拒", "http://img.flqapp.com/resource/money_detail/icon_extract.png", ""),orderReward("返利奖励金","http://img.flqapp.com/resource/money_detail/icon_order_reward.png",""),repeatStatistic("重复统计返利/奖金扣除","http://img.flqapp.com/resource/money_detail/icon_fanli.png",""),
        share("分享奖金", "http://img.flqapp.com/resource/money_detail/icon_share.png", ""),
        invite("邀请奖金", "http://img.flqapp.com/resource/money_detail/icon_invite.png", ""),
        inviteAndShare("奖金收入", "http://img.flqapp.com/resource/money_detail/icon_share.png", ""),
        fanli("返利到账", "http://img.flqapp.com/resource/money_detail/icon_fanli.png", ""),
        fanliWeiQuan("返利扣除",
                "http://img.flqapp.com/resource/money_detail/icon_fanli.png",
                "http://apph5.yeshitv.com/AppPage/1.8.0/all_help_content.html?id=214"),
        inviteWeiQuan("邀请奖金扣除",
                "http://img.flqapp.com/resource/money_detail/icon_invite.png",
                "http://apph5.yeshitv.com/AppPage/1.8.0/all_help_content.html?id=214"),
        shareWeiQuan("分享奖金扣除",
                "http://img.flqapp.com/resource/money_detail/icon_share.png",
                "http://apph5.yeshitv.com/AppPage/1.8.0/all_help_content.html?id=214"),
        weiQuan("售后订单扣款",
                "http://img.flqapp.com/resource/money_detail/icon_fanli.png",
                "http://apph5.yeshitv.com/AppPage/1.8.0/all_help_content.html?id=214"),
        systemEqualize("系统补齐", "http://img.flqapp.com/resource/money_detail/icon_system.png", ""),
        scoreConvert("金币兑换", "http://img.flqapp.com/resource/money_detail/icon_score.png", ""),
        hongbao("官方红包", "http://img.flqapp.com/resource/money_detail/icon_hongbao.png", ""),
        hongbaoDeduct("红包退款", "http://img.flqapp.com/resource/money_detail/icon_hongbao.png", ""),
        buyScore("购买积分", "http://img.flqapp.com/resource/money_detail/icon_score.png", ""),
        extract("提现", "http://img.flqapp.com/resource/money_detail/icon_extract.png", ""),
        extractVerify("提现验证", "http://img.flqapp.com/resource/money_detail/icon_extract.png", ""),
        extractReject("提现被拒", "http://img.flqapp.com/resource/money_detail/icon_extract.png", ""),
        orderReward("返利奖励金", "http://img.flqapp.com/resource/money_detail/icon_order_reward.png", ""),
        repeatStatistic("重复统计返利/奖金扣除", "http://img.flqapp.com/resource/money_detail/icon_fanli.png", ""),
        elmeFanli("饿了么返利到账","http://img.flqapp.com/resource/money_detail/icon_fanli.png",""),
        extractAutoWX("自动提现", "http://img.flqapp.com/resource/money_detail/icon_extract.png", ""), 
        extractAutoWXRefund("自动提现失败", "http://img.flqapp.com/resource/money_detail/icon_extract.png", ""),
        subsidy("额外补贴","","");
        subsidy("额外补贴", "http://img.flqapp.com/resource/msg/icon_msg_subsidy.png", "");
        private final String desc;
        private final String picture;
@@ -221,7 +240,5 @@
    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractAuditRecordServiceImpl.java
@@ -1,7 +1,6 @@
package com.yeshi.fanli.service.impl.money.extract;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/MsgMoneyDetailServiceImpl.java
@@ -126,6 +126,13 @@
                update.setStateDesc(detail.getStateDesc());
                msgMoneyDetailMapper.updateByPrimaryKeySelective(update);
            }
        } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.subSidy) {
            if (detail.getMoney() == null || detail.getUser() == null)
                throw new MsgMoneyDetailException(2, "消息信息不全");
            detail.setCreateTime(new Date());
            detail.setUpdateTime(new Date());
            detail.setRead(false);
            msgMoneyDetailMapper.insertSelective(detail);
        }
        userMsgReadStateService.addMoneyMsgUnReadCount(detail.getUser().getId(), 1);
fanli/src/main/java/com/yeshi/fanli/service/impl/order/HongBaoV2ServiceImpl.java
@@ -313,7 +313,7 @@
                        MoneyBigDecimalUtil.mul(commonOrder.getEstimate(), fanliRate.divide(new BigDecimal(100))));
                if (mianDan)
                    hongBao.setMoney(commonOrder.getPayment());
            } else if (commonOrder.getState() == CommonOrder.STATE_JS) {
            } else if (commonOrder.getState() == CommonOrder.STATE_JS||commonOrder.getState() == CommonOrder.STATE_WQ) {
                hongBao.setState(HongBaoV2.STATE_KELINGQU);
                hongBao.setMoney(
                        MoneyBigDecimalUtil.mul(commonOrder.geteIncome(), fanliRate.divide(new BigDecimal(100))));
@@ -543,7 +543,7 @@
                hongBao.setState(HongBaoV2.STATE_BUKELINGQU);
                hongBao.setMoney(
                        MoneyBigDecimalUtil.mul(commonOrder.getEstimate(), fanliRate.divide(new BigDecimal(100))));
            } else if (commonOrder.getState() == CommonOrder.STATE_JS) {
            } else if (commonOrder.getState() == CommonOrder.STATE_JS||commonOrder.getState() == CommonOrder.STATE_WQ) {
                hongBao.setState(HongBaoV2.STATE_KELINGQU);
                hongBao.setMoney(
                        MoneyBigDecimalUtil.mul(commonOrder.geteIncome(), fanliRate.divide(new BigDecimal(100))));
@@ -591,7 +591,7 @@
                    }
                    // 以实际收入为准计算预估收益
                    if (CommonOrder.STATE_JS == commonOrder.getState()) {
                    if (CommonOrder.STATE_JS == commonOrder.getState()||CommonOrder.STATE_WQ == commonOrder.getState()) {
                        childUpdate.setMoney(
                                MoneyBigDecimalUtil.mul(hongBao.getMoney(), rate.divide(new BigDecimal(100))));
                        if (commonOrder.getThirdCreateTime().getTime() > TimeUtil.convertToTimeTemp("2019-04-16",
@@ -691,7 +691,7 @@
                hongBao.setState(HongBaoV2.STATE_BUKELINGQU);
                hongBao.setMoney(
                        MoneyBigDecimalUtil.mul(commonOrder.getEstimate(), fanliRate.divide(new BigDecimal(100))));
            } else if (commonOrder.getState() == CommonOrder.STATE_JS) {
            } else if (commonOrder.getState() == CommonOrder.STATE_JS||CommonOrder.STATE_WQ == commonOrder.getState()) {
                hongBao.setState(HongBaoV2.STATE_KELINGQU);
                hongBao.setMoney(
                        MoneyBigDecimalUtil.mul(commonOrder.geteIncome(), fanliRate.divide(new BigDecimal(100))));
@@ -898,7 +898,7 @@
                hongBao.setState(HongBaoV2.STATE_BUKELINGQU);
                hongBao.setMoney(
                        MoneyBigDecimalUtil.mul(commonOrder.getEstimate(), shareRate.divide(new BigDecimal(100))));
            } else if (commonOrder.getState() == CommonOrder.STATE_JS) {
            } else if (commonOrder.getState() == CommonOrder.STATE_JS||commonOrder.getState() == CommonOrder.STATE_WQ) {
                hongBao.setState(HongBaoV2.STATE_KELINGQU);
                hongBao.setMoney(
                        MoneyBigDecimalUtil.mul(commonOrder.geteIncome(), shareRate.divide(new BigDecimal(100))));
@@ -950,7 +950,7 @@
                        child.setState(HongBaoV2.STATE_BUKELINGQU);
                        child.setMoney(MoneyBigDecimalUtil.mul(commonOrder.getEstimate(),
                                firstLevelRate.divide(new BigDecimal(100))));
                    } else if (commonOrder.getState() == CommonOrder.STATE_JS) {
                    } else if (commonOrder.getState() == CommonOrder.STATE_JS||commonOrder.getState() == CommonOrder.STATE_WQ) {
                        child.setState(HongBaoV2.STATE_KELINGQU);
                        child.setMoney(MoneyBigDecimalUtil.mul(commonOrder.geteIncome(),
                                firstLevelRate.divide(new BigDecimal(100))));
fanli/src/main/java/com/yeshi/fanli/service/impl/order/tb/TaoBaoWeiQuanOrderServiceImpl.java
@@ -12,6 +12,7 @@
import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail.MsgTypeOrderTypeEnum;
import com.yeshi.fanli.entity.order.CommonOrder;
import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
import com.yeshi.fanli.service.inter.order.CommonOrderService;
import com.yeshi.fanli.service.inter.order.msg.MsgOrderDetailService;
import com.yeshi.fanli.service.inter.order.msg.UserOrderMsgNotificationService;
import com.yeshi.fanli.service.inter.order.tb.TaoBaoWeiQuanOrderService;
@@ -27,6 +28,9 @@
    @Resource
    private MsgOrderDetailService msgOrderDetailService;
    @Resource
    private CommonOrderService commonOrderService;
    @Override
    public void addWeiQuanOrder(TaoBaoWeiQuanOrder order) {
@@ -53,6 +57,16 @@
            try {
                if (order.getState().contains("维权成功")) {
                    // 更改CommonOrder的状态
                    CommonOrder commonOrder = commonOrderService
                            .selectBySourceTypeAndTradeId(Constant.SOURCE_TYPE_TAOBAO, order.getOrderItemId());
                    if (commonOrder != null) {
                        CommonOrder updateCommonOrder = new CommonOrder(commonOrder.getId());
                        updateCommonOrder.setState(CommonOrder.STATE_WQ);
                        updateCommonOrder.setUpdateTime(new Date());
                        commonOrderService.updateByPrimaryKeySelective(updateCommonOrder);
                    }
                    List<MsgOrderDetail> msgList = msgOrderDetailService.listMsgOrderByOrderId(order.getOrderId());
                    for (MsgOrderDetail msg : msgList) {
                        if (msg.getType() == MsgTypeOrderTypeEnum.fanli) {
fanli/src/main/java/com/yeshi/fanli/util/factory/UserMoneyDetailFactory.java
@@ -590,7 +590,7 @@
                StringUtil.Md5(UserMoneyDetailTypeEnum.subsidy.name() + "-" + orderType + "-" + uid + "-" + timeF));
        detail.setMoney(money);
        detail.setTitle(
                timeF + UserMoneyDetailTypeEnum.subsidy.getDesc() + "[" + Constant.getSourceName(orderType) + "]");
                timeF + UserMoneyDetailTypeEnum.subsidy.getDesc() + "【" + Constant.getSourceName(orderType) + "】");
        detail.setType(UserMoneyDetailTypeEnum.subsidy);
        detail.setDescInfo("邀请订单补贴");
        detail.setUpdateTime(new Date());
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java
@@ -581,7 +581,7 @@
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO("http://img.flqapp.com/resource/money_detail/icon_system.png",
            return new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_subsidy.png",
                    msg.getMsgType().getDesc(), msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(),
                    items);
        }