google马甲包-hiyoo
This commit is contained in:
@@ -8,23 +8,10 @@ package com.accompany.common.constant;
|
||||
*/
|
||||
public enum AppEnum {
|
||||
|
||||
tutu("tutu", "66"),
|
||||
qingxun("qingxun", "66星球"),
|
||||
PlanetStar("PlanetStar", "66星球"),
|
||||
PlanetStar66("PlanetStar66", "66星球企业包"),
|
||||
InterSpace("InterSpace", "66空间"),
|
||||
planet("planet", "hello处cp"),
|
||||
ear("ear", "侧耳"),
|
||||
mj("mj", "马甲包"),
|
||||
yinyou("yinyou", "大鹅"),
|
||||
yinyouEnterprise("yinyouEnterprise", "大鹅企业包"),
|
||||
yinbao("yinbao", "魔力"),
|
||||
|
||||
pekoEnterprise("pekoEnterprise", "peko企业包"),
|
||||
peko("peko", "peko"),
|
||||
youmi("youmi", "peko ios马甲包"),
|
||||
peki("peki", "peko google马甲包"),
|
||||
habu("habu", "peko google马甲包"),
|
||||
hiyoo("hiyoo", "peko google马甲包"),
|
||||
;
|
||||
|
||||
public static AppEnum getCurApp(){
|
||||
|
@@ -107,10 +107,6 @@ public class MasterApprenticeV2Service extends BaseService {
|
||||
try {
|
||||
if (Constant.EventType.LOGIN.equals(type)) {
|
||||
Users users = usersService.getUsersByUid(Long.parseLong(masterUid));
|
||||
if(AppEnum.qingxun.getValue().equals(users.getCurrentApp())||AppEnum.planet.getValue().equals(users.getCurrentApp())){
|
||||
// 轻寻不推送
|
||||
return;
|
||||
}
|
||||
//记录师傅推送次数
|
||||
String value = jedisService.hget(RedisKey.master_push_times.getKey(),masterUid);
|
||||
Integer pushTimes = StringUtils.isBlank(value) ? 0 : Integer.parseInt(value);
|
||||
|
@@ -47,7 +47,7 @@ public abstract class AbstractCertifyService extends BaseService {
|
||||
*/
|
||||
public void sendCertificationCode(String phone, Long uid, String ip, DeviceInfo deviceInfo) throws Exception {
|
||||
if (deviceInfo == null || StringUtils.isBlank(deviceInfo.getDeviceId())) {
|
||||
String app = deviceInfo != null?deviceInfo.getApp(): AppEnum.PlanetStar.getValue();
|
||||
String app = deviceInfo != null?deviceInfo.getApp(): "";
|
||||
deviceInfo = new DeviceInfo();
|
||||
deviceInfo.setDeviceId(getDeviceId(uid));
|
||||
deviceInfo.setApp(app);
|
||||
|
@@ -91,11 +91,6 @@ public class FirstPageBannerService extends ServiceImpl<FirstPageBannerMapper, F
|
||||
&& now.compareTo(banner.getStartTime()) >= 0 && now.compareTo(banner.getEndTime()) <= 0).collect(Collectors.toList());
|
||||
List<FirstPageBannerVo> bannerVos = Lists.newArrayList();
|
||||
list.forEach(banner -> {
|
||||
if (deviceInfo.getApp().equals(AppEnum.InterSpace.getValue())) {
|
||||
if (StringUtils.isBlank(banner.getAppId()) || !banner.getAppId().contains(deviceInfo.getApp())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(banner.getNoShowChannels()) && StringUtils.isNotBlank(deviceInfo.getChannel())) {
|
||||
// 检查是否不展示的渠道包
|
||||
List<String> notShowChannels = Arrays.stream(banner.getNoShowChannels().split(",")).collect(Collectors.toList());
|
||||
|
@@ -1200,12 +1200,7 @@ public class HallManageService extends BaseService {
|
||||
codeVo.setExpireDate(expireTime);
|
||||
codeVo.setExpireDateStr("七天内(" + DateTimeUtil.convertDate(new Date(expireTime), DateTimeUtil.SIMPLE_MONTH_DATE_PATTERN) + ")");
|
||||
//String downloadUrl = sysConfService.getSysConfValueById(Constant.SysConfId.app_download_url);
|
||||
String appName = "";
|
||||
if (AppEnum.tutu.getValue().equals(app)) {
|
||||
appName = "66星球";
|
||||
} else if (AppEnum.qingxun.getValue().equals(app)) {
|
||||
appName = "66星球";
|
||||
}
|
||||
String appName = app;
|
||||
codeVo.setShareContent(String.format(shareContent, appName, nick, appName, hallName, appName, code));
|
||||
return codeVo;
|
||||
}
|
||||
|
@@ -574,8 +574,7 @@ public class LinearlyPrizePoolService {
|
||||
private void sendTotalStatisticsReportUseEnterpriseWechatMsg(LinearlyPoolTotalStatisticsDTO statisticsRes, Date startTime, Date endTime, LinearlyPoolConfigDTO config) {
|
||||
MarkdownMessage msg = new MarkdownMessage();
|
||||
String gameName = StringUtils.isNotBlank(config.getGameName()) ? config.getGameName() : LinearlyPoolConstants.DEFAULT_GAME_NAME;
|
||||
String header = new StringBuilder("[").append(AppEnum.yinyou.getDesc()).append("]")
|
||||
.append("[").append(gameName).append("]在 ").append(DateTimeUtil.convertDate(startTime)).append("-")
|
||||
String header = new StringBuilder("[").append(gameName).append("]在 ").append(DateTimeUtil.convertDate(startTime)).append("-")
|
||||
.append(DateTimeUtil.convertDate(endTime)).append("期间内情况如下:").toString();
|
||||
msg.addTitle(MarkdownMessage.getHeaderText(3, header));
|
||||
msg.add(MarkdownMessage.getReferenceText(new StringBuilder("参与用户数: ").append(statisticsRes.getDrawUserCount()).toString()));
|
||||
|
@@ -38,9 +38,6 @@ public class PersonalCenterService {
|
||||
public List<PersonalCenter> getPersonalCenterList(Long uid, DeviceInfo deviceInfo) {
|
||||
QueryWrapper<PersonalCenter> wrapper = new QueryWrapper<>();
|
||||
wrapper.lambda().eq(PersonalCenter :: getCenterStatus, Constant.GlobalDelVal.not_del)
|
||||
//todo 只为过包
|
||||
.notIn(StringUtils.hasText(deviceInfo.getApp()) && AppEnum.habu.getValue().equals(deviceInfo.getApp()),
|
||||
PersonalCenter::getCenterId, 11, 12)
|
||||
.orderByAsc(PersonalCenter :: getCenterSeq);
|
||||
Users user = usersService.getUsersByUid(uid);
|
||||
if(user == null || !checkUserInExpect(uid)){
|
||||
|
@@ -90,16 +90,8 @@ public class InviteCodeService extends BaseService {
|
||||
if (deviceInfo == null || StringUtils.isBlank(deviceInfo.getApp())) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<String> signupApps = new ArrayList<>();
|
||||
if (deviceInfo.getApp().equalsIgnoreCase(AppEnum.PlanetStar.getValue()) || deviceInfo.getApp().equalsIgnoreCase(AppEnum.PlanetStar66.getValue())) {
|
||||
signupApps.add(AppEnum.PlanetStar.getValue());
|
||||
signupApps.add(AppEnum.PlanetStar66.getValue());
|
||||
} else if (deviceInfo.getApp().equalsIgnoreCase(AppEnum.yinyou.getValue()) || deviceInfo.getApp().equalsIgnoreCase(AppEnum.yinyouEnterprise.getValue())) {
|
||||
signupApps.add(AppEnum.yinyou.getValue());
|
||||
signupApps.add(AppEnum.yinyouEnterprise.getValue());
|
||||
}
|
||||
|
||||
return signupApps;
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
public BusiStatus checkInviteCode(String inviteCode, String deviceId) {
|
||||
|
@@ -126,16 +126,10 @@ public class WorldMemberActiveRecordService extends BaseService {
|
||||
}
|
||||
boolean isOldAppVersion = false;
|
||||
String app = account.getApp();
|
||||
//如果不是轻寻app,直接清理
|
||||
if(!StringUtils.equalsIgnoreCase(app, AppEnum.qingxun.getValue())) {
|
||||
isOldAppVersion = true;
|
||||
}
|
||||
if(!isOldAppVersion) {
|
||||
String os = account.getOs();
|
||||
String appVersion = account.getAppVersion();
|
||||
isOldAppVersion = (StringUtils.equalsIgnoreCase(os, OsEnum.ANDROID.getName()) && appVersionService.compareVersion(appVersion, "1.3.0") < 0)
|
||||
|| (StringUtils.equalsIgnoreCase(os, OsEnum.IOS.getName()) && appVersionService.compareVersion(appVersion, "1.3.0") < 0);
|
||||
}
|
||||
String os = account.getOs();
|
||||
String appVersion = account.getAppVersion();
|
||||
isOldAppVersion = (StringUtils.equalsIgnoreCase(os, OsEnum.ANDROID.getName()) && appVersionService.compareVersion(appVersion, "1.3.0") < 0)
|
||||
|| (StringUtils.equalsIgnoreCase(os, OsEnum.IOS.getName()) && appVersionService.compareVersion(appVersion, "1.3.0") < 0);
|
||||
if(isOldAppVersion) {
|
||||
//旧版:加入话题未超过5天,不处理
|
||||
int subDays = DateTimeUtil.compareDay(now, member.getCreateTime());
|
||||
|
@@ -27,54 +27,6 @@ public class ChargeGuideServiceTest extends CommonTest {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void applyCharge3Test_first_charge() {
|
||||
Long uid = 936947L;
|
||||
String prodId = "11";
|
||||
String channel = Constant.ChargeChannel.alipay;
|
||||
String clientIp = "127.0.0.1";
|
||||
|
||||
Object busiResult = chargeService.applyCharge3(uid, prodId, channel, clientIp, null, null, AppEnum.PlanetStar.getValue(), null, null);
|
||||
|
||||
System.out.println(JSONObject.toJSONString(busiResult));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void applyCharge3Test_needCertification() {
|
||||
Long uid = 936604L;
|
||||
String prodId = "11";
|
||||
String channel = Constant.ChargeChannel.alipay;
|
||||
String clientIp = "127.0.0.1";
|
||||
|
||||
Object busiResult = chargeService.applyCharge3(uid, prodId, channel, clientIp, null, null, AppEnum.PlanetStar.getValue(), null, null);
|
||||
|
||||
System.out.println(JSONObject.toJSONString(busiResult));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void applyCharge3Test_alipay() {
|
||||
Long uid = 936571L;
|
||||
String prodId = "11";
|
||||
String channel = Constant.ChargeChannel.alipay;
|
||||
String clientIp = "127.0.0.1";
|
||||
|
||||
Object busiResult = chargeService.applyCharge3(uid, prodId, channel, clientIp, null, null, AppEnum.PlanetStar.getValue(), null, null);
|
||||
|
||||
System.out.println(JSONObject.toJSONString(busiResult));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void applyCharge3Test_alipay_v2() {
|
||||
Long uid = 936571L;
|
||||
String prodId = "11";
|
||||
String channel = Constant.ChargeChannel.alipay_v2;
|
||||
String clientIp = "127.0.0.1";
|
||||
|
||||
Object busiResult = chargeService.applyCharge3(uid, prodId, channel, clientIp, null, null, AppEnum.PlanetStar.getValue(), null, null);
|
||||
|
||||
System.out.println(JSONObject.toJSONString(busiResult));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void applyCharge3Test_wx() {
|
||||
Long uid = 936571L;
|
||||
|
@@ -1,102 +0,0 @@
|
||||
package servicetest;
|
||||
|
||||
import com.accompany.business.BusinessApplication;
|
||||
import com.accompany.business.service.user.InviteCodeService;
|
||||
import com.accompany.business.vo.user.InviteUserInRoomStatusVO;
|
||||
import com.accompany.common.constant.AppEnum;
|
||||
import com.accompany.common.device.DeviceInfo;
|
||||
import com.accompany.core.vo.user.InvitePageVO;
|
||||
import com.accompany.core.vo.user.InvitedUserVO;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringBootTest(classes = BusinessApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class InviteCodeServiceTest {
|
||||
|
||||
@Autowired
|
||||
private InviteCodeService inviteCodeService;
|
||||
|
||||
@Test
|
||||
public void getInviteCodeListTest() {
|
||||
Long uid = 935041L;
|
||||
DeviceInfo deviceInfo = new DeviceInfo();
|
||||
deviceInfo.setApp(AppEnum.PlanetStar66.name());
|
||||
Map inviteCodeInfo = (Map)inviteCodeService.getInviteCodeList(uid, deviceInfo);
|
||||
|
||||
System.out.println(inviteCodeInfo.get("inviteCode"));
|
||||
|
||||
List inviteList = (List) inviteCodeInfo.get("inviteList");
|
||||
inviteList.forEach(it -> {
|
||||
System.out.println(JSONObject.toJSONString(it));
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getInviteCodeListTest_yinyou() {
|
||||
Long uid = 935041L;
|
||||
DeviceInfo deviceInfo = new DeviceInfo();
|
||||
deviceInfo.setApp(AppEnum.yinyou.name());
|
||||
Map inviteCodeInfo = (Map)inviteCodeService.getInviteCodeList(uid, deviceInfo);
|
||||
|
||||
System.out.println(inviteCodeInfo.get("inviteCode"));
|
||||
|
||||
List inviteList = (List) inviteCodeInfo.get("inviteList");
|
||||
inviteList.forEach(it -> {
|
||||
System.out.println(JSONObject.toJSONString(it));
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void checkInviteUserInRoomTest() {
|
||||
String inviteCode = "6APOC";
|
||||
|
||||
InviteUserInRoomStatusVO status = inviteCodeService.checkInviteUserInRoom(inviteCode, 936825L);
|
||||
System.out.println(JSONObject.toJSONString(status));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getInviteCodeListV2Test_66() {
|
||||
Long uid = 936571L;
|
||||
DeviceInfo deviceInfo = new DeviceInfo();
|
||||
deviceInfo.setApp(AppEnum.PlanetStar66.name());
|
||||
|
||||
InvitePageVO pageVO = inviteCodeService.getInviteCodeListV2(uid, deviceInfo);
|
||||
assertNotNull(pageVO);
|
||||
|
||||
System.out.println(JSONObject.toJSONString(pageVO));
|
||||
|
||||
List<InvitedUserVO> inviteList = pageVO.getInviteList();
|
||||
|
||||
inviteList.forEach(it -> {
|
||||
System.out.println(JSONObject.toJSONString(it));
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getInviteCodeListV2Test_yinyou() {
|
||||
Long uid = 936571L;
|
||||
DeviceInfo deviceInfo = new DeviceInfo();
|
||||
deviceInfo.setApp(AppEnum.yinyou.name());
|
||||
|
||||
InvitePageVO pageVO = inviteCodeService.getInviteCodeListV2(uid, deviceInfo);
|
||||
assertNotNull(pageVO);
|
||||
|
||||
System.out.println(JSONObject.toJSONString(pageVO));
|
||||
|
||||
List<InvitedUserVO> inviteList = pageVO.getInviteList();
|
||||
|
||||
inviteList.forEach(it -> {
|
||||
System.out.println(JSONObject.toJSONString(it));
|
||||
});
|
||||
}
|
||||
}
|
@@ -56,7 +56,7 @@ public class VipServiceTest extends CommonTest {
|
||||
ChargeProd prod = chargeProdService.getChargeProdById("open_vip");
|
||||
DeviceInfo deviceInfo = new DeviceInfo();
|
||||
deviceInfo.setOs(Constant.OsType.ANDROID);
|
||||
deviceInfo.setApp(AppEnum.yinyou.getValue());
|
||||
deviceInfo.setApp(AppEnum.peko.getValue());
|
||||
VipOpenParams params = VipOpenParams.builder()
|
||||
.roomUid(roomUid).uid(uid).deviceInfo(deviceInfo).ip("127.0.0.1")
|
||||
.payChannel(Constant.ChargeChannel.wx)
|
||||
|
@@ -250,15 +250,7 @@ public class MyUserDetailsServiceImpl implements MyUserDetailsService {
|
||||
BusiStatus.VERIFY_CODE_ERROR.getReasonPhrase());
|
||||
}
|
||||
|
||||
Users users = usersBaseService.getUsersByUid(account.getUid());
|
||||
if (users != null && users.getDefUser().byteValue() == Constant.DefUser.LABOR_UNION
|
||||
&& (AppEnum.yinyou.getValue().equals(appName) || AppEnum.yinyouEnterprise.getValue().equals(appName))) {
|
||||
String checkCode = sysConfService.getSysConfValueById(Constant.SysConfId.LABOR_USER_CHECK_CODE);
|
||||
if (!smsCode.equalsIgnoreCase(checkCode)) {
|
||||
throw new CustomOAuth2Exception(CustomOAuth2Exception.VERIFY_CODE_ERROR,
|
||||
BusiStatus.VERIFY_CODE_ERROR.getReasonPhrase());
|
||||
}
|
||||
} else if (!smsService.verifySmsCode(account.getPhone(), smsCode)) {
|
||||
if (!smsService.verifySmsCode(account.getPhone(), smsCode)) {
|
||||
throw new CustomOAuth2Exception(CustomOAuth2Exception.VERIFY_CODE_ERROR,
|
||||
BusiStatus.VERIFY_CODE_ERROR.getReasonPhrase());
|
||||
}
|
||||
|
Reference in New Issue
Block a user