|
|
@@ -21,10 +21,12 @@ import com.cyksj.redis.RedisService;
|
|
|
import com.cyksj.service.mail.MailService;
|
|
|
import com.cyksj.service.mirrorshop.CmsUserMirrorShopService;
|
|
|
import com.cyksj.service.pay.TransferFuncService;
|
|
|
+import com.cyksj.service.user.BadIntentionOpService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
@@ -49,8 +51,12 @@ public class CmsUserMirrorShopServiceImpl implements CmsUserMirrorShopService {
|
|
|
|
|
|
private final TransferFuncService transferFuncService;
|
|
|
|
|
|
+ private final HttpServletRequest request;
|
|
|
+
|
|
|
+ private final BadIntentionOpService badIntentionOpService;
|
|
|
+
|
|
|
@Override
|
|
|
- public void getLoginCode(Integer type, String login, Integer cid) {
|
|
|
+ public void getLoginCode(Integer type, String login, Integer cid, String verifyCode, String ticket, String randStr) {
|
|
|
if (type > 2) {
|
|
|
throw BusinessRuntimeException.getInstance("");
|
|
|
}
|
|
|
@@ -72,7 +78,7 @@ public class CmsUserMirrorShopServiceImpl implements CmsUserMirrorShopService {
|
|
|
throw BusinessRuntimeException.getInstance("您不是小店店铺主");
|
|
|
}
|
|
|
|
|
|
- String CACHE_LOGIN_KEY = RedisService.key.USER_MIRROR_SHOP_BACK_LOGIN_KEY.getName() + login;
|
|
|
+ String CACHE_LOGIN_KEY = RedisService.key.USER_MIRROR_SHOP_BACK_LOGIN_KEY.getName() + login;
|
|
|
Object o = redisService.get(CACHE_LOGIN_KEY);
|
|
|
Long expire = redisService.getExpire(CACHE_LOGIN_KEY);
|
|
|
if (o != null && expire >= 3 * 60 - 10) {
|
|
|
@@ -83,6 +89,8 @@ public class CmsUserMirrorShopServiceImpl implements CmsUserMirrorShopService {
|
|
|
if (StrUtil.isEmpty(login) || (86 == cid && !Validator.isMobile(phone))) {
|
|
|
throw BusinessRuntimeException.getInstance("请输入正确的手机号");
|
|
|
}
|
|
|
+ //是否是恶意用户
|
|
|
+ badIntentionOpService.checkHandleBadUserOp(phone, verifyCode, ticket, randStr, request);
|
|
|
SmsUtil.sendTencent(cid, login, code);
|
|
|
} else if (type == 2) {
|
|
|
if (!Validator.isEmail(login)) {
|