Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div
| | |
| | | private Integer goodsCount;// 商品数
|
| | | @Column(name = "mm_order_id")
|
| | | private String orderId;// 订单号(返利适用)
|
| | | @Column(name = "mm_order_type")
|
| | | private Integer orderType;
|
| | | @Column(name = "mm_source_id")
|
| | | private Extract extract;// 提现详情
|
| | | private AlipayAccountValidNormalHistory alipayAccountValid;// 提现账号验证详情
|
| | |
| | | this.alipayAccountValid = alipayAccountValid;
|
| | | }
|
| | |
|
| | | public Integer getOrderType() {
|
| | | return orderType;
|
| | | }
|
| | |
|
| | | public void setOrderType(Integer orderType) {
|
| | | this.orderType = orderType;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | private MsgTypeOrderTypeEnum type;// 消息类型
|
| | | @Column(name = "mo_order_id")
|
| | | private String orderId;// 订单号
|
| | | @Column(name = "mo_order_type")
|
| | | private Integer orderType;// 订单类型
|
| | | @Column(name = "mo_state")
|
| | | private Integer state;// 状态
|
| | | @Column(name = "mo_goods_count")
|
| | |
| | | this.happendDate = happendDate;
|
| | | }
|
| | |
|
| | | public Integer getOrderType() {
|
| | | return orderType;
|
| | | }
|
| | |
|
| | | public void setOrderType(Integer orderType) {
|
| | | this.orderType = orderType;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | <result column="mm_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="mm_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | <result column="mm_read" property="read" jdbcType="BOOLEAN" /> |
| | | <association property="user" column="mm_uid" javaType="com.yeshi.fanli.entity.bus.user.UserInfo"> |
| | | <result column="mm_order_type" property="orderType" jdbcType="INTEGER" /> |
| | | <association property="user" column="mm_uid" |
| | | javaType="com.yeshi.fanli.entity.bus.user.UserInfo"> |
| | | <id column="mm_uid" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | <association property="extract" column="mm_source_id_extract" |
| | | select="com.yeshi.fanli.dao.mybatis.ExtractMapper.selectByPrimaryKey"> |
| | | </association> |
| | | select="com.yeshi.fanli.dao.mybatis.ExtractMapper.selectByPrimaryKey" /> |
| | | <association property="alipayAccountValid" column="mm_source_id_alipayvalid" |
| | | select="com.yeshi.fanli.dao.mybatis.AlipayAccountValidNormalHistoryMapper.selectByPrimaryKey"> |
| | | </association> |
| | | select="com.yeshi.fanli.dao.mybatis.AlipayAccountValidNormalHistoryMapper.selectByPrimaryKey" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">mm_id,mm_uid,mm_type,mm_order_count,mm_goods_count,mm_order_id,mm_source_id,mm_money,mm_balance,mm_state_desc,mm_beizhu,mm_create_time,mm_update_time,mm_read |
| | | <sql id="Base_Column_List">mm_id,mm_uid,mm_type,mm_order_count,mm_goods_count,mm_order_id,mm_source_id,mm_money,mm_balance,mm_state_desc,mm_beizhu,mm_create_time,mm_update_time,mm_read,mm_order_type |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_money where mm_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectBySourceIdAndMsgType" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_money where mm_source_id = |
| | | #{sourceId,jdbcType=BIGINT} and mm_type=#{type} |
| | | </select> |
| | | |
| | | |
| | | <select id="listByUid" resultMap="BaseResultMap" > |
| | | <select id="listByUid" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" />, |
| | | mm_source_id as mm_source_id_extract, |
| | | mm_source_id as mm_source_id_alipayvalid |
| | | from yeshi_ec_msg_money where mm_uid = #{uid,jdbcType=BIGINT} order by |
| | | mm_update_time desc limit #{start},#{count} |
| | | <include refid="Base_Column_List" /> |
| | | , mm_source_id as mm_source_id_extract, mm_source_id as |
| | | mm_source_id_alipayvalid from yeshi_ec_msg_money where mm_uid = |
| | | #{uid,jdbcType=BIGINT} order by mm_update_time desc limit |
| | | #{start},#{count} |
| | | </select> |
| | | |
| | | |
| | | <select id="countByUid" resultType="java.lang.Long" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | count(mm_id) |
| | | from yeshi_ec_msg_money where mm_uid = |
| | | #{uid,jdbcType=BIGINT} |
| | | parameterType="java.lang.Long">select count(mm_id) from yeshi_ec_msg_money where mm_uid |
| | | = #{uid,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_msg_money where mm_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_msg_money |
| | | (mm_id,mm_uid,mm_type,mm_order_count,mm_goods_count,mm_order_id,mm_source_id,mm_money,mm_balance,mm_state_desc,mm_beizhu,mm_create_time,mm_update_time,mm_read) |
| | | (mm_id,mm_uid,mm_type,mm_order_count,mm_goods_count,mm_order_id,mm_source_id,mm_money,mm_balance,mm_state_desc,mm_beizhu,mm_create_time,mm_update_time,mm_read,mm_order_type) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{msgType,jdbcType=VARCHAR},#{orderCount,jdbcType=INTEGER},#{goodsCount,jdbcType=INTEGER},#{orderId,jdbcType=VARCHAR},#{extract.id,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{balance,jdbcType=DECIMAL},#{stateDesc,jdbcType=VARCHAR},#{beiZhu,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{read,jdbcType=BOOLEAN}) |
| | | (#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{msgType,jdbcType=VARCHAR},#{orderCount,jdbcType=INTEGER},#{goodsCount,jdbcType=INTEGER},#{orderId,jdbcType=VARCHAR},#{extract.id,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{balance,jdbcType=DECIMAL},#{stateDesc,jdbcType=VARCHAR},#{beiZhu,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{read,jdbcType=BOOLEAN},#{orderType,jdbcType=INTEGER}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | |
| | | <if test="createTime != null">mm_create_time,</if> |
| | | <if test="updateTime != null">mm_update_time,</if> |
| | | <if test="read != null">mm_read,</if> |
| | | <if test="orderType != null">mm_order_type,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="read != null">#{read,jdbcType=BOOLEAN},</if> |
| | | <if test="orderType != null">#{orderType,jdbcType=INTEGER}</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail">update |
| | |
| | | #{beiZhu,jdbcType=VARCHAR},mm_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},mm_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP},mm_read = #{read,jdbcType=BOOLEAN} |
| | | where mm_id = #{id,jdbcType=BIGINT} |
| | | ,mm_order_type =#{orderType,jdbcType=INTEGER} where mm_id = |
| | | #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail"> |
| | | update yeshi_ec_msg_money |
| | |
| | | <if test="createTime != null">mm_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">mm_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="read != null">mm_read=#{read,jdbcType=BOOLEAN},</if> |
| | | <if test="orderType !=null">mm_order_type =#{orderType,jdbcType=INTEGER},</if> |
| | | </set> |
| | | where mm_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | |
| | | <update id="setMsgReadByUid" parameterType="java.lang.Long"> |
| | | update |
| | | <update id="setMsgReadByUid" parameterType="java.lang.Long">update |
| | | yeshi_ec_msg_money set mm_read=1 where mm_uid=#{0} |
| | | </update> |
| | | |
| | | </mapper> |
| | |
| | | <result column="mo_read" property="read" jdbcType="BOOLEAN" /> |
| | | <result column="mo_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="mo_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | <result column="mo_happen_date" property="happendDate" jdbcType="TIMESTAMP" /> |
| | | <association property="user" column="mo_uid" javaType="com.yeshi.fanli.entity.bus.user.UserInfo"> |
| | | <result column="mo_happen_date" property="happendDate" |
| | | jdbcType="TIMESTAMP" /> |
| | | <result column="mo_order_type" property="orderType" jdbcType="INTEGER" /> |
| | | <association property="user" column="mo_uid" |
| | | javaType="com.yeshi.fanli.entity.bus.user.UserInfo"> |
| | | <id column="mo_uid" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | |
| | | |
| | | |
| | | </resultMap> |
| | | <sql id="Base_Column_List">mo_id,mo_uid,mo_type,mo_order_id,mo_state,mo_goods_count,mo_pay_money,mo_hongbao_money,mo_beizhu,mo_read,mo_create_time,mo_update_time,mo_happen_date |
| | | <sql id="Base_Column_List">mo_id,mo_uid,mo_type,mo_order_id,mo_state,mo_goods_count,mo_pay_money,mo_hongbao_money,mo_beizhu,mo_read,mo_create_time,mo_update_time,mo_happen_date,mo_order_type |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_order where mo_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectByUidAndOrderId" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_order where mo_uid = #{uid,jdbcType=BIGINT} and |
| | | mo_order_id=#{orderId} |
| | | </select> |
| | | |
| | | |
| | | <select id="listByOrderId" resultMap="BaseResultMap" parameterType="java.lang.String"> |
| | | <select id="listByOrderId" resultMap="BaseResultMap" |
| | | parameterType="java.lang.String"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_order where mo_order_id = #{orderId} |
| | | </select> |
| | | |
| | | |
| | | <select id="listByUid" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_msg_order where mo_uid = #{uid,jdbcType=BIGINT} order by |
| | | mo_update_time desc limit #{start},#{count} |
| | | </select> |
| | | |
| | | <select id="countByUid" resultType="java.lang.Long" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | count(mo_id) |
| | | from yeshi_ec_msg_order where mo_uid = |
| | | #{uid,jdbcType=BIGINT} |
| | | parameterType="java.lang.Long">select count(mo_id) from yeshi_ec_msg_order where mo_uid |
| | | = #{uid,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_msg_order where mo_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | |
| | | |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.msg.MsgOrderDetail" |
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_msg_order |
| | | (mo_id,mo_uid,mo_type,mo_order_id,mo_state,mo_goods_count,mo_pay_money,mo_hongbao_money,mo_beizhu,mo_read,mo_create_time,mo_update_time,mo_happen_date) |
| | | (mo_id,mo_uid,mo_type,mo_order_id,mo_state,mo_goods_count,mo_pay_money,mo_hongbao_money,mo_beizhu,mo_read,mo_create_time,mo_update_time,mo_happen_date,mo_order_type) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{orderId,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{goodsCount,jdbcType=INTEGER},#{payMoney,jdbcType=DECIMAL},#{hongBaoMoney,jdbcType=DECIMAL},#{beiZhu,jdbcType=VARCHAR},#{read,jdbcType=BOOLEAN},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{happendDate,jdbcType=TIMESTAMP}) |
| | | (#{id,jdbcType=BIGINT},#{user.id,jdbcType=BIGINT},#{type,jdbcType=VARCHAR},#{orderId,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{goodsCount,jdbcType=INTEGER},#{payMoney,jdbcType=DECIMAL},#{hongBaoMoney,jdbcType=DECIMAL},#{beiZhu,jdbcType=VARCHAR},#{read,jdbcType=BOOLEAN},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{happendDate,jdbcType=TIMESTAMP},#{orderType,jdbcType=INTEGER}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgOrderDetail" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | |
| | | <if test="createTime != null">mo_create_time,</if> |
| | | <if test="updateTime != null">mo_update_time,</if> |
| | | <if test="happendDate != null">mo_happen_date,</if> |
| | | |
| | | |
| | | |
| | | <if test="orderType != null">mo_order_type,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="happendDate != null">#{happendDate,jdbcType=TIMESTAMP},</if> |
| | | <if test="orderType != null">#{orderType,jdbcType=INTEGER}</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.msg.MsgOrderDetail">update |
| | |
| | | #{beiZhu,jdbcType=VARCHAR},mo_read = |
| | | #{read,jdbcType=BOOLEAN},mo_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},mo_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP},mo_happen_date=#{happendDate,jdbcType=TIMESTAMP} where mo_id = #{id,jdbcType=BIGINT} |
| | | |
| | | #{updateTime,jdbcType=TIMESTAMP},mo_happen_date=#{happendDate,jdbcType=TIMESTAMP} |
| | | ,mo_order_type =#{orderType,jdbcType=INTEGER} where mo_id = |
| | | #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.msg.MsgOrderDetail"> |
| | | update yeshi_ec_msg_order |
| | |
| | | <if test="createTime != null">mo_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">mo_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="happendDate != null">mo_happen_date=#{happendDate,jdbcType=TIMESTAMP},</if> |
| | | <if test="orderType !=null">mo_order_type =#{orderType,jdbcType=INTEGER},</if> |
| | | </set> |
| | | where mo_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | |
| | | <update id="setMsgReadByUid" parameterType="java.lang.Long"> |
| | | update |
| | | <update id="setMsgReadByUid" parameterType="java.lang.Long">update |
| | | yeshi_ec_msg_order set mo_read=1 where mo_uid=#{0} |
| | | </update> |
| | | </mapper> |
| | |
| | | public void addHongBao(List<CommonOrder> commonOrderList, int type) throws HongBaoException {
|
| | | Set<Integer> stateSet = new HashSet<>();// 订单状态Set
|
| | | if (commonOrderList != null && commonOrderList.size() > 0) {
|
| | | int orderType = commonOrderList.get(0).getSourceType();
|
| | |
|
| | | Map<Integer, HongBaoOrder> notificationMap = new HashMap<>();
|
| | | int goodsCount = 0;
|
| | | boolean hasAdd = false;
|
| | |
| | | BigDecimal money = notify.getMoney();
|
| | | switch (t) {
|
| | | case HongBaoV2.TYPE_ZIGOU:
|
| | | userOrderMsgNotificationService.orderFanLiStatistic(uid, orderId, commonOrder.getPayment(),
|
| | | userOrderMsgNotificationService.orderFanLiStatistic(uid, orderId, orderType,commonOrder.getPayment(),
|
| | | money, goodsCount, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_SHARE_GOODS:
|
| | | userNotificationService.orderShareStatisticed(uid, orderId, goodsCount, MsgOrderDetail.STATE_FK,
|
| | | null, money);
|
| | | userOrderMsgNotificationService.orderShareStatistic(uid, orderId, commonOrder.getPayment(),
|
| | | userOrderMsgNotificationService.orderShareStatistic(uid, orderId,orderType, commonOrder.getPayment(),
|
| | | money, goodsCount, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_YIJI:
|
| | | userNotificationService.orderInviteStatisticed(uid, orderId, goodsCount,
|
| | | MsgOrderDetail.STATE_FK, null, money);
|
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, commonOrder.getPayment(),
|
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId,orderType, commonOrder.getPayment(),
|
| | | money, goodsCount, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_ERJI:
|
| | | userNotificationService.orderInviteStatisticed(uid, orderId, goodsCount,
|
| | | MsgOrderDetail.STATE_FK, null, money);
|
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, commonOrder.getPayment(),
|
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId,orderType, commonOrder.getPayment(),
|
| | | money, goodsCount, state);
|
| | | break;
|
| | |
|
| | | case HongBaoV2.TYPE_SHARE_YIJI:
|
| | | userOrderMsgNotificationService.orderShareFirstLevelStatistic(uid, orderId,
|
| | | userOrderMsgNotificationService.orderShareFirstLevelStatistic(uid, orderId,orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state, notify.getBeizhu());
|
| | | break;
|
| | | }
|
| | |
| | | BigDecimal money = notify.getMoney();
|
| | | switch (t) {
|
| | | case HongBaoV2.TYPE_ZIGOU:
|
| | | userOrderMsgNotificationService.orderFanLiStateChanged(uid, orderId, commonOrder.getPayment(),
|
| | | userOrderMsgNotificationService.orderFanLiStateChanged(uid, orderId,orderType, commonOrder.getPayment(),
|
| | | money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_SHARE_GOODS:
|
| | | userOrderMsgNotificationService.orderShareStateChanged(uid, orderId, commonOrder.getPayment(),
|
| | | userOrderMsgNotificationService.orderShareStateChanged(uid, orderId,orderType, commonOrder.getPayment(),
|
| | | money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_YIJI:
|
| | | userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, commonOrder.getPayment(),
|
| | | userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId,orderType, commonOrder.getPayment(),
|
| | | money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_ERJI:
|
| | | userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, commonOrder.getPayment(),
|
| | | userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId,orderType, commonOrder.getPayment(),
|
| | | money, state);
|
| | | break;
|
| | | case HongBaoV2.TYPE_SHARE_YIJI:
|
| | | userOrderMsgNotificationService.orderShareFirstLevelStateChanged(uid, orderId,
|
| | | userOrderMsgNotificationService.orderShareFirstLevelStateChanged(uid, orderId,orderType,
|
| | | commonOrder.getPayment(), money, state);
|
| | | }
|
| | | }
|
| | |
| | | payMent = commonOrder.getSettlement();
|
| | |
|
| | | if (payMent.compareTo(new BigDecimal(10)) < 0) {
|
| | | mianDan = userSystemCouponRecordService.isSuccessMianDan(commonOrder.getSourceType(),commonOrder.getOrderNo());
|
| | | mianDan = userSystemCouponRecordService.isSuccessMianDan(commonOrder.getSourceType(),
|
| | | commonOrder.getOrderNo());
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoWeiQuanDrawBackService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserMoneyService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.factory.UserMoneyDetailFactory;
|
| | |
|
| | | @Service
|
| | |
| | | }
|
| | |
|
| | | // 新版通知
|
| | | userMoneyMsgNotificationService.fanliOrderWeiQuan(uid, weiQuanDrawBack.getOrderId(), money,
|
| | | userMoneyMsgNotificationService.fanliOrderWeiQuan(uid, weiQuanDrawBack.getOrderId(),Constant.SOURCE_TYPE_TAOBAO, money,
|
| | | userInfoService.getBalance(uid));
|
| | |
|
| | | break;
|
| | |
| | | weiQuanDrawBack, money);
|
| | | userMoneyService.subUserMoney(uid, money, userMoneyDetail);
|
| | |
|
| | | userMoneyMsgNotificationService.shareOrderWeiQuan(debt.getUid(), weiQuanDrawBack.getOrderId(),
|
| | | userMoneyMsgNotificationService.shareOrderWeiQuan(debt.getUid(), weiQuanDrawBack.getOrderId(),Constant.SOURCE_TYPE_TAOBAO,
|
| | | money, userInfoService.getBalance(uid));
|
| | |
|
| | | } catch (UserMoneyDetailException e) {
|
| | |
| | | }
|
| | |
|
| | | // 新版通知
|
| | | userMoneyMsgNotificationService.inviteOrderWeiQuan(uid, weiQuanDrawBack.getOrderId(), money,
|
| | | userMoneyMsgNotificationService.inviteOrderWeiQuan(uid, weiQuanDrawBack.getOrderId(),Constant.SOURCE_TYPE_TAOBAO, money,
|
| | | userInfoService.getBalance(uid));
|
| | | break;
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void fanliOrderReceived(Long uid, String orderId, int goodsCount, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createFailiMsg(money, balance, orderId, goodsCount, uid, null);
|
| | | public void fanliOrderReceived(Long uid, String orderId, int orderType, int goodsCount, BigDecimal money,
|
| | | BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createFailiMsg(money, balance, orderId, orderType, goodsCount,
|
| | | uid, null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void fanliOrderWeiQuan(Long uid, String orderId, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createFailiWeiQuanMsg(uid, orderId, money, balance, null);
|
| | | public void fanliOrderWeiQuan(Long uid, String orderId, int orderType, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createFailiWeiQuanMsg(uid, orderId, orderType, money, balance,
|
| | | null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void shareOrderReceived(Long uid, int orderCount, int goodsCount, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createShareMsg(money, balance, orderCount, goodsCount, uid, null);
|
| | | public void shareOrderReceived(Long uid, int orderType, int orderCount, int goodsCount, BigDecimal money,
|
| | | BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createShareMsg(money, balance, orderType, orderCount, goodsCount,
|
| | | uid, null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void shareOrderWeiQuan(Long uid, String orderId, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createShareWeiQuanMsg(uid, orderId, money, balance, null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void inviteOrderReceived(Long uid, int orderCount, int goodsCount, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createInviteMsg(money, balance, orderCount, goodsCount, uid,
|
| | | public void shareOrderWeiQuan(Long uid, String orderId, int orderType, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createShareWeiQuanMsg(uid, orderId, orderType, money, balance,
|
| | | null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void inviteOrderWeiQuan(Long uid, String orderId, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createInviteWeiQuanMsg(uid, orderId, money, balance, null);
|
| | | public void inviteOrderReceived(Long uid, int orderType, int orderCount, int goodsCount, BigDecimal money,
|
| | | BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createInviteMsg(money, balance, orderType, orderCount, goodsCount,
|
| | | uid, null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderReward(Long uid, String orderId, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createOrderRewardMsg(uid, orderId, money, balance, null);
|
| | | public void inviteOrderWeiQuan(Long uid, String orderId, int orderType, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createInviteWeiQuanMsg(uid, orderId, orderType, money, balance,
|
| | | null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderReward(Long uid, String orderId, int orderType, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createOrderRewardMsg(uid, orderId, orderType, money, balance,
|
| | | null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | |
| | | private PushService pushService;
|
| | |
|
| | | @Override
|
| | | public void orderFanLiStatistic(Long uid, String orderId, BigDecimal payMoney, BigDecimal money, int goodsCount,
|
| | | int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createFanLiOrder(uid, orderId, goodsCount, orderState, payMoney,
|
| | | money, null);
|
| | | public void orderFanLiStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int goodsCount, int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createFanLiOrder(uid, orderId, orderType, goodsCount, orderState,
|
| | | payMoney, money, null);
|
| | | try {
|
| | | msgOrderDetailService.addMsgOrderDetail(detail,
|
| | | (payMoney == null || payMoney.compareTo(new BigDecimal(0)) <= 0) ? false : true);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderFanLiStateChanged(Long uid, String orderId, BigDecimal payMoney, BigDecimal money,
|
| | | public void orderFanLiStateChanged(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createFanLiOrder(uid, orderId, 0, orderState, payMoney, money,
|
| | | null);
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createFanLiOrder(uid, orderId, orderType, 0, orderState, payMoney,
|
| | | money, null);
|
| | | // 暂时不推送
|
| | | try {
|
| | | msgOrderDetailService.updateMsgOrderDetail(detail, false);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderShareStatistic(Long uid, String orderId, BigDecimal payMoney, BigDecimal money, int goodsCount,
|
| | | int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createShareOrder(uid, orderId, goodsCount, orderState, payMoney,
|
| | | money, null);
|
| | | public void orderShareStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int goodsCount, int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createShareOrder(uid, orderId, orderType, goodsCount, orderState,
|
| | | payMoney, money, null);
|
| | | try {
|
| | | msgOrderDetailService.addMsgOrderDetail(detail,
|
| | | (payMoney == null || payMoney.compareTo(new BigDecimal(0)) <= 0) ? false : true);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderShareStateChanged(Long uid, String orderId, BigDecimal payMoney, BigDecimal money,
|
| | | public void orderShareStateChanged(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createShareOrder(uid, orderId, 0, orderState, payMoney, money,
|
| | | null);
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createShareOrder(uid, orderId, orderType, 0, orderState, payMoney,
|
| | | money, null);
|
| | | // 暂时不推送
|
| | | // try {
|
| | | // msgOrderDetailService.updateMsgOrderDetail(detail, false);
|
| | | // } catch (MsgOrderDetailException e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | // try {
|
| | | // msgOrderDetailService.updateMsgOrderDetail(detail, false);
|
| | | // } catch (MsgOrderDetailException e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderInviteStatistic(Long uid, String orderId, BigDecimal payMoney, BigDecimal money, int goodsCount,
|
| | | int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createInviteOrder(uid, orderId, goodsCount, orderState, payMoney,
|
| | | money, null);
|
| | | public void orderInviteStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int goodsCount, int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createInviteOrder(uid, orderId, orderType, goodsCount, orderState,
|
| | | payMoney, money, null);
|
| | | try {
|
| | | msgOrderDetailService.addMsgOrderDetail(detail,
|
| | | (money == null || money.compareTo(new BigDecimal(0)) <= 0) ? false : true);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderInviteStateChanged(Long uid, String orderId, BigDecimal payMoney, BigDecimal money,
|
| | | public void orderInviteStateChanged(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createInviteOrder(uid, orderId, 0, orderState, payMoney, money,
|
| | | null);
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createInviteOrder(uid, orderId, orderType, 0, orderState,
|
| | | payMoney, money, null);
|
| | | // 暂时不推送
|
| | | // try {
|
| | | // msgOrderDetailService.updateMsgOrderDetail(detail, false);
|
| | | // } catch (MsgOrderDetailException e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | // try {
|
| | | // msgOrderDetailService.updateMsgOrderDetail(detail, false);
|
| | | // } catch (MsgOrderDetailException e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | |
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderShareFirstLevelStatistic(Long uid, String orderId, BigDecimal payMoney, BigDecimal money,
|
| | | int goodsCount, int orderState, String sourceUserName) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createInviteOrder(uid, orderId, goodsCount, orderState, payMoney,
|
| | | money, String.format("由一级队员【%s】分享", getShortName(sourceUserName)));
|
| | | public void orderShareFirstLevelStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney,
|
| | | BigDecimal money, int goodsCount, int orderState, String sourceUserName) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createInviteOrder(uid, orderId, orderType, goodsCount, orderState,
|
| | | payMoney, money, String.format("由一级队员【%s】分享", getShortName(sourceUserName)));
|
| | | try {
|
| | | msgOrderDetailService.addMsgOrderDetail(detail,
|
| | | (money == null || money.compareTo(new BigDecimal(0)) <= 0) ? false : true);
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderShareFirstLevelStateChanged(Long uid, String orderId, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createInviteOrder(uid, orderId, 0, orderState, payMoney, money,
|
| | | null);
|
| | | public void orderShareFirstLevelStateChanged(Long uid, String orderId, int orderType, BigDecimal payMoney,
|
| | | BigDecimal money, int orderState) {
|
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createInviteOrder(uid, orderId, orderType, 0, orderState,
|
| | | payMoney, money, null);
|
| | | // 暂时不推送
|
| | | // try {
|
| | | // msgOrderDetailService.updateMsgOrderDetail(detail, false);
|
| | | // } catch (MsgOrderDetailException e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | // try {
|
| | | // msgOrderDetailService.updateMsgOrderDetail(detail, false);
|
| | | // } catch (MsgOrderDetailException e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | }
|
| | |
|
| | | // 新版通知
|
| | | userMoneyMsgNotificationService.fanliOrderReceived(uid, hongBaoOrder.getCommonOrder().getOrderNo(),
|
| | | userMoneyMsgNotificationService.fanliOrderReceived(uid, hongBaoOrder.getCommonOrder().getOrderNo(),hongBaoOrder.getCommonOrder().getSourceType(),
|
| | | userGoodsCount.get(uid), money, user.getMyHongBao());
|
| | | }
|
| | | // 通知免单到账
|
| | |
| | | }
|
| | |
|
| | | // 新版通知
|
| | | userMoneyMsgNotificationService.inviteOrderReceived(uid, inviteOrders.size(), inviteGoodsCount, invitemoney,
|
| | | userMoneyMsgNotificationService.inviteOrderReceived(uid,Constant.SOURCE_TYPE_TAOBAO, inviteOrders.size(), inviteGoodsCount, invitemoney,
|
| | | userInfoMapper.selectByPKey(uid).getMyHongBao());
|
| | |
|
| | | for (String orderId : drawBackOrders)
|
| | |
| | | }
|
| | |
|
| | | // 新版通知
|
| | | userMoneyMsgNotificationService.shareOrderReceived(uid, shareOrders.size(), shareGoodsCount, sharemoney,
|
| | | userMoneyMsgNotificationService.shareOrderReceived(uid,Constant.SOURCE_TYPE_TAOBAO, shareOrders.size(), shareGoodsCount, sharemoney,
|
| | | userInfoMapper.selectByPrimaryKey(uid).getMyHongBao());
|
| | |
|
| | | for (String orderId : drawBackOrders)
|
| | |
| | | userMoneyService.subUserMoney(uid, drawBackMoney, userMoneyDetail);
|
| | |
|
| | | // 新版通知
|
| | | userMoneyMsgNotificationService.fanliOrderWeiQuan(uid, orderId, drawBackMoney,
|
| | | userMoneyMsgNotificationService.fanliOrderWeiQuan(uid, orderId,Constant.SOURCE_TYPE_TAOBAO, drawBackMoney,
|
| | | userInfoMapper.selectByPKey(uid).getMyHongBao());
|
| | |
|
| | | userNotificationService.weiQuanFanli(uid, orderId, drawBackMoney);
|
| | |
| | | }
|
| | | userMoneyService.subUserMoney(uid, drawBackMoney, userMoneyDetail);
|
| | |
|
| | | userMoneyMsgNotificationService.shareOrderWeiQuan(uid, orderId, drawBackMoney,
|
| | | userMoneyMsgNotificationService.shareOrderWeiQuan(uid, orderId, Constant.SOURCE_TYPE_TAOBAO,drawBackMoney,
|
| | | userInfoMapper.selectByPrimaryKey(uid).getMyHongBao());
|
| | |
|
| | | userNotificationService.weiQuanTiCheng(uid, orderId, drawBackMoney);
|
| | |
| | | userMoneyService.subUserMoney(uid, drawBackMoney, userMoneyDetail);
|
| | |
|
| | | // 新版通知
|
| | | userMoneyMsgNotificationService.inviteOrderWeiQuan(uid, orderId, drawBackMoney,
|
| | | userMoneyMsgNotificationService.inviteOrderWeiQuan(uid, orderId,Constant.SOURCE_TYPE_TAOBAO, drawBackMoney,
|
| | | userInfoMapper.selectByPrimaryKey(uid).getMyHongBao());
|
| | | }
|
| | | }
|
| | |
| | | import com.yeshi.fanli.service.inter.msg.MsgOrderDetailService;
|
| | | import com.yeshi.fanli.service.inter.msg.UserOrderMsgNotificationService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoWeiQuanOrderService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
|
| | | @Service
|
| | | public class TaoBaoWeiQuanOrderServiceImpl implements TaoBaoWeiQuanOrderService {
|
| | |
| | | for (MsgOrderDetail msg : msgList) {
|
| | | if (msg.getType() == MsgTypeOrderTypeEnum.fanli) {
|
| | | userOrderMsgNotificationService.orderFanLiStateChanged(msg.getUser().getId(),
|
| | | order.getOrderId(), null, null, CommonOrder.STATE_WQ);
|
| | | order.getOrderId(),Constant.SOURCE_TYPE_TAOBAO, null, null, CommonOrder.STATE_WQ);
|
| | | } else if (msg.getType() == MsgTypeOrderTypeEnum.invite) {
|
| | | userOrderMsgNotificationService.orderInviteStateChanged(msg.getUser().getId(),
|
| | | order.getOrderId(), null, null, CommonOrder.STATE_WQ);
|
| | | order.getOrderId(), Constant.SOURCE_TYPE_TAOBAO,null, null, CommonOrder.STATE_WQ);
|
| | | } else if (msg.getType() == MsgTypeOrderTypeEnum.share) {
|
| | | userOrderMsgNotificationService.orderShareStateChanged(msg.getUser().getId(),
|
| | | order.getOrderId(), null, null, CommonOrder.STATE_WQ);
|
| | | order.getOrderId(),Constant.SOURCE_TYPE_TAOBAO, null, null, CommonOrder.STATE_WQ);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | userInfoService.addMoney(new UserInfo(uid), money);
|
| | |
|
| | | // 插入资金通知
|
| | | userMoneyMsgNotificationService.orderReward(uid, orderNo, money,
|
| | | userMoneyMsgNotificationService.orderReward(uid, orderNo,goodsType, money,
|
| | | userInfoService.selectByPKey(uid).getMyHongBao());
|
| | |
|
| | | /* 用户券信息状态及记录处理 */
|
| | |
| | | * @param money
|
| | | * @param balance
|
| | | */
|
| | | public void fanliOrderReceived(Long uid, String orderId, int goodsCount, BigDecimal money, BigDecimal balance);
|
| | | public void fanliOrderReceived(Long uid, String orderId,int orderType, int goodsCount, BigDecimal money, BigDecimal balance);
|
| | |
|
| | | /**
|
| | | * 返利订单维权
|
| | |
| | | * @param money
|
| | | * @param balance
|
| | | */
|
| | | public void fanliOrderWeiQuan(Long uid, String orderId, BigDecimal money, BigDecimal balance);
|
| | | public void fanliOrderWeiQuan(Long uid, String orderId,int orderType, BigDecimal money, BigDecimal balance);
|
| | |
|
| | | /**
|
| | | * 分享赚订单被统计
|
| | |
| | | * @param money
|
| | | * @param balance
|
| | | */
|
| | | public void shareOrderReceived(Long uid, int orderCount, int goodsCount, BigDecimal money, BigDecimal balance);
|
| | | public void shareOrderReceived(Long uid,int orderType, int orderCount, int goodsCount, BigDecimal money, BigDecimal balance);
|
| | |
|
| | | /**
|
| | | * 分享订单维权
|
| | |
| | | * @param balance
|
| | | */
|
| | |
|
| | | public void shareOrderWeiQuan(Long uid, String orderId, BigDecimal money, BigDecimal balance);
|
| | | public void shareOrderWeiQuan(Long uid, String orderId,int orderType, BigDecimal money, BigDecimal balance);
|
| | |
|
| | | /**
|
| | | * 邀请赚订单被统计
|
| | |
| | | * @param money
|
| | | * @param balance
|
| | | */
|
| | | public void inviteOrderReceived(Long uid, int orderCount, int goodsCount, BigDecimal money, BigDecimal balance);
|
| | | public void inviteOrderReceived(Long uid,int orderType, int orderCount, int goodsCount, BigDecimal money, BigDecimal balance);
|
| | |
|
| | | /**
|
| | | * 邀请订单维权
|
| | |
| | | * @param money
|
| | | * @param balance
|
| | | */
|
| | | public void inviteOrderWeiQuan(Long uid, String orderId, BigDecimal money, BigDecimal balance);
|
| | | public void inviteOrderWeiQuan(Long uid, String orderId,int orderType, BigDecimal money, BigDecimal balance);
|
| | |
|
| | | /**
|
| | | * 奖励订单到账
|
| | |
| | | * @param money
|
| | | * @param balance
|
| | | */
|
| | | public void orderReward(Long uid, String orderId, BigDecimal money, BigDecimal balance);
|
| | | public void orderReward(Long uid, String orderId,int orderType, BigDecimal money, BigDecimal balance);
|
| | |
|
| | | /**
|
| | | * 系统补齐
|
| | |
| | | * @param orderState
|
| | | */
|
| | |
|
| | | public void orderFanLiStatistic(Long uid, String orderId, BigDecimal payMoney, BigDecimal money, int goodsCount,
|
| | | public void orderFanLiStatistic(Long uid, String orderId,int orderType, BigDecimal payMoney, BigDecimal money, int goodsCount,
|
| | | int orderState);
|
| | |
|
| | | /**
|
| | |
| | | * @param money
|
| | | * @param orderState
|
| | | */
|
| | | public void orderFanLiStateChanged(Long uid, String orderId, BigDecimal payMoney, BigDecimal money, int orderState);
|
| | | public void orderFanLiStateChanged(Long uid, String orderId,int orderType, BigDecimal payMoney, BigDecimal money, int orderState);
|
| | |
|
| | | /**
|
| | | * 分享订单统计
|
| | |
| | | * @param goodsCount
|
| | | * @param orderState
|
| | | */
|
| | | public void orderShareStatistic(Long uid, String orderId, BigDecimal payMoney, BigDecimal money, int goodsCount,
|
| | | public void orderShareStatistic(Long uid, String orderId,int orderType, BigDecimal payMoney, BigDecimal money, int goodsCount,
|
| | | int orderState);
|
| | |
|
| | | /**
|
| | |
| | | * @param money
|
| | | * @param orderState
|
| | | */
|
| | | public void orderShareStateChanged(Long uid, String orderId, BigDecimal payMoney, BigDecimal money, int orderState);
|
| | | public void orderShareStateChanged(Long uid, String orderId,int orderType, BigDecimal payMoney, BigDecimal money, int orderState);
|
| | |
|
| | | /**
|
| | | * 邀请订单统计
|
| | |
| | | * @param goodsCount
|
| | | * @param orderState
|
| | | */
|
| | | public void orderInviteStatistic(Long uid, String orderId, BigDecimal payMoney, BigDecimal money, int goodsCount,
|
| | | public void orderInviteStatistic(Long uid, String orderId,int orderType, BigDecimal payMoney, BigDecimal money, int goodsCount,
|
| | | int orderState);
|
| | |
|
| | | /**
|
| | |
| | | * @param money
|
| | | * @param orderState
|
| | | */
|
| | | public void orderInviteStateChanged(Long uid, String orderId, BigDecimal payMoney, BigDecimal money,
|
| | | public void orderInviteStateChanged(Long uid, String orderId,int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState);
|
| | |
|
| | | public void orderShareFirstLevelStatistic(Long uid, String orderId, BigDecimal payMoney, BigDecimal money,
|
| | | public void orderShareFirstLevelStatistic(Long uid, String orderId,int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int goodsCount, int orderState, String sourceUserName);
|
| | |
|
| | | /**
|
| | |
| | | * @param money
|
| | | * @param orderState
|
| | | */
|
| | | public void orderShareFirstLevelStateChanged(Long uid, String orderId, BigDecimal payMoney, BigDecimal money,
|
| | | public void orderShareFirstLevelStateChanged(Long uid, String orderId,int orderType, BigDecimal payMoney, BigDecimal money,
|
| | | int orderState);
|
| | |
|
| | | /**
|
| | |
| | | IS_OUTNET = Boolean.parseBoolean(constantConfig.getOutNetWork());
|
| | | IS_TASK = Boolean.parseBoolean(constantConfig.getTask());
|
| | | IS_TEST = Boolean.parseBoolean(constantConfig.getTest());
|
| | | |
| | | System.out.println("IS_OUTNET:"+IS_OUTNET);
|
| | | System.out.println("IS_TASK:"+IS_TASK);
|
| | | System.out.println("IS_TEST:"+IS_TEST);
|
| | |
|
| | | System.out.println("IS_OUTNET:" + IS_OUTNET);
|
| | | System.out.println("IS_TASK:" + IS_TASK);
|
| | | System.out.println("IS_TEST:" + IS_TEST);
|
| | | }
|
| | |
|
| | | Extract_Activty = String.format("%s.ui.mine.MyRedPacketsActivity",
|
| | |
| | | HB_Activity = String.format("%s.ui.main.MainActivity",
|
| | | Constant.systemCommonConfig.getAndroidBaseactivityName());
|
| | | }
|
| | |
|
| | | public static String getSourceName(int sourceType) {
|
| | | switch (sourceType) {
|
| | | case SOURCE_TYPE_TAOBAO:
|
| | | return "淘宝";
|
| | | case SOURCE_TYPE_JD:
|
| | | return "京东";
|
| | | case SOURCE_TYPE_PDD:
|
| | | return "拼多多";
|
| | | default:// 其他类型
|
| | | return "";
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createFailiMsg(BigDecimal money, BigDecimal balance, String orderId, int goodsCount,
|
| | | Long uid, String beiZhu) {
|
| | | public static MsgMoneyDetail createFailiMsg(BigDecimal money, BigDecimal balance, String orderId, int orderType,
|
| | | int goodsCount, Long uid, String beiZhu) {
|
| | | if (money == null || balance == null || orderId == null || uid == null)
|
| | | return null;
|
| | |
|
| | |
| | | detail.setMoney(money);
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.fanli);
|
| | | detail.setOrderId(orderId);
|
| | | detail.setOrderType(orderType);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | |
|
| | |
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createFailiWeiQuanMsg(Long uid, String orderId, BigDecimal money, BigDecimal balance,
|
| | | String beiZhu) {
|
| | | public static MsgMoneyDetail createFailiWeiQuanMsg(Long uid, String orderId, int orderType, BigDecimal money,
|
| | | BigDecimal balance, String beiZhu) {
|
| | | if (money == null || orderId == null || money == null || uid == null)
|
| | | return null;
|
| | |
|
| | |
| | | detail.setMoney(money);
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.fanliWeiQuan);
|
| | | detail.setOrderId(orderId);
|
| | | detail.setOrderType(orderType);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | |
|
| | |
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createInviteMsg(BigDecimal money, BigDecimal balance, int orderCount, int goodsCount,
|
| | | Long uid, String beiZhu) {
|
| | | public static MsgMoneyDetail createInviteMsg(BigDecimal money, BigDecimal balance, int orderType, int orderCount,
|
| | | int goodsCount, Long uid, String beiZhu) {
|
| | | if (money == null || balance == null || uid == null)
|
| | | return null;
|
| | |
|
| | |
| | | detail.setOrderCount(orderCount);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setOrderType(orderType);
|
| | |
|
| | | return detail;
|
| | | }
|
| | |
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createInviteWeiQuanMsg(Long uid, String orderId, BigDecimal money, BigDecimal balance,
|
| | | String beiZhu) {
|
| | | public static MsgMoneyDetail createInviteWeiQuanMsg(Long uid, String orderId, int orderType, BigDecimal money,
|
| | | BigDecimal balance, String beiZhu) {
|
| | | if (money == null || orderId == null || money == null || uid == null)
|
| | | return null;
|
| | |
|
| | |
| | | detail.setOrderId(orderId);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setOrderType(orderType);
|
| | |
|
| | | return detail;
|
| | | }
|
| | |
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createShareMsg(BigDecimal money, BigDecimal balance, int orderCount, int goodsCount,
|
| | | Long uid, String beiZhu) {
|
| | | public static MsgMoneyDetail createShareMsg(BigDecimal money, BigDecimal balance, int orderType, int orderCount,
|
| | | int goodsCount, Long uid, String beiZhu) {
|
| | | if (money == null || balance == null || uid == null)
|
| | | return null;
|
| | |
|
| | |
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setGoodsCount(goodsCount);
|
| | | detail.setOrderType(orderType);
|
| | | detail.setMoney(money);
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.share);
|
| | | detail.setOrderCount(orderCount);
|
| | |
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createShareWeiQuanMsg(Long uid, String orderId, BigDecimal money, BigDecimal balance,
|
| | | String beiZhu) {
|
| | | public static MsgMoneyDetail createShareWeiQuanMsg(Long uid, String orderId,int orderType, BigDecimal money, |
| | | BigDecimal balance, String beiZhu) {
|
| | | if (money == null || orderId == null || money == null || uid == null)
|
| | | return null;
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | |
| | | detail.setOrderId(orderId);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setOrderType(orderType);
|
| | | return detail;
|
| | | }
|
| | |
|
| | | public static MsgMoneyDetail createOrderRewardMsg(Long uid, String orderId, BigDecimal money, BigDecimal balance,
|
| | | String beiZhu) {
|
| | | public static MsgMoneyDetail createOrderRewardMsg(Long uid, String orderId, int orderType, BigDecimal money,
|
| | | BigDecimal balance, String beiZhu) {
|
| | | if (money == null || orderId == null || money == null || uid == null)
|
| | | return null;
|
| | |
|
| | |
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.orderReward);
|
| | | detail.setOrderId(orderId);
|
| | | detail.setRead(false);
|
| | | detail.setOrderType(orderType);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | |
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgOrderDetail createFanLiOrder(Long uid, String orderId, int goodsCount, int orderState,
|
| | | BigDecimal payMoney, BigDecimal money, String beiZhu) {
|
| | | public static MsgOrderDetail createFanLiOrder(Long uid, String orderId, int orderType, int goodsCount,
|
| | | int orderState, BigDecimal payMoney, BigDecimal money, String beiZhu) {
|
| | | if (uid == null)
|
| | | return null;
|
| | | MsgOrderDetail detail = new MsgOrderDetail();
|
| | |
| | | detail.setGoodsCount(goodsCount);
|
| | | detail.setHongBaoMoney(money);
|
| | | detail.setOrderId(orderId);
|
| | | detail.setOrderType(orderType);
|
| | | detail.setPayMoney(payMoney);
|
| | | detail.setRead(false);
|
| | | detail.setState(orderState);
|
| | |
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgOrderDetail createInviteOrder(Long uid, String orderId, int goodsCount, int orderState,
|
| | | BigDecimal payMoney, BigDecimal money, String beiZhu) {
|
| | | public static MsgOrderDetail createInviteOrder(Long uid, String orderId, int orderType, int goodsCount,
|
| | | int orderState, BigDecimal payMoney, BigDecimal money, String beiZhu) {
|
| | | if (payMoney == null || money == null || uid == null)
|
| | | return null;
|
| | | MsgOrderDetail detail = new MsgOrderDetail();
|
| | |
| | | detail.setGoodsCount(goodsCount);
|
| | | detail.setHongBaoMoney(money);
|
| | | detail.setOrderId(orderId);
|
| | | detail.setOrderType(orderType);
|
| | | detail.setPayMoney(payMoney);
|
| | | detail.setRead(false);
|
| | | detail.setState(orderState);
|
| | |
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgOrderDetail createShareOrder(Long uid, String orderId, int goodsCount, int orderState,
|
| | | BigDecimal payMoney, BigDecimal money, String beiZhu) {
|
| | | public static MsgOrderDetail createShareOrder(Long uid, String orderId, int orderType, int goodsCount,
|
| | | int orderState, BigDecimal payMoney, BigDecimal money, String beiZhu) {
|
| | | if (payMoney == null || money == null || uid == null)
|
| | | return null;
|
| | | MsgOrderDetail detail = new MsgOrderDetail();
|
| | |
| | | detail.setGoodsCount(goodsCount);
|
| | | detail.setHongBaoMoney(money);
|
| | | detail.setOrderId(orderId);
|
| | | detail.setOrderType(orderType);
|
| | | detail.setPayMoney(payMoney);
|
| | | detail.setRead(false);
|
| | | detail.setState(orderState);
|
| | |
| | | MsgOrderDetail detail = new MsgOrderDetail();
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setOrderId((orderType == 1 ? "【淘宝订单】" : "") + orderId);
|
| | | detail.setOrderType(orderType);
|
| | | detail.setPayMoney(payMoney);
|
| | | detail.setRead(false);
|
| | | detail.setState(isSuccess ? 1 : 0);
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | 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;
|
| | |
| | | List<CommonMsgItemVO> items = new ArrayList<>();
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | | if (msg.getType() == MsgTypeOrderTypeEnum.found) {
|
| | | |
| | | |
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
|
| | | |
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("订单找回", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
|
| | |
|
| | |
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("找回金额", COLOR_TITLE), contentList));
|
| | |
|
| | | } else {
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单号", COLOR_TITLE), contentList, true));
|
| | |
|
| | |
| | | return new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_extract.png", "提现账号验证",
|
| | | msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
|
| | | } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.fanli) {
|
| | | |
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
|
| | | |
| | | contentList = new ArrayList<>();
|
| | | // 返利到账
|
| | | contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利订单", COLOR_TITLE), contentList));
|
| | |
| | |
|
| | | } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.invite || msg.getMsgType() == MsgTypeMoneyTypeEnum.share) {
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
|
| | | |
| | | contentList = new ArrayList<>();
|
| | | |
| | | // 邀请奖金,分享奖金
|
| | |
|
| | | contentList.add(new ClientTextStyleVO(msg.getOrderCount() + "", COLOR_CONTENT));
|
| | |
| | | msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
|
| | |
|
| | | } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.fanliWeiQuan) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
|
| | | |
| | | contentList = new ArrayList<>();
|
| | | |
| | | contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利订单", COLOR_TITLE), contentList));
|
| | |
|
| | |
| | | return new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_fanli.png", msg.getMsgType().getDesc(),
|
| | | msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
|
| | | } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.shareWeiQuan) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
|
| | | |
| | | contentList = new ArrayList<>();
|
| | | |
| | | |
| | | contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请订单", COLOR_TITLE), contentList));
|
| | |
|
| | |
| | | msg.getMsgType().getDesc(), msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(),
|
| | | items);
|
| | | } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.inviteWeiQuan) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
|
| | | |
| | | contentList = new ArrayList<>();
|
| | | |
| | | contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请订单", COLOR_TITLE), contentList));
|
| | |
|
| | |
| | | msg.getMsgType().getDesc(), msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(),
|
| | | items);
|
| | | } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.orderReward) {// 奖励订单
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(Constant.getSourceName(msg.getOrderType()), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("渠道来源", COLOR_TITLE), contentList));
|
| | | |
| | | contentList = new ArrayList<>();
|
| | | |
| | | contentList.add(new ClientTextStyleVO(msg.getOrderId(), COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖励订单", COLOR_TITLE), contentList));
|
| | |
|
| | |
| | | return new UserMsgVO("http://img.flqapp.com/resource/msg/icon_msg_order_reward.png",
|
| | | msg.getMsgType().getDesc(), msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(),
|
| | | items);
|
| | | } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.systemEqualize) {// 奖励订单
|
| | | } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.systemEqualize) {// 系统补偿
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("¥" + filterMoney(msg.getMoney()) + "", COLOR_HIGHLIGHT_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("补齐金额", COLOR_TITLE), contentList));
|