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
Show 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 @@
<artifactId>
SensorsAnalyticsSDK
</artifactId>
<version>
3.2.0
</version>
</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-boot-starter</artifactId>-->
<!-- <version>3.0.0</version>-->
<!-- </dependency>-->
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<version>
RELEASE
</version>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
knife4j-spring-boot-starter
</artifactId>
<version>
2.0.4
</version>
</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 -->
<dependency>
<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
;
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
//@EnableSwagger2
//@Configuration
@Configuration
@EnableSwagger2
public
class
SwaggerConfig
{
// @Value("${openapi.swagger.on:false}")
//// private Boolean swaggerOn;
////
//// @Bean
//// public Docket createRestApi() {
//// return new Docket(DocumentationType.SWAGGER_2)
//// .useDefaultResponseMessages(false)
//// .enable(swaggerOn)
//// .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();
//// }
@Bean
public
Docket
userRestApi
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
apiInfo
(
apiInfo
())
.
select
()
.
apis
(
RequestHandlerSelectors
.
basePackage
(
"cn.quantgroup.xyqb.controller"
))
.
paths
(
PathSelectors
.
any
())
.
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;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.model.UserAuthorizedParam
;
import
cn.quantgroup.xyqb.service.auth.IUserAuthorizedService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -13,6 +15,7 @@ import javax.annotation.Resource;
/**
* @author xufei on 2018/1/5.
*/
@Api
(
tags
=
"用户认证API"
)
@Slf4j
@RestController
@RequestMapping
(
"/user/auth"
)
...
...
@@ -24,6 +27,7 @@ public class UserAuthorizedController {
/**
* @Deprecated 20210317
*/
@ApiOperation
(
value
=
"废弃接口"
,
notes
=
"废弃接口"
)
@Deprecated
@RequestMapping
(
value
=
"/hasUserAuthorized"
)
public
JsonResult
hasUserAuthorized
(
String
idNo
)
{
...
...
@@ -38,6 +42,7 @@ public class UserAuthorizedController {
/**
* @Deprecated 20210317
*/
@ApiOperation
(
value
=
"废弃接口"
,
notes
=
"废弃接口"
)
@Deprecated
@RequestMapping
(
value
=
"/createUserAuthorized"
)
public
JsonResult
createUserAuthorized
(
UserAuthorizedParam
userAuthorizedParam
)
{
...
...
@@ -61,6 +66,7 @@ public class UserAuthorizedController {
/**
* @Deprecated 20210317
*/
@ApiOperation
(
value
=
"废弃接口"
,
notes
=
"废弃接口"
)
@Deprecated
@RequestMapping
(
value
=
"/getUserAuthorizedId"
)
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
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -11,12 +13,14 @@ import java.io.PrintWriter;
*/
@RestController
@RequestMapping
(
"/"
)
@Api
(
tags
=
"微信验证码API"
)
public
class
WechatVerifyController
{
/**
* @Deprecated 20210317
*/
@Deprecated
@ApiOperation
(
value
=
"废弃接口"
,
notes
=
"废弃接口"
)
@RequestMapping
(
"/MP_verify_AWiagUn4kZiwmTt0.txt"
)
public
void
verifyWechat
(
HttpServletResponse
response
)
throws
Exception
{
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;
import
cn.quantgroup.xyqb.util.TenantUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
com.alibaba.fastjson.JSON
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.codec.binary.Base64
;
...
...
@@ -51,6 +52,7 @@ import static cn.quantgroup.xyqb.Constants.VERIFICATION_CODE_FINITE_COUNT_NEW;
* Http服务接口:用户注册、登录、重置密码
* Created by FrankChow on 15/7/5.
*/
@Api
(
tags
=
"external user API"
)
@Slf4j
@RestController
@RequestMapping
(
"/user"
)
...
...
@@ -99,6 +101,7 @@ public class UserController implements IBaseController {
* @return
* @yapi unknown
*/
@ApiOperation
(
value
=
"登录(账号 + 密码)"
,
httpMethod
=
"POST"
,
notes
=
"登录(账号 + 密码)"
)
@LoginInterceptor
@CaptchaFiniteValidator
@RequestMapping
(
"/loginV1"
)
...
...
@@ -119,6 +122,7 @@ public class UserController implements IBaseController {
*
* @yapi http://yapi.quantgroups.com/project/17/interface/api/7310
*/
@ApiOperation
(
value
=
"慢速登陆"
,
httpMethod
=
"POST"
,
notes
=
"慢速登陆"
)
@PasswordErrorFiniteValidator
@RequestMapping
(
"/login"
)
public
JsonResult
login
(
...
...
@@ -155,6 +159,7 @@ public class UserController implements IBaseController {
* @return
* @yapi http://yapi.quantgroups.com/project/17/interface/api/1786
*/
@ApiOperation
(
value
=
"快速登录(手机号 + 短信验证码),H5专用入口"
,
httpMethod
=
"POST"
,
notes
=
"快速登录(手机号 + 短信验证码),H5专用入口"
)
@RequestMapping
(
"/login/fastV1"
)
public
JsonResult
loginFastV1
(
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
Long
channelId
,
String
appChannel
,
...
...
@@ -174,6 +179,7 @@ public class UserController implements IBaseController {
*
* @yapi http://yapi.quantgroups.com/project/17/interface/api/2066
*/
@ApiOperation
(
value
=
"快速登陆 - 同h5login代码实现一致"
,
httpMethod
=
"POST"
,
notes
=
"快速登陆 - 同h5login代码实现一致"
)
@LoginInterceptor
@RequestMapping
(
"/login/fast"
)
public
JsonResult
loginFast
(
...
...
@@ -258,6 +264,7 @@ public class UserController implements IBaseController {
* @return
* @yapi unknown
*/
@ApiOperation
(
value
=
"用户注册"
,
httpMethod
=
"POST"
,
notes
=
"用户注册"
)
@RequestMapping
(
"/register"
)
public
JsonResult
register
(
@RequestParam
String
phoneNo
,
@RequestParam
String
password
,
@RequestParam
String
verificationCode
,
@RequestParam
(
required
=
false
)
Long
channelId
,
...
...
@@ -304,6 +311,7 @@ public class UserController implements IBaseController {
* @yapi http://yapi.quantgroups.com/project/17/interface/api/2388
* @Deprecated 20210318
*/
@ApiOperation
(
value
=
"检查用户是否存在"
,
httpMethod
=
"POST"
,
notes
=
"检查用户是否存在"
)
@IpValidator
@RequestMapping
(
"/exist"
)
@Deprecated
...
...
@@ -324,6 +332,7 @@ public class UserController implements IBaseController {
* @yapi unknown
* @Deprecated 20210318
*/
@ApiOperation
(
value
=
"检查用户是否存在"
,
httpMethod
=
"POST"
,
notes
=
"检查用户是否存在"
)
@IpValidator
@RequestMapping
(
"/exist_check"
)
@Deprecated
...
...
@@ -341,6 +350,7 @@ public class UserController implements IBaseController {
* @return
* @yapi http://yapi.quantgroups.com/project/17/interface/api/3263
*/
@ApiOperation
(
value
=
"重置密码"
,
httpMethod
=
"POST"
,
notes
=
"重置密码"
)
@RequestMapping
(
"/reset_password"
)
public
JsonResult
resetPassword
(
@RequestParam
String
phoneNo
,
@RequestParam
String
password
,
...
...
@@ -377,6 +387,7 @@ public class UserController implements IBaseController {
* @yapi http://yapi.quantgroups.com/project/17/interface/api/3263
* @Deprecated 20210318, 仅有一次调用2021-03-15 00:38:57.752
*/
@ApiOperation
(
value
=
"重置密码"
,
httpMethod
=
"POST"
,
notes
=
"重置密码"
)
@Deprecated
@PasswordFreeAccessValidator
@RequestMapping
(
path
=
"/resetPassword"
,
method
=
RequestMethod
.
POST
)
...
...
@@ -420,6 +431,7 @@ public class UserController implements IBaseController {
* @return
* @yapi http://yapi.quantgroups.com/project/17/interface/api/4012
*/
@ApiOperation
(
value
=
"检查token是否已经过期不存在了"
,
httpMethod
=
"POST"
,
notes
=
"检查token是否已经过期不存在了"
)
@IpValidator
@RequestMapping
(
"/exists_token"
)
public
JsonResult
checkToken
(
@RequestParam
String
token
)
{
...
...
@@ -441,6 +453,7 @@ public class UserController implements IBaseController {
*
* @yapi http://yapi.quantgroups.com/project/17/interface/api/9191
*/
@ApiOperation
(
value
=
"获取 token 信息"
,
httpMethod
=
"POST"
,
notes
=
"获取 token 信息"
)
@RequestMapping
(
"/token"
)
public
JsonResult
token
(
@RequestParam
String
token
,
@RequestParam
(
required
=
false
)
Integer
tenantId
)
{
...
...
@@ -519,6 +532,7 @@ public class UserController implements IBaseController {
* @yapi unknown
* @Deprecated 20210318, 20210201-20210203有集中调用274次,其他时间没有
*/
@ApiOperation
(
value
=
"获取用户信息"
,
httpMethod
=
"GET"
,
notes
=
"获取用户信息"
)
@Deprecated
@RequestMapping
(
"/syncUserInfo"
)
public
JsonResult
syncUserInfo
(
HttpServletRequest
request
)
{
...
...
@@ -537,6 +551,7 @@ public class UserController implements IBaseController {
*
* @yapi http://yapi.quantgroups.com/project/17/interface/api/23661
*/
@ApiOperation
(
value
=
"登出接口"
,
httpMethod
=
"GET"
,
notes
=
"登出接口"
)
@RequestMapping
(
value
=
"/logout"
,
method
=
RequestMethod
.
GET
)
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;
import
cn.quantgroup.xyqb.service.user.IUserDetailService
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
cn.quantgroup.xyqb.validator.ChineseName
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -30,6 +31,7 @@ import java.util.Objects;
@RestController
@RequestMapping
(
"/user_detail"
)
@Validated
@Api
(
tags
=
"external 用户详情 API"
)
public
class
UserDetailController
implements
IBaseController
{
@Autowired
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/WeChatController.java
View file @
263463a5
...
...
@@ -18,6 +18,8 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.TypeReference
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.ImmutableList
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.codec.binary.Base64
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -43,6 +45,7 @@ import java.util.*;
/**
* Created by 11 on 2017/1/17.
*/
@Api
(
tags
=
"external wechat API"
)
@Slf4j
@RestController
@RequestMapping
(
"/wechat"
)
...
...
@@ -92,6 +95,7 @@ public class WeChatController implements IBaseController {
* @yapi unknown
* @Deprecated 20210318
*/
@ApiOperation
(
value
=
"开发者资质认证"
,
httpMethod
=
"GET"
,
notes
=
"开发者资质认证"
)
@Deprecated
@RequestMapping
(
"/checkValid"
)
public
String
valid
(
HttpServletRequest
request
)
{
...
...
@@ -173,6 +177,7 @@ public class WeChatController implements IBaseController {
* @return
* @yapi http://yapi.quantgroups.com/project/17/interface/api/14447
*/
@ApiOperation
(
value
=
"前端微信跳转页面,通过extdata"
,
httpMethod
=
"GET"
,
notes
=
"前端微信跳转页面,通过extdata"
)
@RequestMapping
(
"/receiveCode/extdata/{key}/{extdata}"
)
public
void
receiveCodeWithExtData
(
String
code
,
@PathVariable
(
value
=
"key"
)
String
systemKey
,
@PathVariable
(
value
=
"extdata"
)
String
extData
,
HttpServletResponse
response
)
{
...
...
@@ -284,6 +289,7 @@ public class WeChatController implements IBaseController {
* @yapi unknown
* @Deprecated 20210318
*/
@ApiOperation
(
value
=
"不知道干嘛的"
,
httpMethod
=
"POST"
,
notes
=
"不知道干嘛的"
)
@Deprecated
@RequestMapping
(
"/redirectForTest"
)
public
void
redirectForTest
(
String
redirect
,
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
MalformedURLException
{
...
...
@@ -322,6 +328,7 @@ public class WeChatController implements IBaseController {
* @return
* @yapi unknown
*/
@ApiOperation
(
value
=
"通过redirect_url获取code"
,
httpMethod
=
"POST"
,
notes
=
"通过redirect_url获取code"
)
@RequestMapping
(
"/receiveCode/{key}"
)
public
void
receiveCodeNoRedirect
(
String
code
,
@PathVariable
(
value
=
"key"
)
String
systemKey
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Long
registerFrom
=
null
;
...
...
@@ -411,6 +418,7 @@ public class WeChatController implements IBaseController {
}
}
@ApiOperation
(
value
=
"不知道干嘛的"
,
httpMethod
=
"GET"
,
notes
=
"不知道干嘛的"
)
@RequestMapping
(
"/active_redirect"
)
public
void
forwardWechatRequest
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
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;
* @author 李宁
* @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
@RestController
@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;
import
cn.quantgroup.xyqb.util.IpUtil
;
import
cn.quantgroup.xyqb.util.PasswordUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -25,6 +26,7 @@ import java.util.UUID;
/**
* @author xufei on 2018/1/30.
*/
@Api
(
tags
=
"新验证码API"
)
@Slf4j
@RestController
@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;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
...
...
@@ -27,6 +29,7 @@ import java.util.concurrent.TimeUnit;
* @version 1.0.0
* @since 2017-11-25
*/
@Api
(
tags
=
"LockIpv4 API"
)
@Slf4j
@RestController
@RequestMapping
(
"/lock"
)
...
...
@@ -44,6 +47,7 @@ public class LockIpv4Controller implements IBaseController {
* @return
* @header lock_ipv4 - 获取密令
*/
@ApiOperation
(
value
=
"获取操作密令"
,
httpMethod
=
"POST"
,
notes
=
"获取操作密令"
)
@RequestMapping
(
"/key"
)
public
JsonResult
key
(
@RequestParam
(
required
=
false
)
String
act
,
HttpServletRequest
request
)
{
//系统环境
...
...
@@ -69,6 +73,7 @@ public class LockIpv4Controller implements IBaseController {
* @param request
* @return
*/
@ApiOperation
(
value
=
"锁定/解锁特定IP"
,
httpMethod
=
"POST"
,
notes
=
"锁定/解锁特定IP"
)
@RequestMapping
(
"/lock_ipv4"
)
public
JsonResult
lockIpv4
(
@RequestParam
()
String
ip
,
@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;
import
cn.quantgroup.xyqb.service.page.IPageService
;
import
cn.quantgroup.xyqb.service.user.IUserDetailService
;
import
com.google.common.collect.ImmutableMap
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -20,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
/**
* Created by Miraculous on 2017/1/3.
*/
@Api
(
tags
=
"platform API"
)
@RestController
@RequestMapping
(
"/platform/api"
)
public
class
PlatformApiController
implements
IBaseController
{
...
...
@@ -31,6 +34,7 @@ public class PlatformApiController implements IBaseController {
@Autowired
private
IUserDetailService
userDetailService
;
@ApiOperation
(
value
=
"获取商户配置表的config_value"
,
httpMethod
=
"POST"
,
notes
=
"获取商户配置表的config_value"
)
@RequestMapping
(
"/page/return_url"
)
public
JsonResult
returnUrl
(
String
key
)
{
Merchant
merchant
=
merchantService
.
findMerchantByName
(
key
);
...
...
@@ -44,6 +48,7 @@ public class PlatformApiController implements IBaseController {
return
JsonResult
.
buildSuccessResult
(
""
,
config
.
getConfigValue
());
}
@ApiOperation
(
value
=
"不知道干嘛的"
,
httpMethod
=
"POST"
,
notes
=
"不知道干嘛的"
)
@RequestMapping
(
"/page/next"
)
public
JsonResult
nextPage
(
String
key
,
String
target
,
@RequestParam
(
required
=
false
,
defaultValue
=
""
)
String
currentPage
)
{
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;
import
cn.quantgroup.xyqb.util.DateUtils
;
import
cn.quantgroup.xyqb.util.IpUtil
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -28,6 +30,7 @@ import java.util.concurrent.TimeUnit;
/**
* Created by FrankChow on 15/7/6.
*/
@Api
(
tags
=
"external SMS API"
)
@Slf4j
@RestController
@RequestMapping
(
"/api/sms"
)
...
...
@@ -69,6 +72,7 @@ public class SmsController implements IBaseController {
* @param appName -
* @param smsMerchant - 短信模板/类型
*/
@ApiOperation
(
value
=
"短信验证码: for H5"
,
httpMethod
=
"POST"
,
notes
=
"短信验证码: for H5"
)
@CaptchaNewValidator
@RequestMapping
(
"/send_sms_verification_code"
)
public
JsonResult
verifyPhoneNoH5
(
@RequestParam
String
phoneNo
,
...
...
@@ -89,6 +93,7 @@ public class SmsController implements IBaseController {
* @param smsMerchant - 短信模板/类型
* @return
*/
@ApiOperation
(
value
=
"短信验证码:重置密码"
,
httpMethod
=
"POST"
,
notes
=
"短信验证码:重置密码"
)
@CaptchaNewValidator
@RequestMapping
(
"/send_reset_code"
)
public
JsonResult
resetPasswordH5
(
@RequestParam
String
phoneNo
,
...
...
@@ -104,6 +109,7 @@ public class SmsController implements IBaseController {
* 短信验证码: for H5
* 使用 @FPLock 注解并加入自定义限制参数, 做针对手机号的发送次数限制
*/
@ApiOperation
(
value
=
"短信验证码: for H5"
,
httpMethod
=
"POST"
,
notes
=
"短信验证码: for H5"
)
@CaptchaNewValidator
@RequestMapping
(
"/send_sms_verification_code_voice"
)
public
JsonResult
verifyPhoneNoH5New
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
...
...
@@ -117,6 +123,7 @@ public class SmsController implements IBaseController {
return
sendVerificationCode2Voice
(
phoneNo
,
randomCode
,
usage
);
}
@ApiOperation
(
value
=
"发送重置密码语音验证码"
,
httpMethod
=
"POST"
,
notes
=
"发送重置密码语音验证码"
)
@CaptchaNewValidator
@RequestMapping
(
"/send_reset_code_voice"
)
public
JsonResult
resetPasswordH5New
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
...
...
@@ -133,6 +140,7 @@ public class SmsController implements IBaseController {
/**
* 快速登陆发送验证码
*/
@ApiOperation
(
value
=
"快速登陆发送验证码"
,
httpMethod
=
"POST"
,
notes
=
"快速登陆发送验证码"
)
@CaptchaNewValidator
@RequestMapping
(
"/send_login_code_voice"
)
public
JsonResult
sendLoginCodeNew
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
...
...
@@ -153,6 +161,7 @@ public class SmsController implements IBaseController {
* @param appName -
* @param smsMerchant - 短信模板/类型
*/
@ApiOperation
(
value
=
"快速登陆发送验证码"
,
httpMethod
=
"POST"
,
notes
=
"快速登陆发送验证码"
)
@CaptchaNewValidator
@RequestMapping
(
"/send_login_code"
)
public
JsonResult
sendLoginCode
(
@RequestParam
String
phoneNo
,
...
...
@@ -171,6 +180,7 @@ public class SmsController implements IBaseController {
* @param appName -
* @param smsMerchant - 短信模板/类型
*/
@ApiOperation
(
value
=
"快速注册发送验证码"
,
httpMethod
=
"POST"
,
notes
=
"快速注册发送验证码"
)
@CaptchaNewValidator
@RequestMapping
(
"/send_regist_code"
)
public
JsonResult
sendRegistCode
(
@RequestParam
String
phoneNo
,
...
...
@@ -259,6 +269,7 @@ public class SmsController implements IBaseController {
/**
* 快速登陆发送验证码新版
*/
@ApiOperation
(
value
=
"快速登陆发送验证码新版"
,
httpMethod
=
"POST"
,
notes
=
"快速登陆发送验证码新版"
)
@CaptchaNewValidator
@RequestMapping
(
"/send_login_code_voice_new"
)
public
JsonResult
sendLoginCodeVoiceNew
(
@RequestParam
String
phoneNo
,
@RequestParam
(
required
=
false
)
String
registerFrom
,
...
...
@@ -281,6 +292,7 @@ public class SmsController implements IBaseController {
* @param appName -
* @param smsMerchant - 短信模板/类型
*/
@ApiOperation
(
value
=
"快速登陆发送短信验证码"
,
httpMethod
=
"POST"
,
notes
=
"快速登陆发送短信验证码"
)
@CaptchaNewValidator
@RequestMapping
(
"/send_login_code_new"
)
public
JsonResult
sendLoginSmsCodeNew
(
@RequestParam
String
phoneNo
,
...
...
@@ -302,6 +314,7 @@ public class SmsController implements IBaseController {
* @param appName -
* @param smsMerchant - 短信模板/类型
*/
@ApiOperation
(
value
=
"快速登陆发送短信验证码"
,
httpMethod
=
"POST"
,
notes
=
"快速登陆发送短信验证码"
)
@CaptchaNewValidator
@RequestMapping
(
"/send_login_code_new_forH5"
)
public
JsonResult
sendLoginSmsCodeNewForH5
(
@RequestParam
String
phoneNo
,
...
...
@@ -323,6 +336,7 @@ public class SmsController implements IBaseController {
* @param appName -
* @param smsMerchant - 短信模板/类型
*/
@ApiOperation
(
value
=
"VCC通用 - 发送短信验证码"
,
httpMethod
=
"POST"
,
notes
=
"VCC通用 - 发送短信验证码"
)
@CaptchaNewValidator
@RequestMapping
(
"/send_vcc_sms_code"
)
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;
import
cn.quantgroup.xyqb.model.session.SessionStruct
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -20,11 +22,13 @@ import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping
(
"/auth"
)
@Slf4j
@Api
(
tags
=
"internal 查询已登录信息 API"
)
public
class
AuthInfoController
implements
IBaseController
{
/**
* @yapi unknown
*/
@ApiOperation
(
value
=
"查询已登录信息"
,
httpMethod
=
"GET"
,
notes
=
"查询已登录信息"
)
@RequestMapping
(
"/info/login"
)
public
JsonResult
loginInfo
(
HttpServletRequest
request
)
{
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;
import
cn.quantgroup.xyqb.exception.UserQueryLogException
;
import
cn.quantgroup.xyqb.util.encrypt.Rsa
;
import
io.swagger.annotations.Api
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.hssf.usermodel.*
;
...
...
@@ -46,6 +47,7 @@ import cn.quantgroup.xyqb.util.encrypt.Md5Util;
@Slf4j
@RestController
@RequestMapping
(
"/query"
)
@Api
(
tags
=
"internal 用户查询日志 API"
)
public
class
UserQueryLogController
{
@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;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
com.sensorsdata.analytics.javasdk.ISensorsAnalytics
;
import
com.sensorsdata.analytics.javasdk.bean.EventRecord
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -44,6 +45,7 @@ import static cn.quantgroup.xyqb.constant.UserConstant.USER_ERROR_OR_PASSWORD_ER
* @author mengfan.feng
* @time 2015-10-27 11:41
*/
@Api
(
tags
=
"第三方用户免密登录 API"
)
@Slf4j
@RestController
@RequestMapping
(
"/app"
)
...
...
@@ -60,6 +62,7 @@ public class AppController implements IBaseController {
@Autowired
private
IUserRegisterService
userRegisterService
;
@ApiOperation
(
value
=
"app 认证登录"
,
httpMethod
=
"POST"
,
notes
=
"app 认证登录"
)
@IpValidator
@AuthorizationPoint
@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 {
* @param userId 用户id
* @return 销户结果
*/
@GetMapping
(
"/user/
cancellation
/{userId}"
)
public
JsonResult
<?>
cancellation
(
@NotNull
@PathVariable
(
"userId"
)
Long
userId
)
{
@GetMapping
(
"/user/
delete
/{userId}"
)
public
JsonResult
<?>
delete
(
@NotNull
@PathVariable
(
"userId"
)
Long
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;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
io.swagger.annotations.Api
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -34,6 +35,7 @@ import cn.quantgroup.xyqb.validator.ChineseName;
* 同步用户数据,第三方模块访问时
* Created by Miraculous on 15/12/29.
*/
@Api
(
tags
=
"同步用户数据 API"
)
@Slf4j
@RestController
@RequestMapping
(
"/api/sync"
)
...
...
@@ -118,6 +120,7 @@ public class SyncUserController {
return
JsonResult
.
buildSuccessResult
(
null
,
userModel
);
}
@ApiOperation
(
value
=
"通过uuid拉取用户"
,
httpMethod
=
"POST"
,
notes
=
"通过uuid拉取用户"
)
@RequestMapping
(
"/user_uuid"
)
public
JsonResult
fetchUserByUuid
(
String
key
,
String
uuid
)
{
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;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
cn.quantgroup.xyqb.session.XyqbSessionContextHolder
;
import
cn.quantgroup.xyqb.util.ValidationUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -25,6 +26,7 @@ import java.util.Objects;
/**
* Created by FrankChow on 15/12/16.
*/
@Api
(
tags
=
"用户 API"
)
@Slf4j
@RestController
@RequestMapping
(
"/api"
)
...
...
@@ -40,6 +42,7 @@ public class UserApiController {
@Resource
private
ISmsService
smsService
;
@ApiOperation
(
value
=
"是否设置了密码"
,
httpMethod
=
"POST"
,
notes
=
"是否设置了密码"
)
@RequestMapping
(
"/user/is_passwd_set"
)
public
JsonResult
isPasswordSet
(
String
phoneNo
)
{
if
(
StringUtils
.
isEmpty
(
phoneNo
))
{
...
...
@@ -110,6 +113,7 @@ public class UserApiController {
* @param phoneNo
* @param verificationCode
*/
@ApiOperation
(
value
=
"校验短信验证码"
,
httpMethod
=
"POST"
,
notes
=
"校验短信验证码"
)
@IpValidator
@RequestMapping
(
value
=
"/verifyPhoneAndCode"
,
method
=
RequestMethod
.
POST
)
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.*;
import
cn.quantgroup.xyqb.util.TenantUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -26,6 +27,7 @@ import java.util.Map;
/**
* Created by 11 on 2017/3/22.
*/
@Api
(
tags
=
"internal UserCenter API"
)
@Slf4j
@RestController
@RequestMapping
(
"/user/center"
)
...
...
@@ -46,6 +48,7 @@ public class UserCenterController {
@Autowired
private
ApplicationEventPublisher
applicationEventPublisher
;
@ApiOperation
(
value
=
"获取用户附加信息"
,
httpMethod
=
"GET"
,
notes
=
"获取用户附加信息"
)
@GetMapping
(
"/attach"
)
public
JsonResult
queryUserAttach
(
Long
userId
)
{
if
(
userId
==
null
)
{
...
...
@@ -60,6 +63,7 @@ public class UserCenterController {
* @param userIds
* @return
*/
@ApiOperation
(
value
=
"获取用户附加信息集合"
,
httpMethod
=
"POST"
,
notes
=
"获取用户附加信息集合"
)
@PostMapping
(
"/attach/list"
)
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;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.service.middleoffice.applet.IAppletService
;
import
com.alibaba.fastjson.JSON
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -22,6 +24,7 @@ import java.util.Arrays;
* @modified By:
* @version: 1.0
*/
@Api
(
tags
=
"middle_office 小程序 API"
)
@Slf4j
@RestController
@RequestMapping
(
"/middle_office/applet"
)
...
...
@@ -45,6 +48,7 @@ public class AppletController {
/**
* @return
*/
@ApiOperation
(
value
=
"小程序关联"
,
httpMethod
=
"POST"
,
notes
=
"小程序关联"
)
@PostMapping
(
"/relevance"
)
public
JsonResult
relevance
(
@Validated
@RequestBody
AppletParamEntry
appletParamEntry
)
{
if
(!
containsAppName
(
appletParamEntry
.
getAppName
()))
{
...
...
@@ -62,9 +66,10 @@ public class AppletController {
/**
* @return
*/
@ApiOperation
(
value
=
"登录"
,
httpMethod
=
"POST"
,
notes
=
"登录"
)
@Validated
@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
))
{
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;
import
cn.quantgroup.xyqb.model.Tuple
;
import
cn.quantgroup.xyqb.service.user.IContactService
;
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.PatchMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -23,6 +25,7 @@ import java.util.stream.Collectors;
/**
* 联系人
*/
@Api
(
tags
=
"middle_office 联系人 API"
)
@RestController
@RequestMapping
(
"/middle_office/contacts"
)
public
class
ContactController
{
...
...
@@ -37,6 +40,7 @@ public class ContactController {
* @param bizType 业务类型
* @return
*/
@ApiOperation
(
value
=
"获取联系人"
,
httpMethod
=
"GET"
,
notes
=
"获取联系人"
)
@GetMapping
public
JsonResult
get
(
Long
userId
,
BizType
bizType
)
{
List
<
Contact
>
contactList
=
contactService
.
findByUserIdAndBizType
(
userId
,
bizType
,
true
);
...
...
@@ -49,6 +53,7 @@ public class ContactController {
* @param contactUpdateDtoList
* @return
*/
@ApiOperation
(
value
=
"更新联系人信息"
,
httpMethod
=
"PATCH"
,
notes
=
"更新联系人信息"
)
@PatchMapping
public
JsonResult
update
(
@RequestBody
List
<
ContactUpdateDto
>
contactUpdateDtoList
)
{
contactUpdateDtoList
=
contactUpdateDtoList
.
stream
()
...
...
@@ -70,6 +75,7 @@ public class ContactController {
*
* @return
*/
@ApiOperation
(
value
=
"新增联系人"
,
httpMethod
=
"POST"
,
notes
=
"新增联系人"
)
@PostMapping
public
JsonResult
save
(
@RequestBody
ContactSaveDto
contactSaveDto
)
{
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;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.service.captcha.IGeetestCaptchaService
;
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.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -21,6 +23,7 @@ import java.util.Objects;
/**
* 图形验证码
*/
@Api
(
tags
=
"middle_office 图形验证码 API"
)
@RestController
@RequestMapping
(
"/middle_office/image"
)
public
class
ImageController
{
...
...
@@ -35,6 +38,7 @@ public class ImageController {
private
Boolean
geetestClose
;
@ApiOperation
(
value
=
"图形验证码"
,
httpMethod
=
"GET"
,
notes
=
"图形验证码"
)
@GetMapping
public
JsonResult
image
(
String
userIp
,
String
clientType
,
String
phoneNo
)
{
Locale
locale
=
Locale
.
CHINA
;
...
...
@@ -66,6 +70,7 @@ public class ImageController {
*
* @return
*/
@ApiOperation
(
value
=
"验证图形验证码"
,
httpMethod
=
"POST"
,
notes
=
"验证图形验证码"
)
@PostMapping
(
"/verify/{type}"
)
public
JsonResult
verifyGT
(
@PathVariable
ImageVerifyTypeEnum
type
,
@RequestBody
ImageDTO
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;
import
cn.quantgroup.xyqb.controller.middleoffice.common.VerifyTypeEnum
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -10,6 +12,7 @@ import javax.annotation.Resource;
/**
* 注册与登陆
*/
@Api
(
tags
=
"middle_office 注册与登录 API"
)
@Slf4j
@RestController
@RequestMapping
(
"/middle_office/login"
)
...
...
@@ -19,6 +22,7 @@ public class LoginController {
private
ILoginModule
loginModule
;
@ApiOperation
(
value
=
"loginFreeAuto"
,
httpMethod
=
"POST"
,
notes
=
"loginFreeAuto"
)
@PostMapping
(
"/{type}"
)
public
JsonResult
loginFreeAuto
(
@PathVariable
VerifyTypeEnum
type
,
@RequestParam
(
required
=
false
,
defaultValue
=
"false"
)
Boolean
autoReg
,
...
...
@@ -32,12 +36,14 @@ public class LoginController {
return
JsonResult
.
buildSuccessResultGeneric
(
login
);
}
@ApiOperation
(
value
=
"通过密码修改密码"
,
httpMethod
=
"PATCH"
,
notes
=
"通过密码修改密码"
)
@PatchMapping
(
"/modify/pwd"
)
public
JsonResult
modifyByPwd
(
String
phoneNo
,
String
password
,
String
passwordNew
)
{
loginModule
.
modifyPwd
(
VerifyTypeEnum
.
pwd
,
phoneNo
,
password
,
passwordNew
);
return
JsonResult
.
buildSuccessResult
();
}
@ApiOperation
(
value
=
"通过短信修改密码"
,
httpMethod
=
"PATCH"
,
notes
=
"通过短信修改密码"
)
@PatchMapping
(
"/modify/sms"
)
public
JsonResult
modifyBySms
(
String
phoneNo
,
String
password
,
String
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;
import
cn.quantgroup.xyqb.controller.middleoffice.common.image.ImageVerifyStrategyFactory
;
import
cn.quantgroup.xyqb.controller.middleoffice.common.image.ImageVerifyTypeEnum
;
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.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -15,6 +17,7 @@ import javax.annotation.Resource;
/**
* 短信
*/
@Api
(
tags
=
"middle_office 短信 API"
)
@RestController
(
"middleSmsController"
)
@RequestMapping
(
"/middle_office/sms"
)
public
class
SmsController
{
...
...
@@ -23,6 +26,7 @@ public class SmsController {
private
cn
.
quantgroup
.
xyqb
.
controller
.
external
.
sms
.
SmsController
smsController
;
@ApiOperation
(
value
=
"获取短信验证码"
,
httpMethod
=
"GET"
,
notes
=
"获取短信验证码"
)
@GetMapping
public
JsonResult
sms
(
SmsDTO
sms
,
ImageVerifyTypeEnum
verifyType
,
...
...
@@ -39,6 +43,7 @@ public class SmsController {
sms
.
getAppName
(),
sms
.
getSmsMerchant
());
}
@ApiOperation
(
value
=
"重置密码获取短信验证码"
,
httpMethod
=
"GET"
,
notes
=
"重置密码获取短信验证码"
)
@PostMapping
(
"/resetpwd"
)
public
JsonResult
resetpwd
(
SmsDTO
sms
,
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;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
cn.quantgroup.xyqb.util.TenantUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.ApplicationEventPublisher
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -18,6 +20,7 @@ import java.util.Map;
* 用户信息
*/
@Slf4j
@Api
(
tags
=
"middle_office 用户信息API"
)
@RestController
(
"middleUserController"
)
@RequestMapping
(
"/middle_office/user"
)
public
class
UserController
{
...
...
@@ -28,6 +31,7 @@ public class UserController {
@Resource
private
ApplicationEventPublisher
applicationEventPublisher
;
@ApiOperation
(
value
=
"根据userId启用用户"
,
httpMethod
=
"PUT"
,
notes
=
"根据userId启用用户"
)
@PutMapping
(
"/enable/{userId}"
)
public
JsonResult
enable
(
@PathVariable
Long
userId
)
{
User
user
=
userService
.
findById
(
userId
);
...
...
@@ -45,6 +49,7 @@ public class UserController {
return
JsonResult
.
buildSuccessResult
();
}
@ApiOperation
(
value
=
"根据userId禁用用户"
,
httpMethod
=
"PUT"
,
notes
=
"根据userId禁用用户"
)
@PutMapping
(
"/disable/{userId}"
)
public
JsonResult
disable
(
@PathVariable
Long
userId
)
{
User
user
=
userService
.
findById
(
userId
);
...
...
@@ -64,6 +69,7 @@ public class UserController {
return
JsonResult
.
buildSuccessResult
();
}
@ApiOperation
(
value
=
"根据userId查询用户信息"
,
httpMethod
=
"GET"
,
notes
=
"根据userId查询用户信息"
)
@GetMapping
(
"/userId/{userId}"
)
public
JsonResult
user
(
@PathVariable
Long
userId
)
{
User
user
=
userService
.
findById
(
userId
);
...
...
@@ -72,6 +78,7 @@ public class UserController {
}
@ApiOperation
(
value
=
"根据phoneNo查询用户信息"
,
httpMethod
=
"GET"
,
notes
=
"根据phoneNo查询用户信息"
)
@GetMapping
(
"/phoneNo/{phoneNo}"
)
public
JsonResult
user
(
@PathVariable
String
phoneNo
)
{
User
user
=
userService
.
findByPhoneInDb
(
phoneNo
);
...
...
@@ -79,6 +86,7 @@ public class UserController {
return
JsonResult
.
buildSuccessResultGeneric
(
user
);
}
@ApiOperation
(
value
=
"根据uuid查询用户信息"
,
httpMethod
=
"GET"
,
notes
=
"根据uuid查询用户信息"
)
@GetMapping
(
"/uuid/{uuid}"
)
public
JsonResult
uuid
(
@PathVariable
String
uuid
)
{
User
user
=
userService
.
findByUuidWithCache
(
uuid
);
...
...
@@ -92,6 +100,7 @@ public class UserController {
* @param params
* @return
*/
@ApiOperation
(
value
=
"根据uuid或者userids 获取用户信息"
,
httpMethod
=
"POST"
,
notes
=
"根据uuid或者userids 获取用户信息"
)
@PostMapping
(
"/getByUuidsOrUserIds"
)
public
JsonResult
getByUuidsOrUserIds
(
@RequestBody
Map
<
String
,
Object
>
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;
import
cn.quantgroup.xyqb.service.auth.IIdCardService
;
import
cn.quantgroup.xyqb.service.user.IUserDetailService
;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -21,6 +23,7 @@ import java.sql.Timestamp;
* 用户实名信息
*/
@Slf4j
@Api
(
tags
=
"middle_office 用户详情API"
)
@RestController
(
"middleUserDetailController"
)
@RequestMapping
(
"/middle_office/user_detail"
)
public
class
UserDetailController
{
...
...
@@ -41,6 +44,7 @@ public class UserDetailController {
* @param userDetailReq
* @return
*/
@ApiOperation
(
value
=
"修改用户实名信息"
,
httpMethod
=
"PUT"
,
notes
=
"修改用户实名信息"
)
@PutMapping
(
"/{userId}"
)
public
JsonResult
update
(
@PathVariable
Long
userId
,
@Valid
@RequestBody
UserDetailReq
userDetailReq
)
{
...
...
@@ -63,6 +67,7 @@ public class UserDetailController {
* @param userDetailReq
* @return
*/
@ApiOperation
(
value
=
"保存用户实名信息"
,
httpMethod
=
"POST"
,
notes
=
"保存用户实名信息"
)
@PostMapping
(
"/{userId}"
)
public
JsonResult
save
(
@PathVariable
Long
userId
,
@Valid
@RequestBody
UserDetailReq
userDetailReq
)
{
...
...
@@ -91,6 +96,7 @@ public class UserDetailController {
* @param userId
* @return
*/
@ApiOperation
(
value
=
"根据用户 ID,查询实名信息"
,
httpMethod
=
"GET"
,
notes
=
"根据用户 ID,查询实名信息"
)
@GetMapping
(
"/userId/{userId}"
)
public
JsonResult
query
(
@PathVariable
Long
userId
)
{
UserDetail
userDetail
=
userDetailService
.
findByUserId
(
userId
);
...
...
@@ -103,6 +109,7 @@ public class UserDetailController {
* @param phoneNo
* @return
*/
@ApiOperation
(
value
=
"根据手机号,查询实名信息"
,
httpMethod
=
"GET"
,
notes
=
"根据手机号,查询实名信息"
)
@GetMapping
(
"/phoneNo/{phoneNo}"
)
public
JsonResult
query
(
@PathVariable
String
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;
import
cn.quantgroup.xyqb.service.user.IUserDetailService
;
import
cn.quantgroup.xyqb.service.user.IUserExtInfoService
;
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.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationEventPublisher
;
...
...
@@ -31,6 +33,7 @@ import java.util.Map;
/**
* 用户扩展信息
*/
@Api
(
tags
=
"middle_office 用户扩展信息 API"
)
@RestController
@RequestMapping
(
"/middle_office/user/ext"
)
public
class
UserExtController
{
...
...
@@ -54,6 +57,7 @@ public class UserExtController {
private
ApplicationEventPublisher
applicationEventPublisher
;
//todo 保存失败的各种场景。
@ApiOperation
(
value
=
"保存/更新用户扩展信息"
,
httpMethod
=
"PUT"
,
notes
=
"更新用户扩展信息"
)
@PutMapping
(
"/{userId}"
)
public
JsonResult
ext
(
@PathVariable
Long
userId
,
@RequestBody
UserExtReq
userExtReq
)
{
if
(
userExtReq
.
getEmail
()
!=
null
)
{
...
...
@@ -92,6 +96,7 @@ public class UserExtController {
return
JsonResult
.
buildSuccessResult
();
}
@ApiOperation
(
value
=
"根据userId获取用户扩展信息"
,
httpMethod
=
"GET"
,
notes
=
"根据userId获取用户扩展信息"
)
@GetMapping
(
"/userId/{userId}"
)
public
JsonResult
query
(
@PathVariable
Long
userId
,
@RequestParam
(
defaultValue
=
"false"
)
Boolean
address
,
...
...
@@ -110,6 +115,7 @@ public class UserExtController {
return
JsonResult
.
buildSuccessResultGeneric
(
result
);
}
@ApiOperation
(
value
=
"根据手机号获取用户扩展信息"
,
httpMethod
=
"GET"
,
notes
=
"根据手机号获取用户扩展信息"
)
@GetMapping
(
"/phoneNo/{phoneNo}"
)
public
JsonResult
query
(
@PathVariable
String
phoneNo
,
@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;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
cn.quantgroup.xyqb.service.wechat.IWechatService
;
import
cn.quantgroup.xyqb.util.TenantUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -17,6 +19,7 @@ import javax.annotation.Resource;
/**
* 微信
*/
@Api
(
tags
=
"middle_office-微信 API"
)
@Slf4j
@RestController
@RequestMapping
(
"/middle_office/wx"
)
...
...
@@ -37,6 +40,7 @@ public class WxController {
* @param userId
* @return
*/
@ApiOperation
(
value
=
"根据userId查询openId"
,
httpMethod
=
"GET"
,
notes
=
"根据userId查询openId"
)
@GetMapping
(
"/userId/{userId}"
)
public
JsonResult
openId
(
@PathVariable
Long
userId
,
@RequestParam
(
required
=
false
)
Integer
tenantId
)
{
//默认羊小咩租户
...
...
@@ -69,6 +73,7 @@ public class WxController {
* @param tenantId
* @return
*/
@ApiOperation
(
value
=
"根据userId和appName查询openId"
,
httpMethod
=
"GET"
,
notes
=
"根据userId和appName查询openId"
)
@GetMapping
(
"/userId/{userId}/{appName}"
)
public
JsonResult
openId
(
@PathVariable
Long
userId
,
@PathVariable
String
appName
,
@RequestParam
(
required
=
false
)
Integer
tenantId
)
{
//默认羊小咩租户
...
...
@@ -101,6 +106,7 @@ public class WxController {
* @param phoneNo
* @return
*/
@ApiOperation
(
value
=
"根据phoneNo查询openId"
,
httpMethod
=
"GET"
,
notes
=
"根据phoneNo查询openId"
)
@GetMapping
(
"/phoneNo/{phoneNo}"
)
public
JsonResult
openId
(
@PathVariable
String
phoneNo
,
@RequestParam
(
required
=
false
)
Integer
tenantId
)
{
if
(
TenantUtil
.
validationTenantIdIsNullOrZero
(
tenantId
))
{
...
...
@@ -130,6 +136,7 @@ public class WxController {
//todo
}
@ApiOperation
(
value
=
"取消微信关联"
,
httpMethod
=
"PATCH"
,
notes
=
"取消微信关联"
)
@PatchMapping
(
"/forbidden/{userId}"
)
public
JsonResult
forbidden
(
@PathVariable
Long
userId
,
String
reason
)
{
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 {
@Resource
private
IModifyPhoneNoService
modifyPhoneNoService
;
@ApiOperation
(
"app - 查询用户手机号修改进度
"
)
@ApiOperation
(
value
=
"app - 查询用户手机号修改进度"
,
httpMethod
=
"GET
"
)
@GetMapping
(
"/progress"
)
public
JsonResult
<
ProgressResp
>
progress
()
{
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;
import
cn.quantgroup.xyqb.entity.enums.KeyType
;
import
cn.quantgroup.xyqb.model.JsonResult
;
import
cn.quantgroup.xyqb.service.risk.LoginRiskService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
...
...
@@ -17,6 +19,7 @@ import javax.annotation.Resource;
* @modified By:
* @version: 1.0
*/
@Api
(
tags
=
"登录白名单 API"
)
@Slf4j
@RestController
@RequestMapping
(
"/login/risk"
)
...
...
@@ -24,6 +27,7 @@ public class LoginWhiteListController {
@Resource
private
LoginRiskService
loginRiskService
;
@ApiOperation
(
value
=
"添加用户白名单val"
,
httpMethod
=
"POST"
,
notes
=
"添加用户白名单val"
)
@RequestMapping
(
value
=
"/add_white_list"
,
method
=
RequestMethod
.
POST
)
public
JsonResult
addWhiteList
(
String
val
,
KeyType
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;
import
cn.quantgroup.xyqb.service.user.IProductLoginService
;
import
cn.quantgroup.xyqb.service.user.IUserService
;
import
cn.quantgroup.xyqb.util.TenantUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -16,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
import
java.util.ArrayList
;
import
java.util.List
;
@Api
(
tags
=
"租户 API"
)
@Slf4j
@RestController
@RequestMapping
(
"/tenant"
)
...
...
@@ -37,6 +40,7 @@ public class TenantController {
* @return
* @Yapi http://yapi.quantgroups.com/project/17/interface/api/30068
*/
@ApiOperation
(
value
=
"根据用户ID查询租户列表"
,
httpMethod
=
"POST"
,
notes
=
"根据用户ID查询租户列表"
)
@PostMapping
(
"/userIdTenantList"
)
public
JsonResult
findTenantByUserId
(
Long
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