yujian
2020-06-29 c2e3dea0d75b7239b1ed66c9d9e1bbb177050858
Merge remote-tracking branch 'origin/div' into div
7个文件已修改
1个文件已添加
153 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dto/mq/order/body/OrderMQMsg.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/UserMoneyMsgNotificationServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderProcessServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/money/msg/UserMoneyMsgNotificationService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/manger/money/TeamEincomeManager.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/vo/recommend/RecommendJumpInfoVO.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -31,6 +31,7 @@
import com.yeshi.fanli.dto.vip.VIPSearchResult;
import com.yeshi.fanli.dto.vip.goods.VIPGoodsInfo;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.activity.RecommendActivity;
import com.yeshi.fanli.entity.bus.help.AppPageNotification;
import com.yeshi.fanli.entity.goods.CommonGoods;
import com.yeshi.fanli.entity.jd.JDGoods;
@@ -84,8 +85,10 @@
import com.yeshi.fanli.vo.common.JumpDetailContentVO;
import com.yeshi.fanli.vo.goods.GoodsDetailVO;
import com.yeshi.fanli.vo.msg.TokenVO;
import com.yeshi.fanli.vo.recommend.RecommendJumpInfoVO;
import com.yeshi.fanli.vo.search.GoodsDocParseResultVO;
import net.sf.json.JSON;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -292,6 +295,12 @@
                                                                orderHongBaoMoneyComputeService.getShowComputeRate(
                                                                        acceptData.getPlatform(),
                                                                        acceptData.getVersion()))));
                                        // 跳转详情
                                        if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(),
                                                acceptData.getVersion())) {
                                            buildGoodsClick(data, goods, acceptData, gson);
                                        }
                                        out.print(JsonUtil.loadTrueResult(data));
                                        return;
                                    }
@@ -306,6 +315,10 @@
                                                            orderHongBaoMoneyComputeService.getShowComputeRate(
                                                                    acceptData.getPlatform(),
                                                                    acceptData.getVersion()))));
//                                    if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(),
//                                            acceptData.getVersion())) {
//                                        buildGoodsClick(data, goods, acceptData, gson);
//                                    }
                                    out.print(JsonUtil.loadTrueResult(data));
                                    return;
                                }
@@ -367,6 +380,47 @@
                });
    }
    private void buildGoodsClick(JSONObject data, CommonGoods goods, AcceptData acceptData, Gson gson) {
        JSONObject params = new JSONObject();
        params.put("id", goods.getGoodsId() + "");
        params.put("from", "猜你喜欢");
        String type="";
        switch(goods.getGoodsType()){
        case Constant.SOURCE_TYPE_TAOBAO:
            type="goodsdetail";
            break;
        case Constant.SOURCE_TYPE_JD:
            type="goodsdetail_jd";
            break;
        case Constant.SOURCE_TYPE_PDD:
            type="goodsdetail_pdd";
            break;
        case Constant.SOURCE_TYPE_VIP:
            type="goodsdetail_vip";
            break;
        case Constant.SOURCE_TYPE_SUNING:
            type="goodsdetail_suning";
            break;
        }
        RecommendJumpInfoVO left = new RecommendJumpInfoVO(
                "去看看", jumpDetailV2Service.getByTypeCache(type,
                        Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion())),
                params);
        data.put("left", gson.toJson(left));
        // 去网页
        params = new JSONObject();
        params.put("url", "http://www.baidu.com");
        RecommendJumpInfoVO right = new RecommendJumpInfoVO("有更高返利?", jumpDetailV2Service.getByTypeCache("web",
                Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion())), params);
        data.put("right", gson.toJson(right));
    }
    /**
     * 口令领取
     * 
fanli/src/main/java/com/yeshi/fanli/dto/mq/order/body/OrderMQMsg.java
@@ -22,10 +22,11 @@
    private boolean valid;
    private int delayHour;// 延时的时间(小时记)
    private Date staticticDate;// 统计到的时间
    private Date placeTime;//下单时间
    private boolean miandan;
    public OrderMQMsg(String orderId, Integer type, Long uid, int handleType, boolean valid, int delayHour,
            Date staticticDate, boolean miandan) {
            Date staticticDate, boolean miandan,Date placeTime) {
        super();
        this.orderId = orderId;
        this.type = type;
@@ -35,6 +36,15 @@
        this.delayHour = delayHour;
        this.staticticDate = staticticDate;
        this.miandan = miandan;
        this.placeTime=placeTime;
    }
    public Date getPlaceTime() {
        return placeTime;
    }
    public void setPlaceTime(Date placeTime) {
        this.placeTime = placeTime;
    }
    public Date getStaticticDate() {
fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/UserMoneyMsgNotificationServiceImpl.java
@@ -238,8 +238,8 @@
    }
    @Override
    public void teamReceive(Long uid, BigDecimal money, BigDecimal balance, Date receivedDate) {
        MsgMoneyDetail detail = MsgMoneyDetailFactory.createTeamReceivedMsg(uid, money, balance, receivedDate, "团队收益");
    public void teamRewardReceive(Long uid, BigDecimal money, BigDecimal balance, Date receivedDate) {
        MsgMoneyDetail detail = MsgMoneyDetailFactory.createTeamReceivedMsg(uid, money, balance, receivedDate, "团队奖金");
        try {
            msgMoneyDetailService.addMsgMoneyDetail(detail);
        } catch (MsgMoneyDetailException e) {
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderProcessServiceImpl.java
@@ -1697,7 +1697,7 @@
        if (!Constant.IS_TEST)
            if (result.getResultCode() == HongBaoAddResult.CODE_ADD) {// 只发送新增消息
                OrderMQMsg mqMsg = new OrderMQMsg(orderId, sourceType, uid, OrderMQMsg.HANDLE_TYPE_ADD,
                        isCommonOrderValid(coList), 0, new Date(), result.isMiandan());
                        isCommonOrderValid(coList), 0, new Date(), result.isMiandan(),coList.get(0).getThirdCreateTime());
                Message msg = MQMsgBodyFactory.create(MQTopicName.TOPIC_ORDER, OrderTopicTagEnum.orderStatistic, mqMsg);
                producer.send(msg);
            }
fanli/src/main/java/com/yeshi/fanli/service/inter/money/msg/UserMoneyMsgNotificationService.java
@@ -143,13 +143,13 @@
    
    
    /**
     * 团队收益消息
     * 团队奖金消息
     * @param uid
     * @param money 本次到账金额
     * @param balance 余额
     * @param receivedDate  结算月度
     */
    public void teamReceive(Long uid, BigDecimal money, BigDecimal balance, Date receivedDate);
    public void teamRewardReceive(Long uid, BigDecimal money, BigDecimal balance, Date receivedDate);
    /**
     * 使用奖励券
fanli/src/main/java/com/yeshi/fanli/service/manger/money/TeamEincomeManager.java
@@ -94,7 +94,7 @@
    /**
     * @throws UserMoneyDetailException 
     * 团队收益 到账到用户余额
     * 团队奖金 到账到用户余额
     * @Title: addTOUserAccount
     * @Description: 
     * @param day
@@ -103,10 +103,8 @@
     * @throws
     */
    @Transactional(rollbackFor = Exception.class)
    public void addTeamIncomeTOUserAccount(Date preSendTime, Long uid) throws UserMoneyDetailException {
    public void addTeamRewardTOUserAccount(Date preSendTime, Long uid) throws UserMoneyDetailException {
        List<Integer> typeList = new ArrayList<>();
        typeList.add(TeamEincomeRecord.TYPE_TEAM_SUBSIDY);
        typeList.add(TeamEincomeRecord.TYPE_TEAM_REWARD);
        Date now = new Date();
@@ -123,13 +121,24 @@
        userMoneyService.addUserMoney(uid, money, detail);
        // 发送消息
        BigDecimal balance = userMoneyService.getBalance(uid);
        userMoneyMsgNotificationService.teamReceive(uid, money, balance, now);
        userMoneyMsgNotificationService.teamRewardReceive(uid, money, balance, now);
    }
    /**
     * 团队分红到账
     * @Title: addTeamDividentsTOUserAccount
     * @Description:
     * @param preSendTime
     * @param uid
     * @throws UserMoneyDetailException
     * void 返回类型
     * @throws
     */
    @Transactional(rollbackFor = Exception.class)
    public void addTeamDividentsTOUserAccount(Date preSendTime, Long uid) throws UserMoneyDetailException {
        List<Integer> typeList = new ArrayList<>();
        typeList.add(TeamEincomeRecord.TYPE_TEAM_DIVIDENTS);
        typeList.add(TeamEincomeRecord.TYPE_TEAM_SUBSIDY);
        Date now = new Date();
        List<TeamEincomeRecord> list = teamEincomeRecordService.listCanRecieveRecord(preSendTime, uid, typeList);
        BigDecimal money = new BigDecimal(0);
fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java
@@ -203,7 +203,7 @@
            doOrderTeamIncomePreFanLi();// 处理订单提成返利
            doDividentsPreJob();
            doOrderTeamIncomeFanLi();
            doOrderTeamRewardFanLi();
            doDividentsJob();
        }
        
@@ -429,9 +429,9 @@
    }
    /**
     * 处理团队订单返利
     * 处理团队奖金返利
     */
    public void doOrderTeamIncomeFanLi() {
    public void doOrderTeamRewardFanLi() {
        executor.execute(new Runnable() {
            @Override
            public void run() {
@@ -444,7 +444,7 @@
                                String handler = its.next();
                                try {
                                    UidDateDTO dto = map.get(handler);
                                    teamEincomeManager.addTeamIncomeTOUserAccount(dto.getDate(), dto.getUid());
                                    teamEincomeManager.addTeamRewardTOUserAccount(dto.getDate(), dto.getUid());
                                    TeamOrderCMQManager.getInstance().deleteTeamIncomeMsg(handler);
                                } catch (Exception e) {
                                    try {
fanli/src/main/java/com/yeshi/fanli/vo/recommend/RecommendJumpInfoVO.java
New file
@@ -0,0 +1,50 @@
package com.yeshi.fanli.vo.recommend;
import com.google.gson.annotations.Expose;
import com.yeshi.fanli.entity.common.JumpDetailV2;
import net.sf.json.JSONObject;
public class RecommendJumpInfoVO {
    @Expose
    private String name;// 按钮名称
    @Expose
    private JumpDetailV2 jumpDetail;// 跳转
    @Expose
    private JSONObject params;// 参数
    public RecommendJumpInfoVO(String name, JumpDetailV2 jumpDetail, JSONObject params) {
        super();
        this.name = name;
        this.jumpDetail = jumpDetail;
        this.params = params;
    }
    public RecommendJumpInfoVO() {
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public JumpDetailV2 getJumpDetail() {
        return jumpDetail;
    }
    public void setJumpDetail(JumpDetailV2 jumpDetail) {
        this.jumpDetail = jumpDetail;
    }
    public JSONObject getParams() {
        return params;
    }
    public void setParams(JSONObject params) {
        this.params = params;
    }
}