|
|
@@ -7,6 +7,7 @@ import cn.hutool.core.date.DateTime;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.lang.Assert;
|
|
|
import cn.hutool.core.lang.Validator;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
@@ -827,6 +828,9 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
@Override
|
|
|
public GroupsRelation ticketLogin(TicketLoginReq loginReq) {
|
|
|
String account = loginReq.getAccount();
|
|
|
+ if (StrUtil.isEmpty(account)) {
|
|
|
+ throw BusinessRuntimeException.getInstance("请输入对应账号");
|
|
|
+ }
|
|
|
if (loginReq.getMerchants()) {
|
|
|
Account dbAccount = accountMapper.selectOne(Wrappers.lambdaQuery(Account.class)
|
|
|
.eq(Account::getAccount, account)
|
|
|
@@ -841,6 +845,9 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
}
|
|
|
String password = loginReq.getPassword();
|
|
|
Integer num = loginReq.getNum();
|
|
|
+ if (ObjectUtil.hasEmpty(password, num)) {
|
|
|
+ throw BusinessRuntimeException.getInstance("参数错误");
|
|
|
+ }
|
|
|
Long goodsId = Optional.ofNullable(loginReq.getGoodsId()).orElse(1l);
|
|
|
GroupsRelation relation = groupsRelationMapper.selectRelationByAccountAndNum(account, password, goodsId, num);
|
|
|
if (relation == null) {
|
|
|
@@ -856,6 +863,9 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
@Override
|
|
|
public String outsideTicketVerify(TicketLoginReq loginReq) {
|
|
|
String account = loginReq.getAccount();
|
|
|
+ if (StrUtil.isEmpty(account)) {
|
|
|
+ throw BusinessRuntimeException.getInstance("账号错误");
|
|
|
+ }
|
|
|
if (loginReq.getMerchants()) {
|
|
|
Account dbAccount = accountMapper.selectOne(Wrappers.lambdaQuery(Account.class)
|
|
|
.eq(Account::getAccount, account)
|
|
|
@@ -869,6 +879,9 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
} else {
|
|
|
String password = loginReq.getPassword();
|
|
|
Integer num = loginReq.getNum();
|
|
|
+ if (ObjectUtil.hasEmpty(password, num)) {
|
|
|
+ throw BusinessRuntimeException.getInstance("参数错误");
|
|
|
+ }
|
|
|
Long goodsId = Optional.ofNullable(loginReq.getGoodsId()).orElse(1l);
|
|
|
GroupsRelation relation = groupsRelationMapper.selectRelationByAccountAndNum(account, password, goodsId, num);
|
|
|
if (relation == null) {
|