| | |
| | | return;
|
| | | }
|
| | | phone = phone.replaceAll(" ", "");
|
| | | |
| | |
|
| | | if (Constant.IS_TEST) {
|
| | | out.print(JsonUtil.loadTrueResult("发送成功"));
|
| | | return;
|
| | |
| | | */
|
| | | @RequestSerializableByKey(key = "#acceptData.device+'-'+#phone")
|
| | | @RequestMapping(value = "sendMSMBind", method = RequestMethod.POST)
|
| | | public void sendMSMBind(AcceptData acceptData, String phone, boolean slideVerify, PrintWriter out) {
|
| | | public void sendMSMBind(AcceptData acceptData, String phone, boolean slideVerify, Long uid, PrintWriter out) {
|
| | | if (phone == null || !StringUtil.isMobile(phone.replaceAll(" ", ""))) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "手机号输入有误,请修改"));
|
| | | return;
|
| | |
| | | //
|
| | | // 判断手机号码是否被封禁
|
| | | UserInfo phoneUser = userInfoService.getEffectiveUserInfoByPhone(phone);
|
| | | if (phoneUser != null) {
|
| | | if (phoneUser != null && uid != null) {
|
| | | out.print(JsonUtil.loadFalseResult(9001, "该电话号码被占用"));
|
| | | return;
|
| | | }
|
| | |
| | | out.print(JsonUtil.loadTrueResult("发送成功"));
|
| | | return;
|
| | | }
|
| | | |
| | |
|
| | | sendMSNnew(phone, slideVerify, 2, StringUtil.Md5(phone + "-" + acceptData.getDevice()), out);
|
| | | }
|
| | |
|
| | |
| | | String cachekey = null;
|
| | | if (type == 1) {
|
| | | // 登录验证码
|
| | | cachekey = RedisKeyEnum.getRedisKey(RedisKeyEnum.SMSLoginCount, phone + "" );
|
| | | cachekey = RedisKeyEnum.getRedisKey(RedisKeyEnum.SMSLoginCount, phone + "");
|
| | | } else if (type == 2) {
|
| | | // 绑定验证码
|
| | | cachekey = RedisKeyEnum.getRedisKey(RedisKeyEnum.SMSBindCount, phone + "" );
|
| | | cachekey = RedisKeyEnum.getRedisKey(RedisKeyEnum.SMSBindCount, phone + "");
|
| | | }
|
| | |
|
| | | if (cachekey == null) {
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
|
| | | import com.yeshi.fanli.exception.ParamsException;
|
| | | import com.yeshi.fanli.exception.user.vip.GiveVIPApplyInfoException;
|
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleDetailService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.GiveVIPApplyInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVipConfigService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | | @Resource
|
| | | private UserVipConfigService userVipConfigService;
|
| | |
|
| | | @Resource
|
| | | private ThreeSaleDetailService threeSaleDetailService;
|
| | |
|
| | | @RequestMapping(value = "applyVip")
|
| | | public void applyVip(AcceptData acceptData, GiveVIPApplyInfo info, String callback, PrintWriter out) {
|
| | | // TODO 查询开通人是否为他的下级
|
| | |
|
| | | try {
|
| | | info = giveVIPApplyInfoService.addGiveVIPApplyInfo(info);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("申请成功"));
|
| | |
| | | import com.xxl.job.core.biz.model.ReturnT;
|
| | | import com.xxl.job.core.handler.annotation.XxlJob;
|
| | | import com.yeshi.fanli.service.manger.user.UserTeamStatisticManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | |
|
| | | /**
|
| | |
| | | @XxlJob("updateTeamStatisticLevelCount")
|
| | | public ReturnT<String> updatePDDOrder(String param) throws Exception {
|
| | | long now = System.currentTimeMillis();
|
| | | if (!StringUtil.isNullOrEmpty(param)) {
|
| | | now = TimeUtil.convertToTimeTemp(param, "yyyy-MM-dd");
|
| | | }
|
| | | Date minTime = new Date(TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(now, "yyyy-MM-dd"), "yyyy-MM-dd"));
|
| | | Date maxTime = new Date(TimeUtil
|
| | | .convertToTimeTemp(TimeUtil.getGernalTime(now + 1000 * 60 * 60 * 24L, "yyyy-MM-dd"), "yyyy-MM-dd"));
|
| | | userTeamStatisticManager.syncInviteData(minTime, maxTime);
|
| | | userTeamStatisticManager.syncInviteAndTotalData(minTime, maxTime);
|
| | | userTeamStatisticManager.syncVIPData(minTime, maxTime);
|
| | | return ReturnT.SUCCESS;
|
| | | }
|
| | |
| | | @Resource
|
| | | private ThreeSaleSerivce threeSaleSerivce;
|
| | |
|
| | | /**
|
| | | * 用户等级升级
|
| | | * @Title: userUpgraded
|
| | | * @Description: |
| | | * @param uid
|
| | | * @param level
|
| | | * @param date |
| | | * void 返回类型
|
| | | * @throws
|
| | | */
|
| | | public void userUpgraded(Long uid, UserLevelEnum level, Date date) {
|
| | |
|
| | | // 更新一级,二级,二级外响应的等级提升
|
| | |
|
| | | // 统计
|
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | | * 同步会员信息(一级/二级/二级外)
|
| | |
| | | * void 返回类型
|
| | | * @throws
|
| | | */
|
| | | public void syncInviteData(Date minTime, Date maxTime) {
|
| | | public void syncInviteAndTotalData(Date minTime, Date maxTime) {
|
| | | List<ThreeSale> totalList = new ArrayList<>();
|
| | | long count = threeSaleSerivce.countAll(minTime, maxTime);
|
| | | int pageSize = 1000;
|
| | |
| | | record.setCountDay(new Date(TimeUtil.convertToTimeTemp(day, "yyyy-MM-dd")));
|
| | | if (level == 1) {
|
| | | record.setFirstDaRen(map.get(key));
|
| | | record.setFirstNum(map.get(key));
|
| | | } else if (level == 2) {
|
| | | record.setSecondDaRen(map.get(key));
|
| | | record.setSecondNum(map.get(key));
|
| | | } else {
|
| | | record.setBeyondDaRen(map.get(key));
|
| | | record.setBeyondNum(map.get(key));
|
| | | }
|
| | | // 保存
|
| | | try {
|
| | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | | * 邀请成功
|
| | | * @Title: inviteSuccess
|
| | | * @Description: |
| | | * @param uid 被邀请人用户ID
|
| | | * @param date |
| | | * void 返回类型
|
| | | * @throws
|
| | | */
|
| | | public void inviteSuccess(Long uid, Date date) {
|
| | |
|
| | | }
|
| | |
|