Merge remote-tracking branch 'origin/lei_dev' into leng_dev
This commit is contained in:
commit
9d0175c018
10 files changed
+19
-17
No files matched your search
+2
-2
@@ -51,7 +51,7 @@ public interface RemoteAppUserService {
|
||||
* @param from 调用标志
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/social/info/{inStr}")
|
||||
@GetMapping("/appsocial/info/{inStr}")
|
||||
R<AppUserInfo> social(@PathVariable("inStr") String inStr, @RequestHeader(SecurityConstants.FROM) String from);
|
||||
|
||||
/**
|
||||
@@ -60,7 +60,7 @@ public interface RemoteAppUserService {
|
||||
* @param from 调用标识
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/user/lock/{username}")
|
||||
@PutMapping("/appuser/lock/{username}")
|
||||
R<Boolean> lockUser(@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM) String from);
|
||||
|
||||
}
|
||||
+5
-5
@@ -17,7 +17,7 @@
|
||||
|
||||
package com.pig4cloud.pigx.app.controller;
|
||||
|
||||
import com.pig4cloud.pigx.app.service.MobileService;
|
||||
import com.pig4cloud.pigx.app.service.AppMobileService;
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
import com.pig4cloud.pigx.common.security.annotation.Inner;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
@@ -37,17 +37,17 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/mobile")
|
||||
@RequestMapping("/appmobile")
|
||||
@Tag(description = "mobile", name = "手机管理模块")
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class MobileController {
|
||||
public class AppMobileController {
|
||||
|
||||
private final MobileService mobileService;
|
||||
private final AppMobileService appMobileService;
|
||||
|
||||
@Inner(value = false)
|
||||
@GetMapping("/{mobile}")
|
||||
public R sendSmsCode(@PathVariable String mobile) {
|
||||
return mobileService.sendSmsCode(mobile);
|
||||
return appMobileService.sendSmsCode(mobile);
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/social")
|
||||
@RequestMapping("/appsocial")
|
||||
@AllArgsConstructor
|
||||
@Tag(description = "social", name = "三方账号管理模块")
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ import org.springframework.stereotype.Component;
|
||||
* 微信小程序
|
||||
*/
|
||||
@Slf4j
|
||||
@Component("MINI")
|
||||
@Component("APP-MINI")
|
||||
@AllArgsConstructor
|
||||
public class MiniAppLoginHandler extends AbstractLoginHandler {
|
||||
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import org.springframework.stereotype.Component;
|
||||
* @date 2018/11/18
|
||||
*/
|
||||
@Slf4j
|
||||
@Component("SMS")
|
||||
@Component("APP-SMS")
|
||||
@AllArgsConstructor
|
||||
public class SmsLoginHandler extends AbstractLoginHandler {
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import com.pig4cloud.pigx.common.core.util.R;
|
||||
* @author lengleng
|
||||
* @date 2018/11/14
|
||||
*/
|
||||
public interface MobileService {
|
||||
public interface AppMobileService {
|
||||
|
||||
/**
|
||||
* 发送手机验证码
|
||||
+4
-4
@@ -23,7 +23,7 @@ import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.pig4cloud.pigx.app.api.entity.AppUser;
|
||||
import com.pig4cloud.pigx.app.mapper.AppUserMapper;
|
||||
import com.pig4cloud.pigx.app.service.MobileService;
|
||||
import com.pig4cloud.pigx.app.service.AppMobileService;
|
||||
import com.pig4cloud.pigx.common.core.constant.CacheConstants;
|
||||
import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
|
||||
import com.pig4cloud.pigx.common.core.constant.enums.LoginTypeEnum;
|
||||
@@ -47,7 +47,7 @@ import java.util.concurrent.TimeUnit;
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class MobileServiceImpl implements MobileService {
|
||||
public class AppMobileServiceImpl implements AppMobileService {
|
||||
|
||||
private final RedisTemplate redisTemplate;
|
||||
|
||||
@@ -69,7 +69,7 @@ public class MobileServiceImpl implements MobileService {
|
||||
}
|
||||
|
||||
Object codeObj = redisTemplate.opsForValue()
|
||||
.get(CacheConstants.DEFAULT_CODE_KEY + LoginTypeEnum.SMS.getType() + StringPool.AT + mobile);
|
||||
.get(CacheConstants.DEFAULT_CODE_KEY + LoginTypeEnum.APPSMS.getType() + StringPool.AT + mobile);
|
||||
|
||||
if (codeObj != null) {
|
||||
log.info("手机号验证码未过期:{},{}", mobile, codeObj);
|
||||
@@ -79,7 +79,7 @@ public class MobileServiceImpl implements MobileService {
|
||||
String code = RandomUtil.randomNumbers(Integer.parseInt(SecurityConstants.CODE_SIZE));
|
||||
log.debug("手机号生成验证码成功:{},{}", mobile, code);
|
||||
redisTemplate.opsForValue().set(
|
||||
CacheConstants.DEFAULT_CODE_KEY + LoginTypeEnum.SMS.getType() + StringPool.AT + mobile, code,
|
||||
CacheConstants.DEFAULT_CODE_KEY + LoginTypeEnum.APPSMS.getType() + StringPool.AT + mobile, code,
|
||||
SecurityConstants.CODE_TIME, TimeUnit.SECONDS);
|
||||
return R.ok(Boolean.TRUE, code);
|
||||
}
|
||||
+1
-1
@@ -41,7 +41,7 @@ import java.util.Map;
|
||||
*/
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
@Service("sysSocialDetailsService")
|
||||
@Service("appSocialDetailsService")
|
||||
public class AppSocialDetailsServiceImpl extends ServiceImpl<AppSocialDetailsMapper, AppSocialDetails>
|
||||
implements AppSocialDetailsService {
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<xxl.job.version>2.3.0</xxl.job.version>
|
||||
<aliyun.version>3.0.52.ALL</aliyun.version>
|
||||
<aws.version>1.11.543</aws.version>
|
||||
<seata.version>1.4.2</seata.version>
|
||||
<seata.version>1.6.1</seata.version>
|
||||
<asm.version>7.1</asm.version>
|
||||
<log4j2.version>2.17.1</log4j2.version>
|
||||
<javaformat.plugin.version>0.0.23</javaformat.plugin.version>
|
||||
|
||||
+2
@@ -38,6 +38,8 @@ public enum LoginTypeEnum {
|
||||
*/
|
||||
SMS("SMS", "验证码登录"),
|
||||
|
||||
APPSMS("APP-SMS", "APP验证码登录"),
|
||||
|
||||
/**
|
||||
* QQ登录
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user