|
|
@@ -506,11 +506,13 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
renewalView = new RenewalView();
|
|
|
renewalView.setGoodsId(loginReq.getGoodsId());
|
|
|
renewalView.setAccount(loginReq.getAccount());
|
|
|
- GroupsTrips groupsTrips = groupsMapper.selectOne(Wrappers.lambdaQuery(GroupsTrips.class)
|
|
|
- .eq(GroupsTrips::getAccountId, loginReq.getAccountId())
|
|
|
- .last("limit 1"));
|
|
|
- if (groupsTrips != null) {
|
|
|
- renewalView.setSkuId(groupsTrips.getSkuId());
|
|
|
+ if (loginReq.getAccountId() != null && loginReq.getAccountId() != 0l) {
|
|
|
+ GroupsTrips groupsTrips = groupsMapper.selectOne(Wrappers.lambdaQuery(GroupsTrips.class)
|
|
|
+ .eq(GroupsTrips::getAccountId, loginReq.getAccountId())
|
|
|
+ .last("limit 1"));
|
|
|
+ if (groupsTrips != null) {
|
|
|
+ renewalView.setSkuId(groupsTrips.getSkuId());
|
|
|
+ }
|
|
|
}
|
|
|
renewalView.setUserId(userId);
|
|
|
account = loginReq.getAccount();
|
|
|
@@ -832,12 +834,13 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
throw BusinessRuntimeException.getInstance("请输入对应账号");
|
|
|
}
|
|
|
if (loginReq.getMerchants()) {
|
|
|
- Account dbAccount = accountMapper.selectOne(Wrappers.lambdaQuery(Account.class)
|
|
|
- .eq(Account::getAccount, account)
|
|
|
- .eq(Account::getGoodsId, Constant.YH_EMAIL_VERIFY_OUTSIDE_CODE_GIDS.get(0))
|
|
|
- .last("limit 1"));
|
|
|
- if (dbAccount == null) {
|
|
|
- throw BusinessRuntimeException.getInstance("账号错误,请联系客服");
|
|
|
+ if (account.contains(Constant.YH_EMAIL_DOMAIN_SUFFIX)) {
|
|
|
+ SysEmail sysEmail = sysEmailMapper.selectOne(Wrappers.lambdaQuery(SysEmail.class)
|
|
|
+ .eq(SysEmail::getEmail, account)
|
|
|
+ .last("limit 1"));
|
|
|
+ if (sysEmail == null) {
|
|
|
+ throw BusinessRuntimeException.getInstance("账号错误,请联系客服");
|
|
|
+ }
|
|
|
}
|
|
|
GroupsRelation relation = new GroupsRelation();
|
|
|
relation.setId(0l);
|
|
|
@@ -867,15 +870,16 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
throw BusinessRuntimeException.getInstance("账号错误");
|
|
|
}
|
|
|
if (loginReq.getMerchants()) {
|
|
|
- Account dbAccount = accountMapper.selectOne(Wrappers.lambdaQuery(Account.class)
|
|
|
- .eq(Account::getAccount, account)
|
|
|
- .eq(Account::getGoodsId, Constant.YH_EMAIL_VERIFY_OUTSIDE_CODE_GIDS.get(0))
|
|
|
- .last("limit 1"));
|
|
|
- if (dbAccount == null) {
|
|
|
- throw BusinessRuntimeException.getInstance("账号错误,请联系客服");
|
|
|
+ if (account.contains(Constant.YH_EMAIL_DOMAIN_SUFFIX)) {
|
|
|
+ SysEmail sysEmail = sysEmailMapper.selectOne(Wrappers.lambdaQuery(SysEmail.class)
|
|
|
+ .eq(SysEmail::getEmail, account)
|
|
|
+ .last("limit 1"));
|
|
|
+ if (sysEmail == null) {
|
|
|
+ throw BusinessRuntimeException.getInstance("账号错误,请联系客服");
|
|
|
+ }
|
|
|
}
|
|
|
- loginReq.setGoodsId(dbAccount.getGoodsId());
|
|
|
- loginReq.setAccountId(dbAccount.getId());
|
|
|
+ loginReq.setGoodsId(1l);
|
|
|
+ loginReq.setAccountId(0l);
|
|
|
} else {
|
|
|
String password = loginReq.getPassword();
|
|
|
Integer num = loginReq.getNum();
|