1 文件已重命名
13个文件已修改
1个文件已添加
File was renamed from fanli/src/main/java/com/yeshi/fanli/aspect/integral/IntegralGetVersionLimitAspect.java |
| | |
| | | package com.yeshi.fanli.aspect.integral;
|
| | | package com.yeshi.fanli.aspect;
|
| | |
|
| | | import java.lang.reflect.Method;
|
| | |
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserActiveLogService;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.annotation.integral.IntegralGetVersionLimit;
|
| | | import com.yeshi.fanli.util.annotation.redpack.RedPackGetVersionLimit;
|
| | |
|
| | | @Component
|
| | | @Aspect
|
| | | public class IntegralGetVersionLimitAspect {
|
| | | public class VersionLimitAspect {
|
| | |
|
| | | @Resource
|
| | | private UserActiveLogService userActiveLogService;
|
| | |
| | | return expression.getValue(context).toString();
|
| | | }
|
| | |
|
| | | @Around("execution(public * com.yeshi.fanli.service.impl.user.integral.*.*(..))")
|
| | | @Around("execution(public * com.yeshi.fanli.service.impl..*.*(..))")
|
| | | public Object requestSerializable(ProceedingJoinPoint joinPoint) throws Throwable {
|
| | | Signature signature = joinPoint.getSignature();
|
| | | MethodSignature methodSignature = (MethodSignature) signature;
|
| | |
| | | UserActiveLog activeLog = userActiveLogService.getUserLatestActiveInfo(Long.parseLong(uid));
|
| | | if (activeLog != null) {
|
| | | // 小于1.6.5版本不增加积分
|
| | | if (!VersionUtil.greaterThan_1_6_5(
|
| | | "appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
|
| | | if (!VersionUtil.greaterThan_1_6_5("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
|
| | | activeLog.getVersionCode()))
|
| | | return null;
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | if (realMethod.isAnnotationPresent(RedPackGetVersionLimit.class)) {
|
| | | RedPackGetVersionLimit rs = realMethod.getAnnotation(RedPackGetVersionLimit.class);
|
| | | String key = rs.uid();
|
| | | String uid = generateKeyBySpEL(key, joinPoint);
|
| | | if (uid != null && NumberUtil.isNumeric(uid)) {
|
| | | UserActiveLog activeLog = userActiveLogService.getUserLatestActiveInfo(Long.parseLong(uid));
|
| | | if (activeLog != null) {
|
| | | // 小于2.0.2版本不增加积分
|
| | | if (!VersionUtil.greaterThan_2_0_2("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
|
| | | activeLog.getVersionCode()))
|
| | | return null;
|
| | | }
|
| | |
| | | import com.google.gson.stream.JsonWriter;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackDetail.RedPackDetailTypeEnum;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackExchange;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackWinInvite;
|
| | |
| | | import com.yeshi.fanli.service.inter.redpack.RedPackExchangeService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackGiveRecordService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackWinInviteService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.vo.redpack.RedPackDetailVO;
|
| | | import com.yeshi.fanli.vo.redpack.RedPackWinInviteVO;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | | |
| | | @Resource |
| | | private UserInfoExtraService userInfoExtraService;
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | }
|
| | |
|
| | |
|
| | | |
| | | /**
|
| | | * 红包邀请进度
|
| | | * @param acceptData
|
| | | * @param page
|
| | | * @param uid
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getRewardList", method = RequestMethod.POST)
|
| | | public void getRewardList(AcceptData acceptData, Integer page, Long uid, PrintWriter out) {
|
| | | if (uid == null || uid <= 0) {
|
| | |
| | | data.put("list", JsonUtil.getApiCommonGson().toJson(list));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 用户基础信息
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getBasicInfo", method = RequestMethod.POST)
|
| | | public void getBasicInfo(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | if (uid == null || uid <= 0) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | return;
|
| | | }
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("balance", redPackBalanceService.getBalance(uid));
|
| | | data.put("ruleLink", redPackConfigService.getValueByKey("invite_reward_rule_link"));
|
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
|
| | | if (userInfoExtra != null && !StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode())) {
|
| | | data.put("inviteCode", userInfoExtra.getInviteCode());
|
| | | } else {
|
| | | data.put("inviteCode", "");
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data)); |
| | | }
|
| | | }
|
| | |
| | | /**
|
| | | * 查询首笔有效到账订单
|
| | | * @param uid
|
| | | * @param type 类型: 1自购 2分享 3邀请
|
| | | * @param typeHB 类型: 1自购 2分享 3邀请
|
| | | * @param typeDate 日期类型: 3本月 4上月
|
| | | * @return
|
| | | */
|
| | | CommonOrderVO firstValidOrderByUid(@Param("uid") Long uid, @Param("typeHB") Integer typeHB,
|
| | |
| | | @Column(name = "rpd_type")
|
| | | private RedPackDetailTypeEnum type;
|
| | | @Expose
|
| | | @Column(name = "rpd_desc")
|
| | | private String desc;
|
| | | @Column(name = "rpd_desc_info")
|
| | | private String descInfo;
|
| | | @Expose
|
| | | @Column(name = "rpd_remark")
|
| | | private String remark;
|
| | |
| | | this.type = type;
|
| | | }
|
| | |
|
| | | public String getDesc() {
|
| | | return desc;
|
| | | public String getDescInfo() {
|
| | | return descInfo;
|
| | | }
|
| | |
|
| | | public void setDesc(String desc) {
|
| | | this.desc = desc;
|
| | | public void setDescInfo(String descInfo) {
|
| | | this.descInfo = descInfo;
|
| | | }
|
| | |
|
| | | public String getRemark() {
|
| | |
| | | v2.`hb_type` = 21 OR v2.`hb_type` = 22)
|
| | | </if>
|
| | | <if test="typeDate == 3"> <!-- 本月 -->
|
| | | AND DATE_FORMAT(v2.`hb_get_time`,'%Y%m') = DATE_FORMAT(CURDATE(),'%Y%m')
|
| | | AND DATE_FORMAT(co.`co_create_time`,'%Y%m') = DATE_FORMAT(CURDATE(),'%Y%m')
|
| | | </if>
|
| | | <if test="typeDate == 4"> <!-- 上月 -->
|
| | | AND PERIOD_DIFF(DATE_FORMAT(NOW(), '%Y%m'),DATE_FORMAT(co.`co_create_time`, '%Y%m')) = 1
|
| | | </if>
|
| | | ORDER BY co.`co_id`
|
| | | LIMIT 1
|
| | |
| | | <result column="rpd_uid" property="uid" jdbcType="BIGINT"/> |
| | | <result column="rpd_money" property="money" jdbcType="DECIMAL"/> |
| | | <result column="rpd_title" property="title" jdbcType="VARCHAR"/> |
| | | <result column="rpd_desc" property="desc" jdbcType="VARCHAR"/> |
| | | <result column="rpd_desc_info" property="descInfo" jdbcType="VARCHAR"/> |
| | | <result column="rpd_remark" property="remark" jdbcType="VARCHAR"/> |
| | | <result column="rpd_create_time" property="createTime" jdbcType="TIMESTAMP"/> |
| | | <result column="rpd_display" property="display" jdbcType="VARCHAR"/> |
| | |
| | | <result column="dateFormate" property="dateFormate" jdbcType="VARCHAR" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List">rpd_id,rpd_identify_code,rpd_uid,rpd_money,rpd_title,rpd_type,rpd_desc,rpd_remark,rpd_create_time,rpd_display</sql> |
| | | <sql id="Base_Column_List">rpd_id,rpd_identify_code,rpd_uid,rpd_money,rpd_title,rpd_type,rpd_desc_info,rpd_remark,rpd_create_time,rpd_display</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_red_pack_detail where rpd_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_red_pack_detail where rpd_id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.redpack.RedPackDetail" useGeneratedKeys="true" keyProperty="id">insert into yeshi_red_pack_detail (rpd_id,rpd_identify_code,rpd_uid,rpd_money,rpd_title,rpd_type,rpd_desc,rpd_remark,rpd_create_time,rpd_display) values (#{id,jdbcType=BIGINT},,#{identifyCode,jdbcType=VARCHAR}#{uid,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{title,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR},#{desc,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{display,jdbcType=VARCHAR})</insert> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.redpack.RedPackDetail" useGeneratedKeys="true" keyProperty="id">insert into yeshi_red_pack_detail (rpd_id,rpd_identify_code,rpd_uid,rpd_money,rpd_title,rpd_type,rpd_desc_info,rpd_remark,rpd_create_time,rpd_display) values (#{id,jdbcType=BIGINT},,#{identifyCode,jdbcType=VARCHAR}#{uid,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{title,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR},#{descInfo,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{display,jdbcType=VARCHAR})</insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackDetail" useGeneratedKeys="true" keyProperty="id">insert into yeshi_red_pack_detail |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">rpd_id,</if> |
| | |
| | | <if test="money != null">rpd_money,</if> |
| | | <if test="title != null">rpd_title,</if> |
| | | <if test="type != null">rpd_type,</if> |
| | | <if test="desc != null">rpd_desc,</if> |
| | | <if test="descInfo != null">rpd_desc_info,</if> |
| | | <if test="remark != null">rpd_remark,</if> |
| | | <if test="createTime != null">rpd_create_time,</if> |
| | | <if test="display != null">rpd_display,</if> |
| | |
| | | <if test="money != null">#{money,jdbcType=DECIMAL},</if> |
| | | <if test="title != null">#{title,jdbcType=VARCHAR},</if> |
| | | <if test="type != null">#{type,jdbcType=VARCHAR},</if> |
| | | <if test="desc != null">#{desc,jdbcType=VARCHAR},</if> |
| | | <if test="descInfo != null">#{descInfo,jdbcType=VARCHAR},</if> |
| | | <if test="remark != null">#{remark,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="display != null">#{display,jdbcType=VARCHAR},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.redpack.RedPackDetail">update yeshi_red_pack_detail set rpd_identify_code = #{identifyCode,jdbcType=VARCHAR},rpd_uid = #{uid,jdbcType=BIGINT},rpd_money = #{money,jdbcType=DECIMAL},rpd_title = #{title,jdbcType=VARCHAR},rpd_type = #{type,jdbcType=VARCHAR},rpd_desc = #{desc,jdbcType=VARCHAR},rpd_remark = #{remark,jdbcType=VARCHAR},rpd_create_time = #{createTime,jdbcType=TIMESTAMP} where rpd_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.redpack.RedPackDetail">update yeshi_red_pack_detail set rpd_identify_code = #{identifyCode,jdbcType=VARCHAR},rpd_uid = #{uid,jdbcType=BIGINT},rpd_money = #{money,jdbcType=DECIMAL},rpd_title = #{title,jdbcType=VARCHAR},rpd_type = #{type,jdbcType=VARCHAR},rpd_desc_info = #{descInfo,jdbcType=VARCHAR},rpd_remark = #{remark,jdbcType=VARCHAR},rpd_create_time = #{createTime,jdbcType=TIMESTAMP} where rpd_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.redpack.RedPackDetail">update yeshi_red_pack_detail |
| | | <set> |
| | | <if test="identifyCode != null">rpd_identify_code=#{identifyCode,jdbcType=VARCHAR},</if> |
| | |
| | | <if test="money != null">rpd_money=#{money,jdbcType=DECIMAL},</if> |
| | | <if test="title != null">rpd_title=#{title,jdbcType=VARCHAR},</if> |
| | | <if test="type != null">rpd_type=#{type,jdbcType=VARCHAR},</if> |
| | | <if test="desc != null">rpd_desc=#{desc,jdbcType=VARCHAR},</if> |
| | | <if test="descInfo != null">rpd_desc_info=#{descInfo,jdbcType=VARCHAR},</if> |
| | | <if test="remark != null">rpd_remark=#{remark,jdbcType=VARCHAR},</if> |
| | | <if test="createTime != null">rpd_create_time=#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="display != null">rpd_display=#{display,jdbcType=VARCHAR},</if> |
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public CommonOrderVO firstValidOrderTheMonthByUidAndType(Long uid, Integer type) {
|
| | | return commonOrderMapper.firstValidOrderByUid(uid, type, 3);
|
| | | public CommonOrderVO firstValidOrderLastMonthByUidAndType(Long uid, Integer type) {
|
| | | return commonOrderMapper.firstValidOrderByUid(uid, type, 4);
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
| | | tips = tips.replace("{APP名称}", projectChineseName);
|
| | | }
|
| | | tips = tips.replace("{口令}", token).replace("{下载链接}", redPackConfigService.getValueByKey("app_down_link")).replace("{面额}",
|
| | | amount.toString());
|
| | | amount.setScale(2).toString());
|
| | |
|
| | | // 减少红包
|
| | | try {
|
| | |
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestSerializableByKeyService;
|
| | | import com.yeshi.fanli.util.annotation.redpack.RedPackGetVersionLimit;
|
| | | import com.yeshi.fanli.util.factory.RedPackDetailFactory;
|
| | | import com.yeshi.fanli.vo.order.CommonOrderVO;
|
| | |
|
| | |
| | | return redPackWinInviteMapper.countRewardRecord(uid);
|
| | | }
|
| | |
|
| | | @Override
|
| | | @RedPackGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | | public void orderArriveReward(Long uid, Integer source, String orderNo) throws Exception {
|
| | | if (uid == null || source == null || orderNo == null)
|
| | | return;
|
| | |
| | | UserInfo boss = threeSaleSerivce.getBoss(uid);
|
| | | if(boss != null) {
|
| | | firstReward(uid, source, orderNo);
|
| | | firstSharedOrderRewardToBoss(boss.getId(), uid, source, orderNo);
|
| | | firstSharedOrderRewardTheMonthToBoss(boss.getId(), uid, source, orderNo);
|
| | | bossReward(boss.getId(), uid, source, orderNo);
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 上级奖励
|
| | | * @param uid
|
| | | * @param teamUid
|
| | | * @param source
|
| | | * @param orderNo
|
| | | * @throws Exception
|
| | | */
|
| | | @RedPackGetVersionLimit(uid = "#uid")
|
| | | @Transactional
|
| | | private void bossReward(Long uid, Long teamUid, Integer source, String orderNo) throws Exception {
|
| | | firstSharedOrderRewardToBoss(uid, teamUid, source, orderNo);
|
| | | firstSharedOrderRewardTheMonthToBoss(uid, teamUid, source, orderNo);
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 被邀请人下首单返利(下单就给):
|
| | |
| | | private void firstReward(Long uid, Integer source, String orderNo) throws Exception{
|
| | | // 奖励一次
|
| | | long total = redPackWinInviteMapper.countByUidAndType(uid, RedPackWinInviteTypeEnum.newUserReward.name());
|
| | | if (total > 1)
|
| | | if (total > 0)
|
| | | return;
|
| | |
|
| | | // 1、判断是否用户首个订单
|
| | | CommonOrderVO order = commonOrderService.firstValidOrderByUid(uid);
|
| | | if (order == null || source == order.getSourceType() || orderNo.equals(order.getOrderNo())) |
| | | if (order == null || source != order.getSourceType() || !orderNo.equals(order.getOrderNo())) |
| | | return;
|
| | |
|
| | | // 金额
|
| | |
| | | private void firstSharedOrderRewardToBoss(Long uid, Long inviteeUid, Integer source, String orderNo) throws Exception{
|
| | | // 同一队员奖励一次
|
| | | long totalReward = redPackWinInviteMapper.countByUidAndTeamUidAndType(uid, inviteeUid, RedPackWinInviteTypeEnum.firstSharedOrder.name());
|
| | | if (totalReward > 1)
|
| | | if (totalReward > 0)
|
| | | return;
|
| | |
|
| | | // 1、判断是否是改用户首个分享订单
|
| | | CommonOrderVO order = commonOrderService.firstValidOrderByUidAndType(inviteeUid, 2);
|
| | | if (order == null || source == order.getSourceType() || orderNo.equals(order.getOrderNo())) |
| | | if (order == null || source != order.getSourceType() || !orderNo.equals(order.getOrderNo())) |
| | | return;
|
| | |
|
| | | // 2、判断是第几个人
|
| | | long total = redPackWinInviteMapper.countByUidAndType(uid, RedPackWinInviteTypeEnum.firstSharedOrder.name());
|
| | | |
| | |
|
| | | // 计算应增加红包金额
|
| | | BigDecimal money = new BigDecimal(redPackConfigService.getValueByKey("first_shared_order"));
|
| | |
| | | */
|
| | | @Transactional
|
| | | private void firstSharedOrderRewardTheMonthToBoss(Long uid, Long inviteeUid, Integer source, String orderNo) throws Exception{
|
| | | // 1、判断是否是本月首单
|
| | | CommonOrderVO order = commonOrderService.firstValidOrderTheMonthByUidAndType(inviteeUid, 2);
|
| | | if (order == null || source == order.getSourceType() || orderNo.equals(order.getOrderNo()) ||
|
| | | // 1、判断是否是上个月首单
|
| | | CommonOrderVO order = commonOrderService.firstValidOrderLastMonthByUidAndType(inviteeUid, 2);
|
| | | if (order == null || source != order.getSourceType() || !orderNo.equals(order.getOrderNo()) ||
|
| | | order.getAccountTime() == null)
|
| | | return;
|
| | |
|
| | |
| | | }
|
| | |
|
| | |
|
| | |
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Override
|
| | | @Transactional
|
| | | private void inviteSucceedReward(Long uid) throws Exception{
|
| | | public void inviteSucceedReward(Long uid) throws Exception{
|
| | | // 验证是否存在上级
|
| | | UserInfo boss = threeSaleSerivce.getBoss(uid);
|
| | | if(boss == null)
|
| | |
| | |
|
| | | // 同一队员奖励一次
|
| | | long totalReward = redPackWinInviteMapper.countByUidAndTeamUidAndType(boss.getId(), uid, RedPackWinInviteTypeEnum.inviteSucceed.name());
|
| | | if (totalReward > 1)
|
| | | if (totalReward > 0)
|
| | | return;
|
| | |
|
| | | // 1、绑定电话号码
|
| | |
| | | if (user != null && !StringUtil.isNullOrEmpty(user.getNickName()))
|
| | | userName = user.getNickName();
|
| | | MsgRedPackGiveContentDTO givedto = new MsgRedPackGiveContentDTO();
|
| | | givedto.setTitle("红包领取");
|
| | | givedto.setTitle("红包赠送");
|
| | | givedto.setUserInfo("昵称:" + userName + " ID:" + uid);
|
| | | givedto.setTime(sd.format(new Date()));
|
| | | givedto.setMoney("¥" + giveRecord.getAmount().setScale(2));
|
| | |
| | | public CommonOrderVO firstValidOrderByUidAndType(Long uid, Integer type);
|
| | |
|
| | | /**
|
| | | * 查询是否本月到账订单
|
| | | * 查询是否上月到账订单
|
| | | * @param uid
|
| | | * @param type 类型: 1自购 2分享 3邀请
|
| | | * @return
|
| | | */
|
| | | public CommonOrderVO firstValidOrderTheMonthByUidAndType(Long uid, Integer type);
|
| | | public CommonOrderVO firstValidOrderLastMonthByUidAndType(Long uid, Integer type);
|
| | |
|
| | | }
|
| | |
| | | * @return
|
| | | */
|
| | | public Long countRewardRecord(Long uid);
|
| | |
|
| | | /**
|
| | | * 邀请成功奖励
|
| | | * @param uid
|
| | | * @throws Exception
|
| | | */
|
| | | public void inviteSucceedReward(Long uid) throws Exception;
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.util.annotation.redpack;
|
| | |
|
| | | import java.lang.annotation.Documented;
|
| | | import java.lang.annotation.ElementType;
|
| | | import java.lang.annotation.Inherited;
|
| | | import java.lang.annotation.Retention;
|
| | | import java.lang.annotation.RetentionPolicy;
|
| | | import java.lang.annotation.Target;
|
| | |
|
| | | /**
|
| | | * 红包获得版本控制器
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Documented
|
| | | @Target(ElementType.METHOD)
|
| | | @Inherited
|
| | | @Retention(RetentionPolicy.RUNTIME)
|
| | | public @interface RedPackGetVersionLimit {
|
| | | String uid();
|
| | | }
|
| | |
| | |
|
| | | RedPackDetail detail = new RedPackDetail();
|
| | | detail.setDisplay(false);
|
| | | detail.setDesc( "等待人工审核");
|
| | | detail.setDescInfo( "等待人工审核");
|
| | | detail.setUid(exchange.getUid());
|
| | | detail.setMoney(new BigDecimal("-" + exchange.getMoney()));
|
| | | detail.setType(RedPackDetailTypeEnum.redExchange);
|
| | |
| | | RedPackDetail detail = new RedPackDetail();
|
| | | detail.setId(id);
|
| | | detail.setDisplay(true);
|
| | | detail.setDesc("请到账户余额中查看");
|
| | | detail.setDescInfo("请到账户余额中查看");
|
| | | detail.setType(RedPackDetailTypeEnum.redExchangePass);
|
| | | detail.setTitle(RedPackDetailTypeEnum.redExchangePass.getDesc());
|
| | | detail.setIdentifyCode(StringUtil.Md5(RedPackDetailTypeEnum.redExchangePass.name() + ":" + exchange.getId()));
|
| | |
| | | detail.setDisplay(false);
|
| | | detail.setUid(exchange.getUid());
|
| | | detail.setMoney(exchange.getMoney());
|
| | | detail.setDesc("红包产生过程中涉嫌违规");
|
| | | detail.setDescInfo("红包产生过程中涉嫌违规");
|
| | | detail.setTitle(RedPackDetailTypeEnum.redExchangeReject.getDesc());
|
| | | detail.setType(RedPackDetailTypeEnum.redExchangeReject);
|
| | | detail.setIdentifyCode(StringUtil.Md5(RedPackDetailTypeEnum.redExchangeReject.name() + ":" + exchange.getId()));
|
| | |
| | | detail.setDisplay(true);
|
| | | detail.setUid(winInvite.getUid());
|
| | | detail.setMoney(winInvite.getMoney());
|
| | | detail.setDesc("完成首笔订单");
|
| | | detail.setDescInfo("完成首笔订单");
|
| | | detail.setTitle(RedPackDetailTypeEnum.newUserReward.getDesc());
|
| | | detail.setType(RedPackDetailTypeEnum.newUserReward);
|
| | | detail.setIdentifyCode(StringUtil.Md5(RedPackDetailTypeEnum.newUserReward.name() + ":" + winInvite.getId()));
|
| | |
| | | detail.setDisplay(true);
|
| | | detail.setUid(winInvite.getUid());
|
| | | detail.setMoney(winInvite.getMoney());
|
| | | detail.setDesc("成功邀请好友");
|
| | | detail.setDescInfo("成功邀请好友");
|
| | | detail.setTitle(RedPackDetailTypeEnum.invite.getDesc());
|
| | | detail.setType(RedPackDetailTypeEnum.invite);
|
| | | detail.setIdentifyCode(StringUtil.Md5(RedPackDetailTypeEnum.invite.name() + ":" + winInvite.getId()));
|
| | |
| | | detail.setDisplay(true);
|
| | | detail.setUid(winInvite.getUid());
|
| | | detail.setMoney(winInvite.getMoney());
|
| | | detail.setDesc("好友完成订单");
|
| | | detail.setDescInfo("好友完成订单");
|
| | | detail.setTitle(RedPackDetailTypeEnum.increaseReward.getDesc());
|
| | | detail.setType(RedPackDetailTypeEnum.increaseReward);
|
| | | detail.setIdentifyCode(StringUtil.Md5(RedPackDetailTypeEnum.increaseReward.name() + ":" + winInvite.getId()));
|
| | |
| | | detail.setDisplay(true);
|
| | | detail.setUid(winInvite.getUid());
|
| | | detail.setMoney(winInvite.getMoney());
|
| | | detail.setDesc("好友完成订单");
|
| | | detail.setDescInfo("好友完成订单");
|
| | | detail.setTitle(RedPackDetailTypeEnum.seriesReward.getDesc());
|
| | | detail.setType(RedPackDetailTypeEnum.seriesReward);
|
| | | detail.setIdentifyCode(StringUtil.Md5(RedPackDetailTypeEnum.seriesReward.name() + ":" + winInvite.getId()));
|
| | |
| | | return null;
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(MsgTypeMoneyTypeEnum.redPackExchangePass.getDesc() + "", COLOR_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO(msg.getMsgType().getDesc() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | |
| | | return null;
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(MsgTypeMoneyTypeEnum.redPackExchangePass.getDesc() + "", COLOR_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO(msg.getMsgType().getDesc() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("类别", COLOR_TITLE), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | |
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(dto.getMoney() + "", COLOR_HIGHLIGHT_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("金额", COLOR_TITLE), contentList));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("金 额", COLOR_TITLE), contentList));
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(dto.getBalance() + "", COLOR_HIGHLIGHT_CONTENT));
|