Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
263463a5
Commit
263463a5
authored
Dec 23, 2021
by
killer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加 接口描述
parent
cb210887
Changes
33
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
209 additions
and
87428 deletions
+209
-87428
pom.xml
pom.xml
+26
-14
SwaggerConfig.java
...java/cn/quantgroup/xyqb/config/swagger/SwaggerConfig.java
+33
-31
UserAuthorizedController.java
...tgroup/xyqb/controller/dust/UserAuthorizedController.java
+6
-0
WechatVerifyController.java
.../controller/dust/wechatverify/WechatVerifyController.java
+4
-0
UserController.java
...n/quantgroup/xyqb/controller/external/UserController.java
+15
-0
UserDetailController.java
...tgroup/xyqb/controller/external/UserDetailController.java
+2
-0
WeChatController.java
...quantgroup/xyqb/controller/external/WeChatController.java
+8
-0
ImageCaptchaController.java
...b/controller/external/captcha/ImageCaptchaController.java
+1
-1
NewCaptchaController.java
...yqb/controller/external/captcha/NewCaptchaController.java
+2
-0
LockIpv4Controller.java
...oup/xyqb/controller/external/lock/LockIpv4Controller.java
+5
-0
PlatformApiController.java
...b/controller/external/platform/PlatformApiController.java
+5
-0
SmsController.java
...uantgroup/xyqb/controller/external/sms/SmsController.java
+14
-0
AuthInfoController.java
...up/xyqb/controller/internal/login/AuthInfoController.java
+4
-0
UserQueryLogController.java
.../controller/internal/querylog/UserQueryLogController.java
+2
-0
AppController.java
...antgroup/xyqb/controller/internal/user/AppController.java
+3
-0
InnerController.java
...tgroup/xyqb/controller/internal/user/InnerController.java
+2
-2
SyncUserController.java
...oup/xyqb/controller/internal/user/SyncUserController.java
+3
-0
UserApiController.java
...roup/xyqb/controller/internal/user/UserApiController.java
+4
-0
UserCenterController.java
...controller/internal/user/center/UserCenterController.java
+4
-0
AppletController.java
...xyqb/controller/middleoffice/applet/AppletController.java
+6
-1
ContactController.java
...qb/controller/middleoffice/contact/ContactController.java
+6
-0
ImageController.java
...p/xyqb/controller/middleoffice/image/ImageController.java
+5
-0
LoginController.java
...p/xyqb/controller/middleoffice/login/LoginController.java
+6
-0
SmsController.java
...group/xyqb/controller/middleoffice/sms/SmsController.java
+5
-0
UserController.java
...oup/xyqb/controller/middleoffice/user/UserController.java
+9
-0
UserDetailController.java
...troller/middleoffice/userdetail/UserDetailController.java
+7
-0
UserExtController.java
...qb/controller/middleoffice/userext/UserExtController.java
+6
-0
WxController.java
...ntgroup/xyqb/controller/middleoffice/wx/WxController.java
+7
-0
ModifyPhoneNoController.java
...yqb/controller/modifyphoneno/ModifyPhoneNoController.java
+1
-1
LoginWhiteListController.java
...tgroup/xyqb/controller/risk/LoginWhiteListController.java
+4
-0
TenantController.java
...n/quantgroup/xyqb/controller/tenant/TenantController.java
+4
-0
xyqb-user2.2021-11-21-0.log
xyqb-user2.2021-11-21-0.log
+0
-43689
xyqb-user2.log
xyqb-user2.log
+0
-43689
No files found.
pom.xml
View file @
263463a5
...
@@ -45,22 +45,34 @@
...
@@ -45,22 +45,34 @@
<artifactId>
SensorsAnalyticsSDK
</artifactId>
<artifactId>
SensorsAnalyticsSDK
</artifactId>
<version>
3.2.0
</version>
<version>
3.2.0
</version>
</dependency>
</dependency>
<!-- swagger2 start -->
<dependency>
<!-- <dependency>-->
<groupId>
io.springfox
</groupId>
<!-- <groupId>io.springfox</groupId>-->
<artifactId>
springfox-swagger2
</artifactId>
<!-- <artifactId>springfox-boot-starter</artifactId>-->
<version>
RELEASE
</version>
<!-- <version>3.0.0</version>-->
</dependency>
<!-- </dependency>-->
<dependency>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-core
</artifactId>
<version>
RELEASE
</version>
</dependency>
<dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<artifactId>
knife4j-spring-boot-starter
</artifactId>
<version>
RELEASE
</version>
<version>
2.0.4
</version>
</dependency>
</dependency>
<!-- swagger2 start -->
<!-- <dependency>-->
<!-- <groupId>io.springfox</groupId>-->
<!-- <artifactId>springfox-swagger2</artifactId>-->
<!-- <version>RELEASE</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>io.swagger</groupId>-->
<!-- <artifactId>swagger-core</artifactId>-->
<!-- <version>RELEASE</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>io.springfox</groupId>-->
<!-- <artifactId>springfox-swagger-ui</artifactId>-->
<!-- <version>RELEASE</version>-->
<!-- </dependency>-->
<!-- swagger2 end -->
<!-- swagger2 end -->
<dependency>
<dependency>
<groupId>
com.google.code.gson
</groupId>
<groupId>
com.google.code.gson
</groupId>
...
...
src/main/java/cn/quantgroup/xyqb/config/swagger/SwaggerConfig.java
View file @
263463a5
package
cn
.
quantgroup
.
xyqb
.
config
.
swagger
;
package
cn
.
quantgroup
.
xyqb
.
config
.
swagger
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
springfox.documentation.builders.ApiInfoBuilder
;
import
springfox.documentation.builders.PathSelectors
;
import
springfox.documentation.builders.RequestHandlerSelectors
;
import
springfox.documentation.service.ApiInfo
;
import
springfox.documentation.service.Contact
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
/**
/**
* Swagger文档框架
* swagger
* 这个第三方新版本竟然不兼容旧的服气啊 没有再用了直接干掉
*
*
* @author killer
* @date 2021年12月23日11:13:00
*/
*/
@Deprecated
@Configuration
//@EnableSwagger2
@EnableSwagger2
//@Configuration
public
class
SwaggerConfig
{
public
class
SwaggerConfig
{
// @Value("${openapi.swagger.on:false}")
@Bean
//// private Boolean swaggerOn;
public
Docket
userRestApi
()
{
////
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
//// @Bean
.
apiInfo
(
apiInfo
())
//// public Docket createRestApi() {
.
select
()
//// return new Docket(DocumentationType.SWAGGER_2)
.
apis
(
RequestHandlerSelectors
.
basePackage
(
"cn.quantgroup.xyqb.controller"
))
//// .useDefaultResponseMessages(false)
.
paths
(
PathSelectors
.
any
())
//// .enable(swaggerOn)
.
build
();
//// .apiInfo(apiInfo())
}
//// .select()
//// .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
//// .paths(PathSelectors.any())
//// .paths(Predicates.not(PathSelectors.regex("/error.*")))
//// .build();
//// }
////
//// private ApiInfo apiInfo() {
//// return new ApiInfoBuilder()
//// .title("xyqb-user api")
//// .description("用户中心接口文档")
//// .contact(new Contact("wenchao.ren", "", "wenchao.ren@quantgroup.cn"))
//// .license("Apache License Version 2.0")
//// .licenseUrl("https://github.com/springfox/springfox/blob/master/LICENSE")
//// .version("2.0")
//// .build();
//// }
private
ApiInfo
apiInfo
()
{
return
new
ApiInfoBuilder
()
.
title
(
"UC"
)
.
description
(
"用户中心对外提供的接口"
)
.
version
(
"1.0-SNAPSHOT"
)
.
contact
(
new
Contact
(
"QG"
,
"https://quantgroup.com"
,
"user-center@guangda.cn"
))
.
build
();
}
}
}
src/main/java/cn/quantgroup/xyqb/controller/dust/UserAuthorizedController.java
View file @
263463a5
...
@@ -4,6 +4,8 @@ import cn.quantgroup.xyqb.entity.UserAuthorized;
...
@@ -4,6 +4,8 @@ import cn.quantgroup.xyqb.entity.UserAuthorized;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.model.UserAuthorizedParam
;
import
cn.quantgroup.xyqb.model.UserAuthorizedParam
;
import
cn.quantgroup.xyqb.service.auth.IUserAuthorizedService
;
import
cn.quantgroup.xyqb.service.auth.IUserAuthorizedService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -13,6 +15,7 @@ import javax.annotation.Resource;
...
@@ -13,6 +15,7 @@ import javax.annotation.Resource;
/**
/**
* @author xufei on 2018/1/5.
* @author xufei on 2018/1/5.
*/
*/
@Api
(
tags
=
"用户认证API"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/user/auth"
)
@RequestMapping
(
"/user/auth"
)
...
@@ -24,6 +27,7 @@ public class UserAuthorizedController {
...
@@ -24,6 +27,7 @@ public class UserAuthorizedController {
/**
/**
* @Deprecated 20210317
* @Deprecated 20210317
*/
*/
@ApiOperation
(
value
=
"废弃接口"
,
notes
=
"废弃接口"
)
@Deprecated
@Deprecated
@RequestMapping
(
value
=
"/hasUserAuthorized"
)
@RequestMapping
(
value
=
"/hasUserAuthorized"
)
public
JsonResult
hasUserAuthorized
(
String
idNo
)
{
public
JsonResult
hasUserAuthorized
(
String
idNo
)
{
...
@@ -38,6 +42,7 @@ public class UserAuthorizedController {
...
@@ -38,6 +42,7 @@ public class UserAuthorizedController {
/**
/**
* @Deprecated 20210317
* @Deprecated 20210317
*/
*/
@ApiOperation
(
value
=
"废弃接口"
,
notes
=
"废弃接口"
)
@Deprecated
@Deprecated
@RequestMapping
(
value
=
"/createUserAuthorized"
)
@RequestMapping
(
value
=
"/createUserAuthorized"
)
public
JsonResult
createUserAuthorized
(
UserAuthorizedParam
userAuthorizedParam
)
{
public
JsonResult
createUserAuthorized
(
UserAuthorizedParam
userAuthorizedParam
)
{
...
@@ -61,6 +66,7 @@ public class UserAuthorizedController {
...
@@ -61,6 +66,7 @@ public class UserAuthorizedController {
/**
/**
* @Deprecated 20210317
* @Deprecated 20210317
*/
*/
@ApiOperation
(
value
=
"废弃接口"
,
notes
=
"废弃接口"
)
@Deprecated
@Deprecated
@RequestMapping
(
value
=
"/getUserAuthorizedId"
)
@RequestMapping
(
value
=
"/getUserAuthorizedId"
)
public
JsonResult
getUserAuthorizedId
(
String
userUuid
)
{
public
JsonResult
getUserAuthorizedId
(
String
userUuid
)
{
...
...
src/main/java/cn/quantgroup/xyqb/controller/dust/wechatverify/WechatVerifyController.java
View file @
263463a5
package
cn
.
quantgroup
.
xyqb
.
controller
.
dust
.
wechatverify
;
package
cn
.
quantgroup
.
xyqb
.
controller
.
dust
.
wechatverify
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -11,12 +13,14 @@ import java.io.PrintWriter;
...
@@ -11,12 +13,14 @@ import java.io.PrintWriter;
*/
*/
@RestController
@RestController
@RequestMapping
(
"/"
)
@RequestMapping
(
"/"
)
@Api
(
tags
=
"微信验证码API"
)
public
class
WechatVerifyController
{
public
class
WechatVerifyController
{
/**
/**
* @Deprecated 20210317
* @Deprecated 20210317
*/
*/
@Deprecated
@Deprecated
@ApiOperation
(
value
=
"废弃接口"
,
notes
=
"废弃接口"
)
@RequestMapping
(
"/MP_verify_AWiagUn4kZiwmTt0.txt"
)
@RequestMapping
(
"/MP_verify_AWiagUn4kZiwmTt0.txt"
)
public
void
verifyWechat
(
HttpServletResponse
response
)
throws
Exception
{
public
void
verifyWechat
(
HttpServletResponse
response
)
throws
Exception
{
response
.
setContentType
(
"plain/text"
);
response
.
setContentType
(
"plain/text"
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/UserController.java
View file @
263463a5
...
@@ -28,6 +28,7 @@ import cn.quantgroup.xyqb.util.PasswordUtil;
...
@@ -28,6 +28,7 @@ import cn.quantgroup.xyqb.util.PasswordUtil;
import
cn.quantgroup.xyqb.util.TenantUtil
;
import
cn.quantgroup.xyqb.util.TenantUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.codec.binary.Base64
;
import
org.apache.commons.codec.binary.Base64
;
...
@@ -51,6 +52,7 @@ import static cn.quantgroup.xyqb.Constants.VERIFICATION_CODE_FINITE_COUNT_NEW;
...
@@ -51,6 +52,7 @@ import static cn.quantgroup.xyqb.Constants.VERIFICATION_CODE_FINITE_COUNT_NEW;
* Http服务接口:用户注册、登录、重置密码
* Http服务接口:用户注册、登录、重置密码
* Created by FrankChow on 15/7/5.
* Created by FrankChow on 15/7/5.
*/
*/
@Api
(
tags
=
"external user API"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/user"
)
@RequestMapping
(
"/user"
)
...
@@ -99,6 +101,7 @@ public class UserController implements IBaseController {
...
@@ -99,6 +101,7 @@ public class UserController implements IBaseController {
* @return
* @return
* @yapi unknown
* @yapi unknown
*/
*/
@ApiOperation
(
value
=
"登录(账号 + 密码)"
,
httpMethod
=
"POST"
,
notes
=
"登录(账号 + 密码)"
)
@LoginInterceptor
@LoginInterceptor
@CaptchaFiniteValidator
@CaptchaFiniteValidator
@RequestMapping
(
"/loginV1"
)
@RequestMapping
(
"/loginV1"
)
...
@@ -119,6 +122,7 @@ public class UserController implements IBaseController {
...
@@ -119,6 +122,7 @@ public class UserController implements IBaseController {
*
*
* @yapi http://yapi.quantgroups.com/project/17/interface/api/7310
* @yapi http://yapi.quantgroups.com/project/17/interface/api/7310
*/
*/
@ApiOperation
(
value
=
"慢速登陆"
,
httpMethod
=
"POST"
,
notes
=
"慢速登陆"
)
@PasswordErrorFiniteValidator
@PasswordErrorFiniteValidator
@RequestMapping
(
"/login"
)
@RequestMapping
(
"/login"
)
public
JsonResult
login
(
public
JsonResult
login
(
...
@@ -155,6 +159,7 @@ public class UserController implements IBaseController {
...
@@ -155,6 +159,7 @@ public class UserController implements IBaseController {
* @return
* @return
* @yapi http://yapi.quantgroups.com/project/17/interface/api/1786
* @yapi http://yapi.quantgroups.com/project/17/interface/api/1786
*/
*/
@ApiOperation
(
value
=
"快速登录(手机号 + 短信验证码),H5专用入口"
,
httpMethod
=
"POST"
,
notes
=
"快速登录(手机号 + 短信验证码),H5专用入口"
)
@RequestMapping
(
"/login/fastV1"
)
@RequestMapping
(
"/login/fastV1"
)
public
JsonResult
loginFastV1
(
public
JsonResult
loginFastV1
(
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
channelId
,
String
appChannel
,
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
channelId
,
String
appChannel
,
...
@@ -174,6 +179,7 @@ public class UserController implements IBaseController {
...
@@ -174,6 +179,7 @@ public class UserController implements IBaseController {
*
*
* @yapi http://yapi.quantgroups.com/project/17/interface/api/2066
* @yapi http://yapi.quantgroups.com/project/17/interface/api/2066
*/
*/
@ApiOperation
(
value
=
"快速登陆 - 同h5login代码实现一致"
,
httpMethod
=
"POST"
,
notes
=
"快速登陆 - 同h5login代码实现一致"
)
@LoginInterceptor
@LoginInterceptor
@RequestMapping
(
"/login/fast"
)
@RequestMapping
(
"/login/fast"
)
public
JsonResult
loginFast
(
public
JsonResult
loginFast
(
...
@@ -258,6 +264,7 @@ public class UserController implements IBaseController {
...
@@ -258,6 +264,7 @@ public class UserController implements IBaseController {
* @return
* @return
* @yapi unknown
* @yapi unknown
*/
*/
@ApiOperation
(
value
=
"用户注册"
,
httpMethod
=
"POST"
,
notes
=
"用户注册"
)
@RequestMapping
(
"/register"
)
@RequestMapping
(
"/register"
)
public
JsonResult
register
(
@RequestParam
String
phoneNo
,
@RequestParam
String
password
,
public
JsonResult
register
(
@RequestParam
String
phoneNo
,
@RequestParam
String
password
,
@RequestParam
String
verificationCode
,
@RequestParam
(
required
=
false
)
Long
channelId
,
@RequestParam
String
verificationCode
,
@RequestParam
(
required
=
false
)
Long
channelId
,
...
@@ -304,6 +311,7 @@ public class UserController implements IBaseController {
...
@@ -304,6 +311,7 @@ public class UserController implements IBaseController {
* @yapi http://yapi.quantgroups.com/project/17/interface/api/2388
* @yapi http://yapi.quantgroups.com/project/17/interface/api/2388
* @Deprecated 20210318
* @Deprecated 20210318
*/
*/
@ApiOperation
(
value
=
"检查用户是否存在"
,
httpMethod
=
"POST"
,
notes
=
"检查用户是否存在"
)
@IpValidator
@IpValidator
@RequestMapping
(
"/exist"
)
@RequestMapping
(
"/exist"
)
@Deprecated
@Deprecated
...
@@ -324,6 +332,7 @@ public class UserController implements IBaseController {
...
@@ -324,6 +332,7 @@ public class UserController implements IBaseController {
* @yapi unknown
* @yapi unknown
* @Deprecated 20210318
* @Deprecated 20210318
*/
*/
@ApiOperation
(
value
=
"检查用户是否存在"
,
httpMethod
=
"POST"
,
notes
=
"检查用户是否存在"
)
@IpValidator
@IpValidator
@RequestMapping
(
"/exist_check"
)
@RequestMapping
(
"/exist_check"
)
@Deprecated
@Deprecated
...
@@ -341,6 +350,7 @@ public class UserController implements IBaseController {
...
@@ -341,6 +350,7 @@ public class UserController implements IBaseController {
* @return
* @return
* @yapi http://yapi.quantgroups.com/project/17/interface/api/3263
* @yapi http://yapi.quantgroups.com/project/17/interface/api/3263
*/
*/
@ApiOperation
(
value
=
"重置密码"
,
httpMethod
=
"POST"
,
notes
=
"重置密码"
)
@RequestMapping
(
"/reset_password"
)
@RequestMapping
(
"/reset_password"
)
public
JsonResult
resetPassword
(
@RequestParam
String
phoneNo
,
public
JsonResult
resetPassword
(
@RequestParam
String
phoneNo
,
@RequestParam
String
password
,
@RequestParam
String
password
,
...
@@ -377,6 +387,7 @@ public class UserController implements IBaseController {
...
@@ -377,6 +387,7 @@ public class UserController implements IBaseController {
* @yapi http://yapi.quantgroups.com/project/17/interface/api/3263
* @yapi http://yapi.quantgroups.com/project/17/interface/api/3263
* @Deprecated 20210318, 仅有一次调用2021-03-15 00:38:57.752
* @Deprecated 20210318, 仅有一次调用2021-03-15 00:38:57.752
*/
*/
@ApiOperation
(
value
=
"重置密码"
,
httpMethod
=
"POST"
,
notes
=
"重置密码"
)
@Deprecated
@Deprecated
@PasswordFreeAccessValidator
@PasswordFreeAccessValidator
@RequestMapping
(
path
=
"/resetPassword"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
path
=
"/resetPassword"
,
method
=
RequestMethod
.
POST
)
...
@@ -420,6 +431,7 @@ public class UserController implements IBaseController {
...
@@ -420,6 +431,7 @@ public class UserController implements IBaseController {
* @return
* @return
* @yapi http://yapi.quantgroups.com/project/17/interface/api/4012
* @yapi http://yapi.quantgroups.com/project/17/interface/api/4012
*/
*/
@ApiOperation
(
value
=
"检查token是否已经过期不存在了"
,
httpMethod
=
"POST"
,
notes
=
"检查token是否已经过期不存在了"
)
@IpValidator
@IpValidator
@RequestMapping
(
"/exists_token"
)
@RequestMapping
(
"/exists_token"
)
public
JsonResult
checkToken
(
@RequestParam
String
token
)
{
public
JsonResult
checkToken
(
@RequestParam
String
token
)
{
...
@@ -441,6 +453,7 @@ public class UserController implements IBaseController {
...
@@ -441,6 +453,7 @@ public class UserController implements IBaseController {
*
*
* @yapi http://yapi.quantgroups.com/project/17/interface/api/9191
* @yapi http://yapi.quantgroups.com/project/17/interface/api/9191
*/
*/
@ApiOperation
(
value
=
"获取 token 信息"
,
httpMethod
=
"POST"
,
notes
=
"获取 token 信息"
)
@RequestMapping
(
"/token"
)
@RequestMapping
(
"/token"
)
public
JsonResult
token
(
@RequestParam
String
token
,
@RequestParam
(
required
=
false
)
Integer
tenantId
)
{
public
JsonResult
token
(
@RequestParam
String
token
,
@RequestParam
(
required
=
false
)
Integer
tenantId
)
{
...
@@ -519,6 +532,7 @@ public class UserController implements IBaseController {
...
@@ -519,6 +532,7 @@ public class UserController implements IBaseController {
* @yapi unknown
* @yapi unknown
* @Deprecated 20210318, 20210201-20210203有集中调用274次,其他时间没有
* @Deprecated 20210318, 20210201-20210203有集中调用274次,其他时间没有
*/
*/
@ApiOperation
(
value
=
"获取用户信息"
,
httpMethod
=
"GET"
,
notes
=
"获取用户信息"
)
@Deprecated
@Deprecated
@RequestMapping
(
"/syncUserInfo"
)
@RequestMapping
(
"/syncUserInfo"
)
public
JsonResult
syncUserInfo
(
HttpServletRequest
request
)
{
public
JsonResult
syncUserInfo
(
HttpServletRequest
request
)
{
...
@@ -537,6 +551,7 @@ public class UserController implements IBaseController {
...
@@ -537,6 +551,7 @@ public class UserController implements IBaseController {
*
*
* @yapi http://yapi.quantgroups.com/project/17/interface/api/23661
* @yapi http://yapi.quantgroups.com/project/17/interface/api/23661
*/
*/
@ApiOperation
(
value
=
"登出接口"
,
httpMethod
=
"GET"
,
notes
=
"登出接口"
)
@RequestMapping
(
value
=
"/logout"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/logout"
,
method
=
RequestMethod
.
GET
)
public
JsonResult
logout
(
HttpServletRequest
request
)
{
public
JsonResult
logout
(
HttpServletRequest
request
)
{
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/UserDetailController.java
View file @
263463a5
...
@@ -11,6 +11,7 @@ import cn.quantgroup.xyqb.service.auth.IIdCardService;
...
@@ -11,6 +11,7 @@ import cn.quantgroup.xyqb.service.auth.IIdCardService;
import
cn.quantgroup.xyqb.service.user.IUserDetailService
;
import
cn.quantgroup.xyqb.service.user.IUserDetailService
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
cn.quantgroup.xyqb.validator.ChineseName
;
import
cn.quantgroup.xyqb.validator.ChineseName
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -30,6 +31,7 @@ import java.util.Objects;
...
@@ -30,6 +31,7 @@ import java.util.Objects;
@RestController
@RestController
@RequestMapping
(
"/user_detail"
)
@RequestMapping
(
"/user_detail"
)
@Validated
@Validated
@Api
(
tags
=
"external 用户详情 API"
)
public
class
UserDetailController
implements
IBaseController
{
public
class
UserDetailController
implements
IBaseController
{
@Autowired
@Autowired
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/WeChatController.java
View file @
263463a5
...
@@ -18,6 +18,8 @@ import com.alibaba.fastjson.JSON;
...
@@ -18,6 +18,8 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.TypeReference
;
import
com.alibaba.fastjson.TypeReference
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.ImmutableList
;
import
com.google.common.collect.ImmutableList
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.codec.binary.Base64
;
import
org.apache.commons.codec.binary.Base64
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -43,6 +45,7 @@ import java.util.*;
...
@@ -43,6 +45,7 @@ import java.util.*;
/**
/**
* Created by 11 on 2017/1/17.
* Created by 11 on 2017/1/17.
*/
*/
@Api
(
tags
=
"external wechat API"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/wechat"
)
@RequestMapping
(
"/wechat"
)
...
@@ -92,6 +95,7 @@ public class WeChatController implements IBaseController {
...
@@ -92,6 +95,7 @@ public class WeChatController implements IBaseController {
* @yapi unknown
* @yapi unknown
* @Deprecated 20210318
* @Deprecated 20210318
*/
*/
@ApiOperation
(
value
=
"开发者资质认证"
,
httpMethod
=
"GET"
,
notes
=
"开发者资质认证"
)
@Deprecated
@Deprecated
@RequestMapping
(
"/checkValid"
)
@RequestMapping
(
"/checkValid"
)
public
String
valid
(
HttpServletRequest
request
)
{
public
String
valid
(
HttpServletRequest
request
)
{
...
@@ -173,6 +177,7 @@ public class WeChatController implements IBaseController {
...
@@ -173,6 +177,7 @@ public class WeChatController implements IBaseController {
* @return
* @return
* @yapi http://yapi.quantgroups.com/project/17/interface/api/14447
* @yapi http://yapi.quantgroups.com/project/17/interface/api/14447
*/
*/
@ApiOperation
(
value
=
"前端微信跳转页面,通过extdata"
,
httpMethod
=
"GET"
,
notes
=
"前端微信跳转页面,通过extdata"
)
@RequestMapping
(
"/receiveCode/extdata/{key}/{extdata}"
)
@RequestMapping
(
"/receiveCode/extdata/{key}/{extdata}"
)
public
void
receiveCodeWithExtData
(
String
code
,
@PathVariable
(
value
=
"key"
)
String
systemKey
,
public
void
receiveCodeWithExtData
(
String
code
,
@PathVariable
(
value
=
"key"
)
String
systemKey
,
@PathVariable
(
value
=
"extdata"
)
String
extData
,
HttpServletResponse
response
)
{
@PathVariable
(
value
=
"extdata"
)
String
extData
,
HttpServletResponse
response
)
{
...
@@ -284,6 +289,7 @@ public class WeChatController implements IBaseController {
...
@@ -284,6 +289,7 @@ public class WeChatController implements IBaseController {
* @yapi unknown
* @yapi unknown
* @Deprecated 20210318
* @Deprecated 20210318
*/
*/
@ApiOperation
(
value
=
"不知道干嘛的"
,
httpMethod
=
"POST"
,
notes
=
"不知道干嘛的"
)
@Deprecated
@Deprecated
@RequestMapping
(
"/redirectForTest"
)
@RequestMapping
(
"/redirectForTest"
)
public
void
redirectForTest
(
String
redirect
,
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
MalformedURLException
{
public
void
redirectForTest
(
String
redirect
,
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
MalformedURLException
{
...
@@ -322,6 +328,7 @@ public class WeChatController implements IBaseController {
...
@@ -322,6 +328,7 @@ public class WeChatController implements IBaseController {
* @return
* @return
* @yapi unknown
* @yapi unknown
*/
*/
@ApiOperation
(
value
=
"通过redirect_url获取code"
,
httpMethod
=
"POST"
,
notes
=
"通过redirect_url获取code"
)
@RequestMapping
(
"/receiveCode/{key}"
)
@RequestMapping
(
"/receiveCode/{key}"
)
public
void
receiveCodeNoRedirect
(
String
code
,
@PathVariable
(
value
=
"key"
)
String
systemKey
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
void
receiveCodeNoRedirect
(
String
code
,
@PathVariable
(
value
=
"key"
)
String
systemKey
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Long
registerFrom
=
null
;
Long
registerFrom
=
null
;
...
@@ -411,6 +418,7 @@ public class WeChatController implements IBaseController {
...
@@ -411,6 +418,7 @@ public class WeChatController implements IBaseController {
}
}
}
}
@ApiOperation
(
value
=
"不知道干嘛的"
,
httpMethod
=
"GET"
,
notes
=
"不知道干嘛的"
)
@RequestMapping
(
"/active_redirect"
)
@RequestMapping
(
"/active_redirect"
)
public
void
forwardWechatRequest
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
void
forwardWechatRequest
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
redirectUrl
=
xyqbDomainStr
+
"/api/coupon/activity/wechat/rent_house/bargain?"
;
String
redirectUrl
=
xyqbDomainStr
+
"/api/coupon/activity/wechat/rent_house/bargain?"
;
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/captcha/ImageCaptchaController.java
View file @
263463a5
...
@@ -31,7 +31,7 @@ import java.util.concurrent.TimeUnit;
...
@@ -31,7 +31,7 @@ import java.util.concurrent.TimeUnit;
* @author 李宁
* @author 李宁
* @version 1.0.0 创建时间:15/11/17 11:49 修改人: 修改时间:15/11/17 11:49 修改备注:
* @version 1.0.0 创建时间:15/11/17 11:49 修改人: 修改时间:15/11/17 11:49 修改备注:
*/
*/
@Api
(
value
=
"/api"
,
description
=
"叫Api, 实际上是图形验证码. 你说神奇不神奇..."
)
@Api
(
value
=
"/api"
,
tags
=
"叫Api, 实际上是图形验证码. 你说神奇不神奇..."
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/api"
)
@RequestMapping
(
"/api"
)
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/captcha/NewCaptchaController.java
View file @
263463a5
...
@@ -8,6 +8,7 @@ import cn.quantgroup.xyqb.service.captcha.IQuantgroupCaptchaService;
...
@@ -8,6 +8,7 @@ import cn.quantgroup.xyqb.service.captcha.IQuantgroupCaptchaService;
import
cn.quantgroup.xyqb.util.IpUtil
;
import
cn.quantgroup.xyqb.util.IpUtil
;
import
cn.quantgroup.xyqb.util.PasswordUtil
;
import
cn.quantgroup.xyqb.util.PasswordUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -25,6 +26,7 @@ import java.util.UUID;
...
@@ -25,6 +26,7 @@ import java.util.UUID;
/**
/**
* @author xufei on 2018/1/30.
* @author xufei on 2018/1/30.
*/
*/
@Api
(
tags
=
"新验证码API"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/api"
)
@RequestMapping
(
"/api"
)
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/lock/LockIpv4Controller.java
View file @
263463a5
...
@@ -5,6 +5,8 @@ import cn.quantgroup.xyqb.controller.IBaseController;
...
@@ -5,6 +5,8 @@ import cn.quantgroup.xyqb.controller.IBaseController;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -27,6 +29,7 @@ import java.util.concurrent.TimeUnit;
...
@@ -27,6 +29,7 @@ import java.util.concurrent.TimeUnit;
* @version 1.0.0
* @version 1.0.0
* @since 2017-11-25
* @since 2017-11-25
*/
*/
@Api
(
tags
=
"LockIpv4 API"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/lock"
)
@RequestMapping
(
"/lock"
)
...
@@ -44,6 +47,7 @@ public class LockIpv4Controller implements IBaseController {
...
@@ -44,6 +47,7 @@ public class LockIpv4Controller implements IBaseController {
* @return
* @return
* @header lock_ipv4 - 获取密令
* @header lock_ipv4 - 获取密令
*/
*/
@ApiOperation
(
value
=
"获取操作密令"
,
httpMethod
=
"POST"
,
notes
=
"获取操作密令"
)
@RequestMapping
(
"/key"
)
@RequestMapping
(
"/key"
)
public
JsonResult
key
(
@RequestParam
(
required
=
false
)
String
act
,
HttpServletRequest
request
)
{
public
JsonResult
key
(
@RequestParam
(
required
=
false
)
String
act
,
HttpServletRequest
request
)
{
//系统环境
//系统环境
...
@@ -69,6 +73,7 @@ public class LockIpv4Controller implements IBaseController {
...
@@ -69,6 +73,7 @@ public class LockIpv4Controller implements IBaseController {
* @param request
* @param request
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"锁定/解锁特定IP"
,
httpMethod
=
"POST"
,
notes
=
"锁定/解锁特定IP"
)
@RequestMapping
(
"/lock_ipv4"
)
@RequestMapping
(
"/lock_ipv4"
)
public
JsonResult
lockIpv4
(
@RequestParam
()
String
ip
,
public
JsonResult
lockIpv4
(
@RequestParam
()
String
ip
,
@RequestParam
()
String
key
,
@RequestParam
()
String
key
,
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/platform/PlatformApiController.java
View file @
263463a5
...
@@ -11,6 +11,8 @@ import cn.quantgroup.xyqb.service.merchant.IMerchantService;
...
@@ -11,6 +11,8 @@ import cn.quantgroup.xyqb.service.merchant.IMerchantService;
import
cn.quantgroup.xyqb.service.page.IPageService
;
import
cn.quantgroup.xyqb.service.page.IPageService
;
import
cn.quantgroup.xyqb.service.user.IUserDetailService
;
import
cn.quantgroup.xyqb.service.user.IUserDetailService
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.ImmutableMap
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -20,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -20,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
/**
/**
* Created by Miraculous on 2017/1/3.
* Created by Miraculous on 2017/1/3.
*/
*/
@Api
(
tags
=
"platform API"
)
@RestController
@RestController
@RequestMapping
(
"/platform/api"
)
@RequestMapping
(
"/platform/api"
)
public
class
PlatformApiController
implements
IBaseController
{
public
class
PlatformApiController
implements
IBaseController
{
...
@@ -31,6 +34,7 @@ public class PlatformApiController implements IBaseController {
...
@@ -31,6 +34,7 @@ public class PlatformApiController implements IBaseController {
@Autowired
@Autowired
private
IUserDetailService
userDetailService
;
private
IUserDetailService
userDetailService
;
@ApiOperation
(
value
=
"获取商户配置表的config_value"
,
httpMethod
=
"POST"
,
notes
=
"获取商户配置表的config_value"
)
@RequestMapping
(
"/page/return_url"
)
@RequestMapping
(
"/page/return_url"
)
public
JsonResult
returnUrl
(
String
key
)
{
public
JsonResult
returnUrl
(
String
key
)
{
Merchant
merchant
=
merchantService
.
findMerchantByName
(
key
);
Merchant
merchant
=
merchantService
.
findMerchantByName
(
key
);
...
@@ -44,6 +48,7 @@ public class PlatformApiController implements IBaseController {
...
@@ -44,6 +48,7 @@ public class PlatformApiController implements IBaseController {
return
JsonResult
.
buildSuccessResult
(
""
,
config
.
getConfigValue
());
return
JsonResult
.
buildSuccessResult
(
""
,
config
.
getConfigValue
());
}
}
@ApiOperation
(
value
=
"不知道干嘛的"
,
httpMethod
=
"POST"
,
notes
=
"不知道干嘛的"
)
@RequestMapping
(
"/page/next"
)
@RequestMapping
(
"/page/next"
)
public
JsonResult
nextPage
(
String
key
,
String
target
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
currentPage
)
{
public
JsonResult
nextPage
(
String
key
,
String
target
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
currentPage
)
{
User
user
=
getCurrentUserFromRedis
();
User
user
=
getCurrentUserFromRedis
();
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/sms/SmsController.java
View file @
263463a5
...
@@ -11,6 +11,8 @@ import cn.quantgroup.xyqb.service.sms.ISmsService;
...
@@ -11,6 +11,8 @@ import cn.quantgroup.xyqb.service.sms.ISmsService;
import
cn.quantgroup.xyqb.util.DateUtils
;
import
cn.quantgroup.xyqb.util.DateUtils
;
import
cn.quantgroup.xyqb.util.IpUtil
;
import
cn.quantgroup.xyqb.util.IpUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -28,6 +30,7 @@ import java.util.concurrent.TimeUnit;
...
@@ -28,6 +30,7 @@ import java.util.concurrent.TimeUnit;
/**
/**
* Created by FrankChow on 15/7/6.
* Created by FrankChow on 15/7/6.
*/
*/
@Api
(
tags
=
"external SMS API"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/api/sms"
)
@RequestMapping
(
"/api/sms"
)
...
@@ -69,6 +72,7 @@ public class SmsController implements IBaseController {
...
@@ -69,6 +72,7 @@ public class SmsController implements IBaseController {
* @param appName -
* @param appName -
* @param smsMerchant - 短信模板/类型
* @param smsMerchant - 短信模板/类型
*/
*/
@ApiOperation
(
value
=
"短信验证码: for H5"
,
httpMethod
=
"POST"
,
notes
=
"短信验证码: for H5"
)
@CaptchaNewValidator
@CaptchaNewValidator
@RequestMapping
(
"/send_sms_verification_code"
)
@RequestMapping
(
"/send_sms_verification_code"
)
public
JsonResult
verifyPhoneNoH5
(
@RequestParam
String
phoneNo
,
public
JsonResult
verifyPhoneNoH5
(
@RequestParam
String
phoneNo
,
...
@@ -89,6 +93,7 @@ public class SmsController implements IBaseController {
...
@@ -89,6 +93,7 @@ public class SmsController implements IBaseController {
* @param smsMerchant - 短信模板/类型
* @param smsMerchant - 短信模板/类型
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"短信验证码:重置密码"
,
httpMethod
=
"POST"
,
notes
=
"短信验证码:重置密码"
)
@CaptchaNewValidator
@CaptchaNewValidator
@RequestMapping
(
"/send_reset_code"
)
@RequestMapping
(
"/send_reset_code"
)
public
JsonResult
resetPasswordH5
(
@RequestParam
String
phoneNo
,
public
JsonResult
resetPasswordH5
(
@RequestParam
String
phoneNo
,
...
@@ -104,6 +109,7 @@ public class SmsController implements IBaseController {
...
@@ -104,6 +109,7 @@ public class SmsController implements IBaseController {
* 短信验证码: for H5
* 短信验证码: for H5
* 使用 @FPLock 注解并加入自定义限制参数, 做针对手机号的发送次数限制
* 使用 @FPLock 注解并加入自定义限制参数, 做针对手机号的发送次数限制
*/
*/
@ApiOperation
(
value
=
"短信验证码: for H5"
,
httpMethod
=
"POST"
,
notes
=
"短信验证码: for H5"
)
@CaptchaNewValidator
@CaptchaNewValidator
@RequestMapping
(
"/send_sms_verification_code_voice"
)
@RequestMapping
(
"/send_sms_verification_code_voice"
)
public
JsonResult
verifyPhoneNoH5New
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
public
JsonResult
verifyPhoneNoH5New
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
...
@@ -117,6 +123,7 @@ public class SmsController implements IBaseController {
...
@@ -117,6 +123,7 @@ public class SmsController implements IBaseController {
return
sendVerificationCode2Voice
(
phoneNo
,
randomCode
,
usage
);
return
sendVerificationCode2Voice
(
phoneNo
,
randomCode
,
usage
);
}
}
@ApiOperation
(
value
=
"发送重置密码语音验证码"
,
httpMethod
=
"POST"
,
notes
=
"发送重置密码语音验证码"
)
@CaptchaNewValidator
@CaptchaNewValidator
@RequestMapping
(
"/send_reset_code_voice"
)
@RequestMapping
(
"/send_reset_code_voice"
)
public
JsonResult
resetPasswordH5New
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
public
JsonResult
resetPasswordH5New
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
...
@@ -133,6 +140,7 @@ public class SmsController implements IBaseController {
...
@@ -133,6 +140,7 @@ public class SmsController implements IBaseController {
/**
/**
* 快速登陆发送验证码
* 快速登陆发送验证码
*/
*/
@ApiOperation
(
value
=
"快速登陆发送验证码"
,
httpMethod
=
"POST"
,
notes
=
"快速登陆发送验证码"
)
@CaptchaNewValidator
@CaptchaNewValidator
@RequestMapping
(
"/send_login_code_voice"
)
@RequestMapping
(
"/send_login_code_voice"
)
public
JsonResult
sendLoginCodeNew
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
public
JsonResult
sendLoginCodeNew
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
...
@@ -153,6 +161,7 @@ public class SmsController implements IBaseController {
...
@@ -153,6 +161,7 @@ public class SmsController implements IBaseController {
* @param appName -
* @param appName -
* @param smsMerchant - 短信模板/类型
* @param smsMerchant - 短信模板/类型
*/
*/
@ApiOperation
(
value
=
"快速登陆发送验证码"
,
httpMethod
=
"POST"
,
notes
=
"快速登陆发送验证码"
)
@CaptchaNewValidator
@CaptchaNewValidator
@RequestMapping
(
"/send_login_code"
)
@RequestMapping
(
"/send_login_code"
)
public
JsonResult
sendLoginCode
(
@RequestParam
String
phoneNo
,
public
JsonResult
sendLoginCode
(
@RequestParam
String
phoneNo
,
...
@@ -171,6 +180,7 @@ public class SmsController implements IBaseController {
...
@@ -171,6 +180,7 @@ public class SmsController implements IBaseController {
* @param appName -
* @param appName -
* @param smsMerchant - 短信模板/类型
* @param smsMerchant - 短信模板/类型
*/
*/
@ApiOperation
(
value
=
"快速注册发送验证码"
,
httpMethod
=
"POST"
,
notes
=
"快速注册发送验证码"
)
@CaptchaNewValidator
@CaptchaNewValidator
@RequestMapping
(
"/send_regist_code"
)
@RequestMapping
(
"/send_regist_code"
)
public
JsonResult
sendRegistCode
(
@RequestParam
String
phoneNo
,
public
JsonResult
sendRegistCode
(
@RequestParam
String
phoneNo
,
...
@@ -259,6 +269,7 @@ public class SmsController implements IBaseController {
...
@@ -259,6 +269,7 @@ public class SmsController implements IBaseController {
/**
/**
* 快速登陆发送验证码新版
* 快速登陆发送验证码新版
*/
*/
@ApiOperation
(
value
=
"快速登陆发送验证码新版"
,
httpMethod
=
"POST"
,
notes
=
"快速登陆发送验证码新版"
)
@CaptchaNewValidator
@CaptchaNewValidator
@RequestMapping
(
"/send_login_code_voice_new"
)
@RequestMapping
(
"/send_login_code_voice_new"
)
public
JsonResult
sendLoginCodeVoiceNew
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
public
JsonResult
sendLoginCodeVoiceNew
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
...
@@ -281,6 +292,7 @@ public class SmsController implements IBaseController {
...
@@ -281,6 +292,7 @@ public class SmsController implements IBaseController {
* @param appName -
* @param appName -
* @param smsMerchant - 短信模板/类型
* @param smsMerchant - 短信模板/类型
*/
*/
@ApiOperation
(
value
=
"快速登陆发送短信验证码"
,
httpMethod
=
"POST"
,
notes
=
"快速登陆发送短信验证码"
)
@CaptchaNewValidator
@CaptchaNewValidator
@RequestMapping
(
"/send_login_code_new"
)
@RequestMapping
(
"/send_login_code_new"
)
public
JsonResult
sendLoginSmsCodeNew
(
@RequestParam
String
phoneNo
,
public
JsonResult
sendLoginSmsCodeNew
(
@RequestParam
String
phoneNo
,
...
@@ -302,6 +314,7 @@ public class SmsController implements IBaseController {
...
@@ -302,6 +314,7 @@ public class SmsController implements IBaseController {
* @param appName -
* @param appName -
* @param smsMerchant - 短信模板/类型
* @param smsMerchant - 短信模板/类型
*/
*/
@ApiOperation
(
value
=
"快速登陆发送短信验证码"
,
httpMethod
=
"POST"
,
notes
=
"快速登陆发送短信验证码"
)
@CaptchaNewValidator
@CaptchaNewValidator
@RequestMapping
(
"/send_login_code_new_forH5"
)
@RequestMapping
(
"/send_login_code_new_forH5"
)
public
JsonResult
sendLoginSmsCodeNewForH5
(
@RequestParam
String
phoneNo
,
public
JsonResult
sendLoginSmsCodeNewForH5
(
@RequestParam
String
phoneNo
,
...
@@ -323,6 +336,7 @@ public class SmsController implements IBaseController {
...
@@ -323,6 +336,7 @@ public class SmsController implements IBaseController {
* @param appName -
* @param appName -
* @param smsMerchant - 短信模板/类型
* @param smsMerchant - 短信模板/类型
*/
*/
@ApiOperation
(
value
=
"VCC通用 - 发送短信验证码"
,
httpMethod
=
"POST"
,
notes
=
"VCC通用 - 发送短信验证码"
)
@CaptchaNewValidator
@CaptchaNewValidator
@RequestMapping
(
"/send_vcc_sms_code"
)
@RequestMapping
(
"/send_vcc_sms_code"
)
public
JsonResult
sendVccSmsCode
(
@RequestParam
String
phoneNo
,
public
JsonResult
sendVccSmsCode
(
@RequestParam
String
phoneNo
,
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/login/AuthInfoController.java
View file @
263463a5
...
@@ -7,6 +7,8 @@ import cn.quantgroup.xyqb.model.session.LoginInfo;
...
@@ -7,6 +7,8 @@ import cn.quantgroup.xyqb.model.session.LoginInfo;
import
cn.quantgroup.xyqb.model.session.SessionStruct
;
import
cn.quantgroup.xyqb.model.session.SessionStruct
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -20,11 +22,13 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -20,11 +22,13 @@ import javax.servlet.http.HttpServletRequest;
@RestController
@RestController
@RequestMapping
(
"/auth"
)
@RequestMapping
(
"/auth"
)
@Slf4j
@Slf4j
@Api
(
tags
=
"internal 查询已登录信息 API"
)
public
class
AuthInfoController
implements
IBaseController
{
public
class
AuthInfoController
implements
IBaseController
{
/**
/**
* @yapi unknown
* @yapi unknown
*/
*/
@ApiOperation
(
value
=
"查询已登录信息"
,
httpMethod
=
"GET"
,
notes
=
"查询已登录信息"
)
@RequestMapping
(
"/info/login"
)
@RequestMapping
(
"/info/login"
)
public
JsonResult
loginInfo
(
HttpServletRequest
request
)
{
public
JsonResult
loginInfo
(
HttpServletRequest
request
)
{
SessionStruct
sessionStruct
=
getCurrentSessionFromRedis
();
SessionStruct
sessionStruct
=
getCurrentSessionFromRedis
();
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/querylog/UserQueryLogController.java
View file @
263463a5
...
@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletResponse;
import
cn.quantgroup.xyqb.exception.UserQueryLogException
;
import
cn.quantgroup.xyqb.exception.UserQueryLogException
;
import
cn.quantgroup.xyqb.util.encrypt.Rsa
;
import
cn.quantgroup.xyqb.util.encrypt.Rsa
;
import
io.swagger.annotations.Api
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.hssf.usermodel.*
;
import
org.apache.poi.hssf.usermodel.*
;
...
@@ -46,6 +47,7 @@ import cn.quantgroup.xyqb.util.encrypt.Md5Util;
...
@@ -46,6 +47,7 @@ import cn.quantgroup.xyqb.util.encrypt.Md5Util;
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/query"
)
@RequestMapping
(
"/query"
)
@Api
(
tags
=
"internal 用户查询日志 API"
)
public
class
UserQueryLogController
{
public
class
UserQueryLogController
{
@Autowired
@Autowired
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/user/AppController.java
View file @
263463a5
...
@@ -23,6 +23,7 @@ import cn.quantgroup.xyqb.util.TenantUtil;
...
@@ -23,6 +23,7 @@ import cn.quantgroup.xyqb.util.TenantUtil;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
com.sensorsdata.analytics.javasdk.ISensorsAnalytics
;
import
com.sensorsdata.analytics.javasdk.ISensorsAnalytics
;
import
com.sensorsdata.analytics.javasdk.bean.EventRecord
;
import
com.sensorsdata.analytics.javasdk.bean.EventRecord
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -44,6 +45,7 @@ import static cn.quantgroup.xyqb.constant.UserConstant.USER_ERROR_OR_PASSWORD_ER
...
@@ -44,6 +45,7 @@ import static cn.quantgroup.xyqb.constant.UserConstant.USER_ERROR_OR_PASSWORD_ER
* @author mengfan.feng
* @author mengfan.feng
* @time 2015-10-27 11:41
* @time 2015-10-27 11:41
*/
*/
@Api
(
tags
=
"第三方用户免密登录 API"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/app"
)
@RequestMapping
(
"/app"
)
...
@@ -60,6 +62,7 @@ public class AppController implements IBaseController {
...
@@ -60,6 +62,7 @@ public class AppController implements IBaseController {
@Autowired
@Autowired
private
IUserRegisterService
userRegisterService
;
private
IUserRegisterService
userRegisterService
;
@ApiOperation
(
value
=
"app 认证登录"
,
httpMethod
=
"POST"
,
notes
=
"app 认证登录"
)
@IpValidator
@IpValidator
@AuthorizationPoint
@AuthorizationPoint
@RequestMapping
(
"/auth/v1/login"
)
@RequestMapping
(
"/auth/v1/login"
)
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/user/InnerController.java
View file @
263463a5
...
@@ -1622,8 +1622,8 @@ public class InnerController implements IBaseController {
...
@@ -1622,8 +1622,8 @@ public class InnerController implements IBaseController {
* @param userId 用户id
* @param userId 用户id
* @return 销户结果
* @return 销户结果
*/
*/
@GetMapping
(
"/user/
cancellation
/{userId}"
)
@GetMapping
(
"/user/
delete
/{userId}"
)
public
JsonResult
<?>
cancellation
(
@NotNull
@PathVariable
(
"userId"
)
Long
userId
)
{
public
JsonResult
<?>
delete
(
@NotNull
@PathVariable
(
"userId"
)
Long
userId
)
{
log
.
info
(
"用户[{}], 销户开始"
,
userId
);
log
.
info
(
"用户[{}], 销户开始"
,
userId
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/user/SyncUserController.java
View file @
263463a5
...
@@ -6,6 +6,7 @@ import java.util.List;
...
@@ -6,6 +6,7 @@ import java.util.List;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
io.swagger.annotations.Api
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -34,6 +35,7 @@ import cn.quantgroup.xyqb.validator.ChineseName;
...
@@ -34,6 +35,7 @@ import cn.quantgroup.xyqb.validator.ChineseName;
* 同步用户数据,第三方模块访问时
* 同步用户数据,第三方模块访问时
* Created by Miraculous on 15/12/29.
* Created by Miraculous on 15/12/29.
*/
*/
@Api
(
tags
=
"同步用户数据 API"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/api/sync"
)
@RequestMapping
(
"/api/sync"
)
...
@@ -118,6 +120,7 @@ public class SyncUserController {
...
@@ -118,6 +120,7 @@ public class SyncUserController {
return
JsonResult
.
buildSuccessResult
(
null
,
userModel
);
return
JsonResult
.
buildSuccessResult
(
null
,
userModel
);
}
}
@ApiOperation
(
value
=
"通过uuid拉取用户"
,
httpMethod
=
"POST"
,
notes
=
"通过uuid拉取用户"
)
@RequestMapping
(
"/user_uuid"
)
@RequestMapping
(
"/user_uuid"
)
public
JsonResult
fetchUserByUuid
(
String
key
,
String
uuid
)
{
public
JsonResult
fetchUserByUuid
(
String
key
,
String
uuid
)
{
if
(
StringUtils
.
isEmpty
(
key
)
||
!
KEY
.
equals
(
key
))
{
if
(
StringUtils
.
isEmpty
(
key
)
||
!
KEY
.
equals
(
key
))
{
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/user/UserApiController.java
View file @
263463a5
...
@@ -11,6 +11,7 @@ import cn.quantgroup.xyqb.service.sms.ISmsService;
...
@@ -11,6 +11,7 @@ import cn.quantgroup.xyqb.service.sms.ISmsService;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
cn.quantgroup.xyqb.session.XyqbSessionContextHolder
;
import
cn.quantgroup.xyqb.session.XyqbSessionContextHolder
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -25,6 +26,7 @@ import java.util.Objects;
...
@@ -25,6 +26,7 @@ import java.util.Objects;
/**
/**
* Created by FrankChow on 15/12/16.
* Created by FrankChow on 15/12/16.
*/
*/
@Api
(
tags
=
"用户 API"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/api"
)
@RequestMapping
(
"/api"
)
...
@@ -40,6 +42,7 @@ public class UserApiController {
...
@@ -40,6 +42,7 @@ public class UserApiController {
@Resource
@Resource
private
ISmsService
smsService
;
private
ISmsService
smsService
;
@ApiOperation
(
value
=
"是否设置了密码"
,
httpMethod
=
"POST"
,
notes
=
"是否设置了密码"
)
@RequestMapping
(
"/user/is_passwd_set"
)
@RequestMapping
(
"/user/is_passwd_set"
)
public
JsonResult
isPasswordSet
(
String
phoneNo
)
{
public
JsonResult
isPasswordSet
(
String
phoneNo
)
{
if
(
StringUtils
.
isEmpty
(
phoneNo
))
{
if
(
StringUtils
.
isEmpty
(
phoneNo
))
{
...
@@ -110,6 +113,7 @@ public class UserApiController {
...
@@ -110,6 +113,7 @@ public class UserApiController {
* @param phoneNo
* @param phoneNo
* @param verificationCode
* @param verificationCode
*/
*/
@ApiOperation
(
value
=
"校验短信验证码"
,
httpMethod
=
"POST"
,
notes
=
"校验短信验证码"
)
@IpValidator
@IpValidator
@RequestMapping
(
value
=
"/verifyPhoneAndCode"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/verifyPhoneAndCode"
,
method
=
RequestMethod
.
POST
)
public
JsonResult
verifyPhoneAndCode
(
@RequestParam
String
phoneNo
,
@RequestParam
String
verificationCode
)
{
public
JsonResult
verifyPhoneAndCode
(
@RequestParam
String
phoneNo
,
@RequestParam
String
verificationCode
)
{
...
...
src/main/java/cn/quantgroup/xyqb/controller/internal/user/center/UserCenterController.java
View file @
263463a5
...
@@ -11,6 +11,7 @@ import cn.quantgroup.xyqb.service.user.*;
...
@@ -11,6 +11,7 @@ import cn.quantgroup.xyqb.service.user.*;
import
cn.quantgroup.xyqb.util.TenantUtil
;
import
cn.quantgroup.xyqb.util.TenantUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
com.alibaba.fastjson.TypeReference
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
...
@@ -26,6 +27,7 @@ import java.util.Map;
...
@@ -26,6 +27,7 @@ import java.util.Map;
/**
/**
* Created by 11 on 2017/3/22.
* Created by 11 on 2017/3/22.
*/
*/
@Api
(
tags
=
"internal UserCenter API"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/user/center"
)
@RequestMapping
(
"/user/center"
)
...
@@ -46,6 +48,7 @@ public class UserCenterController {
...
@@ -46,6 +48,7 @@ public class UserCenterController {
@Autowired
@Autowired
private
ApplicationEventPublisher
applicationEventPublisher
;
private
ApplicationEventPublisher
applicationEventPublisher
;
@ApiOperation
(
value
=
"获取用户附加信息"
,
httpMethod
=
"GET"
,
notes
=
"获取用户附加信息"
)
@GetMapping
(
"/attach"
)
@GetMapping
(
"/attach"
)
public
JsonResult
queryUserAttach
(
Long
userId
)
{
public
JsonResult
queryUserAttach
(
Long
userId
)
{
if
(
userId
==
null
)
{
if
(
userId
==
null
)
{
...
@@ -60,6 +63,7 @@ public class UserCenterController {
...
@@ -60,6 +63,7 @@ public class UserCenterController {
* @param userIds
* @param userIds
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"获取用户附加信息集合"
,
httpMethod
=
"POST"
,
notes
=
"获取用户附加信息集合"
)
@PostMapping
(
"/attach/list"
)
@PostMapping
(
"/attach/list"
)
public
JsonResult
queryUserAttachList
(
@RequestBody
List
<
Long
>
userIds
,
@RequestParam
(
required
=
false
)
Integer
tenantId
)
{
public
JsonResult
queryUserAttachList
(
@RequestBody
List
<
Long
>
userIds
,
@RequestParam
(
required
=
false
)
Integer
tenantId
)
{
//默认羊小咩租户
//默认羊小咩租户
...
...
src/main/java/cn/quantgroup/xyqb/controller/middleoffice/applet/AppletController.java
View file @
263463a5
...
@@ -7,6 +7,8 @@ import cn.quantgroup.xyqb.exception.DataException;
...
@@ -7,6 +7,8 @@ import cn.quantgroup.xyqb.exception.DataException;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.service.middleoffice.applet.IAppletService
;
import
cn.quantgroup.xyqb.service.middleoffice.applet.IAppletService
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -22,6 +24,7 @@ import java.util.Arrays;
...
@@ -22,6 +24,7 @@ import java.util.Arrays;
* @modified By:
* @modified By:
* @version: 1.0
* @version: 1.0
*/
*/
@Api
(
tags
=
"middle_office 小程序 API"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/middle_office/applet"
)
@RequestMapping
(
"/middle_office/applet"
)
...
@@ -45,6 +48,7 @@ public class AppletController {
...
@@ -45,6 +48,7 @@ public class AppletController {
/**
/**
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"小程序关联"
,
httpMethod
=
"POST"
,
notes
=
"小程序关联"
)
@PostMapping
(
"/relevance"
)
@PostMapping
(
"/relevance"
)
public
JsonResult
relevance
(
@Validated
@RequestBody
AppletParamEntry
appletParamEntry
)
{
public
JsonResult
relevance
(
@Validated
@RequestBody
AppletParamEntry
appletParamEntry
)
{
if
(!
containsAppName
(
appletParamEntry
.
getAppName
()))
{
if
(!
containsAppName
(
appletParamEntry
.
getAppName
()))
{
...
@@ -62,9 +66,10 @@ public class AppletController {
...
@@ -62,9 +66,10 @@ public class AppletController {
/**
/**
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"登录"
,
httpMethod
=
"POST"
,
notes
=
"登录"
)
@Validated
@Validated
@PostMapping
(
"/login"
)
@PostMapping
(
"/login"
)
public
JsonResult
login
(
@RequestParam
String
appName
,
@RequestParam
String
openId
,
@RequestParam
(
required
=
false
)
Integer
tenantId
,
String
utmSource
,
@RequestParam
(
required
=
false
)
Integer
appNo
)
{
public
JsonResult
<
LoginVo
>
login
(
@RequestParam
String
appName
,
@RequestParam
String
openId
,
@RequestParam
(
required
=
false
)
Integer
tenantId
,
String
utmSource
,
@RequestParam
(
required
=
false
)
Integer
appNo
)
{
if
(!
containsAppName
(
appName
))
{
if
(!
containsAppName
(
appName
))
{
throw
new
DataException
(
"appName不合法"
);
throw
new
DataException
(
"appName不合法"
);
}
}
...
...
src/main/java/cn/quantgroup/xyqb/controller/middleoffice/contact/ContactController.java
View file @
263463a5
...
@@ -8,6 +8,8 @@ import cn.quantgroup.xyqb.model.JsonResult;
...
@@ -8,6 +8,8 @@ import cn.quantgroup.xyqb.model.JsonResult;
import
cn.quantgroup.xyqb.model.Tuple
;
import
cn.quantgroup.xyqb.model.Tuple
;
import
cn.quantgroup.xyqb.service.user.IContactService
;
import
cn.quantgroup.xyqb.service.user.IContactService
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PatchMapping
;
import
org.springframework.web.bind.annotation.PatchMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
@@ -23,6 +25,7 @@ import java.util.stream.Collectors;
...
@@ -23,6 +25,7 @@ import java.util.stream.Collectors;
/**
/**
* 联系人
* 联系人
*/
*/
@Api
(
tags
=
"middle_office 联系人 API"
)
@RestController
@RestController
@RequestMapping
(
"/middle_office/contacts"
)
@RequestMapping
(
"/middle_office/contacts"
)
public
class
ContactController
{
public
class
ContactController
{
...
@@ -37,6 +40,7 @@ public class ContactController {
...
@@ -37,6 +40,7 @@ public class ContactController {
* @param bizType 业务类型
* @param bizType 业务类型
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"获取联系人"
,
httpMethod
=
"GET"
,
notes
=
"获取联系人"
)
@GetMapping
@GetMapping
public
JsonResult
get
(
Long
userId
,
BizType
bizType
)
{
public
JsonResult
get
(
Long
userId
,
BizType
bizType
)
{
List
<
Contact
>
contactList
=
contactService
.
findByUserIdAndBizType
(
userId
,
bizType
,
true
);
List
<
Contact
>
contactList
=
contactService
.
findByUserIdAndBizType
(
userId
,
bizType
,
true
);
...
@@ -49,6 +53,7 @@ public class ContactController {
...
@@ -49,6 +53,7 @@ public class ContactController {
* @param contactUpdateDtoList
* @param contactUpdateDtoList
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"更新联系人信息"
,
httpMethod
=
"PATCH"
,
notes
=
"更新联系人信息"
)
@PatchMapping
@PatchMapping
public
JsonResult
update
(
@RequestBody
List
<
ContactUpdateDto
>
contactUpdateDtoList
)
{
public
JsonResult
update
(
@RequestBody
List
<
ContactUpdateDto
>
contactUpdateDtoList
)
{
contactUpdateDtoList
=
contactUpdateDtoList
.
stream
()
contactUpdateDtoList
=
contactUpdateDtoList
.
stream
()
...
@@ -70,6 +75,7 @@ public class ContactController {
...
@@ -70,6 +75,7 @@ public class ContactController {
*
*
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"新增联系人"
,
httpMethod
=
"POST"
,
notes
=
"新增联系人"
)
@PostMapping
@PostMapping
public
JsonResult
save
(
@RequestBody
ContactSaveDto
contactSaveDto
)
{
public
JsonResult
save
(
@RequestBody
ContactSaveDto
contactSaveDto
)
{
Long
userId
=
contactSaveDto
.
getUserId
();
Long
userId
=
contactSaveDto
.
getUserId
();
...
...
src/main/java/cn/quantgroup/xyqb/controller/middleoffice/image/ImageController.java
View file @
263463a5
...
@@ -8,6 +8,8 @@ import cn.quantgroup.xyqb.model.ClientType;
...
@@ -8,6 +8,8 @@ import cn.quantgroup.xyqb.model.ClientType;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.service.captcha.IGeetestCaptchaService
;
import
cn.quantgroup.xyqb.service.captcha.IGeetestCaptchaService
;
import
cn.quantgroup.xyqb.service.captcha.IQuantgroupCaptchaService
;
import
cn.quantgroup.xyqb.service.captcha.IQuantgroupCaptchaService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.codec.digest.Md5Crypt
;
import
org.apache.commons.codec.digest.Md5Crypt
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -21,6 +23,7 @@ import java.util.Objects;
...
@@ -21,6 +23,7 @@ import java.util.Objects;
/**
/**
* 图形验证码
* 图形验证码
*/
*/
@Api
(
tags
=
"middle_office 图形验证码 API"
)
@RestController
@RestController
@RequestMapping
(
"/middle_office/image"
)
@RequestMapping
(
"/middle_office/image"
)
public
class
ImageController
{
public
class
ImageController
{
...
@@ -35,6 +38,7 @@ public class ImageController {
...
@@ -35,6 +38,7 @@ public class ImageController {
private
Boolean
geetestClose
;
private
Boolean
geetestClose
;
@ApiOperation
(
value
=
"图形验证码"
,
httpMethod
=
"GET"
,
notes
=
"图形验证码"
)
@GetMapping
@GetMapping
public
JsonResult
image
(
String
userIp
,
String
clientType
,
String
phoneNo
)
{
public
JsonResult
image
(
String
userIp
,
String
clientType
,
String
phoneNo
)
{
Locale
locale
=
Locale
.
CHINA
;
Locale
locale
=
Locale
.
CHINA
;
...
@@ -66,6 +70,7 @@ public class ImageController {
...
@@ -66,6 +70,7 @@ public class ImageController {
*
*
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"验证图形验证码"
,
httpMethod
=
"POST"
,
notes
=
"验证图形验证码"
)
@PostMapping
(
"/verify/{type}"
)
@PostMapping
(
"/verify/{type}"
)
public
JsonResult
verifyGT
(
@PathVariable
ImageVerifyTypeEnum
type
,
@RequestBody
ImageDTO
imageDTO
)
{
public
JsonResult
verifyGT
(
@PathVariable
ImageVerifyTypeEnum
type
,
@RequestBody
ImageDTO
imageDTO
)
{
boolean
verify
=
ImageVerifyStrategyFactory
.
get
(
type
).
verify
(
imageDTO
);
boolean
verify
=
ImageVerifyStrategyFactory
.
get
(
type
).
verify
(
imageDTO
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/middleoffice/login/LoginController.java
View file @
263463a5
...
@@ -2,6 +2,8 @@ package cn.quantgroup.xyqb.controller.middleoffice.login;
...
@@ -2,6 +2,8 @@ package cn.quantgroup.xyqb.controller.middleoffice.login;
import
cn.quantgroup.xyqb.controller.middleoffice.common.VerifyTypeEnum
;
import
cn.quantgroup.xyqb.controller.middleoffice.common.VerifyTypeEnum
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -10,6 +12,7 @@ import javax.annotation.Resource;
...
@@ -10,6 +12,7 @@ import javax.annotation.Resource;
/**
/**
* 注册与登陆
* 注册与登陆
*/
*/
@Api
(
tags
=
"middle_office 注册与登录 API"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/middle_office/login"
)
@RequestMapping
(
"/middle_office/login"
)
...
@@ -19,6 +22,7 @@ public class LoginController {
...
@@ -19,6 +22,7 @@ public class LoginController {
private
ILoginModule
loginModule
;
private
ILoginModule
loginModule
;
@ApiOperation
(
value
=
"loginFreeAuto"
,
httpMethod
=
"POST"
,
notes
=
"loginFreeAuto"
)
@PostMapping
(
"/{type}"
)
@PostMapping
(
"/{type}"
)
public
JsonResult
loginFreeAuto
(
@PathVariable
VerifyTypeEnum
type
,
public
JsonResult
loginFreeAuto
(
@PathVariable
VerifyTypeEnum
type
,
@RequestParam
(
required
=
false
,
defaultValue
=
"false"
)
Boolean
autoReg
,
@RequestParam
(
required
=
false
,
defaultValue
=
"false"
)
Boolean
autoReg
,
...
@@ -32,12 +36,14 @@ public class LoginController {
...
@@ -32,12 +36,14 @@ public class LoginController {
return
JsonResult
.
buildSuccessResultGeneric
(
login
);
return
JsonResult
.
buildSuccessResultGeneric
(
login
);
}
}
@ApiOperation
(
value
=
"通过密码修改密码"
,
httpMethod
=
"PATCH"
,
notes
=
"通过密码修改密码"
)
@PatchMapping
(
"/modify/pwd"
)
@PatchMapping
(
"/modify/pwd"
)
public
JsonResult
modifyByPwd
(
String
phoneNo
,
String
password
,
String
passwordNew
)
{
public
JsonResult
modifyByPwd
(
String
phoneNo
,
String
password
,
String
passwordNew
)
{
loginModule
.
modifyPwd
(
VerifyTypeEnum
.
pwd
,
phoneNo
,
password
,
passwordNew
);
loginModule
.
modifyPwd
(
VerifyTypeEnum
.
pwd
,
phoneNo
,
password
,
passwordNew
);
return
JsonResult
.
buildSuccessResult
();
return
JsonResult
.
buildSuccessResult
();
}
}
@ApiOperation
(
value
=
"通过短信修改密码"
,
httpMethod
=
"PATCH"
,
notes
=
"通过短信修改密码"
)
@PatchMapping
(
"/modify/sms"
)
@PatchMapping
(
"/modify/sms"
)
public
JsonResult
modifyBySms
(
String
phoneNo
,
String
password
,
String
verificationCode
)
{
public
JsonResult
modifyBySms
(
String
phoneNo
,
String
password
,
String
verificationCode
)
{
loginModule
.
modifyPwd
(
VerifyTypeEnum
.
sms
,
phoneNo
,
password
,
verificationCode
);
loginModule
.
modifyPwd
(
VerifyTypeEnum
.
sms
,
phoneNo
,
password
,
verificationCode
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/middleoffice/sms/SmsController.java
View file @
263463a5
...
@@ -5,6 +5,8 @@ import cn.quantgroup.xyqb.controller.middleoffice.common.image.ImageDTO;
...
@@ -5,6 +5,8 @@ import cn.quantgroup.xyqb.controller.middleoffice.common.image.ImageDTO;
import
cn.quantgroup.xyqb.controller.middleoffice.common.image.ImageVerifyStrategyFactory
;
import
cn.quantgroup.xyqb.controller.middleoffice.common.image.ImageVerifyStrategyFactory
;
import
cn.quantgroup.xyqb.controller.middleoffice.common.image.ImageVerifyTypeEnum
;
import
cn.quantgroup.xyqb.controller.middleoffice.common.image.ImageVerifyTypeEnum
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -15,6 +17,7 @@ import javax.annotation.Resource;
...
@@ -15,6 +17,7 @@ import javax.annotation.Resource;
/**
/**
* 短信
* 短信
*/
*/
@Api
(
tags
=
"middle_office 短信 API"
)
@RestController
(
"middleSmsController"
)
@RestController
(
"middleSmsController"
)
@RequestMapping
(
"/middle_office/sms"
)
@RequestMapping
(
"/middle_office/sms"
)
public
class
SmsController
{
public
class
SmsController
{
...
@@ -23,6 +26,7 @@ public class SmsController {
...
@@ -23,6 +26,7 @@ public class SmsController {
private
cn
.
quantgroup
.
xyqb
.
controller
.
external
.
sms
.
SmsController
smsController
;
private
cn
.
quantgroup
.
xyqb
.
controller
.
external
.
sms
.
SmsController
smsController
;
@ApiOperation
(
value
=
"获取短信验证码"
,
httpMethod
=
"GET"
,
notes
=
"获取短信验证码"
)
@GetMapping
@GetMapping
public
JsonResult
sms
(
SmsDTO
sms
,
public
JsonResult
sms
(
SmsDTO
sms
,
ImageVerifyTypeEnum
verifyType
,
ImageVerifyTypeEnum
verifyType
,
...
@@ -39,6 +43,7 @@ public class SmsController {
...
@@ -39,6 +43,7 @@ public class SmsController {
sms
.
getAppName
(),
sms
.
getSmsMerchant
());
sms
.
getAppName
(),
sms
.
getSmsMerchant
());
}
}
@ApiOperation
(
value
=
"重置密码获取短信验证码"
,
httpMethod
=
"GET"
,
notes
=
"重置密码获取短信验证码"
)
@PostMapping
(
"/resetpwd"
)
@PostMapping
(
"/resetpwd"
)
public
JsonResult
resetpwd
(
SmsDTO
sms
,
public
JsonResult
resetpwd
(
SmsDTO
sms
,
ImageVerifyTypeEnum
verifyType
,
ImageVerifyTypeEnum
verifyType
,
...
...
src/main/java/cn/quantgroup/xyqb/controller/middleoffice/user/UserController.java
View file @
263463a5
...
@@ -6,6 +6,8 @@ import cn.quantgroup.xyqb.event.DisableActiveEvent;
...
@@ -6,6 +6,8 @@ import cn.quantgroup.xyqb.event.DisableActiveEvent;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
cn.quantgroup.xyqb.util.TenantUtil
;
import
cn.quantgroup.xyqb.util.TenantUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.ApplicationEventPublisher
;
import
org.springframework.context.ApplicationEventPublisher
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -18,6 +20,7 @@ import java.util.Map;
...
@@ -18,6 +20,7 @@ import java.util.Map;
* 用户信息
* 用户信息
*/
*/
@Slf4j
@Slf4j
@Api
(
tags
=
"middle_office 用户信息API"
)
@RestController
(
"middleUserController"
)
@RestController
(
"middleUserController"
)
@RequestMapping
(
"/middle_office/user"
)
@RequestMapping
(
"/middle_office/user"
)
public
class
UserController
{
public
class
UserController
{
...
@@ -28,6 +31,7 @@ public class UserController {
...
@@ -28,6 +31,7 @@ public class UserController {
@Resource
@Resource
private
ApplicationEventPublisher
applicationEventPublisher
;
private
ApplicationEventPublisher
applicationEventPublisher
;
@ApiOperation
(
value
=
"根据userId启用用户"
,
httpMethod
=
"PUT"
,
notes
=
"根据userId启用用户"
)
@PutMapping
(
"/enable/{userId}"
)
@PutMapping
(
"/enable/{userId}"
)
public
JsonResult
enable
(
@PathVariable
Long
userId
)
{
public
JsonResult
enable
(
@PathVariable
Long
userId
)
{
User
user
=
userService
.
findById
(
userId
);
User
user
=
userService
.
findById
(
userId
);
...
@@ -45,6 +49,7 @@ public class UserController {
...
@@ -45,6 +49,7 @@ public class UserController {
return
JsonResult
.
buildSuccessResult
();
return
JsonResult
.
buildSuccessResult
();
}
}
@ApiOperation
(
value
=
"根据userId禁用用户"
,
httpMethod
=
"PUT"
,
notes
=
"根据userId禁用用户"
)
@PutMapping
(
"/disable/{userId}"
)
@PutMapping
(
"/disable/{userId}"
)
public
JsonResult
disable
(
@PathVariable
Long
userId
)
{
public
JsonResult
disable
(
@PathVariable
Long
userId
)
{
User
user
=
userService
.
findById
(
userId
);
User
user
=
userService
.
findById
(
userId
);
...
@@ -64,6 +69,7 @@ public class UserController {
...
@@ -64,6 +69,7 @@ public class UserController {
return
JsonResult
.
buildSuccessResult
();
return
JsonResult
.
buildSuccessResult
();
}
}
@ApiOperation
(
value
=
"根据userId查询用户信息"
,
httpMethod
=
"GET"
,
notes
=
"根据userId查询用户信息"
)
@GetMapping
(
"/userId/{userId}"
)
@GetMapping
(
"/userId/{userId}"
)
public
JsonResult
user
(
@PathVariable
Long
userId
)
{
public
JsonResult
user
(
@PathVariable
Long
userId
)
{
User
user
=
userService
.
findById
(
userId
);
User
user
=
userService
.
findById
(
userId
);
...
@@ -72,6 +78,7 @@ public class UserController {
...
@@ -72,6 +78,7 @@ public class UserController {
}
}
@ApiOperation
(
value
=
"根据phoneNo查询用户信息"
,
httpMethod
=
"GET"
,
notes
=
"根据phoneNo查询用户信息"
)
@GetMapping
(
"/phoneNo/{phoneNo}"
)
@GetMapping
(
"/phoneNo/{phoneNo}"
)
public
JsonResult
user
(
@PathVariable
String
phoneNo
)
{
public
JsonResult
user
(
@PathVariable
String
phoneNo
)
{
User
user
=
userService
.
findByPhoneInDb
(
phoneNo
);
User
user
=
userService
.
findByPhoneInDb
(
phoneNo
);
...
@@ -79,6 +86,7 @@ public class UserController {
...
@@ -79,6 +86,7 @@ public class UserController {
return
JsonResult
.
buildSuccessResultGeneric
(
user
);
return
JsonResult
.
buildSuccessResultGeneric
(
user
);
}
}
@ApiOperation
(
value
=
"根据uuid查询用户信息"
,
httpMethod
=
"GET"
,
notes
=
"根据uuid查询用户信息"
)
@GetMapping
(
"/uuid/{uuid}"
)
@GetMapping
(
"/uuid/{uuid}"
)
public
JsonResult
uuid
(
@PathVariable
String
uuid
)
{
public
JsonResult
uuid
(
@PathVariable
String
uuid
)
{
User
user
=
userService
.
findByUuidWithCache
(
uuid
);
User
user
=
userService
.
findByUuidWithCache
(
uuid
);
...
@@ -92,6 +100,7 @@ public class UserController {
...
@@ -92,6 +100,7 @@ public class UserController {
* @param params
* @param params
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"根据uuid或者userids 获取用户信息"
,
httpMethod
=
"POST"
,
notes
=
"根据uuid或者userids 获取用户信息"
)
@PostMapping
(
"/getByUuidsOrUserIds"
)
@PostMapping
(
"/getByUuidsOrUserIds"
)
public
JsonResult
getByUuidsOrUserIds
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
public
JsonResult
getByUuidsOrUserIds
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
log
.
info
(
"根据uuid或者userids 获取用户信息 {}"
,
params
);
log
.
info
(
"根据uuid或者userids 获取用户信息 {}"
,
params
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/middleoffice/userdetail/UserDetailController.java
View file @
263463a5
...
@@ -9,6 +9,8 @@ import cn.quantgroup.xyqb.model.JsonResult;
...
@@ -9,6 +9,8 @@ import cn.quantgroup.xyqb.model.JsonResult;
import
cn.quantgroup.xyqb.service.auth.IIdCardService
;
import
cn.quantgroup.xyqb.service.auth.IIdCardService
;
import
cn.quantgroup.xyqb.service.user.IUserDetailService
;
import
cn.quantgroup.xyqb.service.user.IUserDetailService
;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -21,6 +23,7 @@ import java.sql.Timestamp;
...
@@ -21,6 +23,7 @@ import java.sql.Timestamp;
* 用户实名信息
* 用户实名信息
*/
*/
@Slf4j
@Slf4j
@Api
(
tags
=
"middle_office 用户详情API"
)
@RestController
(
"middleUserDetailController"
)
@RestController
(
"middleUserDetailController"
)
@RequestMapping
(
"/middle_office/user_detail"
)
@RequestMapping
(
"/middle_office/user_detail"
)
public
class
UserDetailController
{
public
class
UserDetailController
{
...
@@ -41,6 +44,7 @@ public class UserDetailController {
...
@@ -41,6 +44,7 @@ public class UserDetailController {
* @param userDetailReq
* @param userDetailReq
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"修改用户实名信息"
,
httpMethod
=
"PUT"
,
notes
=
"修改用户实名信息"
)
@PutMapping
(
"/{userId}"
)
@PutMapping
(
"/{userId}"
)
public
JsonResult
update
(
@PathVariable
Long
userId
,
public
JsonResult
update
(
@PathVariable
Long
userId
,
@Valid
@RequestBody
UserDetailReq
userDetailReq
)
{
@Valid
@RequestBody
UserDetailReq
userDetailReq
)
{
...
@@ -63,6 +67,7 @@ public class UserDetailController {
...
@@ -63,6 +67,7 @@ public class UserDetailController {
* @param userDetailReq
* @param userDetailReq
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"保存用户实名信息"
,
httpMethod
=
"POST"
,
notes
=
"保存用户实名信息"
)
@PostMapping
(
"/{userId}"
)
@PostMapping
(
"/{userId}"
)
public
JsonResult
save
(
@PathVariable
Long
userId
,
public
JsonResult
save
(
@PathVariable
Long
userId
,
@Valid
@RequestBody
UserDetailReq
userDetailReq
)
{
@Valid
@RequestBody
UserDetailReq
userDetailReq
)
{
...
@@ -91,6 +96,7 @@ public class UserDetailController {
...
@@ -91,6 +96,7 @@ public class UserDetailController {
* @param userId
* @param userId
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"根据用户 ID,查询实名信息"
,
httpMethod
=
"GET"
,
notes
=
"根据用户 ID,查询实名信息"
)
@GetMapping
(
"/userId/{userId}"
)
@GetMapping
(
"/userId/{userId}"
)
public
JsonResult
query
(
@PathVariable
Long
userId
)
{
public
JsonResult
query
(
@PathVariable
Long
userId
)
{
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
userId
);
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
userId
);
...
@@ -103,6 +109,7 @@ public class UserDetailController {
...
@@ -103,6 +109,7 @@ public class UserDetailController {
* @param phoneNo
* @param phoneNo
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"根据手机号,查询实名信息"
,
httpMethod
=
"GET"
,
notes
=
"根据手机号,查询实名信息"
)
@GetMapping
(
"/phoneNo/{phoneNo}"
)
@GetMapping
(
"/phoneNo/{phoneNo}"
)
public
JsonResult
query
(
@PathVariable
String
phoneNo
)
{
public
JsonResult
query
(
@PathVariable
String
phoneNo
)
{
UserDetail
userDetail
=
userDetailService
.
findByPhoneNo
(
phoneNo
);
UserDetail
userDetail
=
userDetailService
.
findByPhoneNo
(
phoneNo
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/middleoffice/userext/UserExtController.java
View file @
263463a5
...
@@ -13,6 +13,8 @@ import cn.quantgroup.xyqb.service.user.IContactService;
...
@@ -13,6 +13,8 @@ import cn.quantgroup.xyqb.service.user.IContactService;
import
cn.quantgroup.xyqb.service.user.IUserDetailService
;
import
cn.quantgroup.xyqb.service.user.IUserDetailService
;
import
cn.quantgroup.xyqb.service.user.IUserExtInfoService
;
import
cn.quantgroup.xyqb.service.user.IUserExtInfoService
;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationEventPublisher
;
import
org.springframework.context.ApplicationEventPublisher
;
...
@@ -31,6 +33,7 @@ import java.util.Map;
...
@@ -31,6 +33,7 @@ import java.util.Map;
/**
/**
* 用户扩展信息
* 用户扩展信息
*/
*/
@Api
(
tags
=
"middle_office 用户扩展信息 API"
)
@RestController
@RestController
@RequestMapping
(
"/middle_office/user/ext"
)
@RequestMapping
(
"/middle_office/user/ext"
)
public
class
UserExtController
{
public
class
UserExtController
{
...
@@ -54,6 +57,7 @@ public class UserExtController {
...
@@ -54,6 +57,7 @@ public class UserExtController {
private
ApplicationEventPublisher
applicationEventPublisher
;
private
ApplicationEventPublisher
applicationEventPublisher
;
//todo 保存失败的各种场景。
//todo 保存失败的各种场景。
@ApiOperation
(
value
=
"保存/更新用户扩展信息"
,
httpMethod
=
"PUT"
,
notes
=
"更新用户扩展信息"
)
@PutMapping
(
"/{userId}"
)
@PutMapping
(
"/{userId}"
)
public
JsonResult
ext
(
@PathVariable
Long
userId
,
@RequestBody
UserExtReq
userExtReq
)
{
public
JsonResult
ext
(
@PathVariable
Long
userId
,
@RequestBody
UserExtReq
userExtReq
)
{
if
(
userExtReq
.
getEmail
()
!=
null
)
{
if
(
userExtReq
.
getEmail
()
!=
null
)
{
...
@@ -92,6 +96,7 @@ public class UserExtController {
...
@@ -92,6 +96,7 @@ public class UserExtController {
return
JsonResult
.
buildSuccessResult
();
return
JsonResult
.
buildSuccessResult
();
}
}
@ApiOperation
(
value
=
"根据userId获取用户扩展信息"
,
httpMethod
=
"GET"
,
notes
=
"根据userId获取用户扩展信息"
)
@GetMapping
(
"/userId/{userId}"
)
@GetMapping
(
"/userId/{userId}"
)
public
JsonResult
query
(
@PathVariable
Long
userId
,
public
JsonResult
query
(
@PathVariable
Long
userId
,
@RequestParam
(
defaultValue
=
"false"
)
Boolean
address
,
@RequestParam
(
defaultValue
=
"false"
)
Boolean
address
,
...
@@ -110,6 +115,7 @@ public class UserExtController {
...
@@ -110,6 +115,7 @@ public class UserExtController {
return
JsonResult
.
buildSuccessResultGeneric
(
result
);
return
JsonResult
.
buildSuccessResultGeneric
(
result
);
}
}
@ApiOperation
(
value
=
"根据手机号获取用户扩展信息"
,
httpMethod
=
"GET"
,
notes
=
"根据手机号获取用户扩展信息"
)
@GetMapping
(
"/phoneNo/{phoneNo}"
)
@GetMapping
(
"/phoneNo/{phoneNo}"
)
public
JsonResult
query
(
@PathVariable
String
phoneNo
,
public
JsonResult
query
(
@PathVariable
String
phoneNo
,
@RequestParam
(
defaultValue
=
"false"
)
Boolean
address
,
@RequestParam
(
defaultValue
=
"false"
)
Boolean
address
,
...
...
src/main/java/cn/quantgroup/xyqb/controller/middleoffice/wx/WxController.java
View file @
263463a5
...
@@ -8,6 +8,8 @@ import cn.quantgroup.xyqb.service.user.ITenantService;
...
@@ -8,6 +8,8 @@ import cn.quantgroup.xyqb.service.user.ITenantService;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
cn.quantgroup.xyqb.service.wechat.IWechatService
;
import
cn.quantgroup.xyqb.service.wechat.IWechatService
;
import
cn.quantgroup.xyqb.util.TenantUtil
;
import
cn.quantgroup.xyqb.util.TenantUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -17,6 +19,7 @@ import javax.annotation.Resource;
...
@@ -17,6 +19,7 @@ import javax.annotation.Resource;
/**
/**
* 微信
* 微信
*/
*/
@Api
(
tags
=
"middle_office-微信 API"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/middle_office/wx"
)
@RequestMapping
(
"/middle_office/wx"
)
...
@@ -37,6 +40,7 @@ public class WxController {
...
@@ -37,6 +40,7 @@ public class WxController {
* @param userId
* @param userId
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"根据userId查询openId"
,
httpMethod
=
"GET"
,
notes
=
"根据userId查询openId"
)
@GetMapping
(
"/userId/{userId}"
)
@GetMapping
(
"/userId/{userId}"
)
public
JsonResult
openId
(
@PathVariable
Long
userId
,
@RequestParam
(
required
=
false
)
Integer
tenantId
)
{
public
JsonResult
openId
(
@PathVariable
Long
userId
,
@RequestParam
(
required
=
false
)
Integer
tenantId
)
{
//默认羊小咩租户
//默认羊小咩租户
...
@@ -69,6 +73,7 @@ public class WxController {
...
@@ -69,6 +73,7 @@ public class WxController {
* @param tenantId
* @param tenantId
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"根据userId和appName查询openId"
,
httpMethod
=
"GET"
,
notes
=
"根据userId和appName查询openId"
)
@GetMapping
(
"/userId/{userId}/{appName}"
)
@GetMapping
(
"/userId/{userId}/{appName}"
)
public
JsonResult
openId
(
@PathVariable
Long
userId
,
@PathVariable
String
appName
,
@RequestParam
(
required
=
false
)
Integer
tenantId
)
{
public
JsonResult
openId
(
@PathVariable
Long
userId
,
@PathVariable
String
appName
,
@RequestParam
(
required
=
false
)
Integer
tenantId
)
{
//默认羊小咩租户
//默认羊小咩租户
...
@@ -101,6 +106,7 @@ public class WxController {
...
@@ -101,6 +106,7 @@ public class WxController {
* @param phoneNo
* @param phoneNo
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"根据phoneNo查询openId"
,
httpMethod
=
"GET"
,
notes
=
"根据phoneNo查询openId"
)
@GetMapping
(
"/phoneNo/{phoneNo}"
)
@GetMapping
(
"/phoneNo/{phoneNo}"
)
public
JsonResult
openId
(
@PathVariable
String
phoneNo
,
@RequestParam
(
required
=
false
)
Integer
tenantId
)
{
public
JsonResult
openId
(
@PathVariable
String
phoneNo
,
@RequestParam
(
required
=
false
)
Integer
tenantId
)
{
if
(
TenantUtil
.
validationTenantIdIsNullOrZero
(
tenantId
))
{
if
(
TenantUtil
.
validationTenantIdIsNullOrZero
(
tenantId
))
{
...
@@ -130,6 +136,7 @@ public class WxController {
...
@@ -130,6 +136,7 @@ public class WxController {
//todo
//todo
}
}
@ApiOperation
(
value
=
"取消微信关联"
,
httpMethod
=
"PATCH"
,
notes
=
"取消微信关联"
)
@PatchMapping
(
"/forbidden/{userId}"
)
@PatchMapping
(
"/forbidden/{userId}"
)
public
JsonResult
forbidden
(
@PathVariable
Long
userId
,
String
reason
)
{
public
JsonResult
forbidden
(
@PathVariable
Long
userId
,
String
reason
)
{
int
res
=
wechatService
.
forbiddenUserWeChat
(
userId
);
int
res
=
wechatService
.
forbiddenUserWeChat
(
userId
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/modifyphoneno/ModifyPhoneNoController.java
View file @
263463a5
...
@@ -45,7 +45,7 @@ public class ModifyPhoneNoController implements IBaseController {
...
@@ -45,7 +45,7 @@ public class ModifyPhoneNoController implements IBaseController {
@Resource
@Resource
private
IModifyPhoneNoService
modifyPhoneNoService
;
private
IModifyPhoneNoService
modifyPhoneNoService
;
@ApiOperation
(
"app - 查询用户手机号修改进度
"
)
@ApiOperation
(
value
=
"app - 查询用户手机号修改进度"
,
httpMethod
=
"GET
"
)
@GetMapping
(
"/progress"
)
@GetMapping
(
"/progress"
)
public
JsonResult
<
ProgressResp
>
progress
()
{
public
JsonResult
<
ProgressResp
>
progress
()
{
User
user
=
getCurrentUserFromRedis
();
User
user
=
getCurrentUserFromRedis
();
...
...
src/main/java/cn/quantgroup/xyqb/controller/risk/LoginWhiteListController.java
View file @
263463a5
...
@@ -3,6 +3,8 @@ package cn.quantgroup.xyqb.controller.risk;
...
@@ -3,6 +3,8 @@ package cn.quantgroup.xyqb.controller.risk;
import
cn.quantgroup.xyqb.entity.enums.KeyType
;
import
cn.quantgroup.xyqb.entity.enums.KeyType
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.service.risk.LoginRiskService
;
import
cn.quantgroup.xyqb.service.risk.LoginRiskService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
...
@@ -17,6 +19,7 @@ import javax.annotation.Resource;
...
@@ -17,6 +19,7 @@ import javax.annotation.Resource;
* @modified By:
* @modified By:
* @version: 1.0
* @version: 1.0
*/
*/
@Api
(
tags
=
"登录白名单 API"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/login/risk"
)
@RequestMapping
(
"/login/risk"
)
...
@@ -24,6 +27,7 @@ public class LoginWhiteListController {
...
@@ -24,6 +27,7 @@ public class LoginWhiteListController {
@Resource
@Resource
private
LoginRiskService
loginRiskService
;
private
LoginRiskService
loginRiskService
;
@ApiOperation
(
value
=
"添加用户白名单val"
,
httpMethod
=
"POST"
,
notes
=
"添加用户白名单val"
)
@RequestMapping
(
value
=
"/add_white_list"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/add_white_list"
,
method
=
RequestMethod
.
POST
)
public
JsonResult
addWhiteList
(
String
val
,
KeyType
type
)
{
public
JsonResult
addWhiteList
(
String
val
,
KeyType
type
)
{
log
.
info
(
"添加用户白名单val:{},type:{}"
,
val
,
type
);
log
.
info
(
"添加用户白名单val:{},type:{}"
,
val
,
type
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/tenant/TenantController.java
View file @
263463a5
...
@@ -7,6 +7,8 @@ import cn.quantgroup.xyqb.service.user.IOauthClientDetailsService;
...
@@ -7,6 +7,8 @@ import cn.quantgroup.xyqb.service.user.IOauthClientDetailsService;
import
cn.quantgroup.xyqb.service.user.IProductLoginService
;
import
cn.quantgroup.xyqb.service.user.IProductLoginService
;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
cn.quantgroup.xyqb.util.TenantUtil
;
import
cn.quantgroup.xyqb.util.TenantUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
@@ -16,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -16,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
@Api
(
tags
=
"租户 API"
)
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/tenant"
)
@RequestMapping
(
"/tenant"
)
...
@@ -37,6 +40,7 @@ public class TenantController {
...
@@ -37,6 +40,7 @@ public class TenantController {
* @return
* @return
* @Yapi http://yapi.quantgroups.com/project/17/interface/api/30068
* @Yapi http://yapi.quantgroups.com/project/17/interface/api/30068
*/
*/
@ApiOperation
(
value
=
"根据用户ID查询租户列表"
,
httpMethod
=
"POST"
,
notes
=
"根据用户ID查询租户列表"
)
@PostMapping
(
"/userIdTenantList"
)
@PostMapping
(
"/userIdTenantList"
)
public
JsonResult
findTenantByUserId
(
Long
userId
)
{
public
JsonResult
findTenantByUserId
(
Long
userId
)
{
// 通过userId获取租户机构和产品
// 通过userId获取租户机构和产品
...
...
xyqb-user2.2021-11-21-0.log
deleted
100644 → 0
View file @
cb210887
This diff is collapsed.
Click to expand it.
xyqb-user2.log
deleted
100644 → 0
View file @
cb210887
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment