Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
roo-cloud
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
万敏
roo-cloud
Commits
1876a84b
Commit
1876a84b
authored
Jul 08, 2021
by
官佳财
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增袋鼠运营后台各个菜单分页查询条件
parent
2e848b5d
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
280 additions
and
93 deletions
+280
-93
roo-admin/roo-admin-server/src/main/java/com/roo/controller/AppRevisionController.java
...c/main/java/com/roo/controller/AppRevisionController.java
+17
-15
roo-admin/roo-admin-server/src/main/java/com/roo/controller/BlockChainController.java
...rc/main/java/com/roo/controller/BlockChainController.java
+3
-1
roo-admin/roo-admin-server/src/main/java/com/roo/controller/ChainNodesController.java
...rc/main/java/com/roo/controller/ChainNodesController.java
+18
-15
roo-admin/roo-admin-server/src/main/java/com/roo/controller/DappsController.java
...ver/src/main/java/com/roo/controller/DappsController.java
+20
-15
roo-admin/roo-admin-server/src/main/java/com/roo/controller/MarketController.java
...er/src/main/java/com/roo/controller/MarketController.java
+4
-1
roo-admin/roo-admin-server/src/main/java/com/roo/controller/OtcController.java
...erver/src/main/java/com/roo/controller/OtcController.java
+17
-15
roo-admin/roo-admin-server/src/main/java/com/roo/controller/TokenController.java
...ver/src/main/java/com/roo/controller/TokenController.java
+21
-15
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/AppRevisionServiceImpl.java
...ain/java/com/roo/service/impl/AppRevisionServiceImpl.java
+4
-2
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/BlockChainServiceImpl.java
...main/java/com/roo/service/impl/BlockChainServiceImpl.java
+5
-2
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/ChainNodesServiceImpl.java
...main/java/com/roo/service/impl/ChainNodesServiceImpl.java
+7
-2
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/DappsServiceImpl.java
.../src/main/java/com/roo/service/impl/DappsServiceImpl.java
+11
-2
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/MarketServiceImpl.java
...src/main/java/com/roo/service/impl/MarketServiceImpl.java
+7
-2
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/OtcServiceImpl.java
...er/src/main/java/com/roo/service/impl/OtcServiceImpl.java
+5
-2
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/TokenServiceImpl.java
.../src/main/java/com/roo/service/impl/TokenServiceImpl.java
+14
-4
roo-admin/roo-admin-server/src/test/java/com/roo/service/AllServiceTest.java
...-server/src/test/java/com/roo/service/AllServiceTest.java
+127
-0
No files found.
roo-admin/roo-admin-server/src/main/java/com/roo/controller/AppRevisionController.java
View file @
1876a84b
...
@@ -28,14 +28,14 @@ import java.util.Map;
...
@@ -28,14 +28,14 @@ import java.util.Map;
/**
/**
* app版本号
* app版本号
*
*
* @author momin 460363410@qq.com
* @author momin 460363410@qq.com
* @since 1.0 2021-07-02
* @since 1.0 2021-07-02
*/
*/
@RestController
@RestController
@RequestMapping
(
"apprevision"
)
@RequestMapping
(
"apprevision"
)
@Api
(
tags
=
"app版本号"
)
@Api
(
tags
=
"app版本号"
)
public
class
AppRevisionController
{
public
class
AppRevisionController
{
@Autowired
@Autowired
private
AppRevisionService
appRevisionService
;
private
AppRevisionService
appRevisionService
;
...
@@ -43,13 +43,15 @@ public class AppRevisionController {
...
@@ -43,13 +43,15 @@ public class AppRevisionController {
@GetMapping
(
"page"
)
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"platform"
,
value
=
"平台(android/ios)"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"version"
,
value
=
"版本号"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
})
@PreAuthorize
(
"hasAuthority('roowallet:apprevision:page')"
)
@PreAuthorize
(
"hasAuthority('roowallet:apprevision:page')"
)
public
Result
<
PageData
<
AppRevisionDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
public
Result
<
PageData
<
AppRevisionDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
)
{
PageData
<
AppRevisionDTO
>
page
=
appRevisionService
.
page
(
params
);
PageData
<
AppRevisionDTO
>
page
=
appRevisionService
.
page
(
params
);
return
new
Result
<
PageData
<
AppRevisionDTO
>>().
ok
(
page
);
return
new
Result
<
PageData
<
AppRevisionDTO
>>().
ok
(
page
);
...
@@ -58,7 +60,7 @@ public class AppRevisionController {
...
@@ -58,7 +60,7 @@ public class AppRevisionController {
@GetMapping
(
"{id}"
)
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@ApiOperation
(
"信息"
)
@PreAuthorize
(
"hasAuthority('roowallet:apprevision:info')"
)
@PreAuthorize
(
"hasAuthority('roowallet:apprevision:info')"
)
public
Result
<
AppRevisionDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
<
AppRevisionDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
)
{
AppRevisionDTO
data
=
appRevisionService
.
get
(
id
);
AppRevisionDTO
data
=
appRevisionService
.
get
(
id
);
return
new
Result
<
AppRevisionDTO
>().
ok
(
data
);
return
new
Result
<
AppRevisionDTO
>().
ok
(
data
);
...
@@ -68,7 +70,7 @@ public class AppRevisionController {
...
@@ -68,7 +70,7 @@ public class AppRevisionController {
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@PreAuthorize
(
"hasAuthority('roowallet:apprevision:save')"
)
@PreAuthorize
(
"hasAuthority('roowallet:apprevision:save')"
)
public
Result
save
(
@RequestBody
AppRevisionDTO
dto
){
public
Result
save
(
@RequestBody
AppRevisionDTO
dto
)
{
//效验数据
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
...
@@ -81,7 +83,7 @@ public class AppRevisionController {
...
@@ -81,7 +83,7 @@ public class AppRevisionController {
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
@LogOperation
(
"修改"
)
@LogOperation
(
"修改"
)
@PreAuthorize
(
"hasAuthority('roowallet:apprevision:update')"
)
@PreAuthorize
(
"hasAuthority('roowallet:apprevision:update')"
)
public
Result
update
(
@RequestBody
AppRevisionDTO
dto
){
public
Result
update
(
@RequestBody
AppRevisionDTO
dto
)
{
//效验数据
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
...
@@ -94,7 +96,7 @@ public class AppRevisionController {
...
@@ -94,7 +96,7 @@ public class AppRevisionController {
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
@LogOperation
(
"删除"
)
@LogOperation
(
"删除"
)
@PreAuthorize
(
"hasAuthority('roowallet:apprevision:delete')"
)
@PreAuthorize
(
"hasAuthority('roowallet:apprevision:delete')"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
public
Result
delete
(
@RequestBody
Long
[]
ids
)
{
//效验数据
//效验数据
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
...
...
roo-admin/roo-admin-server/src/main/java/com/roo/controller/BlockChainController.java
View file @
1876a84b
...
@@ -46,7 +46,9 @@ public class BlockChainController {
...
@@ -46,7 +46,9 @@ public class BlockChainController {
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"code"
,
value
=
"主链标识,如:BSC"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"isEnabled"
,
value
=
"是否启用"
,
paramType
=
"query"
,
dataType
=
"Boolean"
)
})
})
@PreAuthorize
(
"hasAuthority('roowallet:blockchain:page')"
)
@PreAuthorize
(
"hasAuthority('roowallet:blockchain:page')"
)
public
Result
<
PageData
<
BlockChainDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
public
Result
<
PageData
<
BlockChainDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
...
...
roo-admin/roo-admin-server/src/main/java/com/roo/controller/ChainNodesController.java
View file @
1876a84b
...
@@ -28,14 +28,14 @@ import java.util.Map;
...
@@ -28,14 +28,14 @@ import java.util.Map;
/**
/**
* RPC节点配置
* RPC节点配置
*
*
* @author momin 460363410@qq.com
* @author momin 460363410@qq.com
* @since 1.0 2021-07-02
* @since 1.0 2021-07-02
*/
*/
@RestController
@RestController
@RequestMapping
(
"chainnodes"
)
@RequestMapping
(
"chainnodes"
)
@Api
(
tags
=
"RPC节点配置"
)
@Api
(
tags
=
"RPC节点配置"
)
public
class
ChainNodesController
{
public
class
ChainNodesController
{
@Autowired
@Autowired
private
ChainNodesService
chainNodesService
;
private
ChainNodesService
chainNodesService
;
...
@@ -43,13 +43,16 @@ public class ChainNodesController {
...
@@ -43,13 +43,16 @@ public class ChainNodesController {
@GetMapping
(
"page"
)
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"chainCode"
,
value
=
"block_chain_code,主链符号,如:BSC"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"network"
,
value
=
"网络标识(MAIN=主网,TEST=测试网)"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"isEnabled"
,
value
=
"是否启用"
,
paramType
=
"query"
,
dataType
=
"Boolean"
)
})
})
@PreAuthorize
(
"hasAuthority('chainnodes:chainnodes:page')"
)
@PreAuthorize
(
"hasAuthority('chainnodes:chainnodes:page')"
)
public
Result
<
PageData
<
ChainNodesDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
public
Result
<
PageData
<
ChainNodesDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
)
{
PageData
<
ChainNodesDTO
>
page
=
chainNodesService
.
page
(
params
);
PageData
<
ChainNodesDTO
>
page
=
chainNodesService
.
page
(
params
);
return
new
Result
<
PageData
<
ChainNodesDTO
>>().
ok
(
page
);
return
new
Result
<
PageData
<
ChainNodesDTO
>>().
ok
(
page
);
...
@@ -58,7 +61,7 @@ public class ChainNodesController {
...
@@ -58,7 +61,7 @@ public class ChainNodesController {
@GetMapping
(
"{id}"
)
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@ApiOperation
(
"信息"
)
@PreAuthorize
(
"hasAuthority('chainnodes:chainnodes:info')"
)
@PreAuthorize
(
"hasAuthority('chainnodes:chainnodes:info')"
)
public
Result
<
ChainNodesDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
<
ChainNodesDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
)
{
ChainNodesDTO
data
=
chainNodesService
.
get
(
id
);
ChainNodesDTO
data
=
chainNodesService
.
get
(
id
);
return
new
Result
<
ChainNodesDTO
>().
ok
(
data
);
return
new
Result
<
ChainNodesDTO
>().
ok
(
data
);
...
@@ -68,7 +71,7 @@ public class ChainNodesController {
...
@@ -68,7 +71,7 @@ public class ChainNodesController {
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@PreAuthorize
(
"hasAuthority('chainnodes:chainnodes:save')"
)
@PreAuthorize
(
"hasAuthority('chainnodes:chainnodes:save')"
)
public
Result
save
(
@RequestBody
ChainNodesDTO
dto
){
public
Result
save
(
@RequestBody
ChainNodesDTO
dto
)
{
//效验数据
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
...
@@ -81,7 +84,7 @@ public class ChainNodesController {
...
@@ -81,7 +84,7 @@ public class ChainNodesController {
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
@LogOperation
(
"修改"
)
@LogOperation
(
"修改"
)
@PreAuthorize
(
"hasAuthority('chainnodes:chainnodes:update')"
)
@PreAuthorize
(
"hasAuthority('chainnodes:chainnodes:update')"
)
public
Result
update
(
@RequestBody
ChainNodesDTO
dto
){
public
Result
update
(
@RequestBody
ChainNodesDTO
dto
)
{
//效验数据
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
...
@@ -94,7 +97,7 @@ public class ChainNodesController {
...
@@ -94,7 +97,7 @@ public class ChainNodesController {
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
@LogOperation
(
"删除"
)
@LogOperation
(
"删除"
)
@PreAuthorize
(
"hasAuthority('chainnodes:chainnodes:delete')"
)
@PreAuthorize
(
"hasAuthority('chainnodes:chainnodes:delete')"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
public
Result
delete
(
@RequestBody
Long
[]
ids
)
{
//效验数据
//效验数据
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
...
...
roo-admin/roo-admin-server/src/main/java/com/roo/controller/DappsController.java
View file @
1876a84b
...
@@ -28,14 +28,14 @@ import java.util.Map;
...
@@ -28,14 +28,14 @@ import java.util.Map;
/**
/**
* dapp管理
* dapp管理
*
*
* @author momin 460363410@qq.com
* @author momin 460363410@qq.com
* @since 1.0 2021-07-02
* @since 1.0 2021-07-02
*/
*/
@RestController
@RestController
@RequestMapping
(
"dapps"
)
@RequestMapping
(
"dapps"
)
@Api
(
tags
=
"dapp管理"
)
@Api
(
tags
=
"dapp管理"
)
public
class
DappsController
{
public
class
DappsController
{
@Autowired
@Autowired
private
DappsService
dappsService
;
private
DappsService
dappsService
;
...
@@ -43,13 +43,18 @@ public class DappsController {
...
@@ -43,13 +43,18 @@ public class DappsController {
@GetMapping
(
"page"
)
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"名称,如:paraswap"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"类型"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"hots"
,
value
=
"是否热门(1:热门 0:非热门)"
,
paramType
=
"query"
,
dataType
=
"Boolean"
),
@ApiImplicitParam
(
name
=
"chain"
,
value
=
"dapp所属链"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"display"
,
value
=
"是否显示(show、hide)"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
})
@PreAuthorize
(
"hasAuthority('dapps:dapps:page')"
)
@PreAuthorize
(
"hasAuthority('dapps:dapps:page')"
)
public
Result
<
PageData
<
DappsDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
public
Result
<
PageData
<
DappsDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
)
{
PageData
<
DappsDTO
>
page
=
dappsService
.
page
(
params
);
PageData
<
DappsDTO
>
page
=
dappsService
.
page
(
params
);
return
new
Result
<
PageData
<
DappsDTO
>>().
ok
(
page
);
return
new
Result
<
PageData
<
DappsDTO
>>().
ok
(
page
);
...
@@ -58,7 +63,7 @@ public class DappsController {
...
@@ -58,7 +63,7 @@ public class DappsController {
@GetMapping
(
"{id}"
)
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@ApiOperation
(
"信息"
)
@PreAuthorize
(
"hasAuthority('dapps:dapps:info')"
)
@PreAuthorize
(
"hasAuthority('dapps:dapps:info')"
)
public
Result
<
DappsDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
<
DappsDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
)
{
DappsDTO
data
=
dappsService
.
get
(
id
);
DappsDTO
data
=
dappsService
.
get
(
id
);
return
new
Result
<
DappsDTO
>().
ok
(
data
);
return
new
Result
<
DappsDTO
>().
ok
(
data
);
...
@@ -68,7 +73,7 @@ public class DappsController {
...
@@ -68,7 +73,7 @@ public class DappsController {
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@PreAuthorize
(
"hasAuthority('dapps:dapps:save')"
)
@PreAuthorize
(
"hasAuthority('dapps:dapps:save')"
)
public
Result
save
(
@RequestBody
DappsDTO
dto
){
public
Result
save
(
@RequestBody
DappsDTO
dto
)
{
//效验数据
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
...
@@ -81,7 +86,7 @@ public class DappsController {
...
@@ -81,7 +86,7 @@ public class DappsController {
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
@LogOperation
(
"修改"
)
@LogOperation
(
"修改"
)
@PreAuthorize
(
"hasAuthority('dapps:dapps:update')"
)
@PreAuthorize
(
"hasAuthority('dapps:dapps:update')"
)
public
Result
update
(
@RequestBody
DappsDTO
dto
){
public
Result
update
(
@RequestBody
DappsDTO
dto
)
{
//效验数据
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
...
@@ -94,7 +99,7 @@ public class DappsController {
...
@@ -94,7 +99,7 @@ public class DappsController {
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
@LogOperation
(
"删除"
)
@LogOperation
(
"删除"
)
@PreAuthorize
(
"hasAuthority('dapps:dapps:delete')"
)
@PreAuthorize
(
"hasAuthority('dapps:dapps:delete')"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
public
Result
delete
(
@RequestBody
Long
[]
ids
)
{
//效验数据
//效验数据
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
...
...
roo-admin/roo-admin-server/src/main/java/com/roo/controller/MarketController.java
View file @
1876a84b
...
@@ -46,7 +46,10 @@ public class MarketController {
...
@@ -46,7 +46,10 @@ public class MarketController {
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"symbol"
,
value
=
"交易对符号,如:BTC_USDT"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"baseAsset"
,
value
=
"对比币种,如:BTC"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"quoteAsset"
,
value
=
"计价币种,如:USDT"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
})
@PreAuthorize
(
"hasAuthority('market:market:page')"
)
@PreAuthorize
(
"hasAuthority('market:market:page')"
)
public
Result
<
PageData
<
MarketDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
public
Result
<
PageData
<
MarketDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
...
...
roo-admin/roo-admin-server/src/main/java/com/roo/controller/OtcController.java
View file @
1876a84b
...
@@ -28,14 +28,14 @@ import java.util.Map;
...
@@ -28,14 +28,14 @@ import java.util.Map;
/**
/**
* 法币币种
* 法币币种
*
*
* @author momin 460363410@qq.com
* @author momin 460363410@qq.com
* @since 1.0 2021-07-02
* @since 1.0 2021-07-02
*/
*/
@RestController
@RestController
@RequestMapping
(
"otc"
)
@RequestMapping
(
"otc"
)
@Api
(
tags
=
"法币币种"
)
@Api
(
tags
=
"法币币种"
)
public
class
OtcController
{
public
class
OtcController
{
@Autowired
@Autowired
private
OtcService
otcService
;
private
OtcService
otcService
;
...
@@ -43,13 +43,15 @@ public class OtcController {
...
@@ -43,13 +43,15 @@ public class OtcController {
@GetMapping
(
"page"
)
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"symbol"
,
value
=
"法币符号,如:CNY"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"isEnabled"
,
value
=
"是否启用(1=启用,0=关闭)"
,
paramType
=
"query"
,
dataType
=
"Boolean"
)
})
})
@PreAuthorize
(
"hasAuthority('otc:otc:page')"
)
@PreAuthorize
(
"hasAuthority('otc:otc:page')"
)
public
Result
<
PageData
<
OtcDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
public
Result
<
PageData
<
OtcDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
)
{
PageData
<
OtcDTO
>
page
=
otcService
.
page
(
params
);
PageData
<
OtcDTO
>
page
=
otcService
.
page
(
params
);
return
new
Result
<
PageData
<
OtcDTO
>>().
ok
(
page
);
return
new
Result
<
PageData
<
OtcDTO
>>().
ok
(
page
);
...
@@ -58,7 +60,7 @@ public class OtcController {
...
@@ -58,7 +60,7 @@ public class OtcController {
@GetMapping
(
"{id}"
)
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@ApiOperation
(
"信息"
)
@PreAuthorize
(
"hasAuthority('otc:otc:info')"
)
@PreAuthorize
(
"hasAuthority('otc:otc:info')"
)
public
Result
<
OtcDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
<
OtcDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
)
{
OtcDTO
data
=
otcService
.
get
(
id
);
OtcDTO
data
=
otcService
.
get
(
id
);
return
new
Result
<
OtcDTO
>().
ok
(
data
);
return
new
Result
<
OtcDTO
>().
ok
(
data
);
...
@@ -68,7 +70,7 @@ public class OtcController {
...
@@ -68,7 +70,7 @@ public class OtcController {
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@PreAuthorize
(
"hasAuthority('otc:otc:save')"
)
@PreAuthorize
(
"hasAuthority('otc:otc:save')"
)
public
Result
save
(
@RequestBody
OtcDTO
dto
){
public
Result
save
(
@RequestBody
OtcDTO
dto
)
{
//效验数据
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
...
@@ -81,7 +83,7 @@ public class OtcController {
...
@@ -81,7 +83,7 @@ public class OtcController {
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
@LogOperation
(
"修改"
)
@LogOperation
(
"修改"
)
@PreAuthorize
(
"hasAuthority('otc:otc:update')"
)
@PreAuthorize
(
"hasAuthority('otc:otc:update')"
)
public
Result
update
(
@RequestBody
OtcDTO
dto
){
public
Result
update
(
@RequestBody
OtcDTO
dto
)
{
//效验数据
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
...
@@ -94,7 +96,7 @@ public class OtcController {
...
@@ -94,7 +96,7 @@ public class OtcController {
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
@LogOperation
(
"删除"
)
@LogOperation
(
"删除"
)
@PreAuthorize
(
"hasAuthority('otc:otc:delete')"
)
@PreAuthorize
(
"hasAuthority('otc:otc:delete')"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
public
Result
delete
(
@RequestBody
Long
[]
ids
)
{
//效验数据
//效验数据
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
...
...
roo-admin/roo-admin-server/src/main/java/com/roo/controller/TokenController.java
View file @
1876a84b
...
@@ -28,14 +28,14 @@ import java.util.Map;
...
@@ -28,14 +28,14 @@ import java.util.Map;
/**
/**
* 代币管理
* 代币管理
*
*
* @author momin 460363410@qq.com
* @author momin 460363410@qq.com
* @since 1.0 2021-07-02
* @since 1.0 2021-07-02
*/
*/
@RestController
@RestController
@RequestMapping
(
"token"
)
@RequestMapping
(
"token"
)
@Api
(
tags
=
"代币管理"
)
@Api
(
tags
=
"代币管理"
)
public
class
TokenController
{
public
class
TokenController
{
@Autowired
@Autowired
private
TokenService
tokenService
;
private
TokenService
tokenService
;
...
@@ -43,13 +43,19 @@ public class TokenController {
...
@@ -43,13 +43,19 @@ public class TokenController {
@GetMapping
(
"page"
)
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"blockChainCode"
,
value
=
"block_chain_code,如:ETH、BSC"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"symbol"
,
value
=
"符号,如:USDT"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"contractId"
,
value
=
"合约地址"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"isRecommend"
,
value
=
"是否系统推荐;1:是 0:否"
,
paramType
=
"query"
,
dataType
=
"Boolean"
),
@ApiImplicitParam
(
name
=
"isSearch"
,
value
=
"是否可搜索;1:是 0:否"
,
paramType
=
"query"
,
dataType
=
"Boolean"
),
@ApiImplicitParam
(
name
=
"isScan"
,
value
=
"是否可区块扫描;1:是 0:否"
,
paramType
=
"query"
,
dataType
=
"Boolean"
)
})
})
@PreAuthorize
(
"hasAuthority('token:token:page')"
)
@PreAuthorize
(
"hasAuthority('token:token:page')"
)
public
Result
<
PageData
<
TokenDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
public
Result
<
PageData
<
TokenDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
)
{
PageData
<
TokenDTO
>
page
=
tokenService
.
page
(
params
);
PageData
<
TokenDTO
>
page
=
tokenService
.
page
(
params
);
return
new
Result
<
PageData
<
TokenDTO
>>().
ok
(
page
);
return
new
Result
<
PageData
<
TokenDTO
>>().
ok
(
page
);
...
@@ -58,7 +64,7 @@ public class TokenController {
...
@@ -58,7 +64,7 @@ public class TokenController {
@GetMapping
(
"{id}"
)
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@ApiOperation
(
"信息"
)
@PreAuthorize
(
"hasAuthority('token:token:info')"
)
@PreAuthorize
(
"hasAuthority('token:token:info')"
)
public
Result
<
TokenDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
<
TokenDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
)
{
TokenDTO
data
=
tokenService
.
get
(
id
);
TokenDTO
data
=
tokenService
.
get
(
id
);
return
new
Result
<
TokenDTO
>().
ok
(
data
);
return
new
Result
<
TokenDTO
>().
ok
(
data
);
...
@@ -68,7 +74,7 @@ public class TokenController {
...
@@ -68,7 +74,7 @@ public class TokenController {
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@PreAuthorize
(
"hasAuthority('token:token:save')"
)
@PreAuthorize
(
"hasAuthority('token:token:save')"
)
public
Result
save
(
@RequestBody
TokenDTO
dto
){
public
Result
save
(
@RequestBody
TokenDTO
dto
)
{
//效验数据
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
...
@@ -81,7 +87,7 @@ public class TokenController {
...
@@ -81,7 +87,7 @@ public class TokenController {
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
@LogOperation
(
"修改"
)
@LogOperation
(
"修改"
)
@PreAuthorize
(
"hasAuthority('token:token:update')"
)
@PreAuthorize
(
"hasAuthority('token:token:update')"
)
public
Result
update
(
@RequestBody
TokenDTO
dto
){
public
Result
update
(
@RequestBody
TokenDTO
dto
)
{
//效验数据
//效验数据
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
...
@@ -94,7 +100,7 @@ public class TokenController {
...
@@ -94,7 +100,7 @@ public class TokenController {
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
@LogOperation
(
"删除"
)
@LogOperation
(
"删除"
)
@PreAuthorize
(
"hasAuthority('token:token:delete')"
)
@PreAuthorize
(
"hasAuthority('token:token:delete')"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
public
Result
delete
(
@RequestBody
Long
[]
ids
)
{
//效验数据
//效验数据
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
...
...
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/AppRevisionServiceImpl.java
View file @
1876a84b
...
@@ -22,9 +22,11 @@ public class AppRevisionServiceImpl extends CrudServiceImpl<AppRevisionDao, AppR
...
@@ -22,9 +22,11 @@ public class AppRevisionServiceImpl extends CrudServiceImpl<AppRevisionDao, AppR
@Override
@Override
public
QueryWrapper
<
AppRevisionEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
public
QueryWrapper
<
AppRevisionEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
platform
=
(
String
)
params
.
get
(
"platform"
);
String
version
=
(
String
)
params
.
get
(
"version"
);
QueryWrapper
<
AppRevisionEntity
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
AppRevisionEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
platform
),
"platform"
,
platform
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
version
),
"version"
,
version
);
return
wrapper
;
return
wrapper
;
}
}
...
...
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/BlockChainServiceImpl.java
View file @
1876a84b
...
@@ -6,6 +6,7 @@ import com.roo.dao.BlockChainDao;
...
@@ -6,6 +6,7 @@ import com.roo.dao.BlockChainDao;
import
com.roo.dto.BlockChainDTO
;
import
com.roo.dto.BlockChainDTO
;
import
com.roo.entity.BlockChainEntity
;
import
com.roo.entity.BlockChainEntity
;
import
com.roo.service.BlockChainService
;
import
com.roo.service.BlockChainService
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -21,9 +22,11 @@ public class BlockChainServiceImpl extends CrudServiceImpl<BlockChainDao, BlockC
...
@@ -21,9 +22,11 @@ public class BlockChainServiceImpl extends CrudServiceImpl<BlockChainDao, BlockC
@Override
@Override
public
QueryWrapper
<
BlockChainEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
public
QueryWrapper
<
BlockChainEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
code
=
(
String
)
params
.
get
(
"code"
);
Boolean
isEnabled
=
(
Boolean
)
params
.
get
(
"isEnabled"
);
QueryWrapper
<
BlockChainEntity
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
BlockChainEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
code
),
"code"
,
code
);
wrapper
.
eq
(
isEnabled
!=
null
,
"is_enabled"
,
isEnabled
);
return
wrapper
;
return
wrapper
;
}
}
...
...
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/ChainNodesServiceImpl.java
View file @
1876a84b
...
@@ -6,6 +6,7 @@ import com.roo.dao.ChainNodesDao;
...
@@ -6,6 +6,7 @@ import com.roo.dao.ChainNodesDao;
import
com.roo.dto.ChainNodesDTO
;
import
com.roo.dto.ChainNodesDTO
;
import
com.roo.entity.ChainNodesEntity
;
import
com.roo.entity.ChainNodesEntity
;
import
com.roo.service.ChainNodesService
;
import
com.roo.service.ChainNodesService
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -21,9 +22,13 @@ public class ChainNodesServiceImpl extends CrudServiceImpl<ChainNodesDao, ChainN
...
@@ -21,9 +22,13 @@ public class ChainNodesServiceImpl extends CrudServiceImpl<ChainNodesDao, ChainN
@Override
@Override
public
QueryWrapper
<
ChainNodesEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
public
QueryWrapper
<
ChainNodesEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
chainCode
=
(
String
)
params
.
get
(
"chainCode"
);
String
network
=
(
String
)
params
.
get
(
"network"
);
Boolean
isEnabled
=
(
Boolean
)
params
.
get
(
"isEnabled"
);
QueryWrapper
<
ChainNodesEntity
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
ChainNodesEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
chainCode
),
"chain_code"
,
chainCode
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
network
),
"network"
,
network
);
wrapper
.
eq
(
isEnabled
!=
null
,
"is_enabled"
,
isEnabled
);
return
wrapper
;
return
wrapper
;
}
}
...
...
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/DappsServiceImpl.java
View file @
1876a84b
...
@@ -6,6 +6,7 @@ import com.roo.dao.DappsDao;
...
@@ -6,6 +6,7 @@ import com.roo.dao.DappsDao;
import
com.roo.dto.DappsDTO
;
import
com.roo.dto.DappsDTO
;
import
com.roo.entity.DappsEntity
;
import
com.roo.entity.DappsEntity
;
import
com.roo.service.DappsService
;
import
com.roo.service.DappsService
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -21,9 +22,17 @@ public class DappsServiceImpl extends CrudServiceImpl<DappsDao, DappsEntity, Dap
...
@@ -21,9 +22,17 @@ public class DappsServiceImpl extends CrudServiceImpl<DappsDao, DappsEntity, Dap
@Override
@Override
public
QueryWrapper
<
DappsEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
public
QueryWrapper
<
DappsEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
name
=
(
String
)
params
.
get
(
"name"
);
String
type
=
(
String
)
params
.
get
(
"type"
);
Boolean
hots
=
(
Boolean
)
params
.
get
(
"hots"
);
String
chain
=
(
String
)
params
.
get
(
"chain"
);
String
display
=
(
String
)
params
.
get
(
"display"
);
QueryWrapper
<
DappsEntity
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
DappsEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
name
),
"name"
,
name
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
type
),
"type"
,
type
);
wrapper
.
eq
(
hots
!=
null
,
"hots"
,
hots
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
chain
),
"chain"
,
chain
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
display
),
"display"
,
display
);
return
wrapper
;
return
wrapper
;
}
}
...
...
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/MarketServiceImpl.java
View file @
1876a84b
...
@@ -6,6 +6,7 @@ import com.roo.dao.MarketDao;
...
@@ -6,6 +6,7 @@ import com.roo.dao.MarketDao;
import
com.roo.dto.MarketDTO
;
import
com.roo.dto.MarketDTO
;
import
com.roo.entity.MarketEntity
;
import
com.roo.entity.MarketEntity
;
import
com.roo.service.MarketService
;
import
com.roo.service.MarketService
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -21,9 +22,13 @@ public class MarketServiceImpl extends CrudServiceImpl<MarketDao, MarketEntity,
...
@@ -21,9 +22,13 @@ public class MarketServiceImpl extends CrudServiceImpl<MarketDao, MarketEntity,
@Override
@Override
public
QueryWrapper
<
MarketEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
public
QueryWrapper
<
MarketEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
symbol
=
(
String
)
params
.
get
(
"symbol"
);
String
baseAsset
=
(
String
)
params
.
get
(
"baseAsset"
);
String
quoteAsset
=
(
String
)
params
.
get
(
"quoteAsset"
);
QueryWrapper
<
MarketEntity
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
MarketEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
symbol
),
"symbol"
,
symbol
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
baseAsset
),
"base_asset"
,
baseAsset
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
quoteAsset
),
"quote_asset"
,
quoteAsset
);
return
wrapper
;
return
wrapper
;
}
}
...
...
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/OtcServiceImpl.java
View file @
1876a84b
...
@@ -6,6 +6,7 @@ import com.roo.dao.OtcDao;
...
@@ -6,6 +6,7 @@ import com.roo.dao.OtcDao;
import
com.roo.dto.OtcDTO
;
import
com.roo.dto.OtcDTO
;
import
com.roo.entity.OtcEntity
;
import
com.roo.entity.OtcEntity
;
import
com.roo.service.OtcService
;
import
com.roo.service.OtcService
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -21,9 +22,11 @@ public class OtcServiceImpl extends CrudServiceImpl<OtcDao, OtcEntity, OtcDTO> i
...
@@ -21,9 +22,11 @@ public class OtcServiceImpl extends CrudServiceImpl<OtcDao, OtcEntity, OtcDTO> i
@Override
@Override
public
QueryWrapper
<
OtcEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
public
QueryWrapper
<
OtcEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
symbol
=
(
String
)
params
.
get
(
"symbol"
);
Boolean
isEnabled
=
(
Boolean
)
params
.
get
(
"isEnabled"
);
QueryWrapper
<
OtcEntity
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
OtcEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
symbol
),
"symbol"
,
symbol
);
wrapper
.
eq
(
isEnabled
!=
null
,
"is_enabled"
,
isEnabled
);
return
wrapper
;
return
wrapper
;
}
}
...
...
roo-admin/roo-admin-server/src/main/java/com/roo/service/impl/TokenServiceImpl.java
View file @
1876a84b
...
@@ -6,6 +6,7 @@ import com.roo.dao.TokenDao;
...
@@ -6,6 +6,7 @@ import com.roo.dao.TokenDao;
import
com.roo.dto.TokenDTO
;
import
com.roo.dto.TokenDTO
;
import
com.roo.entity.TokenEntity
;
import
com.roo.entity.TokenEntity
;
import
com.roo.service.TokenService
;
import
com.roo.service.TokenService
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -21,11 +22,20 @@ public class TokenServiceImpl extends CrudServiceImpl<TokenDao, TokenEntity, Tok
...
@@ -21,11 +22,20 @@ public class TokenServiceImpl extends CrudServiceImpl<TokenDao, TokenEntity, Tok
@Override
@Override
public
QueryWrapper
<
TokenEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
public
QueryWrapper
<
TokenEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
QueryWrapper
<
TokenEntity
>
wrapper
=
new
QueryWrapper
<>();
String
chainCode
=
(
String
)
params
.
get
(
"blockChainCode"
);
String
symbol
=
(
String
)
params
.
get
(
"symbol"
);
String
contractId
=
(
String
)
params
.
get
(
"contractId"
);
Boolean
isRecommend
=
(
Boolean
)
params
.
get
(
"isRecommend"
);
Boolean
isSearch
=
(
Boolean
)
params
.
get
(
"isSearch"
);
Boolean
isScan
=
(
Boolean
)
params
.
get
(
"isScan"
);
QueryWrapper
<
TokenEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
chainCode
),
"chain_code"
,
chainCode
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
symbol
),
"symbol"
,
symbol
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
contractId
),
"contract_id"
,
contractId
);
wrapper
.
eq
(
isRecommend
!=
null
,
"is_recommend"
,
isRecommend
);
wrapper
.
eq
(
isSearch
!=
null
,
"is_search"
,
isSearch
);
wrapper
.
eq
(
isScan
!=
null
,
"is_scan"
,
isScan
);
return
wrapper
;
return
wrapper
;
}
}
}
}
roo-admin/roo-admin-server/src/test/java/com/roo/service/AllServiceTest.java
0 → 100644
View file @
1876a84b
package
com.roo.service
;
import
com.roo.commons.tools.page.PageData
;
import
com.roo.dto.*
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringRunner
;
import
java.util.HashMap
;
import
java.util.Map
;
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
public
class
AllServiceTest
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
AllServiceTest
.
class
);
@Autowired
private
AppRevisionService
appRevisionService
;
@Autowired
private
BlockChainService
blockChainService
;
@Autowired
private
ChainNodesService
chainNodesService
;
@Autowired
private
DappsService
dappsService
;
@Autowired
private
MarketService
marketService
;
@Autowired
private
OtcService
otcService
;
@Autowired
private
TokenService
tokenService
;
@Test
public
void
testAppRevisionPageParams
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"page"
,
"1"
);
params
.
put
(
"limit"
,
"10"
);
params
.
put
(
"platform"
,
"android"
);
params
.
put
(
"version"
,
"0.2.0"
);
PageData
<
AppRevisionDTO
>
page
=
appRevisionService
.
page
(
params
);
logger
.
info
(
"total:{}"
,
page
.
getTotal
());
}
@Test
public
void
testBlockChainPageParams
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"page"
,
"1"
);
params
.
put
(
"limit"
,
"10"
);
params
.
put
(
"isEnabled"
,
true
);
params
.
put
(
"code"
,
"BSC"
);
PageData
<
BlockChainDTO
>
page
=
blockChainService
.
page
(
params
);
logger
.
info
(
"total:{}"
,
page
.
getTotal
());
}
@Test
public
void
testChainNodesPageParams
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"page"
,
"1"
);
params
.
put
(
"limit"
,
"10"
);
params
.
put
(
"chainCode"
,
"BSC"
);
params
.
put
(
"network"
,
"TEST"
);
params
.
put
(
"isEnabled"
,
true
);
PageData
<
ChainNodesDTO
>
page
=
chainNodesService
.
page
(
params
);
logger
.
info
(
"total:{}"
,
page
.
getTotal
());
}
@Test
public
void
testDappsPageParams
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"page"
,
"1"
);
params
.
put
(
"limit"
,
"10"
);
params
.
put
(
"name"
,
"paraswap"
);
params
.
put
(
"hots"
,
true
);
params
.
put
(
"chain"
,
"ethereum"
);
params
.
put
(
"display"
,
"show"
);
PageData
<
DappsDTO
>
page
=
dappsService
.
page
(
params
);
logger
.
info
(
"total:{}"
,
page
.
getTotal
());
}
@Test
public
void
testMarketPageParams
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"page"
,
"1"
);
params
.
put
(
"limit"
,
"10"
);
params
.
put
(
"symbol"
,
"BTC_USDT"
);
params
.
put
(
"baseAsset"
,
"BTC"
);
params
.
put
(
"quoteAsset"
,
"USDT"
);
PageData
<
MarketDTO
>
page
=
marketService
.
page
(
params
);
logger
.
info
(
"total:{}"
,
page
.
getTotal
());
}
@Test
public
void
testOtcPageParams
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"page"
,
"1"
);
params
.
put
(
"limit"
,
"10"
);
params
.
put
(
"isEnabled"
,
true
);
params
.
put
(
"symbol"
,
"cny"
);
PageData
<
OtcDTO
>
page
=
otcService
.
page
(
params
);
logger
.
info
(
"total:{}"
,
page
.
getTotal
());
}
@Test
public
void
testTokenPageParams
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"page"
,
"1"
);
params
.
put
(
"limit"
,
"10"
);
params
.
put
(
"blockChainCode"
,
"ETH"
);
params
.
put
(
"symbol"
,
"USDT"
);
params
.
put
(
"contractId"
,
"0xdac17f958d2ee523a2206206994597c13d831ec7"
);
params
.
put
(
"isRecommend"
,
true
);
params
.
put
(
"isSearch"
,
true
);
params
.
put
(
"isScan"
,
true
);
PageData
<
TokenDTO
>
page
=
tokenService
.
page
(
params
);
logger
.
info
(
"total:{}"
,
page
.
getTotal
());
}
}
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