New file |
| | |
| | | package com.yeshi.fanli.dao.mybatis.integral; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.integral.UserGetIntegralFromOrderRecord; |
| | | |
| | | public interface UserGetIntegralFromOrderRecordMapper extends BaseMapper<UserGetIntegralFromOrderRecord> { |
| | | |
| | | /** |
| | | * 根据用户,事件类型,订单信息计数 |
| | | * |
| | | * @param eventType |
| | | * @param uid |
| | | * @param orderNo |
| | | * @param orderSourceType |
| | | * @return |
| | | */ |
| | | long countByRecordInfo(@Param("record") UserGetIntegralFromOrderRecord record); |
| | | |
| | | } |
New file |
| | |
| | | package com.yeshi.fanli.entity.integral;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | /**
|
| | | * 用户因为订单获取到金币
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Table("yeshi_ec_integral_get_from_order")
|
| | | public class UserGetIntegralFromOrderRecord {
|
| | | public static int TYPE_PLACE_ORDER = 1;// 下单
|
| | | public static int TYPE_RECIEVE_MONEY = 2;// 到账
|
| | |
|
| | | @Column(name = "fo_id")
|
| | | private Long id;
|
| | | @Column(name = "fo_event_type")
|
| | | private Integer eventType;// 事件类型
|
| | | @Column(name = "fo_uid")
|
| | | private Long uid;// 用户ID
|
| | | @Column(name = "fo_order_no")
|
| | | private String orderNo;// 订单号
|
| | | @Column(name = "fo_order_source_type")
|
| | | private Integer orderSourceType;// 订单来源类型
|
| | | @Column(name = "fo_integral_count")
|
| | | private Integer integralCount;// 金币数量
|
| | | @Column(name = "fo_create_time")
|
| | | private Date createTime;// 创建时间
|
| | | @Column(name = "fo_update_time")
|
| | | private Date updateTime;// 更新时间
|
| | |
|
| | | public Long getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public Integer getEventType() {
|
| | | return eventType;
|
| | | }
|
| | |
|
| | | public void setEventType(Integer eventType) {
|
| | | this.eventType = eventType;
|
| | | }
|
| | |
|
| | | public Long getUid() {
|
| | | return uid;
|
| | | }
|
| | |
|
| | | public void setUid(Long uid) {
|
| | | this.uid = uid;
|
| | | }
|
| | |
|
| | | public String getOrderNo() {
|
| | | return orderNo;
|
| | | }
|
| | |
|
| | | public void setOrderNo(String orderNo) {
|
| | | this.orderNo = orderNo;
|
| | | }
|
| | |
|
| | | public Integer getOrderSourceType() {
|
| | | return orderSourceType;
|
| | | }
|
| | |
|
| | | public void setOrderSourceType(Integer orderSourceType) {
|
| | | this.orderSourceType = orderSourceType;
|
| | | }
|
| | |
|
| | | public Integer getIntegralCount() {
|
| | | return integralCount;
|
| | | }
|
| | |
|
| | | public void setIntegralCount(Integer integralCount) {
|
| | | this.integralCount = integralCount;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Date getUpdateTime() {
|
| | | return updateTime;
|
| | | }
|
| | |
|
| | | public void setUpdateTime(Date updateTime) {
|
| | | this.updateTime = updateTime;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.exception.integral;
|
| | |
|
| | | import com.yeshi.fanli.exception.BaseException;
|
| | |
|
| | | public class UserGetIntegralFromOrderRecordException extends BaseException {
|
| | | |
| | | private static final long serialVersionUID = 1L;
|
| | | |
| | | public UserGetIntegralFromOrderRecordException(int code, String msg) {
|
| | | super(code, msg);
|
| | | }
|
| | |
|
| | | public UserGetIntegralFromOrderRecordException() {
|
| | | super();
|
| | | }
|
| | | }
|
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper |
| | | namespace="com.yeshi.fanli.dao.mybatis.integral.UserGetIntegralFromOrderRecordMapper"> |
| | | <resultMap id="BaseResultMap" |
| | | type="com.yeshi.fanli.entity.integral.UserGetIntegralFromOrderRecord"> |
| | | <id column="fo_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="fo_event_type" property="eventType" jdbcType="INTEGER" /> |
| | | <result column="fo_uid" property="uid" jdbcType="BIGINT" /> |
| | | <result column="fo_order_no" property="orderNo" jdbcType="VARCHAR" /> |
| | | <result column="fo_order_source_type" property="orderSourceType" |
| | | jdbcType="INTEGER" /> |
| | | <result column="fo_integral_count" property="integralCount" |
| | | jdbcType="INTEGER" /> |
| | | <result column="fo_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="fo_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List">fo_id,fo_event_type,fo_uid,fo_order_no,fo_order_source_type,fo_integral_count,fo_create_time,fo_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from yeshi_ec_integral_get_from_order where fo_id = |
| | | #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | | yeshi_ec_integral_get_from_order where fo_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" |
| | | parameterType="com.yeshi.fanli.entity.integral.UserGetIntegralFromOrderRecord" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_integral_get_from_order |
| | | (fo_id,fo_event_type,fo_uid,fo_order_no,fo_order_source_type,fo_integral_count,fo_create_time,fo_update_time) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{eventType,jdbcType=INTEGER},#{uid,jdbcType=BIGINT},#{orderNo,jdbcType=VARCHAR},#{orderSourceType,jdbcType=INTEGER},#{integralCount,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" |
| | | parameterType="com.yeshi.fanli.entity.integral.UserGetIntegralFromOrderRecord" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into yeshi_ec_integral_get_from_order |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">fo_id,</if> |
| | | <if test="eventType != null">fo_event_type,</if> |
| | | <if test="uid != null">fo_uid,</if> |
| | | <if test="orderNo != null">fo_order_no,</if> |
| | | <if test="orderSourceType != null">fo_order_source_type,</if> |
| | | <if test="integralCount != null">fo_integral_count,</if> |
| | | <if test="createTime != null">fo_create_time,</if> |
| | | <if test="updateTime != null">fo_update_time,</if> |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="eventType != null">#{eventType,jdbcType=INTEGER},</if> |
| | | <if test="uid != null">#{uid,jdbcType=BIGINT},</if> |
| | | <if test="orderNo != null">#{orderNo,jdbcType=VARCHAR},</if> |
| | | <if test="orderSourceType != null">#{orderSourceType,jdbcType=INTEGER},</if> |
| | | <if test="integralCount != null">#{integralCount,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" |
| | | parameterType="com.yeshi.fanli.entity.integral.UserGetIntegralFromOrderRecord">update yeshi_ec_integral_get_from_order set |
| | | fo_event_type = #{eventType,jdbcType=INTEGER},fo_uid = |
| | | #{uid,jdbcType=BIGINT},fo_order_no = |
| | | #{orderNo,jdbcType=VARCHAR},fo_order_source_type = |
| | | #{orderSourceType,jdbcType=INTEGER},fo_integral_count = |
| | | #{integralCount,jdbcType=INTEGER},fo_create_time = |
| | | #{createTime,jdbcType=TIMESTAMP},fo_update_time = |
| | | #{updateTime,jdbcType=TIMESTAMP} where fo_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKeySelective" |
| | | parameterType="com.yeshi.fanli.entity.integral.UserGetIntegralFromOrderRecord"> |
| | | update yeshi_ec_integral_get_from_order |
| | | <set> |
| | | <if test="eventType != null">fo_event_type=#{eventType,jdbcType=INTEGER},</if> |
| | | <if test="uid != null">fo_uid=#{uid,jdbcType=BIGINT},</if> |
| | | <if test="orderNo != null">fo_order_no=#{orderNo,jdbcType=VARCHAR},</if> |
| | | <if test="orderSourceType != null">fo_order_source_type=#{orderSourceType,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="integralCount != null">fo_integral_count=#{integralCount,jdbcType=INTEGER},</if> |
| | | <if test="createTime != null">fo_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">fo_update_time=#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where fo_id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | |
| | | |
| | | <select id="countByRecordInfo" resultType="java.lang.Long"> |
| | | select |
| | | count(*) |
| | | from yeshi_ec_integral_get_from_order where 1=1 |
| | | |
| | | <if test="record!=null"> |
| | | <if test="record.eventType!=null"> |
| | | and fo_event_type=#{record.eventType} |
| | | </if> |
| | | |
| | | <if test="record.uid!=null"> |
| | | and fo_uid=#{record.uid} |
| | | </if> |
| | | |
| | | <if test="record.orderNo!=null"> |
| | | and fo_order_no=#{record.orderNo} |
| | | </if> |
| | | |
| | | <if test="record.orderSourceType!=null"> |
| | | and fo_order_source_type=#{record.orderSourceType} |
| | | </if> |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | import org.springframework.context.annotation.Lazy;
|
| | | import org.springframework.scheduling.annotation.Async;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.ThreeSaleMapper;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | |
| | | import com.yeshi.fanli.entity.integral.IntegralTask.TaskUniqueKeyEnum;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTaskRank;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTaskRecord;
|
| | | import com.yeshi.fanli.entity.integral.UserGetIntegralFromOrderRecord;
|
| | | import com.yeshi.fanli.exception.integral.IntegralGetException;
|
| | | import com.yeshi.fanli.exception.integral.IntegralTaskRecordException;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralTaskRankService;
|
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralTaskRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralTaskService;
|
| | | import com.yeshi.fanli.service.inter.user.integral.UserGetIntegralFromOrderRecordService;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.annotation.RequestSerializableByKey;
|
| | | import com.yeshi.fanli.util.annotation.RequestSerializableByKeyService;
|
| | | import com.yeshi.fanli.util.annotation.integral.IntegralGetFrequencyLimit;
|
| | | import com.yeshi.fanli.util.annotation.integral.IntegralGetVersionLimit;
|
| | | import com.yeshi.fanli.util.factory.integral.UserGetIntegralFromOrderRecordFactory;
|
| | |
|
| | | @Lazy
|
| | | @Service
|
| | |
| | |
|
| | | @Resource
|
| | | private IntegralTaskRankService integralTaskRankService;
|
| | |
|
| | | @Resource
|
| | | private UserGetIntegralFromOrderRecordService userGetIntegralFromOrderRecordService;
|
| | |
|
| | | private UserInfo getBossByUid(Long uid) {
|
| | | return threeSaleMapper.selectBoss(uid);
|
| | |
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Transactional
|
| | | @Override
|
| | | public void addRebateOrder(Long uid) {
|
| | | public void addRebateOrder(Long uid, String orderNo, int sourceType) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.rebateOrder.name());
|
| | | IntegralTaskRecord record = addEventStatistic(uid, TaskUniqueKeyEnum.rebateOrder.name());
|
| | | if (record != null) {
|
| | | userGetIntegralFromOrderRecordService.addRecord(
|
| | | UserGetIntegralFromOrderRecordFactory.create(UserGetIntegralFromOrderRecord.TYPE_RECIEVE_MONEY,
|
| | | uid, orderNo, sourceType, record.getGoldCoin()));
|
| | | }
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | |
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Transactional
|
| | | @Override
|
| | | public void addInviteOrderLevelOne(Long uid) {
|
| | | public void addInviteOrderLevelOne(Long uid, String orderNo, int sourceType) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelOne.name());
|
| | | IntegralTaskRecord record = addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelOne.name());
|
| | | if (record != null) {
|
| | | userGetIntegralFromOrderRecordService.addRecord(
|
| | | UserGetIntegralFromOrderRecordFactory.create(UserGetIntegralFromOrderRecord.TYPE_RECIEVE_MONEY,
|
| | | uid, orderNo, sourceType, record.getGoldCoin()));
|
| | | }
|
| | |
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | |
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Transactional
|
| | | @Override
|
| | | public void addInviteOrderLevelTwo(Long uid) {
|
| | | public void addInviteOrderLevelTwo(Long uid, String orderNo, int sourceType) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelTwo.name());
|
| | | IntegralTaskRecord record = addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelTwo.name());
|
| | | if (record != null) {
|
| | | userGetIntegralFromOrderRecordService.addRecord(
|
| | | UserGetIntegralFromOrderRecordFactory.create(UserGetIntegralFromOrderRecord.TYPE_RECIEVE_MONEY,
|
| | | uid, orderNo, sourceType, record.getGoldCoin()));
|
| | | }
|
| | |
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | |
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Transactional
|
| | | @Override
|
| | | public void addShareOrder(Long uid) {
|
| | | public void addShareOrder(Long uid, String orderNo, int sourceType) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.shareOrder.name());
|
| | | IntegralTaskRecord record = addEventStatistic(uid, TaskUniqueKeyEnum.shareOrder.name());
|
| | | if (record != null) {
|
| | | userGetIntegralFromOrderRecordService.addRecord(
|
| | | UserGetIntegralFromOrderRecordFactory.create(UserGetIntegralFromOrderRecord.TYPE_RECIEVE_MONEY,
|
| | | uid, orderNo, sourceType, record.getGoldCoin()));
|
| | | }
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.impl.user.invite;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.integral.UserGetIntegralFromOrderRecordMapper;
|
| | | import com.yeshi.fanli.entity.integral.UserGetIntegralFromOrderRecord;
|
| | | import com.yeshi.fanli.exception.integral.UserGetIntegralFromOrderRecordException;
|
| | | import com.yeshi.fanli.service.inter.user.integral.UserGetIntegralFromOrderRecordService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | | public class UserGetIntegralFromOrderRecordServiceImpl implements UserGetIntegralFromOrderRecordService {
|
| | |
|
| | | @Resource
|
| | | private UserGetIntegralFromOrderRecordMapper userGetIntegralFromOrderRecordMapper;
|
| | |
|
| | | @Override
|
| | | public long countByEventTypeAndUidAndOrderInfo(int eventType, Long uid, String orderNo, int orderSourceType) {
|
| | | UserGetIntegralFromOrderRecord record = new UserGetIntegralFromOrderRecord();
|
| | | record.setEventType(eventType);
|
| | | record.setOrderNo(orderNo);
|
| | | record.setOrderSourceType(orderSourceType);
|
| | | record.setUid(uid);
|
| | | return userGetIntegralFromOrderRecordMapper.countByRecordInfo(record);
|
| | | }
|
| | |
|
| | | @Transactional
|
| | | @Override
|
| | | public void addRecord(UserGetIntegralFromOrderRecord record) throws UserGetIntegralFromOrderRecordException {
|
| | | if (record == null || record.getUid() == null || record.getEventType() == null
|
| | | || StringUtil.isNullOrEmpty(record.getOrderNo()) || record.getOrderSourceType() == null)
|
| | | throw new UserGetIntegralFromOrderRecordException(1, "信息不完整");
|
| | |
|
| | | long count = countByEventTypeAndUidAndOrderInfo(record.getEventType(), record.getUid(), record.getOrderNo(),
|
| | | record.getOrderSourceType());
|
| | | if (count > 0)
|
| | | throw new UserGetIntegralFromOrderRecordException(2, "记录已存在");
|
| | |
|
| | | if (record.getCreateTime() == null)
|
| | | record.setCreateTime(new Date());
|
| | | userGetIntegralFromOrderRecordMapper.insertSelective(record);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | * 返利订单
|
| | | * @param uid
|
| | | */
|
| | | public void addRebateOrder(Long uid);
|
| | | public void addRebateOrder(Long uid,String orderNo,int sourceType);
|
| | |
|
| | | /**
|
| | | * 一级邀请订单
|
| | | * @param uid
|
| | | */
|
| | | public void addInviteOrderLevelOne(Long uid);
|
| | | public void addInviteOrderLevelOne(Long uid,String orderNo,int sourceType);
|
| | |
|
| | | /**
|
| | | * 二级邀请订单
|
| | | * @param uid
|
| | | */
|
| | | public void addInviteOrderLevelTwo(Long uid);
|
| | | public void addInviteOrderLevelTwo(Long uid,String orderNo,int sourceType);
|
| | |
|
| | |
|
| | | /**
|
| | | * 分享订单
|
| | | * @param uid
|
| | | */
|
| | | public void addShareOrder(Long uid);
|
| | | public void addShareOrder(Long uid,String orderNo,int sourceType);
|
| | |
|
| | | /**
|
| | | * 微信授权
|
New file |
| | |
| | | package com.yeshi.fanli.service.inter.user.integral;
|
| | |
|
| | | import com.yeshi.fanli.entity.integral.UserGetIntegralFromOrderRecord;
|
| | | import com.yeshi.fanli.exception.integral.UserGetIntegralFromOrderRecordException;
|
| | |
|
| | | public interface UserGetIntegralFromOrderRecordService {
|
| | |
|
| | | /**
|
| | | * 根据事件类型,用户,订单信息检索
|
| | | * @param eventType
|
| | | * @param uid
|
| | | * @param orderNo
|
| | | * @param orderSourceType
|
| | | * @return
|
| | | */
|
| | | public long countByEventTypeAndUidAndOrderInfo(int eventType, Long uid, String orderNo, int orderSourceType);
|
| | |
|
| | | /**
|
| | | * |
| | | * @param record
|
| | | */
|
| | | public void addRecord(UserGetIntegralFromOrderRecord record) throws UserGetIntegralFromOrderRecordException;
|
| | |
|
| | | }
|
| | |
| | | private void fanliGetIntegral(HongBaoV2 hongBaoV2) {
|
| | | if (hongBaoV2 != null && hongBaoV2.getState() == HongBaoV2.STATE_YILINGQU
|
| | | && hongBaoV2.getMoney().compareTo(new BigDecimal(0)) > 0) {
|
| | | // 查询对应的订单号
|
| | | Long mainHongBaoId = hongBaoV2.getId();
|
| | | if (hongBaoV2.getParent() != null && hongBaoV2.getParent().getId() != null)
|
| | | mainHongBaoId = hongBaoV2.getParent().getId();
|
| | |
|
| | | HongBaoOrder hongbaoOrder = hongBaoOrderService.selectDetailByHongBaoId(mainHongBaoId);
|
| | | if (hongbaoOrder == null || hongbaoOrder.getCommonOrder() == null)
|
| | | return;
|
| | | CommonOrder commonOrder = hongbaoOrder.getCommonOrder();
|
| | |
|
| | | if (hongBaoV2.getType() == HongBaoV2.TYPE_ZIGOU) {// 自购订单
|
| | | integralGetService.addRebateOrder(hongBaoV2.getUserInfo().getId());
|
| | | integralGetService.addRebateOrder(hongBaoV2.getUserInfo().getId(), commonOrder.getOrderNo(),
|
| | | commonOrder.getSourceType());
|
| | | } else if (hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_GOODS) {// 分享订单
|
| | | integralGetService.addShareOrder(hongBaoV2.getUserInfo().getId());
|
| | | integralGetService.addShareOrder(hongBaoV2.getUserInfo().getId(), commonOrder.getOrderNo(),
|
| | | commonOrder.getSourceType());
|
| | | } else if (hongBaoV2.getType() == HongBaoV2.TYPE_YIJI || hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_YIJI) {// 一级邀请
|
| | | integralGetService.addInviteOrderLevelOne(hongBaoV2.getUserInfo().getId());
|
| | | integralGetService.addInviteOrderLevelOne(hongBaoV2.getUserInfo().getId(), commonOrder.getOrderNo(),
|
| | | commonOrder.getSourceType());
|
| | | } else if (hongBaoV2.getType() == HongBaoV2.TYPE_ERJI || hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_ERJI) {// 二级邀请
|
| | | integralGetService.addInviteOrderLevelTwo(hongBaoV2.getUserInfo().getId());
|
| | | integralGetService.addInviteOrderLevelTwo(hongBaoV2.getUserInfo().getId(), commonOrder.getOrderNo(),
|
| | | commonOrder.getSourceType());
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | public static boolean greaterThan_2_1(String platform, String versionCode) {
|
| | | if ((("android".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 52))
|
| | | || (("ios".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 71)))
|
| | | || (("ios".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 75)))
|
| | | return true;
|
| | | else
|
| | | return false;
|
New file |
| | |
| | | package com.yeshi.fanli.util.factory.integral;
|
| | |
|
| | | import com.yeshi.fanli.entity.integral.UserGetIntegralFromOrderRecord;
|
| | |
|
| | | public class UserGetIntegralFromOrderRecordFactory {
|
| | |
|
| | | public static UserGetIntegralFromOrderRecord create(int eventType, Long uid, String orderNo, int sourceType,int integralCount) {
|
| | | UserGetIntegralFromOrderRecord record=new UserGetIntegralFromOrderRecord();
|
| | | record.setEventType(eventType);
|
| | | record.setIntegralCount(integralCount);
|
| | | record.setUid(uid);
|
| | | record.setOrderSourceType(sourceType);
|
| | | record.setOrderNo(orderNo);
|
| | | return record;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | rocketmq.SecretKey=ixWg90QbYFKP6ae5xpAo2P1qwIyll5 |
| | | #测试 http://MQ_INST_1205444665315884_Bbkj89nI.mq-internet-access.mq-internet.aliyuncs.com:80 |
| | | #正式 http://MQ_INST_1205444665315884_BbaMbxF4.mq-internet-access.mq-internet.aliyuncs.com:80 |
| | | rocketmq.NAMESRV_ADDR=http://MQ_INST_1205444665315884_BbaMbxF4.mq-internet-access.mq-internet.aliyuncs.com:80 |
| | | rocketmq.NAMESRV_ADDR=http://MQ_INST_1205444665315884_Bbkj89nI.mq-internet-access.mq-internet.aliyuncs.com:80 |
| | | |
| | | |