记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
董敬伟
liquidnet-bus-v1
Commits
85c9c89e
Commit
85c9c89e
authored
Sep 02, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swagger api调整;
parent
86a55247
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
179 additions
and
234 deletions
+179
-234
TestController.java
...dnet/client/admin/web/controller/tool/TestController.java
+175
-175
AdamSwitchAdminController.java
...b/controller/zhengzai/adam/AdamSwitchAdminController.java
+0
-56
AdamUserMemberAdminController.java
...ntroller/zhengzai/adam/AdamUserMemberAdminController.java
+1
-1
KylinOrderRefundAdminController.java
...oller/zhengzai/kylin/KylinOrderRefundAdminController.java
+2
-1
OrderSwitchAdminController.java
...controller/zhengzai/order/OrderSwitchAdminController.java
+1
-1
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/tool/TestController.java
View file @
85c9c89e
package
com
.
liquidnet
.
client
.
admin
.
web
.
controller
.
tool
;
//
package com.liquidnet.client.admin.web.controller.tool;
//
import
java.util.ArrayList
;
//
import java.util.ArrayList;
import
java.util.LinkedHashMap
;
//
import java.util.LinkedHashMap;
import
java.util.List
;
//
import java.util.List;
import
java.util.Map
;
//
import java.util.Map;
import
org.springframework.web.bind.annotation.DeleteMapping
;
//
import org.springframework.web.bind.annotation.DeleteMapping;
import
org.springframework.web.bind.annotation.GetMapping
;
//
import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.PathVariable
;
//
import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.PostMapping
;
//
import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.PutMapping
;
//
import org.springframework.web.bind.annotation.PutMapping;
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;
import
com.liquidnet.client.admin.common.core.controller.BaseController
;
//
import com.liquidnet.client.admin.common.core.controller.BaseController;
import
com.liquidnet.client.admin.common.core.domain.AjaxResult
;
//
import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import
com.liquidnet.client.admin.common.utils.StringUtils
;
//
import com.liquidnet.client.admin.common.utils.StringUtils;
import
io.swagger.annotations.Api
;
//
import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiImplicitParam
;
//
import io.swagger.annotations.ApiImplicitParam;
import
io.swagger.annotations.ApiModel
;
//
import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
//
import io.swagger.annotations.ApiModelProperty;
import
io.swagger.annotations.ApiOperation
;
//
import io.swagger.annotations.ApiOperation;
//
/**
/
//
**
* swagger 用户测试方法
//
* swagger 用户测试方法
*
// *
* @author ruoyi
//
* @author ruoyi
*/
//
*/
@Api
(
"用户信息管理"
)
//
@Api("用户信息管理")
@RestController
//
@RestController
@RequestMapping
(
"/test/user"
)
//
@RequestMapping("/test/user")
public
class
TestController
extends
BaseController
//
public class TestController extends BaseController
{
//
{
private
final
static
Map
<
Integer
,
UserEntity
>
users
=
new
LinkedHashMap
<
Integer
,
UserEntity
>();
//
private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>();
{
//
{
users
.
put
(
1
,
new
UserEntity
(
1
,
"admin"
,
"admin123"
,
"15888888888"
));
//
users.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
users
.
put
(
2
,
new
UserEntity
(
2
,
"ry"
,
"admin123"
,
"15666666666"
));
//
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
}
//
}
//
@ApiOperation
(
"获取用户列表"
)
//
@ApiOperation("获取用户列表")
@GetMapping
(
"/list"
)
//
@GetMapping("/list")
public
AjaxResult
userList
()
//
public AjaxResult userList()
{
//
{
List
<
UserEntity
>
userList
=
new
ArrayList
<
UserEntity
>(
users
.
values
());
//
List<UserEntity> userList = new ArrayList<UserEntity>(users.values());
return
AjaxResult
.
success
(
userList
);
//
return AjaxResult.success(userList);
}
//
}
//
@ApiOperation
(
"获取用户详细"
)
//
@ApiOperation("获取用户详细")
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户ID"
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"path"
)
//
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path")
@GetMapping
(
"/{userId}"
)
//
@GetMapping("/{userId}")
public
AjaxResult
getUser
(
@PathVariable
Integer
userId
)
//
public AjaxResult getUser(@PathVariable Integer userId)
{
//
{
if
(!
users
.
isEmpty
()
&&
users
.
containsKey
(
userId
))
//
if (!users.isEmpty() && users.containsKey(userId))
{
//
{
return
AjaxResult
.
success
(
users
.
get
(
userId
));
//
return AjaxResult.success(users.get(userId));
}
//
}
else
//
else
{
//
{
return
error
(
"用户不存在"
);
//
return error("用户不存在");
}
//
}
}
//
}
//
@ApiOperation
(
"新增用户"
)
//
@ApiOperation("新增用户")
@ApiImplicitParam
(
name
=
"userEntity"
,
value
=
"新增用户信息"
,
dataType
=
"UserEntity"
)
//
@ApiImplicitParam(name = "userEntity", value = "新增用户信息", dataType = "UserEntity")
@PostMapping
(
"/save"
)
//
@PostMapping("/save")
public
AjaxResult
save
(
UserEntity
user
)
//
public AjaxResult save(UserEntity user)
{
//
{
if
(
StringUtils
.
isNull
(
user
)
||
StringUtils
.
isNull
(
user
.
getUserId
()))
//
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
{
//
{
return
error
(
"用户ID不能为空"
);
//
return error("用户ID不能为空");
}
//
}
return
AjaxResult
.
success
(
users
.
put
(
user
.
getUserId
(),
user
));
//
return AjaxResult.success(users.put(user.getUserId(), user));
}
//
}
//
@ApiOperation
(
"更新用户"
)
//
@ApiOperation("更新用户")
@ApiImplicitParam
(
name
=
"userEntity"
,
value
=
"新增用户信息"
,
dataType
=
"UserEntity"
)
//
@ApiImplicitParam(name = "userEntity", value = "新增用户信息", dataType = "UserEntity")
@PutMapping
(
"/update"
)
//
@PutMapping("/update")
public
AjaxResult
update
(
UserEntity
user
)
//
public AjaxResult update(UserEntity user)
{
//
{
if
(
StringUtils
.
isNull
(
user
)
||
StringUtils
.
isNull
(
user
.
getUserId
()))
//
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
{
//
{
return
error
(
"用户ID不能为空"
);
//
return error("用户ID不能为空");
}
//
}
if
(
users
.
isEmpty
()
||
!
users
.
containsKey
(
user
.
getUserId
()))
//
if (users.isEmpty() || !users.containsKey(user.getUserId()))
{
//
{
return
error
(
"用户不存在"
);
//
return error("用户不存在");
}
//
}
users
.
remove
(
user
.
getUserId
());
//
users.remove(user.getUserId());
return
AjaxResult
.
success
(
users
.
put
(
user
.
getUserId
(),
user
));
//
return AjaxResult.success(users.put(user.getUserId(), user));
}
//
}
//
@ApiOperation
(
"删除用户信息"
)
//
@ApiOperation("删除用户信息")
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户ID"
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"path"
)
//
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path")
@DeleteMapping
(
"/{userId}"
)
//
@DeleteMapping("/{userId}")
public
AjaxResult
delete
(
@PathVariable
Integer
userId
)
//
public AjaxResult delete(@PathVariable Integer userId)
{
//
{
if
(!
users
.
isEmpty
()
&&
users
.
containsKey
(
userId
))
//
if (!users.isEmpty() && users.containsKey(userId))
{
//
{
users
.
remove
(
userId
);
//
users.remove(userId);
return
success
();
//
return success();
}
//
}
else
//
else
{
//
{
return
error
(
"用户不存在"
);
//
return error("用户不存在");
}
//
}
}
//
}
}
//
}
//
@ApiModel
(
"用户实体"
)
//
@ApiModel("用户实体")
class
UserEntity
//
class UserEntity
{
//
{
@ApiModelProperty
(
"用户ID"
)
//
@ApiModelProperty("用户ID")
private
Integer
userId
;
//
private Integer userId;
//
@ApiModelProperty
(
"用户名称"
)
//
@ApiModelProperty("用户名称")
private
String
username
;
//
private String username;
//
@ApiModelProperty
(
"用户密码"
)
//
@ApiModelProperty("用户密码")
private
String
password
;
//
private String password;
//
@ApiModelProperty
(
"用户手机"
)
//
@ApiModelProperty("用户手机")
private
String
mobile
;
//
private String mobile;
//
public
UserEntity
()
//
public UserEntity()
{
//
{
//
}
//
}
//
public
UserEntity
(
Integer
userId
,
String
username
,
String
password
,
String
mobile
)
//
public UserEntity(Integer userId, String username, String password, String mobile)
{
//
{
this
.
userId
=
userId
;
//
this.userId = userId;
this
.
username
=
username
;
//
this.username = username;
this
.
password
=
password
;
//
this.password = password;
this
.
mobile
=
mobile
;
//
this.mobile = mobile;
}
//
}
//
public
Integer
getUserId
()
//
public Integer getUserId()
{
//
{
return
userId
;
//
return userId;
}
//
}
//
public
void
setUserId
(
Integer
userId
)
//
public void setUserId(Integer userId)
{
//
{
this
.
userId
=
userId
;
//
this.userId = userId;
}
//
}
//
public
String
getUsername
()
//
public String getUsername()
{
//
{
return
username
;
//
return username;
}
//
}
//
public
void
setUsername
(
String
username
)
//
public void setUsername(String username)
{
//
{
this
.
username
=
username
;
//
this.username = username;
}
//
}
//
public
String
getPassword
()
//
public String getPassword()
{
//
{
return
password
;
//
return password;
}
//
}
//
public
void
setPassword
(
String
password
)
//
public void setPassword(String password)
{
//
{
this
.
password
=
password
;
//
this.password = password;
}
//
}
//
public
String
getMobile
()
//
public String getMobile()
{
//
{
return
mobile
;
//
return mobile;
}
//
}
//
public
void
setMobile
(
String
mobile
)
//
public void setMobile(String mobile)
{
//
{
this
.
mobile
=
mobile
;
//
this.mobile = mobile;
}
//
}
}
//
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/adam/AdamSwitchAdminController.java
deleted
100644 → 0
View file @
86a55247
package
com
.
liquidnet
.
client
.
admin
.
web
.
controller
.
zhengzai
.
adam
;
import
com.liquidnet.client.admin.common.annotation.Log
;
import
com.liquidnet.client.admin.common.enums.BusinessType
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.service.adam.constant.AdamRedisConst
;
import
com.liquidnet.service.base.ResponseDto
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.Min
;
@Api
(
tags
=
"ADAM配置"
)
@Slf4j
@Validated
@RestController
@RequestMapping
(
"adam/switch"
)
public
class
AdamSwitchAdminController
{
@Autowired
RedisUtil
redisUtil
;
@Log
(
title
=
"ADAM配置"
,
businessType
=
BusinessType
.
GRANT
)
@RequiresPermissions
(
"adam:switch:buy:member"
)
@ApiOperation
(
value
=
"开放/限制购买会员"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"int"
,
name
=
"opt"
,
value
=
"0-限制|1-开放"
,
example
=
"0"
),
})
@PostMapping
(
"buy/member"
)
public
ResponseDto
<
Object
>
purchaseSwitch
(
@Max
(
1
)
@Min
(
0
)
@RequestParam
int
opt
)
{
redisUtil
.
set
(
AdamRedisConst
.
SWITCH_BUY_MEMBER
,
opt
);
return
ResponseDto
.
success
(
redisUtil
.
get
(
AdamRedisConst
.
SWITCH_BUY_MEMBER
));
}
@Log
(
title
=
"ADAM配置"
,
businessType
=
BusinessType
.
OTHER
)
@RequiresPermissions
(
"adam:switch:max:memberno"
)
@ApiOperation
(
value
=
"会员用户最大ID_NO"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"form"
,
required
=
true
,
dataType
=
"int"
,
name
=
"opt"
,
value
=
"会员用户最大ID_NO"
,
example
=
"15000"
),
})
@PostMapping
(
"set/memberno"
)
public
ResponseDto
<
Object
>
purchaseStartMemberNo
(
@Min
(
11417
)
@RequestParam
int
opt
)
{
redisUtil
.
set
(
AdamRedisConst
.
INCR_MEMBER_NO
,
opt
);
return
ResponseDto
.
success
(
redisUtil
.
get
(
AdamRedisConst
.
INCR_MEMBER_NO
));
}
}
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/adam/AdamUserMemberAdminController.java
View file @
85c9c89e
...
@@ -22,7 +22,7 @@ import javax.validation.constraints.NotBlank;
...
@@ -22,7 +22,7 @@ import javax.validation.constraints.NotBlank;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
@Api
(
tags
=
"
会员用户
"
)
@Api
(
tags
=
"
登登登会员
"
)
@Slf4j
@Slf4j
@Validated
@Validated
@RestController
@RestController
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/kylin/KylinOrderRefundAdminController.java
View file @
85c9c89e
...
@@ -18,6 +18,7 @@ import com.liquidnet.service.kylin.dto.param.RefundSearchParam;
...
@@ -18,6 +18,7 @@ import com.liquidnet.service.kylin.dto.param.RefundSearchParam;
import
com.liquidnet.service.kylin.dto.vo.returns.KylinOrderRefundsVo
;
import
com.liquidnet.service.kylin.dto.vo.returns.KylinOrderRefundsVo
;
import
com.liquidnet.service.kylin.dto.vo.returns.RefundOrderDetailsVo
;
import
com.liquidnet.service.kylin.dto.vo.returns.RefundOrderDetailsVo
;
import
com.liquidnet.service.kylin.service.IKylinOrderRefundsService
;
import
com.liquidnet.service.kylin.service.IKylinOrderRefundsService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -38,7 +39,7 @@ import java.util.Map;
...
@@ -38,7 +39,7 @@ import java.util.Map;
* @author jiangxiulong
* @author jiangxiulong
* @since 2021-05-25 10:58 上午
* @since 2021-05-25 10:58 上午
*/
*/
@Api
(
tags
=
"RDFUND订单"
)
@Controller
@Controller
@RequestMapping
(
"/kylin/refund"
)
@RequestMapping
(
"/kylin/refund"
)
public
class
KylinOrderRefundAdminController
extends
BaseController
{
public
class
KylinOrderRefundAdminController
extends
BaseController
{
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/order/OrderSwitchAdminController.java
View file @
85c9c89e
...
@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
@Api
(
tags
=
"ORDER
订单号
"
)
@Api
(
tags
=
"ORDER
订单
"
)
@Slf4j
@Slf4j
@Validated
@Validated
@RestController
@RestController
...
...
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